]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.4 - patch 20230514
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.764 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20230114.
5 #
6 # Copyright 2003-2022,2023      Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37   as_expr="expr"
38 else
39   as_expr="false"
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45   # We could just check for DJGPP; but this test a) works b) is more generic
46   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47   if test -f conf$$.exe; then
48     # Don't use ln at all; we don't have any links
49     as_ln_s='cp -p'
50   else
51     as_ln_s='ln -s'
52   fi
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54   as_ln_s='ln'
55 else
56   as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64   as_unset="unset"
65 else
66   as_unset="false"
67 fi
68
69 # NLS nuisances.
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.
81 as_nl='
82 '
83 IFS="   $as_nl"
84
85 # CDPATH.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88 # Name of the host.
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete.  It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
109
110 ac_unique_file="ncurses/base/lib_initscr.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 #  include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 #  include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 #  include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
198   # If the previous option needs an argument, assign it.
199   if test -n "$ac_prev"; then
200     eval "$ac_prev=\$ac_option"
201     ac_prev=
202     continue
203   fi
204
205   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207   # Accept the important Cygnus configure options, so we can diagnose typos.
208
209   case "$ac_option" in
210
211   -bindir | --bindir | --bindi | --bind | --bin | --bi)
212     ac_prev=bindir ;;
213   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214     bindir=$ac_optarg ;;
215
216   -build | --build | --buil | --bui | --bu)
217     ac_prev=build_alias ;;
218   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219     build_alias=$ac_optarg ;;
220
221   -cache-file | --cache-file | --cache-fil | --cache-fi \
222   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223     ac_prev=cache_file ;;
224   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226     cache_file=$ac_optarg ;;
227
228   --config-cache | -C)
229     cache_file=config.cache ;;
230
231   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232     ac_prev=datadir ;;
233   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234   | --da=*)
235     datadir=$ac_optarg ;;
236
237   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238   | --dataroo | --dataro | --datar)
239     ac_prev=datarootdir ;;
240   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242     datarootdir=$ac_optarg ;;
243
244   -disable-* | --disable-*)
245     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246     # Reject names that are not valid shell variable names.
247     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249    { (exit 1); exit 1; }; }
250     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251     eval "enable_$ac_feature=no" ;;
252
253   -enable-* | --enable-*)
254     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255     # Reject names that are not valid shell variable names.
256     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258    { (exit 1); exit 1; }; }
259     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260     case "$ac_option" in
261       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262       *) ac_optarg=yes ;;
263     esac
264     eval "enable_$ac_feature='$ac_optarg'" ;;
265
266   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268   | --exec | --exe | --ex)
269     ac_prev=exec_prefix ;;
270   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272   | --exec=* | --exe=* | --ex=*)
273     exec_prefix=$ac_optarg ;;
274
275   -gas | --gas | --ga | --g)
276     # Obsolete; use --with-gas.
277     with_gas=yes ;;
278
279   -help | --help | --hel | --he | -h)
280     ac_init_help=long ;;
281   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282     ac_init_help=recursive ;;
283   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284     ac_init_help=short ;;
285
286   -host | --host | --hos | --ho)
287     ac_prev=host_alias ;;
288   -host=* | --host=* | --hos=* | --ho=*)
289     host_alias=$ac_optarg ;;
290
291   -includedir | --includedir | --includedi | --included | --include \
292   | --includ | --inclu | --incl | --inc)
293     ac_prev=includedir ;;
294   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295   | --includ=* | --inclu=* | --incl=* | --inc=*)
296     includedir=$ac_optarg ;;
297
298   -infodir | --infodir | --infodi | --infod | --info | --inf)
299     ac_prev=infodir ;;
300   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301     infodir=$ac_optarg ;;
302
303   -libdir | --libdir | --libdi | --libd)
304     ac_prev=libdir ;;
305   -libdir=* | --libdir=* | --libdi=* | --libd=*)
306     libdir=$ac_optarg ;;
307
308   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309   | --libexe | --libex | --libe)
310     ac_prev=libexecdir ;;
311   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312   | --libexe=* | --libex=* | --libe=*)
313     libexecdir=$ac_optarg ;;
314
315   -localstatedir | --localstatedir | --localstatedi | --localstated \
316   | --localstate | --localstat | --localsta | --localst \
317   | --locals | --local | --loca | --loc | --lo)
318     ac_prev=localstatedir ;;
319   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322     localstatedir=$ac_optarg ;;
323
324   -runstatedir | --runstatedir | --runstatedi | --runstated \
325   | --runstate | --runstat | --runsta | --runst \
326   | --runs | --run | --ru)
327     ac_prev=runstatedir ;;
328   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330   | --runs=* | --run=* | --ru=*)
331     runstatedir=$ac_optarg ;;
332
333   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334     ac_prev=mandir ;;
335   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336     mandir=$ac_optarg ;;
337
338   -nfp | --nfp | --nf)
339     # Obsolete; use --without-fp.
340     with_fp=no ;;
341
342   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343   | --no-cr | --no-c)
344     no_create=yes ;;
345
346   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348     no_recursion=yes ;;
349
350   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352   | --oldin | --oldi | --old | --ol | --o)
353     ac_prev=oldincludedir ;;
354   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357     oldincludedir=$ac_optarg ;;
358
359   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360     ac_prev=prefix ;;
361   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362     prefix=$ac_optarg ;;
363
364   -program-prefix | --program-prefix | --program-prefi | --program-pref \
365   | --program-pre | --program-pr | --program-p)
366     ac_prev=program_prefix ;;
367   -program-prefix=* | --program-prefix=* | --program-prefi=* \
368   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369     program_prefix=$ac_optarg ;;
370
371   -program-suffix | --program-suffix | --program-suffi | --program-suff \
372   | --program-suf | --program-su | --program-s)
373     ac_prev=program_suffix ;;
374   -program-suffix=* | --program-suffix=* | --program-suffi=* \
375   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376     program_suffix=$ac_optarg ;;
377
378   -program-transform-name | --program-transform-name \
379   | --program-transform-nam | --program-transform-na \
380   | --program-transform-n | --program-transform- \
381   | --program-transform | --program-transfor \
382   | --program-transfo | --program-transf \
383   | --program-trans | --program-tran \
384   | --progr-tra | --program-tr | --program-t)
385     ac_prev=program_transform_name ;;
386   -program-transform-name=* | --program-transform-name=* \
387   | --program-transform-nam=* | --program-transform-na=* \
388   | --program-transform-n=* | --program-transform-=* \
389   | --program-transform=* | --program-transfor=* \
390   | --program-transfo=* | --program-transf=* \
391   | --program-trans=* | --program-tran=* \
392   | --progr-tra=* | --program-tr=* | --program-t=*)
393     program_transform_name=$ac_optarg ;;
394
395   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396   | -silent | --silent | --silen | --sile | --sil)
397     silent=yes ;;
398
399   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400     ac_prev=sbindir ;;
401   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402   | --sbi=* | --sb=*)
403     sbindir=$ac_optarg ;;
404
405   -sharedstatedir | --sharedstatedir | --sharedstatedi \
406   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407   | --sharedst | --shareds | --shared | --share | --shar \
408   | --sha | --sh)
409     ac_prev=sharedstatedir ;;
410   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413   | --sha=* | --sh=*)
414     sharedstatedir=$ac_optarg ;;
415
416   -site | --site | --sit)
417     ac_prev=site ;;
418   -site=* | --site=* | --sit=*)
419     site=$ac_optarg ;;
420
421   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422     ac_prev=srcdir ;;
423   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424     srcdir=$ac_optarg ;;
425
426   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427   | --syscon | --sysco | --sysc | --sys | --sy)
428     ac_prev=sysconfdir ;;
429   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431     sysconfdir=$ac_optarg ;;
432
433   -target | --target | --targe | --targ | --tar | --ta | --t)
434     ac_prev=target_alias ;;
435   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436     target_alias=$ac_optarg ;;
437
438   -v | -verbose | --verbose | --verbos | --verbo | --verb)
439     verbose=yes ;;
440
441   -version | --version | --versio | --versi | --vers | -V)
442     ac_init_version=: ;;
443
444   -with-* | --with-*)
445     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446     # Reject names that are not valid shell variable names.
447     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448       { echo "$as_me: error: invalid package name: $ac_package" >&2
449    { (exit 1); exit 1; }; }
450     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451     case "$ac_option" in
452       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453       *) ac_optarg=yes ;;
454     esac
455     eval "with_$ac_package='$ac_optarg'" ;;
456
457   -without-* | --without-*)
458     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459     # Reject names that are not valid shell variable names.
460     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461       { echo "$as_me: error: invalid package name: $ac_package" >&2
462    { (exit 1); exit 1; }; }
463     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464     eval "with_$ac_package=no" ;;
465
466   --x)
467     # Obsolete; use --with-x.
468     with_x=yes ;;
469
470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471   | --x-incl | --x-inc | --x-in | --x-i)
472     ac_prev=x_includes ;;
473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475     x_includes=$ac_optarg ;;
476
477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479     ac_prev=x_libraries ;;
480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482     x_libraries=$ac_optarg ;;
483
484   -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486    { (exit 1); exit 1; }; }
487     ;;
488
489   *=*)
490     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491     # Reject names that are not valid shell variable names.
492     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494    { (exit 1); exit 1; }; }
495     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496     eval "$ac_envvar='$ac_optarg'"
497     export "$ac_envvar" ;;
498
499   *)
500     # FIXME: should be removed in autoconf 3.0.
501     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512   { echo "$as_me: error: missing argument to $ac_option" >&2
513    { (exit 1); exit 1; }; }
514 fi
515
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
518 do
519   eval ac_val=$`echo "$ac_var"`
520   case "$ac_val" in
521     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529               localstatedir libdir includedir oldincludedir infodir mandir
530 do
531   eval ac_val=$`echo "$ac_var"`
532   case "$ac_val" in
533     [\\/$]* | ?:[\\/]* ) ;;
534     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535    { (exit 1); exit 1; }; };;
536   esac
537 done
538
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
541 build=$build_alias
542 host=$host_alias
543 target=$target_alias
544
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547   if test "x$build_alias" = x; then
548     cross_compiling=maybe
549     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550     If a cross compiler is detected then cross compile mode will be used." >&2
551   elif test "x$build_alias" != "x$host_alias"; then
552     cross_compiling=yes
553   fi
554 fi
555
556 ac_tool_prefix=
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559 test "$silent" = yes && exec 6>/dev/null
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r "$srcdir/$ac_unique_file"; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r "$srcdir/$ac_unique_file"; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578    { (exit 1); exit 1; }; }
579   else
580     { echo "$as_me: error: cannot find sources in $srcdir" >&2
581    { (exit 1); exit 1; }; }
582   fi
583 fi
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
598 ac_env_CC_value=$CC
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
617 ac_env_CXX_set=${CXX+set}
618 ac_env_CXX_value=$CXX
619 ac_cv_env_CXX_set=${CXX+set}
620 ac_cv_env_CXX_value=$CXX
621 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_env_CXXFLAGS_value=$CXXFLAGS
623 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625 ac_env_CXXCPP_set=${CXXCPP+set}
626 ac_env_CXXCPP_value=$CXXCPP
627 ac_cv_env_CXXCPP_set=${CXXCPP+set}
628 ac_cv_env_CXXCPP_value=$CXXCPP
629
630 #
631 # Report the --help message.
632 #
633 if test "$ac_init_help" = "long"; then
634   # Omit some internal or obsolete options to make the list less imposing.
635   # This message is too long to be a string in the A/UX 3.1 sh.
636   cat <<EOF
637 \`configure' configures this package to adapt to many kinds of systems.
638
639 Usage: $0 [OPTION]... [VAR=VALUE]...
640
641 To assign environment variables (e.g., CC, CFLAGS...), specify them as
642 VAR=VALUE.  See below for descriptions of some of the useful variables.
643
644 Defaults for the options are specified in brackets.
645
646 Configuration:
647   -h, --help              display this help and exit
648       --help=short        display options specific to this package
649       --help=recursive    display the short help of all the included packages
650   -V, --version           display version information and exit
651   -q, --quiet, --silent   do not print \`checking...' messages
652       --cache-file=FILE   cache test results in FILE [disabled]
653   -C, --config-cache      alias for \`--cache-file=config.cache'
654   -n, --no-create         do not create output files
655       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
656
657 EOF
658
659   cat <<EOF
660 Installation directories:
661   --prefix=PREFIX         install architecture-independent files in PREFIX
662                           [$ac_default_prefix]
663   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
664                           [PREFIX]
665
666 By default, \`make install' will install all the files in
667 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
668 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669 for instance \`--prefix=\$HOME'.
670
671 For better control, use the options below.
672
673 Fine tuning of the installation directories:
674   --bindir=DIR            user executables [EPREFIX/bin]
675   --sbindir=DIR           system admin executables [EPREFIX/sbin]
676   --libexecdir=DIR        program executables [EPREFIX/libexec]
677   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
678   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
682   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
683   --libdir=DIR            object code libraries [EPREFIX/lib]
684   --includedir=DIR        C header files [PREFIX/include]
685   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
686   --infodir=DIR           info documentation [DATAROOTDIR/info]
687   --mandir=DIR            man documentation [DATAROOTDIR/man]
688 EOF
689
690   cat <<\EOF
691
692 Program names:
693   --program-prefix=PREFIX            prepend PREFIX to installed program names
694   --program-suffix=SUFFIX            append SUFFIX to installed program names
695   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
696
697 System types:
698   --build=BUILD           configure for building on BUILD [guessed]
699   --host=HOST       build programs to run on HOST [BUILD]
700   --target=TARGET   configure for building compilers for TARGET [HOST]
701 EOF
702 fi
703
704 if test -n "$ac_init_help"; then
705
706   cat <<\EOF
707
708 Optional Packages:
709   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
710   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
711
712 Optional Features:
713   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
714   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
715
716   --with-rel-version=XXX  override derived release version
717   --with-abi-version=XXX  override derived ABI version
718   --with-system-type=XXX  test: override derived host system-type
719   --with-abi-altered=XXX  override visible ABI version, for packaging
720   --without-ada           suppress check for Ada compiler, don't build demo
721   --without-cxx           do not adjust ncurses bool to match C++
722   --without-cxx-binding   do not build C++ binding and demo
723   --disable-db-install    suppress install of terminal database
724   --without-manpages      suppress install of manpages
725   --without-progs         suppress build/install with programs (e.g., tic)
726   --without-tests         suppress build/install with test-programs
727   --without-curses-h      install curses.h as ncurses.h only
728   --with-config-suffix=X  suffixes ncursesXX-config file
729   --with-pkg-config{=path} enable/disable use of pkg-config
730   --with-pkg-config-libdir=XXX use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix        suffixes pc-files
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix   prefixes actual install-location ($DESTDIR)
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version=X  Specify rel or abi version for shared libs
756   --with-libtool-opts=XXX specify additional libtool options
757   --with-export-syms=XXX  limit exported symbols using libtool
758   --with-versioned-syms=X markup versioned symbols using ld
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix=X   append extra suffix to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict root use of ncurses environment variables
787   --disable-root-access   restrict file-access when running setuid
788   --disable-setuid-environ restrict setuid use of ncurses environment variables
789   --enable-symlinks       make tic use symbolic links not hard links
790   --enable-broken_linker  compile with broken-linker support code
791   --enable-bsdpad         recognize BSD-style prefix padding
792   --enable-widec          compile with wide-char/UTF-8 code
793   --disable-lp64          allow chtype to be long (ignore _LP64)
794   --disable-largefile     omit support for large files
795   --disable-tparm-varargs compile tparm() without varargs interface
796   --disable-tic-depends   link tic library without explicit dependency on ncurses library
797   --enable-wattr-macros   enable wattr* macros
798   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
799   --with-bool=TYPE        override fallback type of bool variable
800   --with-caps=alt         compile with alternate Caps file
801   --with-chtype=TYPE      override type of chtype
802   --with-ospeed=TYPE      override type of ospeed variable
803   --with-mmask-t=TYPE     override type of mmask_t
804   --with-ccharw-max=XXX   override size CCHARW_MAX
805   --enable-signed-char    compile using signed Boolean's in term.h
806   --with-tparm-arg=TYPE   override parameter type of tparm
807   --with-rcs-ids          compile-in RCS identifiers
808 Options to Specify How Manpages are Installed:
809   --with-manpage-format   specify manpage-format: gzip/compress/bzip2/xz,
810                           BSDI/normal and optionally formatted/catonly,
811                           e.g., gzip,formatted
812   --with-manpage-renames  specify manpage-renaming
813   --with-manpage-aliases  specify manpage-aliases using .so
814   --with-manpage-symlinks specify manpage-aliases using symlinks
815   --with-manpage-tbl      specify manpage processing with tbl
816 Extensions:
817   --disable-ext-funcs     disable function-extensions
818   --enable-sp-funcs       enable SCREEN-extensions
819   --enable-term-driver    enable terminal-driver
820   --enable-const          compile with extra/non-standard const
821   --enable-ext-colors     compile for 256-color support
822   --enable-ext-mouse      compile for extended mouse-encoding
823   --enable-ext-putwin     compile with extended putwin/screendump
824   --enable-no-padding     compile with $NCURSES_NO_PADDING code
825   --enable-sigwinch       compile with SIGWINCH handler
826   --enable-tcap-names     compile with user-definable terminal capabilities
827 Reentrant Code:
828   --with-pthread          use POSIX thread library
829   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
830   --enable-weak-symbols   enable weak-symbols for pthreads
831   --enable-reentrant      compile with reentrant code
832   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
833   --enable-opaque-form    make form-library structures "opaque"
834   --enable-opaque-menu    make menu-library structures "opaque"
835   --enable-opaque-panel   make panel-library structures "opaque"
836   --with-wrap-prefix=XXX  override prefix used for public variables
837 Development Code:
838   --without-develop       disable development options
839   --enable-hard-tabs      compile with hard-tabs code
840   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
841 Experimental Code:
842   --disable-assumed-color do not assume anything about default-colors
843   --disable-hashmap       compile without hashmap scrolling-optimization
844   --enable-colorfgbg      compile-in experimental $COLORFGBG code
845   --enable-fvisibility    compile with -fvisibility=hidden
846   --enable-interop        compile-in interop bindings
847   --enable-safe-sprintf   compile with experimental safe-sprintf code
848   --disable-scroll-hints  compile without scroll-hints code
849   --enable-wgetch-events  compile with wgetch-events code
850   --enable-exp-win32      compile with experimental-Windows driver
851 Testing/development Options:
852   --disable-echo          do not display "compiling" commands
853   --disable-stripping     do not strip (debug info) installed executables
854   --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  test -n "NCURSES_MINOR" || NCURSES_MINOR=0
1393
1394 if test -n "$NCURSES_MAJOR" ; then
1395   case `echo "$NCURSES_MAJOR" | sed -e 's/^[0-9]*$/0/g'` in
1396   (0)
1397         ;;
1398   (*)
1399         { { echo "$as_me:1399: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1400 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1401    { (exit 1); exit 1; }; }
1402         ;;
1403   esac
1404 else
1405   { { echo "$as_me:1405: error: Release major-version value is empty" >&5
1406 echo "$as_me: error: Release major-version value is empty" >&2;}
1407    { (exit 1); exit 1; }; }
1408 fi
1409
1410 if test -n "$NCURSES_MINOR" ; then
1411   case `echo "$NCURSES_MINOR" | sed -e 's/^[0-9]*$/0/g'` in
1412   (0)
1413         ;;
1414   (*)
1415         { { echo "$as_me:1415: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1416 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1417    { (exit 1); exit 1; }; }
1418         ;;
1419   esac
1420 else
1421   { { echo "$as_me:1421: error: Release minor-version value is empty" >&5
1422 echo "$as_me: error: Release minor-version value is empty" >&2;}
1423    { (exit 1); exit 1; }; }
1424 fi
1425
1426 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1427
1428 # Check whether --with-abi-version or --without-abi-version was given.
1429 if test "${with_abi_version+set}" = set; then
1430   withval="$with_abi_version"
1431
1432         if test "x$cf_cv_abi_version" != "x$withval"
1433         then
1434                 { echo "$as_me:1434: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1435 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1436                 case "$cf_cv_rel_version" in
1437                 (5.*)
1438                         cf_cv_rel_version=$withval.0
1439                         ;;
1440                 (6.*)
1441                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1442                         ;;
1443                 esac
1444         fi
1445         cf_cv_abi_version=$withval
1446 fi;
1447
1448 if test -n "$cf_cv_abi_version" ; then
1449   case `echo "$cf_cv_abi_version" | sed -e 's/^[0-9]*$/0/g'` in
1450   (0)
1451         ;;
1452   (*)
1453         { { echo "$as_me:1453: error: ABI version is not a number: $cf_cv_abi_version" >&5
1454 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1455    { (exit 1); exit 1; }; }
1456         ;;
1457   esac
1458 else
1459   { { echo "$as_me:1459: error: ABI version value is empty" >&5
1460 echo "$as_me: error: ABI version value is empty" >&2;}
1461    { (exit 1); exit 1; }; }
1462 fi
1463
1464 cf_cv_abi_default=$cf_cv_abi_version
1465
1466 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1467 then
1468         case "$cf_cv_rel_version" in
1469         (5.*)
1470                 cf_cv_rel_version=$with_abi_version.0
1471                 ;;
1472         esac
1473 fi
1474
1475 ac_aux_dir=
1476 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1477   if test -f "$ac_dir/install-sh"; then
1478     ac_aux_dir=$ac_dir
1479     ac_install_sh="$ac_aux_dir/install-sh -c"
1480     break
1481   elif test -f "$ac_dir/install.sh"; then
1482     ac_aux_dir=$ac_dir
1483     ac_install_sh="$ac_aux_dir/install.sh -c"
1484     break
1485   elif test -f "$ac_dir/shtool"; then
1486     ac_aux_dir=$ac_dir
1487     ac_install_sh="$ac_aux_dir/shtool install -c"
1488     break
1489   fi
1490 done
1491 if test -z "$ac_aux_dir"; then
1492   { { echo "$as_me:1492: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1493 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1494    { (exit 1); exit 1; }; }
1495 fi
1496 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1497 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1498 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1499
1500 # Make sure we can run config.sub.
1501 $ac_config_sub sun4 >/dev/null 2>&1 ||
1502   { { echo "$as_me:1502: error: cannot run $ac_config_sub" >&5
1503 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1504    { (exit 1); exit 1; }; }
1505
1506 echo "$as_me:1506: checking build system type" >&5
1507 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1508 if test "${ac_cv_build+set}" = set; then
1509   echo $ECHO_N "(cached) $ECHO_C" >&6
1510 else
1511   ac_cv_build_alias=$build_alias
1512 test -z "$ac_cv_build_alias" &&
1513   ac_cv_build_alias=`$ac_config_guess`
1514 test -z "$ac_cv_build_alias" &&
1515   { { echo "$as_me:1515: error: cannot guess build type; you must specify one" >&5
1516 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1517    { (exit 1); exit 1; }; }
1518 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1519   { { echo "$as_me:1519: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1520 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1521    { (exit 1); exit 1; }; }
1522
1523 fi
1524 echo "$as_me:1524: result: $ac_cv_build" >&5
1525 echo "${ECHO_T}$ac_cv_build" >&6
1526 build=$ac_cv_build
1527 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1528 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1529 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1530
1531 echo "$as_me:1531: checking host system type" >&5
1532 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1533 if test "${ac_cv_host+set}" = set; then
1534   echo $ECHO_N "(cached) $ECHO_C" >&6
1535 else
1536   ac_cv_host_alias=$host_alias
1537 test -z "$ac_cv_host_alias" &&
1538   ac_cv_host_alias=$ac_cv_build_alias
1539 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1540   { { echo "$as_me:1540: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1541 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1542    { (exit 1); exit 1; }; }
1543
1544 fi
1545 echo "$as_me:1545: result: $ac_cv_host" >&5
1546 echo "${ECHO_T}$ac_cv_host" >&6
1547 host=$ac_cv_host
1548 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1549 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1550 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1551
1552 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1553         echo "$as_me:1553: checking target system type" >&5
1554 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1555 if test "${ac_cv_target+set}" = set; then
1556   echo $ECHO_N "(cached) $ECHO_C" >&6
1557 else
1558   ac_cv_target_alias=$target_alias
1559 test "x$ac_cv_target_alias" = "x" &&
1560   ac_cv_target_alias=$ac_cv_host_alias
1561 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1562   { { echo "$as_me:1562: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1563 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1564    { (exit 1); exit 1; }; }
1565
1566 fi
1567 echo "$as_me:1567: result: $ac_cv_target" >&5
1568 echo "${ECHO_T}$ac_cv_target" >&6
1569 target=$ac_cv_target
1570 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1571 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1572 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1573
1574 # The aliases save the names the user supplied, while $host etc.
1575 # will get canonicalized.
1576 test -n "$target_alias" &&
1577   test "$program_prefix$program_suffix$program_transform_name" = \
1578     NONENONEs,x,x, &&
1579   program_prefix=${target_alias}-
1580         system_name="$host_os"
1581 else
1582         system_name="`(uname -s -r) 2>/dev/null`"
1583         if test -z "$system_name" ; then
1584                 system_name="`(hostname) 2>/dev/null`"
1585         fi
1586 fi
1587 test -n "$system_name" &&
1588 cat >>confdefs.h <<EOF
1589 #define SYSTEM_NAME "$system_name"
1590 EOF
1591
1592 if test "${cf_cv_system_name+set}" = set; then
1593   echo $ECHO_N "(cached) $ECHO_C" >&6
1594 else
1595   cf_cv_system_name="$system_name"
1596 fi
1597
1598 test -z "$system_name" && system_name="$cf_cv_system_name"
1599 test -n "$cf_cv_system_name" && echo "$as_me:1599: result: Configuring for $cf_cv_system_name" >&5
1600 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1601
1602 if test ".$system_name" != ".$cf_cv_system_name" ; then
1603         echo "$as_me:1603: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1604 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1605         { { echo "$as_me:1605: error: \"Please remove config.cache and try again.\"" >&5
1606 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1607    { (exit 1); exit 1; }; }
1608 fi
1609
1610 # Check whether --with-system-type or --without-system-type was given.
1611 if test "${with_system_type+set}" = set; then
1612   withval="$with_system_type"
1613   { echo "$as_me:1613: WARNING: overriding system type to $withval" >&5
1614 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1615         cf_cv_system_name=$withval
1616         host_os=$withval
1617
1618 fi;
1619
1620 ###     Save the given $CFLAGS to allow user-override.
1621 cf_user_CFLAGS="$CFLAGS"
1622
1623 ###     Default install-location
1624 echo "$as_me:1624: checking for fgrep" >&5
1625 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1626 if test "${ac_cv_path_FGREP+set}" = set; then
1627   echo $ECHO_N "(cached) $ECHO_C" >&6
1628 else
1629   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1630    then ac_cv_path_FGREP="$GREP -F"
1631    else
1632      for ac_prog in gfgrep fgrep
1633 do
1634   # Extract the first word of "$ac_prog", so it can be a program name with args.
1635 set dummy $ac_prog; ac_word=$2
1636 echo "$as_me:1636: checking for $ac_word" >&5
1637 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1638 if test "${ac_cv_path_FGREP+set}" = set; then
1639   echo $ECHO_N "(cached) $ECHO_C" >&6
1640 else
1641   case $FGREP in
1642   [\\/]* | ?:[\\/]*)
1643   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1644   ;;
1645   *)
1646   ac_save_IFS=$IFS; IFS=$ac_path_separator
1647 ac_dummy="$PATH"
1648 for ac_dir in $ac_dummy; do
1649   IFS=$ac_save_IFS
1650   test -z "$ac_dir" && ac_dir=.
1651   if $as_executable_p "$ac_dir/$ac_word"; then
1652    ac_cv_path_FGREP="$ac_dir/$ac_word"
1653    echo "$as_me:1653: found $ac_dir/$ac_word" >&5
1654    break
1655 fi
1656 done
1657
1658   ;;
1659 esac
1660 fi
1661 FGREP=$ac_cv_path_FGREP
1662
1663 if test -n "$FGREP"; then
1664   echo "$as_me:1664: result: $FGREP" >&5
1665 echo "${ECHO_T}$FGREP" >&6
1666 else
1667   echo "$as_me:1667: result: no" >&5
1668 echo "${ECHO_T}no" >&6
1669 fi
1670
1671   test -n "$FGREP" && break
1672 done
1673 test -n "$FGREP" || FGREP=": "
1674
1675      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1675: error: cannot find workable fgrep" >&5
1676 echo "$as_me: error: cannot find workable fgrep" >&2;}
1677    { (exit 1); exit 1; }; }
1678    fi
1679 fi
1680 echo "$as_me:1680: result: $ac_cv_path_FGREP" >&5
1681 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1682  FGREP="$ac_cv_path_FGREP"
1683
1684 echo "$as_me:1684: checking for prefix" >&5
1685 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1686 if test "x$prefix" = "xNONE" ; then
1687         case "$cf_cv_system_name" in
1688                 # non-vendor systems don't have a conflict
1689         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1690                 prefix=/usr
1691                 ;;
1692         (*)     prefix=$ac_default_prefix
1693                 ;;
1694         esac
1695 fi
1696 echo "$as_me:1696: result: $prefix" >&5
1697 echo "${ECHO_T}$prefix" >&6
1698
1699 if test "x$prefix" = "xNONE" ; then
1700 echo "$as_me:1700: checking for default include-directory" >&5
1701 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1702 test -n "$verbose" && echo 1>&6
1703 for cf_symbol in \
1704         "$includedir" \
1705         "$includedir/ncurses" \
1706         "$prefix/include" \
1707         "$prefix/include/ncurses" \
1708         /usr/local/include \
1709         /usr/local/include/ncurses \
1710         /usr/include \
1711         /usr/include/ncurses
1712 do
1713         cf_dir=`eval echo "$cf_symbol"`
1714         if test -f "$cf_dir/curses.h" ; then
1715         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1716                 includedir="$cf_symbol"
1717                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1718                 break
1719         fi
1720         fi
1721         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1722 done
1723 echo "$as_me:1723: result: $includedir" >&5
1724 echo "${ECHO_T}$includedir" >&6
1725 fi
1726
1727 ### Defaults for ncurses ABI
1728
1729 # ABI 5 defaults:
1730 cf_dft_ccharw_max=5
1731 cf_dft_chtype=auto
1732 cf_dft_ext_colors=no
1733 cf_dft_ext_const=no
1734 cf_dft_ext_mouse=no
1735 cf_dft_ext_putwin=no
1736 cf_dft_ext_spfuncs=no
1737 cf_dft_filter_syms=no
1738 cf_dft_interop=no
1739 cf_dft_mmask_t=auto
1740 cf_dft_opaque_curses=no
1741 cf_dft_ordinate_type=short
1742 cf_dft_signed_char=no
1743 cf_dft_tparm_arg=long
1744 cf_dft_with_lp64=no
1745
1746 # ABI 6 defaults:
1747 case x$cf_cv_abi_default in
1748 (x[6789])
1749         cf_dft_chtype=uint32_t
1750         cf_dft_ext_colors=yes
1751         cf_dft_ext_const=yes
1752         cf_dft_ext_mouse=yes
1753         cf_dft_ext_putwin=yes
1754         cf_dft_ext_spfuncs=yes
1755         cf_dft_filter_syms=yes
1756         cf_dft_interop=yes
1757         cf_dft_mmask_t=uint32_t
1758         cf_dft_tparm_arg=intptr_t
1759         cf_dft_with_lp64=yes
1760         ;;
1761 esac
1762
1763 # ABI 7 defaults:
1764 case x$cf_cv_abi_default in
1765 (x[789])
1766         cf_dft_ccharw_max=6
1767         cf_dft_mmask_t=uint64_t
1768         cf_dft_opaque_curses=yes
1769         cf_dft_ordinate_type=int
1770         cf_dft_signed_char=yes
1771         # also: remove the wgetch-events feature in ABI 7
1772         ;;
1773 esac
1774
1775 ### override ABI version, e.g., packagers
1776
1777 # Check whether --with-abi-altered or --without-abi-altered was given.
1778 if test "${with_abi_altered+set}" = set; then
1779   withval="$with_abi_altered"
1780
1781 if test -n "$withval" ; then
1782   case `echo "$withval" | sed -e 's/^[0-9]*$/0/g'` in
1783   (0)
1784         ;;
1785   (*)
1786         { { echo "$as_me:1786: error: ABI altered is not a number: $withval" >&5
1787 echo "$as_me: error: ABI altered is not a number: $withval" >&2;}
1788    { (exit 1); exit 1; }; }
1789         ;;
1790   esac
1791 else
1792   { { echo "$as_me:1792: error: ABI altered value is empty" >&5
1793 echo "$as_me: error: ABI altered value is empty" >&2;}
1794    { (exit 1); exit 1; }; }
1795 fi
1796
1797         if test "$cf_cv_abi_version" != "$withval"
1798         then
1799                 { echo "$as_me:1799: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&5
1800 echo "$as_me: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&2;}
1801                 cf_cv_abi_version=$withval
1802         fi
1803
1804 fi;
1805
1806 ###     Checks for programs.
1807
1808 # Check whether --with-ada or --without-ada was given.
1809 if test "${with_ada+set}" = set; then
1810   withval="$with_ada"
1811   cf_with_ada=$withval
1812 else
1813   cf_with_ada=yes
1814 fi;
1815
1816 if test "x$cf_with_ada" = xyes
1817 then
1818         cf_prog_cc="gnatgcc gcc cc"
1819 else
1820         cf_prog_cc="gcc cc"
1821 fi
1822
1823 ac_ext=c
1824 ac_cpp='$CPP $CPPFLAGS'
1825 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1826 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1827 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1828 ac_main_return="return"
1829 if test -n "$ac_tool_prefix"; then
1830   for ac_prog in $cf_prog_cc
1831   do
1832     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1833 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1834 echo "$as_me:1834: checking for $ac_word" >&5
1835 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1836 if test "${ac_cv_prog_CC+set}" = set; then
1837   echo $ECHO_N "(cached) $ECHO_C" >&6
1838 else
1839   if test -n "$CC"; then
1840   ac_cv_prog_CC="$CC" # Let the user override the test.
1841 else
1842   ac_save_IFS=$IFS; IFS=$ac_path_separator
1843 ac_dummy="$PATH"
1844 for ac_dir in $ac_dummy; do
1845   IFS=$ac_save_IFS
1846   test -z "$ac_dir" && ac_dir=.
1847   $as_executable_p "$ac_dir/$ac_word" || continue
1848 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1849 echo "$as_me:1849: found $ac_dir/$ac_word" >&5
1850 break
1851 done
1852
1853 fi
1854 fi
1855 CC=$ac_cv_prog_CC
1856 if test -n "$CC"; then
1857   echo "$as_me:1857: result: $CC" >&5
1858 echo "${ECHO_T}$CC" >&6
1859 else
1860   echo "$as_me:1860: result: no" >&5
1861 echo "${ECHO_T}no" >&6
1862 fi
1863
1864     test -n "$CC" && break
1865   done
1866 fi
1867 if test -z "$CC"; then
1868   ac_ct_CC=$CC
1869   for ac_prog in $cf_prog_cc
1870 do
1871   # Extract the first word of "$ac_prog", so it can be a program name with args.
1872 set dummy $ac_prog; ac_word=$2
1873 echo "$as_me:1873: checking for $ac_word" >&5
1874 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1875 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1876   echo $ECHO_N "(cached) $ECHO_C" >&6
1877 else
1878   if test -n "$ac_ct_CC"; then
1879   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1880 else
1881   ac_save_IFS=$IFS; IFS=$ac_path_separator
1882 ac_dummy="$PATH"
1883 for ac_dir in $ac_dummy; do
1884   IFS=$ac_save_IFS
1885   test -z "$ac_dir" && ac_dir=.
1886   $as_executable_p "$ac_dir/$ac_word" || continue
1887 ac_cv_prog_ac_ct_CC="$ac_prog"
1888 echo "$as_me:1888: found $ac_dir/$ac_word" >&5
1889 break
1890 done
1891
1892 fi
1893 fi
1894 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1895 if test -n "$ac_ct_CC"; then
1896   echo "$as_me:1896: result: $ac_ct_CC" >&5
1897 echo "${ECHO_T}$ac_ct_CC" >&6
1898 else
1899   echo "$as_me:1899: result: no" >&5
1900 echo "${ECHO_T}no" >&6
1901 fi
1902
1903   test -n "$ac_ct_CC" && break
1904 done
1905
1906   CC=$ac_ct_CC
1907 fi
1908
1909 test -z "$CC" && { { echo "$as_me:1909: error: no acceptable cc found in \$PATH" >&5
1910 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1911    { (exit 1); exit 1; }; }
1912
1913 # Provide some information about the compiler.
1914 echo "$as_me:1914:" \
1915      "checking for C compiler version" >&5
1916 ac_compiler=`set X $ac_compile; echo "$2"`
1917 { (eval echo "$as_me:1917: \"$ac_compiler --version </dev/null >&5\"") >&5
1918   (eval $ac_compiler --version </dev/null >&5) 2>&5
1919   ac_status=$?
1920   echo "$as_me:1920: \$? = $ac_status" >&5
1921   (exit "$ac_status"); }
1922 { (eval echo "$as_me:1922: \"$ac_compiler -v </dev/null >&5\"") >&5
1923   (eval $ac_compiler -v </dev/null >&5) 2>&5
1924   ac_status=$?
1925   echo "$as_me:1925: \$? = $ac_status" >&5
1926   (exit "$ac_status"); }
1927 { (eval echo "$as_me:1927: \"$ac_compiler -V </dev/null >&5\"") >&5
1928   (eval $ac_compiler -V </dev/null >&5) 2>&5
1929   ac_status=$?
1930   echo "$as_me:1930: \$? = $ac_status" >&5
1931   (exit "$ac_status"); }
1932
1933 cat >"conftest.$ac_ext" <<_ACEOF
1934 #line 1934 "configure"
1935 #include "confdefs.h"
1936
1937 int
1938 main (void)
1939 {
1940
1941   ;
1942   return 0;
1943 }
1944 _ACEOF
1945 ac_clean_files_save=$ac_clean_files
1946 ac_clean_files="$ac_clean_files a.out a.exe"
1947 # Try to create an executable without -o first, disregard a.out.
1948 # It will help us diagnose broken compilers, and finding out an intuition
1949 # of exeext.
1950 echo "$as_me:1950: checking for C compiler default output" >&5
1951 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1952 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1953 if { (eval echo "$as_me:1953: \"$ac_link_default\"") >&5
1954   (eval $ac_link_default) 2>&5
1955   ac_status=$?
1956   echo "$as_me:1956: \$? = $ac_status" >&5
1957   (exit "$ac_status"); }; then
1958   # Find the output, starting from the most likely.  This scheme is
1959 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1960 # resort.
1961 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1962                 ls a.out conftest 2>/dev/null;
1963                 ls a.* conftest.* 2>/dev/null`; do
1964   case $ac_file in
1965     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1966     a.out ) # We found the default executable, but exeext='' is most
1967             # certainly right.
1968             break;;
1969     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1970           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1971           export ac_cv_exeext
1972           break;;
1973     * ) break;;
1974   esac
1975 done
1976 else
1977   echo "$as_me: failed program was:" >&5
1978 cat "conftest.$ac_ext" >&5
1979 { { echo "$as_me:1979: error: C compiler cannot create executables" >&5
1980 echo "$as_me: error: C compiler cannot create executables" >&2;}
1981    { (exit 77); exit 77; }; }
1982 fi
1983
1984 ac_exeext=$ac_cv_exeext
1985 echo "$as_me:1985: result: $ac_file" >&5
1986 echo "${ECHO_T}$ac_file" >&6
1987
1988 # Check the compiler produces executables we can run.  If not, either
1989 # the compiler is broken, or we cross compile.
1990 echo "$as_me:1990: checking whether the C compiler works" >&5
1991 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1992 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1993 # If not cross compiling, check that we can run a simple program.
1994 if test "$cross_compiling" != yes; then
1995   if { ac_try='./$ac_file'
1996   { (eval echo "$as_me:1996: \"$ac_try\"") >&5
1997   (eval $ac_try) 2>&5
1998   ac_status=$?
1999   echo "$as_me:1999: \$? = $ac_status" >&5
2000   (exit "$ac_status"); }; }; then
2001     cross_compiling=no
2002   else
2003     if test "$cross_compiling" = maybe; then
2004         cross_compiling=yes
2005     else
2006         { { echo "$as_me:2006: error: cannot run C compiled programs.
2007 If you meant to cross compile, use \`--host'." >&5
2008 echo "$as_me: error: cannot run C compiled programs.
2009 If you meant to cross compile, use \`--host'." >&2;}
2010    { (exit 1); exit 1; }; }
2011     fi
2012   fi
2013 fi
2014 echo "$as_me:2014: result: yes" >&5
2015 echo "${ECHO_T}yes" >&6
2016
2017 rm -f a.out a.exe "conftest$ac_cv_exeext"
2018 ac_clean_files=$ac_clean_files_save
2019 # Check the compiler produces executables we can run.  If not, either
2020 # the compiler is broken, or we cross compile.
2021 echo "$as_me:2021: checking whether we are cross compiling" >&5
2022 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2023 echo "$as_me:2023: result: $cross_compiling" >&5
2024 echo "${ECHO_T}$cross_compiling" >&6
2025
2026 echo "$as_me:2026: checking for executable suffix" >&5
2027 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
2028 if { (eval echo "$as_me:2028: \"$ac_link\"") >&5
2029   (eval $ac_link) 2>&5
2030   ac_status=$?
2031   echo "$as_me:2031: \$? = $ac_status" >&5
2032   (exit "$ac_status"); }; then
2033   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2034 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2035 # work properly (i.e., refer to `conftest.exe'), while it won't with
2036 # `rm'.
2037 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2038   case $ac_file in
2039     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2040     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2041           export ac_cv_exeext
2042           break;;
2043     * ) break;;
2044   esac
2045 done
2046 else
2047   { { echo "$as_me:2047: error: cannot compute EXEEXT: cannot compile and link" >&5
2048 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2049    { (exit 1); exit 1; }; }
2050 fi
2051
2052 rm -f "conftest$ac_cv_exeext"
2053 echo "$as_me:2053: result: $ac_cv_exeext" >&5
2054 echo "${ECHO_T}$ac_cv_exeext" >&6
2055
2056 rm -f "conftest.$ac_ext"
2057 EXEEXT=$ac_cv_exeext
2058 ac_exeext=$EXEEXT
2059 echo "$as_me:2059: checking for object suffix" >&5
2060 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2061 if test "${ac_cv_objext+set}" = set; then
2062   echo $ECHO_N "(cached) $ECHO_C" >&6
2063 else
2064   cat >"conftest.$ac_ext" <<_ACEOF
2065 #line 2065 "configure"
2066 #include "confdefs.h"
2067
2068 int
2069 main (void)
2070 {
2071
2072   ;
2073   return 0;
2074 }
2075 _ACEOF
2076 rm -f conftest.o conftest.obj
2077 if { (eval echo "$as_me:2077: \"$ac_compile\"") >&5
2078   (eval $ac_compile) 2>&5
2079   ac_status=$?
2080   echo "$as_me:2080: \$? = $ac_status" >&5
2081   (exit "$ac_status"); }; then
2082   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2083   case $ac_file in
2084     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2085     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2086        break;;
2087   esac
2088 done
2089 else
2090   echo "$as_me: failed program was:" >&5
2091 cat "conftest.$ac_ext" >&5
2092 { { echo "$as_me:2092: error: cannot compute OBJEXT: cannot compile" >&5
2093 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2094    { (exit 1); exit 1; }; }
2095 fi
2096
2097 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2098 fi
2099 echo "$as_me:2099: result: $ac_cv_objext" >&5
2100 echo "${ECHO_T}$ac_cv_objext" >&6
2101 OBJEXT=$ac_cv_objext
2102 ac_objext=$OBJEXT
2103 echo "$as_me:2103: checking whether we are using the GNU C compiler" >&5
2104 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2105 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2106   echo $ECHO_N "(cached) $ECHO_C" >&6
2107 else
2108   cat >"conftest.$ac_ext" <<_ACEOF
2109 #line 2109 "configure"
2110 #include "confdefs.h"
2111
2112 int
2113 main (void)
2114 {
2115 #ifndef __GNUC__
2116        choke me
2117 #endif
2118
2119   ;
2120   return 0;
2121 }
2122 _ACEOF
2123 rm -f "conftest.$ac_objext"
2124 if { (eval echo "$as_me:2124: \"$ac_compile\"") >&5
2125   (eval $ac_compile) 2>&5
2126   ac_status=$?
2127   echo "$as_me:2127: \$? = $ac_status" >&5
2128   (exit "$ac_status"); } &&
2129          { ac_try='test -s "conftest.$ac_objext"'
2130   { (eval echo "$as_me:2130: \"$ac_try\"") >&5
2131   (eval $ac_try) 2>&5
2132   ac_status=$?
2133   echo "$as_me:2133: \$? = $ac_status" >&5
2134   (exit "$ac_status"); }; }; then
2135   ac_compiler_gnu=yes
2136 else
2137   echo "$as_me: failed program was:" >&5
2138 cat "conftest.$ac_ext" >&5
2139 ac_compiler_gnu=no
2140 fi
2141 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2142 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2143
2144 fi
2145 echo "$as_me:2145: result: $ac_cv_c_compiler_gnu" >&5
2146 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2147 GCC=`test $ac_compiler_gnu = yes && echo yes`
2148 ac_test_CFLAGS=${CFLAGS+set}
2149 ac_save_CFLAGS=$CFLAGS
2150 CFLAGS="-g"
2151 echo "$as_me:2151: checking whether $CC accepts -g" >&5
2152 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2153 if test "${ac_cv_prog_cc_g+set}" = set; then
2154   echo $ECHO_N "(cached) $ECHO_C" >&6
2155 else
2156   cat >"conftest.$ac_ext" <<_ACEOF
2157 #line 2157 "configure"
2158 #include "confdefs.h"
2159
2160 int
2161 main (void)
2162 {
2163
2164   ;
2165   return 0;
2166 }
2167 _ACEOF
2168 rm -f "conftest.$ac_objext"
2169 if { (eval echo "$as_me:2169: \"$ac_compile\"") >&5
2170   (eval $ac_compile) 2>&5
2171   ac_status=$?
2172   echo "$as_me:2172: \$? = $ac_status" >&5
2173   (exit "$ac_status"); } &&
2174          { ac_try='test -s "conftest.$ac_objext"'
2175   { (eval echo "$as_me:2175: \"$ac_try\"") >&5
2176   (eval $ac_try) 2>&5
2177   ac_status=$?
2178   echo "$as_me:2178: \$? = $ac_status" >&5
2179   (exit "$ac_status"); }; }; then
2180   ac_cv_prog_cc_g=yes
2181 else
2182   echo "$as_me: failed program was:" >&5
2183 cat "conftest.$ac_ext" >&5
2184 ac_cv_prog_cc_g=no
2185 fi
2186 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2187 fi
2188 echo "$as_me:2188: result: $ac_cv_prog_cc_g" >&5
2189 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2190 if test "$ac_test_CFLAGS" = set; then
2191   CFLAGS=$ac_save_CFLAGS
2192 elif test $ac_cv_prog_cc_g = yes; then
2193   if test "$GCC" = yes; then
2194     CFLAGS="-g -O2"
2195   else
2196     CFLAGS="-g"
2197   fi
2198 else
2199   if test "$GCC" = yes; then
2200     CFLAGS="-O2"
2201   else
2202     CFLAGS=
2203   fi
2204 fi
2205 # Some people use a C++ compiler to compile C.  Since we use `exit',
2206 # in C++ we need to declare it.  In case someone uses the same compiler
2207 # for both compiling C and C++ we need to have the C++ compiler decide
2208 # the declaration of exit, since it's the most demanding environment.
2209 cat >"conftest.$ac_ext" <<_ACEOF
2210 #ifndef __cplusplus
2211   choke me
2212 #endif
2213 _ACEOF
2214 rm -f "conftest.$ac_objext"
2215 if { (eval echo "$as_me:2215: \"$ac_compile\"") >&5
2216   (eval $ac_compile) 2>&5
2217   ac_status=$?
2218   echo "$as_me:2218: \$? = $ac_status" >&5
2219   (exit "$ac_status"); } &&
2220          { ac_try='test -s "conftest.$ac_objext"'
2221   { (eval echo "$as_me:2221: \"$ac_try\"") >&5
2222   (eval $ac_try) 2>&5
2223   ac_status=$?
2224   echo "$as_me:2224: \$? = $ac_status" >&5
2225   (exit "$ac_status"); }; }; then
2226   for ac_declaration in \
2227    ''\
2228    '#include <stdlib.h>' \
2229    'extern "C" void std::exit (int) throw (); using std::exit;' \
2230    'extern "C" void std::exit (int); using std::exit;' \
2231    'extern "C" void exit (int) throw ();' \
2232    'extern "C" void exit (int);' \
2233    'void exit (int);'
2234 do
2235   cat >"conftest.$ac_ext" <<_ACEOF
2236 #line 2236 "configure"
2237 #include "confdefs.h"
2238 #include <stdlib.h>
2239 $ac_declaration
2240 int
2241 main (void)
2242 {
2243 exit (42);
2244   ;
2245   return 0;
2246 }
2247 _ACEOF
2248 rm -f "conftest.$ac_objext"
2249 if { (eval echo "$as_me:2249: \"$ac_compile\"") >&5
2250   (eval $ac_compile) 2>&5
2251   ac_status=$?
2252   echo "$as_me:2252: \$? = $ac_status" >&5
2253   (exit "$ac_status"); } &&
2254          { ac_try='test -s "conftest.$ac_objext"'
2255   { (eval echo "$as_me:2255: \"$ac_try\"") >&5
2256   (eval $ac_try) 2>&5
2257   ac_status=$?
2258   echo "$as_me:2258: \$? = $ac_status" >&5
2259   (exit "$ac_status"); }; }; then
2260   :
2261 else
2262   echo "$as_me: failed program was:" >&5
2263 cat "conftest.$ac_ext" >&5
2264 continue
2265 fi
2266 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2267   cat >"conftest.$ac_ext" <<_ACEOF
2268 #line 2268 "configure"
2269 #include "confdefs.h"
2270 $ac_declaration
2271 int
2272 main (void)
2273 {
2274 exit (42);
2275   ;
2276   return 0;
2277 }
2278 _ACEOF
2279 rm -f "conftest.$ac_objext"
2280 if { (eval echo "$as_me:2280: \"$ac_compile\"") >&5
2281   (eval $ac_compile) 2>&5
2282   ac_status=$?
2283   echo "$as_me:2283: \$? = $ac_status" >&5
2284   (exit "$ac_status"); } &&
2285          { ac_try='test -s "conftest.$ac_objext"'
2286   { (eval echo "$as_me:2286: \"$ac_try\"") >&5
2287   (eval $ac_try) 2>&5
2288   ac_status=$?
2289   echo "$as_me:2289: \$? = $ac_status" >&5
2290   (exit "$ac_status"); }; }; then
2291   break
2292 else
2293   echo "$as_me: failed program was:" >&5
2294 cat "conftest.$ac_ext" >&5
2295 fi
2296 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2297 done
2298 rm -rf conftest*
2299 if test -n "$ac_declaration"; then
2300   echo '#ifdef __cplusplus' >>confdefs.h
2301   echo "$ac_declaration"    >>confdefs.h
2302   echo '#endif'             >>confdefs.h
2303 fi
2304
2305 else
2306   echo "$as_me: failed program was:" >&5
2307 cat "conftest.$ac_ext" >&5
2308 fi
2309 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2310 ac_ext=c
2311 ac_cpp='$CPP $CPPFLAGS'
2312 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2313 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2314 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2315 ac_main_return="return"
2316
2317 GCC_VERSION=none
2318 if test "$GCC" = yes ; then
2319         echo "$as_me:2319: checking version of $CC" >&5
2320 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2321         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2322         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2323         echo "$as_me:2323: result: $GCC_VERSION" >&5
2324 echo "${ECHO_T}$GCC_VERSION" >&6
2325 fi
2326
2327 INTEL_COMPILER=no
2328
2329 if test "$GCC" = yes ; then
2330         case "$host_os" in
2331         (linux*|gnu*)
2332                 echo "$as_me:2332: checking if this is really Intel C compiler" >&5
2333 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2334                 cf_save_CFLAGS="$CFLAGS"
2335                 CFLAGS="$CFLAGS -no-gcc"
2336                 cat >"conftest.$ac_ext" <<_ACEOF
2337 #line 2337 "configure"
2338 #include "confdefs.h"
2339
2340 int
2341 main (void)
2342 {
2343
2344 #ifdef __INTEL_COMPILER
2345 #else
2346 #error __INTEL_COMPILER is not defined
2347 #endif
2348
2349   ;
2350   return 0;
2351 }
2352 _ACEOF
2353 rm -f "conftest.$ac_objext"
2354 if { (eval echo "$as_me:2354: \"$ac_compile\"") >&5
2355   (eval $ac_compile) 2>&5
2356   ac_status=$?
2357   echo "$as_me:2357: \$? = $ac_status" >&5
2358   (exit "$ac_status"); } &&
2359          { ac_try='test -s "conftest.$ac_objext"'
2360   { (eval echo "$as_me:2360: \"$ac_try\"") >&5
2361   (eval $ac_try) 2>&5
2362   ac_status=$?
2363   echo "$as_me:2363: \$? = $ac_status" >&5
2364   (exit "$ac_status"); }; }; then
2365   INTEL_COMPILER=yes
2366 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2367
2368 else
2369   echo "$as_me: failed program was:" >&5
2370 cat "conftest.$ac_ext" >&5
2371 fi
2372 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2373                 CFLAGS="$cf_save_CFLAGS"
2374                 echo "$as_me:2374: result: $INTEL_COMPILER" >&5
2375 echo "${ECHO_T}$INTEL_COMPILER" >&6
2376                 ;;
2377         esac
2378 fi
2379
2380 CLANG_COMPILER=no
2381
2382 if test "$GCC" = yes ; then
2383         echo "$as_me:2383: checking if this is really Clang C compiler" >&5
2384 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2385         cf_save_CFLAGS="$CFLAGS"
2386         cat >"conftest.$ac_ext" <<_ACEOF
2387 #line 2387 "configure"
2388 #include "confdefs.h"
2389
2390 int
2391 main (void)
2392 {
2393
2394 #ifdef __clang__
2395 #else
2396 #error __clang__ is not defined
2397 #endif
2398
2399   ;
2400   return 0;
2401 }
2402 _ACEOF
2403 rm -f "conftest.$ac_objext"
2404 if { (eval echo "$as_me:2404: \"$ac_compile\"") >&5
2405   (eval $ac_compile) 2>&5
2406   ac_status=$?
2407   echo "$as_me:2407: \$? = $ac_status" >&5
2408   (exit "$ac_status"); } &&
2409          { ac_try='test -s "conftest.$ac_objext"'
2410   { (eval echo "$as_me:2410: \"$ac_try\"") >&5
2411   (eval $ac_try) 2>&5
2412   ac_status=$?
2413   echo "$as_me:2413: \$? = $ac_status" >&5
2414   (exit "$ac_status"); }; }; then
2415   CLANG_COMPILER=yes
2416
2417 else
2418   echo "$as_me: failed program was:" >&5
2419 cat "conftest.$ac_ext" >&5
2420 fi
2421 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2422         CFLAGS="$cf_save_CFLAGS"
2423         echo "$as_me:2423: result: $CLANG_COMPILER" >&5
2424 echo "${ECHO_T}$CLANG_COMPILER" >&6
2425 fi
2426
2427 CLANG_VERSION=none
2428
2429 if test "x$CLANG_COMPILER" = "xyes" ; then
2430         case "$CC" in
2431         (c[1-9][0-9]|*/c[1-9][0-9])
2432                 { echo "$as_me:2432: WARNING: replacing broken compiler alias $CC" >&5
2433 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2434                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2435                 CC=clang
2436                 ;;
2437         esac
2438
2439         echo "$as_me:2439: checking version of $CC" >&5
2440 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2441         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.].*//'`"
2442         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2443         echo "$as_me:2443: result: $CLANG_VERSION" >&5
2444 echo "${ECHO_T}$CLANG_VERSION" >&6
2445
2446         for cf_clang_opt in \
2447                 -Qunused-arguments \
2448                 -Wno-error=implicit-function-declaration
2449         do
2450                 echo "$as_me:2450: checking if option $cf_clang_opt works" >&5
2451 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2452                 cf_save_CFLAGS="$CFLAGS"
2453                 CFLAGS="$CFLAGS $cf_clang_opt"
2454                 cat >"conftest.$ac_ext" <<_ACEOF
2455 #line 2455 "configure"
2456 #include "confdefs.h"
2457
2458                         #include <stdio.h>
2459 int
2460 main (void)
2461 {
2462
2463                         printf("hello!\\n");
2464   ;
2465   return 0;
2466 }
2467 _ACEOF
2468 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2469 if { (eval echo "$as_me:2469: \"$ac_link\"") >&5
2470   (eval $ac_link) 2>&5
2471   ac_status=$?
2472   echo "$as_me:2472: \$? = $ac_status" >&5
2473   (exit "$ac_status"); } &&
2474          { ac_try='test -s "conftest$ac_exeext"'
2475   { (eval echo "$as_me:2475: \"$ac_try\"") >&5
2476   (eval $ac_try) 2>&5
2477   ac_status=$?
2478   echo "$as_me:2478: \$? = $ac_status" >&5
2479   (exit "$ac_status"); }; }; then
2480
2481                         cf_clang_optok=yes
2482 else
2483   echo "$as_me: failed program was:" >&5
2484 cat "conftest.$ac_ext" >&5
2485
2486                         cf_clang_optok=no
2487 fi
2488 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2489                 echo "$as_me:2489: result: $cf_clang_optok" >&5
2490 echo "${ECHO_T}$cf_clang_optok" >&6
2491                 CFLAGS="$cf_save_CFLAGS"
2492                 if test "$cf_clang_optok" = yes; then
2493                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2494
2495 echo "${as_me:-configure}:2495: testing adding option $cf_clang_opt ..." 1>&5
2496
2497         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2498         CFLAGS="${CFLAGS}$cf_clang_opt"
2499
2500                 fi
2501         done
2502 fi
2503
2504 echo "$as_me:2504: checking for $CC option to accept ANSI C" >&5
2505 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2506 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2507   echo $ECHO_N "(cached) $ECHO_C" >&6
2508 else
2509   ac_cv_prog_cc_stdc=no
2510 ac_save_CC=$CC
2511 cat >"conftest.$ac_ext" <<_ACEOF
2512 #line 2512 "configure"
2513 #include "confdefs.h"
2514 #include <stdarg.h>
2515 #include <stdio.h>
2516 #include <sys/types.h>
2517 #include <sys/stat.h>
2518 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2519 struct buf { int x; };
2520 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2521 static char *e (char **p, int i)
2522 {
2523   return p[i];
2524 }
2525 static char *f (char * (*g) (char **, int), char **p, ...)
2526 {
2527   char *s;
2528   va_list v;
2529   va_start (v,p);
2530   s = g (p, va_arg (v,int));
2531   va_end (v);
2532   return s;
2533 }
2534 int test (int i, double x);
2535 struct s1 {int (*f) (int a);};
2536 struct s2 {int (*f) (double a);};
2537 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2538 int argc;
2539 char **argv;
2540 int
2541 main (void)
2542 {
2543 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2544   ;
2545   return 0;
2546 }
2547 _ACEOF
2548 # Don't try gcc -ansi; that turns off useful extensions and
2549 # breaks some systems' header files.
2550 # AIX                   -qlanglvl=ansi
2551 # Ultrix and OSF/1      -std1
2552 # HP-UX 10.20 and later -Ae
2553 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2554 # SVR4                  -Xc -D__EXTENSIONS__
2555 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2556 do
2557   CC="$ac_save_CC $ac_arg"
2558   rm -f "conftest.$ac_objext"
2559 if { (eval echo "$as_me:2559: \"$ac_compile\"") >&5
2560   (eval $ac_compile) 2>&5
2561   ac_status=$?
2562   echo "$as_me:2562: \$? = $ac_status" >&5
2563   (exit "$ac_status"); } &&
2564          { ac_try='test -s "conftest.$ac_objext"'
2565   { (eval echo "$as_me:2565: \"$ac_try\"") >&5
2566   (eval $ac_try) 2>&5
2567   ac_status=$?
2568   echo "$as_me:2568: \$? = $ac_status" >&5
2569   (exit "$ac_status"); }; }; then
2570   ac_cv_prog_cc_stdc=$ac_arg
2571 break
2572 else
2573   echo "$as_me: failed program was:" >&5
2574 cat "conftest.$ac_ext" >&5
2575 fi
2576 rm -f "conftest.$ac_objext"
2577 done
2578 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2579 CC=$ac_save_CC
2580
2581 fi
2582
2583 case "x$ac_cv_prog_cc_stdc" in
2584   x|xno)
2585     echo "$as_me:2585: result: none needed" >&5
2586 echo "${ECHO_T}none needed" >&6 ;;
2587   *)
2588     echo "$as_me:2588: result: $ac_cv_prog_cc_stdc" >&5
2589 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2590     CC="$CC $ac_cv_prog_cc_stdc" ;;
2591 esac
2592
2593 # This should have been defined by AC_PROG_CC
2594 : "${CC:=cc}"
2595
2596 echo "$as_me:2596: checking \$CFLAGS variable" >&5
2597 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2598 case "x$CFLAGS" in
2599 (*-[IUD]*)
2600         echo "$as_me:2600: result: broken" >&5
2601 echo "${ECHO_T}broken" >&6
2602         { echo "$as_me:2602: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2603 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2604         cf_flags="$CFLAGS"
2605         CFLAGS=
2606         for cf_arg in $cf_flags
2607         do
2608
2609 cf_fix_cppflags=no
2610 cf_new_cflags=
2611 cf_new_cppflags=
2612 cf_new_extra_cppflags=
2613
2614 for cf_add_cflags in $cf_arg
2615 do
2616 case "$cf_fix_cppflags" in
2617 (no)
2618         case "$cf_add_cflags" in
2619         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2620                 case "$cf_add_cflags" in
2621                 (-D*)
2622                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2623
2624                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2625                                 && test -z "${cf_tst_cflags}" \
2626                                 && cf_fix_cppflags=yes
2627
2628                         if test "$cf_fix_cppflags" = yes ; then
2629
2630         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2631         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2632
2633                                 continue
2634                         elif test "${cf_tst_cflags}" = "\"'" ; then
2635
2636         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2637         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2638
2639                                 continue
2640                         fi
2641                         ;;
2642                 esac
2643                 case "$CPPFLAGS" in
2644                 (*$cf_add_cflags)
2645                         ;;
2646                 (*)
2647                         case "$cf_add_cflags" in
2648                         (-D*)
2649                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2650
2651 CPPFLAGS=`echo "$CPPFLAGS" | \
2652         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2653                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2654
2655                                 ;;
2656                         esac
2657
2658         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2659         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2660
2661                         ;;
2662                 esac
2663                 ;;
2664         (*)
2665
2666         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2667         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2668
2669                 ;;
2670         esac
2671         ;;
2672 (yes)
2673
2674         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2675         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2676
2677         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2678
2679         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2680                 && test -z "${cf_tst_cflags}" \
2681                 && cf_fix_cppflags=no
2682         ;;
2683 esac
2684 done
2685
2686 if test -n "$cf_new_cflags" ; then
2687
2688         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2689         CFLAGS="${CFLAGS}$cf_new_cflags"
2690
2691 fi
2692
2693 if test -n "$cf_new_cppflags" ; then
2694
2695         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2696         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2697
2698 fi
2699
2700 if test -n "$cf_new_extra_cppflags" ; then
2701
2702         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2703         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2704
2705 fi
2706
2707         done
2708         ;;
2709 (*)
2710         echo "$as_me:2710: result: ok" >&5
2711 echo "${ECHO_T}ok" >&6
2712         ;;
2713 esac
2714
2715 echo "$as_me:2715: checking \$CC variable" >&5
2716 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2717 case "$CC" in
2718 (*[\ \  ]-*)
2719         echo "$as_me:2719: result: broken" >&5
2720 echo "${ECHO_T}broken" >&6
2721         { echo "$as_me:2721: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2722 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2723         # humor him...
2724         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2725         cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2726         CC="$cf_prog"
2727         for cf_arg in $cf_flags
2728         do
2729                 case "x$cf_arg" in
2730                 (x-[IUDfgOW]*)
2731
2732 cf_fix_cppflags=no
2733 cf_new_cflags=
2734 cf_new_cppflags=
2735 cf_new_extra_cppflags=
2736
2737 for cf_add_cflags in $cf_arg
2738 do
2739 case "$cf_fix_cppflags" in
2740 (no)
2741         case "$cf_add_cflags" in
2742         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2743                 case "$cf_add_cflags" in
2744                 (-D*)
2745                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2746
2747                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2748                                 && test -z "${cf_tst_cflags}" \
2749                                 && cf_fix_cppflags=yes
2750
2751                         if test "$cf_fix_cppflags" = yes ; then
2752
2753         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2754         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2755
2756                                 continue
2757                         elif test "${cf_tst_cflags}" = "\"'" ; then
2758
2759         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2760         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2761
2762                                 continue
2763                         fi
2764                         ;;
2765                 esac
2766                 case "$CPPFLAGS" in
2767                 (*$cf_add_cflags)
2768                         ;;
2769                 (*)
2770                         case "$cf_add_cflags" in
2771                         (-D*)
2772                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2773
2774 CPPFLAGS=`echo "$CPPFLAGS" | \
2775         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2776                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2777
2778                                 ;;
2779                         esac
2780
2781         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2782         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2783
2784                         ;;
2785                 esac
2786                 ;;
2787         (*)
2788
2789         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2790         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2791
2792                 ;;
2793         esac
2794         ;;
2795 (yes)
2796
2797         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2798         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2799
2800         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2801
2802         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2803                 && test -z "${cf_tst_cflags}" \
2804                 && cf_fix_cppflags=no
2805         ;;
2806 esac
2807 done
2808
2809 if test -n "$cf_new_cflags" ; then
2810
2811         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2812         CFLAGS="${CFLAGS}$cf_new_cflags"
2813
2814 fi
2815
2816 if test -n "$cf_new_cppflags" ; then
2817
2818         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2819         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2820
2821 fi
2822
2823 if test -n "$cf_new_extra_cppflags" ; then
2824
2825         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2826         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2827
2828 fi
2829
2830                         ;;
2831                 (*)
2832                         CC="$CC $cf_arg"
2833                         ;;
2834                 esac
2835         done
2836         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2837
2838 echo "${as_me:-configure}:2838: testing resulting CC: '$CC' ..." 1>&5
2839
2840         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2841
2842 echo "${as_me:-configure}:2842: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2843
2844         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2845
2846 echo "${as_me:-configure}:2846: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2847
2848         ;;
2849 (*)
2850         echo "$as_me:2850: result: ok" >&5
2851 echo "${ECHO_T}ok" >&6
2852         ;;
2853 esac
2854
2855 ac_ext=c
2856 ac_cpp='$CPP $CPPFLAGS'
2857 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2858 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2859 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2860 ac_main_return="return"
2861 echo "$as_me:2861: checking how to run the C preprocessor" >&5
2862 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2863 # On Suns, sometimes $CPP names a directory.
2864 if test -n "$CPP" && test -d "$CPP"; then
2865   CPP=
2866 fi
2867 if test -z "$CPP"; then
2868   if test "${ac_cv_prog_CPP+set}" = set; then
2869   echo $ECHO_N "(cached) $ECHO_C" >&6
2870 else
2871       # Double quotes because CPP needs to be expanded
2872     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2873     do
2874       ac_preproc_ok=false
2875 for ac_c_preproc_warn_flag in '' yes
2876 do
2877   # Use a header file that comes with gcc, so configuring glibc
2878   # with a fresh cross-compiler works.
2879   # On the NeXT, cc -E runs the code through the compiler's parser,
2880   # not just through cpp. "Syntax error" is here to catch this case.
2881   cat >"conftest.$ac_ext" <<_ACEOF
2882 #line 2882 "configure"
2883 #include "confdefs.h"
2884 #include <assert.h>
2885                      Syntax error
2886 _ACEOF
2887 if { (eval echo "$as_me:2887: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2888   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2889   ac_status=$?
2890   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2891   rm -f conftest.er1
2892   cat conftest.err >&5
2893   echo "$as_me:2893: \$? = $ac_status" >&5
2894   (exit "$ac_status"); } >/dev/null; then
2895   if test -s conftest.err; then
2896     ac_cpp_err=$ac_c_preproc_warn_flag
2897   else
2898     ac_cpp_err=
2899   fi
2900 else
2901   ac_cpp_err=yes
2902 fi
2903 if test -z "$ac_cpp_err"; then
2904   :
2905 else
2906   echo "$as_me: failed program was:" >&5
2907   cat "conftest.$ac_ext" >&5
2908   # Broken: fails on valid input.
2909 continue
2910 fi
2911 rm -f conftest.err "conftest.$ac_ext"
2912
2913   # OK, works on sane cases.  Now check whether non-existent headers
2914   # can be detected and how.
2915   cat >"conftest.$ac_ext" <<_ACEOF
2916 #line 2916 "configure"
2917 #include "confdefs.h"
2918 #include <ac_nonexistent.h>
2919 _ACEOF
2920 if { (eval echo "$as_me:2920: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2921   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2922   ac_status=$?
2923   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2924   rm -f conftest.er1
2925   cat conftest.err >&5
2926   echo "$as_me:2926: \$? = $ac_status" >&5
2927   (exit "$ac_status"); } >/dev/null; then
2928   if test -s conftest.err; then
2929     ac_cpp_err=$ac_c_preproc_warn_flag
2930   else
2931     ac_cpp_err=
2932   fi
2933 else
2934   ac_cpp_err=yes
2935 fi
2936 if test -z "$ac_cpp_err"; then
2937   # Broken: success on invalid input.
2938 continue
2939 else
2940   echo "$as_me: failed program was:" >&5
2941   cat "conftest.$ac_ext" >&5
2942   # Passes both tests.
2943 ac_preproc_ok=:
2944 break
2945 fi
2946 rm -f conftest.err "conftest.$ac_ext"
2947
2948 done
2949 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2950 rm -f conftest.err "conftest.$ac_ext"
2951 if $ac_preproc_ok; then
2952   break
2953 fi
2954
2955     done
2956     ac_cv_prog_CPP=$CPP
2957
2958 fi
2959   CPP=$ac_cv_prog_CPP
2960 else
2961   ac_cv_prog_CPP=$CPP
2962 fi
2963 echo "$as_me:2963: result: $CPP" >&5
2964 echo "${ECHO_T}$CPP" >&6
2965 ac_preproc_ok=false
2966 for ac_c_preproc_warn_flag in '' yes
2967 do
2968   # Use a header file that comes with gcc, so configuring glibc
2969   # with a fresh cross-compiler works.
2970   # On the NeXT, cc -E runs the code through the compiler's parser,
2971   # not just through cpp. "Syntax error" is here to catch this case.
2972   cat >"conftest.$ac_ext" <<_ACEOF
2973 #line 2973 "configure"
2974 #include "confdefs.h"
2975 #include <assert.h>
2976                      Syntax error
2977 _ACEOF
2978 if { (eval echo "$as_me:2978: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2979   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2980   ac_status=$?
2981   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2982   rm -f conftest.er1
2983   cat conftest.err >&5
2984   echo "$as_me:2984: \$? = $ac_status" >&5
2985   (exit "$ac_status"); } >/dev/null; then
2986   if test -s conftest.err; then
2987     ac_cpp_err=$ac_c_preproc_warn_flag
2988   else
2989     ac_cpp_err=
2990   fi
2991 else
2992   ac_cpp_err=yes
2993 fi
2994 if test -z "$ac_cpp_err"; then
2995   :
2996 else
2997   echo "$as_me: failed program was:" >&5
2998   cat "conftest.$ac_ext" >&5
2999   # Broken: fails on valid input.
3000 continue
3001 fi
3002 rm -f conftest.err "conftest.$ac_ext"
3003
3004   # OK, works on sane cases.  Now check whether non-existent headers
3005   # can be detected and how.
3006   cat >"conftest.$ac_ext" <<_ACEOF
3007 #line 3007 "configure"
3008 #include "confdefs.h"
3009 #include <ac_nonexistent.h>
3010 _ACEOF
3011 if { (eval echo "$as_me:3011: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3012   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3013   ac_status=$?
3014   $EGREP -v '^ *\+' conftest.er1 >conftest.err
3015   rm -f conftest.er1
3016   cat conftest.err >&5
3017   echo "$as_me:3017: \$? = $ac_status" >&5
3018   (exit "$ac_status"); } >/dev/null; then
3019   if test -s conftest.err; then
3020     ac_cpp_err=$ac_c_preproc_warn_flag
3021   else
3022     ac_cpp_err=
3023   fi
3024 else
3025   ac_cpp_err=yes
3026 fi
3027 if test -z "$ac_cpp_err"; then
3028   # Broken: success on invalid input.
3029 continue
3030 else
3031   echo "$as_me: failed program was:" >&5
3032   cat "conftest.$ac_ext" >&5
3033   # Passes both tests.
3034 ac_preproc_ok=:
3035 break
3036 fi
3037 rm -f conftest.err "conftest.$ac_ext"
3038
3039 done
3040 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3041 rm -f conftest.err "conftest.$ac_ext"
3042 if $ac_preproc_ok; then
3043   :
3044 else
3045   { { echo "$as_me:3045: error: C preprocessor \"$CPP\" fails sanity check" >&5
3046 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3047    { (exit 1); exit 1; }; }
3048 fi
3049
3050 ac_ext=c
3051 ac_cpp='$CPP $CPPFLAGS'
3052 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3053 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3054 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3055 ac_main_return="return"
3056
3057 if test $ac_cv_c_compiler_gnu = yes; then
3058     echo "$as_me:3058: checking whether $CC needs -traditional" >&5
3059 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3060 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3061   echo $ECHO_N "(cached) $ECHO_C" >&6
3062 else
3063     ac_pattern="Autoconf.*'x'"
3064   cat >"conftest.$ac_ext" <<_ACEOF
3065 #line 3065 "configure"
3066 #include "confdefs.h"
3067 #include <sgtty.h>
3068 int Autoconf = TIOCGETP;
3069 _ACEOF
3070 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3071   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3072   ac_cv_prog_gcc_traditional=yes
3073 else
3074   ac_cv_prog_gcc_traditional=no
3075 fi
3076 rm -rf conftest*
3077
3078   if test $ac_cv_prog_gcc_traditional = no; then
3079     cat >"conftest.$ac_ext" <<_ACEOF
3080 #line 3080 "configure"
3081 #include "confdefs.h"
3082 #include <termio.h>
3083 int Autoconf = TCGETA;
3084 _ACEOF
3085 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3086   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3087   ac_cv_prog_gcc_traditional=yes
3088 fi
3089 rm -rf conftest*
3090
3091   fi
3092 fi
3093 echo "$as_me:3093: result: $ac_cv_prog_gcc_traditional" >&5
3094 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3095   if test $ac_cv_prog_gcc_traditional = yes; then
3096     CC="$CC -traditional"
3097   fi
3098 fi
3099
3100 echo "$as_me:3100: checking whether $CC understands -c and -o together" >&5
3101 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3102 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3103   echo $ECHO_N "(cached) $ECHO_C" >&6
3104 else
3105
3106 cat > conftest.$ac_ext <<CF_EOF
3107 int main(void)
3108 {
3109         ${cf_cv_main_return:-return}(0);
3110 }
3111 CF_EOF
3112 # We do the test twice because some compilers refuse to overwrite an
3113 # existing .o file with -o, though they will create one.
3114 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3115 if { (eval echo "$as_me:3115: \"$ac_try\"") >&5
3116   (eval $ac_try) 2>&5
3117   ac_status=$?
3118   echo "$as_me:3118: \$? = $ac_status" >&5
3119   (exit "$ac_status"); } &&
3120   test -f conftest2.$ac_objext && { (eval echo "$as_me:3120: \"$ac_try\"") >&5
3121   (eval $ac_try) 2>&5
3122   ac_status=$?
3123   echo "$as_me:3123: \$? = $ac_status" >&5
3124   (exit "$ac_status"); };
3125 then
3126   eval cf_cv_prog_CC_c_o=yes
3127 else
3128   eval cf_cv_prog_CC_c_o=no
3129 fi
3130 rm -rf ./conftest*
3131
3132 fi
3133 if test "$cf_cv_prog_CC_c_o" = yes; then
3134   echo "$as_me:3134: result: yes" >&5
3135 echo "${ECHO_T}yes" >&6
3136 else
3137   echo "$as_me:3137: result: no" >&5
3138 echo "${ECHO_T}no" >&6
3139 fi
3140
3141 if test "$cross_compiling" = yes ; then
3142         LDCONFIG=:
3143 else
3144         case "$cf_cv_system_name" in
3145         (dragonfly*|mirbsd*|freebsd*)
3146                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3147                 ;;
3148         (*) LDPATH=$PATH:/sbin:/usr/sbin
3149                 # Extract the first word of "ldconfig", so it can be a program name with args.
3150 set dummy ldconfig; ac_word=$2
3151 echo "$as_me:3151: checking for $ac_word" >&5
3152 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3153 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3154   echo $ECHO_N "(cached) $ECHO_C" >&6
3155 else
3156   case $LDCONFIG in
3157   [\\/]* | ?:[\\/]*)
3158   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3159   ;;
3160   *)
3161   ac_save_IFS=$IFS; IFS=$ac_path_separator
3162 ac_dummy="$LDPATH"
3163 for ac_dir in $ac_dummy; do
3164   IFS=$ac_save_IFS
3165   test -z "$ac_dir" && ac_dir=.
3166   if $as_executable_p "$ac_dir/$ac_word"; then
3167    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3168    echo "$as_me:3168: found $ac_dir/$ac_word" >&5
3169    break
3170 fi
3171 done
3172
3173   ;;
3174 esac
3175 fi
3176 LDCONFIG=$ac_cv_path_LDCONFIG
3177
3178 if test -n "$LDCONFIG"; then
3179   echo "$as_me:3179: result: $LDCONFIG" >&5
3180 echo "${ECHO_T}$LDCONFIG" >&6
3181 else
3182   echo "$as_me:3182: result: no" >&5
3183 echo "${ECHO_T}no" >&6
3184 fi
3185
3186                 ;;
3187         esac
3188 fi
3189
3190 echo "$as_me:3190: checking if you want to ensure bool is consistent with C++" >&5
3191 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3192
3193 # Check whether --with-cxx or --without-cxx was given.
3194 if test "${with_cxx+set}" = set; then
3195   withval="$with_cxx"
3196   cf_with_cxx=$withval
3197 else
3198   cf_with_cxx=yes
3199 fi;
3200 echo "$as_me:3200: result: $cf_with_cxx" >&5
3201 echo "${ECHO_T}$cf_with_cxx" >&6
3202 if test "X$cf_with_cxx" = Xno ; then
3203         CXX=""
3204         GXX=""
3205 else
3206         # with autoconf 2.13, we can change the error to a warning:
3207                 ac_ext=cc
3208 ac_cpp='$CXXCPP $CPPFLAGS'
3209 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3210 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3211 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3212 ac_main_return="return"
3213 if test -n "$ac_tool_prefix"; then
3214   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3215   do
3216     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3217 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3218 echo "$as_me:3218: checking for $ac_word" >&5
3219 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3220 if test "${ac_cv_prog_CXX+set}" = set; then
3221   echo $ECHO_N "(cached) $ECHO_C" >&6
3222 else
3223   if test -n "$CXX"; then
3224   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3225 else
3226   ac_save_IFS=$IFS; IFS=$ac_path_separator
3227 ac_dummy="$PATH"
3228 for ac_dir in $ac_dummy; do
3229   IFS=$ac_save_IFS
3230   test -z "$ac_dir" && ac_dir=.
3231   $as_executable_p "$ac_dir/$ac_word" || continue
3232 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3233 echo "$as_me:3233: found $ac_dir/$ac_word" >&5
3234 break
3235 done
3236
3237 fi
3238 fi
3239 CXX=$ac_cv_prog_CXX
3240 if test -n "$CXX"; then
3241   echo "$as_me:3241: result: $CXX" >&5
3242 echo "${ECHO_T}$CXX" >&6
3243 else
3244   echo "$as_me:3244: result: no" >&5
3245 echo "${ECHO_T}no" >&6
3246 fi
3247
3248     test -n "$CXX" && break
3249   done
3250 fi
3251 if test -z "$CXX"; then
3252   ac_ct_CXX=$CXX
3253   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3254 do
3255   # Extract the first word of "$ac_prog", so it can be a program name with args.
3256 set dummy $ac_prog; ac_word=$2
3257 echo "$as_me:3257: checking for $ac_word" >&5
3258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3259 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3260   echo $ECHO_N "(cached) $ECHO_C" >&6
3261 else
3262   if test -n "$ac_ct_CXX"; then
3263   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3264 else
3265   ac_save_IFS=$IFS; IFS=$ac_path_separator
3266 ac_dummy="$PATH"
3267 for ac_dir in $ac_dummy; do
3268   IFS=$ac_save_IFS
3269   test -z "$ac_dir" && ac_dir=.
3270   $as_executable_p "$ac_dir/$ac_word" || continue
3271 ac_cv_prog_ac_ct_CXX="$ac_prog"
3272 echo "$as_me:3272: found $ac_dir/$ac_word" >&5
3273 break
3274 done
3275
3276 fi
3277 fi
3278 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3279 if test -n "$ac_ct_CXX"; then
3280   echo "$as_me:3280: result: $ac_ct_CXX" >&5
3281 echo "${ECHO_T}$ac_ct_CXX" >&6
3282 else
3283   echo "$as_me:3283: result: no" >&5
3284 echo "${ECHO_T}no" >&6
3285 fi
3286
3287   test -n "$ac_ct_CXX" && break
3288 done
3289 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3290
3291   CXX=$ac_ct_CXX
3292 fi
3293
3294 # Provide some information about the compiler.
3295 echo "$as_me:3295:" \
3296      "checking for C++ compiler version" >&5
3297 ac_compiler=`set X $ac_compile; echo $2`
3298 { (eval echo "$as_me:3298: \"$ac_compiler --version </dev/null >&5\"") >&5
3299   (eval $ac_compiler --version </dev/null >&5) 2>&5
3300   ac_status=$?
3301   echo "$as_me:3301: \$? = $ac_status" >&5
3302   (exit "$ac_status"); }
3303 { (eval echo "$as_me:3303: \"$ac_compiler -v </dev/null >&5\"") >&5
3304   (eval $ac_compiler -v </dev/null >&5) 2>&5
3305   ac_status=$?
3306   echo "$as_me:3306: \$? = $ac_status" >&5
3307   (exit "$ac_status"); }
3308 { (eval echo "$as_me:3308: \"$ac_compiler -V </dev/null >&5\"") >&5
3309   (eval $ac_compiler -V </dev/null >&5) 2>&5
3310   ac_status=$?
3311   echo "$as_me:3311: \$? = $ac_status" >&5
3312   (exit "$ac_status"); }
3313
3314 echo "$as_me:3314: checking whether we are using the GNU C++ compiler" >&5
3315 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3316 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3317   echo $ECHO_N "(cached) $ECHO_C" >&6
3318 else
3319   cat >"conftest.$ac_ext" <<_ACEOF
3320 #line 3320 "configure"
3321 #include "confdefs.h"
3322
3323 int
3324 main (void)
3325 {
3326 #ifndef __GNUC__
3327        choke me
3328 #endif
3329
3330   ;
3331   return 0;
3332 }
3333 _ACEOF
3334 rm -f "conftest.$ac_objext"
3335 if { (eval echo "$as_me:3335: \"$ac_compile\"") >&5
3336   (eval $ac_compile) 2>&5
3337   ac_status=$?
3338   echo "$as_me:3338: \$? = $ac_status" >&5
3339   (exit "$ac_status"); } &&
3340          { ac_try='test -s "conftest.$ac_objext"'
3341   { (eval echo "$as_me:3341: \"$ac_try\"") >&5
3342   (eval $ac_try) 2>&5
3343   ac_status=$?
3344   echo "$as_me:3344: \$? = $ac_status" >&5
3345   (exit "$ac_status"); }; }; then
3346   ac_compiler_gnu=yes
3347 else
3348   echo "$as_me: failed program was:" >&5
3349 cat "conftest.$ac_ext" >&5
3350 ac_compiler_gnu=no
3351 fi
3352 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3353 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3354
3355 fi
3356 echo "$as_me:3356: result: $ac_cv_cxx_compiler_gnu" >&5
3357 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3358 GXX=`test $ac_compiler_gnu = yes && echo yes`
3359 ac_test_CXXFLAGS=${CXXFLAGS+set}
3360 ac_save_CXXFLAGS=$CXXFLAGS
3361 CXXFLAGS="-g"
3362 echo "$as_me:3362: checking whether $CXX accepts -g" >&5
3363 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3364 if test "${ac_cv_prog_cxx_g+set}" = set; then
3365   echo $ECHO_N "(cached) $ECHO_C" >&6
3366 else
3367   cat >"conftest.$ac_ext" <<_ACEOF
3368 #line 3368 "configure"
3369 #include "confdefs.h"
3370
3371 int
3372 main (void)
3373 {
3374
3375   ;
3376   return 0;
3377 }
3378 _ACEOF
3379 rm -f "conftest.$ac_objext"
3380 if { (eval echo "$as_me:3380: \"$ac_compile\"") >&5
3381   (eval $ac_compile) 2>&5
3382   ac_status=$?
3383   echo "$as_me:3383: \$? = $ac_status" >&5
3384   (exit "$ac_status"); } &&
3385          { ac_try='test -s "conftest.$ac_objext"'
3386   { (eval echo "$as_me:3386: \"$ac_try\"") >&5
3387   (eval $ac_try) 2>&5
3388   ac_status=$?
3389   echo "$as_me:3389: \$? = $ac_status" >&5
3390   (exit "$ac_status"); }; }; then
3391   ac_cv_prog_cxx_g=yes
3392 else
3393   echo "$as_me: failed program was:" >&5
3394 cat "conftest.$ac_ext" >&5
3395 ac_cv_prog_cxx_g=no
3396 fi
3397 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3398 fi
3399 echo "$as_me:3399: result: $ac_cv_prog_cxx_g" >&5
3400 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3401 if test "$ac_test_CXXFLAGS" = set; then
3402   CXXFLAGS=$ac_save_CXXFLAGS
3403 elif test $ac_cv_prog_cxx_g = yes; then
3404   if test "$GXX" = yes; then
3405     CXXFLAGS="-g -O2"
3406   else
3407     CXXFLAGS="-g"
3408   fi
3409 else
3410   if test "$GXX" = yes; then
3411     CXXFLAGS="-O2"
3412   else
3413     CXXFLAGS=
3414   fi
3415 fi
3416 for ac_declaration in \
3417    ''\
3418    '#include <stdlib.h>' \
3419    'extern "C" void std::exit (int) throw (); using std::exit;' \
3420    'extern "C" void std::exit (int); using std::exit;' \
3421    'extern "C" void exit (int) throw ();' \
3422    'extern "C" void exit (int);' \
3423    'void exit (int);'
3424 do
3425   cat >"conftest.$ac_ext" <<_ACEOF
3426 #line 3426 "configure"
3427 #include "confdefs.h"
3428 #include <stdlib.h>
3429 $ac_declaration
3430 int
3431 main (void)
3432 {
3433 exit (42);
3434   ;
3435   return 0;
3436 }
3437 _ACEOF
3438 rm -f "conftest.$ac_objext"
3439 if { (eval echo "$as_me:3439: \"$ac_compile\"") >&5
3440   (eval $ac_compile) 2>&5
3441   ac_status=$?
3442   echo "$as_me:3442: \$? = $ac_status" >&5
3443   (exit "$ac_status"); } &&
3444          { ac_try='test -s "conftest.$ac_objext"'
3445   { (eval echo "$as_me:3445: \"$ac_try\"") >&5
3446   (eval $ac_try) 2>&5
3447   ac_status=$?
3448   echo "$as_me:3448: \$? = $ac_status" >&5
3449   (exit "$ac_status"); }; }; then
3450   :
3451 else
3452   echo "$as_me: failed program was:" >&5
3453 cat "conftest.$ac_ext" >&5
3454 continue
3455 fi
3456 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3457   cat >"conftest.$ac_ext" <<_ACEOF
3458 #line 3458 "configure"
3459 #include "confdefs.h"
3460 $ac_declaration
3461 int
3462 main (void)
3463 {
3464 exit (42);
3465   ;
3466   return 0;
3467 }
3468 _ACEOF
3469 rm -f "conftest.$ac_objext"
3470 if { (eval echo "$as_me:3470: \"$ac_compile\"") >&5
3471   (eval $ac_compile) 2>&5
3472   ac_status=$?
3473   echo "$as_me:3473: \$? = $ac_status" >&5
3474   (exit "$ac_status"); } &&
3475          { ac_try='test -s "conftest.$ac_objext"'
3476   { (eval echo "$as_me:3476: \"$ac_try\"") >&5
3477   (eval $ac_try) 2>&5
3478   ac_status=$?
3479   echo "$as_me:3479: \$? = $ac_status" >&5
3480   (exit "$ac_status"); }; }; then
3481   break
3482 else
3483   echo "$as_me: failed program was:" >&5
3484 cat "conftest.$ac_ext" >&5
3485 fi
3486 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3487 done
3488 rm -rf conftest*
3489 if test -n "$ac_declaration"; then
3490   echo '#ifdef __cplusplus' >>confdefs.h
3491   echo "$ac_declaration"    >>confdefs.h
3492   echo '#endif'             >>confdefs.h
3493 fi
3494
3495 ac_ext=c
3496 ac_cpp='$CPP $CPPFLAGS'
3497 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3498 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3499 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3500 ac_main_return="return"
3501
3502         ac_ext=cc
3503 ac_cpp='$CXXCPP $CPPFLAGS'
3504 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3505 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3506 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3507 ac_main_return="return"
3508
3509         if test "x$cf_with_cxx" != xno
3510         then
3511                 # Several of the C++ configurations do not work, particularly when
3512                 # cross-compiling (20140913 -TD)
3513                 echo "$as_me:3513: checking if $CXX works" >&5
3514 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3515
3516                 save_CPPFLAGS="$CPPFLAGS"
3517                 eval cf_includedir=${includedir}
3518                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3519
3520 cat >"conftest.$ac_ext" <<_ACEOF
3521 #line 3521 "configure"
3522 #include "confdefs.h"
3523
3524 #include <stdlib.h>
3525 #include <stdio.h>
3526
3527 int
3528 main (void)
3529 {
3530
3531                 printf("Hello world!\n")
3532
3533   ;
3534   return 0;
3535 }
3536 _ACEOF
3537 rm -f "conftest.$ac_objext"
3538 if { (eval echo "$as_me:3538: \"$ac_compile\"") >&5
3539   (eval $ac_compile) 2>&5
3540   ac_status=$?
3541   echo "$as_me:3541: \$? = $ac_status" >&5
3542   (exit "$ac_status"); } &&
3543          { ac_try='test -s "conftest.$ac_objext"'
3544   { (eval echo "$as_me:3544: \"$ac_try\"") >&5
3545   (eval $ac_try) 2>&5
3546   ac_status=$?
3547   echo "$as_me:3547: \$? = $ac_status" >&5
3548   (exit "$ac_status"); }; }; then
3549   cf_cxx_works=yes
3550 else
3551   echo "$as_me: failed program was:" >&5
3552 cat "conftest.$ac_ext" >&5
3553 cf_cxx_works=no
3554 fi
3555 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3556                 CPPFLAGS="$save_CPPFLAGS"
3557
3558                 echo "$as_me:3558: result: $cf_cxx_works" >&5
3559 echo "${ECHO_T}$cf_cxx_works" >&6
3560                 if test "x$cf_cxx_works" = xno
3561                 then
3562                         { echo "$as_me:3562: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3563 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3564                         cf_with_cxx=no; CXX=""; GXX="";
3565                 fi
3566         fi
3567         ac_ext=c
3568 ac_cpp='$CPP $CPPFLAGS'
3569 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3570 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3571 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3572 ac_main_return="return"
3573
3574         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3575         if test "$CXX" = "g++" ; then
3576                 # Extract the first word of "g++", so it can be a program name with args.
3577 set dummy g++; ac_word=$2
3578 echo "$as_me:3578: checking for $ac_word" >&5
3579 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3580 if test "${ac_cv_path_CXX+set}" = set; then
3581   echo $ECHO_N "(cached) $ECHO_C" >&6
3582 else
3583   case $CXX in
3584   [\\/]* | ?:[\\/]*)
3585   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3586   ;;
3587   *)
3588   ac_save_IFS=$IFS; IFS=$ac_path_separator
3589 ac_dummy="$PATH"
3590 for ac_dir in $ac_dummy; do
3591   IFS=$ac_save_IFS
3592   test -z "$ac_dir" && ac_dir=.
3593   if $as_executable_p "$ac_dir/$ac_word"; then
3594    ac_cv_path_CXX="$ac_dir/$ac_word"
3595    echo "$as_me:3595: found $ac_dir/$ac_word" >&5
3596    break
3597 fi
3598 done
3599
3600   ;;
3601 esac
3602 fi
3603 CXX=$ac_cv_path_CXX
3604
3605 if test -n "$CXX"; then
3606   echo "$as_me:3606: result: $CXX" >&5
3607 echo "${ECHO_T}$CXX" >&6
3608 else
3609   echo "$as_me:3609: result: no" >&5
3610 echo "${ECHO_T}no" >&6
3611 fi
3612
3613         fi
3614         case "x$CXX" in
3615         (x|xg++)
3616                 { echo "$as_me:3616: WARNING: You don't have any C++ compiler, too bad" >&5
3617 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3618                 cf_with_cxx=no; CXX=""; GXX="";
3619                 ;;
3620         esac
3621 fi
3622
3623 GXX_VERSION=none
3624 if test "$GXX" = yes; then
3625         echo "$as_me:3625: checking version of ${CXX:-g++}" >&5
3626 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3627         GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3628         if test -z "$GXX_VERSION"
3629         then
3630                 GXX_VERSION=unknown
3631                 GXX=no
3632         fi
3633         echo "$as_me:3633: result: $GXX_VERSION" >&5
3634 echo "${ECHO_T}$GXX_VERSION" >&6
3635 fi
3636
3637 case "$GXX_VERSION" in
3638 ([1-9][0-9].*)
3639         ;;
3640 (1.*|2.[0-6]*)
3641         { echo "$as_me:3641: WARNING: templates do not work" >&5
3642 echo "$as_me: WARNING: templates do not work" >&2;}
3643         ;;
3644 esac
3645
3646 echo "$as_me:3646: checking if you want to build C++ binding and demo" >&5
3647 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3648
3649 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3650 if test "${with_cxx_binding+set}" = set; then
3651   withval="$with_cxx_binding"
3652   cf_with_cxx_binding=$withval
3653 else
3654   cf_with_cxx_binding=$cf_with_cxx
3655 fi;
3656 echo "$as_me:3656: result: $cf_with_cxx_binding" >&5
3657 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3658
3659 echo "$as_me:3659: checking if you want to build with Ada" >&5
3660 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3661 echo "$as_me:3661: result: $cf_with_ada" >&5
3662 echo "${ECHO_T}$cf_with_ada" >&6
3663
3664 echo "$as_me:3664: checking if you want to install terminal database" >&5
3665 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3666
3667 # Check whether --enable-db-install or --disable-db-install was given.
3668 if test "${enable_db_install+set}" = set; then
3669   enableval="$enable_db_install"
3670   cf_with_db_install=$enableval
3671 else
3672   cf_with_db_install=yes
3673 fi;
3674 echo "$as_me:3674: result: $cf_with_db_install" >&5
3675 echo "${ECHO_T}$cf_with_db_install" >&6
3676
3677 echo "$as_me:3677: checking if you want to install manpages" >&5
3678 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3679
3680 # Check whether --with-manpages or --without-manpages was given.
3681 if test "${with_manpages+set}" = set; then
3682   withval="$with_manpages"
3683   cf_with_manpages=$withval
3684 else
3685   cf_with_manpages=yes
3686 fi;
3687 echo "$as_me:3687: result: $cf_with_manpages" >&5
3688 echo "${ECHO_T}$cf_with_manpages" >&6
3689
3690 echo "$as_me:3690: checking if you want to build programs such as tic" >&5
3691 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3692
3693 # Check whether --with-progs or --without-progs was given.
3694 if test "${with_progs+set}" = set; then
3695   withval="$with_progs"
3696   cf_with_progs=$withval
3697 else
3698   cf_with_progs=yes
3699 fi;
3700 echo "$as_me:3700: result: $cf_with_progs" >&5
3701 echo "${ECHO_T}$cf_with_progs" >&6
3702
3703 echo "$as_me:3703: checking if you want to build test-programs" >&5
3704 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3705
3706 # Check whether --with-tests or --without-tests was given.
3707 if test "${with_tests+set}" = set; then
3708   withval="$with_tests"
3709   cf_with_tests=$withval
3710 else
3711   cf_with_tests=yes
3712 fi;
3713 echo "$as_me:3713: result: $cf_with_tests" >&5
3714 echo "${ECHO_T}$cf_with_tests" >&6
3715
3716 echo "$as_me:3716: checking if you wish to install curses.h" >&5
3717 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3718
3719 # Check whether --with-curses-h or --without-curses-h was given.
3720 if test "${with_curses_h+set}" = set; then
3721   withval="$with_curses_h"
3722   with_curses_h=$withval
3723 else
3724   with_curses_h=yes
3725 fi;
3726 echo "$as_me:3726: result: $with_curses_h" >&5
3727 echo "${ECHO_T}$with_curses_h" >&6
3728
3729 modules_to_build="ncurses"
3730 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3731 modules_to_build="$modules_to_build panel menu form"
3732
3733 test "$program_prefix" != NONE &&
3734   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3735 # Use a double $ so make ignores it.
3736 test "$program_suffix" != NONE &&
3737   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3738 # Double any \ or $.  echo might interpret backslashes.
3739 # By default was `s,x,x', remove it if useless.
3740 cat <<\_ACEOF >conftest.sed
3741 s/[\\$]/&&/g;s/;s,x,x,$//
3742 _ACEOF
3743 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3744 rm conftest.sed
3745
3746 for ac_prog in mawk gawk nawk awk
3747 do
3748   # Extract the first word of "$ac_prog", so it can be a program name with args.
3749 set dummy $ac_prog; ac_word=$2
3750 echo "$as_me:3750: checking for $ac_word" >&5
3751 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3752 if test "${ac_cv_prog_AWK+set}" = set; then
3753   echo $ECHO_N "(cached) $ECHO_C" >&6
3754 else
3755   if test -n "$AWK"; then
3756   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3757 else
3758   ac_save_IFS=$IFS; IFS=$ac_path_separator
3759 ac_dummy="$PATH"
3760 for ac_dir in $ac_dummy; do
3761   IFS=$ac_save_IFS
3762   test -z "$ac_dir" && ac_dir=.
3763   $as_executable_p "$ac_dir/$ac_word" || continue
3764 ac_cv_prog_AWK="$ac_prog"
3765 echo "$as_me:3765: found $ac_dir/$ac_word" >&5
3766 break
3767 done
3768
3769 fi
3770 fi
3771 AWK=$ac_cv_prog_AWK
3772 if test -n "$AWK"; then
3773   echo "$as_me:3773: result: $AWK" >&5
3774 echo "${ECHO_T}$AWK" >&6
3775 else
3776   echo "$as_me:3776: result: no" >&5
3777 echo "${ECHO_T}no" >&6
3778 fi
3779
3780   test -n "$AWK" && break
3781 done
3782
3783 test -z "$AWK" && { { echo "$as_me:3783: error: No awk program found" >&5
3784 echo "$as_me: error: No awk program found" >&2;}
3785    { (exit 1); exit 1; }; }
3786
3787 # Find a good install program.  We prefer a C program (faster),
3788 # so one script is as good as another.  But avoid the broken or
3789 # incompatible versions:
3790 # SysV /etc/install, /usr/sbin/install
3791 # SunOS /usr/etc/install
3792 # IRIX /sbin/install
3793 # AIX /bin/install
3794 # AmigaOS /C/install, which installs bootblocks on floppy discs
3795 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3796 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3797 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3798 # ./install, which can be erroneously created by make from ./install.sh.
3799 echo "$as_me:3799: checking for a BSD compatible install" >&5
3800 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3801 if test -z "$INSTALL"; then
3802 if test "${ac_cv_path_install+set}" = set; then
3803   echo $ECHO_N "(cached) $ECHO_C" >&6
3804 else
3805     ac_save_IFS=$IFS; IFS=$ac_path_separator
3806   for ac_dir in $PATH; do
3807     IFS=$ac_save_IFS
3808     # Account for people who put trailing slashes in PATH elements.
3809     case $ac_dir/ in
3810     / | ./ | .// | /cC/* \
3811     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3812     | /usr/ucb/* ) ;;
3813     *)
3814       # OSF1 and SCO ODT 3.0 have their own names for install.
3815       # Don't use installbsd from OSF since it installs stuff as root
3816       # by default.
3817       for ac_prog in ginstall scoinst install; do
3818         if $as_executable_p "$ac_dir/$ac_prog"; then
3819           if test $ac_prog = install &&
3820             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3821             # AIX install.  It has an incompatible calling convention.
3822             :
3823           elif test $ac_prog = install &&
3824             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3825             # program-specific install script used by HP pwplus--don't use.
3826             :
3827           else
3828             ac_cv_path_install="$ac_dir/$ac_prog -c"
3829             break 2
3830           fi
3831         fi
3832       done
3833       ;;
3834     esac
3835   done
3836
3837 fi
3838   if test "${ac_cv_path_install+set}" = set; then
3839     INSTALL=$ac_cv_path_install
3840   else
3841     # As a last resort, use the slow shell script.  We don't cache a
3842     # path for INSTALL within a source directory, because that will
3843     # break other packages using the cache if that directory is
3844     # removed, or if the path is relative.
3845     INSTALL=$ac_install_sh
3846   fi
3847 fi
3848 echo "$as_me:3848: result: $INSTALL" >&5
3849 echo "${ECHO_T}$INSTALL" >&6
3850
3851 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3852 # It thinks the first close brace ends the variable substitution.
3853 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3854
3855 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3856
3857 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3858
3859 case $INSTALL in
3860 (/*)
3861         ;;
3862 (*)
3863         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3864         test -z "$cf_dir" && cf_dir=.
3865         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3866         ;;
3867 esac
3868
3869 for ac_prog in lint cppcheck splint
3870 do
3871   # Extract the first word of "$ac_prog", so it can be a program name with args.
3872 set dummy $ac_prog; ac_word=$2
3873 echo "$as_me:3873: checking for $ac_word" >&5
3874 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3875 if test "${ac_cv_prog_LINT+set}" = set; then
3876   echo $ECHO_N "(cached) $ECHO_C" >&6
3877 else
3878   if test -n "$LINT"; then
3879   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3880 else
3881   ac_save_IFS=$IFS; IFS=$ac_path_separator
3882 ac_dummy="$PATH"
3883 for ac_dir in $ac_dummy; do
3884   IFS=$ac_save_IFS
3885   test -z "$ac_dir" && ac_dir=.
3886   $as_executable_p "$ac_dir/$ac_word" || continue
3887 ac_cv_prog_LINT="$ac_prog"
3888 echo "$as_me:3888: found $ac_dir/$ac_word" >&5
3889 break
3890 done
3891
3892 fi
3893 fi
3894 LINT=$ac_cv_prog_LINT
3895 if test -n "$LINT"; then
3896   echo "$as_me:3896: result: $LINT" >&5
3897 echo "${ECHO_T}$LINT" >&6
3898 else
3899   echo "$as_me:3899: result: no" >&5
3900 echo "${ECHO_T}no" >&6
3901 fi
3902
3903   test -n "$LINT" && break
3904 done
3905
3906 case "x$LINT" in
3907 (xcppcheck|x*/cppcheck)
3908         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3909         ;;
3910 esac
3911
3912 echo "$as_me:3912: checking whether ln -s works" >&5
3913 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3914 LN_S=$as_ln_s
3915 if test "$LN_S" = "ln -s"; then
3916   echo "$as_me:3916: result: yes" >&5
3917 echo "${ECHO_T}yes" >&6
3918 else
3919   echo "$as_me:3919: result: no, using $LN_S" >&5
3920 echo "${ECHO_T}no, using $LN_S" >&6
3921 fi
3922
3923 echo "$as_me:3923: checking if $LN_S -f options work" >&5
3924 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3925
3926 rm -f conf$$.src conf$$dst
3927 echo >conf$$.dst
3928 echo first >conf$$.src
3929 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3930         cf_prog_ln_sf=yes
3931 else
3932         cf_prog_ln_sf=no
3933 fi
3934 rm -f conf$$.dst conf$$src
3935 echo "$as_me:3935: result: $cf_prog_ln_sf" >&5
3936 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3937
3938 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3939
3940 echo "$as_me:3940: checking for long file names" >&5
3941 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3942 if test "${ac_cv_sys_long_file_names+set}" = set; then
3943   echo $ECHO_N "(cached) $ECHO_C" >&6
3944 else
3945   ac_cv_sys_long_file_names=yes
3946 # Test for long file names in all the places we know might matter:
3947 #      .                the current directory, where building will happen
3948 #      $prefix/lib      where we will be installing things
3949 #      $exec_prefix/lib likewise
3950 # eval it to expand exec_prefix.
3951 #      $TMPDIR          if set, where it might want to write temporary files
3952 # if $TMPDIR is not set:
3953 #      /tmp             where it might want to write temporary files
3954 #      /var/tmp         likewise
3955 #      /usr/tmp         likewise
3956 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3957   ac_tmpdirs=$TMPDIR
3958 else
3959   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3960 fi
3961 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3962   test -d "$ac_dir" || continue
3963   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3964   ac_xdir=$ac_dir/cf$$
3965   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3966   ac_tf1=$ac_xdir/conftest9012345
3967   ac_tf2=$ac_xdir/conftest9012346
3968   (echo 1 >"$ac_tf1") 2>/dev/null
3969   (echo 2 >"$ac_tf2") 2>/dev/null
3970   ac_val=`cat "$ac_tf1" 2>/dev/null`
3971   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3972     ac_cv_sys_long_file_names=no
3973     rm -rf "$ac_xdir" 2>/dev/null
3974     break
3975   fi
3976   rm -rf "$ac_xdir" 2>/dev/null
3977 done
3978 fi
3979 echo "$as_me:3979: result: $ac_cv_sys_long_file_names" >&5
3980 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3981 if test "$ac_cv_sys_long_file_names" = yes; then
3982
3983 cat >>confdefs.h <<\EOF
3984 #define HAVE_LONG_FILE_NAMES 1
3985 EOF
3986
3987 fi
3988
3989 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3990 # of package conflict.
3991 cf_config_suffix=
3992
3993 # Check whether --with-config-suffix or --without-config-suffix was given.
3994 if test "${with_config_suffix+set}" = set; then
3995   withval="$with_config_suffix"
3996   case "x$withval" in
3997         (xyes|xno)
3998                 { echo "$as_me:3998: WARNING: expected a value for config-suffix option" >&5
3999 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
4000                 ;;
4001         (*)     cf_config_suffix="$withval"
4002                 ;;
4003         esac
4004 fi;
4005
4006 # If we find pkg-config, check if we should install the ".pc" files.
4007
4008 echo "$as_me:4008: checking if you want to use pkg-config" >&5
4009 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4010
4011 # Check whether --with-pkg-config or --without-pkg-config was given.
4012 if test "${with_pkg_config+set}" = set; then
4013   withval="$with_pkg_config"
4014   cf_pkg_config=$withval
4015 else
4016   cf_pkg_config=yes
4017 fi;
4018 echo "$as_me:4018: result: $cf_pkg_config" >&5
4019 echo "${ECHO_T}$cf_pkg_config" >&6
4020
4021 case "$cf_pkg_config" in
4022 (no)
4023         PKG_CONFIG=none
4024         ;;
4025 (yes)
4026
4027 if test -n "$ac_tool_prefix"; then
4028   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4029 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4030 echo "$as_me:4030: checking for $ac_word" >&5
4031 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4032 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4033   echo $ECHO_N "(cached) $ECHO_C" >&6
4034 else
4035   case $PKG_CONFIG in
4036   [\\/]* | ?:[\\/]*)
4037   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4038   ;;
4039   *)
4040   ac_save_IFS=$IFS; IFS=$ac_path_separator
4041 ac_dummy="$PATH"
4042 for ac_dir in $ac_dummy; do
4043   IFS=$ac_save_IFS
4044   test -z "$ac_dir" && ac_dir=.
4045   if $as_executable_p "$ac_dir/$ac_word"; then
4046    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4047    echo "$as_me:4047: found $ac_dir/$ac_word" >&5
4048    break
4049 fi
4050 done
4051
4052   ;;
4053 esac
4054 fi
4055 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4056
4057 if test -n "$PKG_CONFIG"; then
4058   echo "$as_me:4058: result: $PKG_CONFIG" >&5
4059 echo "${ECHO_T}$PKG_CONFIG" >&6
4060 else
4061   echo "$as_me:4061: result: no" >&5
4062 echo "${ECHO_T}no" >&6
4063 fi
4064
4065 fi
4066 if test -z "$ac_cv_path_PKG_CONFIG"; then
4067   ac_pt_PKG_CONFIG=$PKG_CONFIG
4068   # Extract the first word of "pkg-config", so it can be a program name with args.
4069 set dummy pkg-config; ac_word=$2
4070 echo "$as_me:4070: checking for $ac_word" >&5
4071 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4072 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4073   echo $ECHO_N "(cached) $ECHO_C" >&6
4074 else
4075   case $ac_pt_PKG_CONFIG in
4076   [\\/]* | ?:[\\/]*)
4077   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4078   ;;
4079   *)
4080   ac_save_IFS=$IFS; IFS=$ac_path_separator
4081 ac_dummy="$PATH"
4082 for ac_dir in $ac_dummy; do
4083   IFS=$ac_save_IFS
4084   test -z "$ac_dir" && ac_dir=.
4085   if $as_executable_p "$ac_dir/$ac_word"; then
4086    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4087    echo "$as_me:4087: found $ac_dir/$ac_word" >&5
4088    break
4089 fi
4090 done
4091
4092   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4093   ;;
4094 esac
4095 fi
4096 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4097
4098 if test -n "$ac_pt_PKG_CONFIG"; then
4099   echo "$as_me:4099: result: $ac_pt_PKG_CONFIG" >&5
4100 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4101 else
4102   echo "$as_me:4102: result: no" >&5
4103 echo "${ECHO_T}no" >&6
4104 fi
4105
4106   PKG_CONFIG=$ac_pt_PKG_CONFIG
4107 else
4108   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4109 fi
4110
4111         ;;
4112 (*)
4113         PKG_CONFIG=$withval
4114         ;;
4115 esac
4116
4117 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4118 if test "$PKG_CONFIG" != none ; then
4119
4120 if test "x$prefix" != xNONE; then
4121         cf_path_syntax="$prefix"
4122 else
4123         cf_path_syntax="$ac_default_prefix"
4124 fi
4125
4126 case ".$PKG_CONFIG" in
4127 (.\$\(*\)*|.\'*\'*)
4128         ;;
4129 (..|./*|.\\*)
4130         ;;
4131 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4132         ;;
4133 (.\$\{*prefix\}*|.\$\{*dir\}*)
4134         eval PKG_CONFIG="$PKG_CONFIG"
4135         case ".$PKG_CONFIG" in
4136         (.NONE/*)
4137                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4138                 ;;
4139         esac
4140         ;;
4141 (.no|.NONE/*)
4142         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4143         ;;
4144 (*)
4145         { { echo "$as_me:4145: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4146 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4147    { (exit 1); exit 1; }; }
4148         ;;
4149 esac
4150
4151 elif test "x$cf_pkg_config" != xno ; then
4152         { echo "$as_me:4152: WARNING: pkg-config is not installed" >&5
4153 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4154 fi
4155
4156 case "$PKG_CONFIG" in
4157 (no|none|yes)
4158         echo "$as_me:4158: checking for pkg-config library directory" >&5
4159 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4160         ;;
4161 (*)
4162         echo "$as_me:4162: checking for $PKG_CONFIG library directory" >&5
4163 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4164         ;;
4165 esac
4166
4167 # if $PKG_CONFIG_LIBDIR is set, try to use that
4168 if test -n "$PKG_CONFIG_PATH"; then
4169         cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[     ]*,,' -e 's,[   ]*$,,'`
4170 elif test -n "$PKG_CONFIG_LIBDIR"; then
4171         cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,' -e 's,[   ]*$,,'`
4172 else
4173         cf_search_path=auto
4174 fi
4175
4176 # if the option is used, let that override.  otherwise default to "libdir"
4177
4178 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4179 if test "${with_pkg_config_libdir+set}" = set; then
4180   withval="$with_pkg_config_libdir"
4181   cf_search_path=$withval
4182 else
4183   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4184 fi;
4185
4186 case "x$cf_search_path" in
4187 (xlibdir)
4188         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4189         echo "$as_me:4189: result: $PKG_CONFIG_LIBDIR" >&5
4190 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4191         cf_search_path=
4192         ;;
4193 (x)
4194         ;;
4195 (x/*\ *)
4196         PKG_CONFIG_LIBDIR=
4197         ;;
4198 (x/*)
4199         PKG_CONFIG_LIBDIR="$cf_search_path"
4200         echo "$as_me:4200: result: $PKG_CONFIG_LIBDIR" >&5
4201 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4202         cf_search_path=
4203         ;;
4204 (xyes|xauto)
4205         echo "$as_me:4205: result: auto" >&5
4206 echo "${ECHO_T}auto" >&6
4207         cf_search_path=
4208         # Look for the library directory using the same prefix as the executable
4209         echo "$as_me:4209: checking for search-list" >&5
4210 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4211         if test "x$PKG_CONFIG" != xnone
4212         then
4213                 # works for pkg-config since version 0.24 (2009)
4214                 # works for pkgconf since version 0.8.3 (2012)
4215                 for cf_pkg_program in \
4216                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4217                         pkg-config \
4218                         pkgconf
4219                 do
4220                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4221                         test -n "$cf_search_path" && break
4222                 done
4223
4224                 # works for pkg-config since import in 2005 of original 2001 HP code.
4225                 test -z "$cf_search_path" && \
4226                 cf_search_path=`
4227                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4228 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4229         sub(\"^[^']*'\",\"\"); \
4230         sub(\"'.*\",\"\"); \
4231         printf \" %s\", \\$0; } \
4232 { next; } \
4233 "`
4234         fi
4235
4236         echo "$as_me:4236: result: $cf_search_path" >&5
4237 echo "${ECHO_T}$cf_search_path" >&6
4238         ;;
4239 (*)
4240         { { echo "$as_me:4240: error: Unexpected option value: $cf_search_path" >&5
4241 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4242    { (exit 1); exit 1; }; }
4243         ;;
4244 esac
4245
4246 if test -n "$cf_search_path"
4247 then
4248         echo "$as_me:4248: checking for first directory" >&5
4249 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4250         cf_pkg_config_path=none
4251         for cf_config in $cf_search_path
4252         do
4253                 if test -d "$cf_config"
4254                 then
4255                         cf_pkg_config_path=$cf_config
4256                         break
4257                 fi
4258         done
4259         echo "$as_me:4259: result: $cf_pkg_config_path" >&5
4260 echo "${ECHO_T}$cf_pkg_config_path" >&6
4261
4262         if test "x$cf_pkg_config_path" != xnone ; then
4263                 # limit this to the first directory found
4264                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4265         fi
4266
4267         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4268         then
4269                 echo "$as_me:4269: checking for workaround" >&5
4270 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4271                 if test "$prefix" = "NONE" ; then
4272                         cf_prefix="$ac_default_prefix"
4273                 else
4274                         cf_prefix="$prefix"
4275                 fi
4276                 eval cf_libdir=$libdir
4277                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4278                 cf_backup=
4279                 for cf_config in $cf_search_path
4280                 do
4281                         case $cf_config in
4282                         $cf_libdir/pkgconfig)
4283                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4284                                 break
4285                                 ;;
4286                         *)
4287                                 test -z "$cf_backup" && cf_backup=$cf_config
4288                                 ;;
4289                         esac
4290                 done
4291                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4292                 echo "$as_me:4292: result: $PKG_CONFIG_LIBDIR" >&5
4293 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4294         fi
4295 fi
4296
4297 if test "x$PKG_CONFIG" != xnone
4298 then
4299         echo "$as_me:4299: checking if we should install .pc files for $PKG_CONFIG" >&5
4300 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4301 else
4302         echo "$as_me:4302: checking if we should install .pc files" >&5
4303 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4304 fi
4305
4306 # Check whether --enable-pc-files or --disable-pc-files was given.
4307 if test "${enable_pc_files+set}" = set; then
4308   enableval="$enable_pc_files"
4309   enable_pc_files=$enableval
4310 else
4311   enable_pc_files=no
4312 fi;
4313 echo "$as_me:4313: result: $enable_pc_files" >&5
4314 echo "${ECHO_T}$enable_pc_files" >&6
4315
4316 if test "x$enable_pc_files" != xno
4317 then
4318         MAKE_PC_FILES=
4319         case "x$PKG_CONFIG_LIBDIR" in
4320         (xno|xnone|xyes|x)
4321                 { echo "$as_me:4321: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4322 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4323                 ;;
4324         (*)
4325                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4326
4327 if test "x$prefix" != xNONE; then
4328         cf_path_syntax="$prefix"
4329 else
4330         cf_path_syntax="$ac_default_prefix"
4331 fi
4332
4333 case ".$cf_pkg_config_libdir" in
4334 (.\$\(*\)*|.\'*\'*)
4335         ;;
4336 (..|./*|.\\*)
4337         ;;
4338 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4339         ;;
4340 (.\$\{*prefix\}*|.\$\{*dir\}*)
4341         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4342         case ".$cf_pkg_config_libdir" in
4343         (.NONE/*)
4344                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4345                 ;;
4346         esac
4347         ;;
4348 (.no|.NONE/*)
4349         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4350         ;;
4351 (*)
4352         { { echo "$as_me:4352: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4353 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4354    { (exit 1); exit 1; }; }
4355         ;;
4356 esac
4357
4358                 ;;
4359         esac
4360 else
4361         MAKE_PC_FILES="#"
4362 fi
4363
4364 if test -z "$MAKE_PC_FILES"
4365 then
4366         echo "$as_me:4366: checking for suffix to add to pc-files" >&5
4367 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4368
4369 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4370 if test "${with_pc_suffix+set}" = set; then
4371   withval="$with_pc_suffix"
4372   case "x$withval" in
4373         (xyes|xno)
4374                 PC_MODULE_SUFFIX=
4375                 ;;
4376         (*)     PC_MODULE_SUFFIX="$withval"
4377                 ;;
4378         esac
4379 fi;
4380         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4381         echo "$as_me:4381: result: $PC_MODULE_SUFFIX" >&5
4382 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4383         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4384
4385 fi
4386
4387 echo "$as_me:4387: checking if we should assume mixed-case filenames" >&5
4388 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4389
4390 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4391 if test "${enable_mixed_case+set}" = set; then
4392   enableval="$enable_mixed_case"
4393   enable_mixedcase=$enableval
4394 else
4395   enable_mixedcase=auto
4396 fi;
4397 echo "$as_me:4397: result: $enable_mixedcase" >&5
4398 echo "${ECHO_T}$enable_mixedcase" >&6
4399 if test "$enable_mixedcase" = "auto" ; then
4400
4401 echo "$as_me:4401: checking if filesystem supports mixed-case filenames" >&5
4402 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4403 if test "${cf_cv_mixedcase+set}" = set; then
4404   echo $ECHO_N "(cached) $ECHO_C" >&6
4405 else
4406
4407 if test "$cross_compiling" = yes ; then
4408         case "$target_alias" in
4409         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4410                 cf_cv_mixedcase=no
4411                 ;;
4412         (*)
4413                 cf_cv_mixedcase=yes
4414                 ;;
4415         esac
4416 else
4417         rm -f conftest CONFTEST
4418         echo test >conftest
4419         if test -f CONFTEST ; then
4420                 cf_cv_mixedcase=no
4421         else
4422                 cf_cv_mixedcase=yes
4423         fi
4424         rm -f conftest CONFTEST
4425 fi
4426
4427 fi
4428 echo "$as_me:4428: result: $cf_cv_mixedcase" >&5
4429 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4430 test "$cf_cv_mixedcase" = yes &&
4431 cat >>confdefs.h <<\EOF
4432 #define MIXEDCASE_FILENAMES 1
4433 EOF
4434
4435 else
4436         cf_cv_mixedcase=$enable_mixedcase
4437         if test "x$enable_mixedcase" = "xyes" ; then
4438
4439 cat >>confdefs.h <<\EOF
4440 #define MIXEDCASE_FILENAMES 1
4441 EOF
4442
4443         fi
4444 fi
4445
4446 # do this after mixed-case option (tags/TAGS is not as important as tic).
4447 echo "$as_me:4447: checking whether ${MAKE-make} sets \${MAKE}" >&5
4448 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4449 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4450 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4451   echo $ECHO_N "(cached) $ECHO_C" >&6
4452 else
4453   cat >conftest.make <<\EOF
4454 all:
4455         @echo 'ac_maketemp="${MAKE}"'
4456 EOF
4457 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4458 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4459 if test -n "$ac_maketemp"; then
4460   eval ac_cv_prog_make_${ac_make}_set=yes
4461 else
4462   eval ac_cv_prog_make_${ac_make}_set=no
4463 fi
4464 rm -f conftest.make
4465 fi
4466 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4467   echo "$as_me:4467: result: yes" >&5
4468 echo "${ECHO_T}yes" >&6
4469   SET_MAKE=
4470 else
4471   echo "$as_me:4471: result: no" >&5
4472 echo "${ECHO_T}no" >&6
4473   SET_MAKE="MAKE=${MAKE-make}"
4474 fi
4475
4476 echo "$as_me:4476: checking for \".PHONY\" make-support" >&5
4477 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4478 if test "${cf_cv_make_PHONY+set}" = set; then
4479   echo $ECHO_N "(cached) $ECHO_C" >&6
4480 else
4481
4482         rm -rf conftest*
4483         (
4484                 mkdir conftest || exit 1
4485                 cd conftest
4486                 cat >makefile <<'CF_EOF'
4487 .PHONY: always
4488 DATA=0
4489 always: always.out
4490         @echo "** making $@ $(DATA)"
4491 once: once.out
4492         @echo "** making $@ $(DATA)"
4493 always.out:
4494         @echo "** making $@ $(DATA)"
4495         echo $(DATA) > $@
4496 once.out:
4497         @echo "** making $@ $(DATA)"
4498         echo $(DATA) > $@
4499 CF_EOF
4500                 for cf_data in 1 2 3
4501                 do
4502                         ${MAKE:-make} always DATA=$cf_data
4503                         ${MAKE:-make} once   DATA=$cf_data
4504                         ${MAKE:-make} -t always once
4505                         if test -f always ; then
4506                                 echo "no (case 1)" > ../conftest.tmp
4507                         elif test ! -f always.out ; then
4508                                 echo "no (case 2)" > ../conftest.tmp
4509                         elif test ! -f once.out ; then
4510                                 echo "no (case 3)" > ../conftest.tmp
4511                         elif ! cmp -s always.out once.out ; then
4512                                 echo "no (case 4)" > ../conftest.tmp
4513                                 diff always.out once.out
4514                         else
4515                                 cf_check="`cat always.out`"
4516                                 if test "x$cf_check" != "x$cf_data" ; then
4517                                         echo "no (case 5)" > ../conftest.tmp
4518                                 else
4519                                         echo yes > ../conftest.tmp
4520                                         rm -f ./*.out
4521                                         continue
4522                                 fi
4523                         fi
4524                         break
4525                 done
4526         ) >&5 2>&1
4527         cf_cv_make_PHONY="`cat conftest.tmp`"
4528         rm -rf conftest*
4529
4530 fi
4531 echo "$as_me:4531: result: $cf_cv_make_PHONY" >&5
4532 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4533 MAKE_NO_PHONY="#"
4534 MAKE_PHONY="#"
4535 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4536 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4537
4538 for ac_prog in exctags ctags
4539 do
4540   # Extract the first word of "$ac_prog", so it can be a program name with args.
4541 set dummy $ac_prog; ac_word=$2
4542 echo "$as_me:4542: checking for $ac_word" >&5
4543 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4544 if test "${ac_cv_prog_CTAGS+set}" = set; then
4545   echo $ECHO_N "(cached) $ECHO_C" >&6
4546 else
4547   if test -n "$CTAGS"; then
4548   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4549 else
4550   ac_save_IFS=$IFS; IFS=$ac_path_separator
4551 ac_dummy="$PATH"
4552 for ac_dir in $ac_dummy; do
4553   IFS=$ac_save_IFS
4554   test -z "$ac_dir" && ac_dir=.
4555   $as_executable_p "$ac_dir/$ac_word" || continue
4556 ac_cv_prog_CTAGS="$ac_prog"
4557 echo "$as_me:4557: found $ac_dir/$ac_word" >&5
4558 break
4559 done
4560
4561 fi
4562 fi
4563 CTAGS=$ac_cv_prog_CTAGS
4564 if test -n "$CTAGS"; then
4565   echo "$as_me:4565: result: $CTAGS" >&5
4566 echo "${ECHO_T}$CTAGS" >&6
4567 else
4568   echo "$as_me:4568: result: no" >&5
4569 echo "${ECHO_T}no" >&6
4570 fi
4571
4572   test -n "$CTAGS" && break
4573 done
4574
4575 for ac_prog in exetags etags
4576 do
4577   # Extract the first word of "$ac_prog", so it can be a program name with args.
4578 set dummy $ac_prog; ac_word=$2
4579 echo "$as_me:4579: checking for $ac_word" >&5
4580 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4581 if test "${ac_cv_prog_ETAGS+set}" = set; then
4582   echo $ECHO_N "(cached) $ECHO_C" >&6
4583 else
4584   if test -n "$ETAGS"; then
4585   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4586 else
4587   ac_save_IFS=$IFS; IFS=$ac_path_separator
4588 ac_dummy="$PATH"
4589 for ac_dir in $ac_dummy; do
4590   IFS=$ac_save_IFS
4591   test -z "$ac_dir" && ac_dir=.
4592   $as_executable_p "$ac_dir/$ac_word" || continue
4593 ac_cv_prog_ETAGS="$ac_prog"
4594 echo "$as_me:4594: found $ac_dir/$ac_word" >&5
4595 break
4596 done
4597
4598 fi
4599 fi
4600 ETAGS=$ac_cv_prog_ETAGS
4601 if test -n "$ETAGS"; then
4602   echo "$as_me:4602: result: $ETAGS" >&5
4603 echo "${ECHO_T}$ETAGS" >&6
4604 else
4605   echo "$as_me:4605: result: no" >&5
4606 echo "${ECHO_T}no" >&6
4607 fi
4608
4609   test -n "$ETAGS" && break
4610 done
4611
4612 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4613 set dummy ${CTAGS:-ctags}; ac_word=$2
4614 echo "$as_me:4614: checking for $ac_word" >&5
4615 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4616 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4617   echo $ECHO_N "(cached) $ECHO_C" >&6
4618 else
4619   if test -n "$MAKE_LOWER_TAGS"; then
4620   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4621 else
4622   ac_save_IFS=$IFS; IFS=$ac_path_separator
4623 ac_dummy="$PATH"
4624 for ac_dir in $ac_dummy; do
4625   IFS=$ac_save_IFS
4626   test -z "$ac_dir" && ac_dir=.
4627   $as_executable_p "$ac_dir/$ac_word" || continue
4628 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4629 echo "$as_me:4629: found $ac_dir/$ac_word" >&5
4630 break
4631 done
4632
4633   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4634 fi
4635 fi
4636 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4637 if test -n "$MAKE_LOWER_TAGS"; then
4638   echo "$as_me:4638: result: $MAKE_LOWER_TAGS" >&5
4639 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4640 else
4641   echo "$as_me:4641: result: no" >&5
4642 echo "${ECHO_T}no" >&6
4643 fi
4644
4645 if test "$cf_cv_mixedcase" = yes ; then
4646         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4647 set dummy ${ETAGS:-etags}; ac_word=$2
4648 echo "$as_me:4648: checking for $ac_word" >&5
4649 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4650 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4651   echo $ECHO_N "(cached) $ECHO_C" >&6
4652 else
4653   if test -n "$MAKE_UPPER_TAGS"; then
4654   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4655 else
4656   ac_save_IFS=$IFS; IFS=$ac_path_separator
4657 ac_dummy="$PATH"
4658 for ac_dir in $ac_dummy; do
4659   IFS=$ac_save_IFS
4660   test -z "$ac_dir" && ac_dir=.
4661   $as_executable_p "$ac_dir/$ac_word" || continue
4662 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4663 echo "$as_me:4663: found $ac_dir/$ac_word" >&5
4664 break
4665 done
4666
4667   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4668 fi
4669 fi
4670 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4671 if test -n "$MAKE_UPPER_TAGS"; then
4672   echo "$as_me:4672: result: $MAKE_UPPER_TAGS" >&5
4673 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4674 else
4675   echo "$as_me:4675: result: no" >&5
4676 echo "${ECHO_T}no" >&6
4677 fi
4678
4679 else
4680         MAKE_UPPER_TAGS=no
4681 fi
4682
4683 if test "$MAKE_UPPER_TAGS" = yes ; then
4684         MAKE_UPPER_TAGS=
4685 else
4686         MAKE_UPPER_TAGS="#"
4687 fi
4688
4689 if test "$MAKE_LOWER_TAGS" = yes ; then
4690         MAKE_LOWER_TAGS=
4691 else
4692         MAKE_LOWER_TAGS="#"
4693 fi
4694
4695 echo "$as_me:4695: checking for makeflags variable" >&5
4696 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4697 if test "${cf_cv_makeflags+set}" = set; then
4698   echo $ECHO_N "(cached) $ECHO_C" >&6
4699 else
4700
4701         cf_cv_makeflags=''
4702         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4703         do
4704                 cat >cf_makeflags.tmp <<CF_EOF
4705 SHELL = $SHELL
4706 all :
4707         @ echo '.$cf_option'
4708 CF_EOF
4709                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4710                 case "$cf_result" in
4711                 (.*k|.*kw)
4712                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4713                         case "$cf_result" in
4714                         (.*CC=*)        cf_cv_makeflags=
4715                                 ;;
4716                         (*)     cf_cv_makeflags=$cf_option
4717                                 ;;
4718                         esac
4719                         break
4720                         ;;
4721                 (.-)
4722                         ;;
4723                 (*)
4724
4725 echo "${as_me:-configure}:4725: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4726
4727                         ;;
4728                 esac
4729         done
4730         rm -f cf_makeflags.tmp
4731
4732 fi
4733 echo "$as_me:4733: result: $cf_cv_makeflags" >&5
4734 echo "${ECHO_T}$cf_cv_makeflags" >&6
4735
4736 if test -n "$ac_tool_prefix"; then
4737   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4738 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4739 echo "$as_me:4739: checking for $ac_word" >&5
4740 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4741 if test "${ac_cv_prog_RANLIB+set}" = set; then
4742   echo $ECHO_N "(cached) $ECHO_C" >&6
4743 else
4744   if test -n "$RANLIB"; then
4745   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4746 else
4747   ac_save_IFS=$IFS; IFS=$ac_path_separator
4748 ac_dummy="$PATH"
4749 for ac_dir in $ac_dummy; do
4750   IFS=$ac_save_IFS
4751   test -z "$ac_dir" && ac_dir=.
4752   $as_executable_p "$ac_dir/$ac_word" || continue
4753 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4754 echo "$as_me:4754: found $ac_dir/$ac_word" >&5
4755 break
4756 done
4757
4758 fi
4759 fi
4760 RANLIB=$ac_cv_prog_RANLIB
4761 if test -n "$RANLIB"; then
4762   echo "$as_me:4762: result: $RANLIB" >&5
4763 echo "${ECHO_T}$RANLIB" >&6
4764 else
4765   echo "$as_me:4765: result: no" >&5
4766 echo "${ECHO_T}no" >&6
4767 fi
4768
4769 fi
4770 if test -z "$ac_cv_prog_RANLIB"; then
4771   ac_ct_RANLIB=$RANLIB
4772   # Extract the first word of "ranlib", so it can be a program name with args.
4773 set dummy ranlib; ac_word=$2
4774 echo "$as_me:4774: checking for $ac_word" >&5
4775 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4776 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4777   echo $ECHO_N "(cached) $ECHO_C" >&6
4778 else
4779   if test -n "$ac_ct_RANLIB"; then
4780   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4781 else
4782   ac_save_IFS=$IFS; IFS=$ac_path_separator
4783 ac_dummy="$PATH"
4784 for ac_dir in $ac_dummy; do
4785   IFS=$ac_save_IFS
4786   test -z "$ac_dir" && ac_dir=.
4787   $as_executable_p "$ac_dir/$ac_word" || continue
4788 ac_cv_prog_ac_ct_RANLIB="ranlib"
4789 echo "$as_me:4789: found $ac_dir/$ac_word" >&5
4790 break
4791 done
4792
4793   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4794 fi
4795 fi
4796 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4797 if test -n "$ac_ct_RANLIB"; then
4798   echo "$as_me:4798: result: $ac_ct_RANLIB" >&5
4799 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4800 else
4801   echo "$as_me:4801: result: no" >&5
4802 echo "${ECHO_T}no" >&6
4803 fi
4804
4805   RANLIB=$ac_ct_RANLIB
4806 else
4807   RANLIB="$ac_cv_prog_RANLIB"
4808 fi
4809
4810 if test -n "$ac_tool_prefix"; then
4811   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4812 set dummy ${ac_tool_prefix}ld; ac_word=$2
4813 echo "$as_me:4813: checking for $ac_word" >&5
4814 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4815 if test "${ac_cv_prog_LD+set}" = set; then
4816   echo $ECHO_N "(cached) $ECHO_C" >&6
4817 else
4818   if test -n "$LD"; then
4819   ac_cv_prog_LD="$LD" # Let the user override the test.
4820 else
4821   ac_save_IFS=$IFS; IFS=$ac_path_separator
4822 ac_dummy="$PATH"
4823 for ac_dir in $ac_dummy; do
4824   IFS=$ac_save_IFS
4825   test -z "$ac_dir" && ac_dir=.
4826   $as_executable_p "$ac_dir/$ac_word" || continue
4827 ac_cv_prog_LD="${ac_tool_prefix}ld"
4828 echo "$as_me:4828: found $ac_dir/$ac_word" >&5
4829 break
4830 done
4831
4832 fi
4833 fi
4834 LD=$ac_cv_prog_LD
4835 if test -n "$LD"; then
4836   echo "$as_me:4836: result: $LD" >&5
4837 echo "${ECHO_T}$LD" >&6
4838 else
4839   echo "$as_me:4839: result: no" >&5
4840 echo "${ECHO_T}no" >&6
4841 fi
4842
4843 fi
4844 if test -z "$ac_cv_prog_LD"; then
4845   ac_ct_LD=$LD
4846   # Extract the first word of "ld", so it can be a program name with args.
4847 set dummy ld; ac_word=$2
4848 echo "$as_me:4848: checking for $ac_word" >&5
4849 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4850 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4851   echo $ECHO_N "(cached) $ECHO_C" >&6
4852 else
4853   if test -n "$ac_ct_LD"; then
4854   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4855 else
4856   ac_save_IFS=$IFS; IFS=$ac_path_separator
4857 ac_dummy="$PATH"
4858 for ac_dir in $ac_dummy; do
4859   IFS=$ac_save_IFS
4860   test -z "$ac_dir" && ac_dir=.
4861   $as_executable_p "$ac_dir/$ac_word" || continue
4862 ac_cv_prog_ac_ct_LD="ld"
4863 echo "$as_me:4863: found $ac_dir/$ac_word" >&5
4864 break
4865 done
4866
4867   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4868 fi
4869 fi
4870 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4871 if test -n "$ac_ct_LD"; then
4872   echo "$as_me:4872: result: $ac_ct_LD" >&5
4873 echo "${ECHO_T}$ac_ct_LD" >&6
4874 else
4875   echo "$as_me:4875: result: no" >&5
4876 echo "${ECHO_T}no" >&6
4877 fi
4878
4879   LD=$ac_ct_LD
4880 else
4881   LD="$ac_cv_prog_LD"
4882 fi
4883
4884 if test -n "$ac_tool_prefix"; then
4885   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4886 set dummy ${ac_tool_prefix}ar; ac_word=$2
4887 echo "$as_me:4887: checking for $ac_word" >&5
4888 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4889 if test "${ac_cv_prog_AR+set}" = set; then
4890   echo $ECHO_N "(cached) $ECHO_C" >&6
4891 else
4892   if test -n "$AR"; then
4893   ac_cv_prog_AR="$AR" # Let the user override the test.
4894 else
4895   ac_save_IFS=$IFS; IFS=$ac_path_separator
4896 ac_dummy="$PATH"
4897 for ac_dir in $ac_dummy; do
4898   IFS=$ac_save_IFS
4899   test -z "$ac_dir" && ac_dir=.
4900   $as_executable_p "$ac_dir/$ac_word" || continue
4901 ac_cv_prog_AR="${ac_tool_prefix}ar"
4902 echo "$as_me:4902: found $ac_dir/$ac_word" >&5
4903 break
4904 done
4905
4906 fi
4907 fi
4908 AR=$ac_cv_prog_AR
4909 if test -n "$AR"; then
4910   echo "$as_me:4910: result: $AR" >&5
4911 echo "${ECHO_T}$AR" >&6
4912 else
4913   echo "$as_me:4913: result: no" >&5
4914 echo "${ECHO_T}no" >&6
4915 fi
4916
4917 fi
4918 if test -z "$ac_cv_prog_AR"; then
4919   ac_ct_AR=$AR
4920   # Extract the first word of "ar", so it can be a program name with args.
4921 set dummy ar; ac_word=$2
4922 echo "$as_me:4922: checking for $ac_word" >&5
4923 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4924 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4925   echo $ECHO_N "(cached) $ECHO_C" >&6
4926 else
4927   if test -n "$ac_ct_AR"; then
4928   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4929 else
4930   ac_save_IFS=$IFS; IFS=$ac_path_separator
4931 ac_dummy="$PATH"
4932 for ac_dir in $ac_dummy; do
4933   IFS=$ac_save_IFS
4934   test -z "$ac_dir" && ac_dir=.
4935   $as_executable_p "$ac_dir/$ac_word" || continue
4936 ac_cv_prog_ac_ct_AR="ar"
4937 echo "$as_me:4937: found $ac_dir/$ac_word" >&5
4938 break
4939 done
4940
4941   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4942 fi
4943 fi
4944 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4945 if test -n "$ac_ct_AR"; then
4946   echo "$as_me:4946: result: $ac_ct_AR" >&5
4947 echo "${ECHO_T}$ac_ct_AR" >&6
4948 else
4949   echo "$as_me:4949: result: no" >&5
4950 echo "${ECHO_T}no" >&6
4951 fi
4952
4953   AR=$ac_ct_AR
4954 else
4955   AR="$ac_cv_prog_AR"
4956 fi
4957
4958 if test -n "$ac_tool_prefix"; then
4959   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4960 set dummy ${ac_tool_prefix}nm; ac_word=$2
4961 echo "$as_me:4961: checking for $ac_word" >&5
4962 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4963 if test "${ac_cv_prog_NM+set}" = set; then
4964   echo $ECHO_N "(cached) $ECHO_C" >&6
4965 else
4966   if test -n "$NM"; then
4967   ac_cv_prog_NM="$NM" # Let the user override the test.
4968 else
4969   ac_save_IFS=$IFS; IFS=$ac_path_separator
4970 ac_dummy="$PATH"
4971 for ac_dir in $ac_dummy; do
4972   IFS=$ac_save_IFS
4973   test -z "$ac_dir" && ac_dir=.
4974   $as_executable_p "$ac_dir/$ac_word" || continue
4975 ac_cv_prog_NM="${ac_tool_prefix}nm"
4976 echo "$as_me:4976: found $ac_dir/$ac_word" >&5
4977 break
4978 done
4979
4980 fi
4981 fi
4982 NM=$ac_cv_prog_NM
4983 if test -n "$NM"; then
4984   echo "$as_me:4984: result: $NM" >&5
4985 echo "${ECHO_T}$NM" >&6
4986 else
4987   echo "$as_me:4987: result: no" >&5
4988 echo "${ECHO_T}no" >&6
4989 fi
4990
4991 fi
4992 if test -z "$ac_cv_prog_NM"; then
4993   ac_ct_NM=$NM
4994   # Extract the first word of "nm", so it can be a program name with args.
4995 set dummy nm; ac_word=$2
4996 echo "$as_me:4996: checking for $ac_word" >&5
4997 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4998 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4999   echo $ECHO_N "(cached) $ECHO_C" >&6
5000 else
5001   if test -n "$ac_ct_NM"; then
5002   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5003 else
5004   ac_save_IFS=$IFS; IFS=$ac_path_separator
5005 ac_dummy="$PATH"
5006 for ac_dir in $ac_dummy; do
5007   IFS=$ac_save_IFS
5008   test -z "$ac_dir" && ac_dir=.
5009   $as_executable_p "$ac_dir/$ac_word" || continue
5010 ac_cv_prog_ac_ct_NM="nm"
5011 echo "$as_me:5011: found $ac_dir/$ac_word" >&5
5012 break
5013 done
5014
5015   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5016 fi
5017 fi
5018 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5019 if test -n "$ac_ct_NM"; then
5020   echo "$as_me:5020: result: $ac_ct_NM" >&5
5021 echo "${ECHO_T}$ac_ct_NM" >&6
5022 else
5023   echo "$as_me:5023: result: no" >&5
5024 echo "${ECHO_T}no" >&6
5025 fi
5026
5027   NM=$ac_ct_NM
5028 else
5029   NM="$ac_cv_prog_NM"
5030 fi
5031
5032 if test -n "$ac_tool_prefix"; then
5033   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5034 set dummy ${ac_tool_prefix}ar; ac_word=$2
5035 echo "$as_me:5035: checking for $ac_word" >&5
5036 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5037 if test "${ac_cv_prog_AR+set}" = set; then
5038   echo $ECHO_N "(cached) $ECHO_C" >&6
5039 else
5040   if test -n "$AR"; then
5041   ac_cv_prog_AR="$AR" # Let the user override the test.
5042 else
5043   ac_save_IFS=$IFS; IFS=$ac_path_separator
5044 ac_dummy="$PATH"
5045 for ac_dir in $ac_dummy; do
5046   IFS=$ac_save_IFS
5047   test -z "$ac_dir" && ac_dir=.
5048   $as_executable_p "$ac_dir/$ac_word" || continue
5049 ac_cv_prog_AR="${ac_tool_prefix}ar"
5050 echo "$as_me:5050: found $ac_dir/$ac_word" >&5
5051 break
5052 done
5053
5054 fi
5055 fi
5056 AR=$ac_cv_prog_AR
5057 if test -n "$AR"; then
5058   echo "$as_me:5058: result: $AR" >&5
5059 echo "${ECHO_T}$AR" >&6
5060 else
5061   echo "$as_me:5061: result: no" >&5
5062 echo "${ECHO_T}no" >&6
5063 fi
5064
5065 fi
5066 if test -z "$ac_cv_prog_AR"; then
5067   ac_ct_AR=$AR
5068   # Extract the first word of "ar", so it can be a program name with args.
5069 set dummy ar; ac_word=$2
5070 echo "$as_me:5070: checking for $ac_word" >&5
5071 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5072 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5073   echo $ECHO_N "(cached) $ECHO_C" >&6
5074 else
5075   if test -n "$ac_ct_AR"; then
5076   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5077 else
5078   ac_save_IFS=$IFS; IFS=$ac_path_separator
5079 ac_dummy="$PATH"
5080 for ac_dir in $ac_dummy; do
5081   IFS=$ac_save_IFS
5082   test -z "$ac_dir" && ac_dir=.
5083   $as_executable_p "$ac_dir/$ac_word" || continue
5084 ac_cv_prog_ac_ct_AR="ar"
5085 echo "$as_me:5085: found $ac_dir/$ac_word" >&5
5086 break
5087 done
5088
5089   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5090 fi
5091 fi
5092 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5093 if test -n "$ac_ct_AR"; then
5094   echo "$as_me:5094: result: $ac_ct_AR" >&5
5095 echo "${ECHO_T}$ac_ct_AR" >&6
5096 else
5097   echo "$as_me:5097: result: no" >&5
5098 echo "${ECHO_T}no" >&6
5099 fi
5100
5101   AR=$ac_ct_AR
5102 else
5103   AR="$ac_cv_prog_AR"
5104 fi
5105
5106 echo "$as_me:5106: checking for options to update archives" >&5
5107 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5108 if test "${cf_cv_ar_flags+set}" = set; then
5109   echo $ECHO_N "(cached) $ECHO_C" >&6
5110 else
5111
5112         case "$cf_cv_system_name" in
5113         (*-msvc*)
5114                 cf_cv_ar_flags=''
5115                 cat >mk_static_lib.sh <<-EOF
5116                 #!$SHELL
5117                 MSVC_BIN="$AR"
5118                 out="\$1"
5119                 shift
5120                 exec \$MSVC_BIN -out:"\$out" \$@
5121                 EOF
5122                 chmod +x mk_static_lib.sh
5123                 AR=`pwd`/mk_static_lib.sh
5124                 ;;
5125         (*)
5126                 cf_cv_ar_flags=unknown
5127                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5128                 do
5129
5130                         # check if $ARFLAGS already contains this choice
5131                         if test "x$ARFLAGS" != "x" ; then
5132                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5133                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5134                                         cf_cv_ar_flags=
5135                                         break
5136                                 fi
5137                         fi
5138
5139                         rm -f "conftest.$ac_cv_objext"
5140                         rm -f conftest.a
5141
5142                         cat >"conftest.$ac_ext" <<EOF
5143 #line 5143 "configure"
5144 int     testdata[3] = { 123, 456, 789 };
5145 EOF
5146                         if { (eval echo "$as_me:5146: \"$ac_compile\"") >&5
5147   (eval $ac_compile) 2>&5
5148   ac_status=$?
5149   echo "$as_me:5149: \$? = $ac_status" >&5
5150   (exit "$ac_status"); } ; then
5151                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5152                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5153                                 if test -f conftest.a ; then
5154                                         cf_cv_ar_flags="$cf_ar_flags"
5155                                         break
5156                                 fi
5157                         else
5158                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5159
5160 echo "${as_me:-configure}:5160: testing cannot compile test-program ..." 1>&5
5161
5162                                 break
5163                         fi
5164                 done
5165                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5166                 ;;
5167         esac
5168
5169 fi
5170 echo "$as_me:5170: result: $cf_cv_ar_flags" >&5
5171 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5172
5173 if test -n "$ARFLAGS" ; then
5174         if test -n "$cf_cv_ar_flags" ; then
5175                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5176         fi
5177 else
5178         ARFLAGS=$cf_cv_ar_flags
5179 fi
5180
5181 echo "$as_me:5181: checking if you have specified an install-prefix" >&5
5182 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5183
5184 # Check whether --with-install-prefix or --without-install-prefix was given.
5185 if test "${with_install_prefix+set}" = set; then
5186   withval="$with_install_prefix"
5187   case "x$withval" in
5188         (xyes|xno)
5189                 ;;
5190         (*)     DESTDIR="$withval"
5191                 ;;
5192         esac
5193 fi;
5194 echo "$as_me:5194: result: $DESTDIR" >&5
5195 echo "${ECHO_T}$DESTDIR" >&6
5196
5197 ###############################################################################
5198
5199 # If we're cross-compiling, allow the user to override the tools and their
5200 # options.  The configure script is oriented toward identifying the host
5201 # compiler, etc., but we need a build compiler to generate parts of the source.
5202
5203 case "$cf_cv_system_name" in
5204 (*-msvc*)
5205         LDFLAGS="$LDFLAGS user32.lib"
5206         export LDFLAGS
5207         ;;
5208 esac
5209
5210 if test "$cross_compiling" = yes ; then
5211
5212         # defaults that we might want to override
5213         : ${BUILD_CFLAGS:=''}
5214         : ${BUILD_CPPFLAGS:=''}
5215         : ${BUILD_LDFLAGS:=''}
5216         : ${BUILD_LIBS:=''}
5217         : ${BUILD_EXEEXT:='$x'}
5218         : ${BUILD_OBJEXT:='o'}
5219
5220 # Check whether --with-build-cc or --without-build-cc was given.
5221 if test "${with_build_cc+set}" = set; then
5222   withval="$with_build_cc"
5223   BUILD_CC="$withval"
5224 else
5225   for ac_prog in gcc clang c99 c89 cc cl
5226 do
5227   # Extract the first word of "$ac_prog", so it can be a program name with args.
5228 set dummy $ac_prog; ac_word=$2
5229 echo "$as_me:5229: checking for $ac_word" >&5
5230 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5231 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5232   echo $ECHO_N "(cached) $ECHO_C" >&6
5233 else
5234   if test -n "$BUILD_CC"; then
5235   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5236 else
5237   ac_save_IFS=$IFS; IFS=$ac_path_separator
5238 ac_dummy="$PATH"
5239 for ac_dir in $ac_dummy; do
5240   IFS=$ac_save_IFS
5241   test -z "$ac_dir" && ac_dir=.
5242   $as_executable_p "$ac_dir/$ac_word" || continue
5243 ac_cv_prog_BUILD_CC="$ac_prog"
5244 echo "$as_me:5244: found $ac_dir/$ac_word" >&5
5245 break
5246 done
5247
5248 fi
5249 fi
5250 BUILD_CC=$ac_cv_prog_BUILD_CC
5251 if test -n "$BUILD_CC"; then
5252   echo "$as_me:5252: result: $BUILD_CC" >&5
5253 echo "${ECHO_T}$BUILD_CC" >&6
5254 else
5255   echo "$as_me:5255: result: no" >&5
5256 echo "${ECHO_T}no" >&6
5257 fi
5258
5259   test -n "$BUILD_CC" && break
5260 done
5261 test -n "$BUILD_CC" || BUILD_CC="none"
5262
5263 fi;
5264         echo "$as_me:5264: checking for native build C compiler" >&5
5265 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5266         echo "$as_me:5266: result: $BUILD_CC" >&5
5267 echo "${ECHO_T}$BUILD_CC" >&6
5268
5269         echo "$as_me:5269: checking for native build C preprocessor" >&5
5270 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5271
5272 # Check whether --with-build-cpp or --without-build-cpp was given.
5273 if test "${with_build_cpp+set}" = set; then
5274   withval="$with_build_cpp"
5275   BUILD_CPP="$withval"
5276 else
5277   BUILD_CPP='${BUILD_CC} -E'
5278 fi;
5279         echo "$as_me:5279: result: $BUILD_CPP" >&5
5280 echo "${ECHO_T}$BUILD_CPP" >&6
5281
5282         echo "$as_me:5282: checking for native build C flags" >&5
5283 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5284
5285 # Check whether --with-build-cflags or --without-build-cflags was given.
5286 if test "${with_build_cflags+set}" = set; then
5287   withval="$with_build_cflags"
5288   BUILD_CFLAGS="$withval"
5289 fi;
5290         echo "$as_me:5290: result: $BUILD_CFLAGS" >&5
5291 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5292
5293         echo "$as_me:5293: checking for native build C preprocessor-flags" >&5
5294 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5295
5296 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5297 if test "${with_build_cppflags+set}" = set; then
5298   withval="$with_build_cppflags"
5299   BUILD_CPPFLAGS="$withval"
5300 fi;
5301         echo "$as_me:5301: result: $BUILD_CPPFLAGS" >&5
5302 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5303
5304         echo "$as_me:5304: checking for native build linker-flags" >&5
5305 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5306
5307 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5308 if test "${with_build_ldflags+set}" = set; then
5309   withval="$with_build_ldflags"
5310   BUILD_LDFLAGS="$withval"
5311 fi;
5312         echo "$as_me:5312: result: $BUILD_LDFLAGS" >&5
5313 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5314
5315         echo "$as_me:5315: checking for native build linker-libraries" >&5
5316 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5317
5318 # Check whether --with-build-libs or --without-build-libs was given.
5319 if test "${with_build_libs+set}" = set; then
5320   withval="$with_build_libs"
5321   BUILD_LIBS="$withval"
5322 fi;
5323         echo "$as_me:5323: result: $BUILD_LIBS" >&5
5324 echo "${ECHO_T}$BUILD_LIBS" >&6
5325
5326         # this assumes we're on Unix.
5327         BUILD_EXEEXT=
5328         BUILD_OBJEXT=o
5329
5330         : ${BUILD_CC:='${CC}'}
5331
5332         echo "$as_me:5332: checking if the build-compiler \"$BUILD_CC\" works" >&5
5333 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5334
5335         cf_save_crossed=$cross_compiling
5336         cf_save_ac_link=$ac_link
5337         cross_compiling=no
5338         cf_build_cppflags=$BUILD_CPPFLAGS
5339         test "$cf_build_cppflags" = "#" && cf_build_cppflags=
5340         ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5341
5342         if test "$cross_compiling" = yes; then
5343   cf_ok_build_cc=unknown
5344 else
5345   cat >"conftest.$ac_ext" <<_ACEOF
5346 #line 5346 "configure"
5347 #include "confdefs.h"
5348 #include <stdio.h>
5349                 int main(int argc, char *argv[])
5350                 {
5351                         ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
5352                 }
5353
5354 _ACEOF
5355 rm -f "conftest$ac_exeext"
5356 if { (eval echo "$as_me:5356: \"$ac_link\"") >&5
5357   (eval $ac_link) 2>&5
5358   ac_status=$?
5359   echo "$as_me:5359: \$? = $ac_status" >&5
5360   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5361   { (eval echo "$as_me:5361: \"$ac_try\"") >&5
5362   (eval $ac_try) 2>&5
5363   ac_status=$?
5364   echo "$as_me:5364: \$? = $ac_status" >&5
5365   (exit "$ac_status"); }; }; then
5366   cf_ok_build_cc=yes
5367 else
5368   echo "$as_me: program exited with status $ac_status" >&5
5369 echo "$as_me: failed program was:" >&5
5370 cat "conftest.$ac_ext" >&5
5371 cf_ok_build_cc=no
5372 fi
5373 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5374 fi
5375
5376         cross_compiling=$cf_save_crossed
5377         ac_link=$cf_save_ac_link
5378
5379         echo "$as_me:5379: result: $cf_ok_build_cc" >&5
5380 echo "${ECHO_T}$cf_ok_build_cc" >&6
5381
5382         if test "$cf_ok_build_cc" != yes
5383         then
5384                 { { echo "$as_me:5384: error: Cross-build requires two compilers.
5385 Use --with-build-cc to specify the native compiler." >&5
5386 echo "$as_me: error: Cross-build requires two compilers.
5387 Use --with-build-cc to specify the native compiler." >&2;}
5388    { (exit 1); exit 1; }; }
5389         fi
5390
5391 else
5392         : ${BUILD_CC:='${CC}'}
5393         : ${BUILD_CPP:='${CPP}'}
5394         : ${BUILD_CFLAGS:='${CFLAGS}'}
5395         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5396         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5397         : ${BUILD_LIBS:='${LIBS}'}
5398         : ${BUILD_EXEEXT:='$x'}
5399         : ${BUILD_OBJEXT:='o'}
5400 fi
5401
5402 ###############################################################################
5403
5404 ### Options to allow the user to specify the set of libraries which are used.
5405 ### Use "--without-normal --with-shared" to allow the default model to be
5406 ### shared, for example.
5407 cf_list_models=""
5408
5409 echo "$as_me:5409: checking if libtool -version-number should be used" >&5
5410 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5411
5412 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5413 if test "${enable_libtool_version+set}" = set; then
5414   enableval="$enable_libtool_version"
5415   test "$enableval" != no && enableval=yes
5416         if test "$enableval" != "yes" ; then
5417     cf_libtool_version=no
5418         else
5419                 cf_libtool_version=yes
5420         fi
5421 else
5422   enableval=yes
5423         cf_libtool_version=yes
5424
5425 fi;
5426 echo "$as_me:5426: result: $cf_libtool_version" >&5
5427 echo "${ECHO_T}$cf_libtool_version" >&6
5428
5429 if test "$cf_libtool_version" = yes ; then
5430         LIBTOOL_VERSION="-version-number"
5431 else
5432         LIBTOOL_VERSION="-version-info"
5433         case "x$VERSION" in
5434         (x)
5435                 { echo "$as_me:5435: WARNING: VERSION was not set" >&5
5436 echo "$as_me: WARNING: VERSION was not set" >&2;}
5437                 ;;
5438         (x*.*.*)
5439                 ABI_VERSION="$VERSION"
5440                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5441
5442 echo "${as_me:-configure}:5442: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5443
5444                 ;;
5445         (x*:*:*)
5446                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5447                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5448
5449 echo "${as_me:-configure}:5449: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5450
5451                 ;;
5452         (*)
5453                 { echo "$as_me:5453: WARNING: unexpected VERSION value: $VERSION" >&5
5454 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5455                 ;;
5456         esac
5457 fi
5458
5459 LIBTOOL=
5460
5461 # common library maintenance symbols that are convenient for libtool scripts:
5462 LIB_CREATE='${AR} -cr'
5463 LIB_OBJECT='${OBJECTS}'
5464 LIB_SUFFIX=.a
5465 LIB_PREP="$RANLIB"
5466
5467 # symbols used to prop libtool up to enable it to determine what it should be
5468 # doing:
5469 LIB_CLEAN=
5470 LIB_COMPILE=
5471 LIB_LINK='${CC}'
5472 LIB_INSTALL=
5473 LIB_UNINSTALL=
5474
5475 echo "$as_me:5475: checking if you want to build libraries with libtool" >&5
5476 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5477
5478 # Check whether --with-libtool or --without-libtool was given.
5479 if test "${with_libtool+set}" = set; then
5480   withval="$with_libtool"
5481   with_libtool=$withval
5482 else
5483   with_libtool=no
5484 fi;
5485 echo "$as_me:5485: result: $with_libtool" >&5
5486 echo "${ECHO_T}$with_libtool" >&6
5487 if test "$with_libtool" != "no"; then
5488
5489         if test "$with_libtool" != "yes" ; then
5490
5491 if test "x$prefix" != xNONE; then
5492         cf_path_syntax="$prefix"
5493 else
5494         cf_path_syntax="$ac_default_prefix"
5495 fi
5496
5497 case ".$with_libtool" in
5498 (.\$\(*\)*|.\'*\'*)
5499         ;;
5500 (..|./*|.\\*)
5501         ;;
5502 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5503         ;;
5504 (.\$\{*prefix\}*|.\$\{*dir\}*)
5505         eval with_libtool="$with_libtool"
5506         case ".$with_libtool" in
5507         (.NONE/*)
5508                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5509                 ;;
5510         esac
5511         ;;
5512 (.no|.NONE/*)
5513         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5514         ;;
5515 (*)
5516         { { echo "$as_me:5516: error: expected a pathname, not \"$with_libtool\"" >&5
5517 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5518    { (exit 1); exit 1; }; }
5519         ;;
5520 esac
5521
5522                 LIBTOOL=$with_libtool
5523         else
5524                 if test -n "$ac_tool_prefix"; then
5525   for ac_prog in libtool glibtool
5526   do
5527     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5528 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5529 echo "$as_me:5529: checking for $ac_word" >&5
5530 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5531 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5532   echo $ECHO_N "(cached) $ECHO_C" >&6
5533 else
5534   if test -n "$LIBTOOL"; then
5535   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5536 else
5537   ac_save_IFS=$IFS; IFS=$ac_path_separator
5538 ac_dummy="$PATH"
5539 for ac_dir in $ac_dummy; do
5540   IFS=$ac_save_IFS
5541   test -z "$ac_dir" && ac_dir=.
5542   $as_executable_p "$ac_dir/$ac_word" || continue
5543 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5544 echo "$as_me:5544: found $ac_dir/$ac_word" >&5
5545 break
5546 done
5547
5548 fi
5549 fi
5550 LIBTOOL=$ac_cv_prog_LIBTOOL
5551 if test -n "$LIBTOOL"; then
5552   echo "$as_me:5552: result: $LIBTOOL" >&5
5553 echo "${ECHO_T}$LIBTOOL" >&6
5554 else
5555   echo "$as_me:5555: result: no" >&5
5556 echo "${ECHO_T}no" >&6
5557 fi
5558
5559     test -n "$LIBTOOL" && break
5560   done
5561 fi
5562 if test -z "$LIBTOOL"; then
5563   ac_ct_LIBTOOL=$LIBTOOL
5564   for ac_prog in libtool glibtool
5565 do
5566   # Extract the first word of "$ac_prog", so it can be a program name with args.
5567 set dummy $ac_prog; ac_word=$2
5568 echo "$as_me:5568: checking for $ac_word" >&5
5569 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5570 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5571   echo $ECHO_N "(cached) $ECHO_C" >&6
5572 else
5573   if test -n "$ac_ct_LIBTOOL"; then
5574   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5575 else
5576   ac_save_IFS=$IFS; IFS=$ac_path_separator
5577 ac_dummy="$PATH"
5578 for ac_dir in $ac_dummy; do
5579   IFS=$ac_save_IFS
5580   test -z "$ac_dir" && ac_dir=.
5581   $as_executable_p "$ac_dir/$ac_word" || continue
5582 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5583 echo "$as_me:5583: found $ac_dir/$ac_word" >&5
5584 break
5585 done
5586
5587 fi
5588 fi
5589 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5590 if test -n "$ac_ct_LIBTOOL"; then
5591   echo "$as_me:5591: result: $ac_ct_LIBTOOL" >&5
5592 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5593 else
5594   echo "$as_me:5594: result: no" >&5
5595 echo "${ECHO_T}no" >&6
5596 fi
5597
5598   test -n "$ac_ct_LIBTOOL" && break
5599 done
5600 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5601
5602   LIBTOOL=$ac_ct_LIBTOOL
5603 fi
5604
5605 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5606 then
5607         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.].*//'`
5608 else
5609         cf_cv_libtool_version=
5610 fi
5611 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5612
5613                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5614                 then
5615
5616 unset ac_cv_prog_ac_ct_LIBTOOL
5617 unset ac_ct_LIBTOOL
5618 unset LIBTOOL
5619
5620                         if test -n "$ac_tool_prefix"; then
5621   for ac_prog in glibtool
5622   do
5623     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5624 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5625 echo "$as_me:5625: checking for $ac_word" >&5
5626 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5627 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5628   echo $ECHO_N "(cached) $ECHO_C" >&6
5629 else
5630   if test -n "$LIBTOOL"; then
5631   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5632 else
5633   ac_save_IFS=$IFS; IFS=$ac_path_separator
5634 ac_dummy="$PATH"
5635 for ac_dir in $ac_dummy; do
5636   IFS=$ac_save_IFS
5637   test -z "$ac_dir" && ac_dir=.
5638   $as_executable_p "$ac_dir/$ac_word" || continue
5639 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5640 echo "$as_me:5640: found $ac_dir/$ac_word" >&5
5641 break
5642 done
5643
5644 fi
5645 fi
5646 LIBTOOL=$ac_cv_prog_LIBTOOL
5647 if test -n "$LIBTOOL"; then
5648   echo "$as_me:5648: result: $LIBTOOL" >&5
5649 echo "${ECHO_T}$LIBTOOL" >&6
5650 else
5651   echo "$as_me:5651: result: no" >&5
5652 echo "${ECHO_T}no" >&6
5653 fi
5654
5655     test -n "$LIBTOOL" && break
5656   done
5657 fi
5658 if test -z "$LIBTOOL"; then
5659   ac_ct_LIBTOOL=$LIBTOOL
5660   for ac_prog in glibtool
5661 do
5662   # Extract the first word of "$ac_prog", so it can be a program name with args.
5663 set dummy $ac_prog; ac_word=$2
5664 echo "$as_me:5664: checking for $ac_word" >&5
5665 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5666 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5667   echo $ECHO_N "(cached) $ECHO_C" >&6
5668 else
5669   if test -n "$ac_ct_LIBTOOL"; then
5670   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5671 else
5672   ac_save_IFS=$IFS; IFS=$ac_path_separator
5673 ac_dummy="$PATH"
5674 for ac_dir in $ac_dummy; do
5675   IFS=$ac_save_IFS
5676   test -z "$ac_dir" && ac_dir=.
5677   $as_executable_p "$ac_dir/$ac_word" || continue
5678 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5679 echo "$as_me:5679: found $ac_dir/$ac_word" >&5
5680 break
5681 done
5682
5683 fi
5684 fi
5685 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5686 if test -n "$ac_ct_LIBTOOL"; then
5687   echo "$as_me:5687: result: $ac_ct_LIBTOOL" >&5
5688 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5689 else
5690   echo "$as_me:5690: result: no" >&5
5691 echo "${ECHO_T}no" >&6
5692 fi
5693
5694   test -n "$ac_ct_LIBTOOL" && break
5695 done
5696 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5697
5698   LIBTOOL=$ac_ct_LIBTOOL
5699 fi
5700
5701 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5702 then
5703         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.].*//'`
5704 else
5705         cf_cv_libtool_version=
5706 fi
5707 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5708
5709                 fi
5710         fi
5711         if test -z "$LIBTOOL" ; then
5712                 { { echo "$as_me:5712: error: Cannot find libtool" >&5
5713 echo "$as_me: error: Cannot find libtool" >&2;}
5714    { (exit 1); exit 1; }; }
5715         fi
5716         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5717         LIB_OBJECT='${OBJECTS:.o=.lo}'
5718         LIB_SUFFIX=.la
5719         LIB_CLEAN='${LIBTOOL} --mode=clean'
5720         LIB_COMPILE='${LIBTOOL} --mode=compile'
5721         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5722         LIB_INSTALL='${LIBTOOL} --mode=install'
5723         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5724         LIB_PREP=:
5725
5726 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5727 then
5728         echo "$as_me:5728: checking version of $LIBTOOL" >&5
5729 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5730
5731 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5732 then
5733         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.].*//'`
5734 else
5735         cf_cv_libtool_version=
5736 fi
5737 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5738
5739         echo "$as_me:5739: result: $cf_cv_libtool_version" >&5
5740 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5741         if test -n "$cf_cv_libtool_version"
5742         then
5743                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5744                 case "x$cf_check_libtool_version" in
5745                 (*...GNU-libtool...*)
5746                         ;;
5747                 (*)
5748                         { { echo "$as_me:5748: error: This is not GNU libtool" >&5
5749 echo "$as_me: error: This is not GNU libtool" >&2;}
5750    { (exit 1); exit 1; }; }
5751                         ;;
5752                 esac
5753         else
5754                 { { echo "$as_me:5754: error: No version found for $LIBTOOL" >&5
5755 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5756    { (exit 1); exit 1; }; }
5757         fi
5758 else
5759         { { echo "$as_me:5759: error: GNU libtool has not been found" >&5
5760 echo "$as_me: error: GNU libtool has not been found" >&2;}
5761    { (exit 1); exit 1; }; }
5762 fi
5763
5764         # special hack to add -no-undefined (which libtool should do for itself)
5765         LT_UNDEF=
5766         case "$cf_cv_system_name" in
5767         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5768                 LT_UNDEF=-no-undefined
5769                 ;;
5770         esac
5771
5772         # special hack to add --tag option for C++ compiler
5773         case "$cf_cv_libtool_version" in
5774         (1.[5-9]*|[2-9].[0-9.a-z]*)
5775                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5776                 LIBTOOL="$LIBTOOL --tag=CC"
5777                 ;;
5778         (*)
5779                 LIBTOOL_CXX="$LIBTOOL"
5780                 ;;
5781         esac
5782 else
5783         LIBTOOL=""
5784         LIBTOOL_CXX=""
5785 fi
5786
5787 test -z "$LIBTOOL" && ECHO_LT=
5788
5789 if test "$with_libtool" != "no" ; then
5790
5791 cf_list_models="$cf_list_models libtool"
5792
5793 else
5794
5795 echo "$as_me:5795: checking if you want to build shared libraries" >&5
5796 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5797
5798 # Check whether --with-shared or --without-shared was given.
5799 if test "${with_shared+set}" = set; then
5800   withval="$with_shared"
5801   with_shared=$withval
5802 else
5803   with_shared=no
5804 fi;
5805 echo "$as_me:5805: result: $with_shared" >&5
5806 echo "${ECHO_T}$with_shared" >&6
5807 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5808
5809 echo "$as_me:5809: checking if you want to build static libraries" >&5
5810 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5811
5812 # Check whether --with-normal or --without-normal was given.
5813 if test "${with_normal+set}" = set; then
5814   withval="$with_normal"
5815   with_normal=$withval
5816 else
5817   with_normal=yes
5818 fi;
5819 echo "$as_me:5819: result: $with_normal" >&5
5820 echo "${ECHO_T}$with_normal" >&6
5821 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5822
5823 echo "$as_me:5823: checking if you want to build debug libraries" >&5
5824 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5825
5826 # Check whether --with-debug or --without-debug was given.
5827 if test "${with_debug+set}" = set; then
5828   withval="$with_debug"
5829   with_debug=$withval
5830 else
5831   with_debug=yes
5832 fi;
5833 echo "$as_me:5833: result: $with_debug" >&5
5834 echo "${ECHO_T}$with_debug" >&6
5835 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5836
5837 echo "$as_me:5837: checking if you want to build profiling libraries" >&5
5838 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5839
5840 # Check whether --with-profile or --without-profile was given.
5841 if test "${with_profile+set}" = set; then
5842   withval="$with_profile"
5843   with_profile=$withval
5844 else
5845   with_profile=no
5846 fi;
5847 echo "$as_me:5847: result: $with_profile" >&5
5848 echo "${ECHO_T}$with_profile" >&6
5849 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5850
5851 fi
5852
5853 if test "X$cf_with_cxx_binding" != Xno; then
5854 if test "x$with_shared" = "xyes"; then
5855 echo "$as_me:5855: checking if you want to build C++ shared libraries" >&5
5856 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5857
5858 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5859 if test "${with_cxx_shared+set}" = set; then
5860   withval="$with_cxx_shared"
5861   with_shared_cxx=$withval
5862 else
5863   with_shared_cxx=no
5864 fi;
5865 echo "$as_me:5865: result: $with_shared_cxx" >&5
5866 echo "${ECHO_T}$with_shared_cxx" >&6
5867 fi
5868 fi
5869
5870 ###############################################################################
5871
5872 echo "$as_me:5872: checking for specified models" >&5
5873 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5874 test -z "$cf_list_models" && cf_list_models=normal
5875 test "$with_libtool" != "no" && cf_list_models=libtool
5876 echo "$as_me:5876: result: $cf_list_models" >&5
5877 echo "${ECHO_T}$cf_list_models" >&6
5878
5879 ### Use the first model as the default, and save its suffix for use in building
5880 ### up test-applications.
5881 echo "$as_me:5881: checking for default model" >&5
5882 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5883 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5884 echo "$as_me:5884: result: $DFT_LWR_MODEL" >&5
5885 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5886
5887 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5888
5889 TICS_NAME=tic
5890
5891 TINFO_NAME=tinfo
5892
5893 LIB_NAME=ncurses
5894
5895 LIB_DIR=../lib
5896 LIB_2ND=../../lib
5897
5898 echo "$as_me:5898: checking if you want to have a library-prefix" >&5
5899 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5900
5901 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5902 if test "${with_lib_prefix+set}" = set; then
5903   withval="$with_lib_prefix"
5904   with_lib_prefix=$withval
5905 else
5906   with_lib_prefix=auto
5907 fi;
5908 echo "$as_me:5908: result: $with_lib_prefix" >&5
5909 echo "${ECHO_T}$with_lib_prefix" >&6
5910
5911 if test "$with_lib_prefix" = auto
5912 then
5913
5914         case "$cf_cv_system_name" in
5915         (OS/2*|os2*)
5916                 if test "$DFT_LWR_MODEL" = libtool; then
5917                         LIB_PREFIX='lib'
5918                 else
5919                         LIB_PREFIX=''
5920                 fi
5921                 ;;
5922         (*-msvc*)
5923                 LIB_PREFIX=''
5924                 ;;
5925         (*)     LIB_PREFIX='lib'
5926                 ;;
5927         esac
5928 cf_prefix=$LIB_PREFIX
5929
5930 elif test "$with_lib_prefix" = no
5931 then
5932         LIB_PREFIX=
5933 else
5934         LIB_PREFIX=$with_lib_prefix
5935 fi
5936
5937 LIB_SUFFIX=
5938
5939         echo "$as_me:5939: checking for PATH separator" >&5
5940 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5941         case "$cf_cv_system_name" in
5942         (os2*)  PATH_SEPARATOR=';'  ;;
5943         (*)     ${PATH_SEPARATOR:=':'}  ;;
5944         esac
5945
5946         echo "$as_me:5946: result: $PATH_SEPARATOR" >&5
5947 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5948
5949 # headers needed for checks...
5950 echo "$as_me:5950: checking for ANSI C header files" >&5
5951 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5952 if test "${ac_cv_header_stdc+set}" = set; then
5953   echo $ECHO_N "(cached) $ECHO_C" >&6
5954 else
5955   cat >"conftest.$ac_ext" <<_ACEOF
5956 #line 5956 "configure"
5957 #include "confdefs.h"
5958 #include <stdlib.h>
5959 #include <stdarg.h>
5960 #include <string.h>
5961 #include <float.h>
5962
5963 _ACEOF
5964 if { (eval echo "$as_me:5964: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5965   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5966   ac_status=$?
5967   $EGREP -v '^ *\+' conftest.er1 >conftest.err
5968   rm -f conftest.er1
5969   cat conftest.err >&5
5970   echo "$as_me:5970: \$? = $ac_status" >&5
5971   (exit "$ac_status"); } >/dev/null; then
5972   if test -s conftest.err; then
5973     ac_cpp_err=$ac_c_preproc_warn_flag
5974   else
5975     ac_cpp_err=
5976   fi
5977 else
5978   ac_cpp_err=yes
5979 fi
5980 if test -z "$ac_cpp_err"; then
5981   ac_cv_header_stdc=yes
5982 else
5983   echo "$as_me: failed program was:" >&5
5984   cat "conftest.$ac_ext" >&5
5985   ac_cv_header_stdc=no
5986 fi
5987 rm -f conftest.err "conftest.$ac_ext"
5988
5989 if test $ac_cv_header_stdc = yes; then
5990   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5991   cat >"conftest.$ac_ext" <<_ACEOF
5992 #line 5992 "configure"
5993 #include "confdefs.h"
5994 #include <string.h>
5995
5996 _ACEOF
5997 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5998   $EGREP "memchr" >/dev/null 2>&1; then
5999   :
6000 else
6001   ac_cv_header_stdc=no
6002 fi
6003 rm -rf conftest*
6004
6005 fi
6006
6007 if test $ac_cv_header_stdc = yes; then
6008   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6009   cat >"conftest.$ac_ext" <<_ACEOF
6010 #line 6010 "configure"
6011 #include "confdefs.h"
6012 #include <stdlib.h>
6013
6014 _ACEOF
6015 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6016   $EGREP "free" >/dev/null 2>&1; then
6017   :
6018 else
6019   ac_cv_header_stdc=no
6020 fi
6021 rm -rf conftest*
6022
6023 fi
6024
6025 if test $ac_cv_header_stdc = yes; then
6026   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6027   if test "$cross_compiling" = yes; then
6028   :
6029 else
6030   cat >"conftest.$ac_ext" <<_ACEOF
6031 #line 6031 "configure"
6032 #include "confdefs.h"
6033 #include <ctype.h>
6034 #if ((' ' & 0x0FF) == 0x020)
6035 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6036 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6037 #else
6038 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6039                      || ('j' <= (c) && (c) <= 'r') \
6040                      || ('s' <= (c) && (c) <= 'z'))
6041 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6042 #endif
6043
6044 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6045 int
6046 main (void)
6047 {
6048   int i;
6049   for (i = 0; i < 256; i++)
6050     if (XOR (islower (i), ISLOWER (i))
6051         || toupper (i) != TOUPPER (i))
6052       $ac_main_return(2);
6053   $ac_main_return (0);
6054 }
6055 _ACEOF
6056 rm -f "conftest$ac_exeext"
6057 if { (eval echo "$as_me:6057: \"$ac_link\"") >&5
6058   (eval $ac_link) 2>&5
6059   ac_status=$?
6060   echo "$as_me:6060: \$? = $ac_status" >&5
6061   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6062   { (eval echo "$as_me:6062: \"$ac_try\"") >&5
6063   (eval $ac_try) 2>&5
6064   ac_status=$?
6065   echo "$as_me:6065: \$? = $ac_status" >&5
6066   (exit "$ac_status"); }; }; then
6067   :
6068 else
6069   echo "$as_me: program exited with status $ac_status" >&5
6070 echo "$as_me: failed program was:" >&5
6071 cat "conftest.$ac_ext" >&5
6072 ac_cv_header_stdc=no
6073 fi
6074 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6075 fi
6076 fi
6077 fi
6078 echo "$as_me:6078: result: $ac_cv_header_stdc" >&5
6079 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6080 if test $ac_cv_header_stdc = yes; then
6081
6082 cat >>confdefs.h <<\EOF
6083 #define STDC_HEADERS 1
6084 EOF
6085
6086 fi
6087
6088 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6089
6090 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6091                   inttypes.h stdint.h unistd.h
6092 do
6093 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6094 echo "$as_me:6094: checking for $ac_header" >&5
6095 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6096 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6097   echo $ECHO_N "(cached) $ECHO_C" >&6
6098 else
6099   cat >"conftest.$ac_ext" <<_ACEOF
6100 #line 6100 "configure"
6101 #include "confdefs.h"
6102 $ac_includes_default
6103 #include <$ac_header>
6104 _ACEOF
6105 rm -f "conftest.$ac_objext"
6106 if { (eval echo "$as_me:6106: \"$ac_compile\"") >&5
6107   (eval $ac_compile) 2>&5
6108   ac_status=$?
6109   echo "$as_me:6109: \$? = $ac_status" >&5
6110   (exit "$ac_status"); } &&
6111          { ac_try='test -s "conftest.$ac_objext"'
6112   { (eval echo "$as_me:6112: \"$ac_try\"") >&5
6113   (eval $ac_try) 2>&5
6114   ac_status=$?
6115   echo "$as_me:6115: \$? = $ac_status" >&5
6116   (exit "$ac_status"); }; }; then
6117   eval "$as_ac_Header=yes"
6118 else
6119   echo "$as_me: failed program was:" >&5
6120 cat "conftest.$ac_ext" >&5
6121 eval "$as_ac_Header=no"
6122 fi
6123 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6124 fi
6125 echo "$as_me:6125: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6126 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6127 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6128   cat >>confdefs.h <<EOF
6129 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6130 EOF
6131
6132 fi
6133 done
6134
6135 echo "$as_me:6135: checking whether exit is declared" >&5
6136 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6137 if test "${ac_cv_have_decl_exit+set}" = set; then
6138   echo $ECHO_N "(cached) $ECHO_C" >&6
6139 else
6140   cat >"conftest.$ac_ext" <<_ACEOF
6141 #line 6141 "configure"
6142 #include "confdefs.h"
6143 $ac_includes_default
6144 int
6145 main (void)
6146 {
6147 #ifndef exit
6148   char *p = (char *) exit; (void) p;
6149 #endif
6150
6151   ;
6152   return 0;
6153 }
6154 _ACEOF
6155 rm -f "conftest.$ac_objext"
6156 if { (eval echo "$as_me:6156: \"$ac_compile\"") >&5
6157   (eval $ac_compile) 2>&5
6158   ac_status=$?
6159   echo "$as_me:6159: \$? = $ac_status" >&5
6160   (exit "$ac_status"); } &&
6161          { ac_try='test -s "conftest.$ac_objext"'
6162   { (eval echo "$as_me:6162: \"$ac_try\"") >&5
6163   (eval $ac_try) 2>&5
6164   ac_status=$?
6165   echo "$as_me:6165: \$? = $ac_status" >&5
6166   (exit "$ac_status"); }; }; then
6167   ac_cv_have_decl_exit=yes
6168 else
6169   echo "$as_me: failed program was:" >&5
6170 cat "conftest.$ac_ext" >&5
6171 ac_cv_have_decl_exit=no
6172 fi
6173 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6174 fi
6175 echo "$as_me:6175: result: $ac_cv_have_decl_exit" >&5
6176 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6177
6178 ac_header_dirent=no
6179 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6180   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6181 echo "$as_me:6181: checking for $ac_hdr that defines DIR" >&5
6182 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
6183 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6184   echo $ECHO_N "(cached) $ECHO_C" >&6
6185 else
6186   cat >"conftest.$ac_ext" <<_ACEOF
6187 #line 6187 "configure"
6188 #include "confdefs.h"
6189 #include <sys/types.h>
6190 #include <$ac_hdr>
6191
6192 int
6193 main (void)
6194 {
6195 if ((DIR *) 0)
6196 return 0;
6197   ;
6198   return 0;
6199 }
6200 _ACEOF
6201 rm -f "conftest.$ac_objext"
6202 if { (eval echo "$as_me:6202: \"$ac_compile\"") >&5
6203   (eval $ac_compile) 2>&5
6204   ac_status=$?
6205   echo "$as_me:6205: \$? = $ac_status" >&5
6206   (exit "$ac_status"); } &&
6207          { ac_try='test -s "conftest.$ac_objext"'
6208   { (eval echo "$as_me:6208: \"$ac_try\"") >&5
6209   (eval $ac_try) 2>&5
6210   ac_status=$?
6211   echo "$as_me:6211: \$? = $ac_status" >&5
6212   (exit "$ac_status"); }; }; then
6213   eval "$as_ac_Header=yes"
6214 else
6215   echo "$as_me: failed program was:" >&5
6216 cat "conftest.$ac_ext" >&5
6217 eval "$as_ac_Header=no"
6218 fi
6219 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6220 fi
6221 echo "$as_me:6221: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6222 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6223 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6224   cat >>confdefs.h <<EOF
6225 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6226 EOF
6227
6228 ac_header_dirent=$ac_hdr; break
6229 fi
6230
6231 done
6232 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6233 if test $ac_header_dirent = dirent.h; then
6234   echo "$as_me:6234: checking for opendir in -ldir" >&5
6235 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
6236 if test "${ac_cv_lib_dir_opendir+set}" = set; then
6237   echo $ECHO_N "(cached) $ECHO_C" >&6
6238 else
6239   ac_check_lib_save_LIBS=$LIBS
6240 LIBS="-ldir  $LIBS"
6241 cat >"conftest.$ac_ext" <<_ACEOF
6242 #line 6242 "configure"
6243 #include "confdefs.h"
6244
6245 /* Override any gcc2 internal prototype to avoid an error.  */
6246 #ifdef __cplusplus
6247 extern "C"
6248 #endif
6249 /* We use char because int might match the return type of a gcc2
6250    builtin and then its argument prototype would still apply.  */
6251 char opendir ();
6252 int
6253 main (void)
6254 {
6255 opendir ();
6256   ;
6257   return 0;
6258 }
6259 _ACEOF
6260 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6261 if { (eval echo "$as_me:6261: \"$ac_link\"") >&5
6262   (eval $ac_link) 2>&5
6263   ac_status=$?
6264   echo "$as_me:6264: \$? = $ac_status" >&5
6265   (exit "$ac_status"); } &&
6266          { ac_try='test -s "conftest$ac_exeext"'
6267   { (eval echo "$as_me:6267: \"$ac_try\"") >&5
6268   (eval $ac_try) 2>&5
6269   ac_status=$?
6270   echo "$as_me:6270: \$? = $ac_status" >&5
6271   (exit "$ac_status"); }; }; then
6272   ac_cv_lib_dir_opendir=yes
6273 else
6274   echo "$as_me: failed program was:" >&5
6275 cat "conftest.$ac_ext" >&5
6276 ac_cv_lib_dir_opendir=no
6277 fi
6278 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6279 LIBS=$ac_check_lib_save_LIBS
6280 fi
6281 echo "$as_me:6281: result: $ac_cv_lib_dir_opendir" >&5
6282 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
6283 if test "$ac_cv_lib_dir_opendir" = yes; then
6284   LIBS="$LIBS -ldir"
6285 fi
6286
6287 else
6288   echo "$as_me:6288: checking for opendir in -lx" >&5
6289 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
6290 if test "${ac_cv_lib_x_opendir+set}" = set; then
6291   echo $ECHO_N "(cached) $ECHO_C" >&6
6292 else
6293   ac_check_lib_save_LIBS=$LIBS
6294 LIBS="-lx  $LIBS"
6295 cat >"conftest.$ac_ext" <<_ACEOF
6296 #line 6296 "configure"
6297 #include "confdefs.h"
6298
6299 /* Override any gcc2 internal prototype to avoid an error.  */
6300 #ifdef __cplusplus
6301 extern "C"
6302 #endif
6303 /* We use char because int might match the return type of a gcc2
6304    builtin and then its argument prototype would still apply.  */
6305 char opendir ();
6306 int
6307 main (void)
6308 {
6309 opendir ();
6310   ;
6311   return 0;
6312 }
6313 _ACEOF
6314 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6315 if { (eval echo "$as_me:6315: \"$ac_link\"") >&5
6316   (eval $ac_link) 2>&5
6317   ac_status=$?
6318   echo "$as_me:6318: \$? = $ac_status" >&5
6319   (exit "$ac_status"); } &&
6320          { ac_try='test -s "conftest$ac_exeext"'
6321   { (eval echo "$as_me:6321: \"$ac_try\"") >&5
6322   (eval $ac_try) 2>&5
6323   ac_status=$?
6324   echo "$as_me:6324: \$? = $ac_status" >&5
6325   (exit "$ac_status"); }; }; then
6326   ac_cv_lib_x_opendir=yes
6327 else
6328   echo "$as_me: failed program was:" >&5
6329 cat "conftest.$ac_ext" >&5
6330 ac_cv_lib_x_opendir=no
6331 fi
6332 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6333 LIBS=$ac_check_lib_save_LIBS
6334 fi
6335 echo "$as_me:6335: result: $ac_cv_lib_x_opendir" >&5
6336 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
6337 if test "$ac_cv_lib_x_opendir" = yes; then
6338   LIBS="$LIBS -lx"
6339 fi
6340
6341 fi
6342
6343 ###############################################################################
6344
6345 echo "$as_me:6345: checking if you want to build a separate terminfo library" >&5
6346 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
6347
6348 # Check whether --with-termlib or --without-termlib was given.
6349 if test "${with_termlib+set}" = set; then
6350   withval="$with_termlib"
6351   with_termlib=$withval
6352 else
6353   with_termlib=no
6354 fi;
6355 echo "$as_me:6355: result: $with_termlib" >&5
6356 echo "${ECHO_T}$with_termlib" >&6
6357
6358 echo "$as_me:6358: checking if you want to build a separate tic library" >&5
6359 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
6360
6361 # Check whether --with-ticlib or --without-ticlib was given.
6362 if test "${with_ticlib+set}" = set; then
6363   withval="$with_ticlib"
6364   with_ticlib=$withval
6365 else
6366   with_ticlib=no
6367 fi;
6368 echo "$as_me:6368: result: $with_ticlib" >&5
6369 echo "${ECHO_T}$with_ticlib" >&6
6370
6371 if test X"$CC_G_OPT" = X"" ; then
6372         CC_G_OPT='-g'
6373         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
6374 fi
6375
6376 if test X"$CXX_G_OPT" = X"" ; then
6377         CXX_G_OPT='-g'
6378         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
6379 fi
6380
6381 echo "$as_me:6381: checking for default loader flags" >&5
6382 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
6383 case "$DFT_LWR_MODEL" in
6384 (libtool) LD_MODEL=''   ;;
6385 (normal)  LD_MODEL=''   ;;
6386 (debug)   LD_MODEL=$CC_G_OPT ;;
6387 (profile) LD_MODEL='-pg';;
6388 (shared)  LD_MODEL=''   ;;
6389 esac
6390 echo "$as_me:6390: result: $LD_MODEL" >&5
6391 echo "${ECHO_T}$LD_MODEL" >&6
6392
6393 case "$DFT_LWR_MODEL" in
6394 (shared)
6395
6396 echo "$as_me:6396: checking if rpath option should be used" >&5
6397 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
6398
6399 # Check whether --enable-rpath or --disable-rpath was given.
6400 if test "${enable_rpath+set}" = set; then
6401   enableval="$enable_rpath"
6402   cf_cv_enable_rpath=$enableval
6403 else
6404   cf_cv_enable_rpath=no
6405 fi;
6406 echo "$as_me:6406: result: $cf_cv_enable_rpath" >&5
6407 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
6408
6409 echo "$as_me:6409: checking if shared libraries should be relinked during install" >&5
6410 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6411
6412 # Check whether --enable-relink or --disable-relink was given.
6413 if test "${enable_relink+set}" = set; then
6414   enableval="$enable_relink"
6415   cf_cv_do_relink=$enableval
6416 else
6417   cf_cv_do_relink=yes
6418 fi;
6419 echo "$as_me:6419: result: $cf_cv_do_relink" >&5
6420 echo "${ECHO_T}$cf_cv_do_relink" >&6
6421         ;;
6422 esac
6423
6424 # we will build libraries one-level down.
6425 rel_builddir=..
6426
6427 LD_RPATH_OPT=
6428 if test "x$cf_cv_enable_rpath" != xno
6429 then
6430         echo "$as_me:6430: checking for an rpath option" >&5
6431 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6432         case "$cf_cv_system_name" in
6433         (irix*)
6434                 if test "$GCC" = yes; then
6435                         LD_RPATH_OPT="-Wl,-rpath,"
6436                 else
6437                         LD_RPATH_OPT="-rpath "
6438                 fi
6439                 ;;
6440         (linux*|gnu*|k*bsd*-gnu|freebsd*)
6441                 LD_RPATH_OPT="-Wl,-rpath,"
6442                 ;;
6443         (openbsd[2-9].*|mirbsd*)
6444                 LD_RPATH_OPT="-Wl,-rpath,"
6445                 ;;
6446         (dragonfly*)
6447                 LD_RPATH_OPT="-rpath "
6448                 ;;
6449         (netbsd*)
6450                 LD_RPATH_OPT="-Wl,-rpath,"
6451                 ;;
6452         (osf*|mls+*)
6453                 LD_RPATH_OPT="-rpath "
6454                 ;;
6455         (solaris2*)
6456                 LD_RPATH_OPT="-R"
6457                 ;;
6458         (*)
6459                 ;;
6460         esac
6461         echo "$as_me:6461: result: $LD_RPATH_OPT" >&5
6462 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6463
6464         case "x$LD_RPATH_OPT" in
6465         (x-R*)
6466                 echo "$as_me:6466: checking if we need a space after rpath option" >&5
6467 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6468                 cf_save_LIBS="$LIBS"
6469
6470 cf_add_libs="$LIBS"
6471 # reverse order
6472 cf_add_0lib=
6473 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6474 # filter duplicates
6475 for cf_add_1lib in $cf_add_0lib; do
6476         for cf_add_2lib in $cf_add_libs; do
6477                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6478                         cf_add_1lib=
6479                         break
6480                 fi
6481         done
6482         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6483 done
6484 LIBS="$cf_add_libs"
6485
6486                 cat >"conftest.$ac_ext" <<_ACEOF
6487 #line 6487 "configure"
6488 #include "confdefs.h"
6489
6490 int
6491 main (void)
6492 {
6493
6494   ;
6495   return 0;
6496 }
6497 _ACEOF
6498 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6499 if { (eval echo "$as_me:6499: \"$ac_link\"") >&5
6500   (eval $ac_link) 2>&5
6501   ac_status=$?
6502   echo "$as_me:6502: \$? = $ac_status" >&5
6503   (exit "$ac_status"); } &&
6504          { ac_try='test -s "conftest$ac_exeext"'
6505   { (eval echo "$as_me:6505: \"$ac_try\"") >&5
6506   (eval $ac_try) 2>&5
6507   ac_status=$?
6508   echo "$as_me:6508: \$? = $ac_status" >&5
6509   (exit "$ac_status"); }; }; then
6510   cf_rpath_space=no
6511 else
6512   echo "$as_me: failed program was:" >&5
6513 cat "conftest.$ac_ext" >&5
6514 cf_rpath_space=yes
6515 fi
6516 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6517                 LIBS="$cf_save_LIBS"
6518                 echo "$as_me:6518: result: $cf_rpath_space" >&5
6519 echo "${ECHO_T}$cf_rpath_space" >&6
6520                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6521                 ;;
6522         esac
6523 fi
6524
6525         RM_SHARED_OPTS=
6526         LOCAL_LDFLAGS=
6527         LOCAL_LDFLAGS2=
6528         LD_SHARED_OPTS=
6529         INSTALL_LIB="-m 644"
6530         : ${rel_builddir:=.}
6531
6532         shlibdir=$libdir
6533
6534         MAKE_DLLS="#"
6535
6536         cf_cv_do_symlinks=no
6537         cf_ld_rpath_opt=
6538         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6539
6540         echo "$as_me:6540: checking if release/abi version should be used for shared libs" >&5
6541 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6542
6543 # Check whether --with-shlib-version or --without-shlib-version was given.
6544 if test "${with_shlib_version+set}" = set; then
6545   withval="$with_shlib_version"
6546   test -z "$withval" && withval=auto
6547         case "$withval" in
6548         (yes)
6549                 cf_cv_shlib_version=auto
6550                 ;;
6551         (rel|abi|auto)
6552                 cf_cv_shlib_version=$withval
6553                 ;;
6554         (*)
6555                 echo "$as_me:6555: result: $withval" >&5
6556 echo "${ECHO_T}$withval" >&6
6557                 { { echo "$as_me:6557: error: option value must be one of: rel, abi, or auto" >&5
6558 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6559    { (exit 1); exit 1; }; }
6560                 ;;
6561         esac
6562
6563 else
6564   cf_cv_shlib_version=auto
6565 fi;
6566         echo "$as_me:6566: result: $cf_cv_shlib_version" >&5
6567 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6568
6569         cf_cv_rm_so_locs=no
6570         cf_try_cflags=
6571
6572         # Some less-capable ports of gcc support only -fpic
6573         CC_SHARED_OPTS=
6574
6575         cf_try_fPIC=no
6576         if test "$GCC" = yes
6577         then
6578                 cf_try_fPIC=yes
6579         else
6580                 case "$cf_cv_system_name" in
6581                 (*linux*)       # e.g., PGI compiler
6582                         cf_try_fPIC=yes
6583                         ;;
6584                 esac
6585         fi
6586
6587         if test "$cf_try_fPIC" = yes
6588         then
6589                 echo "$as_me:6589: checking which $CC option to use" >&5
6590 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6591                 cf_save_CFLAGS="$CFLAGS"
6592                 for CC_SHARED_OPTS in -fPIC -fpic ''
6593                 do
6594                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6595                         cat >"conftest.$ac_ext" <<_ACEOF
6596 #line 6596 "configure"
6597 #include "confdefs.h"
6598 #include <stdio.h>
6599 int
6600 main (void)
6601 {
6602 int x = 1
6603   ;
6604   return 0;
6605 }
6606 _ACEOF
6607 rm -f "conftest.$ac_objext"
6608 if { (eval echo "$as_me:6608: \"$ac_compile\"") >&5
6609   (eval $ac_compile) 2>&5
6610   ac_status=$?
6611   echo "$as_me:6611: \$? = $ac_status" >&5
6612   (exit "$ac_status"); } &&
6613          { ac_try='test -s "conftest.$ac_objext"'
6614   { (eval echo "$as_me:6614: \"$ac_try\"") >&5
6615   (eval $ac_try) 2>&5
6616   ac_status=$?
6617   echo "$as_me:6617: \$? = $ac_status" >&5
6618   (exit "$ac_status"); }; }; then
6619   break
6620 else
6621   echo "$as_me: failed program was:" >&5
6622 cat "conftest.$ac_ext" >&5
6623 fi
6624 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6625                 done
6626                 echo "$as_me:6626: result: $CC_SHARED_OPTS" >&5
6627 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6628                 CFLAGS="$cf_save_CFLAGS"
6629         fi
6630
6631         cf_cv_shlib_version_infix=no
6632
6633         case "$cf_cv_system_name" in
6634         (aix4.3-9*|aix[5-7]*)
6635                 if test "$GCC" = yes; then
6636                         CC_SHARED_OPTS='-Wl,-brtl'
6637                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6638                 else
6639                         CC_SHARED_OPTS='-brtl'
6640                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6641                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6642                 fi
6643                 ;;
6644         (beos*)
6645                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6646                 ;;
6647         (cygwin*)
6648                 CC_SHARED_OPTS=
6649                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6650                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6651                 cf_cv_shlib_version=cygdll
6652                 cf_cv_shlib_version_infix=cygdll
6653                 shlibdir=$bindir
6654                 MAKE_DLLS=
6655                 cat >mk_shared_lib.sh <<-CF_EOF
6656                 #!$SHELL
6657                 SHARED_LIB=\$1
6658                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6659                 shift
6660                 cat <<-EOF
6661                 Linking shared library
6662                 ** SHARED_LIB \$SHARED_LIB
6663                 ** IMPORT_LIB \$IMPORT_LIB
6664 EOF
6665                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6666 CF_EOF
6667                 chmod +x mk_shared_lib.sh
6668                 ;;
6669         (msys*)
6670                 CC_SHARED_OPTS=
6671                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6672                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6673                 cf_cv_shlib_version=msysdll
6674                 cf_cv_shlib_version_infix=msysdll
6675                 shlibdir=$bindir
6676                 MAKE_DLLS=
6677                 cat >mk_shared_lib.sh <<-CF_EOF
6678                 #!$SHELL
6679                 SHARED_LIB=\$1
6680                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6681                 shift
6682                 cat <<-EOF
6683                 Linking shared library
6684                 ** SHARED_LIB \$SHARED_LIB
6685                 ** IMPORT_LIB \$IMPORT_LIB
6686 EOF
6687                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6688 CF_EOF
6689                 chmod +x mk_shared_lib.sh
6690                 ;;
6691         (darwin*)
6692                 cf_try_cflags="no-cpp-precomp"
6693                 CC_SHARED_OPTS="-dynamic"
6694                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6695                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6696                 cf_cv_shlib_version_infix=yes
6697                 echo "$as_me:6697: checking if ld -search_paths_first works" >&5
6698 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6699 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6700   echo $ECHO_N "(cached) $ECHO_C" >&6
6701 else
6702
6703                         cf_save_LDFLAGS=$LDFLAGS
6704                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6705                         cat >"conftest.$ac_ext" <<_ACEOF
6706 #line 6706 "configure"
6707 #include "confdefs.h"
6708
6709 int
6710 main (void)
6711 {
6712 int i;
6713   ;
6714   return 0;
6715 }
6716 _ACEOF
6717 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6718 if { (eval echo "$as_me:6718: \"$ac_link\"") >&5
6719   (eval $ac_link) 2>&5
6720   ac_status=$?
6721   echo "$as_me:6721: \$? = $ac_status" >&5
6722   (exit "$ac_status"); } &&
6723          { ac_try='test -s "conftest$ac_exeext"'
6724   { (eval echo "$as_me:6724: \"$ac_try\"") >&5
6725   (eval $ac_try) 2>&5
6726   ac_status=$?
6727   echo "$as_me:6727: \$? = $ac_status" >&5
6728   (exit "$ac_status"); }; }; then
6729   cf_cv_ldflags_search_paths_first=yes
6730 else
6731   echo "$as_me: failed program was:" >&5
6732 cat "conftest.$ac_ext" >&5
6733 cf_cv_ldflags_search_paths_first=no
6734 fi
6735 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6736                                 LDFLAGS=$cf_save_LDFLAGS
6737 fi
6738 echo "$as_me:6738: result: $cf_cv_ldflags_search_paths_first" >&5
6739 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6740                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6741                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6742                 fi
6743                 ;;
6744         (haiku*)
6745
6746         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6747         if test "$cf_cv_shlib_version" = rel; then
6748                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6749         else
6750                 cf_cv_shared_soname='`basename $@`'
6751         fi
6752
6753                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6754                 ;;
6755         (hpux[7-8]*)
6756                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6757                 if test "$GCC" != yes; then
6758                         CC_SHARED_OPTS='+Z'
6759                 fi
6760                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6761                 INSTALL_LIB="-m 555"
6762                 ;;
6763         (hpux*)
6764                 # (tested with gcc 2.7.2 -- I don't have c89)
6765                 if test "$GCC" = yes; then
6766                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6767                 else
6768                         CC_SHARED_OPTS='+Z'
6769                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6770                 fi
6771                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6772                 # HP-UX shared libraries must be executable, and should be
6773                 # readonly to exploit a quirk in the memory manager.
6774                 INSTALL_LIB="-m 555"
6775                 ;;
6776         (interix*)
6777                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6778                 if test "$cf_cv_shlib_version" = rel; then
6779                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6780                 else
6781                         cf_shared_soname='`basename $@`'
6782                 fi
6783                 CC_SHARED_OPTS=
6784                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6785                 ;;
6786         (irix*)
6787                 if test "$cf_cv_enable_rpath" = yes ; then
6788                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6789                 fi
6790                 # tested with IRIX 5.2 and 'cc'.
6791                 if test "$GCC" != yes; then
6792                         CC_SHARED_OPTS='-KPIC'
6793                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6794                 else
6795                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6796                 fi
6797                 cf_cv_rm_so_locs=yes
6798                 ;;
6799         (linux*|gnu*|k*bsd*-gnu)
6800                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6801                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6802                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6803                 fi
6804                 if test "$cf_cv_enable_rpath" = yes ; then
6805                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6806                 fi
6807
6808         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6809         if test "$cf_cv_shlib_version" = rel; then
6810                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6811         else
6812                 cf_cv_shared_soname='`basename $@`'
6813         fi
6814
6815                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6816                 ;;
6817         (mingw*msvc*)
6818                 cf_cv_shlib_version=msvcdll
6819                 cf_cv_shlib_version_infix=msvcdll
6820                 shlibdir=$bindir
6821                 MAKE_DLLS=
6822                 if test "$DFT_LWR_MODEL" = "shared" ; then
6823                         LOCAL_LDFLAGS="-link -dll"
6824                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6825                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6826                 fi
6827                 CC_SHARED_OPTS=
6828                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6829                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6830                 cat >mk_shared_lib.sh <<-CF_EOF
6831                 #!$SHELL
6832                 SHARED_LIB=\$1
6833                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6834                 shift
6835                 my_ld=\$1
6836                 shift
6837                 cat <<-EOF
6838                 Linking shared library
6839                 ** SHARED LIB \$SHARED_LIB
6840                 ** IMPORT_LIB \$IMPORT_LIB
6841 EOF
6842                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6843                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6844                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6845 CF_EOF
6846                 chmod +x mk_shared_lib.sh
6847                 cat >mk_prog.sh <<-CF_EOF
6848                 #!$SHELL
6849                 shift
6850                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6851                 LD="$LD"
6852                 clopts=()
6853                 ldopts=("/subsystem:console")
6854                 libs=()
6855                 isdll=0
6856                 while test \$# -gt 0; do
6857                         case "\$1" in
6858                                 -link)
6859                                         # ignore -link argument
6860                                         ;;
6861                                 -M[TD] | -M[TD]d)
6862                                         # ignore runtime-library option
6863                                         ;;
6864                                 -dll)
6865                                         isdll=1
6866                                         ;;
6867                                 -W* | -w*)
6868                                         # ignore warnings
6869                                         ;;
6870                                 -D*)
6871                                         clopts+=("\$1")
6872                                         ;;
6873                                 -I*)
6874                                         clopts+=("\$1")
6875                                         ;;
6876                                 -l*)
6877                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6878                                         ;;
6879                                 -L*)
6880                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6881                                         ;;
6882                                 *.obj | *.o)
6883                                         ldopts+=("\$1")
6884                                         ;;
6885                                 -Wl,*)
6886                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6887                                                 ldopts+=("\${linkarg}")
6888                                         done
6889                                         ;;
6890                                 *.lib)
6891                                         ldopts+=("\$1")
6892                                         ;;
6893                                 -o)
6894                                         shift
6895                                         ldopts+=("-out:\$1")
6896                                         ;;
6897                                 *)
6898                                         clopts+=("\$1")
6899                                         ldopts+=("\$1")
6900                                         ;;
6901                         esac
6902                         shift
6903                 done
6904                 if [ "\$isdll" -ne 0 ]; then
6905                         for lib in \${libs[*]}; do
6906                                 ldopts+=("\$lib.dll.lib")
6907                         done
6908                 else
6909                         for lib in \${libs[*]}; do
6910                                 ldopts+=("\$lib.lib")
6911                         done
6912                 fi
6913                 cat <<-EOF
6914                 Creating program
6915                 ** ld options:   "\${ldopts[@]}"
6916 EOF
6917                 exec \$LD \${ldopts[@]}
6918 CF_EOF
6919                 chmod +x mk_prog.sh
6920                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6921                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6922                 ;;
6923         (mingw*)
6924                 cf_cv_shlib_version=mingw
6925                 cf_cv_shlib_version_infix=mingw
6926                 shlibdir=$bindir
6927                 MAKE_DLLS=
6928                 if test "$DFT_LWR_MODEL" = "shared" ; then
6929                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6930                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6931                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6932                 fi
6933                 CC_SHARED_OPTS=
6934                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6935                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6936                 cat >mk_shared_lib.sh <<-CF_EOF
6937                 #!$SHELL
6938                 SHARED_LIB=\$1
6939                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6940                 shift
6941                 cat <<-EOF
6942                 Linking shared library
6943                 ** SHARED_LIB \$SHARED_LIB
6944                 ** IMPORT_LIB \$IMPORT_LIB
6945 EOF
6946                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6947 CF_EOF
6948                 chmod +x mk_shared_lib.sh
6949                 ;;
6950         (openbsd[2-9].*|mirbsd*)
6951                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6952                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6953                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6954                 fi
6955                 if test "$cf_cv_enable_rpath" = yes ; then
6956                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6957                 fi
6958                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6959
6960         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6961         if test "$cf_cv_shlib_version" = rel; then
6962                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6963         else
6964                 cf_cv_shared_soname='`basename $@`'
6965         fi
6966
6967                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6968                 ;;
6969         (nskJ*)
6970                 CC_SHARED_OPTS=
6971                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6972                 ;;
6973         (nskL*)
6974                 CC_SHARED_OPTS=
6975                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6976                 ;;
6977         (nto-qnx*|openbsd*|freebsd[12].*)
6978                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6979                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6980                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6981                 ;;
6982         (dragonfly*|freebsd*)
6983                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6984                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6985                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6986                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6987                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6988                 fi
6989
6990         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6991         if test "$cf_cv_shlib_version" = rel; then
6992                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6993         else
6994                 cf_cv_shared_soname='`basename $@`'
6995         fi
6996
6997                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6998                 ;;
6999         (netbsd*)
7000                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7001                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7002                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7003                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7004                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7005                         if test "$cf_cv_shlib_version" = auto; then
7006                         if test -f /usr/libexec/ld.elf_so; then
7007                                 cf_cv_shlib_version=abi
7008                         else
7009                                 cf_cv_shlib_version=rel
7010                         fi
7011                         fi
7012
7013         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7014         if test "$cf_cv_shlib_version" = rel; then
7015                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7016         else
7017                 cf_cv_shared_soname='`basename $@`'
7018         fi
7019
7020                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7021                 else
7022                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
7023                 fi
7024                 ;;
7025         (osf*|mls+*)
7026                 # tested with OSF/1 V3.2 and 'cc'
7027                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7028                 # link with shared libs).
7029                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7030                 case "$host_os" in
7031                 (osf4*)
7032                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7033                         ;;
7034                 esac
7035                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7036                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7037                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7038                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7039                 fi
7040                 cf_cv_rm_so_locs=yes
7041                 ;;
7042         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
7043                 # tested with osr5.0.5
7044                 if test "$GCC" != yes; then
7045                         CC_SHARED_OPTS='-belf -KPIC'
7046                 fi
7047                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7048                 if test "$cf_cv_enable_rpath" = yes ; then
7049                         # only way is to set LD_RUN_PATH but no switch for it
7050                         RUN_PATH=$libdir
7051                 fi
7052                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7053                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7054                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7055                 ;;
7056         (sunos4*)
7057                 # tested with SunOS 4.1.1 and gcc 2.7.0
7058                 if test "$GCC" != yes; then
7059                         CC_SHARED_OPTS='-KPIC'
7060                 fi
7061                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
7062                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7063                 ;;
7064         (solaris2*)
7065                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7066                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7067                 if test "$DFT_LWR_MODEL" = "shared" ; then
7068                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7069                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7070                 fi
7071                 if test "$cf_cv_enable_rpath" = yes ; then
7072                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7073                 fi
7074
7075         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7076         if test "$cf_cv_shlib_version" = rel; then
7077                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7078         else
7079                 cf_cv_shared_soname='`basename $@`'
7080         fi
7081
7082                 if test "$GCC" != yes; then
7083                         cf_save_CFLAGS="$CFLAGS"
7084                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7085                         do
7086                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7087                                 cat >"conftest.$ac_ext" <<_ACEOF
7088 #line 7088 "configure"
7089 #include "confdefs.h"
7090 #include <stdio.h>
7091 int
7092 main (void)
7093 {
7094 printf("Hello\\n");
7095   ;
7096   return 0;
7097 }
7098 _ACEOF
7099 rm -f "conftest.$ac_objext"
7100 if { (eval echo "$as_me:7100: \"$ac_compile\"") >&5
7101   (eval $ac_compile) 2>&5
7102   ac_status=$?
7103   echo "$as_me:7103: \$? = $ac_status" >&5
7104   (exit "$ac_status"); } &&
7105          { ac_try='test -s "conftest.$ac_objext"'
7106   { (eval echo "$as_me:7106: \"$ac_try\"") >&5
7107   (eval $ac_try) 2>&5
7108   ac_status=$?
7109   echo "$as_me:7109: \$? = $ac_status" >&5
7110   (exit "$ac_status"); }; }; then
7111   break
7112 else
7113   echo "$as_me: failed program was:" >&5
7114 cat "conftest.$ac_ext" >&5
7115 fi
7116 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7117                         done
7118                         CFLAGS="$cf_save_CFLAGS"
7119                         CC_SHARED_OPTS=$cf_shared_opts
7120                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
7121                 else
7122                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7123                 fi
7124                 ;;
7125         (sysv5uw7*|unix_sv*)
7126                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7127                 if test "$GCC" != yes; then
7128                         CC_SHARED_OPTS='-KPIC'
7129                 fi
7130                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
7131                 ;;
7132         (*)
7133                 CC_SHARED_OPTS='unknown'
7134                 MK_SHARED_LIB='echo unknown'
7135                 ;;
7136         esac
7137
7138         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7139         case "$cf_cv_shlib_version" in
7140         (rel|abi)
7141                 case "$MK_SHARED_LIB" in
7142                 (*'-o $@')
7143                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7144                         ;;
7145                 (*)
7146                         { echo "$as_me:7146: WARNING: ignored --with-shlib-version" >&5
7147 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7148                         ;;
7149                 esac
7150                 ;;
7151         esac
7152
7153         if test -n "$cf_try_cflags"
7154         then
7155 cat > conftest.$ac_ext <<EOF
7156 #line 7156 "${as_me:-configure}"
7157 #include <stdio.h>
7158 int main(int argc, char *argv[])
7159 {
7160         printf("hello\\n");
7161         return (argv[argc-1] == 0) ;
7162 }
7163 EOF
7164                 cf_save_CFLAGS="$CFLAGS"
7165                 for cf_opt in $cf_try_cflags
7166                 do
7167                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
7168                         echo "$as_me:7168: checking if CFLAGS option -$cf_opt works" >&5
7169 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7170                         if { (eval echo "$as_me:7170: \"$ac_compile\"") >&5
7171   (eval $ac_compile) 2>&5
7172   ac_status=$?
7173   echo "$as_me:7173: \$? = $ac_status" >&5
7174   (exit "$ac_status"); }; then
7175                                 echo "$as_me:7175: result: yes" >&5
7176 echo "${ECHO_T}yes" >&6
7177                                 cf_save_CFLAGS="$CFLAGS"
7178                         else
7179                                 echo "$as_me:7179: result: no" >&5
7180 echo "${ECHO_T}no" >&6
7181                         fi
7182                 done
7183                 CFLAGS="$cf_save_CFLAGS"
7184         fi
7185
7186         # RPATH_LIST is a colon-separated list of directories
7187         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7188         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7189
7190         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7191
7192         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7193
7194 echo "${as_me:-configure}:7194: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7195
7196         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7197
7198 echo "${as_me:-configure}:7198: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7199
7200 for model in $cf_list_models ; do
7201         case "$model" in
7202         (libtool)
7203
7204 echo "$as_me:7204: checking for additional libtool options" >&5
7205 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
7206
7207 # Check whether --with-libtool-opts or --without-libtool-opts was given.
7208 if test "${with_libtool_opts+set}" = set; then
7209   withval="$with_libtool_opts"
7210   with_libtool_opts=$withval
7211 else
7212   with_libtool_opts=no
7213 fi;
7214 echo "$as_me:7214: result: $with_libtool_opts" >&5
7215 echo "${ECHO_T}$with_libtool_opts" >&6
7216
7217 case .$with_libtool_opts in
7218 (.yes|.no|.)
7219         ;;
7220 (*)
7221         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
7222         ;;
7223 esac
7224
7225 echo "$as_me:7225: checking if exported-symbols file should be used" >&5
7226 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
7227
7228 # Check whether --with-export-syms or --without-export-syms was given.
7229 if test "${with_export_syms+set}" = set; then
7230   withval="$with_export_syms"
7231   with_export_syms=$withval
7232 else
7233   with_export_syms=no
7234 fi;
7235 if test "x$with_export_syms" = xyes
7236 then
7237         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
7238
7239 fi
7240 echo "$as_me:7240: result: $with_export_syms" >&5
7241 echo "${ECHO_T}$with_export_syms" >&6
7242 if test "x$with_export_syms" != xno
7243 then
7244         EXPORT_SYMS="-export-symbols $with_export_syms"
7245
7246 fi
7247
7248                 ;;
7249         (shared)
7250                 if test "$CC_SHARED_OPTS" = "unknown"; then
7251                         { { echo "$as_me:7251: error: Shared libraries are not supported in this version" >&5
7252 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
7253    { (exit 1); exit 1; }; }
7254                 fi
7255                 # workaround for inept transition to PIE vs PIC...
7256                 echo "$as_me:7256: checking if current CFLAGS link properly" >&5
7257 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
7258                 cat >"conftest.$ac_ext" <<_ACEOF
7259 #line 7259 "configure"
7260 #include "confdefs.h"
7261 #include <stdio.h>
7262 int
7263 main (void)
7264 {
7265 printf("Hello work\\n");
7266   ;
7267   return 0;
7268 }
7269 _ACEOF
7270 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7271 if { (eval echo "$as_me:7271: \"$ac_link\"") >&5
7272   (eval $ac_link) 2>&5
7273   ac_status=$?
7274   echo "$as_me:7274: \$? = $ac_status" >&5
7275   (exit "$ac_status"); } &&
7276          { ac_try='test -s "conftest$ac_exeext"'
7277   { (eval echo "$as_me:7277: \"$ac_try\"") >&5
7278   (eval $ac_try) 2>&5
7279   ac_status=$?
7280   echo "$as_me:7280: \$? = $ac_status" >&5
7281   (exit "$ac_status"); }; }; then
7282   cf_cflags_work=yes
7283 else
7284   echo "$as_me: failed program was:" >&5
7285 cat "conftest.$ac_ext" >&5
7286 cf_cflags_work=no
7287 fi
7288 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7289                 echo "$as_me:7289: result: $cf_cflags_work" >&5
7290 echo "${ECHO_T}$cf_cflags_work" >&6
7291                 if test "$cf_cflags_work" = no
7292                 then
7293                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
7294
7295 echo "${as_me:-configure}:7295: testing try to work around by appending shared-options ..." 1>&5
7296
7297                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
7298                 fi
7299
7300 echo "$as_me:7300: checking if versioned-symbols file should be used" >&5
7301 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
7302
7303 # Check whether --with-versioned-syms or --without-versioned-syms was given.
7304 if test "${with_versioned_syms+set}" = set; then
7305   withval="$with_versioned_syms"
7306   with_versioned_syms=$withval
7307 else
7308   with_versioned_syms=no
7309 fi;
7310 case "x$with_versioned_syms" in
7311 (xyes)
7312         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
7313
7314         ;;
7315 (xno)
7316         ;;
7317 (x/*)
7318         test -f "$with_versioned_syms" || { { echo "$as_me:7318: error: expected a filename: $with_versioned_syms" >&5
7319 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7320    { (exit 1); exit 1; }; }
7321         ;;
7322 (*)
7323         test -f "$with_versioned_syms" || { { echo "$as_me:7323: error: expected a filename: $with_versioned_syms" >&5
7324 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7325    { (exit 1); exit 1; }; }
7326         with_versioned_syms=`pwd`/"$with_versioned_syms"
7327         ;;
7328 esac
7329 echo "$as_me:7329: result: $with_versioned_syms" >&5
7330 echo "${ECHO_T}$with_versioned_syms" >&6
7331
7332 RESULTING_SYMS=
7333 VERSIONED_SYMS=
7334 WILDCARD_SYMS=
7335
7336 if test "x$with_versioned_syms" != xno
7337 then
7338         RESULTING_SYMS=$with_versioned_syms
7339         case "x$MK_SHARED_LIB" in
7340         (*-Wl,*)
7341                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
7342                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
7343                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7344
7345 echo "${as_me:-configure}:7345: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7346
7347                 ;;
7348         (*-dy\ *)
7349                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
7350                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
7351                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7352
7353 echo "${as_me:-configure}:7353: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7354
7355                 ;;
7356         (*)
7357                 { echo "$as_me:7357: WARNING: this system does not support versioned-symbols" >&5
7358 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
7359                 ;;
7360         esac
7361
7362         # Linux ld can selectively override scope, e.g., of symbols beginning with
7363         # "_" by first declaring some as global, and then using a wildcard to
7364         # declare the others as local.  Some other loaders cannot do this.  Check
7365         # by constructing a (very) simple shared library and inspecting its
7366         # symbols.
7367         if test "x$VERSIONED_SYMS" != "x"
7368         then
7369                 echo "$as_me:7369: checking if wildcards can be used to selectively omit symbols" >&5
7370 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
7371                 WILDCARD_SYMS=no
7372
7373                 # make sources
7374                 rm -f conftest.*
7375
7376                 cat >conftest.ver <<EOF
7377 module_1.0 {
7378 global:
7379         globalf1;
7380 local:
7381         localf1;
7382 };
7383 module_2.0 {
7384 global:
7385         globalf2;
7386 local:
7387         localf2;
7388         _*;
7389 } module_1.0;
7390 submodule_1.0 {
7391 global:
7392         subglobalf1;
7393         _ismissing;
7394 local:
7395         sublocalf1;
7396 };
7397 submodule_2.0 {
7398 global:
7399         subglobalf2;
7400 local:
7401         sublocalf2;
7402         _*;
7403 } submodule_1.0;
7404 EOF
7405                 cat >conftest.$ac_ext <<EOF
7406 #line 7406 "configure"
7407 int     _ismissing(void) { return 1; }
7408 int     _localf1(void) { return 1; }
7409 int     _localf2(void) { return 2; }
7410 int     globalf1(void) { return 1; }
7411 int     globalf2(void) { return 2; }
7412 int     _sublocalf1(void) { return 1; }
7413 int     _sublocalf2(void) { return 2; }
7414 int     subglobalf1(void) { return 1; }
7415 int     subglobalf2(void) { return 2; }
7416 EOF
7417                 cat >conftest.mk <<EOF
7418 CC=${CC}
7419 CFLAGS=${CFLAGS}
7420 CPPFLAGS=${CPPFLAGS}
7421 LDFLAGS=${LDFLAGS}
7422 LIBS=${LIBS}
7423 VERSIONED_SYMS=${VERSIONED_SYMS}
7424 RESULTING_SYMS=conftest.ver
7425 MK_SHARED_LIB=${MK_SHARED_LIB}
7426 conftest.so: conftest.$ac_cv_objext
7427                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
7428 EOF
7429
7430                 # compile source, make library
7431                 if make -f conftest.mk 2>&5 >/dev/null
7432                 then
7433                         # test for missing symbol in either Data or Text section
7434                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
7435                         test -n "$cf_missing" && WILDCARD_SYMS=yes
7436                 fi
7437                 echo "$as_me:7437: result: $WILDCARD_SYMS" >&5
7438 echo "${ECHO_T}$WILDCARD_SYMS" >&6
7439                 rm -f conftest.*
7440         fi
7441 fi
7442
7443                 ;;
7444         esac
7445 done
7446
7447 ### Checks for special libraries, must be done up-front.
7448 SHLIB_LIST=""
7449
7450 echo "$as_me:7450: checking if you want to link with the GPM mouse library" >&5
7451 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7452
7453 # Check whether --with-gpm or --without-gpm was given.
7454 if test "${with_gpm+set}" = set; then
7455   withval="$with_gpm"
7456   with_gpm=$withval
7457 else
7458   with_gpm=maybe
7459 fi;
7460 echo "$as_me:7460: result: $with_gpm" >&5
7461 echo "${ECHO_T}$with_gpm" >&6
7462
7463 if test "$with_gpm" != no ; then
7464         echo "$as_me:7464: checking for gpm.h" >&5
7465 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7466 if test "${ac_cv_header_gpm_h+set}" = set; then
7467   echo $ECHO_N "(cached) $ECHO_C" >&6
7468 else
7469   cat >"conftest.$ac_ext" <<_ACEOF
7470 #line 7470 "configure"
7471 #include "confdefs.h"
7472 #include <gpm.h>
7473 _ACEOF
7474 if { (eval echo "$as_me:7474: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7475   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7476   ac_status=$?
7477   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7478   rm -f conftest.er1
7479   cat conftest.err >&5
7480   echo "$as_me:7480: \$? = $ac_status" >&5
7481   (exit "$ac_status"); } >/dev/null; then
7482   if test -s conftest.err; then
7483     ac_cpp_err=$ac_c_preproc_warn_flag
7484   else
7485     ac_cpp_err=
7486   fi
7487 else
7488   ac_cpp_err=yes
7489 fi
7490 if test -z "$ac_cpp_err"; then
7491   ac_cv_header_gpm_h=yes
7492 else
7493   echo "$as_me: failed program was:" >&5
7494   cat "conftest.$ac_ext" >&5
7495   ac_cv_header_gpm_h=no
7496 fi
7497 rm -f conftest.err "conftest.$ac_ext"
7498 fi
7499 echo "$as_me:7499: result: $ac_cv_header_gpm_h" >&5
7500 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7501 if test "$ac_cv_header_gpm_h" = yes; then
7502
7503 cat >>confdefs.h <<\EOF
7504 #define HAVE_GPM_H 1
7505 EOF
7506
7507                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7508                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7509
7510 echo "${as_me:-configure}:7510: testing assuming we really have GPM library ..." 1>&5
7511
7512 cat >>confdefs.h <<\EOF
7513 #define HAVE_LIBGPM 1
7514 EOF
7515
7516                         with_gpm=yes
7517                 else
7518                         echo "$as_me:7518: checking for Gpm_Open in -lgpm" >&5
7519 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7520 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7521   echo $ECHO_N "(cached) $ECHO_C" >&6
7522 else
7523   ac_check_lib_save_LIBS=$LIBS
7524 LIBS="-lgpm  $LIBS"
7525 cat >"conftest.$ac_ext" <<_ACEOF
7526 #line 7526 "configure"
7527 #include "confdefs.h"
7528
7529 /* Override any gcc2 internal prototype to avoid an error.  */
7530 #ifdef __cplusplus
7531 extern "C"
7532 #endif
7533 /* We use char because int might match the return type of a gcc2
7534    builtin and then its argument prototype would still apply.  */
7535 char Gpm_Open ();
7536 int
7537 main (void)
7538 {
7539 Gpm_Open ();
7540   ;
7541   return 0;
7542 }
7543 _ACEOF
7544 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7545 if { (eval echo "$as_me:7545: \"$ac_link\"") >&5
7546   (eval $ac_link) 2>&5
7547   ac_status=$?
7548   echo "$as_me:7548: \$? = $ac_status" >&5
7549   (exit "$ac_status"); } &&
7550          { ac_try='test -s "conftest$ac_exeext"'
7551   { (eval echo "$as_me:7551: \"$ac_try\"") >&5
7552   (eval $ac_try) 2>&5
7553   ac_status=$?
7554   echo "$as_me:7554: \$? = $ac_status" >&5
7555   (exit "$ac_status"); }; }; then
7556   ac_cv_lib_gpm_Gpm_Open=yes
7557 else
7558   echo "$as_me: failed program was:" >&5
7559 cat "conftest.$ac_ext" >&5
7560 ac_cv_lib_gpm_Gpm_Open=no
7561 fi
7562 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7563 LIBS=$ac_check_lib_save_LIBS
7564 fi
7565 echo "$as_me:7565: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7566 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7567 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7568   with_gpm=yes
7569 else
7570
7571                                 if test "$with_gpm" = maybe; then
7572                                         { echo "$as_me:7572: WARNING: Cannot link with GPM library" >&5
7573 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7574                                         with_gpm=no
7575                                 else
7576                                         { { echo "$as_me:7576: error: Cannot link with GPM library" >&5
7577 echo "$as_me: error: Cannot link with GPM library" >&2;}
7578    { (exit 1); exit 1; }; }
7579                                 fi
7580
7581 fi
7582
7583                 fi
7584
7585 else
7586
7587                 test "$with_gpm" != maybe && { echo "$as_me:7587: WARNING: Cannot find GPM header" >&5
7588 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7589                 with_gpm=no
7590
7591 fi
7592
7593 fi
7594
7595 if test "$with_gpm" != no ; then
7596         echo "$as_me:7596: checking if you want to load GPM dynamically" >&5
7597 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7598
7599 # Check whether --with-dlsym or --without-dlsym was given.
7600 if test "${with_dlsym+set}" = set; then
7601   withval="$with_dlsym"
7602   with_dlsym=$withval
7603 else
7604   with_dlsym=yes
7605 fi;
7606         echo "$as_me:7606: result: $with_dlsym" >&5
7607 echo "${ECHO_T}$with_dlsym" >&6
7608         if test "x$with_dlsym" = xyes ; then
7609
7610 cf_have_dlsym=no
7611 echo "$as_me:7611: checking for dlsym" >&5
7612 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7613 if test "${ac_cv_func_dlsym+set}" = set; then
7614   echo $ECHO_N "(cached) $ECHO_C" >&6
7615 else
7616   cat >"conftest.$ac_ext" <<_ACEOF
7617 #line 7617 "configure"
7618 #include "confdefs.h"
7619 #define dlsym autoconf_temporary
7620 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7621 #undef dlsym
7622
7623 #ifdef __cplusplus
7624 extern "C"
7625 #endif
7626
7627 /* We use char because int might match the return type of a gcc2
7628    builtin and then its argument prototype would still apply.  */
7629 char dlsym (void);
7630
7631 int
7632 main (void)
7633 {
7634
7635 /* The GNU C library defines stubs for functions which it implements
7636     to always fail with ENOSYS.  Some functions are actually named
7637     something starting with __ and the normal name is an alias.  */
7638 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7639 #error found stub for dlsym
7640 #endif
7641
7642         return dlsym ();
7643   ;
7644   return 0;
7645 }
7646 _ACEOF
7647 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7648 if { (eval echo "$as_me:7648: \"$ac_link\"") >&5
7649   (eval $ac_link) 2>&5
7650   ac_status=$?
7651   echo "$as_me:7651: \$? = $ac_status" >&5
7652   (exit "$ac_status"); } &&
7653          { ac_try='test -s "conftest$ac_exeext"'
7654   { (eval echo "$as_me:7654: \"$ac_try\"") >&5
7655   (eval $ac_try) 2>&5
7656   ac_status=$?
7657   echo "$as_me:7657: \$? = $ac_status" >&5
7658   (exit "$ac_status"); }; }; then
7659   ac_cv_func_dlsym=yes
7660 else
7661   echo "$as_me: failed program was:" >&5
7662 cat "conftest.$ac_ext" >&5
7663 ac_cv_func_dlsym=no
7664 fi
7665 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7666 fi
7667 echo "$as_me:7667: result: $ac_cv_func_dlsym" >&5
7668 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7669 if test "$ac_cv_func_dlsym" = yes; then
7670   cf_have_dlsym=yes
7671 else
7672
7673 cf_have_libdl=no
7674 echo "$as_me:7674: checking for dlsym in -ldl" >&5
7675 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7676 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7677   echo $ECHO_N "(cached) $ECHO_C" >&6
7678 else
7679   ac_check_lib_save_LIBS=$LIBS
7680 LIBS="-ldl  $LIBS"
7681 cat >"conftest.$ac_ext" <<_ACEOF
7682 #line 7682 "configure"
7683 #include "confdefs.h"
7684
7685 /* Override any gcc2 internal prototype to avoid an error.  */
7686 #ifdef __cplusplus
7687 extern "C"
7688 #endif
7689 /* We use char because int might match the return type of a gcc2
7690    builtin and then its argument prototype would still apply.  */
7691 char dlsym ();
7692 int
7693 main (void)
7694 {
7695 dlsym ();
7696   ;
7697   return 0;
7698 }
7699 _ACEOF
7700 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7701 if { (eval echo "$as_me:7701: \"$ac_link\"") >&5
7702   (eval $ac_link) 2>&5
7703   ac_status=$?
7704   echo "$as_me:7704: \$? = $ac_status" >&5
7705   (exit "$ac_status"); } &&
7706          { ac_try='test -s "conftest$ac_exeext"'
7707   { (eval echo "$as_me:7707: \"$ac_try\"") >&5
7708   (eval $ac_try) 2>&5
7709   ac_status=$?
7710   echo "$as_me:7710: \$? = $ac_status" >&5
7711   (exit "$ac_status"); }; }; then
7712   ac_cv_lib_dl_dlsym=yes
7713 else
7714   echo "$as_me: failed program was:" >&5
7715 cat "conftest.$ac_ext" >&5
7716 ac_cv_lib_dl_dlsym=no
7717 fi
7718 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7719 LIBS=$ac_check_lib_save_LIBS
7720 fi
7721 echo "$as_me:7721: result: $ac_cv_lib_dl_dlsym" >&5
7722 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7723 if test "$ac_cv_lib_dl_dlsym" = yes; then
7724
7725         cf_have_dlsym=yes
7726         cf_have_libdl=yes
7727 fi
7728
7729 fi
7730
7731 if test "$cf_have_dlsym" = yes ; then
7732         test "$cf_have_libdl" = yes && {
7733 cf_add_libs="$LIBS"
7734 # reverse order
7735 cf_add_0lib=
7736 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7737 # filter duplicates
7738 for cf_add_1lib in $cf_add_0lib; do
7739         for cf_add_2lib in $cf_add_libs; do
7740                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7741                         cf_add_1lib=
7742                         break
7743                 fi
7744         done
7745         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7746 done
7747 LIBS="$cf_add_libs"
7748  }
7749
7750         echo "$as_me:7750: checking whether able to link to dl*() functions" >&5
7751 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7752         cat >"conftest.$ac_ext" <<_ACEOF
7753 #line 7753 "configure"
7754 #include "confdefs.h"
7755 #include <dlfcn.h>
7756 int
7757 main (void)
7758 {
7759
7760                 void *obj;
7761                 if ((obj = dlopen("filename", 0)) != 0) {
7762                         if (dlsym(obj, "symbolname") == 0) {
7763                         dlclose(obj);
7764                         }
7765                 }
7766   ;
7767   return 0;
7768 }
7769 _ACEOF
7770 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7771 if { (eval echo "$as_me:7771: \"$ac_link\"") >&5
7772   (eval $ac_link) 2>&5
7773   ac_status=$?
7774   echo "$as_me:7774: \$? = $ac_status" >&5
7775   (exit "$ac_status"); } &&
7776          { ac_try='test -s "conftest$ac_exeext"'
7777   { (eval echo "$as_me:7777: \"$ac_try\"") >&5
7778   (eval $ac_try) 2>&5
7779   ac_status=$?
7780   echo "$as_me:7780: \$? = $ac_status" >&5
7781   (exit "$ac_status"); }; }; then
7782
7783 cat >>confdefs.h <<\EOF
7784 #define HAVE_LIBDL 1
7785 EOF
7786
7787 else
7788   echo "$as_me: failed program was:" >&5
7789 cat "conftest.$ac_ext" >&5
7790
7791                 { { echo "$as_me:7791: error: Cannot link test program for libdl" >&5
7792 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7793    { (exit 1); exit 1; }; }
7794 fi
7795 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7796         echo "$as_me:7796: result: ok" >&5
7797 echo "${ECHO_T}ok" >&6
7798 else
7799         { { echo "$as_me:7799: error: Cannot find dlsym function" >&5
7800 echo "$as_me: error: Cannot find dlsym function" >&2;}
7801    { (exit 1); exit 1; }; }
7802 fi
7803
7804                 if test "x$with_gpm" != xyes ; then
7805                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7806
7807 echo "${as_me:-configure}:7807: testing assuming soname for gpm is $with_gpm ..." 1>&5
7808
7809                         cf_cv_gpm_soname="$with_gpm"
7810                 else
7811
7812 echo "$as_me:7812: checking for soname of gpm library" >&5
7813 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7814 if test "${cf_cv_gpm_soname+set}" = set; then
7815   echo $ECHO_N "(cached) $ECHO_C" >&6
7816 else
7817
7818 cf_cv_gpm_soname=unknown
7819 if test "$cross_compiling" != yes ; then
7820 cat >conftest.$ac_ext <<CF_EOF
7821 #include <gpm.h>
7822 int main(void)
7823 {
7824 if (Gpm_Open(0,0)) Gpm_Close();
7825         ${cf_cv_main_return:-return}(0);
7826 }
7827 CF_EOF
7828 cf_save_LIBS="$LIBS"
7829
7830 cf_add_libs="$LIBS"
7831 # reverse order
7832 cf_add_0lib=
7833 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7834 # filter duplicates
7835 for cf_add_1lib in $cf_add_0lib; do
7836         for cf_add_2lib in $cf_add_libs; do
7837                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7838                         cf_add_1lib=
7839                         break
7840                 fi
7841         done
7842         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7843 done
7844 LIBS="$cf_add_libs"
7845
7846         if { (eval echo "$as_me:7846: \"$ac_compile\"") >&5
7847   (eval $ac_compile) 2>&5
7848   ac_status=$?
7849   echo "$as_me:7849: \$? = $ac_status" >&5
7850   (exit "$ac_status"); } ; then
7851                 if { (eval echo "$as_me:7851: \"$ac_link\"") >&5
7852   (eval $ac_link) 2>&5
7853   ac_status=$?
7854   echo "$as_me:7854: \$? = $ac_status" >&5
7855   (exit "$ac_status"); } ; then
7856                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7857                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7858                 fi
7859         fi
7860 rm -rf ./conftest*
7861 LIBS="$cf_save_LIBS"
7862 fi
7863
7864 fi
7865 echo "$as_me:7865: result: $cf_cv_gpm_soname" >&5
7866 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7867
7868                 fi
7869                 test "$cf_cv_gpm_soname" != "unknown" &&
7870 cat >>confdefs.h <<EOF
7871 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7872 EOF
7873
7874                 SHLIB_LIST="-ldl $SHLIB_LIST"
7875
7876 cf_add_libs="$PRIVATE_LIBS"
7877 # reverse order
7878 cf_add_0lib=
7879 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7880 # filter duplicates
7881 for cf_add_1lib in $cf_add_0lib; do
7882         for cf_add_2lib in $cf_add_libs; do
7883                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7884                         cf_add_1lib=
7885                         break
7886                 fi
7887         done
7888         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7889 done
7890 PRIVATE_LIBS="$cf_add_libs"
7891
7892         else
7893                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7894
7895 cf_add_libs="$TEST_LIBS"
7896 # reverse order
7897 cf_add_0lib=
7898 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7899 # filter duplicates
7900 for cf_add_1lib in $cf_add_0lib; do
7901         for cf_add_2lib in $cf_add_libs; do
7902                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7903                         cf_add_1lib=
7904                         break
7905                 fi
7906         done
7907         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7908 done
7909 TEST_LIBS="$cf_add_libs"
7910
7911 cf_add_libs="$PRIVATE_LIBS"
7912 # reverse order
7913 cf_add_0lib=
7914 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7915 # filter duplicates
7916 for cf_add_1lib in $cf_add_0lib; do
7917         for cf_add_2lib in $cf_add_libs; do
7918                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7919                         cf_add_1lib=
7920                         break
7921                 fi
7922         done
7923         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7924 done
7925 PRIVATE_LIBS="$cf_add_libs"
7926
7927         fi
7928
7929 cat >>confdefs.h <<\EOF
7930 #define HAVE_LIBGPM 1
7931 EOF
7932
7933 echo "$as_me:7933: checking for Gpm_Wgetch in -lgpm" >&5
7934 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7935 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7936   echo $ECHO_N "(cached) $ECHO_C" >&6
7937 else
7938   ac_check_lib_save_LIBS=$LIBS
7939 LIBS="-lgpm  $LIBS"
7940 cat >"conftest.$ac_ext" <<_ACEOF
7941 #line 7941 "configure"
7942 #include "confdefs.h"
7943
7944 /* Override any gcc2 internal prototype to avoid an error.  */
7945 #ifdef __cplusplus
7946 extern "C"
7947 #endif
7948 /* We use char because int might match the return type of a gcc2
7949    builtin and then its argument prototype would still apply.  */
7950 char Gpm_Wgetch ();
7951 int
7952 main (void)
7953 {
7954 Gpm_Wgetch ();
7955   ;
7956   return 0;
7957 }
7958 _ACEOF
7959 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7960 if { (eval echo "$as_me:7960: \"$ac_link\"") >&5
7961   (eval $ac_link) 2>&5
7962   ac_status=$?
7963   echo "$as_me:7963: \$? = $ac_status" >&5
7964   (exit "$ac_status"); } &&
7965          { ac_try='test -s "conftest$ac_exeext"'
7966   { (eval echo "$as_me:7966: \"$ac_try\"") >&5
7967   (eval $ac_try) 2>&5
7968   ac_status=$?
7969   echo "$as_me:7969: \$? = $ac_status" >&5
7970   (exit "$ac_status"); }; }; then
7971   ac_cv_lib_gpm_Gpm_Wgetch=yes
7972 else
7973   echo "$as_me: failed program was:" >&5
7974 cat "conftest.$ac_ext" >&5
7975 ac_cv_lib_gpm_Gpm_Wgetch=no
7976 fi
7977 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7978 LIBS=$ac_check_lib_save_LIBS
7979 fi
7980 echo "$as_me:7980: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7981 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7982 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7983
7984 echo "$as_me:7984: checking if GPM is weakly bound to curses library" >&5
7985 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7986 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7987   echo $ECHO_N "(cached) $ECHO_C" >&6
7988 else
7989
7990 cf_cv_check_gpm_wgetch=unknown
7991 if test "$cross_compiling" != yes ; then
7992
7993 cat >conftest.$ac_ext <<CF_EOF
7994 #include <gpm.h>
7995 int main(void)
7996 {
7997         Gpm_Wgetch();
7998         ${cf_cv_main_return:-return}(0);
7999 }
8000 CF_EOF
8001
8002         cf_save_LIBS="$LIBS"
8003         # This only works if we can look at the symbol table.  If a shared
8004         # library is stripped for install, we cannot use that.  So we're forced
8005         # to rely on the static library, noting that some packagers may not
8006         # include it.
8007         LIBS="-static -lgpm -dynamic $LIBS"
8008         if { (eval echo "$as_me:8008: \"$ac_compile\"") >&5
8009   (eval $ac_compile) 2>&5
8010   ac_status=$?
8011   echo "$as_me:8011: \$? = $ac_status" >&5
8012   (exit "$ac_status"); } ; then
8013                 if { (eval echo "$as_me:8013: \"$ac_link\"") >&5
8014   (eval $ac_link) 2>&5
8015   ac_status=$?
8016   echo "$as_me:8016: \$? = $ac_status" >&5
8017   (exit "$ac_status"); } ; then
8018                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
8019                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
8020                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
8021                 fi
8022         fi
8023         rm -rf ./conftest*
8024         LIBS="$cf_save_LIBS"
8025 fi
8026
8027 fi
8028 echo "$as_me:8028: result: $cf_cv_check_gpm_wgetch" >&5
8029 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
8030
8031 if test "$cf_cv_check_gpm_wgetch" != yes ; then
8032         { echo "$as_me:8032: WARNING: GPM library is already linked with curses - read the FAQ" >&5
8033 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
8034 fi
8035
8036 fi
8037
8038 fi
8039
8040 echo "$as_me:8040: checking if you want to use PCRE2 for regular-expressions" >&5
8041 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
8042
8043 # Check whether --with-pcre2 or --without-pcre2 was given.
8044 if test "${with_pcre2+set}" = set; then
8045   withval="$with_pcre2"
8046
8047 fi;
8048 test -z "$with_pcre2" && with_pcre2=no
8049 echo "$as_me:8049: result: $with_pcre2" >&5
8050 echo "${ECHO_T}$with_pcre2" >&6
8051
8052 if test "x$with_pcre2" != xno ; then
8053         cf_with_pcre2_ok=no
8054         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
8055         do
8056
8057 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
8058         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
8059
8060 echo "${as_me:-configure}:8060: testing found package $cf_with_pcre2 ..." 1>&5
8061
8062         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
8063         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
8064         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
8065
8066 echo "${as_me:-configure}:8066: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8067
8068         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
8069
8070 echo "${as_me:-configure}:8070: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
8071
8072 cf_fix_cppflags=no
8073 cf_new_cflags=
8074 cf_new_cppflags=
8075 cf_new_extra_cppflags=
8076
8077 for cf_add_cflags in $cf_pkgconfig_incs
8078 do
8079 case "$cf_fix_cppflags" in
8080 (no)
8081         case "$cf_add_cflags" in
8082         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8083                 case "$cf_add_cflags" in
8084                 (-D*)
8085                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8086
8087                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8088                                 && test -z "${cf_tst_cflags}" \
8089                                 && cf_fix_cppflags=yes
8090
8091                         if test "$cf_fix_cppflags" = yes ; then
8092
8093         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8094         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8095
8096                                 continue
8097                         elif test "${cf_tst_cflags}" = "\"'" ; then
8098
8099         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8100         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8101
8102                                 continue
8103                         fi
8104                         ;;
8105                 esac
8106                 case "$CPPFLAGS" in
8107                 (*$cf_add_cflags)
8108                         ;;
8109                 (*)
8110                         case "$cf_add_cflags" in
8111                         (-D*)
8112                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8113
8114 CPPFLAGS=`echo "$CPPFLAGS" | \
8115         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8116                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8117
8118                                 ;;
8119                         esac
8120
8121         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8122         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8123
8124                         ;;
8125                 esac
8126                 ;;
8127         (*)
8128
8129         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8130         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8131
8132                 ;;
8133         esac
8134         ;;
8135 (yes)
8136
8137         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8138         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8139
8140         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8141
8142         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8143                 && test -z "${cf_tst_cflags}" \
8144                 && cf_fix_cppflags=no
8145         ;;
8146 esac
8147 done
8148
8149 if test -n "$cf_new_cflags" ; then
8150
8151         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8152         CFLAGS="${CFLAGS}$cf_new_cflags"
8153
8154 fi
8155
8156 if test -n "$cf_new_cppflags" ; then
8157
8158         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8159         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8160
8161 fi
8162
8163 if test -n "$cf_new_extra_cppflags" ; then
8164
8165         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8166         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8167
8168 fi
8169
8170 cf_add_libs="$LIBS"
8171 # reverse order
8172 cf_add_0lib=
8173 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8174 # filter duplicates
8175 for cf_add_1lib in $cf_add_0lib; do
8176         for cf_add_2lib in $cf_add_libs; do
8177                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8178                         cf_add_1lib=
8179                         break
8180                 fi
8181         done
8182         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8183 done
8184 LIBS="$cf_add_libs"
8185
8186         cf_with_pcre2_ok=yes; break
8187 else
8188         cf_pkgconfig_incs=
8189         cf_pkgconfig_libs=
8190         :
8191 fi
8192
8193         done
8194         cf_with_pcre2_ok=yes || { { echo "$as_me:8194: error: Cannot find PCRE2 library" >&5
8195 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
8196    { (exit 1); exit 1; }; }
8197
8198 cat >>confdefs.h <<\EOF
8199 #define HAVE_LIB_PCRE2 1
8200 EOF
8201
8202         # if pkgconfig gave no results, look for the libraries directly
8203         case "$LIBS" in
8204         (*pcre2-posix*|*pcreposix*)
8205                 ;;
8206         (*)
8207                 echo "$as_me:8207: checking for regcomp in -lpcre2-posix" >&5
8208 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
8209 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
8210   echo $ECHO_N "(cached) $ECHO_C" >&6
8211 else
8212   ac_check_lib_save_LIBS=$LIBS
8213 LIBS="-lpcre2-posix  $LIBS"
8214 cat >"conftest.$ac_ext" <<_ACEOF
8215 #line 8215 "configure"
8216 #include "confdefs.h"
8217
8218 /* Override any gcc2 internal prototype to avoid an error.  */
8219 #ifdef __cplusplus
8220 extern "C"
8221 #endif
8222 /* We use char because int might match the return type of a gcc2
8223    builtin and then its argument prototype would still apply.  */
8224 char regcomp ();
8225 int
8226 main (void)
8227 {
8228 regcomp ();
8229   ;
8230   return 0;
8231 }
8232 _ACEOF
8233 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8234 if { (eval echo "$as_me:8234: \"$ac_link\"") >&5
8235   (eval $ac_link) 2>&5
8236   ac_status=$?
8237   echo "$as_me:8237: \$? = $ac_status" >&5
8238   (exit "$ac_status"); } &&
8239          { ac_try='test -s "conftest$ac_exeext"'
8240   { (eval echo "$as_me:8240: \"$ac_try\"") >&5
8241   (eval $ac_try) 2>&5
8242   ac_status=$?
8243   echo "$as_me:8243: \$? = $ac_status" >&5
8244   (exit "$ac_status"); }; }; then
8245   ac_cv_lib_pcre2_posix_regcomp=yes
8246 else
8247   echo "$as_me: failed program was:" >&5
8248 cat "conftest.$ac_ext" >&5
8249 ac_cv_lib_pcre2_posix_regcomp=no
8250 fi
8251 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8252 LIBS=$ac_check_lib_save_LIBS
8253 fi
8254 echo "$as_me:8254: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
8255 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
8256 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
8257
8258 cf_add_libs="$LIBS"
8259 # reverse order
8260 cf_add_0lib=
8261 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8262 # filter duplicates
8263 for cf_add_1lib in $cf_add_0lib; do
8264         for cf_add_2lib in $cf_add_libs; do
8265                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8266                         cf_add_1lib=
8267                         break
8268                 fi
8269         done
8270         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8271 done
8272 LIBS="$cf_add_libs"
8273
8274 else
8275   echo "$as_me:8275: checking for regcomp in -lpcreposix" >&5
8276 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
8277 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
8278   echo $ECHO_N "(cached) $ECHO_C" >&6
8279 else
8280   ac_check_lib_save_LIBS=$LIBS
8281 LIBS="-lpcreposix  $LIBS"
8282 cat >"conftest.$ac_ext" <<_ACEOF
8283 #line 8283 "configure"
8284 #include "confdefs.h"
8285
8286 /* Override any gcc2 internal prototype to avoid an error.  */
8287 #ifdef __cplusplus
8288 extern "C"
8289 #endif
8290 /* We use char because int might match the return type of a gcc2
8291    builtin and then its argument prototype would still apply.  */
8292 char regcomp ();
8293 int
8294 main (void)
8295 {
8296 regcomp ();
8297   ;
8298   return 0;
8299 }
8300 _ACEOF
8301 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8302 if { (eval echo "$as_me:8302: \"$ac_link\"") >&5
8303   (eval $ac_link) 2>&5
8304   ac_status=$?
8305   echo "$as_me:8305: \$? = $ac_status" >&5
8306   (exit "$ac_status"); } &&
8307          { ac_try='test -s "conftest$ac_exeext"'
8308   { (eval echo "$as_me:8308: \"$ac_try\"") >&5
8309   (eval $ac_try) 2>&5
8310   ac_status=$?
8311   echo "$as_me:8311: \$? = $ac_status" >&5
8312   (exit "$ac_status"); }; }; then
8313   ac_cv_lib_pcreposix_regcomp=yes
8314 else
8315   echo "$as_me: failed program was:" >&5
8316 cat "conftest.$ac_ext" >&5
8317 ac_cv_lib_pcreposix_regcomp=no
8318 fi
8319 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8320 LIBS=$ac_check_lib_save_LIBS
8321 fi
8322 echo "$as_me:8322: result: $ac_cv_lib_pcreposix_regcomp" >&5
8323 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
8324 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
8325
8326 cf_add_libs="$LIBS"
8327 # reverse order
8328 cf_add_0lib=
8329 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8330 # filter duplicates
8331 for cf_add_1lib in $cf_add_0lib; do
8332         for cf_add_2lib in $cf_add_libs; do
8333                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8334                         cf_add_1lib=
8335                         break
8336                 fi
8337         done
8338         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8339 done
8340 LIBS="$cf_add_libs"
8341
8342 else
8343   { { echo "$as_me:8343: error: Cannot find PCRE2 POSIX library" >&5
8344 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
8345    { (exit 1); exit 1; }; }
8346 fi
8347
8348 fi
8349
8350                 ;;
8351         esac
8352
8353         # either way, check for the library header files
8354
8355 for ac_header in pcre2posix.h pcreposix.h
8356 do
8357 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8358 echo "$as_me:8358: checking for $ac_header" >&5
8359 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8360 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8361   echo $ECHO_N "(cached) $ECHO_C" >&6
8362 else
8363   cat >"conftest.$ac_ext" <<_ACEOF
8364 #line 8364 "configure"
8365 #include "confdefs.h"
8366 #include <$ac_header>
8367 _ACEOF
8368 if { (eval echo "$as_me:8368: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8369   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8370   ac_status=$?
8371   $EGREP -v '^ *\+' conftest.er1 >conftest.err
8372   rm -f conftest.er1
8373   cat conftest.err >&5
8374   echo "$as_me:8374: \$? = $ac_status" >&5
8375   (exit "$ac_status"); } >/dev/null; then
8376   if test -s conftest.err; then
8377     ac_cpp_err=$ac_c_preproc_warn_flag
8378   else
8379     ac_cpp_err=
8380   fi
8381 else
8382   ac_cpp_err=yes
8383 fi
8384 if test -z "$ac_cpp_err"; then
8385   eval "$as_ac_Header=yes"
8386 else
8387   echo "$as_me: failed program was:" >&5
8388   cat "conftest.$ac_ext" >&5
8389   eval "$as_ac_Header=no"
8390 fi
8391 rm -f conftest.err "conftest.$ac_ext"
8392 fi
8393 echo "$as_me:8393: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8394 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8395 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8396   cat >>confdefs.h <<EOF
8397 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8398 EOF
8399
8400 fi
8401 done
8402
8403 for ac_func in PCRE2regcomp
8404 do
8405 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8406 echo "$as_me:8406: checking for $ac_func" >&5
8407 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8408 if eval "test \"\${$as_ac_var+set}\" = set"; then
8409   echo $ECHO_N "(cached) $ECHO_C" >&6
8410 else
8411   cat >"conftest.$ac_ext" <<_ACEOF
8412 #line 8412 "configure"
8413 #include "confdefs.h"
8414 #define $ac_func autoconf_temporary
8415 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8416 #undef $ac_func
8417
8418 #ifdef __cplusplus
8419 extern "C"
8420 #endif
8421
8422 /* We use char because int might match the return type of a gcc2
8423    builtin and then its argument prototype would still apply.  */
8424 char $ac_func (void);
8425
8426 int
8427 main (void)
8428 {
8429
8430 /* The GNU C library defines stubs for functions which it implements
8431     to always fail with ENOSYS.  Some functions are actually named
8432     something starting with __ and the normal name is an alias.  */
8433 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8434 #error found stub for $ac_func
8435 #endif
8436
8437         return $ac_func ();
8438   ;
8439   return 0;
8440 }
8441 _ACEOF
8442 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8443 if { (eval echo "$as_me:8443: \"$ac_link\"") >&5
8444   (eval $ac_link) 2>&5
8445   ac_status=$?
8446   echo "$as_me:8446: \$? = $ac_status" >&5
8447   (exit "$ac_status"); } &&
8448          { ac_try='test -s "conftest$ac_exeext"'
8449   { (eval echo "$as_me:8449: \"$ac_try\"") >&5
8450   (eval $ac_try) 2>&5
8451   ac_status=$?
8452   echo "$as_me:8452: \$? = $ac_status" >&5
8453   (exit "$ac_status"); }; }; then
8454   eval "$as_ac_var=yes"
8455 else
8456   echo "$as_me: failed program was:" >&5
8457 cat "conftest.$ac_ext" >&5
8458 eval "$as_ac_var=no"
8459 fi
8460 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8461 fi
8462 echo "$as_me:8462: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8463 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8464 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8465   cat >>confdefs.h <<EOF
8466 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8467 EOF
8468
8469 fi
8470 done
8471
8472 fi
8473
8474 # not everyone has "test -c"
8475 if test -c /dev/sysmouse 2>/dev/null ; then
8476 echo "$as_me:8476: checking if you want to use sysmouse" >&5
8477 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8478
8479 # Check whether --with-sysmouse or --without-sysmouse was given.
8480 if test "${with_sysmouse+set}" = set; then
8481   withval="$with_sysmouse"
8482   cf_with_sysmouse=$withval
8483 else
8484   cf_with_sysmouse=maybe
8485 fi;
8486         if test "$cf_with_sysmouse" != no ; then
8487         cat >"conftest.$ac_ext" <<_ACEOF
8488 #line 8488 "configure"
8489 #include "confdefs.h"
8490
8491 #include <osreldate.h>
8492 #if (__FreeBSD_version >= 400017)
8493 #include <sys/consio.h>
8494 #include <sys/fbio.h>
8495 #else
8496 #include <machine/console.h>
8497 #endif
8498
8499 int
8500 main (void)
8501 {
8502
8503         struct mouse_info the_mouse;
8504         ioctl(0, CONS_MOUSECTL, &the_mouse);
8505
8506   ;
8507   return 0;
8508 }
8509 _ACEOF
8510 rm -f "conftest.$ac_objext"
8511 if { (eval echo "$as_me:8511: \"$ac_compile\"") >&5
8512   (eval $ac_compile) 2>&5
8513   ac_status=$?
8514   echo "$as_me:8514: \$? = $ac_status" >&5
8515   (exit "$ac_status"); } &&
8516          { ac_try='test -s "conftest.$ac_objext"'
8517   { (eval echo "$as_me:8517: \"$ac_try\"") >&5
8518   (eval $ac_try) 2>&5
8519   ac_status=$?
8520   echo "$as_me:8520: \$? = $ac_status" >&5
8521   (exit "$ac_status"); }; }; then
8522   cf_with_sysmouse=yes
8523 else
8524   echo "$as_me: failed program was:" >&5
8525 cat "conftest.$ac_ext" >&5
8526 cf_with_sysmouse=no
8527 fi
8528 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8529         fi
8530 echo "$as_me:8530: result: $cf_with_sysmouse" >&5
8531 echo "${ECHO_T}$cf_with_sysmouse" >&6
8532 test "$cf_with_sysmouse" = yes &&
8533 cat >>confdefs.h <<\EOF
8534 #define USE_SYSMOUSE 1
8535 EOF
8536
8537 fi
8538
8539 # pretend that ncurses==ncursesw==ncursest
8540 echo "$as_me:8540: checking if you want to disable library suffixes" >&5
8541 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8542
8543 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8544 if test "${enable_lib_suffixes+set}" = set; then
8545   enableval="$enable_lib_suffixes"
8546   test "$enableval" != no && enableval=yes
8547         if test "$enableval" != "yes" ; then
8548     disable_lib_suffixes=yes
8549         else
8550                 disable_lib_suffixes=no
8551         fi
8552 else
8553   enableval=yes
8554         disable_lib_suffixes=no
8555
8556 fi;
8557 echo "$as_me:8557: result: $disable_lib_suffixes" >&5
8558 echo "${ECHO_T}$disable_lib_suffixes" >&6
8559
8560 ### If we're building with rpath, try to link non-standard libs that way too.
8561 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8562
8563 echo "$as_me:8563: checking if rpath-hack should be disabled" >&5
8564 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8565
8566 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8567 if test "${enable_rpath_hack+set}" = set; then
8568   enableval="$enable_rpath_hack"
8569   test "$enableval" != no && enableval=yes
8570         if test "$enableval" != "yes" ; then
8571     enable_rpath_hack=no
8572         else
8573                 enable_rpath_hack=yes
8574         fi
8575 else
8576   enableval=yes
8577         enable_rpath_hack=yes
8578
8579 fi;
8580 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8581 echo "$as_me:8581: result: $cf_disable_rpath_hack" >&5
8582 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8583
8584 if test "$enable_rpath_hack" = yes ; then
8585
8586 echo "$as_me:8586: checking for updated LDFLAGS" >&5
8587 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8588 if test -n "$LD_RPATH_OPT" ; then
8589         echo "$as_me:8589: result: maybe" >&5
8590 echo "${ECHO_T}maybe" >&6
8591
8592         for ac_prog in ldd
8593 do
8594   # Extract the first word of "$ac_prog", so it can be a program name with args.
8595 set dummy $ac_prog; ac_word=$2
8596 echo "$as_me:8596: checking for $ac_word" >&5
8597 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8598 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8599   echo $ECHO_N "(cached) $ECHO_C" >&6
8600 else
8601   if test -n "$cf_ldd_prog"; then
8602   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8603 else
8604   ac_save_IFS=$IFS; IFS=$ac_path_separator
8605 ac_dummy="$PATH"
8606 for ac_dir in $ac_dummy; do
8607   IFS=$ac_save_IFS
8608   test -z "$ac_dir" && ac_dir=.
8609   $as_executable_p "$ac_dir/$ac_word" || continue
8610 ac_cv_prog_cf_ldd_prog="$ac_prog"
8611 echo "$as_me:8611: found $ac_dir/$ac_word" >&5
8612 break
8613 done
8614
8615 fi
8616 fi
8617 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8618 if test -n "$cf_ldd_prog"; then
8619   echo "$as_me:8619: result: $cf_ldd_prog" >&5
8620 echo "${ECHO_T}$cf_ldd_prog" >&6
8621 else
8622   echo "$as_me:8622: result: no" >&5
8623 echo "${ECHO_T}no" >&6
8624 fi
8625
8626   test -n "$cf_ldd_prog" && break
8627 done
8628 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8629
8630         cf_rpath_list="/usr/lib /lib"
8631         if test "$cf_ldd_prog" != no
8632         then
8633                 cf_rpath_oops=
8634
8635 cat >"conftest.$ac_ext" <<_ACEOF
8636 #line 8636 "configure"
8637 #include "confdefs.h"
8638 #include <stdio.h>
8639 int
8640 main (void)
8641 {
8642 printf("Hello");
8643   ;
8644   return 0;
8645 }
8646 _ACEOF
8647 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8648 if { (eval echo "$as_me:8648: \"$ac_link\"") >&5
8649   (eval $ac_link) 2>&5
8650   ac_status=$?
8651   echo "$as_me:8651: \$? = $ac_status" >&5
8652   (exit "$ac_status"); } &&
8653          { ac_try='test -s "conftest$ac_exeext"'
8654   { (eval echo "$as_me:8654: \"$ac_try\"") >&5
8655   (eval $ac_try) 2>&5
8656   ac_status=$?
8657   echo "$as_me:8657: \$? = $ac_status" >&5
8658   (exit "$ac_status"); }; }; then
8659   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8660                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8661 else
8662   echo "$as_me: failed program was:" >&5
8663 cat "conftest.$ac_ext" >&5
8664 fi
8665 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8666
8667                 # If we passed the link-test, but get a "not found" on a given library,
8668                 # this could be due to inept reconfiguration of gcc to make it only
8669                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8670                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8671                 # /usr/local libraries.
8672                 if test -n "$cf_rpath_oops"
8673                 then
8674                         for cf_rpath_src in $cf_rpath_oops
8675                         do
8676                                 for cf_rpath_dir in \
8677                                         /usr/local \
8678                                         /usr/pkg \
8679                                         /opt/sfw
8680                                 do
8681                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8682                                         then
8683                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8684
8685 echo "${as_me:-configure}:8685: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8686
8687                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8688                                                 break
8689                                         fi
8690                                 done
8691                         done
8692                 fi
8693         fi
8694
8695         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8696
8697 echo "${as_me:-configure}:8697: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8698
8699 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8700
8701 echo "${as_me:-configure}:8701: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8702
8703 cf_rpath_dst=
8704 for cf_rpath_src in $LDFLAGS
8705 do
8706         case "$cf_rpath_src" in
8707         (-L*)
8708
8709                 # check if this refers to a directory which we will ignore
8710                 cf_rpath_skip=no
8711                 if test -n "$cf_rpath_list"
8712                 then
8713                         for cf_rpath_item in $cf_rpath_list
8714                         do
8715                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8716                                 then
8717                                         cf_rpath_skip=yes
8718                                         break
8719                                 fi
8720                         done
8721                 fi
8722
8723                 if test "$cf_rpath_skip" = no
8724                 then
8725                         # transform the option
8726                         if test "$LD_RPATH_OPT" = "-R " ; then
8727                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8728                         else
8729                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8730                         fi
8731
8732                         # if we have not already added this, add it now
8733                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8734                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8735                         then
8736                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8737
8738 echo "${as_me:-configure}:8738: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8739
8740                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8741                         fi
8742                 fi
8743                 ;;
8744         esac
8745         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8746 done
8747 LDFLAGS=$cf_rpath_dst
8748
8749 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8750
8751 echo "${as_me:-configure}:8751: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8752
8753 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8754
8755 echo "${as_me:-configure}:8755: testing ...checking LIBS $LIBS ..." 1>&5
8756
8757 cf_rpath_dst=
8758 for cf_rpath_src in $LIBS
8759 do
8760         case "$cf_rpath_src" in
8761         (-L*)
8762
8763                 # check if this refers to a directory which we will ignore
8764                 cf_rpath_skip=no
8765                 if test -n "$cf_rpath_list"
8766                 then
8767                         for cf_rpath_item in $cf_rpath_list
8768                         do
8769                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8770                                 then
8771                                         cf_rpath_skip=yes
8772                                         break
8773                                 fi
8774                         done
8775                 fi
8776
8777                 if test "$cf_rpath_skip" = no
8778                 then
8779                         # transform the option
8780                         if test "$LD_RPATH_OPT" = "-R " ; then
8781                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8782                         else
8783                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8784                         fi
8785
8786                         # if we have not already added this, add it now
8787                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8788                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8789                         then
8790                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8791
8792 echo "${as_me:-configure}:8792: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8793
8794                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8795                         fi
8796                 fi
8797                 ;;
8798         esac
8799         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8800 done
8801 LIBS=$cf_rpath_dst
8802
8803 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8804
8805 echo "${as_me:-configure}:8805: testing ...checked LIBS $LIBS ..." 1>&5
8806
8807         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8808
8809 echo "${as_me:-configure}:8809: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8810
8811 else
8812         echo "$as_me:8812: result: no" >&5
8813 echo "${ECHO_T}no" >&6
8814 fi
8815
8816 fi
8817
8818 fi
8819
8820 ### Depending on the system, someone may use rpath to build ncurses but not
8821 # want users of the package to rely upon that feature.  Give those people an
8822 # option to suppress that detail from EXTRA_LDFLAGS.
8823 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8824 if test -n "$EXTRA_PKG_LDFLAGS"
8825 then
8826         echo "$as_me:8826: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8827 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8828
8829 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8830 if test "${enable_pkg_ldflags+set}" = set; then
8831   enableval="$enable_pkg_ldflags"
8832   test "$enableval" != no && enableval=yes
8833         if test "$enableval" != "yes" ; then
8834     disable_pkg_ldflags=yes
8835         else
8836                 disable_pkg_ldflags=no
8837         fi
8838 else
8839   enableval=yes
8840         disable_pkg_ldflags=no
8841
8842 fi;
8843         echo "$as_me:8843: result: $disable_pkg_ldflags" >&5
8844 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8845         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8846 fi
8847
8848 ###############################################################################
8849
8850 ###     use option --with-extra-suffix to append suffix to headers and libraries
8851 echo "$as_me:8851: checking if you wish to append extra suffix to header/library paths" >&5
8852 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8853 EXTRA_SUFFIX=
8854
8855 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8856 if test "${with_extra_suffix+set}" = set; then
8857   withval="$with_extra_suffix"
8858   case x$withval in
8859         (xno)
8860                 ;;
8861         (xyes|x)
8862                 EXTRA_SUFFIX=$cf_cv_abi_version
8863                 ;;
8864         (*)
8865                 EXTRA_SUFFIX=$withval
8866                 ;;
8867         esac
8868
8869 fi;
8870 echo "$as_me:8870: result: $EXTRA_SUFFIX" >&5
8871 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8872
8873 ###     use option --disable-overwrite to leave out the link to -lcurses
8874 echo "$as_me:8874: checking if you wish to install ncurses overwriting curses" >&5
8875 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8876
8877 # Check whether --enable-overwrite or --disable-overwrite was given.
8878 if test "${enable_overwrite+set}" = set; then
8879   enableval="$enable_overwrite"
8880   with_overwrite=$enableval
8881 else
8882   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8883 fi;
8884 echo "$as_me:8884: result: $with_overwrite" >&5
8885 echo "${ECHO_T}$with_overwrite" >&6
8886
8887 echo "$as_me:8887: checking if external terminfo-database is used" >&5
8888 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8889
8890 # Check whether --enable-database or --disable-database was given.
8891 if test "${enable_database+set}" = set; then
8892   enableval="$enable_database"
8893   use_database=$enableval
8894 else
8895   use_database=yes
8896 fi;
8897 echo "$as_me:8897: result: $use_database" >&5
8898 echo "${ECHO_T}$use_database" >&6
8899
8900 case "$host_os" in
8901 (os2*)
8902         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8903         ;;
8904 (*)
8905         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8906         ;;
8907 esac
8908
8909 NCURSES_USE_DATABASE=0
8910 if test "$use_database" != no ; then
8911         NCURSES_USE_DATABASE=1
8912
8913         echo "$as_me:8913: checking which terminfo source-file will be installed" >&5
8914 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8915
8916 # Check whether --with-database or --without-database was given.
8917 if test "${with_database+set}" = set; then
8918   withval="$with_database"
8919   TERMINFO_SRC=$withval
8920 fi;
8921         echo "$as_me:8921: result: $TERMINFO_SRC" >&5
8922 echo "${ECHO_T}$TERMINFO_SRC" >&6
8923
8924         echo "$as_me:8924: checking whether to use hashed database instead of directory/tree" >&5
8925 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8926
8927 # Check whether --with-hashed-db or --without-hashed-db was given.
8928 if test "${with_hashed_db+set}" = set; then
8929   withval="$with_hashed_db"
8930
8931 else
8932   with_hashed_db=no
8933 fi;
8934         echo "$as_me:8934: result: $with_hashed_db" >&5
8935 echo "${ECHO_T}$with_hashed_db" >&6
8936 else
8937         with_hashed_db=no
8938 fi
8939
8940 echo "$as_me:8940: checking for list of fallback descriptions" >&5
8941 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8942
8943 # Check whether --with-fallbacks or --without-fallbacks was given.
8944 if test "${with_fallbacks+set}" = set; then
8945   withval="$with_fallbacks"
8946   with_fallback=$withval
8947 else
8948   with_fallback=
8949 fi;
8950 echo "$as_me:8950: result: $with_fallback" >&5
8951 echo "${ECHO_T}$with_fallback" >&6
8952
8953 case ".$with_fallback" in
8954 (.|.no)
8955         FALLBACK_LIST=
8956         ;;
8957 (.yes)
8958         { echo "$as_me:8958: WARNING: expected a list of terminal descriptions" >&5
8959 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8960         ;;
8961 (*)
8962         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8963         ;;
8964 esac
8965
8966 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8967 # tree for generating the terminal descriptions that will be compiled into the
8968 # library.  If your toolchain is old, it may not handle current terminal
8969 # databases.  Use configure-options to point to the tools which will be used,
8970 # rather than the first ones found on the $PATH.
8971 if test -n "$ac_tool_prefix"; then
8972   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8973 set dummy ${ac_tool_prefix}tic; ac_word=$2
8974 echo "$as_me:8974: checking for $ac_word" >&5
8975 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8976 if test "${ac_cv_prog_TIC+set}" = set; then
8977   echo $ECHO_N "(cached) $ECHO_C" >&6
8978 else
8979   if test -n "$TIC"; then
8980   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8981 else
8982   ac_save_IFS=$IFS; IFS=$ac_path_separator
8983 ac_dummy="$PATH"
8984 for ac_dir in $ac_dummy; do
8985   IFS=$ac_save_IFS
8986   test -z "$ac_dir" && ac_dir=.
8987   $as_executable_p "$ac_dir/$ac_word" || continue
8988 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8989 echo "$as_me:8989: found $ac_dir/$ac_word" >&5
8990 break
8991 done
8992
8993 fi
8994 fi
8995 TIC=$ac_cv_prog_TIC
8996 if test -n "$TIC"; then
8997   echo "$as_me:8997: result: $TIC" >&5
8998 echo "${ECHO_T}$TIC" >&6
8999 else
9000   echo "$as_me:9000: result: no" >&5
9001 echo "${ECHO_T}no" >&6
9002 fi
9003
9004 fi
9005 if test -z "$ac_cv_prog_TIC"; then
9006   ac_ct_TIC=$TIC
9007   # Extract the first word of "tic", so it can be a program name with args.
9008 set dummy tic; ac_word=$2
9009 echo "$as_me:9009: checking for $ac_word" >&5
9010 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9011 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
9012   echo $ECHO_N "(cached) $ECHO_C" >&6
9013 else
9014   if test -n "$ac_ct_TIC"; then
9015   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
9016 else
9017   ac_save_IFS=$IFS; IFS=$ac_path_separator
9018 ac_dummy="$PATH"
9019 for ac_dir in $ac_dummy; do
9020   IFS=$ac_save_IFS
9021   test -z "$ac_dir" && ac_dir=.
9022   $as_executable_p "$ac_dir/$ac_word" || continue
9023 ac_cv_prog_ac_ct_TIC="tic"
9024 echo "$as_me:9024: found $ac_dir/$ac_word" >&5
9025 break
9026 done
9027
9028 fi
9029 fi
9030 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
9031 if test -n "$ac_ct_TIC"; then
9032   echo "$as_me:9032: result: $ac_ct_TIC" >&5
9033 echo "${ECHO_T}$ac_ct_TIC" >&6
9034 else
9035   echo "$as_me:9035: result: no" >&5
9036 echo "${ECHO_T}no" >&6
9037 fi
9038
9039   TIC=$ac_ct_TIC
9040 else
9041   TIC="$ac_cv_prog_TIC"
9042 fi
9043
9044 if test -n "$ac_tool_prefix"; then
9045   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
9046 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
9047 echo "$as_me:9047: checking for $ac_word" >&5
9048 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9049 if test "${ac_cv_prog_INFOCMP+set}" = set; then
9050   echo $ECHO_N "(cached) $ECHO_C" >&6
9051 else
9052   if test -n "$INFOCMP"; then
9053   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
9054 else
9055   ac_save_IFS=$IFS; IFS=$ac_path_separator
9056 ac_dummy="$PATH"
9057 for ac_dir in $ac_dummy; do
9058   IFS=$ac_save_IFS
9059   test -z "$ac_dir" && ac_dir=.
9060   $as_executable_p "$ac_dir/$ac_word" || continue
9061 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
9062 echo "$as_me:9062: found $ac_dir/$ac_word" >&5
9063 break
9064 done
9065
9066 fi
9067 fi
9068 INFOCMP=$ac_cv_prog_INFOCMP
9069 if test -n "$INFOCMP"; then
9070   echo "$as_me:9070: result: $INFOCMP" >&5
9071 echo "${ECHO_T}$INFOCMP" >&6
9072 else
9073   echo "$as_me:9073: result: no" >&5
9074 echo "${ECHO_T}no" >&6
9075 fi
9076
9077 fi
9078 if test -z "$ac_cv_prog_INFOCMP"; then
9079   ac_ct_INFOCMP=$INFOCMP
9080   # Extract the first word of "infocmp", so it can be a program name with args.
9081 set dummy infocmp; ac_word=$2
9082 echo "$as_me:9082: checking for $ac_word" >&5
9083 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9084 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
9085   echo $ECHO_N "(cached) $ECHO_C" >&6
9086 else
9087   if test -n "$ac_ct_INFOCMP"; then
9088   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
9089 else
9090   ac_save_IFS=$IFS; IFS=$ac_path_separator
9091 ac_dummy="$PATH"
9092 for ac_dir in $ac_dummy; do
9093   IFS=$ac_save_IFS
9094   test -z "$ac_dir" && ac_dir=.
9095   $as_executable_p "$ac_dir/$ac_word" || continue
9096 ac_cv_prog_ac_ct_INFOCMP="infocmp"
9097 echo "$as_me:9097: found $ac_dir/$ac_word" >&5
9098 break
9099 done
9100
9101 fi
9102 fi
9103 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
9104 if test -n "$ac_ct_INFOCMP"; then
9105   echo "$as_me:9105: result: $ac_ct_INFOCMP" >&5
9106 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
9107 else
9108   echo "$as_me:9108: result: no" >&5
9109 echo "${ECHO_T}no" >&6
9110 fi
9111
9112   INFOCMP=$ac_ct_INFOCMP
9113 else
9114   INFOCMP="$ac_cv_prog_INFOCMP"
9115 fi
9116
9117 if test -n "$FALLBACK_LIST"
9118 then
9119
9120 # Check whether --with-tic-path or --without-tic-path was given.
9121 if test "${with_tic_path+set}" = set; then
9122   withval="$with_tic_path"
9123   echo "$as_me:9123: checking for tic program for fallbacks" >&5
9124 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
9125                 TIC=$withval
9126                 echo "$as_me:9126: result: $TIC" >&5
9127 echo "${ECHO_T}$TIC" >&6
9128
9129 if test "x$prefix" != xNONE; then
9130         cf_path_syntax="$prefix"
9131 else
9132         cf_path_syntax="$ac_default_prefix"
9133 fi
9134
9135 case ".$TIC" in
9136 (.\$\(*\)*|.\'*\'*)
9137         ;;
9138 (..|./*|.\\*)
9139         ;;
9140 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9141         ;;
9142 (.\$\{*prefix\}*|.\$\{*dir\}*)
9143         eval TIC="$TIC"
9144         case ".$TIC" in
9145         (.NONE/*)
9146                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9147                 ;;
9148         esac
9149         ;;
9150 (.no|.NONE/*)
9151         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9152         ;;
9153 (*)
9154         { { echo "$as_me:9154: error: expected a pathname, not \"$TIC\"" >&5
9155 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
9156    { (exit 1); exit 1; }; }
9157         ;;
9158 esac
9159
9160 else
9161
9162 test -z "$TIC" && TIC="tic"
9163 for ac_prog in $TIC tic
9164 do
9165   # Extract the first word of "$ac_prog", so it can be a program name with args.
9166 set dummy $ac_prog; ac_word=$2
9167 echo "$as_me:9167: checking for $ac_word" >&5
9168 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9169 if test "${ac_cv_path_TIC+set}" = set; then
9170   echo $ECHO_N "(cached) $ECHO_C" >&6
9171 else
9172   case $TIC in
9173   [\\/]* | ?:[\\/]*)
9174   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
9175   ;;
9176   *)
9177   ac_save_IFS=$IFS; IFS=$ac_path_separator
9178 ac_dummy="$PATH:/usr/local/ncurses/bin"
9179 for ac_dir in $ac_dummy; do
9180   IFS=$ac_save_IFS
9181   test -z "$ac_dir" && ac_dir=.
9182   if $as_executable_p "$ac_dir/$ac_word"; then
9183    ac_cv_path_TIC="$ac_dir/$ac_word"
9184    echo "$as_me:9184: found $ac_dir/$ac_word" >&5
9185    break
9186 fi
9187 done
9188
9189   ;;
9190 esac
9191 fi
9192 TIC=$ac_cv_path_TIC
9193
9194 if test -n "$TIC"; then
9195   echo "$as_me:9195: result: $TIC" >&5
9196 echo "${ECHO_T}$TIC" >&6
9197 else
9198   echo "$as_me:9198: result: no" >&5
9199 echo "${ECHO_T}no" >&6
9200 fi
9201
9202   test -n "$TIC" && break
9203 done
9204 test -n "$TIC" || TIC="$TIC"
9205
9206 cf_path_prog=""
9207 cf_path_args=""
9208 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9209 for cf_temp in $ac_cv_path_TIC
9210 do
9211         if test -z "$cf_path_prog" ; then
9212                 if test "$with_full_paths" = yes ; then
9213
9214 if test "x$prefix" != xNONE; then
9215         cf_path_syntax="$prefix"
9216 else
9217         cf_path_syntax="$ac_default_prefix"
9218 fi
9219
9220 case ".$cf_temp" in
9221 (.\$\(*\)*|.\'*\'*)
9222         ;;
9223 (..|./*|.\\*)
9224         ;;
9225 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9226         ;;
9227 (.\$\{*prefix\}*|.\$\{*dir\}*)
9228         eval cf_temp="$cf_temp"
9229         case ".$cf_temp" in
9230         (.NONE/*)
9231                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9232                 ;;
9233         esac
9234         ;;
9235 (.no|.NONE/*)
9236         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9237         ;;
9238 (*)
9239         break
9240         ;;
9241 esac
9242
9243                         cf_path_prog="$cf_temp"
9244                 else
9245                         cf_path_prog="`basename "$cf_temp"`"
9246                 fi
9247         elif test -z "$cf_path_args" ; then
9248                 cf_path_args="$cf_temp"
9249         else
9250                 cf_path_args="$cf_path_args $cf_temp"
9251         fi
9252 done
9253 IFS="$cf_save_ifs"
9254
9255 if test -n "$cf_path_prog" ; then
9256
9257 echo "${as_me:-configure}:9257: testing defining path for ${cf_path_prog} ..." 1>&5
9258
9259 cat >>confdefs.h <<EOF
9260 #define TIC_PATH "$cf_path_prog"
9261 EOF
9262
9263         test -n "$cf_path_args" &&
9264 cat >>confdefs.h <<EOF
9265 #define TIC_ARGS "$cf_path_args"
9266 EOF
9267
9268 fi
9269
9270                 if test -z "$TIC"
9271                 then
9272                         { echo "$as_me:9272: WARNING: no tic program found for fallbacks" >&5
9273 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
9274                 fi
9275
9276 fi;
9277
9278 # Check whether --with-infocmp-path or --without-infocmp-path was given.
9279 if test "${with_infocmp_path+set}" = set; then
9280   withval="$with_infocmp_path"
9281   echo "$as_me:9281: checking for infocmp program for fallbacks" >&5
9282 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
9283                 INFOCMP=$withval
9284                 echo "$as_me:9284: result: $INFOCMP" >&5
9285 echo "${ECHO_T}$INFOCMP" >&6
9286
9287 if test "x$prefix" != xNONE; then
9288         cf_path_syntax="$prefix"
9289 else
9290         cf_path_syntax="$ac_default_prefix"
9291 fi
9292
9293 case ".$INFOCMP" in
9294 (.\$\(*\)*|.\'*\'*)
9295         ;;
9296 (..|./*|.\\*)
9297         ;;
9298 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9299         ;;
9300 (.\$\{*prefix\}*|.\$\{*dir\}*)
9301         eval INFOCMP="$INFOCMP"
9302         case ".$INFOCMP" in
9303         (.NONE/*)
9304                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9305                 ;;
9306         esac
9307         ;;
9308 (.no|.NONE/*)
9309         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9310         ;;
9311 (*)
9312         { { echo "$as_me:9312: error: expected a pathname, not \"$INFOCMP\"" >&5
9313 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
9314    { (exit 1); exit 1; }; }
9315         ;;
9316 esac
9317
9318 else
9319
9320 test -z "$INFOCMP" && INFOCMP="infocmp"
9321 for ac_prog in $INFOCMP infocmp
9322 do
9323   # Extract the first word of "$ac_prog", so it can be a program name with args.
9324 set dummy $ac_prog; ac_word=$2
9325 echo "$as_me:9325: checking for $ac_word" >&5
9326 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9327 if test "${ac_cv_path_INFOCMP+set}" = set; then
9328   echo $ECHO_N "(cached) $ECHO_C" >&6
9329 else
9330   case $INFOCMP in
9331   [\\/]* | ?:[\\/]*)
9332   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
9333   ;;
9334   *)
9335   ac_save_IFS=$IFS; IFS=$ac_path_separator
9336 ac_dummy="$PATH:/usr/local/ncurses/bin"
9337 for ac_dir in $ac_dummy; do
9338   IFS=$ac_save_IFS
9339   test -z "$ac_dir" && ac_dir=.
9340   if $as_executable_p "$ac_dir/$ac_word"; then
9341    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
9342    echo "$as_me:9342: found $ac_dir/$ac_word" >&5
9343    break
9344 fi
9345 done
9346
9347   ;;
9348 esac
9349 fi
9350 INFOCMP=$ac_cv_path_INFOCMP
9351
9352 if test -n "$INFOCMP"; then
9353   echo "$as_me:9353: result: $INFOCMP" >&5
9354 echo "${ECHO_T}$INFOCMP" >&6
9355 else
9356   echo "$as_me:9356: result: no" >&5
9357 echo "${ECHO_T}no" >&6
9358 fi
9359
9360   test -n "$INFOCMP" && break
9361 done
9362 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
9363
9364 cf_path_prog=""
9365 cf_path_args=""
9366 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9367 for cf_temp in $ac_cv_path_INFOCMP
9368 do
9369         if test -z "$cf_path_prog" ; then
9370                 if test "$with_full_paths" = yes ; then
9371
9372 if test "x$prefix" != xNONE; then
9373         cf_path_syntax="$prefix"
9374 else
9375         cf_path_syntax="$ac_default_prefix"
9376 fi
9377
9378 case ".$cf_temp" in
9379 (.\$\(*\)*|.\'*\'*)
9380         ;;
9381 (..|./*|.\\*)
9382         ;;
9383 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9384         ;;
9385 (.\$\{*prefix\}*|.\$\{*dir\}*)
9386         eval cf_temp="$cf_temp"
9387         case ".$cf_temp" in
9388         (.NONE/*)
9389                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9390                 ;;
9391         esac
9392         ;;
9393 (.no|.NONE/*)
9394         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9395         ;;
9396 (*)
9397         break
9398         ;;
9399 esac
9400
9401                         cf_path_prog="$cf_temp"
9402                 else
9403                         cf_path_prog="`basename "$cf_temp"`"
9404                 fi
9405         elif test -z "$cf_path_args" ; then
9406                 cf_path_args="$cf_temp"
9407         else
9408                 cf_path_args="$cf_path_args $cf_temp"
9409         fi
9410 done
9411 IFS="$cf_save_ifs"
9412
9413 if test -n "$cf_path_prog" ; then
9414
9415 echo "${as_me:-configure}:9415: testing defining path for ${cf_path_prog} ..." 1>&5
9416
9417 cat >>confdefs.h <<EOF
9418 #define INFOCMP_PATH "$cf_path_prog"
9419 EOF
9420
9421         test -n "$cf_path_args" &&
9422 cat >>confdefs.h <<EOF
9423 #define INFOCMP_ARGS "$cf_path_args"
9424 EOF
9425
9426 fi
9427
9428                 if test -z "$INFOCMP"
9429                 then
9430                         { echo "$as_me:9430: WARNING: no infocmp program found for fallbacks" >&5
9431 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9432                 fi
9433
9434 fi;
9435
9436         test -z "$TIC" && FALLBACK_LIST=
9437         test -z "$INFOCMP" && FALLBACK_LIST=
9438         if test -z "$FALLBACK_LIST"
9439         then
9440                 { echo "$as_me:9440: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9441 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9442         fi
9443 fi
9444
9445 USE_FALLBACKS=
9446 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9447
9448 echo "$as_me:9448: checking if you want modern xterm or antique" >&5
9449 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9450
9451 # Check whether --with-xterm-new or --without-xterm-new was given.
9452 if test "${with_xterm_new+set}" = set; then
9453   withval="$with_xterm_new"
9454   with_xterm_new=$withval
9455 else
9456   with_xterm_new=yes
9457 fi;
9458 case "$with_xterm_new" in
9459 (no) with_xterm_new=xterm-old;;
9460 (*)      with_xterm_new=xterm-new;;
9461 esac
9462 echo "$as_me:9462: result: $with_xterm_new" >&5
9463 echo "${ECHO_T}$with_xterm_new" >&6
9464 WHICH_XTERM=$with_xterm_new
9465
9466 case $host_os in
9467 (*linux-gnu|*cygwin|*mingw32|*msys)
9468         want_xterm_kbs=DEL
9469         ;;
9470 (*)
9471         want_xterm_kbs=BS
9472         ;;
9473 esac
9474
9475 echo "$as_me:9475: checking if xterm backspace sends BS or DEL" >&5
9476 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9477
9478 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9479 if test "${with_xterm_kbs+set}" = set; then
9480   withval="$with_xterm_kbs"
9481   with_xterm_kbs=$withval
9482 else
9483   with_xterm_kbs=BS
9484 fi;
9485 case x$with_xterm_kbs in
9486 (xyes|xno|xBS|xbs|x8)
9487         with_xterm_kbs=BS
9488         ;;
9489 (xDEL|xdel|x127)
9490         with_xterm_kbs=DEL
9491         ;;
9492 (*)
9493         with_xterm_kbs=$withval
9494         ;;
9495 esac
9496 echo "$as_me:9496: result: $with_xterm_kbs" >&5
9497 echo "${ECHO_T}$with_xterm_kbs" >&6
9498 XTERM_KBS=$with_xterm_kbs
9499
9500 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9501 then
9502         { echo "$as_me:9502: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&5
9503 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os" >&2;}
9504 fi
9505
9506 MAKE_TERMINFO=
9507 if test "$use_database" = no ; then
9508         TERMINFO="${datadir}/terminfo"
9509         MAKE_TERMINFO="#"
9510 else
9511
9512 echo "$as_me:9512: checking for list of terminfo directories" >&5
9513 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9514
9515 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9516 if test "${with_terminfo_dirs+set}" = set; then
9517   withval="$with_terminfo_dirs"
9518
9519 else
9520   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9521 fi;
9522 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9523 cf_dst_path=
9524 for cf_src_path in $withval
9525 do
9526
9527 if test "x$prefix" != xNONE; then
9528         cf_path_syntax="$prefix"
9529 else
9530         cf_path_syntax="$ac_default_prefix"
9531 fi
9532
9533 case ".$cf_src_path" in
9534 (.\$\(*\)*|.\'*\'*)
9535         ;;
9536 (..|./*|.\\*)
9537         ;;
9538 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9539         ;;
9540 (.\$\{*prefix\}*|.\$\{*dir\}*)
9541         eval cf_src_path="$cf_src_path"
9542         case ".$cf_src_path" in
9543         (.NONE/*)
9544                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9545                 ;;
9546         esac
9547         ;;
9548 (.no|.NONE/*)
9549         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9550         ;;
9551 (*)
9552         { { echo "$as_me:9552: error: expected a pathname, not \"$cf_src_path\"" >&5
9553 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9554    { (exit 1); exit 1; }; }
9555         ;;
9556 esac
9557
9558   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9559   cf_dst_path="${cf_dst_path}${cf_src_path}"
9560 done
9561 IFS="$ac_save_ifs"
9562
9563 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9564 # so we have to check/work around.  We do prefer the result of "eval"...
9565 eval cf_dst_eval="$cf_dst_path"
9566 case "x$cf_dst_eval" in
9567 (xNONE*)
9568         TERMINFO_DIRS=$cf_dst_path
9569         ;;
9570 (*)
9571         TERMINFO_DIRS="$cf_dst_eval"
9572         ;;
9573 esac
9574
9575 echo "$as_me:9575: result: $TERMINFO_DIRS" >&5
9576 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9577 test -n "$TERMINFO_DIRS" &&
9578 cat >>confdefs.h <<EOF
9579 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9580 EOF
9581
9582 case "x$TERMINFO" in
9583 x???:*)
9584         { echo "$as_me:9584: WARNING: ignoring non-directory/file TERMINFO value" >&5
9585 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9586         unset TERMINFO
9587         ;;
9588 esac
9589
9590 echo "$as_me:9590: checking for default terminfo directory" >&5
9591 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9592
9593 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9594 if test "${with_default_terminfo_dir+set}" = set; then
9595   withval="$with_default_terminfo_dir"
9596
9597 else
9598   withval="${TERMINFO:-${datadir}/terminfo}"
9599 fi; if test -n "${datadir}/terminfo" ; then
9600
9601 if test "x$prefix" != xNONE; then
9602         cf_path_syntax="$prefix"
9603 else
9604         cf_path_syntax="$ac_default_prefix"
9605 fi
9606
9607 case ".$withval" in
9608 (.\$\(*\)*|.\'*\'*)
9609         ;;
9610 (..|./*|.\\*)
9611         ;;
9612 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9613         ;;
9614 (.\$\{*prefix\}*|.\$\{*dir\}*)
9615         eval withval="$withval"
9616         case ".$withval" in
9617         (.NONE/*)
9618                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9619                 ;;
9620         esac
9621         ;;
9622 (.no|.NONE/*)
9623         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9624         ;;
9625 (*)
9626         { { echo "$as_me:9626: error: expected a pathname, not \"$withval\"" >&5
9627 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9628    { (exit 1); exit 1; }; }
9629         ;;
9630 esac
9631
9632 fi
9633 eval TERMINFO="$withval"
9634
9635 echo "$as_me:9635: result: $TERMINFO" >&5
9636 echo "${ECHO_T}$TERMINFO" >&6
9637
9638 cat >>confdefs.h <<EOF
9639 #define TERMINFO "$TERMINFO"
9640 EOF
9641
9642 fi
9643
9644 ###     use option --disable-big-core to make tic run on small machines
9645 ###     We need 4Mb, check if we can allocate 50% more than that.
9646 echo "$as_me:9646: checking if big-core option selected" >&5
9647 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9648
9649 # Check whether --enable-big-core or --disable-big-core was given.
9650 if test "${enable_big_core+set}" = set; then
9651   enableval="$enable_big_core"
9652   with_big_core=$enableval
9653 else
9654   if test "$cross_compiling" = yes; then
9655   with_big_core=no
9656 else
9657   cat >"conftest.$ac_ext" <<_ACEOF
9658 #line 9658 "configure"
9659 #include "confdefs.h"
9660
9661 #include <stdlib.h>
9662 #include <string.h>
9663 int main() {
9664         unsigned long n = 6000000L;
9665         char *s = malloc(n);
9666         if (s != 0)
9667                 s[0] = s[n-1] = 0;
9668         ${cf_cv_main_return:-return}(s == 0);
9669 }
9670 _ACEOF
9671 rm -f "conftest$ac_exeext"
9672 if { (eval echo "$as_me:9672: \"$ac_link\"") >&5
9673   (eval $ac_link) 2>&5
9674   ac_status=$?
9675   echo "$as_me:9675: \$? = $ac_status" >&5
9676   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9677   { (eval echo "$as_me:9677: \"$ac_try\"") >&5
9678   (eval $ac_try) 2>&5
9679   ac_status=$?
9680   echo "$as_me:9680: \$? = $ac_status" >&5
9681   (exit "$ac_status"); }; }; then
9682   with_big_core=yes
9683 else
9684   echo "$as_me: program exited with status $ac_status" >&5
9685 echo "$as_me: failed program was:" >&5
9686 cat "conftest.$ac_ext" >&5
9687 with_big_core=no
9688 fi
9689 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9690 fi
9691 fi;
9692 echo "$as_me:9692: result: $with_big_core" >&5
9693 echo "${ECHO_T}$with_big_core" >&6
9694 test "x$with_big_core" = "xyes" &&
9695 cat >>confdefs.h <<\EOF
9696 #define HAVE_BIG_CORE 1
9697 EOF
9698
9699 ### ISO C only guarantees 512-char strings, we have tables which load faster
9700 ### when constructed using "big" strings.  More than the C compiler, the awk
9701 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9702 echo "$as_me:9702: checking if big-strings option selected" >&5
9703 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9704
9705 # Check whether --enable-big-strings or --disable-big-strings was given.
9706 if test "${enable_big_strings+set}" = set; then
9707   enableval="$enable_big_strings"
9708   with_big_strings=$enableval
9709 else
9710
9711         case x$AWK in
9712         (x)
9713                 eval with_big_strings=no
9714                 ;;
9715         (*)
9716                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9717                         | $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
9718                         eval with_big_strings=yes
9719                 else
9720                         eval with_big_strings=no
9721                 fi
9722                 ;;
9723         esac
9724
9725 fi;
9726 echo "$as_me:9726: result: $with_big_strings" >&5
9727 echo "${ECHO_T}$with_big_strings" >&6
9728
9729 USE_BIG_STRINGS=0
9730 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9731
9732 ###     use option --enable-termcap to compile in the termcap fallback support
9733 echo "$as_me:9733: checking if you want termcap-fallback support" >&5
9734 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9735
9736 # Check whether --enable-termcap or --disable-termcap was given.
9737 if test "${enable_termcap+set}" = set; then
9738   enableval="$enable_termcap"
9739   with_termcap=$enableval
9740 else
9741   with_termcap=no
9742 fi;
9743 echo "$as_me:9743: result: $with_termcap" >&5
9744 echo "${ECHO_T}$with_termcap" >&6
9745
9746 NCURSES_USE_TERMCAP=0
9747 if test "x$with_termcap" != "xyes" ; then
9748         if test "$use_database" = no ; then
9749                 if test -z "$with_fallback" ; then
9750                         { { echo "$as_me:9750: error: You have disabled the database w/o specifying fallbacks" >&5
9751 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9752    { (exit 1); exit 1; }; }
9753                 fi
9754         fi
9755
9756 cat >>confdefs.h <<\EOF
9757 #define PURE_TERMINFO 1
9758 EOF
9759
9760 else
9761
9762         if test "$with_ticlib" != no ; then
9763                 { { echo "$as_me:9763: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9764 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9765    { (exit 1); exit 1; }; }
9766         fi
9767
9768         NCURSES_USE_TERMCAP=1
9769         echo "$as_me:9769: checking for list of termcap files" >&5
9770 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9771
9772 # Check whether --with-termpath or --without-termpath was given.
9773 if test "${with_termpath+set}" = set; then
9774   withval="$with_termpath"
9775
9776 else
9777   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9778 fi;
9779 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9780 cf_dst_path=
9781 for cf_src_path in $withval
9782 do
9783
9784 if test "x$prefix" != xNONE; then
9785         cf_path_syntax="$prefix"
9786 else
9787         cf_path_syntax="$ac_default_prefix"
9788 fi
9789
9790 case ".$cf_src_path" in
9791 (.\$\(*\)*|.\'*\'*)
9792         ;;
9793 (..|./*|.\\*)
9794         ;;
9795 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9796         ;;
9797 (.\$\{*prefix\}*|.\$\{*dir\}*)
9798         eval cf_src_path="$cf_src_path"
9799         case ".$cf_src_path" in
9800         (.NONE/*)
9801                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9802                 ;;
9803         esac
9804         ;;
9805 (.no|.NONE/*)
9806         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9807         ;;
9808 (*)
9809         { { echo "$as_me:9809: error: expected a pathname, not \"$cf_src_path\"" >&5
9810 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9811    { (exit 1); exit 1; }; }
9812         ;;
9813 esac
9814
9815   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9816   cf_dst_path="${cf_dst_path}${cf_src_path}"
9817 done
9818 IFS="$ac_save_ifs"
9819
9820 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9821 # so we have to check/work around.  We do prefer the result of "eval"...
9822 eval cf_dst_eval="$cf_dst_path"
9823 case "x$cf_dst_eval" in
9824 (xNONE*)
9825         TERMPATH=$cf_dst_path
9826         ;;
9827 (*)
9828         TERMPATH="$cf_dst_eval"
9829         ;;
9830 esac
9831
9832         echo "$as_me:9832: result: $TERMPATH" >&5
9833 echo "${ECHO_T}$TERMPATH" >&6
9834         test -n "$TERMPATH" &&
9835 cat >>confdefs.h <<EOF
9836 #define TERMPATH "$TERMPATH"
9837 EOF
9838
9839         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9840         echo "$as_me:9840: checking if fast termcap-loader is needed" >&5
9841 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9842
9843 # Check whether --enable-getcap or --disable-getcap was given.
9844 if test "${enable_getcap+set}" = set; then
9845   enableval="$enable_getcap"
9846   with_getcap=$enableval
9847 else
9848   with_getcap=no
9849 fi;
9850         echo "$as_me:9850: result: $with_getcap" >&5
9851 echo "${ECHO_T}$with_getcap" >&6
9852         test "x$with_getcap" = "xyes" &&
9853 cat >>confdefs.h <<\EOF
9854 #define USE_GETCAP 1
9855 EOF
9856
9857         echo "$as_me:9857: checking if translated termcaps will be cached in ~/.terminfo" >&5
9858 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9859
9860 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9861 if test "${enable_getcap_cache+set}" = set; then
9862   enableval="$enable_getcap_cache"
9863   with_getcap_cache=$enableval
9864 else
9865   with_getcap_cache=no
9866 fi;
9867         echo "$as_me:9867: result: $with_getcap_cache" >&5
9868 echo "${ECHO_T}$with_getcap_cache" >&6
9869         test "x$with_getcap_cache" = "xyes" &&
9870 cat >>confdefs.h <<\EOF
9871 #define USE_GETCAP_CACHE 1
9872 EOF
9873
9874 fi
9875
9876 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9877 echo "$as_me:9877: checking if ~/.terminfo is wanted" >&5
9878 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9879
9880 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9881 if test "${enable_home_terminfo+set}" = set; then
9882   enableval="$enable_home_terminfo"
9883   with_home_terminfo=$enableval
9884 else
9885   with_home_terminfo=yes
9886 fi;
9887 echo "$as_me:9887: result: $with_home_terminfo" >&5
9888 echo "${ECHO_T}$with_home_terminfo" >&6
9889 test "x$with_home_terminfo" = "xyes" &&
9890 cat >>confdefs.h <<\EOF
9891 #define USE_HOME_TERMINFO 1
9892 EOF
9893
9894 echo "$as_me:9894: checking if you want to permit root to use ncurses environment variables" >&5
9895 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9896
9897 # Check whether --enable-root-environ or --disable-root-environ was given.
9898 if test "${enable_root_environ+set}" = set; then
9899   enableval="$enable_root_environ"
9900   with_root_environ=$enableval
9901 else
9902   with_root_environ=yes
9903 fi;
9904 echo "$as_me:9904: result: $with_root_environ" >&5
9905 echo "${ECHO_T}$with_root_environ" >&6
9906 test "x$with_root_environ" = xyes &&
9907 cat >>confdefs.h <<\EOF
9908 #define USE_ROOT_ENVIRON 1
9909 EOF
9910
9911 echo "$as_me:9911: checking if you want to permit setuid programs to access all files" >&5
9912 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9913
9914 # Check whether --enable-root-access or --disable-root-access was given.
9915 if test "${enable_root_access+set}" = set; then
9916   enableval="$enable_root_access"
9917   with_root_access=$enableval
9918 else
9919   with_root_access=yes
9920 fi;
9921 echo "$as_me:9921: result: $with_root_access" >&5
9922 echo "${ECHO_T}$with_root_access" >&6
9923 test "x$with_root_access" = xyes &&
9924 cat >>confdefs.h <<\EOF
9925 #define USE_ROOT_ACCESS 1
9926 EOF
9927
9928 echo "$as_me:9928: checking if you want to permit setuid use of ncurses environment variables" >&5
9929 echo $ECHO_N "checking if you want to permit setuid use of ncurses environment variables... $ECHO_C" >&6
9930
9931 # Check whether --enable-setuid-environ or --disable-setuid-environ was given.
9932 if test "${enable_setuid_environ+set}" = set; then
9933   enableval="$enable_setuid_environ"
9934   with_setuid_environ=$enableval
9935 else
9936   with_setuid_environ=$with_root_environ
9937 fi;
9938 echo "$as_me:9938: result: $with_setuid_environ" >&5
9939 echo "${ECHO_T}$with_setuid_environ" >&6
9940 test "x$with_setuid_environ" = xyes &&
9941 cat >>confdefs.h <<\EOF
9942 #define USE_SETUID_ENVIRON 1
9943 EOF
9944
9945 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9946 ###   to reduce storage requirements for the terminfo database.
9947
9948 for ac_header in \
9949 unistd.h \
9950
9951 do
9952 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9953 echo "$as_me:9953: checking for $ac_header" >&5
9954 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9955 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9956   echo $ECHO_N "(cached) $ECHO_C" >&6
9957 else
9958   cat >"conftest.$ac_ext" <<_ACEOF
9959 #line 9959 "configure"
9960 #include "confdefs.h"
9961 #include <$ac_header>
9962 _ACEOF
9963 if { (eval echo "$as_me:9963: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9964   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9965   ac_status=$?
9966   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9967   rm -f conftest.er1
9968   cat conftest.err >&5
9969   echo "$as_me:9969: \$? = $ac_status" >&5
9970   (exit "$ac_status"); } >/dev/null; then
9971   if test -s conftest.err; then
9972     ac_cpp_err=$ac_c_preproc_warn_flag
9973   else
9974     ac_cpp_err=
9975   fi
9976 else
9977   ac_cpp_err=yes
9978 fi
9979 if test -z "$ac_cpp_err"; then
9980   eval "$as_ac_Header=yes"
9981 else
9982   echo "$as_me: failed program was:" >&5
9983   cat "conftest.$ac_ext" >&5
9984   eval "$as_ac_Header=no"
9985 fi
9986 rm -f conftest.err "conftest.$ac_ext"
9987 fi
9988 echo "$as_me:9988: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9989 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9990 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9991   cat >>confdefs.h <<EOF
9992 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9993 EOF
9994
9995 fi
9996 done
9997
9998 for ac_func in \
9999         remove \
10000         unlink
10001 do
10002 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10003 echo "$as_me:10003: checking for $ac_func" >&5
10004 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10005 if eval "test \"\${$as_ac_var+set}\" = set"; then
10006   echo $ECHO_N "(cached) $ECHO_C" >&6
10007 else
10008   cat >"conftest.$ac_ext" <<_ACEOF
10009 #line 10009 "configure"
10010 #include "confdefs.h"
10011 #define $ac_func autoconf_temporary
10012 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10013 #undef $ac_func
10014
10015 #ifdef __cplusplus
10016 extern "C"
10017 #endif
10018
10019 /* We use char because int might match the return type of a gcc2
10020    builtin and then its argument prototype would still apply.  */
10021 char $ac_func (void);
10022
10023 int
10024 main (void)
10025 {
10026
10027 /* The GNU C library defines stubs for functions which it implements
10028     to always fail with ENOSYS.  Some functions are actually named
10029     something starting with __ and the normal name is an alias.  */
10030 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10031 #error found stub for $ac_func
10032 #endif
10033
10034         return $ac_func ();
10035   ;
10036   return 0;
10037 }
10038 _ACEOF
10039 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10040 if { (eval echo "$as_me:10040: \"$ac_link\"") >&5
10041   (eval $ac_link) 2>&5
10042   ac_status=$?
10043   echo "$as_me:10043: \$? = $ac_status" >&5
10044   (exit "$ac_status"); } &&
10045          { ac_try='test -s "conftest$ac_exeext"'
10046   { (eval echo "$as_me:10046: \"$ac_try\"") >&5
10047   (eval $ac_try) 2>&5
10048   ac_status=$?
10049   echo "$as_me:10049: \$? = $ac_status" >&5
10050   (exit "$ac_status"); }; }; then
10051   eval "$as_ac_var=yes"
10052 else
10053   echo "$as_me: failed program was:" >&5
10054 cat "conftest.$ac_ext" >&5
10055 eval "$as_ac_var=no"
10056 fi
10057 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10058 fi
10059 echo "$as_me:10059: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10060 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10061 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10062   cat >>confdefs.h <<EOF
10063 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10064 EOF
10065
10066 fi
10067 done
10068
10069 if test "$cross_compiling" = yes ; then
10070
10071 for ac_func in \
10072                 link \
10073                 symlink
10074 do
10075 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10076 echo "$as_me:10076: checking for $ac_func" >&5
10077 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10078 if eval "test \"\${$as_ac_var+set}\" = set"; then
10079   echo $ECHO_N "(cached) $ECHO_C" >&6
10080 else
10081   cat >"conftest.$ac_ext" <<_ACEOF
10082 #line 10082 "configure"
10083 #include "confdefs.h"
10084 #define $ac_func autoconf_temporary
10085 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10086 #undef $ac_func
10087
10088 #ifdef __cplusplus
10089 extern "C"
10090 #endif
10091
10092 /* We use char because int might match the return type of a gcc2
10093    builtin and then its argument prototype would still apply.  */
10094 char $ac_func (void);
10095
10096 int
10097 main (void)
10098 {
10099
10100 /* The GNU C library defines stubs for functions which it implements
10101     to always fail with ENOSYS.  Some functions are actually named
10102     something starting with __ and the normal name is an alias.  */
10103 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10104 #error found stub for $ac_func
10105 #endif
10106
10107         return $ac_func ();
10108   ;
10109   return 0;
10110 }
10111 _ACEOF
10112 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10113 if { (eval echo "$as_me:10113: \"$ac_link\"") >&5
10114   (eval $ac_link) 2>&5
10115   ac_status=$?
10116   echo "$as_me:10116: \$? = $ac_status" >&5
10117   (exit "$ac_status"); } &&
10118          { ac_try='test -s "conftest$ac_exeext"'
10119   { (eval echo "$as_me:10119: \"$ac_try\"") >&5
10120   (eval $ac_try) 2>&5
10121   ac_status=$?
10122   echo "$as_me:10122: \$? = $ac_status" >&5
10123   (exit "$ac_status"); }; }; then
10124   eval "$as_ac_var=yes"
10125 else
10126   echo "$as_me: failed program was:" >&5
10127 cat "conftest.$ac_ext" >&5
10128 eval "$as_ac_var=no"
10129 fi
10130 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10131 fi
10132 echo "$as_me:10132: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10133 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10134 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10135   cat >>confdefs.h <<EOF
10136 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10137 EOF
10138
10139 fi
10140 done
10141
10142 else
10143         echo "$as_me:10143: checking if link/symlink functions work" >&5
10144 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
10145 if test "${cf_cv_link_funcs+set}" = set; then
10146   echo $ECHO_N "(cached) $ECHO_C" >&6
10147 else
10148
10149                 cf_cv_link_funcs=
10150                 for cf_func in link symlink ; do
10151                         if test "$cross_compiling" = yes; then
10152
10153                         eval 'ac_cv_func_'$cf_func'=error'
10154 else
10155   cat >"conftest.$ac_ext" <<_ACEOF
10156 #line 10156 "configure"
10157 #include "confdefs.h"
10158
10159 $ac_includes_default
10160
10161 int main(void)
10162 {
10163         int fail = 0;
10164         char *src = "conftest.tmp";
10165         char *dst = "conftest.chk";
10166         struct stat src_sb, dst_sb;
10167         FILE *fp = fopen(src, "w");
10168         if (fp == 0) { fail = 3; } else {
10169                 fclose(fp); stat(src, &src_sb);
10170                 if ($cf_func(src, dst) < 0) {
10171                         fail = 1;
10172                 } else if (stat(dst, &dst_sb) < 0) {
10173                         fail = 2;
10174                 } else {
10175                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
10176                         if (diff < 0) diff = -diff;
10177                         if (diff > 2) fail = 3;
10178                 }
10179         }
10180 #ifdef HAVE_UNLINK
10181         unlink(dst); unlink(src);
10182 #else
10183         remove(dst); remove(src);
10184 #endif
10185         ${cf_cv_main_return:-return} (fail);
10186 }
10187
10188 _ACEOF
10189 rm -f "conftest$ac_exeext"
10190 if { (eval echo "$as_me:10190: \"$ac_link\"") >&5
10191   (eval $ac_link) 2>&5
10192   ac_status=$?
10193   echo "$as_me:10193: \$? = $ac_status" >&5
10194   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10195   { (eval echo "$as_me:10195: \"$ac_try\"") >&5
10196   (eval $ac_try) 2>&5
10197   ac_status=$?
10198   echo "$as_me:10198: \$? = $ac_status" >&5
10199   (exit "$ac_status"); }; }; then
10200
10201                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
10202                         eval 'ac_cv_func_'$cf_func'=yes'
10203 else
10204   echo "$as_me: program exited with status $ac_status" >&5
10205 echo "$as_me: failed program was:" >&5
10206 cat "conftest.$ac_ext" >&5
10207
10208                         eval 'ac_cv_func_'$cf_func'=no'
10209 fi
10210 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10211 fi
10212                 done
10213                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
10214
10215 fi
10216 echo "$as_me:10216: result: $cf_cv_link_funcs" >&5
10217 echo "${ECHO_T}$cf_cv_link_funcs" >&6
10218         test "$ac_cv_func_link"    = yes &&
10219 cat >>confdefs.h <<\EOF
10220 #define HAVE_LINK 1
10221 EOF
10222
10223         test "$ac_cv_func_symlink" = yes &&
10224 cat >>confdefs.h <<\EOF
10225 #define HAVE_SYMLINK 1
10226 EOF
10227
10228 fi
10229
10230 with_links=no
10231 with_symlinks=no
10232
10233 # soft links (symbolic links) are useful for some systems where hard links do
10234 # not work, or to make it simpler to copy terminfo trees around.
10235 if test "x$ac_cv_func_symlink" = xyes ; then
10236         echo "$as_me:10236: checking if tic should use symbolic links" >&5
10237 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
10238
10239 # Check whether --enable-symlinks or --disable-symlinks was given.
10240 if test "${enable_symlinks+set}" = set; then
10241   enableval="$enable_symlinks"
10242   with_symlinks=$enableval
10243 else
10244   with_symlinks=no
10245 fi;
10246         echo "$as_me:10246: result: $with_symlinks" >&5
10247 echo "${ECHO_T}$with_symlinks" >&6
10248 fi
10249
10250 # If we have hard links and did not choose to use soft links instead, there is
10251 # no reason to make this choice optional - use the hard links.
10252 if test "$with_symlinks" = no ; then
10253         echo "$as_me:10253: checking if tic should use hard links" >&5
10254 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
10255         if test "x$ac_cv_func_link" = xyes ; then
10256                 with_links=yes
10257         else
10258                 with_links=no
10259         fi
10260         echo "$as_me:10260: result: $with_links" >&5
10261 echo "${ECHO_T}$with_links" >&6
10262 fi
10263
10264 test "x$with_links" = xyes &&
10265 cat >>confdefs.h <<\EOF
10266 #define USE_LINKS 1
10267 EOF
10268
10269 test "x$with_symlinks" = xyes &&
10270 cat >>confdefs.h <<\EOF
10271 #define USE_SYMLINKS 1
10272 EOF
10273
10274 ###   use option --enable-broken-linker to force on use of broken-linker support
10275
10276 echo "$as_me:10276: checking if you want broken-linker support code" >&5
10277 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10278
10279 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10280 if test "${enable_broken_linker+set}" = set; then
10281   enableval="$enable_broken_linker"
10282   with_broken_linker=$enableval
10283 else
10284   with_broken_linker=no
10285 fi;
10286 echo "$as_me:10286: result: $with_broken_linker" >&5
10287 echo "${ECHO_T}$with_broken_linker" >&6
10288
10289 : "${BROKEN_LINKER:=0}"
10290 if test "x$with_broken_linker" = xyes ; then
10291
10292 cat >>confdefs.h <<\EOF
10293 #define BROKEN_LINKER 1
10294 EOF
10295
10296         BROKEN_LINKER=1
10297 fi
10298
10299 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
10300 echo "$as_me:10300: checking if tputs should process BSD-style prefix padding" >&5
10301 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
10302
10303 # Check whether --enable-bsdpad or --disable-bsdpad was given.
10304 if test "${enable_bsdpad+set}" = set; then
10305   enableval="$enable_bsdpad"
10306   with_bsdpad=$enableval
10307 else
10308   with_bsdpad=no
10309 fi;
10310 echo "$as_me:10310: result: $with_bsdpad" >&5
10311 echo "${ECHO_T}$with_bsdpad" >&6
10312 test "x$with_bsdpad" = xyes &&
10313 cat >>confdefs.h <<\EOF
10314 #define BSD_TPUTS 1
10315 EOF
10316
10317 ###   use option --enable-widec to turn on use of wide-character support
10318 NCURSES_CH_T=chtype
10319 NCURSES_LIBUTF8=0
10320
10321 NEED_WCHAR_H=0
10322 NCURSES_MBSTATE_T=0
10323 NCURSES_WCHAR_T=0
10324 NCURSES_WINT_T=0
10325
10326 # Check to define _XOPEN_SOURCE "automatically"
10327 CPPFLAGS_before_XOPEN="$CPPFLAGS"
10328
10329 echo "$as_me:10329: checking if the POSIX test-macros are already defined" >&5
10330 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10331 if test "${cf_cv_posix_visible+set}" = set; then
10332   echo $ECHO_N "(cached) $ECHO_C" >&6
10333 else
10334
10335 cat >"conftest.$ac_ext" <<_ACEOF
10336 #line 10336 "configure"
10337 #include "confdefs.h"
10338 #include <stdio.h>
10339 int
10340 main (void)
10341 {
10342
10343 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10344         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10345         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10346         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10347 #error conflicting symbols found
10348 #endif
10349
10350   ;
10351   return 0;
10352 }
10353 _ACEOF
10354 rm -f "conftest.$ac_objext"
10355 if { (eval echo "$as_me:10355: \"$ac_compile\"") >&5
10356   (eval $ac_compile) 2>&5
10357   ac_status=$?
10358   echo "$as_me:10358: \$? = $ac_status" >&5
10359   (exit "$ac_status"); } &&
10360          { ac_try='test -s "conftest.$ac_objext"'
10361   { (eval echo "$as_me:10361: \"$ac_try\"") >&5
10362   (eval $ac_try) 2>&5
10363   ac_status=$?
10364   echo "$as_me:10364: \$? = $ac_status" >&5
10365   (exit "$ac_status"); }; }; then
10366   cf_cv_posix_visible=no
10367 else
10368   echo "$as_me: failed program was:" >&5
10369 cat "conftest.$ac_ext" >&5
10370 cf_cv_posix_visible=yes
10371 fi
10372 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10373
10374 fi
10375 echo "$as_me:10375: result: $cf_cv_posix_visible" >&5
10376 echo "${ECHO_T}$cf_cv_posix_visible" >&6
10377
10378 if test "$cf_cv_posix_visible" = no; then
10379
10380 cf_XOPEN_SOURCE=600
10381 cf_POSIX_C_SOURCE=199506L
10382 cf_xopen_source=
10383
10384 case "$host_os" in
10385 (aix[4-7]*)
10386         cf_xopen_source="-D_ALL_SOURCE"
10387         ;;
10388 (darwin[0-8].*)
10389         cf_xopen_source="-D_APPLE_C_SOURCE"
10390         ;;
10391 (darwin*)
10392         cf_xopen_source="-D_DARWIN_C_SOURCE"
10393         cf_XOPEN_SOURCE=
10394         ;;
10395 (freebsd*|dragonfly*|midnightbsd*)
10396         # 5.x headers associate
10397         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10398         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10399         cf_POSIX_C_SOURCE=200112L
10400         cf_XOPEN_SOURCE=600
10401         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10402         ;;
10403 (hpux11*)
10404         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10405         ;;
10406 (hpux*)
10407         cf_xopen_source="-D_HPUX_SOURCE"
10408         ;;
10409 (irix[56].*)
10410         cf_xopen_source="-D_SGI_SOURCE"
10411         cf_XOPEN_SOURCE=
10412         ;;
10413 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*)
10414
10415 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10416
10417 echo "$as_me:10417: checking if this is the GNU C library" >&5
10418 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10419 if test "${cf_cv_gnu_library+set}" = set; then
10420   echo $ECHO_N "(cached) $ECHO_C" >&6
10421 else
10422
10423 cat >"conftest.$ac_ext" <<_ACEOF
10424 #line 10424 "configure"
10425 #include "confdefs.h"
10426 #include <sys/types.h>
10427 int
10428 main (void)
10429 {
10430
10431         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10432                 return 0;
10433         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10434                 return 0;
10435         #else
10436         #       error not GNU C library
10437         #endif
10438   ;
10439   return 0;
10440 }
10441 _ACEOF
10442 rm -f "conftest.$ac_objext"
10443 if { (eval echo "$as_me:10443: \"$ac_compile\"") >&5
10444   (eval $ac_compile) 2>&5
10445   ac_status=$?
10446   echo "$as_me:10446: \$? = $ac_status" >&5
10447   (exit "$ac_status"); } &&
10448          { ac_try='test -s "conftest.$ac_objext"'
10449   { (eval echo "$as_me:10449: \"$ac_try\"") >&5
10450   (eval $ac_try) 2>&5
10451   ac_status=$?
10452   echo "$as_me:10452: \$? = $ac_status" >&5
10453   (exit "$ac_status"); }; }; then
10454   cf_cv_gnu_library=yes
10455 else
10456   echo "$as_me: failed program was:" >&5
10457 cat "conftest.$ac_ext" >&5
10458 cf_cv_gnu_library=no
10459 fi
10460 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10461
10462 fi
10463 echo "$as_me:10463: result: $cf_cv_gnu_library" >&5
10464 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10465
10466 if test x$cf_cv_gnu_library = xyes; then
10467
10468         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10469         # was changed to help a little.  newlib incorporated the change about 4
10470         # years later.
10471         echo "$as_me:10471: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10472 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10473 if test "${cf_cv_gnu_library_219+set}" = set; then
10474   echo $ECHO_N "(cached) $ECHO_C" >&6
10475 else
10476
10477                 cf_save="$CPPFLAGS"
10478
10479         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10480         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10481
10482                 cat >"conftest.$ac_ext" <<_ACEOF
10483 #line 10483 "configure"
10484 #include "confdefs.h"
10485 #include <sys/types.h>
10486 int
10487 main (void)
10488 {
10489
10490                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10491                                 return 0;
10492                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10493                                 return 0;
10494                         #else
10495                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10496                         #endif
10497   ;
10498   return 0;
10499 }
10500 _ACEOF
10501 rm -f "conftest.$ac_objext"
10502 if { (eval echo "$as_me:10502: \"$ac_compile\"") >&5
10503   (eval $ac_compile) 2>&5
10504   ac_status=$?
10505   echo "$as_me:10505: \$? = $ac_status" >&5
10506   (exit "$ac_status"); } &&
10507          { ac_try='test -s "conftest.$ac_objext"'
10508   { (eval echo "$as_me:10508: \"$ac_try\"") >&5
10509   (eval $ac_try) 2>&5
10510   ac_status=$?
10511   echo "$as_me:10511: \$? = $ac_status" >&5
10512   (exit "$ac_status"); }; }; then
10513   cf_cv_gnu_library_219=yes
10514 else
10515   echo "$as_me: failed program was:" >&5
10516 cat "conftest.$ac_ext" >&5
10517 cf_cv_gnu_library_219=no
10518 fi
10519 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10520                 CPPFLAGS="$cf_save"
10521
10522 fi
10523 echo "$as_me:10523: result: $cf_cv_gnu_library_219" >&5
10524 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10525
10526         if test "x$cf_cv_gnu_library_219" = xyes; then
10527                 cf_save="$CPPFLAGS"
10528                 echo "$as_me:10528: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10529 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10530 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10531   echo $ECHO_N "(cached) $ECHO_C" >&6
10532 else
10533
10534 cf_fix_cppflags=no
10535 cf_new_cflags=
10536 cf_new_cppflags=
10537 cf_new_extra_cppflags=
10538
10539 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10540 do
10541 case "$cf_fix_cppflags" in
10542 (no)
10543         case "$cf_add_cflags" in
10544         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10545                 case "$cf_add_cflags" in
10546                 (-D*)
10547                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10548
10549                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10550                                 && test -z "${cf_tst_cflags}" \
10551                                 && cf_fix_cppflags=yes
10552
10553                         if test "$cf_fix_cppflags" = yes ; then
10554
10555         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10556         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10557
10558                                 continue
10559                         elif test "${cf_tst_cflags}" = "\"'" ; then
10560
10561         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10562         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10563
10564                                 continue
10565                         fi
10566                         ;;
10567                 esac
10568                 case "$CPPFLAGS" in
10569                 (*$cf_add_cflags)
10570                         ;;
10571                 (*)
10572                         case "$cf_add_cflags" in
10573                         (-D*)
10574                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10575
10576 CPPFLAGS=`echo "$CPPFLAGS" | \
10577         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10578                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10579
10580                                 ;;
10581                         esac
10582
10583         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10584         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10585
10586                         ;;
10587                 esac
10588                 ;;
10589         (*)
10590
10591         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10592         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10593
10594                 ;;
10595         esac
10596         ;;
10597 (yes)
10598
10599         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10600         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10601
10602         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10603
10604         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10605                 && test -z "${cf_tst_cflags}" \
10606                 && cf_fix_cppflags=no
10607         ;;
10608 esac
10609 done
10610
10611 if test -n "$cf_new_cflags" ; then
10612
10613         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10614         CFLAGS="${CFLAGS}$cf_new_cflags"
10615
10616 fi
10617
10618 if test -n "$cf_new_cppflags" ; then
10619
10620         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10621         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10622
10623 fi
10624
10625 if test -n "$cf_new_extra_cppflags" ; then
10626
10627         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10628         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10629
10630 fi
10631
10632                         cat >"conftest.$ac_ext" <<_ACEOF
10633 #line 10633 "configure"
10634 #include "confdefs.h"
10635
10636                                 #include <limits.h>
10637                                 #include <sys/types.h>
10638
10639 int
10640 main (void)
10641 {
10642
10643                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10644                                         return 0;
10645                                 #else
10646                                 #       error GNU C library is too old
10647                                 #endif
10648   ;
10649   return 0;
10650 }
10651 _ACEOF
10652 rm -f "conftest.$ac_objext"
10653 if { (eval echo "$as_me:10653: \"$ac_compile\"") >&5
10654   (eval $ac_compile) 2>&5
10655   ac_status=$?
10656   echo "$as_me:10656: \$? = $ac_status" >&5
10657   (exit "$ac_status"); } &&
10658          { ac_try='test -s "conftest.$ac_objext"'
10659   { (eval echo "$as_me:10659: \"$ac_try\"") >&5
10660   (eval $ac_try) 2>&5
10661   ac_status=$?
10662   echo "$as_me:10662: \$? = $ac_status" >&5
10663   (exit "$ac_status"); }; }; then
10664   cf_cv_gnu_dftsrc_219=yes
10665 else
10666   echo "$as_me: failed program was:" >&5
10667 cat "conftest.$ac_ext" >&5
10668 cf_cv_gnu_dftsrc_219=no
10669 fi
10670 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10671
10672 fi
10673 echo "$as_me:10673: result: $cf_cv_gnu_dftsrc_219" >&5
10674 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10675                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10676         else
10677                 cf_cv_gnu_dftsrc_219=maybe
10678         fi
10679
10680         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10681
10682                 echo "$as_me:10682: checking if we must define _GNU_SOURCE" >&5
10683 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10684 if test "${cf_cv_gnu_source+set}" = set; then
10685   echo $ECHO_N "(cached) $ECHO_C" >&6
10686 else
10687
10688                 cat >"conftest.$ac_ext" <<_ACEOF
10689 #line 10689 "configure"
10690 #include "confdefs.h"
10691 #include <sys/types.h>
10692 int
10693 main (void)
10694 {
10695
10696                         #ifndef _XOPEN_SOURCE
10697                         #error  expected _XOPEN_SOURCE to be defined
10698                         #endif
10699   ;
10700   return 0;
10701 }
10702 _ACEOF
10703 rm -f "conftest.$ac_objext"
10704 if { (eval echo "$as_me:10704: \"$ac_compile\"") >&5
10705   (eval $ac_compile) 2>&5
10706   ac_status=$?
10707   echo "$as_me:10707: \$? = $ac_status" >&5
10708   (exit "$ac_status"); } &&
10709          { ac_try='test -s "conftest.$ac_objext"'
10710   { (eval echo "$as_me:10710: \"$ac_try\"") >&5
10711   (eval $ac_try) 2>&5
10712   ac_status=$?
10713   echo "$as_me:10713: \$? = $ac_status" >&5
10714   (exit "$ac_status"); }; }; then
10715   cf_cv_gnu_source=no
10716 else
10717   echo "$as_me: failed program was:" >&5
10718 cat "conftest.$ac_ext" >&5
10719 cf_save="$CPPFLAGS"
10720
10721 cf_fix_cppflags=no
10722 cf_new_cflags=
10723 cf_new_cppflags=
10724 cf_new_extra_cppflags=
10725
10726 for cf_add_cflags in -D_GNU_SOURCE
10727 do
10728 case "$cf_fix_cppflags" in
10729 (no)
10730         case "$cf_add_cflags" in
10731         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10732                 case "$cf_add_cflags" in
10733                 (-D*)
10734                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10735
10736                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10737                                 && test -z "${cf_tst_cflags}" \
10738                                 && cf_fix_cppflags=yes
10739
10740                         if test "$cf_fix_cppflags" = yes ; then
10741
10742         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10743         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10744
10745                                 continue
10746                         elif test "${cf_tst_cflags}" = "\"'" ; then
10747
10748         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10749         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10750
10751                                 continue
10752                         fi
10753                         ;;
10754                 esac
10755                 case "$CPPFLAGS" in
10756                 (*$cf_add_cflags)
10757                         ;;
10758                 (*)
10759                         case "$cf_add_cflags" in
10760                         (-D*)
10761                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10762
10763 CPPFLAGS=`echo "$CPPFLAGS" | \
10764         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10765                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10766
10767                                 ;;
10768                         esac
10769
10770         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10771         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10772
10773                         ;;
10774                 esac
10775                 ;;
10776         (*)
10777
10778         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10779         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10780
10781                 ;;
10782         esac
10783         ;;
10784 (yes)
10785
10786         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10787         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10788
10789         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10790
10791         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10792                 && test -z "${cf_tst_cflags}" \
10793                 && cf_fix_cppflags=no
10794         ;;
10795 esac
10796 done
10797
10798 if test -n "$cf_new_cflags" ; then
10799
10800         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10801         CFLAGS="${CFLAGS}$cf_new_cflags"
10802
10803 fi
10804
10805 if test -n "$cf_new_cppflags" ; then
10806
10807         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10808         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10809
10810 fi
10811
10812 if test -n "$cf_new_extra_cppflags" ; then
10813
10814         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10815         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10816
10817 fi
10818
10819                          cat >"conftest.$ac_ext" <<_ACEOF
10820 #line 10820 "configure"
10821 #include "confdefs.h"
10822 #include <sys/types.h>
10823 int
10824 main (void)
10825 {
10826
10827                                 #ifdef _XOPEN_SOURCE
10828                                 #error  expected _XOPEN_SOURCE to be undefined
10829                                 #endif
10830   ;
10831   return 0;
10832 }
10833 _ACEOF
10834 rm -f "conftest.$ac_objext"
10835 if { (eval echo "$as_me:10835: \"$ac_compile\"") >&5
10836   (eval $ac_compile) 2>&5
10837   ac_status=$?
10838   echo "$as_me:10838: \$? = $ac_status" >&5
10839   (exit "$ac_status"); } &&
10840          { ac_try='test -s "conftest.$ac_objext"'
10841   { (eval echo "$as_me:10841: \"$ac_try\"") >&5
10842   (eval $ac_try) 2>&5
10843   ac_status=$?
10844   echo "$as_me:10844: \$? = $ac_status" >&5
10845   (exit "$ac_status"); }; }; then
10846   cf_cv_gnu_source=no
10847 else
10848   echo "$as_me: failed program was:" >&5
10849 cat "conftest.$ac_ext" >&5
10850 cf_cv_gnu_source=yes
10851 fi
10852 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10853                         CPPFLAGS="$cf_save"
10854
10855 fi
10856 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10857
10858 fi
10859 echo "$as_me:10859: result: $cf_cv_gnu_source" >&5
10860 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10861
10862                 if test "$cf_cv_gnu_source" = yes
10863                 then
10864                 echo "$as_me:10864: checking if we should also define _DEFAULT_SOURCE" >&5
10865 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10866 if test "${cf_cv_default_source+set}" = set; then
10867   echo $ECHO_N "(cached) $ECHO_C" >&6
10868 else
10869
10870         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10871         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10872
10873                         cat >"conftest.$ac_ext" <<_ACEOF
10874 #line 10874 "configure"
10875 #include "confdefs.h"
10876 #include <sys/types.h>
10877 int
10878 main (void)
10879 {
10880
10881                                 #ifdef _DEFAULT_SOURCE
10882                                 #error  expected _DEFAULT_SOURCE to be undefined
10883                                 #endif
10884   ;
10885   return 0;
10886 }
10887 _ACEOF
10888 rm -f "conftest.$ac_objext"
10889 if { (eval echo "$as_me:10889: \"$ac_compile\"") >&5
10890   (eval $ac_compile) 2>&5
10891   ac_status=$?
10892   echo "$as_me:10892: \$? = $ac_status" >&5
10893   (exit "$ac_status"); } &&
10894          { ac_try='test -s "conftest.$ac_objext"'
10895   { (eval echo "$as_me:10895: \"$ac_try\"") >&5
10896   (eval $ac_try) 2>&5
10897   ac_status=$?
10898   echo "$as_me:10898: \$? = $ac_status" >&5
10899   (exit "$ac_status"); }; }; then
10900   cf_cv_default_source=no
10901 else
10902   echo "$as_me: failed program was:" >&5
10903 cat "conftest.$ac_ext" >&5
10904 cf_cv_default_source=yes
10905 fi
10906 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10907
10908 fi
10909 echo "$as_me:10909: result: $cf_cv_default_source" >&5
10910 echo "${ECHO_T}$cf_cv_default_source" >&6
10911                         if test "$cf_cv_default_source" = yes
10912                         then
10913
10914         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10915         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10916
10917                         fi
10918                 fi
10919         fi
10920
10921 fi
10922
10923         ;;
10924 (minix*)
10925         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10926         ;;
10927 (mirbsd*)
10928         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10929         cf_XOPEN_SOURCE=
10930
10931 if test "$cf_cv_posix_visible" = no; then
10932
10933 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10934
10935 cf_save_CFLAGS="$CFLAGS"
10936 cf_save_CPPFLAGS="$CPPFLAGS"
10937
10938 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10939         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10940                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10941
10942 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10943         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10944                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10945
10946 echo "$as_me:10946: checking if we should define _POSIX_C_SOURCE" >&5
10947 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10948 if test "${cf_cv_posix_c_source+set}" = set; then
10949   echo $ECHO_N "(cached) $ECHO_C" >&6
10950 else
10951
10952 echo "${as_me:-configure}:10952: testing if the symbol is already defined go no further ..." 1>&5
10953
10954         cat >"conftest.$ac_ext" <<_ACEOF
10955 #line 10955 "configure"
10956 #include "confdefs.h"
10957 #include <sys/types.h>
10958 int
10959 main (void)
10960 {
10961
10962 #ifndef _POSIX_C_SOURCE
10963 #error _POSIX_C_SOURCE is not defined
10964 #endif
10965   ;
10966   return 0;
10967 }
10968 _ACEOF
10969 rm -f "conftest.$ac_objext"
10970 if { (eval echo "$as_me:10970: \"$ac_compile\"") >&5
10971   (eval $ac_compile) 2>&5
10972   ac_status=$?
10973   echo "$as_me:10973: \$? = $ac_status" >&5
10974   (exit "$ac_status"); } &&
10975          { ac_try='test -s "conftest.$ac_objext"'
10976   { (eval echo "$as_me:10976: \"$ac_try\"") >&5
10977   (eval $ac_try) 2>&5
10978   ac_status=$?
10979   echo "$as_me:10979: \$? = $ac_status" >&5
10980   (exit "$ac_status"); }; }; then
10981   cf_cv_posix_c_source=no
10982 else
10983   echo "$as_me: failed program was:" >&5
10984 cat "conftest.$ac_ext" >&5
10985 cf_want_posix_source=no
10986          case .$cf_POSIX_C_SOURCE in
10987          (.[12]??*)
10988                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10989                 ;;
10990          (.2)
10991                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10992                 cf_want_posix_source=yes
10993                 ;;
10994          (.*)
10995                 cf_want_posix_source=yes
10996                 ;;
10997          esac
10998          if test "$cf_want_posix_source" = yes ; then
10999                 cat >"conftest.$ac_ext" <<_ACEOF
11000 #line 11000 "configure"
11001 #include "confdefs.h"
11002 #include <sys/types.h>
11003 int
11004 main (void)
11005 {
11006
11007 #ifdef _POSIX_SOURCE
11008 #error _POSIX_SOURCE is defined
11009 #endif
11010   ;
11011   return 0;
11012 }
11013 _ACEOF
11014 rm -f "conftest.$ac_objext"
11015 if { (eval echo "$as_me:11015: \"$ac_compile\"") >&5
11016   (eval $ac_compile) 2>&5
11017   ac_status=$?
11018   echo "$as_me:11018: \$? = $ac_status" >&5
11019   (exit "$ac_status"); } &&
11020          { ac_try='test -s "conftest.$ac_objext"'
11021   { (eval echo "$as_me:11021: \"$ac_try\"") >&5
11022   (eval $ac_try) 2>&5
11023   ac_status=$?
11024   echo "$as_me:11024: \$? = $ac_status" >&5
11025   (exit "$ac_status"); }; }; then
11026   :
11027 else
11028   echo "$as_me: failed program was:" >&5
11029 cat "conftest.$ac_ext" >&5
11030 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11031 fi
11032 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11033          fi
11034
11035 echo "${as_me:-configure}:11035: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11036
11037          CFLAGS="$cf_trim_CFLAGS"
11038          CPPFLAGS="$cf_trim_CPPFLAGS"
11039
11040         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11041         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11042
11043 echo "${as_me:-configure}:11043: testing if the second compile does not leave our definition intact error ..." 1>&5
11044
11045          cat >"conftest.$ac_ext" <<_ACEOF
11046 #line 11046 "configure"
11047 #include "confdefs.h"
11048 #include <sys/types.h>
11049 int
11050 main (void)
11051 {
11052
11053 #ifndef _POSIX_C_SOURCE
11054 #error _POSIX_C_SOURCE is not defined
11055 #endif
11056   ;
11057   return 0;
11058 }
11059 _ACEOF
11060 rm -f "conftest.$ac_objext"
11061 if { (eval echo "$as_me:11061: \"$ac_compile\"") >&5
11062   (eval $ac_compile) 2>&5
11063   ac_status=$?
11064   echo "$as_me:11064: \$? = $ac_status" >&5
11065   (exit "$ac_status"); } &&
11066          { ac_try='test -s "conftest.$ac_objext"'
11067   { (eval echo "$as_me:11067: \"$ac_try\"") >&5
11068   (eval $ac_try) 2>&5
11069   ac_status=$?
11070   echo "$as_me:11070: \$? = $ac_status" >&5
11071   (exit "$ac_status"); }; }; then
11072   :
11073 else
11074   echo "$as_me: failed program was:" >&5
11075 cat "conftest.$ac_ext" >&5
11076 cf_cv_posix_c_source=no
11077 fi
11078 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11079          CFLAGS="$cf_save_CFLAGS"
11080          CPPFLAGS="$cf_save_CPPFLAGS"
11081
11082 fi
11083 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11084
11085 fi
11086 echo "$as_me:11086: result: $cf_cv_posix_c_source" >&5
11087 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11088
11089 if test "$cf_cv_posix_c_source" != no ; then
11090         CFLAGS="$cf_trim_CFLAGS"
11091         CPPFLAGS="$cf_trim_CPPFLAGS"
11092
11093 cf_fix_cppflags=no
11094 cf_new_cflags=
11095 cf_new_cppflags=
11096 cf_new_extra_cppflags=
11097
11098 for cf_add_cflags in $cf_cv_posix_c_source
11099 do
11100 case "$cf_fix_cppflags" in
11101 (no)
11102         case "$cf_add_cflags" in
11103         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11104                 case "$cf_add_cflags" in
11105                 (-D*)
11106                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11107
11108                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11109                                 && test -z "${cf_tst_cflags}" \
11110                                 && cf_fix_cppflags=yes
11111
11112                         if test "$cf_fix_cppflags" = yes ; then
11113
11114         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11115         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11116
11117                                 continue
11118                         elif test "${cf_tst_cflags}" = "\"'" ; then
11119
11120         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11121         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11122
11123                                 continue
11124                         fi
11125                         ;;
11126                 esac
11127                 case "$CPPFLAGS" in
11128                 (*$cf_add_cflags)
11129                         ;;
11130                 (*)
11131                         case "$cf_add_cflags" in
11132                         (-D*)
11133                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11134
11135 CPPFLAGS=`echo "$CPPFLAGS" | \
11136         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11137                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11138
11139                                 ;;
11140                         esac
11141
11142         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11143         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11144
11145                         ;;
11146                 esac
11147                 ;;
11148         (*)
11149
11150         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11151         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11152
11153                 ;;
11154         esac
11155         ;;
11156 (yes)
11157
11158         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11159         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11160
11161         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11162
11163         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11164                 && test -z "${cf_tst_cflags}" \
11165                 && cf_fix_cppflags=no
11166         ;;
11167 esac
11168 done
11169
11170 if test -n "$cf_new_cflags" ; then
11171
11172         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11173         CFLAGS="${CFLAGS}$cf_new_cflags"
11174
11175 fi
11176
11177 if test -n "$cf_new_cppflags" ; then
11178
11179         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11180         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11181
11182 fi
11183
11184 if test -n "$cf_new_extra_cppflags" ; then
11185
11186         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11187         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11188
11189 fi
11190
11191 fi
11192
11193 fi # cf_cv_posix_visible
11194
11195         ;;
11196 (netbsd*)
11197         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11198         ;;
11199 (openbsd[6-9]*)
11200         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
11201         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
11202         # Abusing the conformance level is a workaround.
11203         { echo "$as_me:11203: WARNING: this system does not provide usable locale support" >&5
11204 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
11205         cf_xopen_source="-D_BSD_SOURCE"
11206         cf_XOPEN_SOURCE=700
11207         ;;
11208 (openbsd[4-5]*)
11209         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11210         cf_xopen_source="-D_BSD_SOURCE"
11211         cf_XOPEN_SOURCE=600
11212         ;;
11213 (openbsd*)
11214         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11215         ;;
11216 (osf[45]*)
11217         cf_xopen_source="-D_OSF_SOURCE"
11218         ;;
11219 (nto-qnx*)
11220         cf_xopen_source="-D_QNX_SOURCE"
11221         ;;
11222 (sco*)
11223         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11224         ;;
11225 (solaris2.*)
11226         cf_xopen_source="-D__EXTENSIONS__"
11227         cf_cv_xopen_source=broken
11228         ;;
11229 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11230         cf_XOPEN_SOURCE=
11231         cf_POSIX_C_SOURCE=
11232         ;;
11233 (*)
11234
11235 echo "$as_me:11235: checking if we should define _XOPEN_SOURCE" >&5
11236 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11237 if test "${cf_cv_xopen_source+set}" = set; then
11238   echo $ECHO_N "(cached) $ECHO_C" >&6
11239 else
11240
11241         cat >"conftest.$ac_ext" <<_ACEOF
11242 #line 11242 "configure"
11243 #include "confdefs.h"
11244
11245 $ac_includes_default
11246
11247 int
11248 main (void)
11249 {
11250
11251 #ifndef _XOPEN_SOURCE
11252 #error _XOPEN_SOURCE is not defined
11253 #endif
11254
11255   ;
11256   return 0;
11257 }
11258 _ACEOF
11259 rm -f "conftest.$ac_objext"
11260 if { (eval echo "$as_me:11260: \"$ac_compile\"") >&5
11261   (eval $ac_compile) 2>&5
11262   ac_status=$?
11263   echo "$as_me:11263: \$? = $ac_status" >&5
11264   (exit "$ac_status"); } &&
11265          { ac_try='test -s "conftest.$ac_objext"'
11266   { (eval echo "$as_me:11266: \"$ac_try\"") >&5
11267   (eval $ac_try) 2>&5
11268   ac_status=$?
11269   echo "$as_me:11269: \$? = $ac_status" >&5
11270   (exit "$ac_status"); }; }; then
11271   cf_cv_xopen_source=no
11272 else
11273   echo "$as_me: failed program was:" >&5
11274 cat "conftest.$ac_ext" >&5
11275 cf_save="$CPPFLAGS"
11276
11277         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11278         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11279
11280          cat >"conftest.$ac_ext" <<_ACEOF
11281 #line 11281 "configure"
11282 #include "confdefs.h"
11283
11284 $ac_includes_default
11285
11286 int
11287 main (void)
11288 {
11289
11290 #ifndef _XOPEN_SOURCE
11291 #error _XOPEN_SOURCE is not defined
11292 #endif
11293
11294   ;
11295   return 0;
11296 }
11297 _ACEOF
11298 rm -f "conftest.$ac_objext"
11299 if { (eval echo "$as_me:11299: \"$ac_compile\"") >&5
11300   (eval $ac_compile) 2>&5
11301   ac_status=$?
11302   echo "$as_me:11302: \$? = $ac_status" >&5
11303   (exit "$ac_status"); } &&
11304          { ac_try='test -s "conftest.$ac_objext"'
11305   { (eval echo "$as_me:11305: \"$ac_try\"") >&5
11306   (eval $ac_try) 2>&5
11307   ac_status=$?
11308   echo "$as_me:11308: \$? = $ac_status" >&5
11309   (exit "$ac_status"); }; }; then
11310   cf_cv_xopen_source=no
11311 else
11312   echo "$as_me: failed program was:" >&5
11313 cat "conftest.$ac_ext" >&5
11314 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11315 fi
11316 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11317                 CPPFLAGS="$cf_save"
11318
11319 fi
11320 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11321
11322 fi
11323 echo "$as_me:11323: result: $cf_cv_xopen_source" >&5
11324 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11325
11326 if test "$cf_cv_xopen_source" != no ; then
11327
11328 CFLAGS=`echo "$CFLAGS" | \
11329         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11330                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11331
11332 CPPFLAGS=`echo "$CPPFLAGS" | \
11333         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11334                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11335
11336         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11337
11338 for cf_add_cflags in $cf_temp_xopen_source
11339 do
11340         case "x$cf_add_cflags" in
11341         (x-[DU]*)
11342
11343 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11344 while true
11345 do
11346         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'`
11347         test "$CFLAGS" != "$cf_old_cflag" || break
11348
11349         CFLAGS="$cf_old_cflag"
11350 done
11351
11352 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11353 while true
11354 do
11355         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'`
11356         test "$CPPFLAGS" != "$cf_old_cflag" || break
11357
11358         CPPFLAGS="$cf_old_cflag"
11359 done
11360
11361                 ;;
11362         esac
11363
11364 cf_fix_cppflags=no
11365 cf_new_cflags=
11366 cf_new_cppflags=
11367 cf_new_extra_cppflags=
11368
11369 for cf_add_cflags in $cf_add_cflags
11370 do
11371 case "$cf_fix_cppflags" in
11372 (no)
11373         case "$cf_add_cflags" in
11374         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11375                 case "$cf_add_cflags" in
11376                 (-D*)
11377                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11378
11379                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11380                                 && test -z "${cf_tst_cflags}" \
11381                                 && cf_fix_cppflags=yes
11382
11383                         if test "$cf_fix_cppflags" = yes ; then
11384
11385         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11386         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11387
11388                                 continue
11389                         elif test "${cf_tst_cflags}" = "\"'" ; then
11390
11391         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11392         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11393
11394                                 continue
11395                         fi
11396                         ;;
11397                 esac
11398                 case "$CPPFLAGS" in
11399                 (*$cf_add_cflags)
11400                         ;;
11401                 (*)
11402                         case "$cf_add_cflags" in
11403                         (-D*)
11404                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11405
11406 CPPFLAGS=`echo "$CPPFLAGS" | \
11407         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11408                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11409
11410                                 ;;
11411                         esac
11412
11413         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11414         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11415
11416                         ;;
11417                 esac
11418                 ;;
11419         (*)
11420
11421         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11422         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11423
11424                 ;;
11425         esac
11426         ;;
11427 (yes)
11428
11429         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11430         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11431
11432         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11433
11434         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11435                 && test -z "${cf_tst_cflags}" \
11436                 && cf_fix_cppflags=no
11437         ;;
11438 esac
11439 done
11440
11441 if test -n "$cf_new_cflags" ; then
11442
11443         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11444         CFLAGS="${CFLAGS}$cf_new_cflags"
11445
11446 fi
11447
11448 if test -n "$cf_new_cppflags" ; then
11449
11450         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11451         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11452
11453 fi
11454
11455 if test -n "$cf_new_extra_cppflags" ; then
11456
11457         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11458         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11459
11460 fi
11461
11462 done
11463
11464 fi
11465
11466         cf_save_xopen_cppflags="$CPPFLAGS"
11467
11468 if test "$cf_cv_posix_visible" = no; then
11469
11470 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11471
11472 cf_save_CFLAGS="$CFLAGS"
11473 cf_save_CPPFLAGS="$CPPFLAGS"
11474
11475 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11476         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11477                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11478
11479 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11480         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11481                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11482
11483 echo "$as_me:11483: checking if we should define _POSIX_C_SOURCE" >&5
11484 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11485 if test "${cf_cv_posix_c_source+set}" = set; then
11486   echo $ECHO_N "(cached) $ECHO_C" >&6
11487 else
11488
11489 echo "${as_me:-configure}:11489: testing if the symbol is already defined go no further ..." 1>&5
11490
11491         cat >"conftest.$ac_ext" <<_ACEOF
11492 #line 11492 "configure"
11493 #include "confdefs.h"
11494 #include <sys/types.h>
11495 int
11496 main (void)
11497 {
11498
11499 #ifndef _POSIX_C_SOURCE
11500 #error _POSIX_C_SOURCE is not defined
11501 #endif
11502   ;
11503   return 0;
11504 }
11505 _ACEOF
11506 rm -f "conftest.$ac_objext"
11507 if { (eval echo "$as_me:11507: \"$ac_compile\"") >&5
11508   (eval $ac_compile) 2>&5
11509   ac_status=$?
11510   echo "$as_me:11510: \$? = $ac_status" >&5
11511   (exit "$ac_status"); } &&
11512          { ac_try='test -s "conftest.$ac_objext"'
11513   { (eval echo "$as_me:11513: \"$ac_try\"") >&5
11514   (eval $ac_try) 2>&5
11515   ac_status=$?
11516   echo "$as_me:11516: \$? = $ac_status" >&5
11517   (exit "$ac_status"); }; }; then
11518   cf_cv_posix_c_source=no
11519 else
11520   echo "$as_me: failed program was:" >&5
11521 cat "conftest.$ac_ext" >&5
11522 cf_want_posix_source=no
11523          case .$cf_POSIX_C_SOURCE in
11524          (.[12]??*)
11525                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11526                 ;;
11527          (.2)
11528                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11529                 cf_want_posix_source=yes
11530                 ;;
11531          (.*)
11532                 cf_want_posix_source=yes
11533                 ;;
11534          esac
11535          if test "$cf_want_posix_source" = yes ; then
11536                 cat >"conftest.$ac_ext" <<_ACEOF
11537 #line 11537 "configure"
11538 #include "confdefs.h"
11539 #include <sys/types.h>
11540 int
11541 main (void)
11542 {
11543
11544 #ifdef _POSIX_SOURCE
11545 #error _POSIX_SOURCE is defined
11546 #endif
11547   ;
11548   return 0;
11549 }
11550 _ACEOF
11551 rm -f "conftest.$ac_objext"
11552 if { (eval echo "$as_me:11552: \"$ac_compile\"") >&5
11553   (eval $ac_compile) 2>&5
11554   ac_status=$?
11555   echo "$as_me:11555: \$? = $ac_status" >&5
11556   (exit "$ac_status"); } &&
11557          { ac_try='test -s "conftest.$ac_objext"'
11558   { (eval echo "$as_me:11558: \"$ac_try\"") >&5
11559   (eval $ac_try) 2>&5
11560   ac_status=$?
11561   echo "$as_me:11561: \$? = $ac_status" >&5
11562   (exit "$ac_status"); }; }; then
11563   :
11564 else
11565   echo "$as_me: failed program was:" >&5
11566 cat "conftest.$ac_ext" >&5
11567 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11568 fi
11569 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11570          fi
11571
11572 echo "${as_me:-configure}:11572: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11573
11574          CFLAGS="$cf_trim_CFLAGS"
11575          CPPFLAGS="$cf_trim_CPPFLAGS"
11576
11577         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11578         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11579
11580 echo "${as_me:-configure}:11580: testing if the second compile does not leave our definition intact error ..." 1>&5
11581
11582          cat >"conftest.$ac_ext" <<_ACEOF
11583 #line 11583 "configure"
11584 #include "confdefs.h"
11585 #include <sys/types.h>
11586 int
11587 main (void)
11588 {
11589
11590 #ifndef _POSIX_C_SOURCE
11591 #error _POSIX_C_SOURCE is not defined
11592 #endif
11593   ;
11594   return 0;
11595 }
11596 _ACEOF
11597 rm -f "conftest.$ac_objext"
11598 if { (eval echo "$as_me:11598: \"$ac_compile\"") >&5
11599   (eval $ac_compile) 2>&5
11600   ac_status=$?
11601   echo "$as_me:11601: \$? = $ac_status" >&5
11602   (exit "$ac_status"); } &&
11603          { ac_try='test -s "conftest.$ac_objext"'
11604   { (eval echo "$as_me:11604: \"$ac_try\"") >&5
11605   (eval $ac_try) 2>&5
11606   ac_status=$?
11607   echo "$as_me:11607: \$? = $ac_status" >&5
11608   (exit "$ac_status"); }; }; then
11609   :
11610 else
11611   echo "$as_me: failed program was:" >&5
11612 cat "conftest.$ac_ext" >&5
11613 cf_cv_posix_c_source=no
11614 fi
11615 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11616          CFLAGS="$cf_save_CFLAGS"
11617          CPPFLAGS="$cf_save_CPPFLAGS"
11618
11619 fi
11620 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11621
11622 fi
11623 echo "$as_me:11623: result: $cf_cv_posix_c_source" >&5
11624 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11625
11626 if test "$cf_cv_posix_c_source" != no ; then
11627         CFLAGS="$cf_trim_CFLAGS"
11628         CPPFLAGS="$cf_trim_CPPFLAGS"
11629
11630 cf_fix_cppflags=no
11631 cf_new_cflags=
11632 cf_new_cppflags=
11633 cf_new_extra_cppflags=
11634
11635 for cf_add_cflags in $cf_cv_posix_c_source
11636 do
11637 case "$cf_fix_cppflags" in
11638 (no)
11639         case "$cf_add_cflags" in
11640         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11641                 case "$cf_add_cflags" in
11642                 (-D*)
11643                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11644
11645                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11646                                 && test -z "${cf_tst_cflags}" \
11647                                 && cf_fix_cppflags=yes
11648
11649                         if test "$cf_fix_cppflags" = yes ; then
11650
11651         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11652         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11653
11654                                 continue
11655                         elif test "${cf_tst_cflags}" = "\"'" ; then
11656
11657         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11658         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11659
11660                                 continue
11661                         fi
11662                         ;;
11663                 esac
11664                 case "$CPPFLAGS" in
11665                 (*$cf_add_cflags)
11666                         ;;
11667                 (*)
11668                         case "$cf_add_cflags" in
11669                         (-D*)
11670                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11671
11672 CPPFLAGS=`echo "$CPPFLAGS" | \
11673         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11674                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11675
11676                                 ;;
11677                         esac
11678
11679         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11680         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11681
11682                         ;;
11683                 esac
11684                 ;;
11685         (*)
11686
11687         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11688         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11689
11690                 ;;
11691         esac
11692         ;;
11693 (yes)
11694
11695         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11696         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11697
11698         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11699
11700         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11701                 && test -z "${cf_tst_cflags}" \
11702                 && cf_fix_cppflags=no
11703         ;;
11704 esac
11705 done
11706
11707 if test -n "$cf_new_cflags" ; then
11708
11709         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11710         CFLAGS="${CFLAGS}$cf_new_cflags"
11711
11712 fi
11713
11714 if test -n "$cf_new_cppflags" ; then
11715
11716         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11717         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11718
11719 fi
11720
11721 if test -n "$cf_new_extra_cppflags" ; then
11722
11723         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11724         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11725
11726 fi
11727
11728 fi
11729
11730 fi # cf_cv_posix_visible
11731
11732         # Some of these niche implementations use copy/paste, double-check...
11733         if test "$cf_cv_xopen_source" = no ; then
11734                 test -n "$verbose" && echo "    checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
11735
11736 echo "${as_me:-configure}:11736: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
11737
11738                 cat >"conftest.$ac_ext" <<_ACEOF
11739 #line 11739 "configure"
11740 #include "confdefs.h"
11741
11742 $ac_includes_default
11743
11744 int
11745 main (void)
11746 {
11747
11748 #ifndef _XOPEN_SOURCE
11749 #error _XOPEN_SOURCE is not defined
11750 #endif
11751
11752   ;
11753   return 0;
11754 }
11755 _ACEOF
11756 rm -f "conftest.$ac_objext"
11757 if { (eval echo "$as_me:11757: \"$ac_compile\"") >&5
11758   (eval $ac_compile) 2>&5
11759   ac_status=$?
11760   echo "$as_me:11760: \$? = $ac_status" >&5
11761   (exit "$ac_status"); } &&
11762          { ac_try='test -s "conftest.$ac_objext"'
11763   { (eval echo "$as_me:11763: \"$ac_try\"") >&5
11764   (eval $ac_try) 2>&5
11765   ac_status=$?
11766   echo "$as_me:11766: \$? = $ac_status" >&5
11767   (exit "$ac_status"); }; }; then
11768   :
11769 else
11770   echo "$as_me: failed program was:" >&5
11771 cat "conftest.$ac_ext" >&5
11772
11773                         { echo "$as_me:11773: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
11774 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
11775                         CPPFLAGS="$cf_save_xopen_cppflags"
11776 fi
11777 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11778         fi
11779         ;;
11780 esac
11781
11782 if test -n "$cf_xopen_source" ; then
11783
11784 for cf_add_cflags in $cf_xopen_source
11785 do
11786         case "x$cf_add_cflags" in
11787         (x-[DU]*)
11788
11789 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11790 while true
11791 do
11792         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'`
11793         test "$CFLAGS" != "$cf_old_cflag" || break
11794         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11795
11796 echo "${as_me:-configure}:11796: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11797
11798         CFLAGS="$cf_old_cflag"
11799 done
11800
11801 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11802 while true
11803 do
11804         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'`
11805         test "$CPPFLAGS" != "$cf_old_cflag" || break
11806         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11807
11808 echo "${as_me:-configure}:11808: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11809
11810         CPPFLAGS="$cf_old_cflag"
11811 done
11812
11813                 ;;
11814         esac
11815
11816 cf_fix_cppflags=no
11817 cf_new_cflags=
11818 cf_new_cppflags=
11819 cf_new_extra_cppflags=
11820
11821 for cf_add_cflags in $cf_add_cflags
11822 do
11823 case "$cf_fix_cppflags" in
11824 (no)
11825         case "$cf_add_cflags" in
11826         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11827                 case "$cf_add_cflags" in
11828                 (-D*)
11829                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11830
11831                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11832                                 && test -z "${cf_tst_cflags}" \
11833                                 && cf_fix_cppflags=yes
11834
11835                         if test "$cf_fix_cppflags" = yes ; then
11836
11837         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11838         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11839
11840                                 continue
11841                         elif test "${cf_tst_cflags}" = "\"'" ; then
11842
11843         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11844         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11845
11846                                 continue
11847                         fi
11848                         ;;
11849                 esac
11850                 case "$CPPFLAGS" in
11851                 (*$cf_add_cflags)
11852                         ;;
11853                 (*)
11854                         case "$cf_add_cflags" in
11855                         (-D*)
11856                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11857
11858 CPPFLAGS=`echo "$CPPFLAGS" | \
11859         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11860                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11861
11862                                 ;;
11863                         esac
11864
11865         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11866         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11867
11868                         ;;
11869                 esac
11870                 ;;
11871         (*)
11872
11873         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11874         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11875
11876                 ;;
11877         esac
11878         ;;
11879 (yes)
11880
11881         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11882         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11883
11884         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11885
11886         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11887                 && test -z "${cf_tst_cflags}" \
11888                 && cf_fix_cppflags=no
11889         ;;
11890 esac
11891 done
11892
11893 if test -n "$cf_new_cflags" ; then
11894         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11895
11896 echo "${as_me:-configure}:11896: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11897
11898         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11899         CFLAGS="${CFLAGS}$cf_new_cflags"
11900
11901 fi
11902
11903 if test -n "$cf_new_cppflags" ; then
11904         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11905
11906 echo "${as_me:-configure}:11906: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11907
11908         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11909         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11910
11911 fi
11912
11913 if test -n "$cf_new_extra_cppflags" ; then
11914         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11915
11916 echo "${as_me:-configure}:11916: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11917
11918         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11919         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11920
11921 fi
11922
11923 done
11924
11925 fi
11926
11927 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11928         echo "$as_me:11928: checking if _XOPEN_SOURCE really is set" >&5
11929 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11930         cat >"conftest.$ac_ext" <<_ACEOF
11931 #line 11931 "configure"
11932 #include "confdefs.h"
11933 #include <stdlib.h>
11934 int
11935 main (void)
11936 {
11937
11938 #ifndef _XOPEN_SOURCE
11939 #error _XOPEN_SOURCE is not defined
11940 #endif
11941   ;
11942   return 0;
11943 }
11944 _ACEOF
11945 rm -f "conftest.$ac_objext"
11946 if { (eval echo "$as_me:11946: \"$ac_compile\"") >&5
11947   (eval $ac_compile) 2>&5
11948   ac_status=$?
11949   echo "$as_me:11949: \$? = $ac_status" >&5
11950   (exit "$ac_status"); } &&
11951          { ac_try='test -s "conftest.$ac_objext"'
11952   { (eval echo "$as_me:11952: \"$ac_try\"") >&5
11953   (eval $ac_try) 2>&5
11954   ac_status=$?
11955   echo "$as_me:11955: \$? = $ac_status" >&5
11956   (exit "$ac_status"); }; }; then
11957   cf_XOPEN_SOURCE_set=yes
11958 else
11959   echo "$as_me: failed program was:" >&5
11960 cat "conftest.$ac_ext" >&5
11961 cf_XOPEN_SOURCE_set=no
11962 fi
11963 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11964         echo "$as_me:11964: result: $cf_XOPEN_SOURCE_set" >&5
11965 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11966         if test "$cf_XOPEN_SOURCE_set" = yes
11967         then
11968                 cat >"conftest.$ac_ext" <<_ACEOF
11969 #line 11969 "configure"
11970 #include "confdefs.h"
11971 #include <stdlib.h>
11972 int
11973 main (void)
11974 {
11975
11976 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11977 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11978 #endif
11979   ;
11980   return 0;
11981 }
11982 _ACEOF
11983 rm -f "conftest.$ac_objext"
11984 if { (eval echo "$as_me:11984: \"$ac_compile\"") >&5
11985   (eval $ac_compile) 2>&5
11986   ac_status=$?
11987   echo "$as_me:11987: \$? = $ac_status" >&5
11988   (exit "$ac_status"); } &&
11989          { ac_try='test -s "conftest.$ac_objext"'
11990   { (eval echo "$as_me:11990: \"$ac_try\"") >&5
11991   (eval $ac_try) 2>&5
11992   ac_status=$?
11993   echo "$as_me:11993: \$? = $ac_status" >&5
11994   (exit "$ac_status"); }; }; then
11995   cf_XOPEN_SOURCE_set_ok=yes
11996 else
11997   echo "$as_me: failed program was:" >&5
11998 cat "conftest.$ac_ext" >&5
11999 cf_XOPEN_SOURCE_set_ok=no
12000 fi
12001 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12002                 if test "$cf_XOPEN_SOURCE_set_ok" = no
12003                 then
12004                         { echo "$as_me:12004: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12005 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12006                 fi
12007         else
12008
12009 echo "$as_me:12009: checking if we should define _XOPEN_SOURCE" >&5
12010 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12011 if test "${cf_cv_xopen_source+set}" = set; then
12012   echo $ECHO_N "(cached) $ECHO_C" >&6
12013 else
12014
12015         cat >"conftest.$ac_ext" <<_ACEOF
12016 #line 12016 "configure"
12017 #include "confdefs.h"
12018
12019 $ac_includes_default
12020
12021 int
12022 main (void)
12023 {
12024
12025 #ifndef _XOPEN_SOURCE
12026 #error _XOPEN_SOURCE is not defined
12027 #endif
12028
12029   ;
12030   return 0;
12031 }
12032 _ACEOF
12033 rm -f "conftest.$ac_objext"
12034 if { (eval echo "$as_me:12034: \"$ac_compile\"") >&5
12035   (eval $ac_compile) 2>&5
12036   ac_status=$?
12037   echo "$as_me:12037: \$? = $ac_status" >&5
12038   (exit "$ac_status"); } &&
12039          { ac_try='test -s "conftest.$ac_objext"'
12040   { (eval echo "$as_me:12040: \"$ac_try\"") >&5
12041   (eval $ac_try) 2>&5
12042   ac_status=$?
12043   echo "$as_me:12043: \$? = $ac_status" >&5
12044   (exit "$ac_status"); }; }; then
12045   cf_cv_xopen_source=no
12046 else
12047   echo "$as_me: failed program was:" >&5
12048 cat "conftest.$ac_ext" >&5
12049 cf_save="$CPPFLAGS"
12050
12051         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12052         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12053
12054          cat >"conftest.$ac_ext" <<_ACEOF
12055 #line 12055 "configure"
12056 #include "confdefs.h"
12057
12058 $ac_includes_default
12059
12060 int
12061 main (void)
12062 {
12063
12064 #ifndef _XOPEN_SOURCE
12065 #error _XOPEN_SOURCE is not defined
12066 #endif
12067
12068   ;
12069   return 0;
12070 }
12071 _ACEOF
12072 rm -f "conftest.$ac_objext"
12073 if { (eval echo "$as_me:12073: \"$ac_compile\"") >&5
12074   (eval $ac_compile) 2>&5
12075   ac_status=$?
12076   echo "$as_me:12076: \$? = $ac_status" >&5
12077   (exit "$ac_status"); } &&
12078          { ac_try='test -s "conftest.$ac_objext"'
12079   { (eval echo "$as_me:12079: \"$ac_try\"") >&5
12080   (eval $ac_try) 2>&5
12081   ac_status=$?
12082   echo "$as_me:12082: \$? = $ac_status" >&5
12083   (exit "$ac_status"); }; }; then
12084   cf_cv_xopen_source=no
12085 else
12086   echo "$as_me: failed program was:" >&5
12087 cat "conftest.$ac_ext" >&5
12088 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12089 fi
12090 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12091                 CPPFLAGS="$cf_save"
12092
12093 fi
12094 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12095
12096 fi
12097 echo "$as_me:12097: result: $cf_cv_xopen_source" >&5
12098 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12099
12100 if test "$cf_cv_xopen_source" != no ; then
12101
12102 CFLAGS=`echo "$CFLAGS" | \
12103         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12104                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12105
12106 CPPFLAGS=`echo "$CPPFLAGS" | \
12107         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12108                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12109
12110         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12111
12112 for cf_add_cflags in $cf_temp_xopen_source
12113 do
12114         case "x$cf_add_cflags" in
12115         (x-[DU]*)
12116
12117 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12118 while true
12119 do
12120         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'`
12121         test "$CFLAGS" != "$cf_old_cflag" || break
12122
12123         CFLAGS="$cf_old_cflag"
12124 done
12125
12126 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12127 while true
12128 do
12129         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'`
12130         test "$CPPFLAGS" != "$cf_old_cflag" || break
12131
12132         CPPFLAGS="$cf_old_cflag"
12133 done
12134
12135                 ;;
12136         esac
12137
12138 cf_fix_cppflags=no
12139 cf_new_cflags=
12140 cf_new_cppflags=
12141 cf_new_extra_cppflags=
12142
12143 for cf_add_cflags in $cf_add_cflags
12144 do
12145 case "$cf_fix_cppflags" in
12146 (no)
12147         case "$cf_add_cflags" in
12148         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12149                 case "$cf_add_cflags" in
12150                 (-D*)
12151                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12152
12153                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12154                                 && test -z "${cf_tst_cflags}" \
12155                                 && cf_fix_cppflags=yes
12156
12157                         if test "$cf_fix_cppflags" = yes ; then
12158
12159         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12160         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12161
12162                                 continue
12163                         elif test "${cf_tst_cflags}" = "\"'" ; then
12164
12165         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12166         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12167
12168                                 continue
12169                         fi
12170                         ;;
12171                 esac
12172                 case "$CPPFLAGS" in
12173                 (*$cf_add_cflags)
12174                         ;;
12175                 (*)
12176                         case "$cf_add_cflags" in
12177                         (-D*)
12178                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12179
12180 CPPFLAGS=`echo "$CPPFLAGS" | \
12181         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12182                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12183
12184                                 ;;
12185                         esac
12186
12187         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12188         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12189
12190                         ;;
12191                 esac
12192                 ;;
12193         (*)
12194
12195         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12196         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12197
12198                 ;;
12199         esac
12200         ;;
12201 (yes)
12202
12203         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12204         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12205
12206         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12207
12208         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12209                 && test -z "${cf_tst_cflags}" \
12210                 && cf_fix_cppflags=no
12211         ;;
12212 esac
12213 done
12214
12215 if test -n "$cf_new_cflags" ; then
12216
12217         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12218         CFLAGS="${CFLAGS}$cf_new_cflags"
12219
12220 fi
12221
12222 if test -n "$cf_new_cppflags" ; then
12223
12224         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12225         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12226
12227 fi
12228
12229 if test -n "$cf_new_extra_cppflags" ; then
12230
12231         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12232         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12233
12234 fi
12235
12236 done
12237
12238 fi
12239
12240         fi
12241 fi
12242 fi # cf_cv_posix_visible
12243
12244 CPPFLAGS_after_XOPEN="$CPPFLAGS"
12245
12246 # Work around breakage on OS X
12247
12248 echo "$as_me:12248: checking if SIGWINCH is defined" >&5
12249 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12250 if test "${cf_cv_define_sigwinch+set}" = set; then
12251   echo $ECHO_N "(cached) $ECHO_C" >&6
12252 else
12253
12254         cat >"conftest.$ac_ext" <<_ACEOF
12255 #line 12255 "configure"
12256 #include "confdefs.h"
12257
12258 #include <sys/types.h>
12259 #include <sys/signal.h>
12260
12261 int
12262 main (void)
12263 {
12264 int x = SIGWINCH; (void)x
12265   ;
12266   return 0;
12267 }
12268 _ACEOF
12269 rm -f "conftest.$ac_objext"
12270 if { (eval echo "$as_me:12270: \"$ac_compile\"") >&5
12271   (eval $ac_compile) 2>&5
12272   ac_status=$?
12273   echo "$as_me:12273: \$? = $ac_status" >&5
12274   (exit "$ac_status"); } &&
12275          { ac_try='test -s "conftest.$ac_objext"'
12276   { (eval echo "$as_me:12276: \"$ac_try\"") >&5
12277   (eval $ac_try) 2>&5
12278   ac_status=$?
12279   echo "$as_me:12279: \$? = $ac_status" >&5
12280   (exit "$ac_status"); }; }; then
12281   cf_cv_define_sigwinch=yes
12282 else
12283   echo "$as_me: failed program was:" >&5
12284 cat "conftest.$ac_ext" >&5
12285 cat >"conftest.$ac_ext" <<_ACEOF
12286 #line 12286 "configure"
12287 #include "confdefs.h"
12288
12289 #undef _XOPEN_SOURCE
12290 #undef _POSIX_SOURCE
12291 #undef _POSIX_C_SOURCE
12292 #include <sys/types.h>
12293 #include <sys/signal.h>
12294
12295 int
12296 main (void)
12297 {
12298 int x = SIGWINCH; (void)x
12299   ;
12300   return 0;
12301 }
12302 _ACEOF
12303 rm -f "conftest.$ac_objext"
12304 if { (eval echo "$as_me:12304: \"$ac_compile\"") >&5
12305   (eval $ac_compile) 2>&5
12306   ac_status=$?
12307   echo "$as_me:12307: \$? = $ac_status" >&5
12308   (exit "$ac_status"); } &&
12309          { ac_try='test -s "conftest.$ac_objext"'
12310   { (eval echo "$as_me:12310: \"$ac_try\"") >&5
12311   (eval $ac_try) 2>&5
12312   ac_status=$?
12313   echo "$as_me:12313: \$? = $ac_status" >&5
12314   (exit "$ac_status"); }; }; then
12315   cf_cv_define_sigwinch=maybe
12316 else
12317   echo "$as_me: failed program was:" >&5
12318 cat "conftest.$ac_ext" >&5
12319 cf_cv_define_sigwinch=no
12320 fi
12321 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12322
12323 fi
12324 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12325
12326 fi
12327 echo "$as_me:12327: result: $cf_cv_define_sigwinch" >&5
12328 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12329
12330 if test "$cf_cv_define_sigwinch" = maybe ; then
12331 echo "$as_me:12331: checking for actual SIGWINCH definition" >&5
12332 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12333 if test "${cf_cv_fixup_sigwinch+set}" = set; then
12334   echo $ECHO_N "(cached) $ECHO_C" >&6
12335 else
12336
12337 cf_cv_fixup_sigwinch=unknown
12338 cf_sigwinch=32
12339 while test "$cf_sigwinch" != 1
12340 do
12341         cat >"conftest.$ac_ext" <<_ACEOF
12342 #line 12342 "configure"
12343 #include "confdefs.h"
12344
12345 #undef _XOPEN_SOURCE
12346 #undef _POSIX_SOURCE
12347 #undef _POSIX_C_SOURCE
12348 #include <sys/types.h>
12349 #include <sys/signal.h>
12350
12351 int
12352 main (void)
12353 {
12354
12355 #if SIGWINCH != $cf_sigwinch
12356 #error SIGWINCH is not $cf_sigwinch
12357 #endif
12358 int x = SIGWINCH; (void)x
12359   ;
12360   return 0;
12361 }
12362 _ACEOF
12363 rm -f "conftest.$ac_objext"
12364 if { (eval echo "$as_me:12364: \"$ac_compile\"") >&5
12365   (eval $ac_compile) 2>&5
12366   ac_status=$?
12367   echo "$as_me:12367: \$? = $ac_status" >&5
12368   (exit "$ac_status"); } &&
12369          { ac_try='test -s "conftest.$ac_objext"'
12370   { (eval echo "$as_me:12370: \"$ac_try\"") >&5
12371   (eval $ac_try) 2>&5
12372   ac_status=$?
12373   echo "$as_me:12373: \$? = $ac_status" >&5
12374   (exit "$ac_status"); }; }; then
12375   cf_cv_fixup_sigwinch=$cf_sigwinch
12376          break
12377 else
12378   echo "$as_me: failed program was:" >&5
12379 cat "conftest.$ac_ext" >&5
12380 fi
12381 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12382
12383 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
12384 done
12385
12386 fi
12387 echo "$as_me:12387: result: $cf_cv_fixup_sigwinch" >&5
12388 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12389
12390         if test "$cf_cv_fixup_sigwinch" != unknown ; then
12391                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12392         fi
12393 fi
12394
12395 # Checks for CODESET support.
12396
12397 echo "$as_me:12397: checking for nl_langinfo and CODESET" >&5
12398 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
12399 if test "${am_cv_langinfo_codeset+set}" = set; then
12400   echo $ECHO_N "(cached) $ECHO_C" >&6
12401 else
12402   cat >"conftest.$ac_ext" <<_ACEOF
12403 #line 12403 "configure"
12404 #include "confdefs.h"
12405
12406 $ac_includes_default
12407 #include <langinfo.h>
12408 int
12409 main (void)
12410 {
12411 char* cs = nl_langinfo(CODESET); (void)cs
12412   ;
12413   return 0;
12414 }
12415 _ACEOF
12416 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12417 if { (eval echo "$as_me:12417: \"$ac_link\"") >&5
12418   (eval $ac_link) 2>&5
12419   ac_status=$?
12420   echo "$as_me:12420: \$? = $ac_status" >&5
12421   (exit "$ac_status"); } &&
12422          { ac_try='test -s "conftest$ac_exeext"'
12423   { (eval echo "$as_me:12423: \"$ac_try\"") >&5
12424   (eval $ac_try) 2>&5
12425   ac_status=$?
12426   echo "$as_me:12426: \$? = $ac_status" >&5
12427   (exit "$ac_status"); }; }; then
12428   am_cv_langinfo_codeset=yes
12429 else
12430   echo "$as_me: failed program was:" >&5
12431 cat "conftest.$ac_ext" >&5
12432 am_cv_langinfo_codeset=no
12433 fi
12434 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12435
12436 fi
12437 echo "$as_me:12437: result: $am_cv_langinfo_codeset" >&5
12438 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12439         if test "$am_cv_langinfo_codeset" = yes; then
12440
12441 cat >>confdefs.h <<\EOF
12442 #define HAVE_LANGINFO_CODESET 1
12443 EOF
12444
12445         fi
12446
12447 # use these variables to work around a defect in gcc's fixincludes.
12448 NCURSES_OK_WCHAR_T=
12449 NCURSES_OK_WINT_T=
12450
12451 echo "$as_me:12451: checking if you want wide-character code" >&5
12452 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12453
12454 # Check whether --enable-widec or --disable-widec was given.
12455 if test "${enable_widec+set}" = set; then
12456   enableval="$enable_widec"
12457   with_widec=$enableval
12458 else
12459   with_widec=no
12460 fi;
12461 echo "$as_me:12461: result: $with_widec" >&5
12462 echo "${ECHO_T}$with_widec" >&6
12463
12464 NCURSES_WCWIDTH_GRAPHICS=1
12465
12466 if test "x$with_widec" = xyes ; then
12467         if test "x$disable_lib_suffixes" = xno ; then
12468                 LIB_SUFFIX="w${LIB_SUFFIX}"
12469         fi
12470
12471 cat >>confdefs.h <<\EOF
12472 #define USE_WIDEC_SUPPORT 1
12473 EOF
12474
12475 cat >>confdefs.h <<\EOF
12476 #define NCURSES_WIDECHAR 1
12477 EOF
12478
12479         case "$CPPFLAGS" in
12480         (*_XOPEN_SOURCE=*)
12481                 ;;
12482         (*)
12483                 { echo "$as_me:12483: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12484 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12485                 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12486                 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12487                 ;;
12488         esac
12489
12490 for ac_header in \
12491 wchar.h \
12492 wctype.h \
12493
12494 do
12495 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12496 echo "$as_me:12496: checking for $ac_header" >&5
12497 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12498 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12499   echo $ECHO_N "(cached) $ECHO_C" >&6
12500 else
12501   cat >"conftest.$ac_ext" <<_ACEOF
12502 #line 12502 "configure"
12503 #include "confdefs.h"
12504 #include <$ac_header>
12505 _ACEOF
12506 if { (eval echo "$as_me:12506: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12507   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12508   ac_status=$?
12509   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12510   rm -f conftest.er1
12511   cat conftest.err >&5
12512   echo "$as_me:12512: \$? = $ac_status" >&5
12513   (exit "$ac_status"); } >/dev/null; then
12514   if test -s conftest.err; then
12515     ac_cpp_err=$ac_c_preproc_warn_flag
12516   else
12517     ac_cpp_err=
12518   fi
12519 else
12520   ac_cpp_err=yes
12521 fi
12522 if test -z "$ac_cpp_err"; then
12523   eval "$as_ac_Header=yes"
12524 else
12525   echo "$as_me: failed program was:" >&5
12526   cat "conftest.$ac_ext" >&5
12527   eval "$as_ac_Header=no"
12528 fi
12529 rm -f conftest.err "conftest.$ac_ext"
12530 fi
12531 echo "$as_me:12531: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12532 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12533 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12534   cat >>confdefs.h <<EOF
12535 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12536 EOF
12537
12538 fi
12539 done
12540
12541 echo "$as_me:12541: checking if wchar.h can be used as is" >&5
12542 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12543 if test "${cf_cv_wchar_h_okay+set}" = set; then
12544   echo $ECHO_N "(cached) $ECHO_C" >&6
12545 else
12546
12547 cat >"conftest.$ac_ext" <<_ACEOF
12548 #line 12548 "configure"
12549 #include "confdefs.h"
12550
12551 $ac_includes_default
12552 #ifdef HAVE_WCHAR_H
12553 #include <wchar.h>
12554 #endif
12555 #ifdef HAVE_WCTYPE_H
12556 #include <wctype.h>
12557 #endif
12558
12559 int
12560 main (void)
12561 {
12562
12563         wint_t foo = 0;
12564         int bar = iswpunct(foo)
12565   ;
12566   return 0;
12567 }
12568 _ACEOF
12569 rm -f "conftest.$ac_objext"
12570 if { (eval echo "$as_me:12570: \"$ac_compile\"") >&5
12571   (eval $ac_compile) 2>&5
12572   ac_status=$?
12573   echo "$as_me:12573: \$? = $ac_status" >&5
12574   (exit "$ac_status"); } &&
12575          { ac_try='test -s "conftest.$ac_objext"'
12576   { (eval echo "$as_me:12576: \"$ac_try\"") >&5
12577   (eval $ac_try) 2>&5
12578   ac_status=$?
12579   echo "$as_me:12579: \$? = $ac_status" >&5
12580   (exit "$ac_status"); }; }; then
12581   cf_cv_wchar_h_okay=yes
12582 else
12583   echo "$as_me: failed program was:" >&5
12584 cat "conftest.$ac_ext" >&5
12585 cf_cv_wchar_h_okay=no
12586 fi
12587 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12588 fi
12589 echo "$as_me:12589: result: $cf_cv_wchar_h_okay" >&5
12590 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12591
12592 if test "$cf_cv_wchar_h_okay" = no
12593 then
12594
12595 echo "$as_me:12595: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12596 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12597 cat >"conftest.$ac_ext" <<_ACEOF
12598 #line 12598 "configure"
12599 #include "confdefs.h"
12600 #include <sys/types.h>
12601
12602 int
12603 main (void)
12604 {
12605
12606 #ifndef _XOPEN_SOURCE_EXTENDED
12607 #error _XOPEN_SOURCE_EXTENDED is not defined
12608 #endif
12609   ;
12610   return 0;
12611 }
12612 _ACEOF
12613 rm -f "conftest.$ac_objext"
12614 if { (eval echo "$as_me:12614: \"$ac_compile\"") >&5
12615   (eval $ac_compile) 2>&5
12616   ac_status=$?
12617   echo "$as_me:12617: \$? = $ac_status" >&5
12618   (exit "$ac_status"); } &&
12619          { ac_try='test -s "conftest.$ac_objext"'
12620   { (eval echo "$as_me:12620: \"$ac_try\"") >&5
12621   (eval $ac_try) 2>&5
12622   ac_status=$?
12623   echo "$as_me:12623: \$? = $ac_status" >&5
12624   (exit "$ac_status"); }; }; then
12625   cf_result=no
12626 else
12627   echo "$as_me: failed program was:" >&5
12628 cat "conftest.$ac_ext" >&5
12629 cf_result=yes
12630 fi
12631 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12632 echo "$as_me:12632: result: $cf_result" >&5
12633 echo "${ECHO_T}$cf_result" >&6
12634
12635 if test "$cf_result" = yes ; then
12636         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12637 elif test "x" != "x" ; then
12638         echo "$as_me:12638: checking checking for compatible value versus " >&5
12639 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12640         cat >"conftest.$ac_ext" <<_ACEOF
12641 #line 12641 "configure"
12642 #include "confdefs.h"
12643 #include <sys/types.h>
12644
12645 int
12646 main (void)
12647 {
12648
12649 #if _XOPEN_SOURCE_EXTENDED- < 0
12650 #error _XOPEN_SOURCE_EXTENDED- is negative
12651 #endif
12652   ;
12653   return 0;
12654 }
12655 _ACEOF
12656 rm -f "conftest.$ac_objext"
12657 if { (eval echo "$as_me:12657: \"$ac_compile\"") >&5
12658   (eval $ac_compile) 2>&5
12659   ac_status=$?
12660   echo "$as_me:12660: \$? = $ac_status" >&5
12661   (exit "$ac_status"); } &&
12662          { ac_try='test -s "conftest.$ac_objext"'
12663   { (eval echo "$as_me:12663: \"$ac_try\"") >&5
12664   (eval $ac_try) 2>&5
12665   ac_status=$?
12666   echo "$as_me:12666: \$? = $ac_status" >&5
12667   (exit "$ac_status"); }; }; then
12668   cf_result=yes
12669 else
12670   echo "$as_me: failed program was:" >&5
12671 cat "conftest.$ac_ext" >&5
12672 cf_result=no
12673 fi
12674 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12675         echo "$as_me:12675: result: $cf_result" >&5
12676 echo "${ECHO_T}$cf_result" >&6
12677         if test "$cf_result" = no ; then
12678                 # perhaps we can override it - try...
12679                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12680         fi
12681 fi
12682
12683 fi
12684
12685 echo "$as_me:12685: checking if wcwidth agrees graphics are single-width" >&5
12686 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12687 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12688   echo $ECHO_N "(cached) $ECHO_C" >&6
12689 else
12690
12691 cat >conftest.in <<CF_EOF
12692 -       VT100 symbols
12693 0x250c  upper left corner
12694 0x2514  lower left corner
12695 0x2510  upper right corner
12696 0x2518  lower right corner
12697 0x251c  tee pointing left
12698 0x2524  tee pointing right
12699 0x2534  tee pointing up
12700 0x252c  tee pointing down
12701 0x2500  horizontal line
12702 0x2502  vertical line
12703 0x253c  large plus or crossover
12704 0x23ba  scan line 1
12705 0x23bd  scan line 9
12706 0x25c6  diamond
12707 0x2592  checker board (stipple)
12708 0x00b0  degree symbol
12709 0x00b1  plus/minus
12710 0x00b7  bullet
12711 -       Teletype 5410v1 symbols
12712 0x2190  arrow pointing left
12713 0x2192  arrow pointing right
12714 0x2193  arrow pointing down
12715 0x2191  arrow pointing up
12716 0x2592  board of squares
12717 0x2603  lantern symbol
12718 0x25ae  solid square block
12719 -       these defaults were invented for ncurses
12720 0x23bb  scan line 3
12721 0x23bc  scan line 7
12722 0x2264  less-than-or-equal-to
12723 0x2265  greater-than-or-equal-to
12724 0x03c0  greek pi
12725 0x2260  not-equal
12726 0x00a3  pound-sterling symbol
12727 -       thick-line-drawing
12728 0x250f  upper left corner
12729 0x2517  lower left corner
12730 0x2513  upper right corner
12731 0x251b  lower right corner
12732 0x2523  tee pointing left
12733 0x252b  tee pointing right
12734 0x253b  tee pointing up
12735 0x2533  tee pointing down
12736 0x2501  horizontal line
12737 0x2503  vertical line
12738 0x254b  large plus or crossover
12739 -       double-line-drawing
12740 0x2554  upper left corner
12741 0x255a  lower left corner
12742 0x2557  upper right corner
12743 0x255d  lower right corner
12744 0x2563  tee pointing left
12745 0x2560  tee pointing right
12746 0x2569  tee pointing up
12747 0x2566  tee pointing down
12748 0x2550  horizontal line
12749 0x2551  vertical line
12750 0x256c  large plus or crossover
12751 CF_EOF
12752 if test "$cross_compiling" = yes; then
12753   cf_cv_wcwidth_graphics=unknown
12754 else
12755   cat >"conftest.$ac_ext" <<_ACEOF
12756 #line 12756 "configure"
12757 #include "confdefs.h"
12758
12759 $ac_includes_default
12760
12761 #include <locale.h>
12762 #include <wchar.h>
12763
12764 #define MY_LEN 80
12765
12766 int
12767 main(void)
12768 {
12769         FILE *fp;
12770         int value;
12771         char buffer[MY_LEN + 1];
12772         char notes[MY_LEN + 1];
12773         int totals = 0;
12774         int passed = 0;
12775
12776         if (setlocale(LC_ALL, "en_US.UTF8") ||
12777                 setlocale(LC_ALL, "en_US.UTF-8") ||
12778                 setlocale(LC_ALL, "en_US.utf8") ||
12779                 setlocale(LC_ALL, "en_US.utf-8")) {
12780                 if ((fp = fopen("conftest.in", "r")) != 0) {
12781                         while (fgets(buffer, MY_LEN, fp) != 0) {
12782                                 if (*buffer == '-') {
12783                                         fprintf(stderr, "\\t%s", buffer);
12784                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12785                                         ++totals;
12786                                         if (wcwidth(value) == 1)
12787                                                 ++passed;
12788                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12789                                 } else {
12790                                         fprintf(stderr, "?\\t%s", buffer);
12791                                 }
12792                         }
12793                 }
12794         }
12795         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12796         return (totals == passed) ? 0 : 1;
12797 }
12798
12799 _ACEOF
12800 rm -f "conftest$ac_exeext"
12801 if { (eval echo "$as_me:12801: \"$ac_link\"") >&5
12802   (eval $ac_link) 2>&5
12803   ac_status=$?
12804   echo "$as_me:12804: \$? = $ac_status" >&5
12805   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12806   { (eval echo "$as_me:12806: \"$ac_try\"") >&5
12807   (eval $ac_try) 2>&5
12808   ac_status=$?
12809   echo "$as_me:12809: \$? = $ac_status" >&5
12810   (exit "$ac_status"); }; }; then
12811   cf_cv_wcwidth_graphics=yes
12812 else
12813   echo "$as_me: program exited with status $ac_status" >&5
12814 echo "$as_me: failed program was:" >&5
12815 cat "conftest.$ac_ext" >&5
12816 cf_cv_wcwidth_graphics=no
12817 fi
12818 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12819 fi
12820
12821 fi
12822 echo "$as_me:12822: result: $cf_cv_wcwidth_graphics" >&5
12823 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12824
12825         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12826
12827         # with_overwrite=no
12828         NCURSES_CH_T=cchar_t
12829
12830 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12831 do
12832 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12833 echo "$as_me:12833: checking for $ac_func" >&5
12834 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12835 if eval "test \"\${$as_ac_var+set}\" = set"; then
12836   echo $ECHO_N "(cached) $ECHO_C" >&6
12837 else
12838   cat >"conftest.$ac_ext" <<_ACEOF
12839 #line 12839 "configure"
12840 #include "confdefs.h"
12841 #define $ac_func autoconf_temporary
12842 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12843 #undef $ac_func
12844
12845 #ifdef __cplusplus
12846 extern "C"
12847 #endif
12848
12849 /* We use char because int might match the return type of a gcc2
12850    builtin and then its argument prototype would still apply.  */
12851 char $ac_func (void);
12852
12853 int
12854 main (void)
12855 {
12856
12857 /* The GNU C library defines stubs for functions which it implements
12858     to always fail with ENOSYS.  Some functions are actually named
12859     something starting with __ and the normal name is an alias.  */
12860 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12861 #error found stub for $ac_func
12862 #endif
12863
12864         return $ac_func ();
12865   ;
12866   return 0;
12867 }
12868 _ACEOF
12869 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12870 if { (eval echo "$as_me:12870: \"$ac_link\"") >&5
12871   (eval $ac_link) 2>&5
12872   ac_status=$?
12873   echo "$as_me:12873: \$? = $ac_status" >&5
12874   (exit "$ac_status"); } &&
12875          { ac_try='test -s "conftest$ac_exeext"'
12876   { (eval echo "$as_me:12876: \"$ac_try\"") >&5
12877   (eval $ac_try) 2>&5
12878   ac_status=$?
12879   echo "$as_me:12879: \$? = $ac_status" >&5
12880   (exit "$ac_status"); }; }; then
12881   eval "$as_ac_var=yes"
12882 else
12883   echo "$as_me: failed program was:" >&5
12884 cat "conftest.$ac_ext" >&5
12885 eval "$as_ac_var=no"
12886 fi
12887 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12888 fi
12889 echo "$as_me:12889: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12890 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12891 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12892   cat >>confdefs.h <<EOF
12893 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12894 EOF
12895
12896 fi
12897 done
12898
12899         if test "x$ac_cv_func_putwc" != xyes ; then
12900
12901 for ac_header in wchar.h
12902 do
12903 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12904 echo "$as_me:12904: checking for $ac_header" >&5
12905 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12906 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12907   echo $ECHO_N "(cached) $ECHO_C" >&6
12908 else
12909   cat >"conftest.$ac_ext" <<_ACEOF
12910 #line 12910 "configure"
12911 #include "confdefs.h"
12912 #include <$ac_header>
12913 _ACEOF
12914 if { (eval echo "$as_me:12914: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12915   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12916   ac_status=$?
12917   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12918   rm -f conftest.er1
12919   cat conftest.err >&5
12920   echo "$as_me:12920: \$? = $ac_status" >&5
12921   (exit "$ac_status"); } >/dev/null; then
12922   if test -s conftest.err; then
12923     ac_cpp_err=$ac_c_preproc_warn_flag
12924   else
12925     ac_cpp_err=
12926   fi
12927 else
12928   ac_cpp_err=yes
12929 fi
12930 if test -z "$ac_cpp_err"; then
12931   eval "$as_ac_Header=yes"
12932 else
12933   echo "$as_me: failed program was:" >&5
12934   cat "conftest.$ac_ext" >&5
12935   eval "$as_ac_Header=no"
12936 fi
12937 rm -f conftest.err "conftest.$ac_ext"
12938 fi
12939 echo "$as_me:12939: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12940 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12941 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12942   cat >>confdefs.h <<EOF
12943 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12944 EOF
12945
12946 fi
12947 done
12948
12949 echo "$as_me:12949: checking for multibyte character support" >&5
12950 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12951 if test "${cf_cv_utf8_lib+set}" = set; then
12952   echo $ECHO_N "(cached) $ECHO_C" >&6
12953 else
12954
12955         cf_save_LIBS="$LIBS"
12956         cat >"conftest.$ac_ext" <<_ACEOF
12957 #line 12957 "configure"
12958 #include "confdefs.h"
12959
12960 $ac_includes_default
12961 #ifdef HAVE_WCHAR_H
12962 #include <wchar.h>
12963 #endif
12964
12965 int
12966 main (void)
12967 {
12968 putwc(0,0);
12969   ;
12970   return 0;
12971 }
12972 _ACEOF
12973 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12974 if { (eval echo "$as_me:12974: \"$ac_link\"") >&5
12975   (eval $ac_link) 2>&5
12976   ac_status=$?
12977   echo "$as_me:12977: \$? = $ac_status" >&5
12978   (exit "$ac_status"); } &&
12979          { ac_try='test -s "conftest$ac_exeext"'
12980   { (eval echo "$as_me:12980: \"$ac_try\"") >&5
12981   (eval $ac_try) 2>&5
12982   ac_status=$?
12983   echo "$as_me:12983: \$? = $ac_status" >&5
12984   (exit "$ac_status"); }; }; then
12985   cf_cv_utf8_lib=yes
12986 else
12987   echo "$as_me: failed program was:" >&5
12988 cat "conftest.$ac_ext" >&5
12989
12990 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12991 # will be set on completion of the AC_TRY_LINK below.
12992 cf_cv_header_path_utf8=
12993 cf_cv_library_path_utf8=
12994
12995 echo "${as_me:-configure}:12995: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12996
12997 cf_save_LIBS="$LIBS"
12998
12999 cat >"conftest.$ac_ext" <<_ACEOF
13000 #line 13000 "configure"
13001 #include "confdefs.h"
13002
13003 #include <libutf8.h>
13004 int
13005 main (void)
13006 {
13007 putwc(0,0);
13008   ;
13009   return 0;
13010 }
13011 _ACEOF
13012 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13013 if { (eval echo "$as_me:13013: \"$ac_link\"") >&5
13014   (eval $ac_link) 2>&5
13015   ac_status=$?
13016   echo "$as_me:13016: \$? = $ac_status" >&5
13017   (exit "$ac_status"); } &&
13018          { ac_try='test -s "conftest$ac_exeext"'
13019   { (eval echo "$as_me:13019: \"$ac_try\"") >&5
13020   (eval $ac_try) 2>&5
13021   ac_status=$?
13022   echo "$as_me:13022: \$? = $ac_status" >&5
13023   (exit "$ac_status"); }; }; then
13024
13025         cf_cv_find_linkage_utf8=yes
13026         cf_cv_header_path_utf8=/usr/include
13027         cf_cv_library_path_utf8=/usr/lib
13028
13029 else
13030   echo "$as_me: failed program was:" >&5
13031 cat "conftest.$ac_ext" >&5
13032
13033 LIBS="-lutf8  $cf_save_LIBS"
13034
13035 cat >"conftest.$ac_ext" <<_ACEOF
13036 #line 13036 "configure"
13037 #include "confdefs.h"
13038
13039 #include <libutf8.h>
13040 int
13041 main (void)
13042 {
13043 putwc(0,0);
13044   ;
13045   return 0;
13046 }
13047 _ACEOF
13048 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13049 if { (eval echo "$as_me:13049: \"$ac_link\"") >&5
13050   (eval $ac_link) 2>&5
13051   ac_status=$?
13052   echo "$as_me:13052: \$? = $ac_status" >&5
13053   (exit "$ac_status"); } &&
13054          { ac_try='test -s "conftest$ac_exeext"'
13055   { (eval echo "$as_me:13055: \"$ac_try\"") >&5
13056   (eval $ac_try) 2>&5
13057   ac_status=$?
13058   echo "$as_me:13058: \$? = $ac_status" >&5
13059   (exit "$ac_status"); }; }; then
13060
13061         cf_cv_find_linkage_utf8=yes
13062         cf_cv_header_path_utf8=/usr/include
13063         cf_cv_library_path_utf8=/usr/lib
13064         cf_cv_library_file_utf8="-lutf8"
13065
13066 else
13067   echo "$as_me: failed program was:" >&5
13068 cat "conftest.$ac_ext" >&5
13069
13070         cf_cv_find_linkage_utf8=no
13071         LIBS="$cf_save_LIBS"
13072
13073         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
13074
13075 echo "${as_me:-configure}:13075: testing find linkage for utf8 library ..." 1>&5
13076
13077 echo "${as_me:-configure}:13077: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13078
13079         cf_save_CPPFLAGS="$CPPFLAGS"
13080         cf_test_CPPFLAGS="$CPPFLAGS"
13081
13082 cf_search=
13083
13084 # collect the current set of include-directories from compiler flags
13085 cf_header_path_list=""
13086 if test -n "${CFLAGS}${CPPFLAGS}" ; then
13087         for cf_header_path in $CPPFLAGS $CFLAGS
13088         do
13089                 case "$cf_header_path" in
13090                 (-I*)
13091                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13092
13093 test "x$cf_header_path" != "xNONE" && \
13094 test -d "$cf_header_path" && \
13095  {
13096         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
13097         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
13098         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
13099         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
13100         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
13101         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13102 }
13103
13104                         cf_header_path_list="$cf_header_path_list $cf_search"
13105                         ;;
13106                 esac
13107         done
13108 fi
13109
13110 # add the variations for the package we are looking for
13111
13112 cf_search=
13113
13114 test "x$prefix" != "xNONE" && \
13115 test -d "$prefix" && \
13116  {
13117         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
13118         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
13119         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
13120         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
13121         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
13122         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
13123 }
13124
13125 for cf_subdir_prefix in \
13126         /usr \
13127         /usr/local \
13128         /usr/pkg \
13129         /opt \
13130         /opt/local \
13131         $HOME
13132 do
13133
13134 test "x$cf_subdir_prefix" != "x$prefix" && \
13135 test -d "$cf_subdir_prefix" && \
13136 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13137         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
13138         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
13139         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13140         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13141         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13142         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13143 }
13144
13145 done
13146
13147 test "$includedir" != NONE && \
13148 test "$includedir" != "/usr/include" && \
13149 test -d "$includedir" && {
13150         test -d "$includedir" &&    cf_search="$cf_search $includedir"
13151         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
13152 }
13153
13154 test "$oldincludedir" != NONE && \
13155 test "$oldincludedir" != "/usr/include" && \
13156 test -d "$oldincludedir" && {
13157         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
13158         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
13159 }
13160
13161 cf_search="$cf_search $cf_header_path_list"
13162
13163         for cf_cv_header_path_utf8 in $cf_search
13164         do
13165                 if test -d "$cf_cv_header_path_utf8" ; then
13166                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
13167
13168 echo "${as_me:-configure}:13168: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13169
13170                         CPPFLAGS="$cf_save_CPPFLAGS"
13171
13172         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13173         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13174
13175                         cat >"conftest.$ac_ext" <<_ACEOF
13176 #line 13176 "configure"
13177 #include "confdefs.h"
13178
13179 #include <libutf8.h>
13180 int
13181 main (void)
13182 {
13183 putwc(0,0);
13184   ;
13185   return 0;
13186 }
13187 _ACEOF
13188 rm -f "conftest.$ac_objext"
13189 if { (eval echo "$as_me:13189: \"$ac_compile\"") >&5
13190   (eval $ac_compile) 2>&5
13191   ac_status=$?
13192   echo "$as_me:13192: \$? = $ac_status" >&5
13193   (exit "$ac_status"); } &&
13194          { ac_try='test -s "conftest.$ac_objext"'
13195   { (eval echo "$as_me:13195: \"$ac_try\"") >&5
13196   (eval $ac_try) 2>&5
13197   ac_status=$?
13198   echo "$as_me:13198: \$? = $ac_status" >&5
13199   (exit "$ac_status"); }; }; then
13200
13201                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13202
13203 echo "${as_me:-configure}:13203: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13204
13205                                 cf_cv_find_linkage_utf8=maybe
13206                                 cf_test_CPPFLAGS="$CPPFLAGS"
13207                                 break
13208 else
13209   echo "$as_me: failed program was:" >&5
13210 cat "conftest.$ac_ext" >&5
13211
13212                                 CPPFLAGS="$cf_save_CPPFLAGS"
13213
13214 fi
13215 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13216                 fi
13217         done
13218
13219         if test "$cf_cv_find_linkage_utf8" = maybe ; then
13220
13221 echo "${as_me:-configure}:13221: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13222
13223                 cf_save_LIBS="$LIBS"
13224                 cf_save_LDFLAGS="$LDFLAGS"
13225
13226                 if test "$cf_cv_find_linkage_utf8" != yes ; then
13227
13228 cf_search=
13229 cf_library_path_list=""
13230 if test -n "${LDFLAGS}${LIBS}" ; then
13231         for cf_library_path in $LDFLAGS $LIBS
13232         do
13233                 case "$cf_library_path" in
13234                 (-L*)
13235                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13236
13237 test "x$cf_library_path" != "xNONE" && \
13238 test -d "$cf_library_path" && \
13239  {
13240         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
13241         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
13242         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
13243         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13244         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
13245         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13246 }
13247
13248                         cf_library_path_list="$cf_library_path_list $cf_search"
13249                         ;;
13250                 esac
13251         done
13252 fi
13253
13254 cf_search=
13255
13256 test "x$prefix" != "xNONE" && \
13257 test -d "$prefix" && \
13258  {
13259         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
13260         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
13261         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
13262         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
13263         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
13264         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
13265 }
13266
13267 for cf_subdir_prefix in \
13268         /usr \
13269         /usr/local \
13270         /usr/pkg \
13271         /opt \
13272         /opt/local \
13273         $HOME
13274 do
13275
13276 test "x$cf_subdir_prefix" != "x$prefix" && \
13277 test -d "$cf_subdir_prefix" && \
13278 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13279         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
13280         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13281         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13282         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13283         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13284         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13285 }
13286
13287 done
13288
13289 cf_search="$cf_library_path_list $cf_search"
13290
13291                         for cf_cv_library_path_utf8 in $cf_search
13292                         do
13293                                 if test -d "$cf_cv_library_path_utf8" ; then
13294                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
13295
13296 echo "${as_me:-configure}:13296: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13297
13298                                         CPPFLAGS="$cf_test_CPPFLAGS"
13299                                         LIBS="-lutf8  $cf_save_LIBS"
13300                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
13301                                         cat >"conftest.$ac_ext" <<_ACEOF
13302 #line 13302 "configure"
13303 #include "confdefs.h"
13304
13305 #include <libutf8.h>
13306 int
13307 main (void)
13308 {
13309 putwc(0,0);
13310   ;
13311   return 0;
13312 }
13313 _ACEOF
13314 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13315 if { (eval echo "$as_me:13315: \"$ac_link\"") >&5
13316   (eval $ac_link) 2>&5
13317   ac_status=$?
13318   echo "$as_me:13318: \$? = $ac_status" >&5
13319   (exit "$ac_status"); } &&
13320          { ac_try='test -s "conftest$ac_exeext"'
13321   { (eval echo "$as_me:13321: \"$ac_try\"") >&5
13322   (eval $ac_try) 2>&5
13323   ac_status=$?
13324   echo "$as_me:13324: \$? = $ac_status" >&5
13325   (exit "$ac_status"); }; }; then
13326
13327                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13328
13329 echo "${as_me:-configure}:13329: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13330
13331                                         cf_cv_find_linkage_utf8=yes
13332                                         cf_cv_library_file_utf8="-lutf8"
13333                                         break
13334 else
13335   echo "$as_me: failed program was:" >&5
13336 cat "conftest.$ac_ext" >&5
13337
13338                                         CPPFLAGS="$cf_save_CPPFLAGS"
13339                                         LIBS="$cf_save_LIBS"
13340                                         LDFLAGS="$cf_save_LDFLAGS"
13341
13342 fi
13343 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13344                                 fi
13345                         done
13346                         CPPFLAGS="$cf_save_CPPFLAGS"
13347                         LDFLAGS="$cf_save_LDFLAGS"
13348                 fi
13349
13350         else
13351                 cf_cv_find_linkage_utf8=no
13352         fi
13353
13354 fi
13355 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13356
13357 fi
13358 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13359
13360 LIBS="$cf_save_LIBS"
13361
13362 if test "$cf_cv_find_linkage_utf8" = yes ; then
13363 cf_cv_utf8_lib=add-on
13364 else
13365 cf_cv_utf8_lib=no
13366 fi
13367
13368 fi
13369 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13370 fi
13371 echo "$as_me:13371: result: $cf_cv_utf8_lib" >&5
13372 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13373
13374 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13375 # ncurses/ncursesw:
13376 if test "$cf_cv_utf8_lib" = "add-on" ; then
13377
13378 cat >>confdefs.h <<\EOF
13379 #define HAVE_LIBUTF8_H 1
13380 EOF
13381
13382 if test -n "$cf_cv_header_path_utf8" ; then
13383   for cf_add_incdir in $cf_cv_header_path_utf8
13384   do
13385         while test "$cf_add_incdir" != /usr/include
13386         do
13387           if test -d "$cf_add_incdir"
13388           then
13389                 cf_have_incdir=no
13390                 if test -n "$CFLAGS$CPPFLAGS" ; then
13391                   # a loop is needed to ensure we can add subdirs of existing dirs
13392                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13393                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13394                           cf_have_incdir=yes; break
13395                         fi
13396                   done
13397                 fi
13398
13399                 if test "$cf_have_incdir" = no ; then
13400                   if test "$cf_add_incdir" = /usr/local/include ; then
13401                         if test "$GCC" = yes
13402                         then
13403                           cf_save_CPPFLAGS=$CPPFLAGS
13404
13405         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13406         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13407
13408                           cat >"conftest.$ac_ext" <<_ACEOF
13409 #line 13409 "configure"
13410 #include "confdefs.h"
13411 #include <stdio.h>
13412 int
13413 main (void)
13414 {
13415 printf("Hello")
13416   ;
13417   return 0;
13418 }
13419 _ACEOF
13420 rm -f "conftest.$ac_objext"
13421 if { (eval echo "$as_me:13421: \"$ac_compile\"") >&5
13422   (eval $ac_compile) 2>&5
13423   ac_status=$?
13424   echo "$as_me:13424: \$? = $ac_status" >&5
13425   (exit "$ac_status"); } &&
13426          { ac_try='test -s "conftest.$ac_objext"'
13427   { (eval echo "$as_me:13427: \"$ac_try\"") >&5
13428   (eval $ac_try) 2>&5
13429   ac_status=$?
13430   echo "$as_me:13430: \$? = $ac_status" >&5
13431   (exit "$ac_status"); }; }; then
13432   :
13433 else
13434   echo "$as_me: failed program was:" >&5
13435 cat "conftest.$ac_ext" >&5
13436 cf_have_incdir=yes
13437 fi
13438 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13439                           CPPFLAGS=$cf_save_CPPFLAGS
13440                         fi
13441                   fi
13442                 fi
13443
13444                 if test "$cf_have_incdir" = no ; then
13445                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13446
13447 echo "${as_me:-configure}:13447: testing adding $cf_add_incdir to include-path ..." 1>&5
13448
13449                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13450
13451                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13452                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13453                   cf_add_incdir="$cf_top_incdir"
13454                 else
13455                   break
13456                 fi
13457           else
13458                 break
13459           fi
13460         done
13461   done
13462 fi
13463
13464 if test -n "$cf_cv_library_path_utf8" ; then
13465         for cf_add_libdir in $cf_cv_library_path_utf8
13466         do
13467                 if test "$cf_add_libdir" = /usr/lib ; then
13468                         :
13469                 elif test -d "$cf_add_libdir"
13470                 then
13471                         cf_have_libdir=no
13472                         if test -n "$LDFLAGS$LIBS" ; then
13473                                 # a loop is needed to ensure we can add subdirs of existing dirs
13474                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13475                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13476                                                 cf_have_libdir=yes; break
13477                                         fi
13478                                 done
13479                         fi
13480                         if test "$cf_have_libdir" = no ; then
13481                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13482
13483 echo "${as_me:-configure}:13483: testing adding $cf_add_libdir to library-path ..." 1>&5
13484
13485                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13486                         fi
13487                 fi
13488         done
13489 fi
13490
13491 cf_add_libs="$LIBS"
13492 # reverse order
13493 cf_add_0lib=
13494 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13495 # filter duplicates
13496 for cf_add_1lib in $cf_add_0lib; do
13497         for cf_add_2lib in $cf_add_libs; do
13498                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13499                         cf_add_1lib=
13500                         break
13501                 fi
13502         done
13503         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13504 done
13505 LIBS="$cf_add_libs"
13506
13507 fi
13508
13509                 if test "$cf_cv_utf8_lib" != no ; then
13510                         NCURSES_LIBUTF8=1
13511                 fi
13512         fi
13513
13514 # This is needed on Tru64 5.0 to declare mbstate_t
13515 echo "$as_me:13515: checking if we must include wchar.h to declare mbstate_t" >&5
13516 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13517 if test "${cf_cv_mbstate_t+set}" = set; then
13518   echo $ECHO_N "(cached) $ECHO_C" >&6
13519 else
13520
13521 cat >"conftest.$ac_ext" <<_ACEOF
13522 #line 13522 "configure"
13523 #include "confdefs.h"
13524
13525 #include <stdlib.h>
13526 #include <stdarg.h>
13527 #include <stdio.h>
13528 #ifdef HAVE_LIBUTF8_H
13529 #include <libutf8.h>
13530 #endif
13531 int
13532 main (void)
13533 {
13534 mbstate_t state
13535   ;
13536   return 0;
13537 }
13538 _ACEOF
13539 rm -f "conftest.$ac_objext"
13540 if { (eval echo "$as_me:13540: \"$ac_compile\"") >&5
13541   (eval $ac_compile) 2>&5
13542   ac_status=$?
13543   echo "$as_me:13543: \$? = $ac_status" >&5
13544   (exit "$ac_status"); } &&
13545          { ac_try='test -s "conftest.$ac_objext"'
13546   { (eval echo "$as_me:13546: \"$ac_try\"") >&5
13547   (eval $ac_try) 2>&5
13548   ac_status=$?
13549   echo "$as_me:13549: \$? = $ac_status" >&5
13550   (exit "$ac_status"); }; }; then
13551   cf_cv_mbstate_t=no
13552 else
13553   echo "$as_me: failed program was:" >&5
13554 cat "conftest.$ac_ext" >&5
13555 cat >"conftest.$ac_ext" <<_ACEOF
13556 #line 13556 "configure"
13557 #include "confdefs.h"
13558
13559 #include <stdlib.h>
13560 #include <stdarg.h>
13561 #include <stdio.h>
13562 #include <wchar.h>
13563 #ifdef HAVE_LIBUTF8_H
13564 #include <libutf8.h>
13565 #endif
13566 int
13567 main (void)
13568 {
13569 mbstate_t value
13570   ;
13571   return 0;
13572 }
13573 _ACEOF
13574 rm -f "conftest.$ac_objext"
13575 if { (eval echo "$as_me:13575: \"$ac_compile\"") >&5
13576   (eval $ac_compile) 2>&5
13577   ac_status=$?
13578   echo "$as_me:13578: \$? = $ac_status" >&5
13579   (exit "$ac_status"); } &&
13580          { ac_try='test -s "conftest.$ac_objext"'
13581   { (eval echo "$as_me:13581: \"$ac_try\"") >&5
13582   (eval $ac_try) 2>&5
13583   ac_status=$?
13584   echo "$as_me:13584: \$? = $ac_status" >&5
13585   (exit "$ac_status"); }; }; then
13586   cf_cv_mbstate_t=yes
13587 else
13588   echo "$as_me: failed program was:" >&5
13589 cat "conftest.$ac_ext" >&5
13590 cf_cv_mbstate_t=unknown
13591 fi
13592 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13593 fi
13594 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13595 fi
13596 echo "$as_me:13596: result: $cf_cv_mbstate_t" >&5
13597 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13598
13599 if test "$cf_cv_mbstate_t" = yes ; then
13600
13601 cat >>confdefs.h <<\EOF
13602 #define NEED_WCHAR_H 1
13603 EOF
13604
13605         NEED_WCHAR_H=1
13606 fi
13607
13608 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13609 if test "$cf_cv_mbstate_t" = unknown ; then
13610         NCURSES_MBSTATE_T=1
13611 fi
13612
13613 # This is needed on Tru64 5.0 to declare wchar_t
13614 echo "$as_me:13614: checking if we must include wchar.h to declare wchar_t" >&5
13615 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13616 if test "${cf_cv_wchar_t+set}" = set; then
13617   echo $ECHO_N "(cached) $ECHO_C" >&6
13618 else
13619
13620 cat >"conftest.$ac_ext" <<_ACEOF
13621 #line 13621 "configure"
13622 #include "confdefs.h"
13623
13624 #include <stdlib.h>
13625 #include <stdarg.h>
13626 #include <stdio.h>
13627 #ifdef HAVE_LIBUTF8_H
13628 #include <libutf8.h>
13629 #endif
13630 int
13631 main (void)
13632 {
13633 wchar_t state
13634   ;
13635   return 0;
13636 }
13637 _ACEOF
13638 rm -f "conftest.$ac_objext"
13639 if { (eval echo "$as_me:13639: \"$ac_compile\"") >&5
13640   (eval $ac_compile) 2>&5
13641   ac_status=$?
13642   echo "$as_me:13642: \$? = $ac_status" >&5
13643   (exit "$ac_status"); } &&
13644          { ac_try='test -s "conftest.$ac_objext"'
13645   { (eval echo "$as_me:13645: \"$ac_try\"") >&5
13646   (eval $ac_try) 2>&5
13647   ac_status=$?
13648   echo "$as_me:13648: \$? = $ac_status" >&5
13649   (exit "$ac_status"); }; }; then
13650   cf_cv_wchar_t=no
13651 else
13652   echo "$as_me: failed program was:" >&5
13653 cat "conftest.$ac_ext" >&5
13654 cat >"conftest.$ac_ext" <<_ACEOF
13655 #line 13655 "configure"
13656 #include "confdefs.h"
13657
13658 #include <stdlib.h>
13659 #include <stdarg.h>
13660 #include <stdio.h>
13661 #include <wchar.h>
13662 #ifdef HAVE_LIBUTF8_H
13663 #include <libutf8.h>
13664 #endif
13665 int
13666 main (void)
13667 {
13668 wchar_t value
13669   ;
13670   return 0;
13671 }
13672 _ACEOF
13673 rm -f "conftest.$ac_objext"
13674 if { (eval echo "$as_me:13674: \"$ac_compile\"") >&5
13675   (eval $ac_compile) 2>&5
13676   ac_status=$?
13677   echo "$as_me:13677: \$? = $ac_status" >&5
13678   (exit "$ac_status"); } &&
13679          { ac_try='test -s "conftest.$ac_objext"'
13680   { (eval echo "$as_me:13680: \"$ac_try\"") >&5
13681   (eval $ac_try) 2>&5
13682   ac_status=$?
13683   echo "$as_me:13683: \$? = $ac_status" >&5
13684   (exit "$ac_status"); }; }; then
13685   cf_cv_wchar_t=yes
13686 else
13687   echo "$as_me: failed program was:" >&5
13688 cat "conftest.$ac_ext" >&5
13689 cf_cv_wchar_t=unknown
13690 fi
13691 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13692 fi
13693 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13694 fi
13695 echo "$as_me:13695: result: $cf_cv_wchar_t" >&5
13696 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13697
13698 if test "$cf_cv_wchar_t" = yes ; then
13699
13700 cat >>confdefs.h <<\EOF
13701 #define NEED_WCHAR_H 1
13702 EOF
13703
13704         NEED_WCHAR_H=1
13705 fi
13706
13707 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13708 if test "$cf_cv_wchar_t" = unknown ; then
13709         NCURSES_WCHAR_T=1
13710 fi
13711
13712 # if we find wchar_t in either place, use substitution to provide a fallback.
13713 if test "$cf_cv_wchar_t" != unknown ; then
13714         NCURSES_OK_WCHAR_T=1
13715 fi
13716
13717 # This is needed on Tru64 5.0 to declare wint_t
13718 echo "$as_me:13718: checking if we must include wchar.h to declare wint_t" >&5
13719 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13720 if test "${cf_cv_wint_t+set}" = set; then
13721   echo $ECHO_N "(cached) $ECHO_C" >&6
13722 else
13723
13724 cat >"conftest.$ac_ext" <<_ACEOF
13725 #line 13725 "configure"
13726 #include "confdefs.h"
13727
13728 #include <stdlib.h>
13729 #include <stdarg.h>
13730 #include <stdio.h>
13731 #ifdef HAVE_LIBUTF8_H
13732 #include <libutf8.h>
13733 #endif
13734 int
13735 main (void)
13736 {
13737 wint_t state
13738   ;
13739   return 0;
13740 }
13741 _ACEOF
13742 rm -f "conftest.$ac_objext"
13743 if { (eval echo "$as_me:13743: \"$ac_compile\"") >&5
13744   (eval $ac_compile) 2>&5
13745   ac_status=$?
13746   echo "$as_me:13746: \$? = $ac_status" >&5
13747   (exit "$ac_status"); } &&
13748          { ac_try='test -s "conftest.$ac_objext"'
13749   { (eval echo "$as_me:13749: \"$ac_try\"") >&5
13750   (eval $ac_try) 2>&5
13751   ac_status=$?
13752   echo "$as_me:13752: \$? = $ac_status" >&5
13753   (exit "$ac_status"); }; }; then
13754   cf_cv_wint_t=no
13755 else
13756   echo "$as_me: failed program was:" >&5
13757 cat "conftest.$ac_ext" >&5
13758 cat >"conftest.$ac_ext" <<_ACEOF
13759 #line 13759 "configure"
13760 #include "confdefs.h"
13761
13762 #include <stdlib.h>
13763 #include <stdarg.h>
13764 #include <stdio.h>
13765 #include <wchar.h>
13766 #ifdef HAVE_LIBUTF8_H
13767 #include <libutf8.h>
13768 #endif
13769 int
13770 main (void)
13771 {
13772 wint_t value
13773   ;
13774   return 0;
13775 }
13776 _ACEOF
13777 rm -f "conftest.$ac_objext"
13778 if { (eval echo "$as_me:13778: \"$ac_compile\"") >&5
13779   (eval $ac_compile) 2>&5
13780   ac_status=$?
13781   echo "$as_me:13781: \$? = $ac_status" >&5
13782   (exit "$ac_status"); } &&
13783          { ac_try='test -s "conftest.$ac_objext"'
13784   { (eval echo "$as_me:13784: \"$ac_try\"") >&5
13785   (eval $ac_try) 2>&5
13786   ac_status=$?
13787   echo "$as_me:13787: \$? = $ac_status" >&5
13788   (exit "$ac_status"); }; }; then
13789   cf_cv_wint_t=yes
13790 else
13791   echo "$as_me: failed program was:" >&5
13792 cat "conftest.$ac_ext" >&5
13793 cf_cv_wint_t=unknown
13794 fi
13795 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13796 fi
13797 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13798 fi
13799 echo "$as_me:13799: result: $cf_cv_wint_t" >&5
13800 echo "${ECHO_T}$cf_cv_wint_t" >&6
13801
13802 if test "$cf_cv_wint_t" = yes ; then
13803
13804 cat >>confdefs.h <<\EOF
13805 #define NEED_WCHAR_H 1
13806 EOF
13807
13808         NEED_WCHAR_H=1
13809 fi
13810
13811 # if we do not find wint_t in either place, use substitution to provide a fallback.
13812 if test "$cf_cv_wint_t" = unknown ; then
13813         NCURSES_WINT_T=1
13814 fi
13815
13816 # if we find wint_t in either place, use substitution to provide a fallback.
13817 if test "$cf_cv_wint_t" != unknown ; then
13818         NCURSES_OK_WINT_T=1
13819 fi
13820
13821         if test "$NCURSES_MBSTATE_T" != 0; then
13822
13823 cat >>confdefs.h <<\EOF
13824 #define NEED_MBSTATE_T_DEF 1
13825 EOF
13826
13827         fi
13828 fi
13829
13830 ###   use option --disable-lp64 to allow long chtype
13831 echo "$as_me:13831: checking whether to enable _LP64 definition in curses.h" >&5
13832 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13833
13834 # Check whether --enable-lp64 or --disable-lp64 was given.
13835 if test "${enable_lp64+set}" = set; then
13836   enableval="$enable_lp64"
13837   with_lp64=$enableval
13838 else
13839   with_lp64=$cf_dft_with_lp64
13840 fi;
13841 echo "$as_me:13841: result: $with_lp64" >&5
13842 echo "${ECHO_T}$with_lp64" >&6
13843
13844 if test "x$with_lp64" = xyes ; then
13845         cf_cv_enable_lp64=1
13846 else
13847         cf_cv_enable_lp64=0
13848 fi
13849
13850 # Check whether --enable-largefile or --disable-largefile was given.
13851 if test "${enable_largefile+set}" = set; then
13852   enableval="$enable_largefile"
13853
13854 fi;
13855 if test "$enable_largefile" != no; then
13856
13857   echo "$as_me:13857: checking for special C compiler options needed for large files" >&5
13858 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13859 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13860   echo $ECHO_N "(cached) $ECHO_C" >&6
13861 else
13862   ac_cv_sys_largefile_CC=no
13863      if test "$GCC" != yes; then
13864        ac_save_CC=$CC
13865        while :; do
13866          # IRIX 6.2 and later do not support large files by default,
13867          # so use the C compiler's -n32 option if that helps.
13868          cat >"conftest.$ac_ext" <<_ACEOF
13869 #line 13869 "configure"
13870 #include "confdefs.h"
13871 #include <sys/types.h>
13872  /* Check that off_t can represent 2**63 - 1 correctly.
13873     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13874     since some C++ compilers masquerading as C compilers
13875     incorrectly reject 9223372036854775807.  */
13876 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13877   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13878                        && LARGE_OFF_T % 2147483647 == 1)
13879                       ? 1 : -1];
13880 int
13881 main (void)
13882 {
13883
13884   ;
13885   return 0;
13886 }
13887 _ACEOF
13888          rm -f "conftest.$ac_objext"
13889 if { (eval echo "$as_me:13889: \"$ac_compile\"") >&5
13890   (eval $ac_compile) 2>&5
13891   ac_status=$?
13892   echo "$as_me:13892: \$? = $ac_status" >&5
13893   (exit "$ac_status"); } &&
13894          { ac_try='test -s "conftest.$ac_objext"'
13895   { (eval echo "$as_me:13895: \"$ac_try\"") >&5
13896   (eval $ac_try) 2>&5
13897   ac_status=$?
13898   echo "$as_me:13898: \$? = $ac_status" >&5
13899   (exit "$ac_status"); }; }; then
13900   break
13901 else
13902   echo "$as_me: failed program was:" >&5
13903 cat "conftest.$ac_ext" >&5
13904 fi
13905 rm -f "conftest.$ac_objext"
13906          CC="$CC -n32"
13907          rm -f "conftest.$ac_objext"
13908 if { (eval echo "$as_me:13908: \"$ac_compile\"") >&5
13909   (eval $ac_compile) 2>&5
13910   ac_status=$?
13911   echo "$as_me:13911: \$? = $ac_status" >&5
13912   (exit "$ac_status"); } &&
13913          { ac_try='test -s "conftest.$ac_objext"'
13914   { (eval echo "$as_me:13914: \"$ac_try\"") >&5
13915   (eval $ac_try) 2>&5
13916   ac_status=$?
13917   echo "$as_me:13917: \$? = $ac_status" >&5
13918   (exit "$ac_status"); }; }; then
13919   ac_cv_sys_largefile_CC=' -n32'; break
13920 else
13921   echo "$as_me: failed program was:" >&5
13922 cat "conftest.$ac_ext" >&5
13923 fi
13924 rm -f "conftest.$ac_objext"
13925          break
13926        done
13927        CC=$ac_save_CC
13928        rm -f "conftest.$ac_ext"
13929     fi
13930 fi
13931 echo "$as_me:13931: result: $ac_cv_sys_largefile_CC" >&5
13932 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13933   if test "$ac_cv_sys_largefile_CC" != no; then
13934     CC=$CC$ac_cv_sys_largefile_CC
13935   fi
13936
13937   echo "$as_me:13937: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13938 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13939 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13940   echo $ECHO_N "(cached) $ECHO_C" >&6
13941 else
13942   while :; do
13943   ac_cv_sys_file_offset_bits=no
13944   cat >"conftest.$ac_ext" <<_ACEOF
13945 #line 13945 "configure"
13946 #include "confdefs.h"
13947 #include <sys/types.h>
13948  /* Check that off_t can represent 2**63 - 1 correctly.
13949     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13950     since some C++ compilers masquerading as C compilers
13951     incorrectly reject 9223372036854775807.  */
13952 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13953   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13954                        && LARGE_OFF_T % 2147483647 == 1)
13955                       ? 1 : -1];
13956 int
13957 main (void)
13958 {
13959
13960   ;
13961   return 0;
13962 }
13963 _ACEOF
13964 rm -f "conftest.$ac_objext"
13965 if { (eval echo "$as_me:13965: \"$ac_compile\"") >&5
13966   (eval $ac_compile) 2>&5
13967   ac_status=$?
13968   echo "$as_me:13968: \$? = $ac_status" >&5
13969   (exit "$ac_status"); } &&
13970          { ac_try='test -s "conftest.$ac_objext"'
13971   { (eval echo "$as_me:13971: \"$ac_try\"") >&5
13972   (eval $ac_try) 2>&5
13973   ac_status=$?
13974   echo "$as_me:13974: \$? = $ac_status" >&5
13975   (exit "$ac_status"); }; }; then
13976   break
13977 else
13978   echo "$as_me: failed program was:" >&5
13979 cat "conftest.$ac_ext" >&5
13980 fi
13981 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13982   cat >"conftest.$ac_ext" <<_ACEOF
13983 #line 13983 "configure"
13984 #include "confdefs.h"
13985 #define _FILE_OFFSET_BITS 64
13986 #include <sys/types.h>
13987  /* Check that off_t can represent 2**63 - 1 correctly.
13988     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13989     since some C++ compilers masquerading as C compilers
13990     incorrectly reject 9223372036854775807.  */
13991 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13992   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13993                        && LARGE_OFF_T % 2147483647 == 1)
13994                       ? 1 : -1];
13995 int
13996 main (void)
13997 {
13998
13999   ;
14000   return 0;
14001 }
14002 _ACEOF
14003 rm -f "conftest.$ac_objext"
14004 if { (eval echo "$as_me:14004: \"$ac_compile\"") >&5
14005   (eval $ac_compile) 2>&5
14006   ac_status=$?
14007   echo "$as_me:14007: \$? = $ac_status" >&5
14008   (exit "$ac_status"); } &&
14009          { ac_try='test -s "conftest.$ac_objext"'
14010   { (eval echo "$as_me:14010: \"$ac_try\"") >&5
14011   (eval $ac_try) 2>&5
14012   ac_status=$?
14013   echo "$as_me:14013: \$? = $ac_status" >&5
14014   (exit "$ac_status"); }; }; then
14015   ac_cv_sys_file_offset_bits=64; break
14016 else
14017   echo "$as_me: failed program was:" >&5
14018 cat "conftest.$ac_ext" >&5
14019 fi
14020 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14021   break
14022 done
14023 fi
14024 echo "$as_me:14024: result: $ac_cv_sys_file_offset_bits" >&5
14025 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14026 if test "$ac_cv_sys_file_offset_bits" != no; then
14027
14028 cat >>confdefs.h <<EOF
14029 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14030 EOF
14031
14032 fi
14033 rm -rf conftest*
14034   echo "$as_me:14034: checking for _LARGE_FILES value needed for large files" >&5
14035 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14036 if test "${ac_cv_sys_large_files+set}" = set; then
14037   echo $ECHO_N "(cached) $ECHO_C" >&6
14038 else
14039   while :; do
14040   ac_cv_sys_large_files=no
14041   cat >"conftest.$ac_ext" <<_ACEOF
14042 #line 14042 "configure"
14043 #include "confdefs.h"
14044 #include <sys/types.h>
14045  /* Check that off_t can represent 2**63 - 1 correctly.
14046     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14047     since some C++ compilers masquerading as C compilers
14048     incorrectly reject 9223372036854775807.  */
14049 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14050   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14051                        && LARGE_OFF_T % 2147483647 == 1)
14052                       ? 1 : -1];
14053 int
14054 main (void)
14055 {
14056
14057   ;
14058   return 0;
14059 }
14060 _ACEOF
14061 rm -f "conftest.$ac_objext"
14062 if { (eval echo "$as_me:14062: \"$ac_compile\"") >&5
14063   (eval $ac_compile) 2>&5
14064   ac_status=$?
14065   echo "$as_me:14065: \$? = $ac_status" >&5
14066   (exit "$ac_status"); } &&
14067          { ac_try='test -s "conftest.$ac_objext"'
14068   { (eval echo "$as_me:14068: \"$ac_try\"") >&5
14069   (eval $ac_try) 2>&5
14070   ac_status=$?
14071   echo "$as_me:14071: \$? = $ac_status" >&5
14072   (exit "$ac_status"); }; }; then
14073   break
14074 else
14075   echo "$as_me: failed program was:" >&5
14076 cat "conftest.$ac_ext" >&5
14077 fi
14078 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14079   cat >"conftest.$ac_ext" <<_ACEOF
14080 #line 14080 "configure"
14081 #include "confdefs.h"
14082 #define _LARGE_FILES 1
14083 #include <sys/types.h>
14084  /* Check that off_t can represent 2**63 - 1 correctly.
14085     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14086     since some C++ compilers masquerading as C compilers
14087     incorrectly reject 9223372036854775807.  */
14088 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14089   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14090                        && LARGE_OFF_T % 2147483647 == 1)
14091                       ? 1 : -1];
14092 int
14093 main (void)
14094 {
14095
14096   ;
14097   return 0;
14098 }
14099 _ACEOF
14100 rm -f "conftest.$ac_objext"
14101 if { (eval echo "$as_me:14101: \"$ac_compile\"") >&5
14102   (eval $ac_compile) 2>&5
14103   ac_status=$?
14104   echo "$as_me:14104: \$? = $ac_status" >&5
14105   (exit "$ac_status"); } &&
14106          { ac_try='test -s "conftest.$ac_objext"'
14107   { (eval echo "$as_me:14107: \"$ac_try\"") >&5
14108   (eval $ac_try) 2>&5
14109   ac_status=$?
14110   echo "$as_me:14110: \$? = $ac_status" >&5
14111   (exit "$ac_status"); }; }; then
14112   ac_cv_sys_large_files=1; break
14113 else
14114   echo "$as_me: failed program was:" >&5
14115 cat "conftest.$ac_ext" >&5
14116 fi
14117 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14118   break
14119 done
14120 fi
14121 echo "$as_me:14121: result: $ac_cv_sys_large_files" >&5
14122 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14123 if test "$ac_cv_sys_large_files" != no; then
14124
14125 cat >>confdefs.h <<EOF
14126 #define _LARGE_FILES $ac_cv_sys_large_files
14127 EOF
14128
14129 fi
14130 rm -rf conftest*
14131 fi
14132
14133         if test "$enable_largefile" != no ; then
14134         echo "$as_me:14134: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14135 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14136 if test "${ac_cv_sys_largefile_source+set}" = set; then
14137   echo $ECHO_N "(cached) $ECHO_C" >&6
14138 else
14139   while :; do
14140   ac_cv_sys_largefile_source=no
14141   cat >"conftest.$ac_ext" <<_ACEOF
14142 #line 14142 "configure"
14143 #include "confdefs.h"
14144 #include <stdio.h>
14145 int
14146 main (void)
14147 {
14148 return !fseeko;
14149   ;
14150   return 0;
14151 }
14152 _ACEOF
14153 rm -f "conftest.$ac_objext"
14154 if { (eval echo "$as_me:14154: \"$ac_compile\"") >&5
14155   (eval $ac_compile) 2>&5
14156   ac_status=$?
14157   echo "$as_me:14157: \$? = $ac_status" >&5
14158   (exit "$ac_status"); } &&
14159          { ac_try='test -s "conftest.$ac_objext"'
14160   { (eval echo "$as_me:14160: \"$ac_try\"") >&5
14161   (eval $ac_try) 2>&5
14162   ac_status=$?
14163   echo "$as_me:14163: \$? = $ac_status" >&5
14164   (exit "$ac_status"); }; }; then
14165   break
14166 else
14167   echo "$as_me: failed program was:" >&5
14168 cat "conftest.$ac_ext" >&5
14169 fi
14170 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14171   cat >"conftest.$ac_ext" <<_ACEOF
14172 #line 14172 "configure"
14173 #include "confdefs.h"
14174 #define _LARGEFILE_SOURCE 1
14175 #include <stdio.h>
14176 int
14177 main (void)
14178 {
14179 return !fseeko;
14180   ;
14181   return 0;
14182 }
14183 _ACEOF
14184 rm -f "conftest.$ac_objext"
14185 if { (eval echo "$as_me:14185: \"$ac_compile\"") >&5
14186   (eval $ac_compile) 2>&5
14187   ac_status=$?
14188   echo "$as_me:14188: \$? = $ac_status" >&5
14189   (exit "$ac_status"); } &&
14190          { ac_try='test -s "conftest.$ac_objext"'
14191   { (eval echo "$as_me:14191: \"$ac_try\"") >&5
14192   (eval $ac_try) 2>&5
14193   ac_status=$?
14194   echo "$as_me:14194: \$? = $ac_status" >&5
14195   (exit "$ac_status"); }; }; then
14196   ac_cv_sys_largefile_source=1; break
14197 else
14198   echo "$as_me: failed program was:" >&5
14199 cat "conftest.$ac_ext" >&5
14200 fi
14201 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14202   break
14203 done
14204 fi
14205 echo "$as_me:14205: result: $ac_cv_sys_largefile_source" >&5
14206 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14207 if test "$ac_cv_sys_largefile_source" != no; then
14208
14209 cat >>confdefs.h <<EOF
14210 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14211 EOF
14212
14213 fi
14214 rm -rf conftest*
14215
14216 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14217 # in glibc 2.1.3, but that breaks too many other things.
14218 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14219 echo "$as_me:14219: checking for fseeko" >&5
14220 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14221 if test "${ac_cv_func_fseeko+set}" = set; then
14222   echo $ECHO_N "(cached) $ECHO_C" >&6
14223 else
14224   cat >"conftest.$ac_ext" <<_ACEOF
14225 #line 14225 "configure"
14226 #include "confdefs.h"
14227 #include <stdio.h>
14228 int
14229 main (void)
14230 {
14231 return fseeko && fseeko (stdin, 0, 0);
14232   ;
14233   return 0;
14234 }
14235 _ACEOF
14236 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14237 if { (eval echo "$as_me:14237: \"$ac_link\"") >&5
14238   (eval $ac_link) 2>&5
14239   ac_status=$?
14240   echo "$as_me:14240: \$? = $ac_status" >&5
14241   (exit "$ac_status"); } &&
14242          { ac_try='test -s "conftest$ac_exeext"'
14243   { (eval echo "$as_me:14243: \"$ac_try\"") >&5
14244   (eval $ac_try) 2>&5
14245   ac_status=$?
14246   echo "$as_me:14246: \$? = $ac_status" >&5
14247   (exit "$ac_status"); }; }; then
14248   ac_cv_func_fseeko=yes
14249 else
14250   echo "$as_me: failed program was:" >&5
14251 cat "conftest.$ac_ext" >&5
14252 ac_cv_func_fseeko=no
14253 fi
14254 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14255 fi
14256 echo "$as_me:14256: result: $ac_cv_func_fseeko" >&5
14257 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14258 if test $ac_cv_func_fseeko = yes; then
14259
14260 cat >>confdefs.h <<\EOF
14261 #define HAVE_FSEEKO 1
14262 EOF
14263
14264 fi
14265
14266         # Normally we would collect these definitions in the config.h,
14267         # but (like _XOPEN_SOURCE), some environments rely on having these
14268         # defined before any of the system headers are included.  Another
14269         # case comes up with C++, e.g., on AIX the compiler compiles the
14270         # header files by themselves before looking at the body files it is
14271         # told to compile.  For ncurses, those header files do not include
14272         # the config.h
14273         if test "$ac_cv_sys_large_files" != no
14274         then
14275
14276         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14277         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14278
14279         fi
14280         if test "$ac_cv_sys_largefile_source" != no
14281         then
14282
14283         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14284         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14285
14286         fi
14287         if test "$ac_cv_sys_file_offset_bits" != no
14288         then
14289
14290         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14291         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14292
14293         fi
14294
14295         echo "$as_me:14295: checking whether to use struct dirent64" >&5
14296 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14297 if test "${cf_cv_struct_dirent64+set}" = set; then
14298   echo $ECHO_N "(cached) $ECHO_C" >&6
14299 else
14300
14301                 cat >"conftest.$ac_ext" <<_ACEOF
14302 #line 14302 "configure"
14303 #include "confdefs.h"
14304
14305 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14306 #include <sys/types.h>
14307 #include <dirent.h>
14308
14309 int
14310 main (void)
14311 {
14312
14313                 /* if transitional largefile support is setup, this is true */
14314                 extern struct dirent64 * readdir(DIR *);
14315                 struct dirent64 *x = readdir((DIR *)0);
14316                 struct dirent *y = readdir((DIR *)0);
14317                 int z = x - y;
14318                 (void)z;
14319
14320   ;
14321   return 0;
14322 }
14323 _ACEOF
14324 rm -f "conftest.$ac_objext"
14325 if { (eval echo "$as_me:14325: \"$ac_compile\"") >&5
14326   (eval $ac_compile) 2>&5
14327   ac_status=$?
14328   echo "$as_me:14328: \$? = $ac_status" >&5
14329   (exit "$ac_status"); } &&
14330          { ac_try='test -s "conftest.$ac_objext"'
14331   { (eval echo "$as_me:14331: \"$ac_try\"") >&5
14332   (eval $ac_try) 2>&5
14333   ac_status=$?
14334   echo "$as_me:14334: \$? = $ac_status" >&5
14335   (exit "$ac_status"); }; }; then
14336   cf_cv_struct_dirent64=yes
14337 else
14338   echo "$as_me: failed program was:" >&5
14339 cat "conftest.$ac_ext" >&5
14340 cf_cv_struct_dirent64=no
14341 fi
14342 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14343
14344 fi
14345 echo "$as_me:14345: result: $cf_cv_struct_dirent64" >&5
14346 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14347         test "$cf_cv_struct_dirent64" = yes &&
14348 cat >>confdefs.h <<\EOF
14349 #define HAVE_STRUCT_DIRENT64 1
14350 EOF
14351
14352         fi
14353
14354 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
14355 echo "$as_me:14355: checking if you want tparm not to use X/Open fixed-parameter list" >&5
14356 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
14357
14358 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
14359 if test "${enable_tparm_varargs+set}" = set; then
14360   enableval="$enable_tparm_varargs"
14361   with_tparm_varargs=$enableval
14362 else
14363   with_tparm_varargs=yes
14364 fi;
14365 echo "$as_me:14365: result: $with_tparm_varargs" >&5
14366 echo "${ECHO_T}$with_tparm_varargs" >&6
14367 NCURSES_TPARM_VARARGS=0
14368 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
14369
14370 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
14371 if test "$with_ticlib" != no ; then
14372 echo "$as_me:14372: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
14373 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
14374
14375 # Check whether --enable-tic-depends or --disable-tic-depends was given.
14376 if test "${enable_tic_depends+set}" = set; then
14377   enableval="$enable_tic_depends"
14378   with_tic_depends=$enableval
14379 else
14380   with_tic_depends=yes
14381 fi;
14382 echo "$as_me:14382: result: $with_tic_depends" >&5
14383 echo "${ECHO_T}$with_tic_depends" >&6
14384 else
14385         with_tic_depends=no
14386 fi
14387
14388 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
14389 echo "$as_me:14389: checking if you want to enable wattr* macros" >&5
14390 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
14391
14392 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
14393 if test "${enable_wattr_macros+set}" = set; then
14394   enableval="$enable_wattr_macros"
14395   with_wattr_macros=$enableval
14396 else
14397   with_wattr_macros=no
14398 fi;
14399 if [ "x$with_wattr_macros" != xyes ]; then
14400         NCURSES_WATTR_MACROS=0
14401         echo "$as_me:14401: result: no" >&5
14402 echo "${ECHO_T}no" >&6
14403 else
14404         NCURSES_WATTR_MACROS=1
14405         echo "$as_me:14405: result: yes" >&5
14406 echo "${ECHO_T}yes" >&6
14407 fi
14408
14409 echo "$as_me:14409: checking for X11 rgb file" >&5
14410 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14411
14412 # Check whether --with-x11-rgb or --without-x11-rgb was given.
14413 if test "${with_x11_rgb+set}" = set; then
14414   withval="$with_x11_rgb"
14415   RGB_PATH=$withval
14416 else
14417   RGB_PATH=auto
14418 fi;
14419
14420 if test "x$RGB_PATH" = xauto
14421 then
14422         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14423         for cf_path in \
14424                 /opt/local/share/X11/rgb.txt \
14425                 /opt/X11/share/X11/rgb.txt \
14426                 /usr/share/X11/rgb.txt \
14427                 /usr/X11/share/X11/rgb.txt \
14428                 /usr/X11/lib/X11/rgb.txt \
14429                 /usr/lib/X11/rgb.txt \
14430                 /etc/X11/rgb.txt \
14431                 /usr/pkg/lib/X11/rgb.txt \
14432                 /usr/X11R7/lib/X11/rgb.txt \
14433                 /usr/X11R6/lib/X11/rgb.txt \
14434                 /usr/X11R5/lib/X11/rgb.txt \
14435                 /usr/X11R4/lib/X11/rgb.txt \
14436                 /usr/local/lib/X11/rgb.txt \
14437                 /usr/local/share/X11/rgb.txt \
14438                 /usr/lib64/X11/rgb.txt
14439         do
14440                 if test -f "$cf_path" ; then
14441                         RGB_PATH="$cf_path"
14442                         break
14443                 fi
14444         done
14445 else
14446         cf_path=$RGB_PATH
14447
14448 if test "x$prefix" != xNONE; then
14449         cf_path_syntax="$prefix"
14450 else
14451         cf_path_syntax="$ac_default_prefix"
14452 fi
14453
14454 case ".$cf_path" in
14455 (.\$\(*\)*|.\'*\'*)
14456         ;;
14457 (..|./*|.\\*)
14458         ;;
14459 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14460         ;;
14461 (.\$\{*prefix\}*|.\$\{*dir\}*)
14462         eval cf_path="$cf_path"
14463         case ".$cf_path" in
14464         (.NONE/*)
14465                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14466                 ;;
14467         esac
14468         ;;
14469 (.no|.NONE/*)
14470         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14471         ;;
14472 (*)
14473         { { echo "$as_me:14473: error: expected a pathname, not \"$cf_path\"" >&5
14474 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14475    { (exit 1); exit 1; }; }
14476         ;;
14477 esac
14478
14479 fi
14480
14481 echo "$as_me:14481: result: $RGB_PATH" >&5
14482 echo "${ECHO_T}$RGB_PATH" >&6
14483
14484 cat >>confdefs.h <<EOF
14485 #define RGB_PATH "$cf_path"
14486 EOF
14487
14488 no_x11_rgb=
14489 if test "$RGB_PATH" = no
14490 then
14491         no_x11_rgb="#"
14492 fi
14493
14494 ###   use option --with-bool to override bool's type
14495 echo "$as_me:14495: checking for type of bool" >&5
14496 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14497
14498 # Check whether --with-bool or --without-bool was given.
14499 if test "${with_bool+set}" = set; then
14500   withval="$with_bool"
14501   NCURSES_BOOL="$withval"
14502 else
14503   NCURSES_BOOL=auto
14504 fi;
14505 echo "$as_me:14505: result: $NCURSES_BOOL" >&5
14506 echo "${ECHO_T}$NCURSES_BOOL" >&6
14507
14508 echo "$as_me:14508: checking for alternate terminal capabilities file" >&5
14509 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14510
14511 # Check whether --with-caps or --without-caps was given.
14512 if test "${with_caps+set}" = set; then
14513   withval="$with_caps"
14514   TERMINFO_CAPS=Caps.$withval
14515 else
14516   TERMINFO_CAPS=Caps
14517 fi;
14518 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14519 then
14520         { echo "$as_me:14520: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14521 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14522         TERMINFO_CAPS=Caps
14523 fi
14524 echo "$as_me:14524: result: $TERMINFO_CAPS" >&5
14525 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14526
14527 ###   use option --with-chtype to override chtype's type
14528 echo "$as_me:14528: checking for type of chtype" >&5
14529 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14530
14531 # Check whether --with-chtype or --without-chtype was given.
14532 if test "${with_chtype+set}" = set; then
14533   withval="$with_chtype"
14534   NCURSES_CHTYPE="$withval"
14535 else
14536   NCURSES_CHTYPE=$cf_dft_chtype
14537 fi;
14538 echo "$as_me:14538: result: $NCURSES_CHTYPE" >&5
14539 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14540
14541 ###   use option --with-ospeed to override ospeed's type
14542 echo "$as_me:14542: checking for type of ospeed" >&5
14543 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14544
14545 # Check whether --with-ospeed or --without-ospeed was given.
14546 if test "${with_ospeed+set}" = set; then
14547   withval="$with_ospeed"
14548   NCURSES_OSPEED="$withval"
14549 else
14550   NCURSES_OSPEED=short
14551 fi;
14552 echo "$as_me:14552: result: $NCURSES_OSPEED" >&5
14553 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14554
14555 ###   use option --with-mmask-t to override mmask_t's type
14556 echo "$as_me:14556: checking for type of mmask_t" >&5
14557 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14558
14559 # Check whether --with-mmask-t or --without-mmask-t was given.
14560 if test "${with_mmask_t+set}" = set; then
14561   withval="$with_mmask_t"
14562   NCURSES_MMASK_T="$withval"
14563 else
14564   NCURSES_MMASK_T=$cf_dft_mmask_t
14565 fi;
14566 echo "$as_me:14566: result: $NCURSES_MMASK_T" >&5
14567 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14568
14569 ###   use option --with-ccharw-max to override CCHARW_MAX size
14570 echo "$as_me:14570: checking for size CCHARW_MAX" >&5
14571 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14572
14573 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14574 if test "${with_ccharw_max+set}" = set; then
14575   withval="$with_ccharw_max"
14576   NCURSES_CCHARW_MAX="$withval"
14577 else
14578   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14579 fi;
14580 echo "$as_me:14580: result: $NCURSES_CCHARW_MAX" >&5
14581 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14582
14583 echo "$as_me:14583: checking for signed char" >&5
14584 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14585 if test "${ac_cv_type_signed_char+set}" = set; then
14586   echo $ECHO_N "(cached) $ECHO_C" >&6
14587 else
14588   cat >"conftest.$ac_ext" <<_ACEOF
14589 #line 14589 "configure"
14590 #include "confdefs.h"
14591 $ac_includes_default
14592 int
14593 main (void)
14594 {
14595 if ((signed char *) 0)
14596   return 0;
14597 if (sizeof (signed char))
14598   return 0;
14599   ;
14600   return 0;
14601 }
14602 _ACEOF
14603 rm -f "conftest.$ac_objext"
14604 if { (eval echo "$as_me:14604: \"$ac_compile\"") >&5
14605   (eval $ac_compile) 2>&5
14606   ac_status=$?
14607   echo "$as_me:14607: \$? = $ac_status" >&5
14608   (exit "$ac_status"); } &&
14609          { ac_try='test -s "conftest.$ac_objext"'
14610   { (eval echo "$as_me:14610: \"$ac_try\"") >&5
14611   (eval $ac_try) 2>&5
14612   ac_status=$?
14613   echo "$as_me:14613: \$? = $ac_status" >&5
14614   (exit "$ac_status"); }; }; then
14615   ac_cv_type_signed_char=yes
14616 else
14617   echo "$as_me: failed program was:" >&5
14618 cat "conftest.$ac_ext" >&5
14619 ac_cv_type_signed_char=no
14620 fi
14621 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14622 fi
14623 echo "$as_me:14623: result: $ac_cv_type_signed_char" >&5
14624 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14625
14626 echo "$as_me:14626: checking size of signed char" >&5
14627 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14628 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14629   echo $ECHO_N "(cached) $ECHO_C" >&6
14630 else
14631   if test "$ac_cv_type_signed_char" = yes; then
14632   if test "$cross_compiling" = yes; then
14633   # Depending upon the size, compute the lo and hi bounds.
14634 cat >"conftest.$ac_ext" <<_ACEOF
14635 #line 14635 "configure"
14636 #include "confdefs.h"
14637 $ac_includes_default
14638 int
14639 main (void)
14640 {
14641 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14642   ;
14643   return 0;
14644 }
14645 _ACEOF
14646 rm -f "conftest.$ac_objext"
14647 if { (eval echo "$as_me:14647: \"$ac_compile\"") >&5
14648   (eval $ac_compile) 2>&5
14649   ac_status=$?
14650   echo "$as_me:14650: \$? = $ac_status" >&5
14651   (exit "$ac_status"); } &&
14652          { ac_try='test -s "conftest.$ac_objext"'
14653   { (eval echo "$as_me:14653: \"$ac_try\"") >&5
14654   (eval $ac_try) 2>&5
14655   ac_status=$?
14656   echo "$as_me:14656: \$? = $ac_status" >&5
14657   (exit "$ac_status"); }; }; then
14658   ac_lo=0 ac_mid=0
14659   while :; do
14660     cat >"conftest.$ac_ext" <<_ACEOF
14661 #line 14661 "configure"
14662 #include "confdefs.h"
14663 $ac_includes_default
14664 int
14665 main (void)
14666 {
14667 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14668   ;
14669   return 0;
14670 }
14671 _ACEOF
14672 rm -f "conftest.$ac_objext"
14673 if { (eval echo "$as_me:14673: \"$ac_compile\"") >&5
14674   (eval $ac_compile) 2>&5
14675   ac_status=$?
14676   echo "$as_me:14676: \$? = $ac_status" >&5
14677   (exit "$ac_status"); } &&
14678          { ac_try='test -s "conftest.$ac_objext"'
14679   { (eval echo "$as_me:14679: \"$ac_try\"") >&5
14680   (eval $ac_try) 2>&5
14681   ac_status=$?
14682   echo "$as_me:14682: \$? = $ac_status" >&5
14683   (exit "$ac_status"); }; }; then
14684   ac_hi=$ac_mid; break
14685 else
14686   echo "$as_me: failed program was:" >&5
14687 cat "conftest.$ac_ext" >&5
14688 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14689 fi
14690 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14691   done
14692 else
14693   echo "$as_me: failed program was:" >&5
14694 cat "conftest.$ac_ext" >&5
14695 ac_hi=-1 ac_mid=-1
14696   while :; do
14697     cat >"conftest.$ac_ext" <<_ACEOF
14698 #line 14698 "configure"
14699 #include "confdefs.h"
14700 $ac_includes_default
14701 int
14702 main (void)
14703 {
14704 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14705   ;
14706   return 0;
14707 }
14708 _ACEOF
14709 rm -f "conftest.$ac_objext"
14710 if { (eval echo "$as_me:14710: \"$ac_compile\"") >&5
14711   (eval $ac_compile) 2>&5
14712   ac_status=$?
14713   echo "$as_me:14713: \$? = $ac_status" >&5
14714   (exit "$ac_status"); } &&
14715          { ac_try='test -s "conftest.$ac_objext"'
14716   { (eval echo "$as_me:14716: \"$ac_try\"") >&5
14717   (eval $ac_try) 2>&5
14718   ac_status=$?
14719   echo "$as_me:14719: \$? = $ac_status" >&5
14720   (exit "$ac_status"); }; }; then
14721   ac_lo=$ac_mid; break
14722 else
14723   echo "$as_me: failed program was:" >&5
14724 cat "conftest.$ac_ext" >&5
14725 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14726 fi
14727 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14728   done
14729 fi
14730 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14731 # Binary search between lo and hi bounds.
14732 while test "x$ac_lo" != "x$ac_hi"; do
14733   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14734   cat >"conftest.$ac_ext" <<_ACEOF
14735 #line 14735 "configure"
14736 #include "confdefs.h"
14737 $ac_includes_default
14738 int
14739 main (void)
14740 {
14741 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14742   ;
14743   return 0;
14744 }
14745 _ACEOF
14746 rm -f "conftest.$ac_objext"
14747 if { (eval echo "$as_me:14747: \"$ac_compile\"") >&5
14748   (eval $ac_compile) 2>&5
14749   ac_status=$?
14750   echo "$as_me:14750: \$? = $ac_status" >&5
14751   (exit "$ac_status"); } &&
14752          { ac_try='test -s "conftest.$ac_objext"'
14753   { (eval echo "$as_me:14753: \"$ac_try\"") >&5
14754   (eval $ac_try) 2>&5
14755   ac_status=$?
14756   echo "$as_me:14756: \$? = $ac_status" >&5
14757   (exit "$ac_status"); }; }; then
14758   ac_hi=$ac_mid
14759 else
14760   echo "$as_me: failed program was:" >&5
14761 cat "conftest.$ac_ext" >&5
14762 ac_lo=`expr "$ac_mid" + 1`
14763 fi
14764 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14765 done
14766 ac_cv_sizeof_signed_char=$ac_lo
14767 else
14768   if test "$cross_compiling" = yes; then
14769   { { echo "$as_me:14769: error: cannot run test program while cross compiling" >&5
14770 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14771    { (exit 1); exit 1; }; }
14772 else
14773   cat >"conftest.$ac_ext" <<_ACEOF
14774 #line 14774 "configure"
14775 #include "confdefs.h"
14776 $ac_includes_default
14777 int
14778 main (void)
14779 {
14780 FILE *f = fopen ("conftest.val", "w");
14781 if (!f)
14782   $ac_main_return (1);
14783 fprintf (f, "%ld", (long)(sizeof (signed char)));
14784 fclose (f);
14785   ;
14786   return 0;
14787 }
14788 _ACEOF
14789 rm -f "conftest$ac_exeext"
14790 if { (eval echo "$as_me:14790: \"$ac_link\"") >&5
14791   (eval $ac_link) 2>&5
14792   ac_status=$?
14793   echo "$as_me:14793: \$? = $ac_status" >&5
14794   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14795   { (eval echo "$as_me:14795: \"$ac_try\"") >&5
14796   (eval $ac_try) 2>&5
14797   ac_status=$?
14798   echo "$as_me:14798: \$? = $ac_status" >&5
14799   (exit "$ac_status"); }; }; then
14800   ac_cv_sizeof_signed_char=`cat conftest.val`
14801 else
14802   echo "$as_me: program exited with status $ac_status" >&5
14803 echo "$as_me: failed program was:" >&5
14804 cat "conftest.$ac_ext" >&5
14805 fi
14806 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14807 fi
14808 fi
14809 rm -f conftest.val
14810 else
14811   ac_cv_sizeof_signed_char=0
14812 fi
14813 fi
14814 echo "$as_me:14814: result: $ac_cv_sizeof_signed_char" >&5
14815 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14816 cat >>confdefs.h <<EOF
14817 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14818 EOF
14819
14820 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14821         NCURSES_SBOOL="signed char"
14822 else
14823         NCURSES_SBOOL="char"
14824 fi
14825 echo "$as_me:14825: checking if you want to use signed Boolean array in term.h" >&5
14826 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14827
14828 # Check whether --enable-signed-char or --disable-signed-char was given.
14829 if test "${enable_signed_char+set}" = set; then
14830   enableval="$enable_signed_char"
14831   with_signed_char=$enableval
14832 else
14833   with_signed_char=$cf_dft_signed_char
14834 fi;
14835 echo "$as_me:14835: result: $with_signed_char" >&5
14836 echo "${ECHO_T}$with_signed_char" >&6
14837 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14838
14839 ###   use option --with-tparm-arg to override tparm's argument type
14840 echo "$as_me:14840: checking for type of tparm args" >&5
14841 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14842
14843 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14844 if test "${with_tparm_arg+set}" = set; then
14845   withval="$with_tparm_arg"
14846   NCURSES_TPARM_ARG="$withval"
14847 else
14848   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14849 fi;
14850 echo "$as_me:14850: result: $NCURSES_TPARM_ARG" >&5
14851 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14852
14853 ### Enable compiling-in rcs id's
14854 echo "$as_me:14854: checking if RCS identifiers should be compiled-in" >&5
14855 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14856
14857 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14858 if test "${with_rcs_ids+set}" = set; then
14859   withval="$with_rcs_ids"
14860   with_rcs_ids=$withval
14861 else
14862   with_rcs_ids=no
14863 fi;
14864 echo "$as_me:14864: result: $with_rcs_ids" >&5
14865 echo "${ECHO_T}$with_rcs_ids" >&6
14866 test "x$with_rcs_ids" = xyes &&
14867 cat >>confdefs.h <<\EOF
14868 #define USE_RCS_IDS 1
14869 EOF
14870
14871 ###############################################################################
14872
14873 echo "$as_me:14873: checking format of man-pages" >&5
14874 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14875
14876 # Check whether --with-manpage-format or --without-manpage-format was given.
14877 if test "${with_manpage_format+set}" = set; then
14878   withval="$with_manpage_format"
14879   MANPAGE_FORMAT=$withval
14880 else
14881   MANPAGE_FORMAT=unknown
14882 fi;
14883
14884 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14885 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14886
14887 cf_unknown=
14888
14889 case "$MANPAGE_FORMAT" in
14890 (unknown)
14891         if test -z "$MANPATH" ; then
14892                 MANPATH="/usr/man:/usr/share/man"
14893         fi
14894
14895         # look for the 'date' man-page (it is most likely to be installed!)
14896         MANPAGE_FORMAT=
14897         cf_preform="no"
14898         cf_catonly="yes"
14899         cf_example="date"
14900
14901         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14902         for cf_dir in $MANPATH; do
14903                 test -z "$cf_dir" && cf_dir=/usr/man
14904                 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
14905                 do
14906                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14907                         if test "x$cf_test" = "x$cf_name" ; then
14908
14909                                 case "$cf_name" in
14910                                 (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
14911                                 (*.xz)  MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
14912                                 (*.gz)  MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14913                                 (*.Z)   MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14914                                 (*.0)   MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14915                                 (*)     MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14916                                 esac
14917
14918                                 case "$cf_name" in
14919                                 ($cf_dir/man*)
14920                                         cf_catonly=no
14921                                         ;;
14922                                 ($cf_dir/cat*)
14923                                         cf_preform=yes
14924                                         ;;
14925                                 esac
14926                                 break
14927                         fi
14928
14929                         # if we found a match in either man* or cat*, stop looking
14930                         if test -n "$MANPAGE_FORMAT" ; then
14931                                 cf_found=no
14932                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14933                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14934                                 case "$cf_name" in
14935                                 ($cf_dir/cat*)
14936                                         cf_found=yes
14937                                         ;;
14938                                 esac
14939                                 test "$cf_found" = yes && break
14940                         fi
14941                 done
14942                 # only check the first directory in $MANPATH where we find manpages
14943                 if test -n "$MANPAGE_FORMAT" ; then
14944                         break
14945                 fi
14946         done
14947         # if we did not find the example, just assume it is normal
14948         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14949         IFS="$ac_save_ifs"
14950         ;;
14951 (*)
14952         for cf_option in $MANPAGE_FORMAT; do
14953         case "$cf_option" in
14954         (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
14955                 ;;
14956         (*)
14957                 cf_unknown="$cf_unknown $cf_option"
14958                 ;;
14959         esac
14960         done
14961         ;;
14962 esac
14963
14964 echo "$as_me:14964: result: $MANPAGE_FORMAT" >&5
14965 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14966 if test -n "$cf_unknown" ; then
14967         { echo "$as_me:14967: WARNING: Unexpected manpage-format $cf_unknown" >&5
14968 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14969 fi
14970
14971 cf_manpage_format=no
14972 cf_manpage_inboth=no
14973 cf_manpage_so_strip=
14974 cf_manpage_compress=
14975
14976 for cf_item in $MANPAGE_FORMAT
14977 do
14978 case "$cf_item" in
14979 (catonly)
14980         cf_manpage_format=yes
14981         cf_manpage_inboth=no
14982         ;;
14983 (formatted)
14984         cf_manpage_format=yes
14985         cf_manpage_inboth=yes
14986         ;;
14987 (compress)
14988         cf_manpage_so_strip="Z"
14989         cf_manpage_compress=compress
14990         ;;
14991 (gzip)
14992         cf_manpage_so_strip="gz"
14993         cf_manpage_compress=gzip
14994         ;;
14995 (bzip2)
14996         cf_manpage_so_strip="bz2"
14997         cf_manpage_compress=bzip2
14998         ;;
14999 (xz)
15000         cf_manpage_so_strip="xz"
15001         cf_manpage_compress=xz
15002         ;;
15003 esac
15004 done
15005
15006 echo "$as_me:15006: checking for manpage renaming" >&5
15007 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
15008
15009 # Check whether --with-manpage-renames or --without-manpage-renames was given.
15010 if test "${with_manpage_renames+set}" = set; then
15011   withval="$with_manpage_renames"
15012   MANPAGE_RENAMES=$withval
15013 else
15014   MANPAGE_RENAMES=yes
15015 fi;
15016
15017 case ".$MANPAGE_RENAMES" in
15018 (.no)
15019         ;;
15020 (.|.yes)
15021         # Debian 'man' program?
15022         if test -f /etc/debian_version ; then
15023                 MANPAGE_RENAMES=man/man_db.renames
15024         else
15025                 MANPAGE_RENAMES=no
15026         fi
15027         ;;
15028 esac
15029
15030 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
15031         MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
15032 elif test "$MANPAGE_RENAMES" = no ; then
15033         :
15034 elif test ! -f "$MANPAGE_RENAMES" ; then
15035         { { echo "$as_me:15035: error: not a filename: $MANPAGE_RENAMES" >&5
15036 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
15037    { (exit 1); exit 1; }; }
15038 fi
15039
15040 echo "$as_me:15040: result: $MANPAGE_RENAMES" >&5
15041 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
15042
15043 echo "$as_me:15043: checking if manpage aliases will be installed" >&5
15044 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
15045
15046 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
15047 if test "${with_manpage_aliases+set}" = set; then
15048   withval="$with_manpage_aliases"
15049   MANPAGE_ALIASES=$withval
15050 else
15051   MANPAGE_ALIASES=yes
15052 fi;
15053
15054 echo "$as_me:15054: result: $MANPAGE_ALIASES" >&5
15055 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
15056
15057 case "x$LN_S" in
15058 (xln*)
15059         cf_use_symlinks=yes
15060         ;;
15061 (*)
15062         cf_use_symlinks=no
15063         ;;
15064 esac
15065
15066 MANPAGE_SYMLINKS=no
15067 if test "$MANPAGE_ALIASES" = yes ; then
15068 echo "$as_me:15068: checking if manpage symlinks should be used" >&5
15069 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
15070
15071 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
15072 if test "${with_manpage_symlinks+set}" = set; then
15073   withval="$with_manpage_symlinks"
15074   MANPAGE_SYMLINKS=$withval
15075 else
15076   MANPAGE_SYMLINKS=$cf_use_symlinks
15077 fi;
15078
15079 if test "$cf_use_symlinks" = no; then
15080 if test "$MANPAGE_SYMLINKS" = yes ; then
15081         { echo "$as_me:15081: WARNING: cannot make symlinks" >&5
15082 echo "$as_me: WARNING: cannot make symlinks" >&2;}
15083         MANPAGE_SYMLINKS=no
15084 fi
15085 fi
15086
15087 echo "$as_me:15087: result: $MANPAGE_SYMLINKS" >&5
15088 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
15089 fi
15090
15091 echo "$as_me:15091: checking for manpage tbl" >&5
15092 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
15093
15094 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
15095 if test "${with_manpage_tbl+set}" = set; then
15096   withval="$with_manpage_tbl"
15097   MANPAGE_TBL=$withval
15098 else
15099   MANPAGE_TBL=no
15100 fi;
15101
15102 echo "$as_me:15102: result: $MANPAGE_TBL" >&5
15103 echo "${ECHO_T}$MANPAGE_TBL" >&6
15104
15105 if test "$prefix" = "NONE" ; then
15106         cf_prefix="$ac_default_prefix"
15107 else
15108         cf_prefix="$prefix"
15109 fi
15110
15111 test ! -d man && mkdir man
15112
15113 cf_edit_man=./edit_man.sh
15114 cf_man_alias=`pwd`/man_alias.sed
15115
15116 cat >$cf_edit_man <<CF_EOF
15117 #! $SHELL
15118 # this script is generated by the configure-script CF_MAN_PAGES macro.
15119
15120 prefix="$cf_prefix"
15121 datarootdir="$datarootdir"
15122 datadir="$datadir"
15123
15124 NCURSES_MAJOR="$NCURSES_MAJOR"
15125 NCURSES_MINOR="$NCURSES_MINOR"
15126 NCURSES_PATCH="$NCURSES_PATCH"
15127
15128 NCURSES_OSPEED="$NCURSES_OSPEED"
15129 TERMINFO="$TERMINFO"
15130
15131 INSTALL="$INSTALL"
15132 INSTALL_DATA="$INSTALL_DATA"
15133
15134 transform="$program_transform_name"
15135
15136 TMP=\${TMPDIR:=/tmp}/man\$\$
15137 trap "rm -f \$TMP; exit 1" 1 2 3 15
15138 trap "rm -f \$TMP" 0
15139
15140 form=\$1
15141 shift || exit 1
15142
15143 verb=\$1
15144 shift || exit 1
15145
15146 mandir=\$1
15147 shift || exit 1
15148
15149 srcdir=\$1
15150 top_srcdir=\$srcdir/..
15151 shift || exit 1
15152
15153 if test "\$form" = normal ; then
15154         if test "$cf_manpage_format" = yes ; then
15155         if test "$cf_manpage_inboth" = no ; then
15156                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15157                 exit $?
15158         fi
15159         fi
15160         cf_subdir=\$mandir/man
15161         cf_tables=$MANPAGE_TBL
15162 else
15163         cf_subdir=\$mandir/cat
15164         cf_tables=yes
15165 fi
15166
15167 # process the list of source-files
15168 for i in "\$@" ; do
15169 case \$i in
15170 (*.orig|*.rej) ;;
15171 (*.[0-9]*)
15172         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
15173         if test "\$verb" = installing ; then
15174         if test ! -d "\$cf_subdir\${section}" ; then
15175                 mkdir -p "\$cf_subdir\$section"
15176         fi
15177         fi
15178
15179         # replace variables in man page
15180         if test ! -f "$cf_man_alias" ; then
15181 cat >>$cf_man_alias <<-CF_EOF2
15182                 s,@DATADIR@,\$datadir,g
15183                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
15184                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
15185                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
15186                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
15187                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
15188                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
15189 CF_EOF
15190
15191         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
15192         do
15193                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15194                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
15195 cat >>$cf_edit_man <<-CF_EOF
15196                 s,@$cf_NAME@,$cf_name,g
15197 CF_EOF
15198         done
15199
15200 cat >>$cf_edit_man <<CF_EOF
15201 CF_EOF2
15202                 echo "...made $cf_man_alias"
15203         fi
15204
15205         aliases=
15206         cf_source=\`basename "\$i"\`
15207         cf_full_alias=\$cf_source
15208         test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
15209         if test ! -f "\$cf_full_alias" ; then
15210                 echo ".. skipped \$cf_source"
15211                 continue
15212         fi
15213 CF_EOF
15214
15215 if test "$MANPAGE_ALIASES" != no ; then
15216 cat >>$cf_edit_man <<CF_EOF
15217         nCurses=ignore.3x
15218         cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
15219         test "$with_curses_h" = yes && nCurses=ncurses.3x
15220         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\`
15221 CF_EOF
15222 fi
15223
15224 if test "$MANPAGE_RENAMES" = no ; then
15225 cat >>$cf_edit_man <<CF_EOF
15226         # perform program transformations for section 1 man pages
15227         if test \$section = 1 ; then
15228                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
15229         else
15230                 cf_target=\$cf_subdir\${section}/\$cf_source
15231         fi
15232 CF_EOF
15233 else
15234 cat >>$cf_edit_man <<CF_EOF
15235         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15236         if test -z "\$cf_target" ; then
15237                 echo "? missing rename for \$cf_source"
15238                 cf_target="\$cf_source"
15239         fi
15240         cf_target="\$cf_subdir\${section}/\${cf_target}"
15241
15242 CF_EOF
15243 fi
15244
15245 cat >>$cf_edit_man <<CF_EOF
15246         sed     -f "$cf_man_alias" \\
15247 CF_EOF
15248
15249 if test "$MANPAGE_RENAMES" != no ; then
15250 cat >>$cf_edit_man <<CF_EOF
15251                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15252 CF_EOF
15253 else
15254 cat >>$cf_edit_man <<CF_EOF
15255                 < "\$i" >\$TMP
15256 CF_EOF
15257 fi
15258
15259 cat >>$cf_edit_man <<CF_EOF
15260 if test \$cf_tables = yes ; then
15261         tbl \$TMP >\$TMP.out
15262         mv \$TMP.out \$TMP
15263 fi
15264 CF_EOF
15265
15266 if test "$with_overwrite" != yes ; then
15267 cat >>$cf_edit_man <<CF_EOF
15268         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15269         mv \$TMP.out \$TMP
15270 CF_EOF
15271 fi
15272
15273 if test "$with_curses_h" != yes ; then
15274 cat >>$cf_edit_man <<CF_EOF
15275         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15276         mv \$TMP.out \$TMP
15277 CF_EOF
15278 fi
15279
15280 cat >>$cf_edit_man <<CF_EOF
15281         if test "\$form" = format ; then
15282                 nroff -man \$TMP >\$TMP.out
15283                 mv \$TMP.out \$TMP
15284         fi
15285 CF_EOF
15286
15287 if test -n "$cf_manpage_compress" ; then
15288 cat >>$cf_edit_man <<CF_EOF
15289         if test "\$verb" = installing ; then
15290         if ( "$cf_manpage_compress" -f \$TMP )
15291         then
15292                 mv \$TMP.$cf_manpage_so_strip \$TMP
15293         fi
15294         fi
15295         cf_target="\$cf_target.$cf_manpage_so_strip"
15296 CF_EOF
15297 fi
15298
15299 case "$MANPAGE_FORMAT" in
15300 (*BSDI*)
15301 cat >>$cf_edit_man <<CF_EOF
15302         if test "\$form" = format ; then
15303                 # BSDI installs only .0 suffixes in the cat directories
15304                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15305         fi
15306 CF_EOF
15307   ;;
15308 esac
15309
15310 cat >>$cf_edit_man <<CF_EOF
15311         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15312         extra_suffix=
15313         if test -n "$EXTRA_SUFFIX" ; then
15314                 case \$cf_target in
15315                 (*${EXTRA_SUFFIX}\$suffix)
15316                         extra_suffix="$EXTRA_SUFFIX"
15317                         ;;
15318                 esac
15319         fi
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                                         cf_alias="\${cf_alias}\${extra_suffix}"
15335
15336                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15337                                                 if test -f "\$cf_alias\${suffix}" ; then
15338                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15339                                                         then
15340                                                                 continue
15341                                                         fi
15342                                                 fi
15343                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15344 CF_EOF
15345 case "x$LN_S" in
15346 (*-f)
15347 cat >>$cf_edit_man <<CF_EOF
15348                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15349 CF_EOF
15350         ;;
15351 (*)
15352 cat >>$cf_edit_man <<CF_EOF
15353                                                 rm -f "\$cf_alias\${suffix}"
15354                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15355 CF_EOF
15356         ;;
15357 esac
15358 cat >>$cf_edit_man <<CF_EOF
15359                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15360                                                 echo ".so \$cf_source" >\$TMP
15361 CF_EOF
15362 if test -n "$cf_manpage_compress" ; then
15363 cat >>$cf_edit_man <<CF_EOF
15364                                                 if test -n "$cf_manpage_so_strip" ; then
15365                                                         "$cf_manpage_compress" -f \$TMP
15366                                                         mv \$TMP.$cf_manpage_so_strip \$TMP
15367                                                 fi
15368 CF_EOF
15369 fi
15370 cat >>$cf_edit_man <<CF_EOF
15371                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15372                                                 rm -f "\$cf_alias\${suffix}"
15373                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15374                                         fi
15375                                 done
15376                         )
15377                 )
15378         elif test "\$verb" = removing ; then
15379                 test -f "\$cf_target" && (
15380                         echo "\$verb \$cf_target"
15381                         rm -f "\$cf_target"
15382                 )
15383                 test -d "\$cf_subdir\${section}" &&
15384                 test -n "\$aliases" && (
15385                         cd "\$cf_subdir\${section}" && (
15386                                 for cf_alias in \$aliases
15387                                 do
15388                                         if test "\$section" = 1 ; then
15389                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15390                                         fi
15391                                         cf_alias="\${cf_alias}\${extra_suffix}"
15392
15393                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15394                                         rm -f "\$cf_alias\${suffix}"
15395                                 done
15396                         )
15397                 )
15398         else
15399 #               echo ".hy 0"
15400                 cat \$TMP
15401         fi
15402         ;;
15403 esac
15404 done
15405
15406 if test "$cf_manpage_inboth" = yes ; then
15407 if test "\$form" != format ; then
15408         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15409 fi
15410 fi
15411
15412 exit 0
15413 CF_EOF
15414 chmod 755 "$cf_edit_man"
15415
15416 ###############################################################################
15417
15418 ### Note that some functions (such as const) are normally disabled anyway.
15419 echo "$as_me:15419: checking if you want to build with function extensions" >&5
15420 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15421
15422 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15423 if test "${enable_ext_funcs+set}" = set; then
15424   enableval="$enable_ext_funcs"
15425   with_ext_funcs=$enableval
15426 else
15427   with_ext_funcs=yes
15428 fi;
15429 echo "$as_me:15429: result: $with_ext_funcs" >&5
15430 echo "${ECHO_T}$with_ext_funcs" >&6
15431 if test "x$with_ext_funcs" = xyes ; then
15432         NCURSES_EXT_FUNCS=1
15433
15434 cat >>confdefs.h <<\EOF
15435 #define NCURSES_EXT_FUNCS 1
15436 EOF
15437
15438 cat >>confdefs.h <<\EOF
15439 #define HAVE_ASSUME_DEFAULT_COLORS 1
15440 EOF
15441
15442 cat >>confdefs.h <<\EOF
15443 #define HAVE_CURSES_VERSION 1
15444 EOF
15445
15446 cat >>confdefs.h <<\EOF
15447 #define HAVE_HAS_KEY 1
15448 EOF
15449
15450 cat >>confdefs.h <<\EOF
15451 #define HAVE_RESIZETERM 1
15452 EOF
15453
15454 cat >>confdefs.h <<\EOF
15455 #define HAVE_RESIZE_TERM 1
15456 EOF
15457
15458 cat >>confdefs.h <<\EOF
15459 #define HAVE_TERM_ENTRY_H 1
15460 EOF
15461
15462 cat >>confdefs.h <<\EOF
15463 #define HAVE_USE_DEFAULT_COLORS 1
15464 EOF
15465
15466 cat >>confdefs.h <<\EOF
15467 #define HAVE_USE_SCREEN 1
15468 EOF
15469
15470 cat >>confdefs.h <<\EOF
15471 #define HAVE_USE_WINDOW 1
15472 EOF
15473
15474 cat >>confdefs.h <<\EOF
15475 #define HAVE_WRESIZE 1
15476 EOF
15477
15478         GENERATED_EXT_FUNCS=generated
15479         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15480 else
15481         NCURSES_EXT_FUNCS=0
15482         GENERATED_EXT_FUNCS=
15483 fi
15484
15485 echo "$as_me:15485: checking if you want to build with SCREEN extensions" >&5
15486 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15487
15488 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15489 if test "${enable_sp_funcs+set}" = set; then
15490   enableval="$enable_sp_funcs"
15491   with_sp_funcs=$enableval
15492 else
15493   with_sp_funcs=$cf_dft_ext_spfuncs
15494 fi;
15495 echo "$as_me:15495: result: $with_sp_funcs" >&5
15496 echo "${ECHO_T}$with_sp_funcs" >&6
15497 if test "x$with_sp_funcs" = xyes ; then
15498         NCURSES_SP_FUNCS=1
15499
15500 cat >>confdefs.h <<\EOF
15501 #define NCURSES_SP_FUNCS 1
15502 EOF
15503
15504 cat >>confdefs.h <<\EOF
15505 #define HAVE_TPUTS_SP 1
15506 EOF
15507
15508         GENERATED_SP_FUNCS=generated
15509 else
15510         NCURSES_SP_FUNCS=0
15511         GENERATED_SP_FUNCS=
15512 fi
15513
15514 echo "$as_me:15514: checking if you want to build with terminal-driver" >&5
15515 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15516
15517 # Check whether --enable-term-driver or --disable-term-driver was given.
15518 if test "${enable_term_driver+set}" = set; then
15519   enableval="$enable_term_driver"
15520   with_term_driver=$enableval
15521 else
15522   with_term_driver=no
15523 fi;
15524 echo "$as_me:15524: result: $with_term_driver" >&5
15525 echo "${ECHO_T}$with_term_driver" >&6
15526 if test "x$with_term_driver" = xyes ; then
15527
15528 cat >>confdefs.h <<\EOF
15529 #define USE_TERM_DRIVER 1
15530 EOF
15531
15532         if test "x$with_termlib" != xno ; then
15533                 { { echo "$as_me:15533: error: The term-driver option conflicts with the termlib option" >&5
15534 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15535    { (exit 1); exit 1; }; }
15536         fi
15537         if test "x$with_sp_funcs" != xyes ; then
15538                 { { echo "$as_me:15538: error: The term-driver option relies upon sp-funcs" >&5
15539 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15540    { (exit 1); exit 1; }; }
15541         fi
15542 fi
15543
15544 ###   use option --enable-const to turn on use of const beyond that in XSI.
15545 echo "$as_me:15545: checking for extended use of const keyword" >&5
15546 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15547
15548 # Check whether --enable-const or --disable-const was given.
15549 if test "${enable_const+set}" = set; then
15550   enableval="$enable_const"
15551   with_ext_const=$enableval
15552 else
15553   with_ext_const=$cf_dft_ext_const
15554 fi;
15555 echo "$as_me:15555: result: $with_ext_const" >&5
15556 echo "${ECHO_T}$with_ext_const" >&6
15557 NCURSES_CONST='/*nothing*/'
15558 if test "x$with_ext_const" = xyes ; then
15559         NCURSES_CONST=const
15560 fi
15561
15562 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15563 echo "$as_me:15563: checking if you want to use extended colors" >&5
15564 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15565
15566 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15567 if test "${enable_ext_colors+set}" = set; then
15568   enableval="$enable_ext_colors"
15569   with_ext_colors=$enableval
15570 else
15571   with_ext_colors=$cf_dft_ext_colors
15572 fi;
15573 echo "$as_me:15573: result: $with_ext_colors" >&5
15574 echo "${ECHO_T}$with_ext_colors" >&6
15575 NCURSES_EXT_COLORS=0
15576 if test "x$with_ext_colors" = xyes ; then
15577         if test "x$with_widec" != xyes ; then
15578                 { echo "$as_me:15578: WARNING: This option applies only to wide-character library" >&5
15579 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15580         else
15581                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15582
15583 if test "${with_abi_version+set}" != set; then
15584         case "$cf_cv_rel_version" in
15585         (5.*)
15586                 cf_cv_rel_version=6.0
15587                 cf_cv_abi_version=6
15588                 cf_cv_abi_default=6
15589                 { echo "$as_me:15589: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15590 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15591                 ;;
15592         esac
15593 fi
15594
15595                 NCURSES_EXT_COLORS=1
15596
15597 cat >>confdefs.h <<\EOF
15598 #define NCURSES_EXT_COLORS 1
15599 EOF
15600
15601 cat >>confdefs.h <<\EOF
15602 #define HAVE_ALLOC_PAIR 1
15603 EOF
15604
15605 cat >>confdefs.h <<\EOF
15606 #define HAVE_INIT_EXTENDED_COLOR 1
15607 EOF
15608
15609 cat >>confdefs.h <<\EOF
15610 #define HAVE_RESET_COLOR_PAIRS 1
15611 EOF
15612
15613         fi
15614 fi
15615
15616 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15617 echo "$as_me:15617: checking if you want to use extended mouse encoding" >&5
15618 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15619
15620 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15621 if test "${enable_ext_mouse+set}" = set; then
15622   enableval="$enable_ext_mouse"
15623   with_ext_mouse=$enableval
15624 else
15625   with_ext_mouse=$cf_dft_ext_mouse
15626 fi;
15627 echo "$as_me:15627: result: $with_ext_mouse" >&5
15628 echo "${ECHO_T}$with_ext_mouse" >&6
15629 if test "x$with_ext_mouse" = xyes ; then
15630
15631 if test "${with_abi_version+set}" != set; then
15632         case "$cf_cv_rel_version" in
15633         (5.*)
15634                 cf_cv_rel_version=6.0
15635                 cf_cv_abi_version=6
15636                 cf_cv_abi_default=6
15637                 { echo "$as_me:15637: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15638 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15639                 ;;
15640         esac
15641 fi
15642
15643 fi
15644
15645 if test $cf_cv_abi_default -le 5 ; then
15646         NCURSES_MOUSE_VERSION=1
15647 elif test $cf_cv_abi_default -le 6 ; then
15648         NCURSES_MOUSE_VERSION=2
15649 else
15650         NCURSES_MOUSE_VERSION=3
15651 fi
15652
15653 ###   use option --enable-ext-putwin to turn on extended screendumps
15654 echo "$as_me:15654: checking if you want to use extended putwin/screendump" >&5
15655 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15656
15657 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15658 if test "${enable_ext_putwin+set}" = set; then
15659   enableval="$enable_ext_putwin"
15660   with_ext_putwin=$enableval
15661 else
15662   with_ext_putwin=$cf_dft_ext_putwin
15663 fi;
15664 echo "$as_me:15664: result: $with_ext_putwin" >&5
15665 echo "${ECHO_T}$with_ext_putwin" >&6
15666 if test "x$with_ext_putwin" = xyes ; then
15667
15668 cat >>confdefs.h <<\EOF
15669 #define NCURSES_EXT_PUTWIN 1
15670 EOF
15671
15672 fi
15673
15674 echo "$as_me:15674: checking if you want \$NCURSES_NO_PADDING code" >&5
15675 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15676
15677 # Check whether --enable-no-padding or --disable-no-padding was given.
15678 if test "${enable_no_padding+set}" = set; then
15679   enableval="$enable_no_padding"
15680   with_no_padding=$enableval
15681 else
15682   with_no_padding=$with_ext_funcs
15683 fi;
15684 echo "$as_me:15684: result: $with_no_padding" >&5
15685 echo "${ECHO_T}$with_no_padding" >&6
15686 test "x$with_no_padding" = xyes &&
15687 cat >>confdefs.h <<\EOF
15688 #define NCURSES_NO_PADDING 1
15689 EOF
15690
15691 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15692 echo "$as_me:15692: checking if you want SIGWINCH handler" >&5
15693 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15694
15695 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15696 if test "${enable_sigwinch+set}" = set; then
15697   enableval="$enable_sigwinch"
15698   with_sigwinch=$enableval
15699 else
15700   with_sigwinch=$with_ext_funcs
15701 fi;
15702 echo "$as_me:15702: result: $with_sigwinch" >&5
15703 echo "${ECHO_T}$with_sigwinch" >&6
15704 test "x$with_sigwinch" = xyes &&
15705 cat >>confdefs.h <<\EOF
15706 #define USE_SIGWINCH 1
15707 EOF
15708
15709 ###   use option --enable-tcap-names to allow user to define new capabilities
15710 echo "$as_me:15710: checking if you want user-definable terminal capabilities like termcap" >&5
15711 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15712
15713 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15714 if test "${enable_tcap_names+set}" = set; then
15715   enableval="$enable_tcap_names"
15716   with_tcap_names=$enableval
15717 else
15718   with_tcap_names=$with_ext_funcs
15719 fi;
15720 echo "$as_me:15720: result: $with_tcap_names" >&5
15721 echo "${ECHO_T}$with_tcap_names" >&6
15722 NCURSES_XNAMES=0
15723 if test "x$with_tcap_names" = xyes; then
15724         NCURSES_XNAMES=1
15725
15726 cat >>confdefs.h <<\EOF
15727 #define NCURSES_XNAMES 1
15728 EOF
15729
15730 fi
15731
15732 ##############################################################################
15733
15734 echo "$as_me:15734: checking if you want to link with the pthread library" >&5
15735 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15736
15737 # Check whether --with-pthread or --without-pthread was given.
15738 if test "${with_pthread+set}" = set; then
15739   withval="$with_pthread"
15740   with_pthread=$withval
15741 else
15742   with_pthread=no
15743 fi;
15744 echo "$as_me:15744: result: $with_pthread" >&5
15745 echo "${ECHO_T}$with_pthread" >&6
15746
15747 if test "$with_pthread" != no ; then
15748         echo "$as_me:15748: checking for pthread.h" >&5
15749 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15750 if test "${ac_cv_header_pthread_h+set}" = set; then
15751   echo $ECHO_N "(cached) $ECHO_C" >&6
15752 else
15753   cat >"conftest.$ac_ext" <<_ACEOF
15754 #line 15754 "configure"
15755 #include "confdefs.h"
15756 #include <pthread.h>
15757 _ACEOF
15758 if { (eval echo "$as_me:15758: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15759   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15760   ac_status=$?
15761   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15762   rm -f conftest.er1
15763   cat conftest.err >&5
15764   echo "$as_me:15764: \$? = $ac_status" >&5
15765   (exit "$ac_status"); } >/dev/null; then
15766   if test -s conftest.err; then
15767     ac_cpp_err=$ac_c_preproc_warn_flag
15768   else
15769     ac_cpp_err=
15770   fi
15771 else
15772   ac_cpp_err=yes
15773 fi
15774 if test -z "$ac_cpp_err"; then
15775   ac_cv_header_pthread_h=yes
15776 else
15777   echo "$as_me: failed program was:" >&5
15778   cat "conftest.$ac_ext" >&5
15779   ac_cv_header_pthread_h=no
15780 fi
15781 rm -f conftest.err "conftest.$ac_ext"
15782 fi
15783 echo "$as_me:15783: result: $ac_cv_header_pthread_h" >&5
15784 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15785 if test "$ac_cv_header_pthread_h" = yes; then
15786
15787 cat >>confdefs.h <<\EOF
15788 #define HAVE_PTHREADS_H 1
15789 EOF
15790
15791         for cf_lib_pthread in pthread c_r
15792         do
15793             echo "$as_me:15793: checking if we can link with the $cf_lib_pthread library" >&5
15794 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15795             cf_save_LIBS="$LIBS"
15796
15797 cf_add_libs="$LIBS"
15798 # reverse order
15799 cf_add_0lib=
15800 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15801 # filter duplicates
15802 for cf_add_1lib in $cf_add_0lib; do
15803         for cf_add_2lib in $cf_add_libs; do
15804                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15805                         cf_add_1lib=
15806                         break
15807                 fi
15808         done
15809         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15810 done
15811 LIBS="$cf_add_libs"
15812
15813             cat >"conftest.$ac_ext" <<_ACEOF
15814 #line 15814 "configure"
15815 #include "confdefs.h"
15816
15817 #include <pthread.h>
15818
15819 int
15820 main (void)
15821 {
15822
15823                 int rc = pthread_create(0,0,0,0);
15824                 int r2 = pthread_mutexattr_settype(0, 0);
15825
15826   ;
15827   return 0;
15828 }
15829 _ACEOF
15830 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15831 if { (eval echo "$as_me:15831: \"$ac_link\"") >&5
15832   (eval $ac_link) 2>&5
15833   ac_status=$?
15834   echo "$as_me:15834: \$? = $ac_status" >&5
15835   (exit "$ac_status"); } &&
15836          { ac_try='test -s "conftest$ac_exeext"'
15837   { (eval echo "$as_me:15837: \"$ac_try\"") >&5
15838   (eval $ac_try) 2>&5
15839   ac_status=$?
15840   echo "$as_me:15840: \$? = $ac_status" >&5
15841   (exit "$ac_status"); }; }; then
15842   with_pthread=yes
15843 else
15844   echo "$as_me: failed program was:" >&5
15845 cat "conftest.$ac_ext" >&5
15846 with_pthread=no
15847 fi
15848 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15849             LIBS="$cf_save_LIBS"
15850             echo "$as_me:15850: result: $with_pthread" >&5
15851 echo "${ECHO_T}$with_pthread" >&6
15852             test "$with_pthread" = yes && break
15853         done
15854
15855         if test "$with_pthread" = yes ; then
15856
15857 cf_add_libs="$LIBS"
15858 # reverse order
15859 cf_add_0lib=
15860 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15861 # filter duplicates
15862 for cf_add_1lib in $cf_add_0lib; do
15863         for cf_add_2lib in $cf_add_libs; do
15864                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15865                         cf_add_1lib=
15866                         break
15867                 fi
15868         done
15869         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15870 done
15871 LIBS="$cf_add_libs"
15872
15873 cat >>confdefs.h <<\EOF
15874 #define HAVE_LIBPTHREADS 1
15875 EOF
15876
15877         else
15878             { { echo "$as_me:15878: error: Cannot link with pthread library" >&5
15879 echo "$as_me: error: Cannot link with pthread library" >&2;}
15880    { (exit 1); exit 1; }; }
15881         fi
15882
15883 fi
15884
15885 fi
15886
15887 if test "x$with_pthread" != xno; then
15888         echo "$as_me:15888: checking for pthread_kill" >&5
15889 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15890 if test "${ac_cv_func_pthread_kill+set}" = set; then
15891   echo $ECHO_N "(cached) $ECHO_C" >&6
15892 else
15893   cat >"conftest.$ac_ext" <<_ACEOF
15894 #line 15894 "configure"
15895 #include "confdefs.h"
15896 #define pthread_kill autoconf_temporary
15897 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15898 #undef pthread_kill
15899
15900 #ifdef __cplusplus
15901 extern "C"
15902 #endif
15903
15904 /* We use char because int might match the return type of a gcc2
15905    builtin and then its argument prototype would still apply.  */
15906 char pthread_kill (void);
15907
15908 int
15909 main (void)
15910 {
15911
15912 /* The GNU C library defines stubs for functions which it implements
15913     to always fail with ENOSYS.  Some functions are actually named
15914     something starting with __ and the normal name is an alias.  */
15915 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15916 #error found stub for pthread_kill
15917 #endif
15918
15919         return pthread_kill ();
15920   ;
15921   return 0;
15922 }
15923 _ACEOF
15924 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15925 if { (eval echo "$as_me:15925: \"$ac_link\"") >&5
15926   (eval $ac_link) 2>&5
15927   ac_status=$?
15928   echo "$as_me:15928: \$? = $ac_status" >&5
15929   (exit "$ac_status"); } &&
15930          { ac_try='test -s "conftest$ac_exeext"'
15931   { (eval echo "$as_me:15931: \"$ac_try\"") >&5
15932   (eval $ac_try) 2>&5
15933   ac_status=$?
15934   echo "$as_me:15934: \$? = $ac_status" >&5
15935   (exit "$ac_status"); }; }; then
15936   ac_cv_func_pthread_kill=yes
15937 else
15938   echo "$as_me: failed program was:" >&5
15939 cat "conftest.$ac_ext" >&5
15940 ac_cv_func_pthread_kill=no
15941 fi
15942 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15943 fi
15944 echo "$as_me:15944: result: $ac_cv_func_pthread_kill" >&5
15945 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15946 if test "$ac_cv_func_pthread_kill" = yes; then
15947
15948                 echo "$as_me:15948: checking if you want to allow EINTR in wgetch with pthreads" >&5
15949 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15950
15951 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15952 if test "${enable_pthreads_eintr+set}" = set; then
15953   enableval="$enable_pthreads_eintr"
15954   use_pthreads_eintr=$enableval
15955 else
15956   use_pthreads_eintr=no
15957 fi;
15958                 echo "$as_me:15958: result: $use_pthreads_eintr" >&5
15959 echo "${ECHO_T}$use_pthreads_eintr" >&6
15960                 if test "x$use_pthreads_eintr" = xyes ; then
15961
15962 cat >>confdefs.h <<\EOF
15963 #define USE_PTHREADS_EINTR 1
15964 EOF
15965
15966                 fi
15967 fi
15968
15969         echo "$as_me:15969: checking if you want to use weak-symbols for pthreads" >&5
15970 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15971
15972 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15973 if test "${enable_weak_symbols+set}" = set; then
15974   enableval="$enable_weak_symbols"
15975   use_weak_symbols=$enableval
15976 else
15977   use_weak_symbols=no
15978 fi;
15979         echo "$as_me:15979: result: $use_weak_symbols" >&5
15980 echo "${ECHO_T}$use_weak_symbols" >&6
15981         if test "x$use_weak_symbols" = xyes ; then
15982
15983 echo "$as_me:15983: checking if $CC supports weak symbols" >&5
15984 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15985 if test "${cf_cv_weak_symbols+set}" = set; then
15986   echo $ECHO_N "(cached) $ECHO_C" >&6
15987 else
15988
15989 cat >"conftest.$ac_ext" <<_ACEOF
15990 #line 15990 "configure"
15991 #include "confdefs.h"
15992
15993 #include <stdio.h>
15994 int
15995 main (void)
15996 {
15997
15998 #if defined(__GNUC__)
15999 #  if defined __USE_ISOC99
16000 #    define _cat_pragma(exp)    _Pragma(#exp)
16001 #    define _weak_pragma(exp)   _cat_pragma(weak name)
16002 #  else
16003 #    define _weak_pragma(exp)
16004 #  endif
16005 #  define _declare(name)        __extension__ extern __typeof__(name) name
16006 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
16007 #endif
16008
16009 weak_symbol(fopen);
16010
16011   ;
16012   return 0;
16013 }
16014 _ACEOF
16015 rm -f "conftest.$ac_objext"
16016 if { (eval echo "$as_me:16016: \"$ac_compile\"") >&5
16017   (eval $ac_compile) 2>&5
16018   ac_status=$?
16019   echo "$as_me:16019: \$? = $ac_status" >&5
16020   (exit "$ac_status"); } &&
16021          { ac_try='test -s "conftest.$ac_objext"'
16022   { (eval echo "$as_me:16022: \"$ac_try\"") >&5
16023   (eval $ac_try) 2>&5
16024   ac_status=$?
16025   echo "$as_me:16025: \$? = $ac_status" >&5
16026   (exit "$ac_status"); }; }; then
16027   cf_cv_weak_symbols=yes
16028 else
16029   echo "$as_me: failed program was:" >&5
16030 cat "conftest.$ac_ext" >&5
16031 cf_cv_weak_symbols=no
16032 fi
16033 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16034
16035 fi
16036 echo "$as_me:16036: result: $cf_cv_weak_symbols" >&5
16037 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16038
16039         else
16040                 cf_cv_weak_symbols=no
16041         fi
16042
16043         if test "x$cf_cv_weak_symbols" = xyes ; then
16044
16045 cat >>confdefs.h <<\EOF
16046 #define USE_WEAK_SYMBOLS 1
16047 EOF
16048
16049         fi
16050 fi
16051
16052 PTHREAD=
16053 if test "x$with_pthread" = "xyes" ; then
16054
16055 cat >>confdefs.h <<\EOF
16056 #define USE_PTHREADS 1
16057 EOF
16058
16059         enable_reentrant=yes
16060         if test "x$cf_cv_weak_symbols" = xyes ; then
16061                 PTHREAD=-lpthread
16062
16063 cf_add_libs="$PRIVATE_LIBS"
16064 # reverse order
16065 cf_add_0lib=
16066 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16067 # filter duplicates
16068 for cf_add_1lib in $cf_add_0lib; do
16069         for cf_add_2lib in $cf_add_libs; do
16070                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16071                         cf_add_1lib=
16072                         break
16073                 fi
16074         done
16075         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16076 done
16077 PRIVATE_LIBS="$cf_add_libs"
16078
16079         fi
16080 fi
16081
16082 # Reentrant code has to be opaque; there's little advantage to making ncurses
16083 # opaque outside of that, so there is no --enable-opaque option.  We can use
16084 # this option without --with-pthreads, but this will be always set for
16085 # pthreads.
16086 echo "$as_me:16086: checking if you want reentrant code" >&5
16087 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16088
16089 # Check whether --enable-reentrant or --disable-reentrant was given.
16090 if test "${enable_reentrant+set}" = set; then
16091   enableval="$enable_reentrant"
16092   with_reentrant=$enableval
16093 else
16094   with_reentrant=no
16095 fi;
16096 echo "$as_me:16096: result: $with_reentrant" >&5
16097 echo "${ECHO_T}$with_reentrant" >&6
16098 if test "x$with_reentrant" = xyes ; then
16099         cf_cv_enable_reentrant=1
16100         cf_cv_enable_opaque="NCURSES_INTERNALS"
16101         NCURSES_SIZE_T=int
16102         if test "x$cf_cv_weak_symbols" = xyes ; then
16103
16104 # remove pthread library from $LIBS
16105 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
16106
16107 cf_add_libs="$TEST_LIBS"
16108 # reverse order
16109 cf_add_0lib=
16110 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16111 # filter duplicates
16112 for cf_add_1lib in $cf_add_0lib; do
16113         for cf_add_2lib in $cf_add_libs; do
16114                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16115                         cf_add_1lib=
16116                         break
16117                 fi
16118         done
16119         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16120 done
16121 TEST_LIBS="$cf_add_libs"
16122
16123 cf_add_libs="$TEST_LIBS2"
16124 # reverse order
16125 cf_add_0lib=
16126 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16127 # filter duplicates
16128 for cf_add_1lib in $cf_add_0lib; do
16129         for cf_add_2lib in $cf_add_libs; do
16130                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16131                         cf_add_1lib=
16132                         break
16133                 fi
16134         done
16135         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16136 done
16137 TEST_LIBS2="$cf_add_libs"
16138
16139 cf_add_libs="$PRIVATE_LIBS"
16140 # reverse order
16141 cf_add_0lib=
16142 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16143 # filter duplicates
16144 for cf_add_1lib in $cf_add_0lib; do
16145         for cf_add_2lib in $cf_add_libs; do
16146                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16147                         cf_add_1lib=
16148                         break
16149                 fi
16150         done
16151         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16152 done
16153 PRIVATE_LIBS="$cf_add_libs"
16154
16155         else
16156                 # when not using weak symbols but with_reentrant,
16157                 # add 't' to the library suffix on all platforms
16158                 # except cygwin, where we only do that if ALSO
16159                 # compiling with full thread support.
16160                 case "$host" in
16161                 (*cygwin* | *msys*)
16162                         if test "$with_pthread" = "yes" ; then
16163                                 if test "x$disable_lib_suffixes" = "xno" ; then
16164                                         LIB_SUFFIX="t${LIB_SUFFIX}"
16165                                 fi
16166                         fi ;;
16167                 (*)
16168                         if test "x$disable_lib_suffixes" = "xno" ; then
16169                                 LIB_SUFFIX="t${LIB_SUFFIX}"
16170                         fi
16171                         ;;
16172                 esac
16173         fi
16174
16175 cat >>confdefs.h <<\EOF
16176 #define USE_REENTRANT 1
16177 EOF
16178
16179 if test "${with_abi_version+set}" != set; then
16180         case "$cf_cv_rel_version" in
16181         (5.*)
16182                 cf_cv_rel_version=6.0
16183                 cf_cv_abi_version=6
16184                 cf_cv_abi_default=6
16185                 { echo "$as_me:16185: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16186 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16187                 ;;
16188         esac
16189 fi
16190
16191 else
16192         cf_cv_enable_reentrant=0
16193         cf_cv_enable_opaque="NCURSES_OPAQUE"
16194         NCURSES_SIZE_T=$cf_dft_ordinate_type
16195 fi
16196
16197 echo "$as_me:16197: checking if you want opaque curses-library structures" >&5
16198 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
16199
16200 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16201 if test "${enable_opaque_curses+set}" = set; then
16202   enableval="$enable_opaque_curses"
16203   test "$enableval" != yes && enableval=no
16204         if test "$enableval" != "no" ; then
16205     enable_opaque_curses=yes
16206         else
16207
16208          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16209          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16210
16211         fi
16212 else
16213   enableval=no
16214
16215          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16216          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16217
16218 fi;
16219 echo "$as_me:16219: result: $enable_opaque_curses" >&5
16220 echo "${ECHO_T}$enable_opaque_curses" >&6
16221
16222 test "$cf_cv_enable_reentrant" = 1 && \
16223 test "$enable_opaque_curses" = no && \
16224 { { echo "$as_me:16224: error: reentrant configuration requires opaque library" >&5
16225 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16226    { (exit 1); exit 1; }; }
16227
16228 echo "$as_me:16228: checking if you want opaque form-library structures" >&5
16229 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
16230
16231 # Check whether --enable-opaque-form or --disable-opaque-form was given.
16232 if test "${enable_opaque_form+set}" = set; then
16233   enableval="$enable_opaque_form"
16234   enable_opaque_form=yes
16235 else
16236   enable_opaque_form=no
16237 fi;
16238 echo "$as_me:16238: result: $enable_opaque_form" >&5
16239 echo "${ECHO_T}$enable_opaque_form" >&6
16240
16241 echo "$as_me:16241: checking if you want opaque menu-library structures" >&5
16242 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
16243
16244 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16245 if test "${enable_opaque_menu+set}" = set; then
16246   enableval="$enable_opaque_menu"
16247   enable_opaque_menu=yes
16248 else
16249   enable_opaque_menu=no
16250 fi;
16251 echo "$as_me:16251: result: $enable_opaque_menu" >&5
16252 echo "${ECHO_T}$enable_opaque_menu" >&6
16253
16254 echo "$as_me:16254: checking if you want opaque panel-library structures" >&5
16255 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
16256
16257 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16258 if test "${enable_opaque_panel+set}" = set; then
16259   enableval="$enable_opaque_panel"
16260   enable_opaque_panel=yes
16261 else
16262   enable_opaque_panel=no
16263 fi;
16264 echo "$as_me:16264: result: $enable_opaque_panel" >&5
16265 echo "${ECHO_T}$enable_opaque_panel" >&6
16266
16267 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16268 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16269 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16270 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16271
16272 ### Allow using a different wrap-prefix
16273 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16274         echo "$as_me:16274: checking for prefix used to wrap public variables" >&5
16275 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16276
16277 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16278 if test "${with_wrap_prefix+set}" = set; then
16279   withval="$with_wrap_prefix"
16280   NCURSES_WRAP_PREFIX=$withval
16281 else
16282   NCURSES_WRAP_PREFIX=_nc_
16283 fi;
16284         echo "$as_me:16284: result: $NCURSES_WRAP_PREFIX" >&5
16285 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16286 else
16287         NCURSES_WRAP_PREFIX=_nc_
16288 fi
16289
16290 cat >>confdefs.h <<EOF
16291 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16292 EOF
16293
16294 ###############################################################################
16295 # These options are relatively safe to experiment with.
16296
16297 echo "$as_me:16297: checking if you want all development code" >&5
16298 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16299
16300 # Check whether --with-develop or --without-develop was given.
16301 if test "${with_develop+set}" = set; then
16302   withval="$with_develop"
16303   with_develop=$withval
16304 else
16305   with_develop=no
16306 fi;
16307 echo "$as_me:16307: result: $with_develop" >&5
16308 echo "${ECHO_T}$with_develop" >&6
16309
16310 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16311 echo "$as_me:16311: checking if you want hard-tabs code" >&5
16312 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16313
16314 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16315 if test "${enable_hard_tabs+set}" = set; then
16316   enableval="$enable_hard_tabs"
16317
16318 else
16319   enable_hard_tabs=$with_develop
16320 fi;
16321 echo "$as_me:16321: result: $enable_hard_tabs" >&5
16322 echo "${ECHO_T}$enable_hard_tabs" >&6
16323 test "x$enable_hard_tabs" = xyes &&
16324 cat >>confdefs.h <<\EOF
16325 #define USE_HARD_TABS 1
16326 EOF
16327
16328 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16329 echo "$as_me:16329: checking if you want limited support for xmc" >&5
16330 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16331
16332 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16333 if test "${enable_xmc_glitch+set}" = set; then
16334   enableval="$enable_xmc_glitch"
16335
16336 else
16337   enable_xmc_glitch=$with_develop
16338 fi;
16339 echo "$as_me:16339: result: $enable_xmc_glitch" >&5
16340 echo "${ECHO_T}$enable_xmc_glitch" >&6
16341 test "x$enable_xmc_glitch" = xyes &&
16342 cat >>confdefs.h <<\EOF
16343 #define USE_XMC_SUPPORT 1
16344 EOF
16345
16346 ###############################################################################
16347 # These are just experimental, probably should not be in a package:
16348
16349 echo "$as_me:16349: checking if you do not want to assume colors are white-on-black" >&5
16350 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16351
16352 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16353 if test "${enable_assumed_color+set}" = set; then
16354   enableval="$enable_assumed_color"
16355   with_assumed_color=$enableval
16356 else
16357   with_assumed_color=yes
16358 fi;
16359 echo "$as_me:16359: result: $with_assumed_color" >&5
16360 echo "${ECHO_T}$with_assumed_color" >&6
16361 test "x$with_assumed_color" = xyes &&
16362 cat >>confdefs.h <<\EOF
16363 #define USE_ASSUMED_COLOR 1
16364 EOF
16365
16366 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16367 echo "$as_me:16367: checking if you want hashmap scrolling-optimization code" >&5
16368 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16369
16370 # Check whether --enable-hashmap or --disable-hashmap was given.
16371 if test "${enable_hashmap+set}" = set; then
16372   enableval="$enable_hashmap"
16373   with_hashmap=$enableval
16374 else
16375   with_hashmap=yes
16376 fi;
16377 echo "$as_me:16377: result: $with_hashmap" >&5
16378 echo "${ECHO_T}$with_hashmap" >&6
16379 test "x$with_hashmap" = xyes &&
16380 cat >>confdefs.h <<\EOF
16381 #define USE_HASHMAP 1
16382 EOF
16383
16384 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16385 echo "$as_me:16385: checking if you want colorfgbg code" >&5
16386 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16387
16388 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16389 if test "${enable_colorfgbg+set}" = set; then
16390   enableval="$enable_colorfgbg"
16391   with_colorfgbg=$enableval
16392 else
16393   with_colorfgbg=no
16394 fi;
16395 echo "$as_me:16395: result: $with_colorfgbg" >&5
16396 echo "${ECHO_T}$with_colorfgbg" >&6
16397 test "x$with_colorfgbg" = xyes &&
16398 cat >>confdefs.h <<\EOF
16399 #define USE_COLORFGBG 1
16400 EOF
16401
16402 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16403 echo "$as_me:16403: checking if you want to use gcc -fvisibility option" >&5
16404 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16405
16406 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16407 if test "${enable_fvisibility+set}" = set; then
16408   enableval="$enable_fvisibility"
16409   cf_with_fvisibility=$enableval
16410 else
16411   cf_with_fvisibility=no
16412 fi;
16413 echo "$as_me:16413: result: $cf_with_fvisibility" >&5
16414 echo "${ECHO_T}$cf_with_fvisibility" >&6
16415
16416 NCURSES_IMPEXP=
16417 NCURSES_CXX_IMPEXP=
16418 if test "x$cf_with_fvisibility" = xyes; then
16419
16420 echo "$as_me:16420: checking if $CC -fvisibility=hidden option works" >&5
16421 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16422 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16423   echo $ECHO_N "(cached) $ECHO_C" >&6
16424 else
16425
16426     cf_save_cflags="$CFLAGS"
16427     CFLAGS="$CFLAGS -fvisibility=hidden"
16428     cat >"conftest.$ac_ext" <<_ACEOF
16429 #line 16429 "configure"
16430 #include "confdefs.h"
16431
16432 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16433
16434 int
16435 main (void)
16436 {
16437
16438         if (somefunc()) return 1;
16439
16440   ;
16441   return 0;
16442 }
16443 _ACEOF
16444 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16445 if { (eval echo "$as_me:16445: \"$ac_link\"") >&5
16446   (eval $ac_link) 2>&5
16447   ac_status=$?
16448   echo "$as_me:16448: \$? = $ac_status" >&5
16449   (exit "$ac_status"); } &&
16450          { ac_try='test -s "conftest$ac_exeext"'
16451   { (eval echo "$as_me:16451: \"$ac_try\"") >&5
16452   (eval $ac_try) 2>&5
16453   ac_status=$?
16454   echo "$as_me:16454: \$? = $ac_status" >&5
16455   (exit "$ac_status"); }; }; then
16456   cf_cv_fvisibility_hidden=yes
16457 else
16458   echo "$as_me: failed program was:" >&5
16459 cat "conftest.$ac_ext" >&5
16460 cf_cv_fvisibility_hidden=no
16461 fi
16462 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16463     CFLAGS=$cf_save_cflags
16464
16465 fi
16466 echo "$as_me:16466: result: $cf_cv_fvisibility_hidden" >&5
16467 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16468
16469         if test "x$cf_cv_fvisibility_hidden" = xyes
16470         then
16471
16472 cf_fix_cppflags=no
16473 cf_new_cflags=
16474 cf_new_cppflags=
16475 cf_new_extra_cppflags=
16476
16477 for cf_add_cflags in -fvisibility=hidden
16478 do
16479 case "$cf_fix_cppflags" in
16480 (no)
16481         case "$cf_add_cflags" in
16482         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16483                 case "$cf_add_cflags" in
16484                 (-D*)
16485                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16486
16487                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16488                                 && test -z "${cf_tst_cflags}" \
16489                                 && cf_fix_cppflags=yes
16490
16491                         if test "$cf_fix_cppflags" = yes ; then
16492
16493         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16494         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16495
16496                                 continue
16497                         elif test "${cf_tst_cflags}" = "\"'" ; then
16498
16499         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16500         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16501
16502                                 continue
16503                         fi
16504                         ;;
16505                 esac
16506                 case "$CPPFLAGS" in
16507                 (*$cf_add_cflags)
16508                         ;;
16509                 (*)
16510                         case "$cf_add_cflags" in
16511                         (-D*)
16512                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16513
16514 CPPFLAGS=`echo "$CPPFLAGS" | \
16515         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16516                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16517
16518                                 ;;
16519                         esac
16520
16521         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16522         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16523
16524                         ;;
16525                 esac
16526                 ;;
16527         (*)
16528
16529         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16530         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16531
16532                 ;;
16533         esac
16534         ;;
16535 (yes)
16536
16537         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16538         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16539
16540         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16541
16542         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16543                 && test -z "${cf_tst_cflags}" \
16544                 && cf_fix_cppflags=no
16545         ;;
16546 esac
16547 done
16548
16549 if test -n "$cf_new_cflags" ; then
16550
16551         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16552         CFLAGS="${CFLAGS}$cf_new_cflags"
16553
16554 fi
16555
16556 if test -n "$cf_new_cppflags" ; then
16557
16558         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16559         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16560
16561 fi
16562
16563 if test -n "$cf_new_extra_cppflags" ; then
16564
16565         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16566         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16567
16568 fi
16569
16570                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16571         fi
16572         if test -n "$CXX"
16573         then
16574                 ac_ext=cc
16575 ac_cpp='$CXXCPP $CPPFLAGS'
16576 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16577 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16578 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16579 ac_main_return="return"
16580
16581 echo "$as_me:16581: checking if $CXX -fvisibility=hidden option works" >&5
16582 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16583 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16584   echo $ECHO_N "(cached) $ECHO_C" >&6
16585 else
16586
16587     cf_save_cflags="$CXXFLAGS"
16588     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16589     cat >"conftest.$ac_ext" <<_ACEOF
16590 #line 16590 "configure"
16591 #include "confdefs.h"
16592
16593 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16594
16595 int
16596 main (void)
16597 {
16598
16599         if (somefunc()) return 1;
16600
16601   ;
16602   return 0;
16603 }
16604 _ACEOF
16605 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16606 if { (eval echo "$as_me:16606: \"$ac_link\"") >&5
16607   (eval $ac_link) 2>&5
16608   ac_status=$?
16609   echo "$as_me:16609: \$? = $ac_status" >&5
16610   (exit "$ac_status"); } &&
16611          { ac_try='test -s "conftest$ac_exeext"'
16612   { (eval echo "$as_me:16612: \"$ac_try\"") >&5
16613   (eval $ac_try) 2>&5
16614   ac_status=$?
16615   echo "$as_me:16615: \$? = $ac_status" >&5
16616   (exit "$ac_status"); }; }; then
16617   cf_cv_fvisibility_hidden2=yes
16618 else
16619   echo "$as_me: failed program was:" >&5
16620 cat "conftest.$ac_ext" >&5
16621 cf_cv_fvisibility_hidden2=no
16622 fi
16623 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16624     CXXFLAGS=$cf_save_cflags
16625
16626 fi
16627 echo "$as_me:16627: result: $cf_cv_fvisibility_hidden2" >&5
16628 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16629
16630                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16631                 then
16632
16633 cf_save_CXXFLAGS="$CFLAGS"
16634 CFLAGS="$CXXFLAGS"
16635
16636 cf_fix_cppflags=no
16637 cf_new_cflags=
16638 cf_new_cppflags=
16639 cf_new_extra_cppflags=
16640
16641 for cf_add_cflags in -fvisibility=hidden
16642 do
16643 case "$cf_fix_cppflags" in
16644 (no)
16645         case "$cf_add_cflags" in
16646         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16647                 case "$cf_add_cflags" in
16648                 (-D*)
16649                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16650
16651                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16652                                 && test -z "${cf_tst_cflags}" \
16653                                 && cf_fix_cppflags=yes
16654
16655                         if test "$cf_fix_cppflags" = yes ; then
16656
16657         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16658         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16659
16660                                 continue
16661                         elif test "${cf_tst_cflags}" = "\"'" ; then
16662
16663         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16664         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16665
16666                                 continue
16667                         fi
16668                         ;;
16669                 esac
16670                 case "$CPPFLAGS" in
16671                 (*$cf_add_cflags)
16672                         ;;
16673                 (*)
16674                         case "$cf_add_cflags" in
16675                         (-D*)
16676                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16677
16678 CPPFLAGS=`echo "$CPPFLAGS" | \
16679         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16680                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16681
16682                                 ;;
16683                         esac
16684
16685         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16686         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16687
16688                         ;;
16689                 esac
16690                 ;;
16691         (*)
16692
16693         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16694         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16695
16696                 ;;
16697         esac
16698         ;;
16699 (yes)
16700
16701         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16702         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16703
16704         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16705
16706         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16707                 && test -z "${cf_tst_cflags}" \
16708                 && cf_fix_cppflags=no
16709         ;;
16710 esac
16711 done
16712
16713 if test -n "$cf_new_cflags" ; then
16714
16715         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16716         CFLAGS="${CFLAGS}$cf_new_cflags"
16717
16718 fi
16719
16720 if test -n "$cf_new_cppflags" ; then
16721
16722         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16723         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16724
16725 fi
16726
16727 if test -n "$cf_new_extra_cppflags" ; then
16728
16729         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16730         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16731
16732 fi
16733
16734 CXXFLAGS="$CFLAGS"
16735 CFLAGS="$cf_save_CXXFLAGS"
16736
16737                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16738                 fi
16739                 ac_ext=c
16740 ac_cpp='$CPP $CPPFLAGS'
16741 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16742 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16743 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16744 ac_main_return="return"
16745
16746         fi
16747 fi
16748
16749 ###   use option --enable-interop to turn on use of bindings used for interop
16750 echo "$as_me:16750: checking if you want interop bindings" >&5
16751 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16752
16753 # Check whether --enable-interop or --disable-interop was given.
16754 if test "${enable_interop+set}" = set; then
16755   enableval="$enable_interop"
16756   with_exp_interop=$enableval
16757 else
16758   with_exp_interop=$cf_dft_interop
16759 fi;
16760 echo "$as_me:16760: result: $with_exp_interop" >&5
16761 echo "${ECHO_T}$with_exp_interop" >&6
16762
16763 NCURSES_INTEROP_FUNCS=0
16764 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16765
16766 echo "$as_me:16766: checking if you want experimental safe-sprintf code" >&5
16767 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16768
16769 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16770 if test "${enable_safe_sprintf+set}" = set; then
16771   enableval="$enable_safe_sprintf"
16772   with_safe_sprintf=$enableval
16773 else
16774   with_safe_sprintf=no
16775 fi;
16776 echo "$as_me:16776: result: $with_safe_sprintf" >&5
16777 echo "${ECHO_T}$with_safe_sprintf" >&6
16778
16779 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16780 # when hashmap is used scroll hints are useless
16781 if test "$with_hashmap" = no ; then
16782 echo "$as_me:16782: checking if you want to experiment without scrolling-hints code" >&5
16783 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16784
16785 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16786 if test "${enable_scroll_hints+set}" = set; then
16787   enableval="$enable_scroll_hints"
16788   with_scroll_hints=$enableval
16789 else
16790   with_scroll_hints=yes
16791 fi;
16792 echo "$as_me:16792: result: $with_scroll_hints" >&5
16793 echo "${ECHO_T}$with_scroll_hints" >&6
16794 test "x$with_scroll_hints" = xyes &&
16795 cat >>confdefs.h <<\EOF
16796 #define USE_SCROLL_HINTS 1
16797 EOF
16798
16799 fi
16800
16801 echo "$as_me:16801: checking if you want wgetch-events code" >&5
16802 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16803
16804 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16805 if test "${enable_wgetch_events+set}" = set; then
16806   enableval="$enable_wgetch_events"
16807   with_wgetch_events=$enableval
16808 else
16809   with_wgetch_events=no
16810 fi;
16811 echo "$as_me:16811: result: $with_wgetch_events" >&5
16812 echo "${ECHO_T}$with_wgetch_events" >&6
16813 if test "x$with_wgetch_events" = xyes ; then
16814
16815 cat >>confdefs.h <<\EOF
16816 #define NCURSES_WGETCH_EVENTS 1
16817 EOF
16818
16819         NCURSES_WGETCH_EVENTS=1
16820 else
16821         NCURSES_WGETCH_EVENTS=0
16822 fi
16823
16824 case "$cf_cv_system_name" in
16825 (*mingw32*|*mingw64*|*-msvc*)
16826         echo "$as_me:16826: checking if you want experimental-Windows driver" >&5
16827 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16828
16829 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16830 if test "${enable_exp_win32+set}" = set; then
16831   enableval="$enable_exp_win32"
16832   with_exp_win32=$enableval
16833 else
16834   with_exp_win32=no
16835 fi;
16836         echo "$as_me:16836: result: $with_exp_win32" >&5
16837 echo "${ECHO_T}$with_exp_win32" >&6
16838         if test "x$with_exp_win32" = xyes
16839         then
16840
16841 cat >>confdefs.h <<\EOF
16842 #define EXP_WIN32_DRIVER 1
16843 EOF
16844
16845                 EXP_WIN32_DRIVER=1
16846                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16847         else
16848                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16849                 EXP_WIN32_DRIVER=0
16850         fi
16851         ;;
16852 (*)
16853         EXP_WIN32_DRIVER=0
16854         INTERNALS_HDR=
16855         ;;
16856 esac
16857
16858 ###############################################################################
16859
16860 ###     use option --disable-echo to suppress full display compiling commands
16861
16862 echo "$as_me:16862: checking if you want to see long compiling messages" >&5
16863 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16864
16865 # Check whether --enable-echo or --disable-echo was given.
16866 if test "${enable_echo+set}" = set; then
16867   enableval="$enable_echo"
16868   test "$enableval" != no && enableval=yes
16869         if test "$enableval" != "yes" ; then
16870
16871         ECHO_LT='--silent'
16872         ECHO_LD='@echo linking $@;'
16873         RULE_CC='@echo compiling $<'
16874         SHOW_CC='@echo compiling $@'
16875         ECHO_CC='@'
16876
16877         else
16878
16879         ECHO_LT=''
16880         ECHO_LD=''
16881         RULE_CC=''
16882         SHOW_CC=''
16883         ECHO_CC=''
16884
16885         fi
16886 else
16887   enableval=yes
16888
16889         ECHO_LT=''
16890         ECHO_LD=''
16891         RULE_CC=''
16892         SHOW_CC=''
16893         ECHO_CC=''
16894
16895 fi;
16896 echo "$as_me:16896: result: $enableval" >&5
16897 echo "${ECHO_T}$enableval" >&6
16898
16899 if test "x$enable_echo" = xyes; then
16900         ECHO_LINK=
16901 else
16902         ECHO_LINK='@ echo linking $@ ... ;'
16903         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16904         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16905 fi
16906
16907 # --disable-stripping is used for debugging
16908
16909 echo "$as_me:16909: checking if you want to install stripped executables" >&5
16910 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16911
16912 # Check whether --enable-stripping or --disable-stripping was given.
16913 if test "${enable_stripping+set}" = set; then
16914   enableval="$enable_stripping"
16915   test "$enableval" != no && enableval=yes
16916         if test "$enableval" != "yes" ; then
16917     enable_stripping=no
16918         else
16919                 enable_stripping=yes
16920         fi
16921 else
16922   enableval=yes
16923         enable_stripping=yes
16924
16925 fi;
16926 echo "$as_me:16926: result: $enable_stripping" >&5
16927 echo "${ECHO_T}$enable_stripping" >&6
16928
16929 if test "$enable_stripping" = yes
16930 then
16931         INSTALL_OPT_S="-s"
16932 else
16933         INSTALL_OPT_S=
16934 fi
16935
16936 : "${INSTALL:=install}"
16937 echo "$as_me:16937: checking if install accepts -p option" >&5
16938 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16939 if test "${cf_cv_install_p+set}" = set; then
16940   echo $ECHO_N "(cached) $ECHO_C" >&6
16941 else
16942
16943         rm -rf ./conftest*
16944         date >conftest.in
16945         mkdir conftest.out
16946         sleep 3
16947         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16948         then
16949                 if test -f conftest.out/conftest.in
16950                 then
16951                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16952                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16953                         if test -s conftest.err
16954                         then
16955                                 cf_cv_install_p=no
16956                         else
16957                                 cf_cv_install_p=yes
16958                         fi
16959                 else
16960                         cf_cv_install_p=no
16961                 fi
16962         else
16963                 cf_cv_install_p=no
16964         fi
16965         rm -rf ./conftest*
16966
16967 fi
16968 echo "$as_me:16968: result: $cf_cv_install_p" >&5
16969 echo "${ECHO_T}$cf_cv_install_p" >&6
16970
16971 echo "$as_me:16971: checking if install needs to be told about ownership" >&5
16972 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16973 case `$ac_config_guess` in
16974 (*minix)
16975         with_install_o=yes
16976         ;;
16977 (*)
16978         with_install_o=no
16979         ;;
16980 esac
16981
16982 echo "$as_me:16982: result: $with_install_o" >&5
16983 echo "${ECHO_T}$with_install_o" >&6
16984 if test "x$with_install_o" = xyes
16985 then
16986         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'`"
16987 else
16988         INSTALL_OPT_O=
16989 fi
16990
16991 # If we're avoiding relinking of shared libraries during install, that is to
16992 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16993 # the install program has "-p" (for preserving timestamps).
16994 cf_cv_do_reranlib=yes
16995 if test "x$cf_cv_install_p" = xyes
16996 then
16997         if test "x$cf_cv_do_relink" != xyes
16998         then
16999                 cf_cv_do_reranlib=no
17000                 INSTALL_OPT_P="-p"
17001                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17002         fi
17003 fi
17004
17005 ###     use option --enable-warnings to turn on all gcc warnings
17006
17007 echo "$as_me:17007: checking if you want to use C11 _Noreturn feature" >&5
17008 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17009
17010 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17011 if test "${enable_stdnoreturn+set}" = set; then
17012   enableval="$enable_stdnoreturn"
17013   test "$enableval" != yes && enableval=no
17014         if test "$enableval" != "no" ; then
17015     enable_stdnoreturn=yes
17016         else
17017                 enable_stdnoreturn=no
17018         fi
17019 else
17020   enableval=no
17021         enable_stdnoreturn=no
17022
17023 fi;
17024 echo "$as_me:17024: result: $enable_stdnoreturn" >&5
17025 echo "${ECHO_T}$enable_stdnoreturn" >&6
17026
17027 if test $enable_stdnoreturn = yes; then
17028 echo "$as_me:17028: checking for C11 _Noreturn feature" >&5
17029 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17030 if test "${cf_cv_c11_noreturn+set}" = set; then
17031   echo $ECHO_N "(cached) $ECHO_C" >&6
17032 else
17033   cat >"conftest.$ac_ext" <<_ACEOF
17034 #line 17034 "configure"
17035 #include "confdefs.h"
17036
17037 $ac_includes_default
17038 #include <stdnoreturn.h>
17039 static _Noreturn void giveup(void) { exit(0); }
17040
17041 int
17042 main (void)
17043 {
17044 if (feof(stdin)) giveup()
17045   ;
17046   return 0;
17047 }
17048 _ACEOF
17049 rm -f "conftest.$ac_objext"
17050 if { (eval echo "$as_me:17050: \"$ac_compile\"") >&5
17051   (eval $ac_compile) 2>&5
17052   ac_status=$?
17053   echo "$as_me:17053: \$? = $ac_status" >&5
17054   (exit "$ac_status"); } &&
17055          { ac_try='test -s "conftest.$ac_objext"'
17056   { (eval echo "$as_me:17056: \"$ac_try\"") >&5
17057   (eval $ac_try) 2>&5
17058   ac_status=$?
17059   echo "$as_me:17059: \$? = $ac_status" >&5
17060   (exit "$ac_status"); }; }; then
17061   cf_cv_c11_noreturn=yes
17062 else
17063   echo "$as_me: failed program was:" >&5
17064 cat "conftest.$ac_ext" >&5
17065 cf_cv_c11_noreturn=no
17066 fi
17067 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17068
17069 fi
17070 echo "$as_me:17070: result: $cf_cv_c11_noreturn" >&5
17071 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17072 else
17073         cf_cv_c11_noreturn=no,
17074 fi
17075
17076 if test "$cf_cv_c11_noreturn" = yes; then
17077
17078 cat >>confdefs.h <<\EOF
17079 #define HAVE_STDNORETURN_H 1
17080 EOF
17081
17082 cat >>confdefs.h <<EOF
17083 #define STDC_NORETURN _Noreturn
17084 EOF
17085
17086         HAVE_STDNORETURN_H=1
17087 else
17088         HAVE_STDNORETURN_H=0
17089 fi
17090
17091 if test "$GCC" = yes || test "$GXX" = yes
17092 then
17093
17094 if test "$GCC" = yes || test "$GXX" = yes
17095 then
17096         case $CFLAGS in
17097         (*-Werror=*)
17098                 cf_temp_flags=
17099                 for cf_temp_scan in $CFLAGS
17100                 do
17101                         case "x$cf_temp_scan" in
17102                         (x-Werror=format*)
17103
17104         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17105         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17106
17107                                 ;;
17108                         (x-Werror=*)
17109
17110         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17111         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17112
17113                                 ;;
17114                         (*)
17115
17116         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17117         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17118
17119                                 ;;
17120                         esac
17121                 done
17122                 if test "x$CFLAGS" != "x$cf_temp_flags"
17123                 then
17124                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
17125
17126 echo "${as_me:-configure}:17126: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17127
17128                         CFLAGS="$cf_temp_flags"
17129                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
17130
17131 echo "${as_me:-configure}:17131: testing ... fixed $CFLAGS ..." 1>&5
17132
17133                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17134
17135 echo "${as_me:-configure}:17135: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17136
17137                 fi
17138                 ;;
17139         esac
17140 fi
17141
17142 if test "$GCC" = yes || test "$GXX" = yes
17143 then
17144         case $CPPFLAGS in
17145         (*-Werror=*)
17146                 cf_temp_flags=
17147                 for cf_temp_scan in $CPPFLAGS
17148                 do
17149                         case "x$cf_temp_scan" in
17150                         (x-Werror=format*)
17151
17152         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17153         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17154
17155                                 ;;
17156                         (x-Werror=*)
17157
17158         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17159         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17160
17161                                 ;;
17162                         (*)
17163
17164         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17165         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17166
17167                                 ;;
17168                         esac
17169                 done
17170                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17171                 then
17172                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
17173
17174 echo "${as_me:-configure}:17174: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17175
17176                         CPPFLAGS="$cf_temp_flags"
17177                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
17178
17179 echo "${as_me:-configure}:17179: testing ... fixed $CPPFLAGS ..." 1>&5
17180
17181                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17182
17183 echo "${as_me:-configure}:17183: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17184
17185                 fi
17186                 ;;
17187         esac
17188 fi
17189
17190 if test "$GCC" = yes || test "$GXX" = yes
17191 then
17192         case $LDFLAGS in
17193         (*-Werror=*)
17194                 cf_temp_flags=
17195                 for cf_temp_scan in $LDFLAGS
17196                 do
17197                         case "x$cf_temp_scan" in
17198                         (x-Werror=format*)
17199
17200         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17201         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17202
17203                                 ;;
17204                         (x-Werror=*)
17205
17206         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17207         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17208
17209                                 ;;
17210                         (*)
17211
17212         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17213         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17214
17215                                 ;;
17216                         esac
17217                 done
17218                 if test "x$LDFLAGS" != "x$cf_temp_flags"
17219                 then
17220                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
17221
17222 echo "${as_me:-configure}:17222: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17223
17224                         LDFLAGS="$cf_temp_flags"
17225                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
17226
17227 echo "${as_me:-configure}:17227: testing ... fixed $LDFLAGS ..." 1>&5
17228
17229                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17230
17231 echo "${as_me:-configure}:17231: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17232
17233                 fi
17234                 ;;
17235         esac
17236 fi
17237
17238 echo "$as_me:17238: checking if you want to turn on gcc warnings" >&5
17239 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17240
17241 # Check whether --enable-warnings or --disable-warnings was given.
17242 if test "${enable_warnings+set}" = set; then
17243   enableval="$enable_warnings"
17244   test "$enableval" != yes && enableval=no
17245         if test "$enableval" != "no" ; then
17246     enable_warnings=yes
17247         else
17248                 enable_warnings=no
17249         fi
17250 else
17251   enableval=no
17252         enable_warnings=no
17253
17254 fi;
17255 echo "$as_me:17255: result: $enable_warnings" >&5
17256 echo "${ECHO_T}$enable_warnings" >&6
17257 if test "$enable_warnings" = "yes"
17258 then
17259
17260 if test "x$have_x" = xyes; then
17261
17262 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17263 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17264 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17265 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17266 for cf_X_CFLAGS in $X_CFLAGS
17267 do
17268         case "x$cf_X_CFLAGS" in
17269         x-[IUD]*)
17270                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17271                 ;;
17272         *)
17273                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17274                 ;;
17275         esac
17276 done
17277
17278 cat >"conftest.$ac_ext" <<_ACEOF
17279 #line 17279 "configure"
17280 #include "confdefs.h"
17281
17282 #include <stdlib.h>
17283 #include <X11/Intrinsic.h>
17284
17285 int
17286 main (void)
17287 {
17288 String foo = malloc(1); free((void*)foo)
17289   ;
17290   return 0;
17291 }
17292 _ACEOF
17293 rm -f "conftest.$ac_objext"
17294 if { (eval echo "$as_me:17294: \"$ac_compile\"") >&5
17295   (eval $ac_compile) 2>&5
17296   ac_status=$?
17297   echo "$as_me:17297: \$? = $ac_status" >&5
17298   (exit "$ac_status"); } &&
17299          { ac_try='test -s "conftest.$ac_objext"'
17300   { (eval echo "$as_me:17300: \"$ac_try\"") >&5
17301   (eval $ac_try) 2>&5
17302   ac_status=$?
17303   echo "$as_me:17303: \$? = $ac_status" >&5
17304   (exit "$ac_status"); }; }; then
17305
17306 echo "$as_me:17306: checking for X11/Xt const-feature" >&5
17307 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17308 if test "${cf_cv_const_x_string+set}" = set; then
17309   echo $ECHO_N "(cached) $ECHO_C" >&6
17310 else
17311
17312         cat >"conftest.$ac_ext" <<_ACEOF
17313 #line 17313 "configure"
17314 #include "confdefs.h"
17315
17316 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17317 #undef  XTSTRINGDEFINES /* X11R5 and later */
17318 #include <stdlib.h>
17319 #include <X11/Intrinsic.h>
17320
17321 int
17322 main (void)
17323 {
17324 String foo = malloc(1); *foo = 0
17325   ;
17326   return 0;
17327 }
17328 _ACEOF
17329 rm -f "conftest.$ac_objext"
17330 if { (eval echo "$as_me:17330: \"$ac_compile\"") >&5
17331   (eval $ac_compile) 2>&5
17332   ac_status=$?
17333   echo "$as_me:17333: \$? = $ac_status" >&5
17334   (exit "$ac_status"); } &&
17335          { ac_try='test -s "conftest.$ac_objext"'
17336   { (eval echo "$as_me:17336: \"$ac_try\"") >&5
17337   (eval $ac_try) 2>&5
17338   ac_status=$?
17339   echo "$as_me:17339: \$? = $ac_status" >&5
17340   (exit "$ac_status"); }; }; then
17341
17342                         cf_cv_const_x_string=no
17343
17344 else
17345   echo "$as_me: failed program was:" >&5
17346 cat "conftest.$ac_ext" >&5
17347
17348                         cf_cv_const_x_string=yes
17349
17350 fi
17351 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17352
17353 fi
17354 echo "$as_me:17354: result: $cf_cv_const_x_string" >&5
17355 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17356
17357 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17358 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17359 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17360
17361 case "$cf_cv_const_x_string" in
17362 (no)
17363
17364         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17365         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17366
17367         ;;
17368 (*)
17369
17370         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17371         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17372
17373         ;;
17374 esac
17375
17376 else
17377   echo "$as_me: failed program was:" >&5
17378 cat "conftest.$ac_ext" >&5
17379 fi
17380 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17381  fi
17382 cat > "conftest.$ac_ext" <<EOF
17383 #line 17383 "${as_me:-configure}"
17384 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17385 EOF
17386 if test "$INTEL_COMPILER" = yes
17387 then
17388 # The "-wdXXX" options suppress warnings:
17389 # remark #1419: external declaration in primary source file
17390 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17391 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17392 # remark #193: zero used for undefined preprocessing identifier
17393 # remark #593: variable "curs_sb_left_arrow" was set but never used
17394 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17395 # remark #869: parameter "tw" was never referenced
17396 # remark #981: operands are evaluated in unspecified order
17397 # warning #279: controlling expression is constant
17398
17399         { echo "$as_me:17399: checking for $CC warning options..." >&5
17400 echo "$as_me: checking for $CC warning options..." >&6;}
17401         cf_save_CFLAGS="$CFLAGS"
17402         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17403         for cf_opt in \
17404                 wd1419 \
17405                 wd1683 \
17406                 wd1684 \
17407                 wd193 \
17408                 wd593 \
17409                 wd279 \
17410                 wd810 \
17411                 wd869 \
17412                 wd981
17413         do
17414                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17415                 if { (eval echo "$as_me:17415: \"$ac_compile\"") >&5
17416   (eval $ac_compile) 2>&5
17417   ac_status=$?
17418   echo "$as_me:17418: \$? = $ac_status" >&5
17419   (exit "$ac_status"); }; then
17420                         test -n "$verbose" && echo "$as_me:17420: result: ... -$cf_opt" >&5
17421 echo "${ECHO_T}... -$cf_opt" >&6
17422                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17423                 fi
17424         done
17425         CFLAGS="$cf_save_CFLAGS"
17426 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17427 then
17428         { echo "$as_me:17428: checking for $CC warning options..." >&5
17429 echo "$as_me: checking for $CC warning options..." >&6;}
17430         cf_save_CFLAGS="$CFLAGS"
17431         cf_warn_CONST=""
17432         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17433         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17434         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17435         for cf_opt in W Wall \
17436                 Wbad-function-cast \
17437                 Wcast-align \
17438                 Wcast-qual \
17439                 Wdeclaration-after-statement \
17440                 Wextra \
17441                 Winline \
17442                 Wmissing-declarations \
17443                 Wmissing-prototypes \
17444                 Wnested-externs \
17445                 Wpointer-arith \
17446                 Wshadow \
17447                 Wstrict-prototypes \
17448                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17449         do
17450                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17451                 if { (eval echo "$as_me:17451: \"$ac_compile\"") >&5
17452   (eval $ac_compile) 2>&5
17453   ac_status=$?
17454   echo "$as_me:17454: \$? = $ac_status" >&5
17455   (exit "$ac_status"); }; then
17456                         test -n "$verbose" && echo "$as_me:17456: result: ... -$cf_opt" >&5
17457 echo "${ECHO_T}... -$cf_opt" >&6
17458                         case "$cf_opt" in
17459                         (Winline)
17460                                 case "$GCC_VERSION" in
17461                                 ([34].*)
17462                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17463
17464 echo "${as_me:-configure}:17464: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17465
17466                                         continue;;
17467                                 esac
17468                                 ;;
17469                         (Wpointer-arith)
17470                                 case "$GCC_VERSION" in
17471                                 ([12].*)
17472                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17473
17474 echo "${as_me:-configure}:17474: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17475
17476                                         continue;;
17477                                 esac
17478                                 ;;
17479                         esac
17480                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17481                 fi
17482         done
17483         CFLAGS="$cf_save_CFLAGS"
17484 fi
17485 rm -rf ./conftest*
17486
17487 fi
17488
17489 if test "$GCC" = yes || test "$GXX" = yes
17490 then
17491 cat > conftest.i <<EOF
17492 #ifndef GCC_PRINTF
17493 #define GCC_PRINTF 0
17494 #endif
17495 #ifndef GCC_SCANF
17496 #define GCC_SCANF 0
17497 #endif
17498 #ifndef GCC_NORETURN
17499 #define GCC_NORETURN /* nothing */
17500 #endif
17501 #ifndef GCC_UNUSED
17502 #define GCC_UNUSED /* nothing */
17503 #endif
17504 EOF
17505 if test "$GCC" = yes
17506 then
17507         { echo "$as_me:17507: checking for $CC __attribute__ directives..." >&5
17508 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17509 cat > "conftest.$ac_ext" <<EOF
17510 #line 17510 "${as_me:-configure}"
17511 #include <stdio.h>
17512 #include "confdefs.h"
17513 #include "conftest.h"
17514 #include "conftest.i"
17515 #if     GCC_PRINTF
17516 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17517 #else
17518 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17519 #endif
17520 #if     GCC_SCANF
17521 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17522 #else
17523 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17524 #endif
17525 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17526 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17527 extern GCC_NORETURN void foo(void);
17528 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17529 EOF
17530         cf_printf_attribute=no
17531         cf_scanf_attribute=no
17532         for cf_attribute in scanf printf unused noreturn
17533         do
17534
17535 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17536
17537                 cf_directive="__attribute__(($cf_attribute))"
17538                 echo "checking for $CC $cf_directive" 1>&5
17539
17540                 case "$cf_attribute" in
17541                 (printf)
17542                         cf_printf_attribute=yes
17543                         cat >conftest.h <<EOF
17544 #define GCC_$cf_ATTRIBUTE 1
17545 EOF
17546                         ;;
17547                 (scanf)
17548                         cf_scanf_attribute=yes
17549                         cat >conftest.h <<EOF
17550 #define GCC_$cf_ATTRIBUTE 1
17551 EOF
17552                         ;;
17553                 (*)
17554                         cat >conftest.h <<EOF
17555 #define GCC_$cf_ATTRIBUTE $cf_directive
17556 EOF
17557                         ;;
17558                 esac
17559
17560                 if { (eval echo "$as_me:17560: \"$ac_compile\"") >&5
17561   (eval $ac_compile) 2>&5
17562   ac_status=$?
17563   echo "$as_me:17563: \$? = $ac_status" >&5
17564   (exit "$ac_status"); }; then
17565                         test -n "$verbose" && echo "$as_me:17565: result: ... $cf_attribute" >&5
17566 echo "${ECHO_T}... $cf_attribute" >&6
17567                         cat conftest.h >>confdefs.h
17568                         case "$cf_attribute" in
17569                         (noreturn)
17570
17571 cat >>confdefs.h <<EOF
17572 #define GCC_NORETURN $cf_directive
17573 EOF
17574
17575                                 ;;
17576                         (printf)
17577                                 cf_value='/* nothing */'
17578                                 if test "$cf_printf_attribute" != no ; then
17579                                         cf_value='__attribute__((format(printf,fmt,var)))'
17580
17581 cat >>confdefs.h <<\EOF
17582 #define GCC_PRINTF 1
17583 EOF
17584
17585                                 fi
17586
17587 cat >>confdefs.h <<EOF
17588 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17589 EOF
17590
17591                                 ;;
17592                         (scanf)
17593                                 cf_value='/* nothing */'
17594                                 if test "$cf_scanf_attribute" != no ; then
17595                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17596
17597 cat >>confdefs.h <<\EOF
17598 #define GCC_SCANF 1
17599 EOF
17600
17601                                 fi
17602
17603 cat >>confdefs.h <<EOF
17604 #define GCC_SCANFLIKE(fmt,var) $cf_value
17605 EOF
17606
17607                                 ;;
17608                         (unused)
17609
17610 cat >>confdefs.h <<EOF
17611 #define GCC_UNUSED $cf_directive
17612 EOF
17613
17614                                 ;;
17615                         esac
17616                 fi
17617         done
17618 else
17619         ${FGREP-fgrep} define conftest.i >>confdefs.h
17620 fi
17621 rm -rf ./conftest*
17622 fi
17623
17624 fi
17625
17626 if test "x$enable_warnings" = "xyes"; then
17627
17628         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17629
17630         if test "x$cf_with_cxx" = xyes ; then
17631
17632 INTEL_CPLUSPLUS=no
17633
17634 if test "$GCC" = yes ; then
17635         case "$host_os" in
17636         (linux*|gnu*)
17637                 echo "$as_me:17637: checking if this is really Intel C++ compiler" >&5
17638 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17639                 cf_save_CFLAGS="$CXXFLAGS"
17640                 CXXFLAGS="$CXXFLAGS -no-gcc"
17641                 cat >"conftest.$ac_ext" <<_ACEOF
17642 #line 17642 "configure"
17643 #include "confdefs.h"
17644
17645 int
17646 main (void)
17647 {
17648
17649 #ifdef __INTEL_COMPILER
17650 #else
17651 #error __INTEL_COMPILER is not defined
17652 #endif
17653
17654   ;
17655   return 0;
17656 }
17657 _ACEOF
17658 rm -f "conftest.$ac_objext"
17659 if { (eval echo "$as_me:17659: \"$ac_compile\"") >&5
17660   (eval $ac_compile) 2>&5
17661   ac_status=$?
17662   echo "$as_me:17662: \$? = $ac_status" >&5
17663   (exit "$ac_status"); } &&
17664          { ac_try='test -s "conftest.$ac_objext"'
17665   { (eval echo "$as_me:17665: \"$ac_try\"") >&5
17666   (eval $ac_try) 2>&5
17667   ac_status=$?
17668   echo "$as_me:17668: \$? = $ac_status" >&5
17669   (exit "$ac_status"); }; }; then
17670   INTEL_CPLUSPLUS=yes
17671 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17672
17673 else
17674   echo "$as_me: failed program was:" >&5
17675 cat "conftest.$ac_ext" >&5
17676 fi
17677 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17678                 CXXFLAGS="$cf_save_CFLAGS"
17679                 echo "$as_me:17679: result: $INTEL_CPLUSPLUS" >&5
17680 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17681                 ;;
17682         esac
17683 fi
17684
17685 CLANG_CPLUSPLUS=no
17686
17687 if test "$GCC" = yes ; then
17688         echo "$as_me:17688: checking if this is really Clang C++ compiler" >&5
17689 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17690         cf_save_CFLAGS="$CXXFLAGS"
17691         cat >"conftest.$ac_ext" <<_ACEOF
17692 #line 17692 "configure"
17693 #include "confdefs.h"
17694
17695 int
17696 main (void)
17697 {
17698
17699 #ifdef __clang__
17700 #else
17701 #error __clang__ is not defined
17702 #endif
17703
17704   ;
17705   return 0;
17706 }
17707 _ACEOF
17708 rm -f "conftest.$ac_objext"
17709 if { (eval echo "$as_me:17709: \"$ac_compile\"") >&5
17710   (eval $ac_compile) 2>&5
17711   ac_status=$?
17712   echo "$as_me:17712: \$? = $ac_status" >&5
17713   (exit "$ac_status"); } &&
17714          { ac_try='test -s "conftest.$ac_objext"'
17715   { (eval echo "$as_me:17715: \"$ac_try\"") >&5
17716   (eval $ac_try) 2>&5
17717   ac_status=$?
17718   echo "$as_me:17718: \$? = $ac_status" >&5
17719   (exit "$ac_status"); }; }; then
17720   CLANG_CPLUSPLUS=yes
17721
17722 else
17723   echo "$as_me: failed program was:" >&5
17724 cat "conftest.$ac_ext" >&5
17725 fi
17726 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17727         CXXFLAGS="$cf_save_CFLAGS"
17728         echo "$as_me:17728: result: $CLANG_CPLUSPLUS" >&5
17729 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17730 fi
17731
17732 CLANG_VERSION=none
17733
17734 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17735         case "$CC" in
17736         (c[1-9][0-9]|*/c[1-9][0-9])
17737                 { echo "$as_me:17737: WARNING: replacing broken compiler alias $CC" >&5
17738 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17739                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17740                 CC=clang
17741                 ;;
17742         esac
17743
17744         echo "$as_me:17744: checking version of $CC" >&5
17745 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17746         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.].*//'`"
17747         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17748         echo "$as_me:17748: result: $CLANG_VERSION" >&5
17749 echo "${ECHO_T}$CLANG_VERSION" >&6
17750
17751         for cf_clang_opt in \
17752                 -Qunused-arguments \
17753                 -Wno-error=implicit-function-declaration
17754         do
17755                 echo "$as_me:17755: checking if option $cf_clang_opt works" >&5
17756 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17757                 cf_save_CFLAGS="$CFLAGS"
17758                 CFLAGS="$CFLAGS $cf_clang_opt"
17759                 cat >"conftest.$ac_ext" <<_ACEOF
17760 #line 17760 "configure"
17761 #include "confdefs.h"
17762
17763                         #include <stdio.h>
17764 int
17765 main (void)
17766 {
17767
17768                         printf("hello!\\n");
17769   ;
17770   return 0;
17771 }
17772 _ACEOF
17773 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17774 if { (eval echo "$as_me:17774: \"$ac_link\"") >&5
17775   (eval $ac_link) 2>&5
17776   ac_status=$?
17777   echo "$as_me:17777: \$? = $ac_status" >&5
17778   (exit "$ac_status"); } &&
17779          { ac_try='test -s "conftest$ac_exeext"'
17780   { (eval echo "$as_me:17780: \"$ac_try\"") >&5
17781   (eval $ac_try) 2>&5
17782   ac_status=$?
17783   echo "$as_me:17783: \$? = $ac_status" >&5
17784   (exit "$ac_status"); }; }; then
17785
17786                         cf_clang_optok=yes
17787 else
17788   echo "$as_me: failed program was:" >&5
17789 cat "conftest.$ac_ext" >&5
17790
17791                         cf_clang_optok=no
17792 fi
17793 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17794                 echo "$as_me:17794: result: $cf_clang_optok" >&5
17795 echo "${ECHO_T}$cf_clang_optok" >&6
17796                 CFLAGS="$cf_save_CFLAGS"
17797                 if test "$cf_clang_optok" = yes; then
17798                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17799
17800 echo "${as_me:-configure}:17800: testing adding option $cf_clang_opt ..." 1>&5
17801
17802         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17803         CFLAGS="${CFLAGS}$cf_clang_opt"
17804
17805                 fi
17806         done
17807 fi
17808
17809 ac_ext=cc
17810 ac_cpp='$CXXCPP $CPPFLAGS'
17811 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17812 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17813 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17814 ac_main_return="return"
17815
17816 cat > conftest.$ac_ext <<EOF
17817 #line 17817 "configure"
17818 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17819 EOF
17820
17821 if test "$INTEL_CPLUSPLUS" = yes
17822 then
17823 # The "-wdXXX" options suppress warnings:
17824 # remark #1419: external declaration in primary source file
17825 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17826 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17827 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17828 # remark #193: zero used for undefined preprocessing identifier
17829 # remark #593: variable "curs_sb_left_arrow" was set but never used
17830 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17831 # remark #869: parameter "tw" was never referenced
17832 # remark #981: operands are evaluated in unspecified order
17833 # warning #269: invalid format string conversion
17834
17835         { echo "$as_me:17835: checking for $CC warning options..." >&5
17836 echo "$as_me: checking for $CC warning options..." >&6;}
17837         cf_save_CXXFLAGS="$CXXFLAGS"
17838         EXTRA_CXXFLAGS="-Wall"
17839         for cf_opt in \
17840                 wd1419 \
17841                 wd1682 \
17842                 wd1683 \
17843                 wd1684 \
17844                 wd193 \
17845                 wd279 \
17846                 wd593 \
17847                 wd810 \
17848                 wd869 \
17849                 wd981
17850         do
17851                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17852                 if { (eval echo "$as_me:17852: \"$ac_compile\"") >&5
17853   (eval $ac_compile) 2>&5
17854   ac_status=$?
17855   echo "$as_me:17855: \$? = $ac_status" >&5
17856   (exit "$ac_status"); }; then
17857                         test -n "$verbose" && echo "$as_me:17857: result: ... -$cf_opt" >&5
17858 echo "${ECHO_T}... -$cf_opt" >&6
17859                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17860                 fi
17861         done
17862         CXXFLAGS="$cf_save_CXXFLAGS"
17863
17864 elif test "$GXX" = yes
17865 then
17866         { echo "$as_me:17866: checking for $CXX warning options..." >&5
17867 echo "$as_me: checking for $CXX warning options..." >&6;}
17868         cf_save_CXXFLAGS="$CXXFLAGS"
17869         EXTRA_CXXFLAGS="-W -Wall"
17870         cf_gxx_extra_warnings=""
17871         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17872         case "$GXX_VERSION" in
17873         ([1-2].*)
17874                 ;;
17875         (*)
17876                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17877                 ;;
17878         esac
17879         for cf_opt in \
17880                 Wabi \
17881                 fabi-version=0 \
17882                 Wextra \
17883                 Wignored-qualifiers \
17884                 Wlogical-op \
17885                 Woverloaded-virtual \
17886                 Wsign-promo \
17887                 Wsynth \
17888                 Wold-style-cast \
17889                 Wcast-align \
17890                 Wcast-qual \
17891                 Wpointer-arith \
17892                 Wshadow \
17893                 Wundef $cf_gxx_extra_warnings Wno-unused
17894         do
17895                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17896                 if { (eval echo "$as_me:17896: \"$ac_compile\"") >&5
17897   (eval $ac_compile) 2>&5
17898   ac_status=$?
17899   echo "$as_me:17899: \$? = $ac_status" >&5
17900   (exit "$ac_status"); }; then
17901                         test -n "$verbose" && echo "$as_me:17901: result: ... -$cf_opt" >&5
17902 echo "${ECHO_T}... -$cf_opt" >&6
17903                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17904                 else
17905                         test -n "$verbose" && echo "$as_me:17905: result: ... no -$cf_opt" >&5
17906 echo "${ECHO_T}... no -$cf_opt" >&6
17907                 fi
17908         done
17909         CXXFLAGS="$cf_save_CXXFLAGS"
17910 fi
17911
17912 rm -rf ./conftest*
17913 ac_ext=c
17914 ac_cpp='$CPP $CPPFLAGS'
17915 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17916 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17917 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17918 ac_main_return="return"
17919
17920         fi
17921 fi
17922
17923 echo "$as_me:17923: checking if you want to work around bogus compiler/loader warnings" >&5
17924 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17925
17926 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17927 if test "${enable_string_hacks+set}" = set; then
17928   enableval="$enable_string_hacks"
17929   enable_string_hacks=$enableval
17930 else
17931   enable_string_hacks=no
17932 fi;
17933 echo "$as_me:17933: result: $enable_string_hacks" >&5
17934 echo "${ECHO_T}$enable_string_hacks" >&6
17935
17936 if test "x$enable_string_hacks" = "xyes"; then
17937
17938 cat >>confdefs.h <<\EOF
17939 #define USE_STRING_HACKS 1
17940 EOF
17941
17942         { echo "$as_me:17942: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17943 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17944         echo "$as_me:17944: checking for strlcat" >&5
17945 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17946 if test "${ac_cv_func_strlcat+set}" = set; then
17947   echo $ECHO_N "(cached) $ECHO_C" >&6
17948 else
17949   cat >"conftest.$ac_ext" <<_ACEOF
17950 #line 17950 "configure"
17951 #include "confdefs.h"
17952 #define strlcat autoconf_temporary
17953 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17954 #undef strlcat
17955
17956 #ifdef __cplusplus
17957 extern "C"
17958 #endif
17959
17960 /* We use char because int might match the return type of a gcc2
17961    builtin and then its argument prototype would still apply.  */
17962 char strlcat (void);
17963
17964 int
17965 main (void)
17966 {
17967
17968 /* The GNU C library defines stubs for functions which it implements
17969     to always fail with ENOSYS.  Some functions are actually named
17970     something starting with __ and the normal name is an alias.  */
17971 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17972 #error found stub for strlcat
17973 #endif
17974
17975         return strlcat ();
17976   ;
17977   return 0;
17978 }
17979 _ACEOF
17980 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17981 if { (eval echo "$as_me:17981: \"$ac_link\"") >&5
17982   (eval $ac_link) 2>&5
17983   ac_status=$?
17984   echo "$as_me:17984: \$? = $ac_status" >&5
17985   (exit "$ac_status"); } &&
17986          { ac_try='test -s "conftest$ac_exeext"'
17987   { (eval echo "$as_me:17987: \"$ac_try\"") >&5
17988   (eval $ac_try) 2>&5
17989   ac_status=$?
17990   echo "$as_me:17990: \$? = $ac_status" >&5
17991   (exit "$ac_status"); }; }; then
17992   ac_cv_func_strlcat=yes
17993 else
17994   echo "$as_me: failed program was:" >&5
17995 cat "conftest.$ac_ext" >&5
17996 ac_cv_func_strlcat=no
17997 fi
17998 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17999 fi
18000 echo "$as_me:18000: result: $ac_cv_func_strlcat" >&5
18001 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18002 if test "$ac_cv_func_strlcat" = yes; then
18003
18004 cat >>confdefs.h <<\EOF
18005 #define HAVE_STRLCAT 1
18006 EOF
18007
18008 else
18009
18010                 echo "$as_me:18010: checking for strlcat in -lbsd" >&5
18011 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18012 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18013   echo $ECHO_N "(cached) $ECHO_C" >&6
18014 else
18015   ac_check_lib_save_LIBS=$LIBS
18016 LIBS="-lbsd  $LIBS"
18017 cat >"conftest.$ac_ext" <<_ACEOF
18018 #line 18018 "configure"
18019 #include "confdefs.h"
18020
18021 /* Override any gcc2 internal prototype to avoid an error.  */
18022 #ifdef __cplusplus
18023 extern "C"
18024 #endif
18025 /* We use char because int might match the return type of a gcc2
18026    builtin and then its argument prototype would still apply.  */
18027 char strlcat ();
18028 int
18029 main (void)
18030 {
18031 strlcat ();
18032   ;
18033   return 0;
18034 }
18035 _ACEOF
18036 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18037 if { (eval echo "$as_me:18037: \"$ac_link\"") >&5
18038   (eval $ac_link) 2>&5
18039   ac_status=$?
18040   echo "$as_me:18040: \$? = $ac_status" >&5
18041   (exit "$ac_status"); } &&
18042          { ac_try='test -s "conftest$ac_exeext"'
18043   { (eval echo "$as_me:18043: \"$ac_try\"") >&5
18044   (eval $ac_try) 2>&5
18045   ac_status=$?
18046   echo "$as_me:18046: \$? = $ac_status" >&5
18047   (exit "$ac_status"); }; }; then
18048   ac_cv_lib_bsd_strlcat=yes
18049 else
18050   echo "$as_me: failed program was:" >&5
18051 cat "conftest.$ac_ext" >&5
18052 ac_cv_lib_bsd_strlcat=no
18053 fi
18054 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18055 LIBS=$ac_check_lib_save_LIBS
18056 fi
18057 echo "$as_me:18057: result: $ac_cv_lib_bsd_strlcat" >&5
18058 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18059 if test "$ac_cv_lib_bsd_strlcat" = yes; then
18060
18061 cf_add_libs="$LIBS"
18062 # reverse order
18063 cf_add_0lib=
18064 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18065 # filter duplicates
18066 for cf_add_1lib in $cf_add_0lib; do
18067         for cf_add_2lib in $cf_add_libs; do
18068                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18069                         cf_add_1lib=
18070                         break
18071                 fi
18072         done
18073         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18074 done
18075 LIBS="$cf_add_libs"
18076
18077 for ac_header in bsd/string.h
18078 do
18079 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18080 echo "$as_me:18080: checking for $ac_header" >&5
18081 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18082 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18083   echo $ECHO_N "(cached) $ECHO_C" >&6
18084 else
18085   cat >"conftest.$ac_ext" <<_ACEOF
18086 #line 18086 "configure"
18087 #include "confdefs.h"
18088 #include <$ac_header>
18089 _ACEOF
18090 if { (eval echo "$as_me:18090: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18091   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18092   ac_status=$?
18093   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18094   rm -f conftest.er1
18095   cat conftest.err >&5
18096   echo "$as_me:18096: \$? = $ac_status" >&5
18097   (exit "$ac_status"); } >/dev/null; then
18098   if test -s conftest.err; then
18099     ac_cpp_err=$ac_c_preproc_warn_flag
18100   else
18101     ac_cpp_err=
18102   fi
18103 else
18104   ac_cpp_err=yes
18105 fi
18106 if test -z "$ac_cpp_err"; then
18107   eval "$as_ac_Header=yes"
18108 else
18109   echo "$as_me: failed program was:" >&5
18110   cat "conftest.$ac_ext" >&5
18111   eval "$as_ac_Header=no"
18112 fi
18113 rm -f conftest.err "conftest.$ac_ext"
18114 fi
18115 echo "$as_me:18115: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18116 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18117 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18118   cat >>confdefs.h <<EOF
18119 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18120 EOF
18121
18122 fi
18123 done
18124
18125 cat >>confdefs.h <<\EOF
18126 #define HAVE_STRLCAT 1
18127 EOF
18128
18129 fi
18130
18131 fi
18132
18133 for ac_func in strlcpy snprintf
18134 do
18135 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18136 echo "$as_me:18136: checking for $ac_func" >&5
18137 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18138 if eval "test \"\${$as_ac_var+set}\" = set"; then
18139   echo $ECHO_N "(cached) $ECHO_C" >&6
18140 else
18141   cat >"conftest.$ac_ext" <<_ACEOF
18142 #line 18142 "configure"
18143 #include "confdefs.h"
18144 #define $ac_func autoconf_temporary
18145 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18146 #undef $ac_func
18147
18148 #ifdef __cplusplus
18149 extern "C"
18150 #endif
18151
18152 /* We use char because int might match the return type of a gcc2
18153    builtin and then its argument prototype would still apply.  */
18154 char $ac_func (void);
18155
18156 int
18157 main (void)
18158 {
18159
18160 /* The GNU C library defines stubs for functions which it implements
18161     to always fail with ENOSYS.  Some functions are actually named
18162     something starting with __ and the normal name is an alias.  */
18163 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18164 #error found stub for $ac_func
18165 #endif
18166
18167         return $ac_func ();
18168   ;
18169   return 0;
18170 }
18171 _ACEOF
18172 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18173 if { (eval echo "$as_me:18173: \"$ac_link\"") >&5
18174   (eval $ac_link) 2>&5
18175   ac_status=$?
18176   echo "$as_me:18176: \$? = $ac_status" >&5
18177   (exit "$ac_status"); } &&
18178          { ac_try='test -s "conftest$ac_exeext"'
18179   { (eval echo "$as_me:18179: \"$ac_try\"") >&5
18180   (eval $ac_try) 2>&5
18181   ac_status=$?
18182   echo "$as_me:18182: \$? = $ac_status" >&5
18183   (exit "$ac_status"); }; }; then
18184   eval "$as_ac_var=yes"
18185 else
18186   echo "$as_me: failed program was:" >&5
18187 cat "conftest.$ac_ext" >&5
18188 eval "$as_ac_var=no"
18189 fi
18190 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18191 fi
18192 echo "$as_me:18192: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18193 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18194 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18195   cat >>confdefs.h <<EOF
18196 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18197 EOF
18198
18199 fi
18200 done
18201
18202 fi
18203
18204 ###     use option --enable-assertions to turn on generation of assertion code
18205 echo "$as_me:18205: checking if you want to enable runtime assertions" >&5
18206 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18207
18208 # Check whether --enable-assertions or --disable-assertions was given.
18209 if test "${enable_assertions+set}" = set; then
18210   enableval="$enable_assertions"
18211   with_assertions=$enableval
18212 else
18213   with_assertions=no
18214 fi;
18215 echo "$as_me:18215: result: $with_assertions" >&5
18216 echo "${ECHO_T}$with_assertions" >&6
18217 if test -n "$GCC"
18218 then
18219         if test "$with_assertions" = no
18220         then
18221                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18222         else
18223
18224         ADAFLAGS="$ADAFLAGS -gnata"
18225
18226         fi
18227 fi
18228
18229 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
18230
18231 echo "$as_me:18231: checking if you want to use dmalloc for testing" >&5
18232 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18233
18234 # Check whether --with-dmalloc or --without-dmalloc was given.
18235 if test "${with_dmalloc+set}" = set; then
18236   withval="$with_dmalloc"
18237   case "x$withval" in
18238         (x|xno) ;;
18239         (*)
18240                 : "${with_cflags:=-g}"
18241                 : "${enable_leaks:=no}"
18242                 with_dmalloc=yes
18243
18244 cat >>confdefs.h <<EOF
18245 #define USE_DMALLOC 1
18246 EOF
18247
18248                 ;;
18249         esac
18250 else
18251   with_dmalloc=
18252 fi;
18253 echo "$as_me:18253: result: ${with_dmalloc:-no}" >&5
18254 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18255
18256 case ".$with_cflags" in
18257 (.*-g*)
18258         case .$CFLAGS in
18259         (.*-g*)
18260                 ;;
18261         (*)
18262
18263 cf_fix_cppflags=no
18264 cf_new_cflags=
18265 cf_new_cppflags=
18266 cf_new_extra_cppflags=
18267
18268 for cf_add_cflags in -g
18269 do
18270 case "$cf_fix_cppflags" in
18271 (no)
18272         case "$cf_add_cflags" in
18273         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18274                 case "$cf_add_cflags" in
18275                 (-D*)
18276                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18277
18278                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18279                                 && test -z "${cf_tst_cflags}" \
18280                                 && cf_fix_cppflags=yes
18281
18282                         if test "$cf_fix_cppflags" = yes ; then
18283
18284         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18285         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18286
18287                                 continue
18288                         elif test "${cf_tst_cflags}" = "\"'" ; then
18289
18290         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18291         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18292
18293                                 continue
18294                         fi
18295                         ;;
18296                 esac
18297                 case "$CPPFLAGS" in
18298                 (*$cf_add_cflags)
18299                         ;;
18300                 (*)
18301                         case "$cf_add_cflags" in
18302                         (-D*)
18303                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18304
18305 CPPFLAGS=`echo "$CPPFLAGS" | \
18306         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18307                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18308
18309                                 ;;
18310                         esac
18311
18312         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18313         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18314
18315                         ;;
18316                 esac
18317                 ;;
18318         (*)
18319
18320         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18321         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18322
18323                 ;;
18324         esac
18325         ;;
18326 (yes)
18327
18328         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18329         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18330
18331         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18332
18333         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18334                 && test -z "${cf_tst_cflags}" \
18335                 && cf_fix_cppflags=no
18336         ;;
18337 esac
18338 done
18339
18340 if test -n "$cf_new_cflags" ; then
18341
18342         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18343         CFLAGS="${CFLAGS}$cf_new_cflags"
18344
18345 fi
18346
18347 if test -n "$cf_new_cppflags" ; then
18348
18349         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18350         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18351
18352 fi
18353
18354 if test -n "$cf_new_extra_cppflags" ; then
18355
18356         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18357         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18358
18359 fi
18360
18361                 ;;
18362         esac
18363         ;;
18364 esac
18365
18366 if test "$with_dmalloc" = yes ; then
18367         echo "$as_me:18367: checking for dmalloc.h" >&5
18368 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18369 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18370   echo $ECHO_N "(cached) $ECHO_C" >&6
18371 else
18372   cat >"conftest.$ac_ext" <<_ACEOF
18373 #line 18373 "configure"
18374 #include "confdefs.h"
18375 #include <dmalloc.h>
18376 _ACEOF
18377 if { (eval echo "$as_me:18377: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18378   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18379   ac_status=$?
18380   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18381   rm -f conftest.er1
18382   cat conftest.err >&5
18383   echo "$as_me:18383: \$? = $ac_status" >&5
18384   (exit "$ac_status"); } >/dev/null; then
18385   if test -s conftest.err; then
18386     ac_cpp_err=$ac_c_preproc_warn_flag
18387   else
18388     ac_cpp_err=
18389   fi
18390 else
18391   ac_cpp_err=yes
18392 fi
18393 if test -z "$ac_cpp_err"; then
18394   ac_cv_header_dmalloc_h=yes
18395 else
18396   echo "$as_me: failed program was:" >&5
18397   cat "conftest.$ac_ext" >&5
18398   ac_cv_header_dmalloc_h=no
18399 fi
18400 rm -f conftest.err "conftest.$ac_ext"
18401 fi
18402 echo "$as_me:18402: result: $ac_cv_header_dmalloc_h" >&5
18403 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18404 if test "$ac_cv_header_dmalloc_h" = yes; then
18405
18406 echo "$as_me:18406: checking for dmalloc_debug in -ldmalloc" >&5
18407 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18408 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18409   echo $ECHO_N "(cached) $ECHO_C" >&6
18410 else
18411   ac_check_lib_save_LIBS=$LIBS
18412 LIBS="-ldmalloc  $LIBS"
18413 cat >"conftest.$ac_ext" <<_ACEOF
18414 #line 18414 "configure"
18415 #include "confdefs.h"
18416
18417 /* Override any gcc2 internal prototype to avoid an error.  */
18418 #ifdef __cplusplus
18419 extern "C"
18420 #endif
18421 /* We use char because int might match the return type of a gcc2
18422    builtin and then its argument prototype would still apply.  */
18423 char dmalloc_debug ();
18424 int
18425 main (void)
18426 {
18427 dmalloc_debug ();
18428   ;
18429   return 0;
18430 }
18431 _ACEOF
18432 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18433 if { (eval echo "$as_me:18433: \"$ac_link\"") >&5
18434   (eval $ac_link) 2>&5
18435   ac_status=$?
18436   echo "$as_me:18436: \$? = $ac_status" >&5
18437   (exit "$ac_status"); } &&
18438          { ac_try='test -s "conftest$ac_exeext"'
18439   { (eval echo "$as_me:18439: \"$ac_try\"") >&5
18440   (eval $ac_try) 2>&5
18441   ac_status=$?
18442   echo "$as_me:18442: \$? = $ac_status" >&5
18443   (exit "$ac_status"); }; }; then
18444   ac_cv_lib_dmalloc_dmalloc_debug=yes
18445 else
18446   echo "$as_me: failed program was:" >&5
18447 cat "conftest.$ac_ext" >&5
18448 ac_cv_lib_dmalloc_dmalloc_debug=no
18449 fi
18450 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18451 LIBS=$ac_check_lib_save_LIBS
18452 fi
18453 echo "$as_me:18453: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18454 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18455 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18456   cat >>confdefs.h <<EOF
18457 #define HAVE_LIBDMALLOC 1
18458 EOF
18459
18460   LIBS="-ldmalloc $LIBS"
18461
18462 fi
18463
18464 fi
18465
18466 fi
18467
18468 echo "$as_me:18468: checking if you want to use dbmalloc for testing" >&5
18469 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18470
18471 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18472 if test "${with_dbmalloc+set}" = set; then
18473   withval="$with_dbmalloc"
18474   case "x$withval" in
18475         (x|xno) ;;
18476         (*)
18477                 : "${with_cflags:=-g}"
18478                 : "${enable_leaks:=no}"
18479                 with_dbmalloc=yes
18480
18481 cat >>confdefs.h <<EOF
18482 #define USE_DBMALLOC 1
18483 EOF
18484
18485                 ;;
18486         esac
18487 else
18488   with_dbmalloc=
18489 fi;
18490 echo "$as_me:18490: result: ${with_dbmalloc:-no}" >&5
18491 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18492
18493 case ".$with_cflags" in
18494 (.*-g*)
18495         case .$CFLAGS in
18496         (.*-g*)
18497                 ;;
18498         (*)
18499
18500 cf_fix_cppflags=no
18501 cf_new_cflags=
18502 cf_new_cppflags=
18503 cf_new_extra_cppflags=
18504
18505 for cf_add_cflags in -g
18506 do
18507 case "$cf_fix_cppflags" in
18508 (no)
18509         case "$cf_add_cflags" in
18510         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18511                 case "$cf_add_cflags" in
18512                 (-D*)
18513                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18514
18515                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18516                                 && test -z "${cf_tst_cflags}" \
18517                                 && cf_fix_cppflags=yes
18518
18519                         if test "$cf_fix_cppflags" = yes ; then
18520
18521         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18522         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18523
18524                                 continue
18525                         elif test "${cf_tst_cflags}" = "\"'" ; then
18526
18527         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18528         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18529
18530                                 continue
18531                         fi
18532                         ;;
18533                 esac
18534                 case "$CPPFLAGS" in
18535                 (*$cf_add_cflags)
18536                         ;;
18537                 (*)
18538                         case "$cf_add_cflags" in
18539                         (-D*)
18540                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18541
18542 CPPFLAGS=`echo "$CPPFLAGS" | \
18543         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18544                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18545
18546                                 ;;
18547                         esac
18548
18549         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18550         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18551
18552                         ;;
18553                 esac
18554                 ;;
18555         (*)
18556
18557         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18558         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18559
18560                 ;;
18561         esac
18562         ;;
18563 (yes)
18564
18565         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18566         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18567
18568         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18569
18570         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18571                 && test -z "${cf_tst_cflags}" \
18572                 && cf_fix_cppflags=no
18573         ;;
18574 esac
18575 done
18576
18577 if test -n "$cf_new_cflags" ; then
18578
18579         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18580         CFLAGS="${CFLAGS}$cf_new_cflags"
18581
18582 fi
18583
18584 if test -n "$cf_new_cppflags" ; then
18585
18586         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18587         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18588
18589 fi
18590
18591 if test -n "$cf_new_extra_cppflags" ; then
18592
18593         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18594         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18595
18596 fi
18597
18598                 ;;
18599         esac
18600         ;;
18601 esac
18602
18603 if test "$with_dbmalloc" = yes ; then
18604         echo "$as_me:18604: checking for dbmalloc.h" >&5
18605 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18606 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18607   echo $ECHO_N "(cached) $ECHO_C" >&6
18608 else
18609   cat >"conftest.$ac_ext" <<_ACEOF
18610 #line 18610 "configure"
18611 #include "confdefs.h"
18612 #include <dbmalloc.h>
18613 _ACEOF
18614 if { (eval echo "$as_me:18614: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18615   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18616   ac_status=$?
18617   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18618   rm -f conftest.er1
18619   cat conftest.err >&5
18620   echo "$as_me:18620: \$? = $ac_status" >&5
18621   (exit "$ac_status"); } >/dev/null; then
18622   if test -s conftest.err; then
18623     ac_cpp_err=$ac_c_preproc_warn_flag
18624   else
18625     ac_cpp_err=
18626   fi
18627 else
18628   ac_cpp_err=yes
18629 fi
18630 if test -z "$ac_cpp_err"; then
18631   ac_cv_header_dbmalloc_h=yes
18632 else
18633   echo "$as_me: failed program was:" >&5
18634   cat "conftest.$ac_ext" >&5
18635   ac_cv_header_dbmalloc_h=no
18636 fi
18637 rm -f conftest.err "conftest.$ac_ext"
18638 fi
18639 echo "$as_me:18639: result: $ac_cv_header_dbmalloc_h" >&5
18640 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18641 if test "$ac_cv_header_dbmalloc_h" = yes; then
18642
18643 echo "$as_me:18643: checking for debug_malloc in -ldbmalloc" >&5
18644 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18645 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18646   echo $ECHO_N "(cached) $ECHO_C" >&6
18647 else
18648   ac_check_lib_save_LIBS=$LIBS
18649 LIBS="-ldbmalloc  $LIBS"
18650 cat >"conftest.$ac_ext" <<_ACEOF
18651 #line 18651 "configure"
18652 #include "confdefs.h"
18653
18654 /* Override any gcc2 internal prototype to avoid an error.  */
18655 #ifdef __cplusplus
18656 extern "C"
18657 #endif
18658 /* We use char because int might match the return type of a gcc2
18659    builtin and then its argument prototype would still apply.  */
18660 char debug_malloc ();
18661 int
18662 main (void)
18663 {
18664 debug_malloc ();
18665   ;
18666   return 0;
18667 }
18668 _ACEOF
18669 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18670 if { (eval echo "$as_me:18670: \"$ac_link\"") >&5
18671   (eval $ac_link) 2>&5
18672   ac_status=$?
18673   echo "$as_me:18673: \$? = $ac_status" >&5
18674   (exit "$ac_status"); } &&
18675          { ac_try='test -s "conftest$ac_exeext"'
18676   { (eval echo "$as_me:18676: \"$ac_try\"") >&5
18677   (eval $ac_try) 2>&5
18678   ac_status=$?
18679   echo "$as_me:18679: \$? = $ac_status" >&5
18680   (exit "$ac_status"); }; }; then
18681   ac_cv_lib_dbmalloc_debug_malloc=yes
18682 else
18683   echo "$as_me: failed program was:" >&5
18684 cat "conftest.$ac_ext" >&5
18685 ac_cv_lib_dbmalloc_debug_malloc=no
18686 fi
18687 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18688 LIBS=$ac_check_lib_save_LIBS
18689 fi
18690 echo "$as_me:18690: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18691 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18692 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18693   cat >>confdefs.h <<EOF
18694 #define HAVE_LIBDBMALLOC 1
18695 EOF
18696
18697   LIBS="-ldbmalloc $LIBS"
18698
18699 fi
18700
18701 fi
18702
18703 fi
18704
18705 echo "$as_me:18705: checking if you want to use valgrind for testing" >&5
18706 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18707
18708 # Check whether --with-valgrind or --without-valgrind was given.
18709 if test "${with_valgrind+set}" = set; then
18710   withval="$with_valgrind"
18711   case "x$withval" in
18712         (x|xno) ;;
18713         (*)
18714                 : "${with_cflags:=-g}"
18715                 : "${enable_leaks:=no}"
18716                 with_valgrind=yes
18717
18718 cat >>confdefs.h <<EOF
18719 #define USE_VALGRIND 1
18720 EOF
18721
18722                 ;;
18723         esac
18724 else
18725   with_valgrind=
18726 fi;
18727 echo "$as_me:18727: result: ${with_valgrind:-no}" >&5
18728 echo "${ECHO_T}${with_valgrind:-no}" >&6
18729
18730 case ".$with_cflags" in
18731 (.*-g*)
18732         case .$CFLAGS in
18733         (.*-g*)
18734                 ;;
18735         (*)
18736
18737 cf_fix_cppflags=no
18738 cf_new_cflags=
18739 cf_new_cppflags=
18740 cf_new_extra_cppflags=
18741
18742 for cf_add_cflags in -g
18743 do
18744 case "$cf_fix_cppflags" in
18745 (no)
18746         case "$cf_add_cflags" in
18747         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18748                 case "$cf_add_cflags" in
18749                 (-D*)
18750                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18751
18752                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18753                                 && test -z "${cf_tst_cflags}" \
18754                                 && cf_fix_cppflags=yes
18755
18756                         if test "$cf_fix_cppflags" = yes ; then
18757
18758         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18759         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18760
18761                                 continue
18762                         elif test "${cf_tst_cflags}" = "\"'" ; then
18763
18764         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18765         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18766
18767                                 continue
18768                         fi
18769                         ;;
18770                 esac
18771                 case "$CPPFLAGS" in
18772                 (*$cf_add_cflags)
18773                         ;;
18774                 (*)
18775                         case "$cf_add_cflags" in
18776                         (-D*)
18777                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18778
18779 CPPFLAGS=`echo "$CPPFLAGS" | \
18780         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18781                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18782
18783                                 ;;
18784                         esac
18785
18786         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18787         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18788
18789                         ;;
18790                 esac
18791                 ;;
18792         (*)
18793
18794         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18795         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18796
18797                 ;;
18798         esac
18799         ;;
18800 (yes)
18801
18802         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18803         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18804
18805         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18806
18807         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18808                 && test -z "${cf_tst_cflags}" \
18809                 && cf_fix_cppflags=no
18810         ;;
18811 esac
18812 done
18813
18814 if test -n "$cf_new_cflags" ; then
18815
18816         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18817         CFLAGS="${CFLAGS}$cf_new_cflags"
18818
18819 fi
18820
18821 if test -n "$cf_new_cppflags" ; then
18822
18823         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18824         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18825
18826 fi
18827
18828 if test -n "$cf_new_extra_cppflags" ; then
18829
18830         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18831         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18832
18833 fi
18834
18835                 ;;
18836         esac
18837         ;;
18838 esac
18839
18840 echo "$as_me:18840: checking if you want to perform memory-leak testing" >&5
18841 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18842
18843 # Check whether --enable-leaks or --disable-leaks was given.
18844 if test "${enable_leaks+set}" = set; then
18845   enableval="$enable_leaks"
18846   enable_leaks=$enableval
18847 else
18848   enable_leaks=yes
18849 fi;
18850 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18851 echo "$as_me:18851: result: $with_no_leaks" >&5
18852 echo "${ECHO_T}$with_no_leaks" >&6
18853
18854 if test "$enable_leaks" = no ; then
18855
18856 cat >>confdefs.h <<\EOF
18857 #define NO_LEAKS 1
18858 EOF
18859
18860 cat >>confdefs.h <<\EOF
18861 #define YY_NO_LEAKS 1
18862 EOF
18863
18864 fi
18865
18866 cat >>confdefs.h <<\EOF
18867 #define HAVE_NC_ALLOC_H 1
18868 EOF
18869
18870 ###     use option --enable-expanded to generate certain macros as functions
18871
18872 # Check whether --enable-expanded or --disable-expanded was given.
18873 if test "${enable_expanded+set}" = set; then
18874   enableval="$enable_expanded"
18875   test "x$enableval" = xyes &&
18876 cat >>confdefs.h <<\EOF
18877 #define NCURSES_EXPANDED 1
18878 EOF
18879
18880 fi;
18881
18882 ###     use option --disable-macros to suppress macros in favor of functions
18883
18884 # Check whether --enable-macros or --disable-macros was given.
18885 if test "${enable_macros+set}" = set; then
18886   enableval="$enable_macros"
18887   test "$enableval" = no &&
18888 cat >>confdefs.h <<\EOF
18889 #define NCURSES_NOMACROS 1
18890 EOF
18891
18892 fi;
18893
18894 # Normally we only add trace() to the debug-library.  Allow this to be
18895 # extended to all models of the ncurses library:
18896 cf_all_traces=no
18897 case "$CFLAGS $CPPFLAGS" in
18898 (*-DTRACE*)
18899         cf_all_traces=yes
18900         ;;
18901 esac
18902
18903 echo "$as_me:18903: checking whether to add trace feature to all models" >&5
18904 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18905
18906 # Check whether --with-trace or --without-trace was given.
18907 if test "${with_trace+set}" = set; then
18908   withval="$with_trace"
18909   cf_with_trace=$withval
18910 else
18911   cf_with_trace=$cf_all_traces
18912 fi;
18913 echo "$as_me:18913: result: $cf_with_trace" >&5
18914 echo "${ECHO_T}$cf_with_trace" >&6
18915
18916 if test "x$cf_with_trace" = xyes ; then
18917         LIB_TRACING=all
18918         ADA_TRACE=TRUE
18919
18920 cf_fix_cppflags=no
18921 cf_new_cflags=
18922 cf_new_cppflags=
18923 cf_new_extra_cppflags=
18924
18925 for cf_add_cflags in -DTRACE
18926 do
18927 case "$cf_fix_cppflags" in
18928 (no)
18929         case "$cf_add_cflags" in
18930         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18931                 case "$cf_add_cflags" in
18932                 (-D*)
18933                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18934
18935                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18936                                 && test -z "${cf_tst_cflags}" \
18937                                 && cf_fix_cppflags=yes
18938
18939                         if test "$cf_fix_cppflags" = yes ; then
18940
18941         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18942         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18943
18944                                 continue
18945                         elif test "${cf_tst_cflags}" = "\"'" ; then
18946
18947         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18948         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18949
18950                                 continue
18951                         fi
18952                         ;;
18953                 esac
18954                 case "$CPPFLAGS" in
18955                 (*$cf_add_cflags)
18956                         ;;
18957                 (*)
18958                         case "$cf_add_cflags" in
18959                         (-D*)
18960                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18961
18962 CPPFLAGS=`echo "$CPPFLAGS" | \
18963         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18964                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18965
18966                                 ;;
18967                         esac
18968
18969         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18970         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18971
18972                         ;;
18973                 esac
18974                 ;;
18975         (*)
18976
18977         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18978         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18979
18980                 ;;
18981         esac
18982         ;;
18983 (yes)
18984
18985         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18986         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18987
18988         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18989
18990         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18991                 && test -z "${cf_tst_cflags}" \
18992                 && cf_fix_cppflags=no
18993         ;;
18994 esac
18995 done
18996
18997 if test -n "$cf_new_cflags" ; then
18998
18999         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19000         CFLAGS="${CFLAGS}$cf_new_cflags"
19001
19002 fi
19003
19004 if test -n "$cf_new_cppflags" ; then
19005
19006         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19007         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19008
19009 fi
19010
19011 if test -n "$cf_new_extra_cppflags" ; then
19012
19013         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19014         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19015
19016 fi
19017
19018 cat >>confdefs.h <<\EOF
19019 #define HAVE__TRACEF 1
19020 EOF
19021
19022 else
19023         LIB_TRACING=DEBUG
19024         ADA_TRACE=FALSE
19025 fi
19026
19027 echo "$as_me:19027: checking if we want to use GNAT projects" >&5
19028 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19029
19030 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19031 if test "${enable_gnat_projects+set}" = set; then
19032   enableval="$enable_gnat_projects"
19033   test "$enableval" != no && enableval=yes
19034         if test "$enableval" != "yes" ; then
19035     enable_gnat_projects=no
19036         else
19037                 enable_gnat_projects=yes
19038         fi
19039 else
19040   enableval=yes
19041         enable_gnat_projects=yes
19042
19043 fi;
19044 echo "$as_me:19044: result: $enable_gnat_projects" >&5
19045 echo "${ECHO_T}$enable_gnat_projects" >&6
19046
19047 ###     Checks for libraries.
19048 case "$cf_cv_system_name" in
19049 (*mingw32*|*mingw64*)
19050         # Note: WINVER may be a problem with Windows 10
19051         if test "x$with_exp_win32" = xyes ; then
19052                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19053         else
19054                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19055         fi
19056
19057 echo "$as_me:19057: checking if ssp library is needed" >&5
19058 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19059 if test "${cf_cv_need_libssp+set}" = set; then
19060   echo $ECHO_N "(cached) $ECHO_C" >&6
19061 else
19062
19063 cat >"conftest.$ac_ext" <<_ACEOF
19064 #line 19064 "configure"
19065 #include "confdefs.h"
19066
19067 #include <sys/types.h>
19068 #include <dirent.h>
19069
19070 int
19071 main (void)
19072 {
19073
19074        DIR *dp = opendir(".");
19075
19076   ;
19077   return 0;
19078 }
19079 _ACEOF
19080 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19081 if { (eval echo "$as_me:19081: \"$ac_link\"") >&5
19082   (eval $ac_link) 2>&5
19083   ac_status=$?
19084   echo "$as_me:19084: \$? = $ac_status" >&5
19085   (exit "$ac_status"); } &&
19086          { ac_try='test -s "conftest$ac_exeext"'
19087   { (eval echo "$as_me:19087: \"$ac_try\"") >&5
19088   (eval $ac_try) 2>&5
19089   ac_status=$?
19090   echo "$as_me:19090: \$? = $ac_status" >&5
19091   (exit "$ac_status"); }; }; then
19092   cf_cv_need_libssp=no
19093 else
19094   echo "$as_me: failed program was:" >&5
19095 cat "conftest.$ac_ext" >&5
19096
19097         cf_save_LIBS="$LIBS"
19098         LIBS="$LIBS -lssp"
19099         cat >"conftest.$ac_ext" <<_ACEOF
19100 #line 19100 "configure"
19101 #include "confdefs.h"
19102
19103 #include <sys/types.h>
19104 #include <dirent.h>
19105
19106 int
19107 main (void)
19108 {
19109
19110                    DIR *dp = opendir(".");
19111
19112   ;
19113   return 0;
19114 }
19115 _ACEOF
19116 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19117 if { (eval echo "$as_me:19117: \"$ac_link\"") >&5
19118   (eval $ac_link) 2>&5
19119   ac_status=$?
19120   echo "$as_me:19120: \$? = $ac_status" >&5
19121   (exit "$ac_status"); } &&
19122          { ac_try='test -s "conftest$ac_exeext"'
19123   { (eval echo "$as_me:19123: \"$ac_try\"") >&5
19124   (eval $ac_try) 2>&5
19125   ac_status=$?
19126   echo "$as_me:19126: \$? = $ac_status" >&5
19127   (exit "$ac_status"); }; }; then
19128   cf_cv_need_libssp=yes
19129 else
19130   echo "$as_me: failed program was:" >&5
19131 cat "conftest.$ac_ext" >&5
19132 cf_cv_need_libssp=maybe
19133 fi
19134 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19135         LIBS="$cf_save_LIBS"
19136
19137 fi
19138 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19139 fi
19140 echo "$as_me:19140: result: $cf_cv_need_libssp" >&5
19141 echo "${ECHO_T}$cf_cv_need_libssp" >&6
19142
19143 if test "x$cf_cv_need_libssp" = xyes
19144 then
19145
19146 cf_add_libs="$LIBS"
19147 # reverse order
19148 cf_add_0lib=
19149 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19150 # filter duplicates
19151 for cf_add_1lib in $cf_add_0lib; do
19152         for cf_add_2lib in $cf_add_libs; do
19153                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19154                         cf_add_1lib=
19155                         break
19156                 fi
19157         done
19158         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19159 done
19160 LIBS="$cf_add_libs"
19161
19162 fi
19163
19164         ;;
19165 (*)
19166         ;;
19167 esac
19168
19169 echo "$as_me:19169: checking if -lm needed for math functions" >&5
19170 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19171 if test "${cf_cv_need_libm+set}" = set; then
19172   echo $ECHO_N "(cached) $ECHO_C" >&6
19173 else
19174
19175         cat >"conftest.$ac_ext" <<_ACEOF
19176 #line 19176 "configure"
19177 #include "confdefs.h"
19178
19179                 #include <stdio.h>
19180                 #include <stdlib.h>
19181                 #include <math.h>
19182
19183 int
19184 main (void)
19185 {
19186 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19187   ;
19188   return 0;
19189 }
19190 _ACEOF
19191 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19192 if { (eval echo "$as_me:19192: \"$ac_link\"") >&5
19193   (eval $ac_link) 2>&5
19194   ac_status=$?
19195   echo "$as_me:19195: \$? = $ac_status" >&5
19196   (exit "$ac_status"); } &&
19197          { ac_try='test -s "conftest$ac_exeext"'
19198   { (eval echo "$as_me:19198: \"$ac_try\"") >&5
19199   (eval $ac_try) 2>&5
19200   ac_status=$?
19201   echo "$as_me:19201: \$? = $ac_status" >&5
19202   (exit "$ac_status"); }; }; then
19203   cf_cv_need_libm=no
19204 else
19205   echo "$as_me: failed program was:" >&5
19206 cat "conftest.$ac_ext" >&5
19207 cf_cv_need_libm=yes
19208 fi
19209 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19210 fi
19211 echo "$as_me:19211: result: $cf_cv_need_libm" >&5
19212 echo "${ECHO_T}$cf_cv_need_libm" >&6
19213
19214 if test "$cf_cv_need_libm" = yes
19215 then
19216
19217         cf_save_LIBS="$LIBS"
19218         LIBS="$LIBS -lm"
19219         echo "$as_me:19219: checking if -lm is available for math functions" >&5
19220 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19221 if test "${cf_cv_have_libm+set}" = set; then
19222   echo $ECHO_N "(cached) $ECHO_C" >&6
19223 else
19224
19225         cat >"conftest.$ac_ext" <<_ACEOF
19226 #line 19226 "configure"
19227 #include "confdefs.h"
19228
19229                 #include <stdio.h>
19230                 #include <stdlib.h>
19231                 #include <math.h>
19232
19233 int
19234 main (void)
19235 {
19236 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19237   ;
19238   return 0;
19239 }
19240 _ACEOF
19241 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19242 if { (eval echo "$as_me:19242: \"$ac_link\"") >&5
19243   (eval $ac_link) 2>&5
19244   ac_status=$?
19245   echo "$as_me:19245: \$? = $ac_status" >&5
19246   (exit "$ac_status"); } &&
19247          { ac_try='test -s "conftest$ac_exeext"'
19248   { (eval echo "$as_me:19248: \"$ac_try\"") >&5
19249   (eval $ac_try) 2>&5
19250   ac_status=$?
19251   echo "$as_me:19251: \$? = $ac_status" >&5
19252   (exit "$ac_status"); }; }; then
19253   cf_cv_have_libm=yes
19254 else
19255   echo "$as_me: failed program was:" >&5
19256 cat "conftest.$ac_ext" >&5
19257 cf_cv_have_libm=no
19258 fi
19259 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19260 fi
19261 echo "$as_me:19261: result: $cf_cv_have_libm" >&5
19262 echo "${ECHO_T}$cf_cv_have_libm" >&6
19263         LIBS="$cf_save_LIBS"
19264
19265         if test "$cf_cv_have_libm" = yes
19266         then
19267                 MATH_LIB=-lm
19268         fi
19269 else
19270         cf_cv_have_libm=yes
19271 fi
19272
19273 if test "$cf_cv_have_libm" = yes
19274 then
19275
19276 cat >>confdefs.h <<\EOF
19277 #define HAVE_MATH_FUNCS 1
19278 EOF
19279
19280 fi
19281
19282 ###     Checks for header files.
19283 echo "$as_me:19283: checking whether time.h and sys/time.h may both be included" >&5
19284 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19285 if test "${ac_cv_header_time+set}" = set; then
19286   echo $ECHO_N "(cached) $ECHO_C" >&6
19287 else
19288   cat >"conftest.$ac_ext" <<_ACEOF
19289 #line 19289 "configure"
19290 #include "confdefs.h"
19291 #include <sys/types.h>
19292 #include <sys/time.h>
19293 #include <time.h>
19294
19295 int
19296 main (void)
19297 {
19298 if ((struct tm *) 0)
19299 return 0;
19300   ;
19301   return 0;
19302 }
19303 _ACEOF
19304 rm -f "conftest.$ac_objext"
19305 if { (eval echo "$as_me:19305: \"$ac_compile\"") >&5
19306   (eval $ac_compile) 2>&5
19307   ac_status=$?
19308   echo "$as_me:19308: \$? = $ac_status" >&5
19309   (exit "$ac_status"); } &&
19310          { ac_try='test -s "conftest.$ac_objext"'
19311   { (eval echo "$as_me:19311: \"$ac_try\"") >&5
19312   (eval $ac_try) 2>&5
19313   ac_status=$?
19314   echo "$as_me:19314: \$? = $ac_status" >&5
19315   (exit "$ac_status"); }; }; then
19316   ac_cv_header_time=yes
19317 else
19318   echo "$as_me: failed program was:" >&5
19319 cat "conftest.$ac_ext" >&5
19320 ac_cv_header_time=no
19321 fi
19322 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19323 fi
19324 echo "$as_me:19324: result: $ac_cv_header_time" >&5
19325 echo "${ECHO_T}$ac_cv_header_time" >&6
19326 if test $ac_cv_header_time = yes; then
19327
19328 cat >>confdefs.h <<\EOF
19329 #define TIME_WITH_SYS_TIME 1
19330 EOF
19331
19332 fi
19333
19334 cf_regex_func=no
19335 cf_regex_libs=
19336 case "$host_os" in
19337 (mingw*)
19338         # -lsystre -ltre -lintl -liconv
19339         echo "$as_me:19339: checking for regcomp in -lsystre" >&5
19340 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19341 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19342   echo $ECHO_N "(cached) $ECHO_C" >&6
19343 else
19344   ac_check_lib_save_LIBS=$LIBS
19345 LIBS="-lsystre  $LIBS"
19346 cat >"conftest.$ac_ext" <<_ACEOF
19347 #line 19347 "configure"
19348 #include "confdefs.h"
19349
19350 /* Override any gcc2 internal prototype to avoid an error.  */
19351 #ifdef __cplusplus
19352 extern "C"
19353 #endif
19354 /* We use char because int might match the return type of a gcc2
19355    builtin and then its argument prototype would still apply.  */
19356 char regcomp ();
19357 int
19358 main (void)
19359 {
19360 regcomp ();
19361   ;
19362   return 0;
19363 }
19364 _ACEOF
19365 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19366 if { (eval echo "$as_me:19366: \"$ac_link\"") >&5
19367   (eval $ac_link) 2>&5
19368   ac_status=$?
19369   echo "$as_me:19369: \$? = $ac_status" >&5
19370   (exit "$ac_status"); } &&
19371          { ac_try='test -s "conftest$ac_exeext"'
19372   { (eval echo "$as_me:19372: \"$ac_try\"") >&5
19373   (eval $ac_try) 2>&5
19374   ac_status=$?
19375   echo "$as_me:19375: \$? = $ac_status" >&5
19376   (exit "$ac_status"); }; }; then
19377   ac_cv_lib_systre_regcomp=yes
19378 else
19379   echo "$as_me: failed program was:" >&5
19380 cat "conftest.$ac_ext" >&5
19381 ac_cv_lib_systre_regcomp=no
19382 fi
19383 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19384 LIBS=$ac_check_lib_save_LIBS
19385 fi
19386 echo "$as_me:19386: result: $ac_cv_lib_systre_regcomp" >&5
19387 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19388 if test "$ac_cv_lib_systre_regcomp" = yes; then
19389
19390                 echo "$as_me:19390: checking for libiconv_open in -liconv" >&5
19391 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19392 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19393   echo $ECHO_N "(cached) $ECHO_C" >&6
19394 else
19395   ac_check_lib_save_LIBS=$LIBS
19396 LIBS="-liconv  $LIBS"
19397 cat >"conftest.$ac_ext" <<_ACEOF
19398 #line 19398 "configure"
19399 #include "confdefs.h"
19400
19401 /* Override any gcc2 internal prototype to avoid an error.  */
19402 #ifdef __cplusplus
19403 extern "C"
19404 #endif
19405 /* We use char because int might match the return type of a gcc2
19406    builtin and then its argument prototype would still apply.  */
19407 char libiconv_open ();
19408 int
19409 main (void)
19410 {
19411 libiconv_open ();
19412   ;
19413   return 0;
19414 }
19415 _ACEOF
19416 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19417 if { (eval echo "$as_me:19417: \"$ac_link\"") >&5
19418   (eval $ac_link) 2>&5
19419   ac_status=$?
19420   echo "$as_me:19420: \$? = $ac_status" >&5
19421   (exit "$ac_status"); } &&
19422          { ac_try='test -s "conftest$ac_exeext"'
19423   { (eval echo "$as_me:19423: \"$ac_try\"") >&5
19424   (eval $ac_try) 2>&5
19425   ac_status=$?
19426   echo "$as_me:19426: \$? = $ac_status" >&5
19427   (exit "$ac_status"); }; }; then
19428   ac_cv_lib_iconv_libiconv_open=yes
19429 else
19430   echo "$as_me: failed program was:" >&5
19431 cat "conftest.$ac_ext" >&5
19432 ac_cv_lib_iconv_libiconv_open=no
19433 fi
19434 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19435 LIBS=$ac_check_lib_save_LIBS
19436 fi
19437 echo "$as_me:19437: result: $ac_cv_lib_iconv_libiconv_open" >&5
19438 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19439 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19440
19441 cf_add_libs="$LIBS"
19442 # reverse order
19443 cf_add_0lib=
19444 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19445 # filter duplicates
19446 for cf_add_1lib in $cf_add_0lib; do
19447         for cf_add_2lib in $cf_add_libs; do
19448                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19449                         cf_add_1lib=
19450                         break
19451                 fi
19452         done
19453         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19454 done
19455 LIBS="$cf_add_libs"
19456
19457 fi
19458
19459                 echo "$as_me:19459: checking for libintl_gettext in -lintl" >&5
19460 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19461 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19462   echo $ECHO_N "(cached) $ECHO_C" >&6
19463 else
19464   ac_check_lib_save_LIBS=$LIBS
19465 LIBS="-lintl  $LIBS"
19466 cat >"conftest.$ac_ext" <<_ACEOF
19467 #line 19467 "configure"
19468 #include "confdefs.h"
19469
19470 /* Override any gcc2 internal prototype to avoid an error.  */
19471 #ifdef __cplusplus
19472 extern "C"
19473 #endif
19474 /* We use char because int might match the return type of a gcc2
19475    builtin and then its argument prototype would still apply.  */
19476 char libintl_gettext ();
19477 int
19478 main (void)
19479 {
19480 libintl_gettext ();
19481   ;
19482   return 0;
19483 }
19484 _ACEOF
19485 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19486 if { (eval echo "$as_me:19486: \"$ac_link\"") >&5
19487   (eval $ac_link) 2>&5
19488   ac_status=$?
19489   echo "$as_me:19489: \$? = $ac_status" >&5
19490   (exit "$ac_status"); } &&
19491          { ac_try='test -s "conftest$ac_exeext"'
19492   { (eval echo "$as_me:19492: \"$ac_try\"") >&5
19493   (eval $ac_try) 2>&5
19494   ac_status=$?
19495   echo "$as_me:19495: \$? = $ac_status" >&5
19496   (exit "$ac_status"); }; }; then
19497   ac_cv_lib_intl_libintl_gettext=yes
19498 else
19499   echo "$as_me: failed program was:" >&5
19500 cat "conftest.$ac_ext" >&5
19501 ac_cv_lib_intl_libintl_gettext=no
19502 fi
19503 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19504 LIBS=$ac_check_lib_save_LIBS
19505 fi
19506 echo "$as_me:19506: result: $ac_cv_lib_intl_libintl_gettext" >&5
19507 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19508 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19509
19510 cf_add_libs="$LIBS"
19511 # reverse order
19512 cf_add_0lib=
19513 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19514 # filter duplicates
19515 for cf_add_1lib in $cf_add_0lib; do
19516         for cf_add_2lib in $cf_add_libs; do
19517                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19518                         cf_add_1lib=
19519                         break
19520                 fi
19521         done
19522         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19523 done
19524 LIBS="$cf_add_libs"
19525
19526 fi
19527
19528                 echo "$as_me:19528: checking for tre_regcomp in -ltre" >&5
19529 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19530 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19531   echo $ECHO_N "(cached) $ECHO_C" >&6
19532 else
19533   ac_check_lib_save_LIBS=$LIBS
19534 LIBS="-ltre  $LIBS"
19535 cat >"conftest.$ac_ext" <<_ACEOF
19536 #line 19536 "configure"
19537 #include "confdefs.h"
19538
19539 /* Override any gcc2 internal prototype to avoid an error.  */
19540 #ifdef __cplusplus
19541 extern "C"
19542 #endif
19543 /* We use char because int might match the return type of a gcc2
19544    builtin and then its argument prototype would still apply.  */
19545 char tre_regcomp ();
19546 int
19547 main (void)
19548 {
19549 tre_regcomp ();
19550   ;
19551   return 0;
19552 }
19553 _ACEOF
19554 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19555 if { (eval echo "$as_me:19555: \"$ac_link\"") >&5
19556   (eval $ac_link) 2>&5
19557   ac_status=$?
19558   echo "$as_me:19558: \$? = $ac_status" >&5
19559   (exit "$ac_status"); } &&
19560          { ac_try='test -s "conftest$ac_exeext"'
19561   { (eval echo "$as_me:19561: \"$ac_try\"") >&5
19562   (eval $ac_try) 2>&5
19563   ac_status=$?
19564   echo "$as_me:19564: \$? = $ac_status" >&5
19565   (exit "$ac_status"); }; }; then
19566   ac_cv_lib_tre_tre_regcomp=yes
19567 else
19568   echo "$as_me: failed program was:" >&5
19569 cat "conftest.$ac_ext" >&5
19570 ac_cv_lib_tre_tre_regcomp=no
19571 fi
19572 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19573 LIBS=$ac_check_lib_save_LIBS
19574 fi
19575 echo "$as_me:19575: result: $ac_cv_lib_tre_tre_regcomp" >&5
19576 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19577 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19578
19579 cf_add_libs="$LIBS"
19580 # reverse order
19581 cf_add_0lib=
19582 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19583 # filter duplicates
19584 for cf_add_1lib in $cf_add_0lib; do
19585         for cf_add_2lib in $cf_add_libs; do
19586                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19587                         cf_add_1lib=
19588                         break
19589                 fi
19590         done
19591         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19592 done
19593 LIBS="$cf_add_libs"
19594
19595 fi
19596
19597 cf_add_libs="$LIBS"
19598 # reverse order
19599 cf_add_0lib=
19600 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19601 # filter duplicates
19602 for cf_add_1lib in $cf_add_0lib; do
19603         for cf_add_2lib in $cf_add_libs; do
19604                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19605                         cf_add_1lib=
19606                         break
19607                 fi
19608         done
19609         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19610 done
19611 LIBS="$cf_add_libs"
19612
19613                 cf_regex_func=regcomp
19614
19615 else
19616
19617                 echo "$as_me:19617: checking for regcomp in -lgnurx" >&5
19618 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19619 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19620   echo $ECHO_N "(cached) $ECHO_C" >&6
19621 else
19622   ac_check_lib_save_LIBS=$LIBS
19623 LIBS="-lgnurx  $LIBS"
19624 cat >"conftest.$ac_ext" <<_ACEOF
19625 #line 19625 "configure"
19626 #include "confdefs.h"
19627
19628 /* Override any gcc2 internal prototype to avoid an error.  */
19629 #ifdef __cplusplus
19630 extern "C"
19631 #endif
19632 /* We use char because int might match the return type of a gcc2
19633    builtin and then its argument prototype would still apply.  */
19634 char regcomp ();
19635 int
19636 main (void)
19637 {
19638 regcomp ();
19639   ;
19640   return 0;
19641 }
19642 _ACEOF
19643 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19644 if { (eval echo "$as_me:19644: \"$ac_link\"") >&5
19645   (eval $ac_link) 2>&5
19646   ac_status=$?
19647   echo "$as_me:19647: \$? = $ac_status" >&5
19648   (exit "$ac_status"); } &&
19649          { ac_try='test -s "conftest$ac_exeext"'
19650   { (eval echo "$as_me:19650: \"$ac_try\"") >&5
19651   (eval $ac_try) 2>&5
19652   ac_status=$?
19653   echo "$as_me:19653: \$? = $ac_status" >&5
19654   (exit "$ac_status"); }; }; then
19655   ac_cv_lib_gnurx_regcomp=yes
19656 else
19657   echo "$as_me: failed program was:" >&5
19658 cat "conftest.$ac_ext" >&5
19659 ac_cv_lib_gnurx_regcomp=no
19660 fi
19661 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19662 LIBS=$ac_check_lib_save_LIBS
19663 fi
19664 echo "$as_me:19664: result: $ac_cv_lib_gnurx_regcomp" >&5
19665 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19666 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19667
19668 cf_add_libs="$LIBS"
19669 # reverse order
19670 cf_add_0lib=
19671 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19672 # filter duplicates
19673 for cf_add_1lib in $cf_add_0lib; do
19674         for cf_add_2lib in $cf_add_libs; do
19675                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19676                         cf_add_1lib=
19677                         break
19678                 fi
19679         done
19680         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19681 done
19682 LIBS="$cf_add_libs"
19683
19684                         cf_regex_func=regcomp
19685 fi
19686
19687 fi
19688
19689         ;;
19690 (*)
19691         cf_regex_libs="regex re"
19692         echo "$as_me:19692: checking for regcomp" >&5
19693 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19694 if test "${ac_cv_func_regcomp+set}" = set; then
19695   echo $ECHO_N "(cached) $ECHO_C" >&6
19696 else
19697   cat >"conftest.$ac_ext" <<_ACEOF
19698 #line 19698 "configure"
19699 #include "confdefs.h"
19700 #define regcomp autoconf_temporary
19701 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19702 #undef regcomp
19703
19704 #ifdef __cplusplus
19705 extern "C"
19706 #endif
19707
19708 /* We use char because int might match the return type of a gcc2
19709    builtin and then its argument prototype would still apply.  */
19710 char regcomp (void);
19711
19712 int
19713 main (void)
19714 {
19715
19716 /* The GNU C library defines stubs for functions which it implements
19717     to always fail with ENOSYS.  Some functions are actually named
19718     something starting with __ and the normal name is an alias.  */
19719 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19720 #error found stub for regcomp
19721 #endif
19722
19723         return regcomp ();
19724   ;
19725   return 0;
19726 }
19727 _ACEOF
19728 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19729 if { (eval echo "$as_me:19729: \"$ac_link\"") >&5
19730   (eval $ac_link) 2>&5
19731   ac_status=$?
19732   echo "$as_me:19732: \$? = $ac_status" >&5
19733   (exit "$ac_status"); } &&
19734          { ac_try='test -s "conftest$ac_exeext"'
19735   { (eval echo "$as_me:19735: \"$ac_try\"") >&5
19736   (eval $ac_try) 2>&5
19737   ac_status=$?
19738   echo "$as_me:19738: \$? = $ac_status" >&5
19739   (exit "$ac_status"); }; }; then
19740   ac_cv_func_regcomp=yes
19741 else
19742   echo "$as_me: failed program was:" >&5
19743 cat "conftest.$ac_ext" >&5
19744 ac_cv_func_regcomp=no
19745 fi
19746 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19747 fi
19748 echo "$as_me:19748: result: $ac_cv_func_regcomp" >&5
19749 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19750 if test "$ac_cv_func_regcomp" = yes; then
19751   cf_regex_func=regcomp
19752 else
19753
19754                 for cf_regex_lib in $cf_regex_libs
19755                 do
19756                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19757 echo "$as_me:19757: checking for regcomp in -l$cf_regex_lib" >&5
19758 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19759 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19760   echo $ECHO_N "(cached) $ECHO_C" >&6
19761 else
19762   ac_check_lib_save_LIBS=$LIBS
19763 LIBS="-l$cf_regex_lib  $LIBS"
19764 cat >"conftest.$ac_ext" <<_ACEOF
19765 #line 19765 "configure"
19766 #include "confdefs.h"
19767
19768 /* Override any gcc2 internal prototype to avoid an error.  */
19769 #ifdef __cplusplus
19770 extern "C"
19771 #endif
19772 /* We use char because int might match the return type of a gcc2
19773    builtin and then its argument prototype would still apply.  */
19774 char regcomp ();
19775 int
19776 main (void)
19777 {
19778 regcomp ();
19779   ;
19780   return 0;
19781 }
19782 _ACEOF
19783 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19784 if { (eval echo "$as_me:19784: \"$ac_link\"") >&5
19785   (eval $ac_link) 2>&5
19786   ac_status=$?
19787   echo "$as_me:19787: \$? = $ac_status" >&5
19788   (exit "$ac_status"); } &&
19789          { ac_try='test -s "conftest$ac_exeext"'
19790   { (eval echo "$as_me:19790: \"$ac_try\"") >&5
19791   (eval $ac_try) 2>&5
19792   ac_status=$?
19793   echo "$as_me:19793: \$? = $ac_status" >&5
19794   (exit "$ac_status"); }; }; then
19795   eval "$as_ac_Lib=yes"
19796 else
19797   echo "$as_me: failed program was:" >&5
19798 cat "conftest.$ac_ext" >&5
19799 eval "$as_ac_Lib=no"
19800 fi
19801 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19802 LIBS=$ac_check_lib_save_LIBS
19803 fi
19804 echo "$as_me:19804: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19805 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19806 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19807
19808 cf_add_libs="$LIBS"
19809 # reverse order
19810 cf_add_0lib=
19811 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19812 # filter duplicates
19813 for cf_add_1lib in $cf_add_0lib; do
19814         for cf_add_2lib in $cf_add_libs; do
19815                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19816                         cf_add_1lib=
19817                         break
19818                 fi
19819         done
19820         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19821 done
19822 LIBS="$cf_add_libs"
19823
19824                                         cf_regex_func=regcomp
19825                                         break
19826 fi
19827
19828                 done
19829
19830 fi
19831
19832         ;;
19833 esac
19834
19835 if test "$cf_regex_func" = no ; then
19836         echo "$as_me:19836: checking for compile" >&5
19837 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19838 if test "${ac_cv_func_compile+set}" = set; then
19839   echo $ECHO_N "(cached) $ECHO_C" >&6
19840 else
19841   cat >"conftest.$ac_ext" <<_ACEOF
19842 #line 19842 "configure"
19843 #include "confdefs.h"
19844 #define compile autoconf_temporary
19845 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19846 #undef compile
19847
19848 #ifdef __cplusplus
19849 extern "C"
19850 #endif
19851
19852 /* We use char because int might match the return type of a gcc2
19853    builtin and then its argument prototype would still apply.  */
19854 char compile (void);
19855
19856 int
19857 main (void)
19858 {
19859
19860 /* The GNU C library defines stubs for functions which it implements
19861     to always fail with ENOSYS.  Some functions are actually named
19862     something starting with __ and the normal name is an alias.  */
19863 #if defined (__stub_compile) || defined (__stub___compile)
19864 #error found stub for compile
19865 #endif
19866
19867         return compile ();
19868   ;
19869   return 0;
19870 }
19871 _ACEOF
19872 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19873 if { (eval echo "$as_me:19873: \"$ac_link\"") >&5
19874   (eval $ac_link) 2>&5
19875   ac_status=$?
19876   echo "$as_me:19876: \$? = $ac_status" >&5
19877   (exit "$ac_status"); } &&
19878          { ac_try='test -s "conftest$ac_exeext"'
19879   { (eval echo "$as_me:19879: \"$ac_try\"") >&5
19880   (eval $ac_try) 2>&5
19881   ac_status=$?
19882   echo "$as_me:19882: \$? = $ac_status" >&5
19883   (exit "$ac_status"); }; }; then
19884   ac_cv_func_compile=yes
19885 else
19886   echo "$as_me: failed program was:" >&5
19887 cat "conftest.$ac_ext" >&5
19888 ac_cv_func_compile=no
19889 fi
19890 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19891 fi
19892 echo "$as_me:19892: result: $ac_cv_func_compile" >&5
19893 echo "${ECHO_T}$ac_cv_func_compile" >&6
19894 if test "$ac_cv_func_compile" = yes; then
19895   cf_regex_func=compile
19896 else
19897
19898                 echo "$as_me:19898: checking for compile in -lgen" >&5
19899 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19900 if test "${ac_cv_lib_gen_compile+set}" = set; then
19901   echo $ECHO_N "(cached) $ECHO_C" >&6
19902 else
19903   ac_check_lib_save_LIBS=$LIBS
19904 LIBS="-lgen  $LIBS"
19905 cat >"conftest.$ac_ext" <<_ACEOF
19906 #line 19906 "configure"
19907 #include "confdefs.h"
19908
19909 /* Override any gcc2 internal prototype to avoid an error.  */
19910 #ifdef __cplusplus
19911 extern "C"
19912 #endif
19913 /* We use char because int might match the return type of a gcc2
19914    builtin and then its argument prototype would still apply.  */
19915 char compile ();
19916 int
19917 main (void)
19918 {
19919 compile ();
19920   ;
19921   return 0;
19922 }
19923 _ACEOF
19924 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19925 if { (eval echo "$as_me:19925: \"$ac_link\"") >&5
19926   (eval $ac_link) 2>&5
19927   ac_status=$?
19928   echo "$as_me:19928: \$? = $ac_status" >&5
19929   (exit "$ac_status"); } &&
19930          { ac_try='test -s "conftest$ac_exeext"'
19931   { (eval echo "$as_me:19931: \"$ac_try\"") >&5
19932   (eval $ac_try) 2>&5
19933   ac_status=$?
19934   echo "$as_me:19934: \$? = $ac_status" >&5
19935   (exit "$ac_status"); }; }; then
19936   ac_cv_lib_gen_compile=yes
19937 else
19938   echo "$as_me: failed program was:" >&5
19939 cat "conftest.$ac_ext" >&5
19940 ac_cv_lib_gen_compile=no
19941 fi
19942 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19943 LIBS=$ac_check_lib_save_LIBS
19944 fi
19945 echo "$as_me:19945: result: $ac_cv_lib_gen_compile" >&5
19946 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19947 if test "$ac_cv_lib_gen_compile" = yes; then
19948
19949 cf_add_libs="$LIBS"
19950 # reverse order
19951 cf_add_0lib=
19952 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19953 # filter duplicates
19954 for cf_add_1lib in $cf_add_0lib; do
19955         for cf_add_2lib in $cf_add_libs; do
19956                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19957                         cf_add_1lib=
19958                         break
19959                 fi
19960         done
19961         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19962 done
19963 LIBS="$cf_add_libs"
19964
19965                                 cf_regex_func=compile
19966 fi
19967
19968 fi
19969
19970 fi
19971
19972 if test "$cf_regex_func" = no ; then
19973         { echo "$as_me:19973: WARNING: cannot find regular expression library" >&5
19974 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19975 fi
19976
19977 echo "$as_me:19977: checking for regular-expression headers" >&5
19978 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19979 if test "${cf_cv_regex_hdrs+set}" = set; then
19980   echo $ECHO_N "(cached) $ECHO_C" >&6
19981 else
19982
19983 cf_cv_regex_hdrs=no
19984 case "$cf_regex_func" in
19985 (compile)
19986         for cf_regex_hdr in regexp.h regexpr.h
19987         do
19988                 cat >"conftest.$ac_ext" <<_ACEOF
19989 #line 19989 "configure"
19990 #include "confdefs.h"
19991 #include <$cf_regex_hdr>
19992 int
19993 main (void)
19994 {
19995
19996                         char *p = compile("", "", "", 0);
19997                         int x = step("", "");
19998                         (void)p;
19999                         (void)x;
20000
20001   ;
20002   return 0;
20003 }
20004 _ACEOF
20005 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20006 if { (eval echo "$as_me:20006: \"$ac_link\"") >&5
20007   (eval $ac_link) 2>&5
20008   ac_status=$?
20009   echo "$as_me:20009: \$? = $ac_status" >&5
20010   (exit "$ac_status"); } &&
20011          { ac_try='test -s "conftest$ac_exeext"'
20012   { (eval echo "$as_me:20012: \"$ac_try\"") >&5
20013   (eval $ac_try) 2>&5
20014   ac_status=$?
20015   echo "$as_me:20015: \$? = $ac_status" >&5
20016   (exit "$ac_status"); }; }; then
20017
20018                         cf_cv_regex_hdrs=$cf_regex_hdr
20019                         break
20020
20021 else
20022   echo "$as_me: failed program was:" >&5
20023 cat "conftest.$ac_ext" >&5
20024 fi
20025 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20026         done
20027         ;;
20028 (*)
20029         for cf_regex_hdr in regex.h
20030         do
20031                 cat >"conftest.$ac_ext" <<_ACEOF
20032 #line 20032 "configure"
20033 #include "confdefs.h"
20034 #include <sys/types.h>
20035 #include <$cf_regex_hdr>
20036 int
20037 main (void)
20038 {
20039
20040                         regex_t *p = 0;
20041                         int x = regcomp(p, "", 0);
20042                         int y = regexec(p, "", 0, 0, 0);
20043                         (void)x;
20044                         (void)y;
20045                         regfree(p);
20046
20047   ;
20048   return 0;
20049 }
20050 _ACEOF
20051 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20052 if { (eval echo "$as_me:20052: \"$ac_link\"") >&5
20053   (eval $ac_link) 2>&5
20054   ac_status=$?
20055   echo "$as_me:20055: \$? = $ac_status" >&5
20056   (exit "$ac_status"); } &&
20057          { ac_try='test -s "conftest$ac_exeext"'
20058   { (eval echo "$as_me:20058: \"$ac_try\"") >&5
20059   (eval $ac_try) 2>&5
20060   ac_status=$?
20061   echo "$as_me:20061: \$? = $ac_status" >&5
20062   (exit "$ac_status"); }; }; then
20063
20064                         cf_cv_regex_hdrs=$cf_regex_hdr
20065                         break
20066
20067 else
20068   echo "$as_me: failed program was:" >&5
20069 cat "conftest.$ac_ext" >&5
20070 fi
20071 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20072         done
20073         ;;
20074 esac
20075
20076 fi
20077 echo "$as_me:20077: result: $cf_cv_regex_hdrs" >&5
20078 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20079
20080 case "$cf_cv_regex_hdrs" in
20081         (no)            { echo "$as_me:20081: WARNING: no regular expression header found" >&5
20082 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20083         (regex.h)
20084 cat >>confdefs.h <<\EOF
20085 #define HAVE_REGEX_H_FUNCS 1
20086 EOF
20087  ;;
20088         (regexp.h)
20089 cat >>confdefs.h <<\EOF
20090 #define HAVE_REGEXP_H_FUNCS 1
20091 EOF
20092  ;;
20093         (regexpr.h)
20094 cat >>confdefs.h <<\EOF
20095 #define HAVE_REGEXPR_H_FUNCS 1
20096 EOF
20097  ;;
20098 esac
20099
20100 for ac_header in \
20101 fcntl.h \
20102 getopt.h \
20103 limits.h \
20104 locale.h \
20105 math.h \
20106 poll.h \
20107 sys/auxv.h \
20108 sys/ioctl.h \
20109 sys/param.h \
20110 sys/poll.h \
20111 sys/select.h \
20112 sys/time.h \
20113 sys/times.h \
20114 unistd.h \
20115 wctype.h \
20116
20117 do
20118 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20119 echo "$as_me:20119: checking for $ac_header" >&5
20120 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20121 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20122   echo $ECHO_N "(cached) $ECHO_C" >&6
20123 else
20124   cat >"conftest.$ac_ext" <<_ACEOF
20125 #line 20125 "configure"
20126 #include "confdefs.h"
20127 #include <$ac_header>
20128 _ACEOF
20129 if { (eval echo "$as_me:20129: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20130   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20131   ac_status=$?
20132   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20133   rm -f conftest.er1
20134   cat conftest.err >&5
20135   echo "$as_me:20135: \$? = $ac_status" >&5
20136   (exit "$ac_status"); } >/dev/null; then
20137   if test -s conftest.err; then
20138     ac_cpp_err=$ac_c_preproc_warn_flag
20139   else
20140     ac_cpp_err=
20141   fi
20142 else
20143   ac_cpp_err=yes
20144 fi
20145 if test -z "$ac_cpp_err"; then
20146   eval "$as_ac_Header=yes"
20147 else
20148   echo "$as_me: failed program was:" >&5
20149   cat "conftest.$ac_ext" >&5
20150   eval "$as_ac_Header=no"
20151 fi
20152 rm -f conftest.err "conftest.$ac_ext"
20153 fi
20154 echo "$as_me:20154: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20155 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20156 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20157   cat >>confdefs.h <<EOF
20158 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20159 EOF
20160
20161 fi
20162 done
20163
20164 for ac_header in unistd.h getopt.h
20165 do
20166 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20167 echo "$as_me:20167: checking for $ac_header" >&5
20168 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20169 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20170   echo $ECHO_N "(cached) $ECHO_C" >&6
20171 else
20172   cat >"conftest.$ac_ext" <<_ACEOF
20173 #line 20173 "configure"
20174 #include "confdefs.h"
20175 #include <$ac_header>
20176 _ACEOF
20177 if { (eval echo "$as_me:20177: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20178   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20179   ac_status=$?
20180   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20181   rm -f conftest.er1
20182   cat conftest.err >&5
20183   echo "$as_me:20183: \$? = $ac_status" >&5
20184   (exit "$ac_status"); } >/dev/null; then
20185   if test -s conftest.err; then
20186     ac_cpp_err=$ac_c_preproc_warn_flag
20187   else
20188     ac_cpp_err=
20189   fi
20190 else
20191   ac_cpp_err=yes
20192 fi
20193 if test -z "$ac_cpp_err"; then
20194   eval "$as_ac_Header=yes"
20195 else
20196   echo "$as_me: failed program was:" >&5
20197   cat "conftest.$ac_ext" >&5
20198   eval "$as_ac_Header=no"
20199 fi
20200 rm -f conftest.err "conftest.$ac_ext"
20201 fi
20202 echo "$as_me:20202: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20203 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20204 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20205   cat >>confdefs.h <<EOF
20206 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20207 EOF
20208
20209 fi
20210 done
20211
20212 echo "$as_me:20212: checking for header declaring getopt variables" >&5
20213 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20214 if test "${cf_cv_getopt_header+set}" = set; then
20215   echo $ECHO_N "(cached) $ECHO_C" >&6
20216 else
20217
20218 cf_cv_getopt_header=none
20219 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20220 do
20221 cat >"conftest.$ac_ext" <<_ACEOF
20222 #line 20222 "configure"
20223 #include "confdefs.h"
20224
20225 #include <$cf_header>
20226 int
20227 main (void)
20228 {
20229 int x = optind; char *y = optarg; (void)x; (void)y
20230   ;
20231   return 0;
20232 }
20233 _ACEOF
20234 rm -f "conftest.$ac_objext"
20235 if { (eval echo "$as_me:20235: \"$ac_compile\"") >&5
20236   (eval $ac_compile) 2>&5
20237   ac_status=$?
20238   echo "$as_me:20238: \$? = $ac_status" >&5
20239   (exit "$ac_status"); } &&
20240          { ac_try='test -s "conftest.$ac_objext"'
20241   { (eval echo "$as_me:20241: \"$ac_try\"") >&5
20242   (eval $ac_try) 2>&5
20243   ac_status=$?
20244   echo "$as_me:20244: \$? = $ac_status" >&5
20245   (exit "$ac_status"); }; }; then
20246   cf_cv_getopt_header=$cf_header
20247  break
20248 else
20249   echo "$as_me: failed program was:" >&5
20250 cat "conftest.$ac_ext" >&5
20251 fi
20252 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20253 done
20254
20255 fi
20256 echo "$as_me:20256: result: $cf_cv_getopt_header" >&5
20257 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20258 if test "$cf_cv_getopt_header" != none ; then
20259
20260 cat >>confdefs.h <<\EOF
20261 #define HAVE_GETOPT_HEADER 1
20262 EOF
20263
20264 fi
20265 if test "$cf_cv_getopt_header" = getopt.h ; then
20266
20267 cat >>confdefs.h <<\EOF
20268 #define NEED_GETOPT_H 1
20269 EOF
20270
20271 fi
20272
20273 echo "$as_me:20273: checking if external environ is declared" >&5
20274 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20275 if test "${cf_cv_dcl_environ+set}" = set; then
20276   echo $ECHO_N "(cached) $ECHO_C" >&6
20277 else
20278
20279     cat >"conftest.$ac_ext" <<_ACEOF
20280 #line 20280 "configure"
20281 #include "confdefs.h"
20282
20283 $ac_includes_default
20284 int
20285 main (void)
20286 {
20287 void* x = (void*) environ; (void)x
20288   ;
20289   return 0;
20290 }
20291 _ACEOF
20292 rm -f "conftest.$ac_objext"
20293 if { (eval echo "$as_me:20293: \"$ac_compile\"") >&5
20294   (eval $ac_compile) 2>&5
20295   ac_status=$?
20296   echo "$as_me:20296: \$? = $ac_status" >&5
20297   (exit "$ac_status"); } &&
20298          { ac_try='test -s "conftest.$ac_objext"'
20299   { (eval echo "$as_me:20299: \"$ac_try\"") >&5
20300   (eval $ac_try) 2>&5
20301   ac_status=$?
20302   echo "$as_me:20302: \$? = $ac_status" >&5
20303   (exit "$ac_status"); }; }; then
20304   cf_cv_dcl_environ=yes
20305 else
20306   echo "$as_me: failed program was:" >&5
20307 cat "conftest.$ac_ext" >&5
20308 cf_cv_dcl_environ=no
20309 fi
20310 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20311
20312 fi
20313 echo "$as_me:20313: result: $cf_cv_dcl_environ" >&5
20314 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20315
20316 if test "$cf_cv_dcl_environ" = no ; then
20317
20318 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20319
20320     cat >>confdefs.h <<EOF
20321 #define $cf_result 1
20322 EOF
20323
20324 fi
20325
20326 # It's possible (for near-UNIX clones) that the data doesn't exist
20327
20328 echo "$as_me:20328: checking if external environ exists" >&5
20329 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20330 if test "${cf_cv_have_environ+set}" = set; then
20331   echo $ECHO_N "(cached) $ECHO_C" >&6
20332 else
20333
20334         cat >"conftest.$ac_ext" <<_ACEOF
20335 #line 20335 "configure"
20336 #include "confdefs.h"
20337
20338 #undef environ
20339 extern int environ;
20340
20341 int
20342 main (void)
20343 {
20344 environ = 2
20345   ;
20346   return 0;
20347 }
20348 _ACEOF
20349 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20350 if { (eval echo "$as_me:20350: \"$ac_link\"") >&5
20351   (eval $ac_link) 2>&5
20352   ac_status=$?
20353   echo "$as_me:20353: \$? = $ac_status" >&5
20354   (exit "$ac_status"); } &&
20355          { ac_try='test -s "conftest$ac_exeext"'
20356   { (eval echo "$as_me:20356: \"$ac_try\"") >&5
20357   (eval $ac_try) 2>&5
20358   ac_status=$?
20359   echo "$as_me:20359: \$? = $ac_status" >&5
20360   (exit "$ac_status"); }; }; then
20361   cf_cv_have_environ=yes
20362 else
20363   echo "$as_me: failed program was:" >&5
20364 cat "conftest.$ac_ext" >&5
20365 cf_cv_have_environ=no
20366 fi
20367 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20368
20369 fi
20370 echo "$as_me:20370: result: $cf_cv_have_environ" >&5
20371 echo "${ECHO_T}$cf_cv_have_environ" >&6
20372
20373 if test "$cf_cv_have_environ" = yes ; then
20374
20375 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20376
20377         cat >>confdefs.h <<EOF
20378 #define $cf_result 1
20379 EOF
20380
20381 fi
20382
20383 echo "$as_me:20383: checking for getenv" >&5
20384 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20385 if test "${ac_cv_func_getenv+set}" = set; then
20386   echo $ECHO_N "(cached) $ECHO_C" >&6
20387 else
20388   cat >"conftest.$ac_ext" <<_ACEOF
20389 #line 20389 "configure"
20390 #include "confdefs.h"
20391 #define getenv autoconf_temporary
20392 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20393 #undef getenv
20394
20395 #ifdef __cplusplus
20396 extern "C"
20397 #endif
20398
20399 /* We use char because int might match the return type of a gcc2
20400    builtin and then its argument prototype would still apply.  */
20401 char getenv (void);
20402
20403 int
20404 main (void)
20405 {
20406
20407 /* The GNU C library defines stubs for functions which it implements
20408     to always fail with ENOSYS.  Some functions are actually named
20409     something starting with __ and the normal name is an alias.  */
20410 #if defined (__stub_getenv) || defined (__stub___getenv)
20411 #error found stub for getenv
20412 #endif
20413
20414         return getenv ();
20415   ;
20416   return 0;
20417 }
20418 _ACEOF
20419 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20420 if { (eval echo "$as_me:20420: \"$ac_link\"") >&5
20421   (eval $ac_link) 2>&5
20422   ac_status=$?
20423   echo "$as_me:20423: \$? = $ac_status" >&5
20424   (exit "$ac_status"); } &&
20425          { ac_try='test -s "conftest$ac_exeext"'
20426   { (eval echo "$as_me:20426: \"$ac_try\"") >&5
20427   (eval $ac_try) 2>&5
20428   ac_status=$?
20429   echo "$as_me:20429: \$? = $ac_status" >&5
20430   (exit "$ac_status"); }; }; then
20431   ac_cv_func_getenv=yes
20432 else
20433   echo "$as_me: failed program was:" >&5
20434 cat "conftest.$ac_ext" >&5
20435 ac_cv_func_getenv=no
20436 fi
20437 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20438 fi
20439 echo "$as_me:20439: result: $ac_cv_func_getenv" >&5
20440 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20441
20442 for ac_func in putenv setenv strdup
20443 do
20444 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20445 echo "$as_me:20445: checking for $ac_func" >&5
20446 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20447 if eval "test \"\${$as_ac_var+set}\" = set"; then
20448   echo $ECHO_N "(cached) $ECHO_C" >&6
20449 else
20450   cat >"conftest.$ac_ext" <<_ACEOF
20451 #line 20451 "configure"
20452 #include "confdefs.h"
20453 #define $ac_func autoconf_temporary
20454 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20455 #undef $ac_func
20456
20457 #ifdef __cplusplus
20458 extern "C"
20459 #endif
20460
20461 /* We use char because int might match the return type of a gcc2
20462    builtin and then its argument prototype would still apply.  */
20463 char $ac_func (void);
20464
20465 int
20466 main (void)
20467 {
20468
20469 /* The GNU C library defines stubs for functions which it implements
20470     to always fail with ENOSYS.  Some functions are actually named
20471     something starting with __ and the normal name is an alias.  */
20472 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20473 #error found stub for $ac_func
20474 #endif
20475
20476         return $ac_func ();
20477   ;
20478   return 0;
20479 }
20480 _ACEOF
20481 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20482 if { (eval echo "$as_me:20482: \"$ac_link\"") >&5
20483   (eval $ac_link) 2>&5
20484   ac_status=$?
20485   echo "$as_me:20485: \$? = $ac_status" >&5
20486   (exit "$ac_status"); } &&
20487          { ac_try='test -s "conftest$ac_exeext"'
20488   { (eval echo "$as_me:20488: \"$ac_try\"") >&5
20489   (eval $ac_try) 2>&5
20490   ac_status=$?
20491   echo "$as_me:20491: \$? = $ac_status" >&5
20492   (exit "$ac_status"); }; }; then
20493   eval "$as_ac_var=yes"
20494 else
20495   echo "$as_me: failed program was:" >&5
20496 cat "conftest.$ac_ext" >&5
20497 eval "$as_ac_var=no"
20498 fi
20499 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20500 fi
20501 echo "$as_me:20501: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20502 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20503 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20504   cat >>confdefs.h <<EOF
20505 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20506 EOF
20507
20508 fi
20509 done
20510
20511 echo "$as_me:20511: checking if getenv returns consistent values" >&5
20512 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20513 if test "${cf_cv_consistent_getenv+set}" = set; then
20514   echo $ECHO_N "(cached) $ECHO_C" >&6
20515 else
20516
20517 if test "$cross_compiling" = yes; then
20518   cf_cv_consistent_getenv=unknown
20519 else
20520   cat >"conftest.$ac_ext" <<_ACEOF
20521 #line 20521 "configure"
20522 #include "confdefs.h"
20523
20524 $ac_includes_default
20525
20526 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20527 extern char **environ;  /* POSIX, but some systems are not... */
20528 #endif
20529
20530 #if defined(HAVE_STRDUP)
20531 #define str_alloc(s) strdup(s)
20532 #else
20533 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20534 #endif
20535
20536 static void set_value(const char *name, const char *value)
20537 {
20538 #if defined(HAVE_SETENV)
20539         setenv(name, value, 1);
20540 #elif defined(HAVE_PUTENV)
20541         char buffer[1024];
20542         sprintf(buffer, "%s=%s", name, value);
20543         putenv(str_alloc(buffer));
20544 #else
20545 #error neither putenv/setenv found
20546 #endif
20547 }
20548 int main(void)
20549 {
20550         int pass;
20551         size_t numenv, limit, j;
20552         char **mynames;
20553         char **myvalues;
20554         char **mypointer;
20555         char *equals;
20556         for (numenv = 0; environ[numenv]; ++numenv) ;
20557         limit = numenv + 10;
20558         mynames = (char **) calloc(limit + 1, sizeof(char *));
20559         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20560         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20561 #if defined(HAVE_ENVIRON)
20562         for (j = 0; environ[j]; ++j) {
20563                 mynames[j] = str_alloc(environ[j]);
20564                 equals = strchr(mynames[j], '=');
20565                 if (equals != 0) {
20566                         *equals++ = '\\0';
20567                         myvalues[j] = str_alloc(equals);
20568                 } else {
20569                         myvalues[j] = str_alloc("");
20570                 }
20571         }
20572 #endif
20573         for (j = numenv; j < limit; ++j) {
20574                 char name[80];
20575                 char value[80];
20576                 size_t found;
20577                 size_t k = 0;
20578                 do {
20579                         size_t jk;
20580                         found = 0;
20581                         sprintf(name, "TERM%lu", (unsigned long) k);
20582                         for (jk = 0; jk < j; ++jk) {
20583                                 if (!strcmp(name, mynames[jk])) {
20584                                         found = 1;
20585                                         ++k;
20586                                         break;
20587                                 }
20588                         }
20589                 } while (found);
20590                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20591                 set_value(name, value);
20592                 mynames[j] = str_alloc(name);
20593                 myvalues[j] = str_alloc(value);
20594         }
20595         for (pass = 0; pass < 3; ++pass) {
20596                 for (j = 0; j < limit; ++j) {
20597                         char *value = getenv(mynames[j]);
20598                         if (pass) {
20599                                 if (value == 0) {
20600                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20601                                         ${cf_cv_main_return:-return}(1);
20602                                 } else if (value != mypointer[j]) {
20603                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20604                                         ${cf_cv_main_return:-return}(1);
20605                                 } else if (strcmp(value, myvalues[j])) {
20606                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20607                                         ${cf_cv_main_return:-return}(1);
20608                                 }
20609                         } else {
20610                                 size_t k;
20611                                 mypointer[j] = value;
20612                                 for (k = 0; k < j; ++k) {
20613                                         if (mypointer[j] == mypointer[k]) {
20614                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20615                                                 ${cf_cv_main_return:-return}(1);
20616                                         }
20617                                 }
20618                         }
20619                 }
20620         }
20621         ${cf_cv_main_return:-return}(0);
20622 }
20623
20624 _ACEOF
20625 rm -f "conftest$ac_exeext"
20626 if { (eval echo "$as_me:20626: \"$ac_link\"") >&5
20627   (eval $ac_link) 2>&5
20628   ac_status=$?
20629   echo "$as_me:20629: \$? = $ac_status" >&5
20630   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20631   { (eval echo "$as_me:20631: \"$ac_try\"") >&5
20632   (eval $ac_try) 2>&5
20633   ac_status=$?
20634   echo "$as_me:20634: \$? = $ac_status" >&5
20635   (exit "$ac_status"); }; }; then
20636   cf_cv_consistent_getenv=yes
20637 else
20638   echo "$as_me: program exited with status $ac_status" >&5
20639 echo "$as_me: failed program was:" >&5
20640 cat "conftest.$ac_ext" >&5
20641 cf_cv_consistent_getenv=no
20642 fi
20643 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20644 fi
20645
20646 fi
20647 echo "$as_me:20647: result: $cf_cv_consistent_getenv" >&5
20648 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20649
20650 if test "x$cf_cv_consistent_getenv" = xno
20651 then
20652
20653 cat >>confdefs.h <<\EOF
20654 #define HAVE_CONSISTENT_GETENV 1
20655 EOF
20656
20657 fi
20658
20659 if test "x$cf_cv_consistent_getenv" = xno && \
20660         test "x$cf_with_trace" = xyes
20661 then
20662         { echo "$as_me:20662: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20663 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20664 fi
20665
20666 echo "$as_me:20666: checking if sys/time.h works with sys/select.h" >&5
20667 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20668 if test "${cf_cv_sys_time_select+set}" = set; then
20669   echo $ECHO_N "(cached) $ECHO_C" >&6
20670 else
20671
20672 cat >"conftest.$ac_ext" <<_ACEOF
20673 #line 20673 "configure"
20674 #include "confdefs.h"
20675
20676 #include <sys/types.h>
20677 #ifdef HAVE_SYS_TIME_H
20678 #include <sys/time.h>
20679 #endif
20680 #ifdef HAVE_SYS_SELECT_H
20681 #include <sys/select.h>
20682 #endif
20683
20684 int
20685 main (void)
20686 {
20687
20688   ;
20689   return 0;
20690 }
20691 _ACEOF
20692 rm -f "conftest.$ac_objext"
20693 if { (eval echo "$as_me:20693: \"$ac_compile\"") >&5
20694   (eval $ac_compile) 2>&5
20695   ac_status=$?
20696   echo "$as_me:20696: \$? = $ac_status" >&5
20697   (exit "$ac_status"); } &&
20698          { ac_try='test -s "conftest.$ac_objext"'
20699   { (eval echo "$as_me:20699: \"$ac_try\"") >&5
20700   (eval $ac_try) 2>&5
20701   ac_status=$?
20702   echo "$as_me:20702: \$? = $ac_status" >&5
20703   (exit "$ac_status"); }; }; then
20704   cf_cv_sys_time_select=yes
20705 else
20706   echo "$as_me: failed program was:" >&5
20707 cat "conftest.$ac_ext" >&5
20708 cf_cv_sys_time_select=no
20709 fi
20710 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20711
20712 fi
20713
20714 echo "$as_me:20714: result: $cf_cv_sys_time_select" >&5
20715 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20716 test "$cf_cv_sys_time_select" = yes &&
20717 cat >>confdefs.h <<\EOF
20718 #define HAVE_SYS_TIME_SELECT 1
20719 EOF
20720
20721 ###     checks for compiler characteristics
20722 ac_ext=c
20723 ac_cpp='$CPP $CPPFLAGS'
20724 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20725 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20726 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20727 ac_main_return="return"
20728
20729 echo "$as_me:20729: checking for an ANSI C-conforming const" >&5
20730 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20731 if test "${ac_cv_c_const+set}" = set; then
20732   echo $ECHO_N "(cached) $ECHO_C" >&6
20733 else
20734   cat >"conftest.$ac_ext" <<_ACEOF
20735 #line 20735 "configure"
20736 #include "confdefs.h"
20737
20738 int
20739 main (void)
20740 {
20741 /* FIXME: Include the comments suggested by Paul. */
20742 #ifndef __cplusplus
20743   /* Ultrix mips cc rejects this.  */
20744   typedef int charset[2];
20745   const charset x;
20746   /* SunOS 4.1.1 cc rejects this.  */
20747   char const *const *ccp;
20748   char **p;
20749   /* NEC SVR4.0.2 mips cc rejects this.  */
20750   struct point {int x, y;};
20751   static struct point const zero = {0,0};
20752   /* AIX XL C 1.02.0.0 rejects this.
20753      It does not let you subtract one const X* pointer from another in
20754      an arm of an if-expression whose if-part is not a constant
20755      expression */
20756   const char *g = "string";
20757   ccp = &g + (g ? g-g : 0);
20758   /* HPUX 7.0 cc rejects these. */
20759   ++ccp;
20760   p = (char**) ccp;
20761   ccp = (char const *const *) p;
20762   { /* SCO 3.2v4 cc rejects this.  */
20763     char *t;
20764     char const *s = 0 ? (char *) 0 : (char const *) 0;
20765
20766     *t++ = 0;
20767   }
20768   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20769     int x[] = {25, 17};
20770     const int *foo = &x[0];
20771     ++foo;
20772   }
20773   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20774     typedef const int *iptr;
20775     iptr p = 0;
20776     ++p;
20777   }
20778   { /* AIX XL C 1.02.0.0 rejects this saying
20779        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20780     struct s { int j; const int *ap[3]; };
20781     struct s *b; b->j = 5;
20782   }
20783   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20784     const int foo = 10;
20785   }
20786 #endif
20787
20788   ;
20789   return 0;
20790 }
20791 _ACEOF
20792 rm -f "conftest.$ac_objext"
20793 if { (eval echo "$as_me:20793: \"$ac_compile\"") >&5
20794   (eval $ac_compile) 2>&5
20795   ac_status=$?
20796   echo "$as_me:20796: \$? = $ac_status" >&5
20797   (exit "$ac_status"); } &&
20798          { ac_try='test -s "conftest.$ac_objext"'
20799   { (eval echo "$as_me:20799: \"$ac_try\"") >&5
20800   (eval $ac_try) 2>&5
20801   ac_status=$?
20802   echo "$as_me:20802: \$? = $ac_status" >&5
20803   (exit "$ac_status"); }; }; then
20804   ac_cv_c_const=yes
20805 else
20806   echo "$as_me: failed program was:" >&5
20807 cat "conftest.$ac_ext" >&5
20808 ac_cv_c_const=no
20809 fi
20810 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20811 fi
20812 echo "$as_me:20812: result: $ac_cv_c_const" >&5
20813 echo "${ECHO_T}$ac_cv_c_const" >&6
20814 if test $ac_cv_c_const = no; then
20815
20816 cat >>confdefs.h <<\EOF
20817 #define const
20818 EOF
20819
20820 fi
20821
20822 echo "$as_me:20822: checking for inline" >&5
20823 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20824 if test "${ac_cv_c_inline+set}" = set; then
20825   echo $ECHO_N "(cached) $ECHO_C" >&6
20826 else
20827   ac_cv_c_inline=no
20828 for ac_kw in inline __inline__ __inline; do
20829   cat >"conftest.$ac_ext" <<_ACEOF
20830 #line 20830 "configure"
20831 #include "confdefs.h"
20832 #ifndef __cplusplus
20833 static $ac_kw int static_foo () {return 0; }
20834 $ac_kw int foo () {return 0; }
20835 #endif
20836
20837 _ACEOF
20838 rm -f "conftest.$ac_objext"
20839 if { (eval echo "$as_me:20839: \"$ac_compile\"") >&5
20840   (eval $ac_compile) 2>&5
20841   ac_status=$?
20842   echo "$as_me:20842: \$? = $ac_status" >&5
20843   (exit "$ac_status"); } &&
20844          { ac_try='test -s "conftest.$ac_objext"'
20845   { (eval echo "$as_me:20845: \"$ac_try\"") >&5
20846   (eval $ac_try) 2>&5
20847   ac_status=$?
20848   echo "$as_me:20848: \$? = $ac_status" >&5
20849   (exit "$ac_status"); }; }; then
20850   ac_cv_c_inline=$ac_kw; break
20851 else
20852   echo "$as_me: failed program was:" >&5
20853 cat "conftest.$ac_ext" >&5
20854 fi
20855 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20856 done
20857
20858 fi
20859 echo "$as_me:20859: result: $ac_cv_c_inline" >&5
20860 echo "${ECHO_T}$ac_cv_c_inline" >&6
20861 case $ac_cv_c_inline in
20862   inline | yes) ;;
20863   no)
20864 cat >>confdefs.h <<\EOF
20865 #define inline
20866 EOF
20867  ;;
20868   *)  cat >>confdefs.h <<EOF
20869 #define inline $ac_cv_c_inline
20870 EOF
20871  ;;
20872 esac
20873
20874 NCURSES_INLINE=
20875 if test "$ac_cv_c_inline" != no ; then
20876         NCURSES_INLINE=inline
20877         if test "$INTEL_COMPILER" = yes
20878         then
20879                 :
20880         elif test "$CLANG_COMPILER" = yes
20881         then
20882                 :
20883         elif test "$GCC" = yes
20884         then
20885                 echo "$as_me:20885: checking if $CC supports options to tune inlining" >&5
20886 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20887 if test "${cf_cv_gcc_inline+set}" = set; then
20888   echo $ECHO_N "(cached) $ECHO_C" >&6
20889 else
20890
20891                 cf_save_CFLAGS=$CFLAGS
20892                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20893                 cat >"conftest.$ac_ext" <<_ACEOF
20894 #line 20894 "configure"
20895 #include "confdefs.h"
20896 inline int foo(void) { return 1; }
20897 int
20898 main (void)
20899 {
20900 ${cf_cv_main_return:-return} foo()
20901   ;
20902   return 0;
20903 }
20904 _ACEOF
20905 rm -f "conftest.$ac_objext"
20906 if { (eval echo "$as_me:20906: \"$ac_compile\"") >&5
20907   (eval $ac_compile) 2>&5
20908   ac_status=$?
20909   echo "$as_me:20909: \$? = $ac_status" >&5
20910   (exit "$ac_status"); } &&
20911          { ac_try='test -s "conftest.$ac_objext"'
20912   { (eval echo "$as_me:20912: \"$ac_try\"") >&5
20913   (eval $ac_try) 2>&5
20914   ac_status=$?
20915   echo "$as_me:20915: \$? = $ac_status" >&5
20916   (exit "$ac_status"); }; }; then
20917   cf_cv_gcc_inline=yes
20918 else
20919   echo "$as_me: failed program was:" >&5
20920 cat "conftest.$ac_ext" >&5
20921 cf_cv_gcc_inline=no
20922 fi
20923 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20924                 CFLAGS=$cf_save_CFLAGS
20925
20926 fi
20927 echo "$as_me:20927: result: $cf_cv_gcc_inline" >&5
20928 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20929                 if test "$cf_cv_gcc_inline" = yes ; then
20930
20931 cf_fix_cppflags=no
20932 cf_new_cflags=
20933 cf_new_cppflags=
20934 cf_new_extra_cppflags=
20935
20936 for cf_add_cflags in --param max-inline-insns-single=1200
20937 do
20938 case "$cf_fix_cppflags" in
20939 (no)
20940         case "$cf_add_cflags" in
20941         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20942                 case "$cf_add_cflags" in
20943                 (-D*)
20944                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20945
20946                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20947                                 && test -z "${cf_tst_cflags}" \
20948                                 && cf_fix_cppflags=yes
20949
20950                         if test "$cf_fix_cppflags" = yes ; then
20951
20952         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20953         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20954
20955                                 continue
20956                         elif test "${cf_tst_cflags}" = "\"'" ; then
20957
20958         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20959         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20960
20961                                 continue
20962                         fi
20963                         ;;
20964                 esac
20965                 case "$CPPFLAGS" in
20966                 (*$cf_add_cflags)
20967                         ;;
20968                 (*)
20969                         case "$cf_add_cflags" in
20970                         (-D*)
20971                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20972
20973 CPPFLAGS=`echo "$CPPFLAGS" | \
20974         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20975                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20976
20977                                 ;;
20978                         esac
20979
20980         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20981         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20982
20983                         ;;
20984                 esac
20985                 ;;
20986         (*)
20987
20988         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20989         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20990
20991                 ;;
20992         esac
20993         ;;
20994 (yes)
20995
20996         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20997         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20998
20999         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21000
21001         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21002                 && test -z "${cf_tst_cflags}" \
21003                 && cf_fix_cppflags=no
21004         ;;
21005 esac
21006 done
21007
21008 if test -n "$cf_new_cflags" ; then
21009
21010         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21011         CFLAGS="${CFLAGS}$cf_new_cflags"
21012
21013 fi
21014
21015 if test -n "$cf_new_cppflags" ; then
21016
21017         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21018         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21019
21020 fi
21021
21022 if test -n "$cf_new_extra_cppflags" ; then
21023
21024         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21025         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21026
21027 fi
21028
21029                 fi
21030         fi
21031 fi
21032
21033 echo "$as_me:21033: checking for signal global datatype" >&5
21034 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21035 if test "${cf_cv_sig_atomic_t+set}" = set; then
21036   echo $ECHO_N "(cached) $ECHO_C" >&6
21037 else
21038
21039         for cf_type in \
21040                 "volatile sig_atomic_t" \
21041                 "sig_atomic_t" \
21042                 "int"
21043         do
21044         cat >"conftest.$ac_ext" <<_ACEOF
21045 #line 21045 "configure"
21046 #include "confdefs.h"
21047
21048 #include <sys/types.h>
21049 #include <signal.h>
21050 #include <stdio.h>
21051
21052 extern $cf_type x;
21053 $cf_type x;
21054 static void handler(int sig)
21055 {
21056         (void)sig;
21057         x = 5;
21058 }
21059 int
21060 main (void)
21061 {
21062 signal(SIGINT, handler);
21063                  x = 1
21064   ;
21065   return 0;
21066 }
21067 _ACEOF
21068 rm -f "conftest.$ac_objext"
21069 if { (eval echo "$as_me:21069: \"$ac_compile\"") >&5
21070   (eval $ac_compile) 2>&5
21071   ac_status=$?
21072   echo "$as_me:21072: \$? = $ac_status" >&5
21073   (exit "$ac_status"); } &&
21074          { ac_try='test -s "conftest.$ac_objext"'
21075   { (eval echo "$as_me:21075: \"$ac_try\"") >&5
21076   (eval $ac_try) 2>&5
21077   ac_status=$?
21078   echo "$as_me:21078: \$? = $ac_status" >&5
21079   (exit "$ac_status"); }; }; then
21080   cf_cv_sig_atomic_t=$cf_type
21081 else
21082   echo "$as_me: failed program was:" >&5
21083 cat "conftest.$ac_ext" >&5
21084 cf_cv_sig_atomic_t=no
21085 fi
21086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21087                 test "$cf_cv_sig_atomic_t" != no && break
21088         done
21089
21090 fi
21091
21092 echo "$as_me:21092: result: $cf_cv_sig_atomic_t" >&5
21093 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21094 test "$cf_cv_sig_atomic_t" != no &&
21095 cat >>confdefs.h <<EOF
21096 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21097 EOF
21098
21099 if test "$NCURSES_CHTYPE" = auto ; then
21100
21101 echo "$as_me:21101: checking for type of chtype" >&5
21102 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21103 if test "${cf_cv_typeof_chtype+set}" = set; then
21104   echo $ECHO_N "(cached) $ECHO_C" >&6
21105 else
21106
21107                 if test "$cross_compiling" = yes; then
21108   cf_cv_typeof_chtype=long
21109 else
21110   cat >"conftest.$ac_ext" <<_ACEOF
21111 #line 21111 "configure"
21112 #include "confdefs.h"
21113
21114 $ac_includes_default
21115 #define WANT_BITS 31
21116 int main(void)
21117 {
21118         FILE *fp = fopen("cf_test.out", "w");
21119         if (fp != 0) {
21120                 char *result = "long";
21121                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21122                         int n;
21123                         unsigned int x, y;
21124                         for (n = 0; n < WANT_BITS; n++) {
21125                                 x = (1 << n);
21126                                 y = (x >> n);
21127                                 if (y != 1 || x == 0) {
21128                                         x = 0;
21129                                         break;
21130                                 }
21131                         }
21132                         /*
21133                          * If x is nonzero, an int is big enough for the bits
21134                          * that we want.
21135                          */
21136                         result = (x != 0) ? "int" : "long";
21137                 }
21138                 fputs(result, fp);
21139                 fclose(fp);
21140         }
21141         ${cf_cv_main_return:-return}(0);
21142 }
21143
21144 _ACEOF
21145 rm -f "conftest$ac_exeext"
21146 if { (eval echo "$as_me:21146: \"$ac_link\"") >&5
21147   (eval $ac_link) 2>&5
21148   ac_status=$?
21149   echo "$as_me:21149: \$? = $ac_status" >&5
21150   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21151   { (eval echo "$as_me:21151: \"$ac_try\"") >&5
21152   (eval $ac_try) 2>&5
21153   ac_status=$?
21154   echo "$as_me:21154: \$? = $ac_status" >&5
21155   (exit "$ac_status"); }; }; then
21156   cf_cv_typeof_chtype=`cat cf_test.out`
21157 else
21158   echo "$as_me: program exited with status $ac_status" >&5
21159 echo "$as_me: failed program was:" >&5
21160 cat "conftest.$ac_ext" >&5
21161 cf_cv_typeof_chtype=long
21162 fi
21163 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21164 fi
21165                 rm -f cf_test.out
21166
21167 fi
21168
21169 echo "$as_me:21169: result: $cf_cv_typeof_chtype" >&5
21170 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21171
21172 cat >>confdefs.h <<EOF
21173 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21174 EOF
21175
21176 else
21177         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21178 fi
21179 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21180
21181 echo "$as_me:21181: checking if unsigned literals are legal" >&5
21182 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21183 if test "${cf_cv_unsigned_literals+set}" = set; then
21184   echo $ECHO_N "(cached) $ECHO_C" >&6
21185 else
21186
21187         cat >"conftest.$ac_ext" <<_ACEOF
21188 #line 21188 "configure"
21189 #include "confdefs.h"
21190
21191 int
21192 main (void)
21193 {
21194 long x = 1L + 1UL + 1U + 1
21195   ;
21196   return 0;
21197 }
21198 _ACEOF
21199 rm -f "conftest.$ac_objext"
21200 if { (eval echo "$as_me:21200: \"$ac_compile\"") >&5
21201   (eval $ac_compile) 2>&5
21202   ac_status=$?
21203   echo "$as_me:21203: \$? = $ac_status" >&5
21204   (exit "$ac_status"); } &&
21205          { ac_try='test -s "conftest.$ac_objext"'
21206   { (eval echo "$as_me:21206: \"$ac_try\"") >&5
21207   (eval $ac_try) 2>&5
21208   ac_status=$?
21209   echo "$as_me:21209: \$? = $ac_status" >&5
21210   (exit "$ac_status"); }; }; then
21211   cf_cv_unsigned_literals=yes
21212 else
21213   echo "$as_me: failed program was:" >&5
21214 cat "conftest.$ac_ext" >&5
21215 cf_cv_unsigned_literals=no
21216 fi
21217 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21218
21219 fi
21220
21221 echo "$as_me:21221: result: $cf_cv_unsigned_literals" >&5
21222 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21223
21224 cf_cv_1UL="1"
21225 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21226 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21227
21228 if test "$NCURSES_MMASK_T" = auto ; then
21229         cf_cv_typeof_mmask_t=long
21230 else
21231         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21232 fi
21233 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21234
21235 ###     Checks for external-data
21236
21237 echo "$as_me:21237: checking if external errno is declared" >&5
21238 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21239 if test "${cf_cv_dcl_errno+set}" = set; then
21240   echo $ECHO_N "(cached) $ECHO_C" >&6
21241 else
21242
21243         cat >"conftest.$ac_ext" <<_ACEOF
21244 #line 21244 "configure"
21245 #include "confdefs.h"
21246
21247 $ac_includes_default
21248 #include <errno.h>
21249 int
21250 main (void)
21251 {
21252 int x = (int) errno; (void)x
21253   ;
21254   return 0;
21255 }
21256 _ACEOF
21257 rm -f "conftest.$ac_objext"
21258 if { (eval echo "$as_me:21258: \"$ac_compile\"") >&5
21259   (eval $ac_compile) 2>&5
21260   ac_status=$?
21261   echo "$as_me:21261: \$? = $ac_status" >&5
21262   (exit "$ac_status"); } &&
21263          { ac_try='test -s "conftest.$ac_objext"'
21264   { (eval echo "$as_me:21264: \"$ac_try\"") >&5
21265   (eval $ac_try) 2>&5
21266   ac_status=$?
21267   echo "$as_me:21267: \$? = $ac_status" >&5
21268   (exit "$ac_status"); }; }; then
21269   cf_cv_dcl_errno=yes
21270 else
21271   echo "$as_me: failed program was:" >&5
21272 cat "conftest.$ac_ext" >&5
21273 cf_cv_dcl_errno=no
21274 fi
21275 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21276
21277 fi
21278 echo "$as_me:21278: result: $cf_cv_dcl_errno" >&5
21279 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21280
21281 if test "$cf_cv_dcl_errno" = no ; then
21282
21283 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21284
21285         cat >>confdefs.h <<EOF
21286 #define $cf_result 1
21287 EOF
21288
21289 fi
21290
21291 # It's possible (for near-UNIX clones) that the data doesn't exist
21292
21293 echo "$as_me:21293: checking if external errno exists" >&5
21294 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21295 if test "${cf_cv_have_errno+set}" = set; then
21296   echo $ECHO_N "(cached) $ECHO_C" >&6
21297 else
21298
21299         cat >"conftest.$ac_ext" <<_ACEOF
21300 #line 21300 "configure"
21301 #include "confdefs.h"
21302
21303 #undef errno
21304 extern int errno;
21305
21306 int
21307 main (void)
21308 {
21309 errno = 2
21310   ;
21311   return 0;
21312 }
21313 _ACEOF
21314 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21315 if { (eval echo "$as_me:21315: \"$ac_link\"") >&5
21316   (eval $ac_link) 2>&5
21317   ac_status=$?
21318   echo "$as_me:21318: \$? = $ac_status" >&5
21319   (exit "$ac_status"); } &&
21320          { ac_try='test -s "conftest$ac_exeext"'
21321   { (eval echo "$as_me:21321: \"$ac_try\"") >&5
21322   (eval $ac_try) 2>&5
21323   ac_status=$?
21324   echo "$as_me:21324: \$? = $ac_status" >&5
21325   (exit "$ac_status"); }; }; then
21326   cf_cv_have_errno=yes
21327 else
21328   echo "$as_me: failed program was:" >&5
21329 cat "conftest.$ac_ext" >&5
21330 cf_cv_have_errno=no
21331 fi
21332 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21333
21334 fi
21335 echo "$as_me:21335: result: $cf_cv_have_errno" >&5
21336 echo "${ECHO_T}$cf_cv_have_errno" >&6
21337
21338 if test "$cf_cv_have_errno" = yes ; then
21339
21340 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21341
21342         cat >>confdefs.h <<EOF
21343 #define $cf_result 1
21344 EOF
21345
21346 fi
21347
21348 echo "$as_me:21348: checking if data-only library module links" >&5
21349 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21350 if test "${cf_cv_link_dataonly+set}" = set; then
21351   echo $ECHO_N "(cached) $ECHO_C" >&6
21352 else
21353
21354         rm -f conftest.a
21355         cat >conftest.$ac_ext <<EOF
21356 #line 21356 "configure"
21357 int     testdata[3] = { 123, 456, 789 };
21358 EOF
21359         if { (eval echo "$as_me:21359: \"$ac_compile\"") >&5
21360   (eval $ac_compile) 2>&5
21361   ac_status=$?
21362   echo "$as_me:21362: \$? = $ac_status" >&5
21363   (exit "$ac_status"); } ; then
21364                 mv conftest.o data.o && \
21365                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21366         fi
21367         rm -f conftest.$ac_ext data.o
21368         cat >conftest.$ac_ext <<EOF
21369 #line 21369 "configure"
21370 int     testfunc(void)
21371 {
21372 #if defined(NeXT)
21373         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21374 #else
21375         extern int testdata[3];
21376         return testdata[0] == 123
21377            &&  testdata[1] == 456
21378            &&  testdata[2] == 789;
21379 #endif
21380 }
21381 EOF
21382         if { (eval echo "$as_me:21382: \"$ac_compile\"") >&5
21383   (eval $ac_compile) 2>&5
21384   ac_status=$?
21385   echo "$as_me:21385: \$? = $ac_status" >&5
21386   (exit "$ac_status"); }; then
21387                 mv conftest.o func.o && \
21388                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21389         fi
21390         rm -f conftest.$ac_ext func.o
21391         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21392         cf_saveLIBS="$LIBS"
21393         LIBS="conftest.a $LIBS"
21394         if test "$cross_compiling" = yes; then
21395   cf_cv_link_dataonly=unknown
21396 else
21397   cat >"conftest.$ac_ext" <<_ACEOF
21398 #line 21398 "configure"
21399 #include "confdefs.h"
21400
21401         int main(void)
21402         {
21403                 extern int testfunc();
21404                 ${cf_cv_main_return:-return} (!testfunc());
21405         }
21406
21407 _ACEOF
21408 rm -f "conftest$ac_exeext"
21409 if { (eval echo "$as_me:21409: \"$ac_link\"") >&5
21410   (eval $ac_link) 2>&5
21411   ac_status=$?
21412   echo "$as_me:21412: \$? = $ac_status" >&5
21413   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21414   { (eval echo "$as_me:21414: \"$ac_try\"") >&5
21415   (eval $ac_try) 2>&5
21416   ac_status=$?
21417   echo "$as_me:21417: \$? = $ac_status" >&5
21418   (exit "$ac_status"); }; }; then
21419   cf_cv_link_dataonly=yes
21420 else
21421   echo "$as_me: program exited with status $ac_status" >&5
21422 echo "$as_me: failed program was:" >&5
21423 cat "conftest.$ac_ext" >&5
21424 cf_cv_link_dataonly=no
21425 fi
21426 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21427 fi
21428         LIBS="$cf_saveLIBS"
21429
21430 fi
21431
21432 echo "$as_me:21432: result: $cf_cv_link_dataonly" >&5
21433 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21434
21435 if test "$cf_cv_link_dataonly" = no ; then
21436
21437 cat >>confdefs.h <<\EOF
21438 #define BROKEN_LINKER 1
21439 EOF
21440
21441         BROKEN_LINKER=1
21442 fi
21443
21444 ###     Checks for library functions.
21445
21446 echo "$as_me:21446: checking for clock_gettime" >&5
21447 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
21448 if test "${cf_cv_func_clock_gettime+set}" = set; then
21449   echo $ECHO_N "(cached) $ECHO_C" >&6
21450 else
21451
21452                 cat >"conftest.$ac_ext" <<_ACEOF
21453 #line 21453 "configure"
21454 #include "confdefs.h"
21455 #include <time.h>
21456 int
21457 main (void)
21458 {
21459 struct timespec ts;
21460                 int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts
21461   ;
21462   return 0;
21463 }
21464 _ACEOF
21465 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21466 if { (eval echo "$as_me:21466: \"$ac_link\"") >&5
21467   (eval $ac_link) 2>&5
21468   ac_status=$?
21469   echo "$as_me:21469: \$? = $ac_status" >&5
21470   (exit "$ac_status"); } &&
21471          { ac_try='test -s "conftest$ac_exeext"'
21472   { (eval echo "$as_me:21472: \"$ac_try\"") >&5
21473   (eval $ac_try) 2>&5
21474   ac_status=$?
21475   echo "$as_me:21475: \$? = $ac_status" >&5
21476   (exit "$ac_status"); }; }; then
21477   cf_cv_func_clock_gettime=yes
21478 else
21479   echo "$as_me: failed program was:" >&5
21480 cat "conftest.$ac_ext" >&5
21481 cf_cv_func_clock_gettime=no
21482 fi
21483 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21484
21485 fi
21486 echo "$as_me:21486: result: $cf_cv_func_clock_gettime" >&5
21487 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
21488
21489 if test "$cf_cv_func_clock_gettime" = yes
21490 then
21491
21492 cat >>confdefs.h <<\EOF
21493 #define HAVE_CLOCK_GETTIME 1
21494 EOF
21495
21496 else
21497 echo "$as_me:21497: checking for gettimeofday" >&5
21498 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
21499 if test "${ac_cv_func_gettimeofday+set}" = set; then
21500   echo $ECHO_N "(cached) $ECHO_C" >&6
21501 else
21502   cat >"conftest.$ac_ext" <<_ACEOF
21503 #line 21503 "configure"
21504 #include "confdefs.h"
21505 #define gettimeofday autoconf_temporary
21506 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21507 #undef gettimeofday
21508
21509 #ifdef __cplusplus
21510 extern "C"
21511 #endif
21512
21513 /* We use char because int might match the return type of a gcc2
21514    builtin and then its argument prototype would still apply.  */
21515 char gettimeofday (void);
21516
21517 int
21518 main (void)
21519 {
21520
21521 /* The GNU C library defines stubs for functions which it implements
21522     to always fail with ENOSYS.  Some functions are actually named
21523     something starting with __ and the normal name is an alias.  */
21524 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
21525 #error found stub for gettimeofday
21526 #endif
21527
21528         return gettimeofday ();
21529   ;
21530   return 0;
21531 }
21532 _ACEOF
21533 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21534 if { (eval echo "$as_me:21534: \"$ac_link\"") >&5
21535   (eval $ac_link) 2>&5
21536   ac_status=$?
21537   echo "$as_me:21537: \$? = $ac_status" >&5
21538   (exit "$ac_status"); } &&
21539          { ac_try='test -s "conftest$ac_exeext"'
21540   { (eval echo "$as_me:21540: \"$ac_try\"") >&5
21541   (eval $ac_try) 2>&5
21542   ac_status=$?
21543   echo "$as_me:21543: \$? = $ac_status" >&5
21544   (exit "$ac_status"); }; }; then
21545   ac_cv_func_gettimeofday=yes
21546 else
21547   echo "$as_me: failed program was:" >&5
21548 cat "conftest.$ac_ext" >&5
21549 ac_cv_func_gettimeofday=no
21550 fi
21551 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21552 fi
21553 echo "$as_me:21553: result: $ac_cv_func_gettimeofday" >&5
21554 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
21555 if test "$ac_cv_func_gettimeofday" = yes; then
21556
21557 cat >>confdefs.h <<\EOF
21558 #define HAVE_GETTIMEOFDAY 1
21559 EOF
21560
21561 else
21562
21563 echo "$as_me:21563: checking for gettimeofday in -lbsd" >&5
21564 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
21565 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
21566   echo $ECHO_N "(cached) $ECHO_C" >&6
21567 else
21568   ac_check_lib_save_LIBS=$LIBS
21569 LIBS="-lbsd  $LIBS"
21570 cat >"conftest.$ac_ext" <<_ACEOF
21571 #line 21571 "configure"
21572 #include "confdefs.h"
21573
21574 /* Override any gcc2 internal prototype to avoid an error.  */
21575 #ifdef __cplusplus
21576 extern "C"
21577 #endif
21578 /* We use char because int might match the return type of a gcc2
21579    builtin and then its argument prototype would still apply.  */
21580 char gettimeofday ();
21581 int
21582 main (void)
21583 {
21584 gettimeofday ();
21585   ;
21586   return 0;
21587 }
21588 _ACEOF
21589 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21590 if { (eval echo "$as_me:21590: \"$ac_link\"") >&5
21591   (eval $ac_link) 2>&5
21592   ac_status=$?
21593   echo "$as_me:21593: \$? = $ac_status" >&5
21594   (exit "$ac_status"); } &&
21595          { ac_try='test -s "conftest$ac_exeext"'
21596   { (eval echo "$as_me:21596: \"$ac_try\"") >&5
21597   (eval $ac_try) 2>&5
21598   ac_status=$?
21599   echo "$as_me:21599: \$? = $ac_status" >&5
21600   (exit "$ac_status"); }; }; then
21601   ac_cv_lib_bsd_gettimeofday=yes
21602 else
21603   echo "$as_me: failed program was:" >&5
21604 cat "conftest.$ac_ext" >&5
21605 ac_cv_lib_bsd_gettimeofday=no
21606 fi
21607 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21608 LIBS=$ac_check_lib_save_LIBS
21609 fi
21610 echo "$as_me:21610: result: $ac_cv_lib_bsd_gettimeofday" >&5
21611 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
21612 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
21613
21614 cat >>confdefs.h <<\EOF
21615 #define HAVE_GETTIMEOFDAY 1
21616 EOF
21617
21618 cf_add_libs="$LIBS"
21619 # reverse order
21620 cf_add_0lib=
21621 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21622 # filter duplicates
21623 for cf_add_1lib in $cf_add_0lib; do
21624         for cf_add_2lib in $cf_add_libs; do
21625                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21626                         cf_add_1lib=
21627                         break
21628                 fi
21629         done
21630         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21631 done
21632 LIBS="$cf_add_libs"
21633
21634 fi
21635
21636 fi
21637 fi
21638
21639 for ac_func in \
21640 fpathconf \
21641 getcwd \
21642 getauxval \
21643 getegid \
21644 geteuid \
21645 getopt \
21646 getuid \
21647 issetugid \
21648 localeconv \
21649 poll \
21650 putenv \
21651 remove \
21652 select \
21653 setbuf \
21654 setbuffer \
21655 setenv \
21656 setfsuid \
21657 setvbuf \
21658 sigaction \
21659 sigvec \
21660 snprintf \
21661 strdup \
21662 strstr \
21663 sysconf \
21664 tcgetpgrp \
21665 times \
21666 tsearch \
21667 vsnprintf \
21668
21669 do
21670 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21671 echo "$as_me:21671: checking for $ac_func" >&5
21672 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21673 if eval "test \"\${$as_ac_var+set}\" = set"; then
21674   echo $ECHO_N "(cached) $ECHO_C" >&6
21675 else
21676   cat >"conftest.$ac_ext" <<_ACEOF
21677 #line 21677 "configure"
21678 #include "confdefs.h"
21679 #define $ac_func autoconf_temporary
21680 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21681 #undef $ac_func
21682
21683 #ifdef __cplusplus
21684 extern "C"
21685 #endif
21686
21687 /* We use char because int might match the return type of a gcc2
21688    builtin and then its argument prototype would still apply.  */
21689 char $ac_func (void);
21690
21691 int
21692 main (void)
21693 {
21694
21695 /* The GNU C library defines stubs for functions which it implements
21696     to always fail with ENOSYS.  Some functions are actually named
21697     something starting with __ and the normal name is an alias.  */
21698 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21699 #error found stub for $ac_func
21700 #endif
21701
21702         return $ac_func ();
21703   ;
21704   return 0;
21705 }
21706 _ACEOF
21707 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21708 if { (eval echo "$as_me:21708: \"$ac_link\"") >&5
21709   (eval $ac_link) 2>&5
21710   ac_status=$?
21711   echo "$as_me:21711: \$? = $ac_status" >&5
21712   (exit "$ac_status"); } &&
21713          { ac_try='test -s "conftest$ac_exeext"'
21714   { (eval echo "$as_me:21714: \"$ac_try\"") >&5
21715   (eval $ac_try) 2>&5
21716   ac_status=$?
21717   echo "$as_me:21717: \$? = $ac_status" >&5
21718   (exit "$ac_status"); }; }; then
21719   eval "$as_ac_var=yes"
21720 else
21721   echo "$as_me: failed program was:" >&5
21722 cat "conftest.$ac_ext" >&5
21723 eval "$as_ac_var=no"
21724 fi
21725 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21726 fi
21727 echo "$as_me:21727: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21728 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21729 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21730   cat >>confdefs.h <<EOF
21731 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21732 EOF
21733
21734 fi
21735 done
21736
21737 echo "$as_me:21737: checking if _PATH_TTYS is defined in ttyent.h" >&5
21738 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21739 if test "${cf_cv_PATH_TTYS+set}" = set; then
21740   echo $ECHO_N "(cached) $ECHO_C" >&6
21741 else
21742
21743 cat >"conftest.$ac_ext" <<_ACEOF
21744 #line 21744 "configure"
21745 #include "confdefs.h"
21746
21747 #include <stdio.h>
21748 #include <ttyent.h>
21749 int
21750 main (void)
21751 {
21752
21753 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21754   ;
21755   return 0;
21756 }
21757 _ACEOF
21758 rm -f "conftest.$ac_objext"
21759 if { (eval echo "$as_me:21759: \"$ac_compile\"") >&5
21760   (eval $ac_compile) 2>&5
21761   ac_status=$?
21762   echo "$as_me:21762: \$? = $ac_status" >&5
21763   (exit "$ac_status"); } &&
21764          { ac_try='test -s "conftest.$ac_objext"'
21765   { (eval echo "$as_me:21765: \"$ac_try\"") >&5
21766   (eval $ac_try) 2>&5
21767   ac_status=$?
21768   echo "$as_me:21768: \$? = $ac_status" >&5
21769   (exit "$ac_status"); }; }; then
21770   cf_cv_PATH_TTYS=yes
21771 else
21772   echo "$as_me: failed program was:" >&5
21773 cat "conftest.$ac_ext" >&5
21774 cf_cv_PATH_TTYS=no
21775 fi
21776 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21777 fi
21778 echo "$as_me:21778: result: $cf_cv_PATH_TTYS" >&5
21779 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21780
21781 if test $cf_cv_PATH_TTYS = no
21782 then
21783         for cf_ttys in /etc/ttytype /etc/ttys
21784         do
21785                 if test -f $cf_ttys
21786                 then
21787                         cf_cv_PATH_TTYS=maybe
21788
21789 cat >>confdefs.h <<\EOF
21790 #define _PATH_TTYS $cf_ttys
21791 EOF
21792
21793                         break
21794                 fi
21795         done
21796 fi
21797
21798 if test $cf_cv_PATH_TTYS != no
21799 then
21800         echo "$as_me:21800: checking if _PATH_TTYS file exists" >&5
21801 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21802 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21803   echo $ECHO_N "(cached) $ECHO_C" >&6
21804 else
21805
21806                 if test "$cross_compiling" = yes; then
21807   cf_cv_have_PATH_TTYS=unknown
21808 else
21809   cat >"conftest.$ac_ext" <<_ACEOF
21810 #line 21810 "configure"
21811 #include "confdefs.h"
21812
21813 $ac_includes_default
21814
21815 #include <ttyent.h>
21816
21817 int main(void) {
21818         FILE *fp = fopen(_PATH_TTYS, "r");
21819         ${cf_cv_main_return:-return} (fp == 0);
21820 }
21821 _ACEOF
21822 rm -f "conftest$ac_exeext"
21823 if { (eval echo "$as_me:21823: \"$ac_link\"") >&5
21824   (eval $ac_link) 2>&5
21825   ac_status=$?
21826   echo "$as_me:21826: \$? = $ac_status" >&5
21827   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21828   { (eval echo "$as_me:21828: \"$ac_try\"") >&5
21829   (eval $ac_try) 2>&5
21830   ac_status=$?
21831   echo "$as_me:21831: \$? = $ac_status" >&5
21832   (exit "$ac_status"); }; }; then
21833   cf_cv_have_PATH_TTYS=yes
21834 else
21835   echo "$as_me: program exited with status $ac_status" >&5
21836 echo "$as_me: failed program was:" >&5
21837 cat "conftest.$ac_ext" >&5
21838 cf_cv_have_PATH_TTYS=no
21839 fi
21840 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21841 fi
21842 fi
21843 echo "$as_me:21843: result: $cf_cv_have_PATH_TTYS" >&5
21844 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21845         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21846 fi
21847
21848 if test $cf_cv_PATH_TTYS != no
21849 then
21850
21851 cat >>confdefs.h <<\EOF
21852 #define HAVE_PATH_TTYS 1
21853 EOF
21854
21855         echo "$as_me:21855: checking for getttynam" >&5
21856 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21857 if test "${cf_cv_func_getttynam+set}" = set; then
21858   echo $ECHO_N "(cached) $ECHO_C" >&6
21859 else
21860
21861                 cat >"conftest.$ac_ext" <<_ACEOF
21862 #line 21862 "configure"
21863 #include "confdefs.h"
21864 #include <ttyent.h>
21865 int
21866 main (void)
21867 {
21868 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21869   ;
21870   return 0;
21871 }
21872 _ACEOF
21873 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21874 if { (eval echo "$as_me:21874: \"$ac_link\"") >&5
21875   (eval $ac_link) 2>&5
21876   ac_status=$?
21877   echo "$as_me:21877: \$? = $ac_status" >&5
21878   (exit "$ac_status"); } &&
21879          { ac_try='test -s "conftest$ac_exeext"'
21880   { (eval echo "$as_me:21880: \"$ac_try\"") >&5
21881   (eval $ac_try) 2>&5
21882   ac_status=$?
21883   echo "$as_me:21883: \$? = $ac_status" >&5
21884   (exit "$ac_status"); }; }; then
21885   cf_cv_func_getttynam=yes
21886 else
21887   echo "$as_me: failed program was:" >&5
21888 cat "conftest.$ac_ext" >&5
21889 cf_cv_func_getttynam=no
21890 fi
21891 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21892 fi
21893 echo "$as_me:21893: result: $cf_cv_func_getttynam" >&5
21894 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21895         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21896 #define HAVE_GETTTYNAM 1
21897 EOF
21898
21899 fi
21900
21901 if test "x$ac_cv_func_getopt" = xno && \
21902    test "x$cf_with_progs$cf_with_tests" != xnono; then
21903         { { echo "$as_me:21903: error: getopt is required for building programs" >&5
21904 echo "$as_me: error: getopt is required for building programs" >&2;}
21905    { (exit 1); exit 1; }; }
21906 fi
21907
21908 if test "x$with_safe_sprintf" = xyes
21909 then
21910         if test "x$ac_cv_func_vsnprintf" = xyes
21911         then
21912                 { echo "$as_me:21912: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21913 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21914         else
21915
21916 cat >>confdefs.h <<\EOF
21917 #define USE_SAFE_SPRINTF 1
21918 EOF
21919
21920         fi
21921 fi
21922
21923 if test "x$with_getcap" = "xyes" ; then
21924
21925 echo "$as_me:21925: checking for terminal-capability database functions" >&5
21926 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21927 if test "${cf_cv_cgetent+set}" = set; then
21928   echo $ECHO_N "(cached) $ECHO_C" >&6
21929 else
21930
21931 cat >"conftest.$ac_ext" <<_ACEOF
21932 #line 21932 "configure"
21933 #include "confdefs.h"
21934
21935 $ac_includes_default
21936 int
21937 main (void)
21938 {
21939
21940         char temp[128];
21941         char *buf = temp;
21942         char *db_array = temp;
21943         cgetent(&buf, &db_array, "vt100");
21944         cgetcap(buf, "tc", '=');
21945         cgetmatch(buf, "tc");
21946
21947   ;
21948   return 0;
21949 }
21950 _ACEOF
21951 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21952 if { (eval echo "$as_me:21952: \"$ac_link\"") >&5
21953   (eval $ac_link) 2>&5
21954   ac_status=$?
21955   echo "$as_me:21955: \$? = $ac_status" >&5
21956   (exit "$ac_status"); } &&
21957          { ac_try='test -s "conftest$ac_exeext"'
21958   { (eval echo "$as_me:21958: \"$ac_try\"") >&5
21959   (eval $ac_try) 2>&5
21960   ac_status=$?
21961   echo "$as_me:21961: \$? = $ac_status" >&5
21962   (exit "$ac_status"); }; }; then
21963   cf_cv_cgetent=yes
21964 else
21965   echo "$as_me: failed program was:" >&5
21966 cat "conftest.$ac_ext" >&5
21967 cf_cv_cgetent=no
21968 fi
21969 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21970
21971 fi
21972 echo "$as_me:21972: result: $cf_cv_cgetent" >&5
21973 echo "${ECHO_T}$cf_cv_cgetent" >&6
21974
21975 if test "$cf_cv_cgetent" = yes
21976 then
21977
21978 cat >>confdefs.h <<\EOF
21979 #define HAVE_BSD_CGETENT 1
21980 EOF
21981
21982 echo "$as_me:21982: checking if cgetent uses const parameter" >&5
21983 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21984 if test "${cf_cv_cgetent_const+set}" = set; then
21985   echo $ECHO_N "(cached) $ECHO_C" >&6
21986 else
21987
21988 cat >"conftest.$ac_ext" <<_ACEOF
21989 #line 21989 "configure"
21990 #include "confdefs.h"
21991
21992 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21993 $ac_includes_default
21994 int
21995 main (void)
21996 {
21997
21998         char temp[128];
21999         char *buf = temp;
22000 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
22001         const char *db_array = temp;
22002         cgetent(&buf, &db_array, "vt100");
22003 #endif
22004         cgetcap(buf, "tc", '=');
22005         cgetmatch(buf, "tc");
22006
22007   ;
22008   return 0;
22009 }
22010 _ACEOF
22011 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22012 if { (eval echo "$as_me:22012: \"$ac_link\"") >&5
22013   (eval $ac_link) 2>&5
22014   ac_status=$?
22015   echo "$as_me:22015: \$? = $ac_status" >&5
22016   (exit "$ac_status"); } &&
22017          { ac_try='test -s "conftest$ac_exeext"'
22018   { (eval echo "$as_me:22018: \"$ac_try\"") >&5
22019   (eval $ac_try) 2>&5
22020   ac_status=$?
22021   echo "$as_me:22021: \$? = $ac_status" >&5
22022   (exit "$ac_status"); }; }; then
22023   cf_cv_cgetent_const=yes
22024 else
22025   echo "$as_me: failed program was:" >&5
22026 cat "conftest.$ac_ext" >&5
22027 cf_cv_cgetent_const=no
22028 fi
22029 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22030
22031 fi
22032 echo "$as_me:22032: result: $cf_cv_cgetent_const" >&5
22033 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22034         if test "$cf_cv_cgetent_const" = yes
22035         then
22036
22037 cat >>confdefs.h <<EOF
22038 #define CGETENT_CONST const
22039 EOF
22040
22041         fi
22042 fi
22043
22044 fi
22045
22046 echo "$as_me:22046: checking for isascii" >&5
22047 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22048 if test "${cf_cv_have_isascii+set}" = set; then
22049   echo $ECHO_N "(cached) $ECHO_C" >&6
22050 else
22051
22052         cat >"conftest.$ac_ext" <<_ACEOF
22053 #line 22053 "configure"
22054 #include "confdefs.h"
22055 #include <ctype.h>
22056 int
22057 main (void)
22058 {
22059 int x = isascii(' ')
22060   ;
22061   return 0;
22062 }
22063 _ACEOF
22064 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22065 if { (eval echo "$as_me:22065: \"$ac_link\"") >&5
22066   (eval $ac_link) 2>&5
22067   ac_status=$?
22068   echo "$as_me:22068: \$? = $ac_status" >&5
22069   (exit "$ac_status"); } &&
22070          { ac_try='test -s "conftest$ac_exeext"'
22071   { (eval echo "$as_me:22071: \"$ac_try\"") >&5
22072   (eval $ac_try) 2>&5
22073   ac_status=$?
22074   echo "$as_me:22074: \$? = $ac_status" >&5
22075   (exit "$ac_status"); }; }; then
22076   cf_cv_have_isascii=yes
22077 else
22078   echo "$as_me: failed program was:" >&5
22079 cat "conftest.$ac_ext" >&5
22080 cf_cv_have_isascii=no
22081 fi
22082 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22083
22084 fi
22085 echo "$as_me:22085: result: $cf_cv_have_isascii" >&5
22086 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22087 test "$cf_cv_have_isascii" = yes &&
22088 cat >>confdefs.h <<\EOF
22089 #define HAVE_ISASCII 1
22090 EOF
22091
22092 if test "$ac_cv_func_sigaction" = yes; then
22093 echo "$as_me:22093: checking whether sigaction needs _POSIX_SOURCE" >&5
22094 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22095 cat >"conftest.$ac_ext" <<_ACEOF
22096 #line 22096 "configure"
22097 #include "confdefs.h"
22098
22099 #include <sys/types.h>
22100 #include <signal.h>
22101 int
22102 main (void)
22103 {
22104 struct sigaction act
22105   ;
22106   return 0;
22107 }
22108 _ACEOF
22109 rm -f "conftest.$ac_objext"
22110 if { (eval echo "$as_me:22110: \"$ac_compile\"") >&5
22111   (eval $ac_compile) 2>&5
22112   ac_status=$?
22113   echo "$as_me:22113: \$? = $ac_status" >&5
22114   (exit "$ac_status"); } &&
22115          { ac_try='test -s "conftest.$ac_objext"'
22116   { (eval echo "$as_me:22116: \"$ac_try\"") >&5
22117   (eval $ac_try) 2>&5
22118   ac_status=$?
22119   echo "$as_me:22119: \$? = $ac_status" >&5
22120   (exit "$ac_status"); }; }; then
22121   sigact_bad=no
22122 else
22123   echo "$as_me: failed program was:" >&5
22124 cat "conftest.$ac_ext" >&5
22125
22126 cat >"conftest.$ac_ext" <<_ACEOF
22127 #line 22127 "configure"
22128 #include "confdefs.h"
22129
22130 #define _POSIX_SOURCE
22131 #include <sys/types.h>
22132 #include <signal.h>
22133 int
22134 main (void)
22135 {
22136 struct sigaction act
22137   ;
22138   return 0;
22139 }
22140 _ACEOF
22141 rm -f "conftest.$ac_objext"
22142 if { (eval echo "$as_me:22142: \"$ac_compile\"") >&5
22143   (eval $ac_compile) 2>&5
22144   ac_status=$?
22145   echo "$as_me:22145: \$? = $ac_status" >&5
22146   (exit "$ac_status"); } &&
22147          { ac_try='test -s "conftest.$ac_objext"'
22148   { (eval echo "$as_me:22148: \"$ac_try\"") >&5
22149   (eval $ac_try) 2>&5
22150   ac_status=$?
22151   echo "$as_me:22151: \$? = $ac_status" >&5
22152   (exit "$ac_status"); }; }; then
22153   sigact_bad=yes
22154
22155 cat >>confdefs.h <<\EOF
22156 #define _POSIX_SOURCE 1
22157 EOF
22158
22159 else
22160   echo "$as_me: failed program was:" >&5
22161 cat "conftest.$ac_ext" >&5
22162 sigact_bad=unknown
22163 fi
22164 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22165 fi
22166 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22167 echo "$as_me:22167: result: $sigact_bad" >&5
22168 echo "${ECHO_T}$sigact_bad" >&6
22169 fi
22170
22171 echo "$as_me:22171: checking if nanosleep really works" >&5
22172 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22173 if test "${cf_cv_func_nanosleep+set}" = set; then
22174   echo $ECHO_N "(cached) $ECHO_C" >&6
22175 else
22176
22177 if test "$cross_compiling" = yes; then
22178   cf_cv_func_nanosleep=unknown
22179 else
22180   cat >"conftest.$ac_ext" <<_ACEOF
22181 #line 22181 "configure"
22182 #include "confdefs.h"
22183
22184 $ac_includes_default
22185
22186 #include <errno.h>
22187 #include <time.h>
22188
22189 #ifdef HAVE_SYS_TIME_H
22190 #include <sys/time.h>
22191 #endif
22192
22193 int main(void) {
22194         struct timespec ts1, ts2;
22195         int code;
22196         ts1.tv_sec  = 0;
22197         ts1.tv_nsec = 750000000;
22198         ts2.tv_sec  = 0;
22199         ts2.tv_nsec = 0;
22200         errno = 0;
22201         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22202         ${cf_cv_main_return:-return}(code != 0);
22203 }
22204
22205 _ACEOF
22206 rm -f "conftest$ac_exeext"
22207 if { (eval echo "$as_me:22207: \"$ac_link\"") >&5
22208   (eval $ac_link) 2>&5
22209   ac_status=$?
22210   echo "$as_me:22210: \$? = $ac_status" >&5
22211   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22212   { (eval echo "$as_me:22212: \"$ac_try\"") >&5
22213   (eval $ac_try) 2>&5
22214   ac_status=$?
22215   echo "$as_me:22215: \$? = $ac_status" >&5
22216   (exit "$ac_status"); }; }; then
22217   cf_cv_func_nanosleep=yes
22218 else
22219   echo "$as_me: program exited with status $ac_status" >&5
22220 echo "$as_me: failed program was:" >&5
22221 cat "conftest.$ac_ext" >&5
22222 cf_cv_func_nanosleep=no
22223 fi
22224 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22225 fi
22226 fi
22227 echo "$as_me:22227: result: $cf_cv_func_nanosleep" >&5
22228 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22229
22230 test "$cf_cv_func_nanosleep" = "yes" &&
22231 cat >>confdefs.h <<\EOF
22232 #define HAVE_NANOSLEEP 1
22233 EOF
22234
22235 for ac_header in \
22236 termio.h \
22237 termios.h \
22238 unistd.h \
22239 sys/ioctl.h \
22240 sys/termio.h \
22241
22242 do
22243 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22244 echo "$as_me:22244: checking for $ac_header" >&5
22245 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22246 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22247   echo $ECHO_N "(cached) $ECHO_C" >&6
22248 else
22249   cat >"conftest.$ac_ext" <<_ACEOF
22250 #line 22250 "configure"
22251 #include "confdefs.h"
22252 #include <$ac_header>
22253 _ACEOF
22254 if { (eval echo "$as_me:22254: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22255   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22256   ac_status=$?
22257   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22258   rm -f conftest.er1
22259   cat conftest.err >&5
22260   echo "$as_me:22260: \$? = $ac_status" >&5
22261   (exit "$ac_status"); } >/dev/null; then
22262   if test -s conftest.err; then
22263     ac_cpp_err=$ac_c_preproc_warn_flag
22264   else
22265     ac_cpp_err=
22266   fi
22267 else
22268   ac_cpp_err=yes
22269 fi
22270 if test -z "$ac_cpp_err"; then
22271   eval "$as_ac_Header=yes"
22272 else
22273   echo "$as_me: failed program was:" >&5
22274   cat "conftest.$ac_ext" >&5
22275   eval "$as_ac_Header=no"
22276 fi
22277 rm -f conftest.err "conftest.$ac_ext"
22278 fi
22279 echo "$as_me:22279: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22280 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22281 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22282   cat >>confdefs.h <<EOF
22283 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22284 EOF
22285
22286 fi
22287 done
22288
22289 if test "$ac_cv_header_termios_h" = yes ; then
22290         case "$CFLAGS $CPPFLAGS" in
22291         (*-D_POSIX_SOURCE*)
22292                 termios_bad=dunno ;;
22293         (*)     termios_bad=maybe ;;
22294         esac
22295         if test "$termios_bad" = maybe ; then
22296         echo "$as_me:22296: checking whether termios.h needs _POSIX_SOURCE" >&5
22297 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22298         cat >"conftest.$ac_ext" <<_ACEOF
22299 #line 22299 "configure"
22300 #include "confdefs.h"
22301 #include <termios.h>
22302 int
22303 main (void)
22304 {
22305 struct termios foo; int x = foo.c_iflag = 1; (void)x
22306   ;
22307   return 0;
22308 }
22309 _ACEOF
22310 rm -f "conftest.$ac_objext"
22311 if { (eval echo "$as_me:22311: \"$ac_compile\"") >&5
22312   (eval $ac_compile) 2>&5
22313   ac_status=$?
22314   echo "$as_me:22314: \$? = $ac_status" >&5
22315   (exit "$ac_status"); } &&
22316          { ac_try='test -s "conftest.$ac_objext"'
22317   { (eval echo "$as_me:22317: \"$ac_try\"") >&5
22318   (eval $ac_try) 2>&5
22319   ac_status=$?
22320   echo "$as_me:22320: \$? = $ac_status" >&5
22321   (exit "$ac_status"); }; }; then
22322   termios_bad=no
22323 else
22324   echo "$as_me: failed program was:" >&5
22325 cat "conftest.$ac_ext" >&5
22326
22327                 cat >"conftest.$ac_ext" <<_ACEOF
22328 #line 22328 "configure"
22329 #include "confdefs.h"
22330
22331 #define _POSIX_SOURCE
22332 #include <termios.h>
22333 int
22334 main (void)
22335 {
22336 struct termios foo; int x = foo.c_iflag = 2; (void)x
22337   ;
22338   return 0;
22339 }
22340 _ACEOF
22341 rm -f "conftest.$ac_objext"
22342 if { (eval echo "$as_me:22342: \"$ac_compile\"") >&5
22343   (eval $ac_compile) 2>&5
22344   ac_status=$?
22345   echo "$as_me:22345: \$? = $ac_status" >&5
22346   (exit "$ac_status"); } &&
22347          { ac_try='test -s "conftest.$ac_objext"'
22348   { (eval echo "$as_me:22348: \"$ac_try\"") >&5
22349   (eval $ac_try) 2>&5
22350   ac_status=$?
22351   echo "$as_me:22351: \$? = $ac_status" >&5
22352   (exit "$ac_status"); }; }; then
22353   termios_bad=unknown
22354 else
22355   echo "$as_me: failed program was:" >&5
22356 cat "conftest.$ac_ext" >&5
22357 termios_bad=yes
22358 cat >>confdefs.h <<\EOF
22359 #define _POSIX_SOURCE 1
22360 EOF
22361
22362 fi
22363 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22364
22365 fi
22366 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22367         echo "$as_me:22367: result: $termios_bad" >&5
22368 echo "${ECHO_T}$termios_bad" >&6
22369         fi
22370 fi
22371
22372 echo "$as_me:22372: checking for tcgetattr" >&5
22373 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22374 if test "${cf_cv_have_tcgetattr+set}" = set; then
22375   echo $ECHO_N "(cached) $ECHO_C" >&6
22376 else
22377
22378 cat >"conftest.$ac_ext" <<_ACEOF
22379 #line 22379 "configure"
22380 #include "confdefs.h"
22381
22382 #include <sys/types.h>
22383 #ifdef HAVE_UNISTD_H
22384 #include <unistd.h>
22385 #endif
22386 #ifdef HAVE_TERMIOS_H
22387 #include <termios.h>
22388 #define TTY struct termios
22389 #else
22390 #ifdef HAVE_TERMIO_H
22391 #include <termio.h>
22392 #define TTY struct termio
22393 #endif
22394 #endif
22395
22396 int
22397 main (void)
22398 {
22399
22400 TTY foo;
22401 tcgetattr(1, &foo);
22402   ;
22403   return 0;
22404 }
22405 _ACEOF
22406 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22407 if { (eval echo "$as_me:22407: \"$ac_link\"") >&5
22408   (eval $ac_link) 2>&5
22409   ac_status=$?
22410   echo "$as_me:22410: \$? = $ac_status" >&5
22411   (exit "$ac_status"); } &&
22412          { ac_try='test -s "conftest$ac_exeext"'
22413   { (eval echo "$as_me:22413: \"$ac_try\"") >&5
22414   (eval $ac_try) 2>&5
22415   ac_status=$?
22416   echo "$as_me:22416: \$? = $ac_status" >&5
22417   (exit "$ac_status"); }; }; then
22418   cf_cv_have_tcgetattr=yes
22419 else
22420   echo "$as_me: failed program was:" >&5
22421 cat "conftest.$ac_ext" >&5
22422 cf_cv_have_tcgetattr=no
22423 fi
22424 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22425 fi
22426 echo "$as_me:22426: result: $cf_cv_have_tcgetattr" >&5
22427 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22428 test "$cf_cv_have_tcgetattr" = yes &&
22429 cat >>confdefs.h <<\EOF
22430 #define HAVE_TCGETATTR 1
22431 EOF
22432
22433 echo "$as_me:22433: checking for vsscanf function or workaround" >&5
22434 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22435 if test "${cf_cv_func_vsscanf+set}" = set; then
22436   echo $ECHO_N "(cached) $ECHO_C" >&6
22437 else
22438
22439 cat >"conftest.$ac_ext" <<_ACEOF
22440 #line 22440 "configure"
22441 #include "confdefs.h"
22442
22443 #include <stdarg.h>
22444 #include <stdio.h>
22445 int
22446 main (void)
22447 {
22448
22449         va_list ap;
22450         vsscanf("from", "%d", ap)
22451   ;
22452   return 0;
22453 }
22454 _ACEOF
22455 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22456 if { (eval echo "$as_me:22456: \"$ac_link\"") >&5
22457   (eval $ac_link) 2>&5
22458   ac_status=$?
22459   echo "$as_me:22459: \$? = $ac_status" >&5
22460   (exit "$ac_status"); } &&
22461          { ac_try='test -s "conftest$ac_exeext"'
22462   { (eval echo "$as_me:22462: \"$ac_try\"") >&5
22463   (eval $ac_try) 2>&5
22464   ac_status=$?
22465   echo "$as_me:22465: \$? = $ac_status" >&5
22466   (exit "$ac_status"); }; }; then
22467   cf_cv_func_vsscanf=vsscanf
22468 else
22469   echo "$as_me: failed program was:" >&5
22470 cat "conftest.$ac_ext" >&5
22471
22472 cat >"conftest.$ac_ext" <<_ACEOF
22473 #line 22473 "configure"
22474 #include "confdefs.h"
22475
22476 #include <stdarg.h>
22477 #include <stdio.h>
22478 int
22479 main (void)
22480 {
22481
22482         FILE strbuf;
22483         char *str = "from";
22484
22485         strbuf._flag = _IOREAD;
22486         strbuf._ptr = strbuf._base = (unsigned char *) str;
22487         strbuf._cnt = strlen(str);
22488         strbuf._file = _NFILE;
22489         return (vfscanf(&strbuf, "%d", ap))
22490   ;
22491   return 0;
22492 }
22493 _ACEOF
22494 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22495 if { (eval echo "$as_me:22495: \"$ac_link\"") >&5
22496   (eval $ac_link) 2>&5
22497   ac_status=$?
22498   echo "$as_me:22498: \$? = $ac_status" >&5
22499   (exit "$ac_status"); } &&
22500          { ac_try='test -s "conftest$ac_exeext"'
22501   { (eval echo "$as_me:22501: \"$ac_try\"") >&5
22502   (eval $ac_try) 2>&5
22503   ac_status=$?
22504   echo "$as_me:22504: \$? = $ac_status" >&5
22505   (exit "$ac_status"); }; }; then
22506   cf_cv_func_vsscanf=vfscanf
22507 else
22508   echo "$as_me: failed program was:" >&5
22509 cat "conftest.$ac_ext" >&5
22510
22511 cat >"conftest.$ac_ext" <<_ACEOF
22512 #line 22512 "configure"
22513 #include "confdefs.h"
22514
22515 #include <stdarg.h>
22516 #include <stdio.h>
22517 int
22518 main (void)
22519 {
22520
22521         FILE strbuf;
22522         char *str = "from";
22523
22524         strbuf._flag = _IOREAD;
22525         strbuf._ptr = strbuf._base = (unsigned char *) str;
22526         strbuf._cnt = strlen(str);
22527         strbuf._file = _NFILE;
22528         return (_doscan(&strbuf, "%d", ap))
22529   ;
22530   return 0;
22531 }
22532 _ACEOF
22533 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22534 if { (eval echo "$as_me:22534: \"$ac_link\"") >&5
22535   (eval $ac_link) 2>&5
22536   ac_status=$?
22537   echo "$as_me:22537: \$? = $ac_status" >&5
22538   (exit "$ac_status"); } &&
22539          { ac_try='test -s "conftest$ac_exeext"'
22540   { (eval echo "$as_me:22540: \"$ac_try\"") >&5
22541   (eval $ac_try) 2>&5
22542   ac_status=$?
22543   echo "$as_me:22543: \$? = $ac_status" >&5
22544   (exit "$ac_status"); }; }; then
22545   cf_cv_func_vsscanf=_doscan
22546 else
22547   echo "$as_me: failed program was:" >&5
22548 cat "conftest.$ac_ext" >&5
22549
22550 cf_cv_func_vsscanf=no
22551 fi
22552 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22553 fi
22554 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22555 fi
22556 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22557 fi
22558 echo "$as_me:22558: result: $cf_cv_func_vsscanf" >&5
22559 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22560
22561 case "$cf_cv_func_vsscanf" in
22562 (vsscanf)
22563 cat >>confdefs.h <<\EOF
22564 #define HAVE_VSSCANF 1
22565 EOF
22566 ;;
22567 (vfscanf)
22568 cat >>confdefs.h <<\EOF
22569 #define HAVE_VFSCANF 1
22570 EOF
22571 ;;
22572 (_doscan)
22573 cat >>confdefs.h <<\EOF
22574 #define HAVE__DOSCAN 1
22575 EOF
22576 ;;
22577 esac
22578
22579 for ac_header in \
22580 unistd.h \
22581
22582 do
22583 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22584 echo "$as_me:22584: checking for $ac_header" >&5
22585 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22586 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22587   echo $ECHO_N "(cached) $ECHO_C" >&6
22588 else
22589   cat >"conftest.$ac_ext" <<_ACEOF
22590 #line 22590 "configure"
22591 #include "confdefs.h"
22592 #include <$ac_header>
22593 _ACEOF
22594 if { (eval echo "$as_me:22594: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22595   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22596   ac_status=$?
22597   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22598   rm -f conftest.er1
22599   cat conftest.err >&5
22600   echo "$as_me:22600: \$? = $ac_status" >&5
22601   (exit "$ac_status"); } >/dev/null; then
22602   if test -s conftest.err; then
22603     ac_cpp_err=$ac_c_preproc_warn_flag
22604   else
22605     ac_cpp_err=
22606   fi
22607 else
22608   ac_cpp_err=yes
22609 fi
22610 if test -z "$ac_cpp_err"; then
22611   eval "$as_ac_Header=yes"
22612 else
22613   echo "$as_me: failed program was:" >&5
22614   cat "conftest.$ac_ext" >&5
22615   eval "$as_ac_Header=no"
22616 fi
22617 rm -f conftest.err "conftest.$ac_ext"
22618 fi
22619 echo "$as_me:22619: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22620 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22621 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22622   cat >>confdefs.h <<EOF
22623 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22624 EOF
22625
22626 fi
22627 done
22628
22629 echo "$as_me:22629: checking for working mkstemp" >&5
22630 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22631 if test "${cf_cv_func_mkstemp+set}" = set; then
22632   echo $ECHO_N "(cached) $ECHO_C" >&6
22633 else
22634
22635 rm -rf ./conftest*
22636 if test "$cross_compiling" = yes; then
22637   cf_cv_func_mkstemp=maybe
22638 else
22639   cat >"conftest.$ac_ext" <<_ACEOF
22640 #line 22640 "configure"
22641 #include "confdefs.h"
22642
22643 $ac_includes_default
22644
22645 int main(void)
22646 {
22647         char *tmpl = "conftestXXXXXX";
22648         char name[2][80];
22649         int n;
22650         int result = 0;
22651         int fd;
22652         struct stat sb;
22653
22654         umask(077);
22655         for (n = 0; n < 2; ++n) {
22656                 strcpy(name[n], tmpl);
22657                 if ((fd = mkstemp(name[n])) >= 0) {
22658                         if (!strcmp(name[n], tmpl)
22659                          || stat(name[n], &sb) != 0
22660                          || (sb.st_mode & S_IFMT) != S_IFREG
22661                          || (sb.st_mode & 077) != 0) {
22662                                 result = 1;
22663                         }
22664                         close(fd);
22665                 }
22666         }
22667         if (result == 0
22668          && !strcmp(name[0], name[1]))
22669                 result = 1;
22670         ${cf_cv_main_return:-return}(result);
22671 }
22672
22673 _ACEOF
22674 rm -f "conftest$ac_exeext"
22675 if { (eval echo "$as_me:22675: \"$ac_link\"") >&5
22676   (eval $ac_link) 2>&5
22677   ac_status=$?
22678   echo "$as_me:22678: \$? = $ac_status" >&5
22679   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22680   { (eval echo "$as_me:22680: \"$ac_try\"") >&5
22681   (eval $ac_try) 2>&5
22682   ac_status=$?
22683   echo "$as_me:22683: \$? = $ac_status" >&5
22684   (exit "$ac_status"); }; }; then
22685   cf_cv_func_mkstemp=yes
22686
22687 else
22688   echo "$as_me: program exited with status $ac_status" >&5
22689 echo "$as_me: failed program was:" >&5
22690 cat "conftest.$ac_ext" >&5
22691 cf_cv_func_mkstemp=no
22692
22693 fi
22694 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22695 fi
22696
22697 fi
22698 echo "$as_me:22698: result: $cf_cv_func_mkstemp" >&5
22699 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22700 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22701         echo "$as_me:22701: checking for mkstemp" >&5
22702 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22703 if test "${ac_cv_func_mkstemp+set}" = set; then
22704   echo $ECHO_N "(cached) $ECHO_C" >&6
22705 else
22706   cat >"conftest.$ac_ext" <<_ACEOF
22707 #line 22707 "configure"
22708 #include "confdefs.h"
22709 #define mkstemp autoconf_temporary
22710 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22711 #undef mkstemp
22712
22713 #ifdef __cplusplus
22714 extern "C"
22715 #endif
22716
22717 /* We use char because int might match the return type of a gcc2
22718    builtin and then its argument prototype would still apply.  */
22719 char mkstemp (void);
22720
22721 int
22722 main (void)
22723 {
22724
22725 /* The GNU C library defines stubs for functions which it implements
22726     to always fail with ENOSYS.  Some functions are actually named
22727     something starting with __ and the normal name is an alias.  */
22728 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22729 #error found stub for mkstemp
22730 #endif
22731
22732         return mkstemp ();
22733   ;
22734   return 0;
22735 }
22736 _ACEOF
22737 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22738 if { (eval echo "$as_me:22738: \"$ac_link\"") >&5
22739   (eval $ac_link) 2>&5
22740   ac_status=$?
22741   echo "$as_me:22741: \$? = $ac_status" >&5
22742   (exit "$ac_status"); } &&
22743          { ac_try='test -s "conftest$ac_exeext"'
22744   { (eval echo "$as_me:22744: \"$ac_try\"") >&5
22745   (eval $ac_try) 2>&5
22746   ac_status=$?
22747   echo "$as_me:22747: \$? = $ac_status" >&5
22748   (exit "$ac_status"); }; }; then
22749   ac_cv_func_mkstemp=yes
22750 else
22751   echo "$as_me: failed program was:" >&5
22752 cat "conftest.$ac_ext" >&5
22753 ac_cv_func_mkstemp=no
22754 fi
22755 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22756 fi
22757 echo "$as_me:22757: result: $ac_cv_func_mkstemp" >&5
22758 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22759
22760 fi
22761 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22762
22763 cat >>confdefs.h <<\EOF
22764 #define HAVE_MKSTEMP 1
22765 EOF
22766
22767 fi
22768
22769 # setup for prototype of fallback for vsscanf()
22770
22771 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22772         HAVE_VSSCANF=1
22773 else
22774         HAVE_VSSCANF=0
22775 fi
22776
22777 if test "x$cross_compiling" = xyes ; then
22778         { echo "$as_me:22778: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22779 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22780 else
22781         echo "$as_me:22781: checking whether setvbuf arguments are reversed" >&5
22782 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22783 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22784   echo $ECHO_N "(cached) $ECHO_C" >&6
22785 else
22786   if test "$cross_compiling" = yes; then
22787   { { echo "$as_me:22787: error: cannot run test program while cross compiling" >&5
22788 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22789    { (exit 1); exit 1; }; }
22790 else
22791   cat >"conftest.$ac_ext" <<_ACEOF
22792 #line 22792 "configure"
22793 #include "confdefs.h"
22794 #include <stdio.h>
22795 /* If setvbuf has the reversed format, exit 0. */
22796 int
22797 main (void)
22798 {
22799   /* This call has the arguments reversed.
22800      A reversed system may check and see that the address of main
22801      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22802   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22803     $ac_main_return(1);
22804   putc('\r', stdout);
22805   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22806 }
22807 _ACEOF
22808 rm -f "conftest$ac_exeext"
22809 if { (eval echo "$as_me:22809: \"$ac_link\"") >&5
22810   (eval $ac_link) 2>&5
22811   ac_status=$?
22812   echo "$as_me:22812: \$? = $ac_status" >&5
22813   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22814   { (eval echo "$as_me:22814: \"$ac_try\"") >&5
22815   (eval $ac_try) 2>&5
22816   ac_status=$?
22817   echo "$as_me:22817: \$? = $ac_status" >&5
22818   (exit "$ac_status"); }; }; then
22819   ac_cv_func_setvbuf_reversed=yes
22820 else
22821   echo "$as_me: program exited with status $ac_status" >&5
22822 echo "$as_me: failed program was:" >&5
22823 cat "conftest.$ac_ext" >&5
22824 ac_cv_func_setvbuf_reversed=no
22825 fi
22826 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22827 fi
22828 rm -f core ./core.* ./*.core
22829 fi
22830 echo "$as_me:22830: result: $ac_cv_func_setvbuf_reversed" >&5
22831 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22832 if test $ac_cv_func_setvbuf_reversed = yes; then
22833
22834 cat >>confdefs.h <<\EOF
22835 #define SETVBUF_REVERSED 1
22836 EOF
22837
22838 fi
22839
22840 fi
22841 echo "$as_me:22841: checking for intptr_t" >&5
22842 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22843 if test "${ac_cv_type_intptr_t+set}" = set; then
22844   echo $ECHO_N "(cached) $ECHO_C" >&6
22845 else
22846   cat >"conftest.$ac_ext" <<_ACEOF
22847 #line 22847 "configure"
22848 #include "confdefs.h"
22849 $ac_includes_default
22850 int
22851 main (void)
22852 {
22853 if ((intptr_t *) 0)
22854   return 0;
22855 if (sizeof (intptr_t))
22856   return 0;
22857   ;
22858   return 0;
22859 }
22860 _ACEOF
22861 rm -f "conftest.$ac_objext"
22862 if { (eval echo "$as_me:22862: \"$ac_compile\"") >&5
22863   (eval $ac_compile) 2>&5
22864   ac_status=$?
22865   echo "$as_me:22865: \$? = $ac_status" >&5
22866   (exit "$ac_status"); } &&
22867          { ac_try='test -s "conftest.$ac_objext"'
22868   { (eval echo "$as_me:22868: \"$ac_try\"") >&5
22869   (eval $ac_try) 2>&5
22870   ac_status=$?
22871   echo "$as_me:22871: \$? = $ac_status" >&5
22872   (exit "$ac_status"); }; }; then
22873   ac_cv_type_intptr_t=yes
22874 else
22875   echo "$as_me: failed program was:" >&5
22876 cat "conftest.$ac_ext" >&5
22877 ac_cv_type_intptr_t=no
22878 fi
22879 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22880 fi
22881 echo "$as_me:22881: result: $ac_cv_type_intptr_t" >&5
22882 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22883 if test "$ac_cv_type_intptr_t" = yes; then
22884   :
22885 else
22886
22887 cat >>confdefs.h <<EOF
22888 #define intptr_t long
22889 EOF
22890
22891 fi
22892
22893 echo "$as_me:22893: checking for ssize_t" >&5
22894 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22895 if test "${ac_cv_type_ssize_t+set}" = set; then
22896   echo $ECHO_N "(cached) $ECHO_C" >&6
22897 else
22898   cat >"conftest.$ac_ext" <<_ACEOF
22899 #line 22899 "configure"
22900 #include "confdefs.h"
22901 $ac_includes_default
22902 int
22903 main (void)
22904 {
22905 if ((ssize_t *) 0)
22906   return 0;
22907 if (sizeof (ssize_t))
22908   return 0;
22909   ;
22910   return 0;
22911 }
22912 _ACEOF
22913 rm -f "conftest.$ac_objext"
22914 if { (eval echo "$as_me:22914: \"$ac_compile\"") >&5
22915   (eval $ac_compile) 2>&5
22916   ac_status=$?
22917   echo "$as_me:22917: \$? = $ac_status" >&5
22918   (exit "$ac_status"); } &&
22919          { ac_try='test -s "conftest.$ac_objext"'
22920   { (eval echo "$as_me:22920: \"$ac_try\"") >&5
22921   (eval $ac_try) 2>&5
22922   ac_status=$?
22923   echo "$as_me:22923: \$? = $ac_status" >&5
22924   (exit "$ac_status"); }; }; then
22925   ac_cv_type_ssize_t=yes
22926 else
22927   echo "$as_me: failed program was:" >&5
22928 cat "conftest.$ac_ext" >&5
22929 ac_cv_type_ssize_t=no
22930 fi
22931 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22932 fi
22933 echo "$as_me:22933: result: $ac_cv_type_ssize_t" >&5
22934 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22935 if test "$ac_cv_type_ssize_t" = yes; then
22936   :
22937 else
22938
22939 cat >>confdefs.h <<EOF
22940 #define ssize_t int
22941 EOF
22942
22943 fi
22944
22945 echo "$as_me:22945: checking for type sigaction_t" >&5
22946 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22947 if test "${cf_cv_type_sigaction+set}" = set; then
22948   echo $ECHO_N "(cached) $ECHO_C" >&6
22949 else
22950
22951         cat >"conftest.$ac_ext" <<_ACEOF
22952 #line 22952 "configure"
22953 #include "confdefs.h"
22954
22955 #include <signal.h>
22956 int
22957 main (void)
22958 {
22959 sigaction_t x
22960   ;
22961   return 0;
22962 }
22963 _ACEOF
22964 rm -f "conftest.$ac_objext"
22965 if { (eval echo "$as_me:22965: \"$ac_compile\"") >&5
22966   (eval $ac_compile) 2>&5
22967   ac_status=$?
22968   echo "$as_me:22968: \$? = $ac_status" >&5
22969   (exit "$ac_status"); } &&
22970          { ac_try='test -s "conftest.$ac_objext"'
22971   { (eval echo "$as_me:22971: \"$ac_try\"") >&5
22972   (eval $ac_try) 2>&5
22973   ac_status=$?
22974   echo "$as_me:22974: \$? = $ac_status" >&5
22975   (exit "$ac_status"); }; }; then
22976   cf_cv_type_sigaction=yes
22977 else
22978   echo "$as_me: failed program was:" >&5
22979 cat "conftest.$ac_ext" >&5
22980 cf_cv_type_sigaction=no
22981 fi
22982 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22983 fi
22984
22985 echo "$as_me:22985: result: $cf_cv_type_sigaction" >&5
22986 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22987 test "$cf_cv_type_sigaction" = yes &&
22988 cat >>confdefs.h <<\EOF
22989 #define HAVE_TYPE_SIGACTION 1
22990 EOF
22991
22992 echo "$as_me:22992: checking declaration of size-change" >&5
22993 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22994 if test "${cf_cv_sizechange+set}" = set; then
22995   echo $ECHO_N "(cached) $ECHO_C" >&6
22996 else
22997
22998         cf_cv_sizechange=unknown
22999         cf_save_CPPFLAGS="$CPPFLAGS"
23000
23001 for cf_opts in "" "NEED_PTEM_H"
23002 do
23003
23004         CPPFLAGS="$cf_save_CPPFLAGS"
23005         if test -n "$cf_opts"
23006         then
23007
23008         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23009         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23010
23011         fi
23012         cat >"conftest.$ac_ext" <<_ACEOF
23013 #line 23013 "configure"
23014 #include "confdefs.h"
23015 #include <sys/types.h>
23016 #ifdef HAVE_TERMIOS_H
23017 #include <termios.h>
23018 #else
23019 #ifdef HAVE_TERMIO_H
23020 #include <termio.h>
23021 #endif
23022 #endif
23023
23024 #ifdef NEED_PTEM_H
23025 /* This is a workaround for SCO:  they neglected to define struct winsize in
23026  * termios.h -- it is only in termio.h and ptem.h
23027  */
23028 #include <sys/stream.h>
23029 #include <sys/ptem.h>
23030 #endif
23031
23032 #ifdef HAVE_SYS_IOCTL_H
23033 #include <sys/ioctl.h>
23034 #endif
23035
23036 int
23037 main (void)
23038 {
23039
23040 #ifdef TIOCGSIZE
23041         struct ttysize win;     /* SunOS 3.0... */
23042         int y = win.ts_lines = 2;
23043         int x = win.ts_cols = 1;
23044         (void)y;
23045         (void)x;
23046 #else
23047 #ifdef TIOCGWINSZ
23048         struct winsize win;     /* everything else */
23049         int y = win.ws_row = 2;
23050         int x = win.ws_col = 1;
23051         (void)y;
23052         (void)x;
23053 #else
23054         no TIOCGSIZE or TIOCGWINSZ
23055 #endif /* TIOCGWINSZ */
23056 #endif /* TIOCGSIZE */
23057
23058   ;
23059   return 0;
23060 }
23061 _ACEOF
23062 rm -f "conftest.$ac_objext"
23063 if { (eval echo "$as_me:23063: \"$ac_compile\"") >&5
23064   (eval $ac_compile) 2>&5
23065   ac_status=$?
23066   echo "$as_me:23066: \$? = $ac_status" >&5
23067   (exit "$ac_status"); } &&
23068          { ac_try='test -s "conftest.$ac_objext"'
23069   { (eval echo "$as_me:23069: \"$ac_try\"") >&5
23070   (eval $ac_try) 2>&5
23071   ac_status=$?
23072   echo "$as_me:23072: \$? = $ac_status" >&5
23073   (exit "$ac_status"); }; }; then
23074   cf_cv_sizechange=yes
23075 else
23076   echo "$as_me: failed program was:" >&5
23077 cat "conftest.$ac_ext" >&5
23078 cf_cv_sizechange=no
23079 fi
23080 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23081
23082         CPPFLAGS="$cf_save_CPPFLAGS"
23083         if test "$cf_cv_sizechange" = yes ; then
23084                 echo "size-change succeeded ($cf_opts)" >&5
23085                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23086                 break
23087         fi
23088 done
23089
23090 fi
23091 echo "$as_me:23091: result: $cf_cv_sizechange" >&5
23092 echo "${ECHO_T}$cf_cv_sizechange" >&6
23093 if test "$cf_cv_sizechange" != no ; then
23094
23095 cat >>confdefs.h <<\EOF
23096 #define HAVE_SIZECHANGE 1
23097 EOF
23098
23099         case "$cf_cv_sizechange" in
23100         (NEED*)
23101                 cat >>confdefs.h <<EOF
23102 #define $cf_cv_sizechange  1
23103 EOF
23104
23105                 ;;
23106         esac
23107 fi
23108
23109 echo "$as_me:23109: checking for memmove" >&5
23110 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23111 if test "${ac_cv_func_memmove+set}" = set; then
23112   echo $ECHO_N "(cached) $ECHO_C" >&6
23113 else
23114   cat >"conftest.$ac_ext" <<_ACEOF
23115 #line 23115 "configure"
23116 #include "confdefs.h"
23117 #define memmove autoconf_temporary
23118 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23119 #undef memmove
23120
23121 #ifdef __cplusplus
23122 extern "C"
23123 #endif
23124
23125 /* We use char because int might match the return type of a gcc2
23126    builtin and then its argument prototype would still apply.  */
23127 char memmove (void);
23128
23129 int
23130 main (void)
23131 {
23132
23133 /* The GNU C library defines stubs for functions which it implements
23134     to always fail with ENOSYS.  Some functions are actually named
23135     something starting with __ and the normal name is an alias.  */
23136 #if defined (__stub_memmove) || defined (__stub___memmove)
23137 #error found stub for memmove
23138 #endif
23139
23140         return memmove ();
23141   ;
23142   return 0;
23143 }
23144 _ACEOF
23145 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23146 if { (eval echo "$as_me:23146: \"$ac_link\"") >&5
23147   (eval $ac_link) 2>&5
23148   ac_status=$?
23149   echo "$as_me:23149: \$? = $ac_status" >&5
23150   (exit "$ac_status"); } &&
23151          { ac_try='test -s "conftest$ac_exeext"'
23152   { (eval echo "$as_me:23152: \"$ac_try\"") >&5
23153   (eval $ac_try) 2>&5
23154   ac_status=$?
23155   echo "$as_me:23155: \$? = $ac_status" >&5
23156   (exit "$ac_status"); }; }; then
23157   ac_cv_func_memmove=yes
23158 else
23159   echo "$as_me: failed program was:" >&5
23160 cat "conftest.$ac_ext" >&5
23161 ac_cv_func_memmove=no
23162 fi
23163 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23164 fi
23165 echo "$as_me:23165: result: $ac_cv_func_memmove" >&5
23166 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23167 if test "$ac_cv_func_memmove" = yes; then
23168   :
23169 else
23170
23171 echo "$as_me:23171: checking for bcopy" >&5
23172 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23173 if test "${ac_cv_func_bcopy+set}" = set; then
23174   echo $ECHO_N "(cached) $ECHO_C" >&6
23175 else
23176   cat >"conftest.$ac_ext" <<_ACEOF
23177 #line 23177 "configure"
23178 #include "confdefs.h"
23179 #define bcopy autoconf_temporary
23180 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23181 #undef bcopy
23182
23183 #ifdef __cplusplus
23184 extern "C"
23185 #endif
23186
23187 /* We use char because int might match the return type of a gcc2
23188    builtin and then its argument prototype would still apply.  */
23189 char bcopy (void);
23190
23191 int
23192 main (void)
23193 {
23194
23195 /* The GNU C library defines stubs for functions which it implements
23196     to always fail with ENOSYS.  Some functions are actually named
23197     something starting with __ and the normal name is an alias.  */
23198 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23199 #error found stub for bcopy
23200 #endif
23201
23202         return bcopy ();
23203   ;
23204   return 0;
23205 }
23206 _ACEOF
23207 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23208 if { (eval echo "$as_me:23208: \"$ac_link\"") >&5
23209   (eval $ac_link) 2>&5
23210   ac_status=$?
23211   echo "$as_me:23211: \$? = $ac_status" >&5
23212   (exit "$ac_status"); } &&
23213          { ac_try='test -s "conftest$ac_exeext"'
23214   { (eval echo "$as_me:23214: \"$ac_try\"") >&5
23215   (eval $ac_try) 2>&5
23216   ac_status=$?
23217   echo "$as_me:23217: \$? = $ac_status" >&5
23218   (exit "$ac_status"); }; }; then
23219   ac_cv_func_bcopy=yes
23220 else
23221   echo "$as_me: failed program was:" >&5
23222 cat "conftest.$ac_ext" >&5
23223 ac_cv_func_bcopy=no
23224 fi
23225 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23226 fi
23227 echo "$as_me:23227: result: $ac_cv_func_bcopy" >&5
23228 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23229 if test "$ac_cv_func_bcopy" = yes; then
23230
23231         echo "$as_me:23231: checking if bcopy does overlapping moves" >&5
23232 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23233 if test "${cf_cv_good_bcopy+set}" = set; then
23234   echo $ECHO_N "(cached) $ECHO_C" >&6
23235 else
23236
23237                 if test "$cross_compiling" = yes; then
23238   cf_cv_good_bcopy=unknown
23239 else
23240   cat >"conftest.$ac_ext" <<_ACEOF
23241 #line 23241 "configure"
23242 #include "confdefs.h"
23243
23244 $ac_includes_default
23245
23246 int main(void) {
23247         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23248         char temp[40];
23249         bcopy(data, temp, sizeof(data));
23250         bcopy(temp+10, temp, 15);
23251         bcopy(temp+5, temp+15, 10);
23252         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23253 }
23254
23255 _ACEOF
23256 rm -f "conftest$ac_exeext"
23257 if { (eval echo "$as_me:23257: \"$ac_link\"") >&5
23258   (eval $ac_link) 2>&5
23259   ac_status=$?
23260   echo "$as_me:23260: \$? = $ac_status" >&5
23261   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23262   { (eval echo "$as_me:23262: \"$ac_try\"") >&5
23263   (eval $ac_try) 2>&5
23264   ac_status=$?
23265   echo "$as_me:23265: \$? = $ac_status" >&5
23266   (exit "$ac_status"); }; }; then
23267   cf_cv_good_bcopy=yes
23268 else
23269   echo "$as_me: program exited with status $ac_status" >&5
23270 echo "$as_me: failed program was:" >&5
23271 cat "conftest.$ac_ext" >&5
23272 cf_cv_good_bcopy=no
23273 fi
23274 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23275 fi
23276
23277 fi
23278 echo "$as_me:23278: result: $cf_cv_good_bcopy" >&5
23279 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23280
23281 else
23282   cf_cv_good_bcopy=no
23283 fi
23284
23285         if test "$cf_cv_good_bcopy" = yes ; then
23286
23287 cat >>confdefs.h <<\EOF
23288 #define USE_OK_BCOPY 1
23289 EOF
23290
23291         else
23292
23293 cat >>confdefs.h <<\EOF
23294 #define USE_MY_MEMMOVE 1
23295 EOF
23296
23297         fi
23298
23299 fi
23300
23301 tty >/dev/null 2>&1 || {
23302 for ac_func in posix_openpt
23303 do
23304 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23305 echo "$as_me:23305: checking for $ac_func" >&5
23306 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23307 if eval "test \"\${$as_ac_var+set}\" = set"; then
23308   echo $ECHO_N "(cached) $ECHO_C" >&6
23309 else
23310   cat >"conftest.$ac_ext" <<_ACEOF
23311 #line 23311 "configure"
23312 #include "confdefs.h"
23313 #define $ac_func autoconf_temporary
23314 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23315 #undef $ac_func
23316
23317 #ifdef __cplusplus
23318 extern "C"
23319 #endif
23320
23321 /* We use char because int might match the return type of a gcc2
23322    builtin and then its argument prototype would still apply.  */
23323 char $ac_func (void);
23324
23325 int
23326 main (void)
23327 {
23328
23329 /* The GNU C library defines stubs for functions which it implements
23330     to always fail with ENOSYS.  Some functions are actually named
23331     something starting with __ and the normal name is an alias.  */
23332 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23333 #error found stub for $ac_func
23334 #endif
23335
23336         return $ac_func ();
23337   ;
23338   return 0;
23339 }
23340 _ACEOF
23341 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23342 if { (eval echo "$as_me:23342: \"$ac_link\"") >&5
23343   (eval $ac_link) 2>&5
23344   ac_status=$?
23345   echo "$as_me:23345: \$? = $ac_status" >&5
23346   (exit "$ac_status"); } &&
23347          { ac_try='test -s "conftest$ac_exeext"'
23348   { (eval echo "$as_me:23348: \"$ac_try\"") >&5
23349   (eval $ac_try) 2>&5
23350   ac_status=$?
23351   echo "$as_me:23351: \$? = $ac_status" >&5
23352   (exit "$ac_status"); }; }; then
23353   eval "$as_ac_var=yes"
23354 else
23355   echo "$as_me: failed program was:" >&5
23356 cat "conftest.$ac_ext" >&5
23357 eval "$as_ac_var=no"
23358 fi
23359 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23360 fi
23361 echo "$as_me:23361: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23362 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23363 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23364   cat >>confdefs.h <<EOF
23365 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23366 EOF
23367
23368 fi
23369 done
23370  }
23371 echo "$as_me:23371: checking if poll really works" >&5
23372 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23373 if test "${cf_cv_working_poll+set}" = set; then
23374   echo $ECHO_N "(cached) $ECHO_C" >&6
23375 else
23376
23377 if test "$cross_compiling" = yes; then
23378   cf_cv_working_poll=unknown
23379 else
23380   cat >"conftest.$ac_ext" <<_ACEOF
23381 #line 23381 "configure"
23382 #include "confdefs.h"
23383
23384 $ac_includes_default
23385
23386 #include <fcntl.h>
23387
23388 #ifdef HAVE_POLL_H
23389 #include <poll.h>
23390 #else
23391 #include <sys/poll.h>
23392 #endif
23393
23394 int main(void) {
23395         struct pollfd myfds;
23396         int ret;
23397
23398         /* check for Darwin bug with respect to "devices" */
23399         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23400         if (myfds.fd < 0)
23401                 myfds.fd = 0;
23402         myfds.events = POLLIN;
23403         myfds.revents = 0;
23404
23405         ret = poll(&myfds, 1, 100);
23406
23407         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23408                 ret = -1;
23409         } else {
23410                 int fd = 0;
23411                 if (!isatty(fd)) {
23412                         fd = open("/dev/tty", 2);       /* O_RDWR */
23413                 }
23414 #ifdef HAVE_POSIX_OPENPT
23415                 if (fd < 0) {
23416                         fd = posix_openpt(O_RDWR);
23417                 }
23418 #endif
23419
23420                 if (fd >= 0) {
23421                         /* also check with standard input */
23422                         myfds.fd = fd;
23423                         myfds.events = POLLIN;
23424                         myfds.revents = 0;
23425                         ret = poll(&myfds, 1, 100);
23426                 } else {
23427                         ret = -1;
23428                 }
23429         }
23430         ${cf_cv_main_return:-return}(ret < 0);
23431 }
23432 _ACEOF
23433 rm -f "conftest$ac_exeext"
23434 if { (eval echo "$as_me:23434: \"$ac_link\"") >&5
23435   (eval $ac_link) 2>&5
23436   ac_status=$?
23437   echo "$as_me:23437: \$? = $ac_status" >&5
23438   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23439   { (eval echo "$as_me:23439: \"$ac_try\"") >&5
23440   (eval $ac_try) 2>&5
23441   ac_status=$?
23442   echo "$as_me:23442: \$? = $ac_status" >&5
23443   (exit "$ac_status"); }; }; then
23444   cf_cv_working_poll=yes
23445 else
23446   echo "$as_me: program exited with status $ac_status" >&5
23447 echo "$as_me: failed program was:" >&5
23448 cat "conftest.$ac_ext" >&5
23449 cf_cv_working_poll=no
23450 fi
23451 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23452 fi
23453 fi
23454 echo "$as_me:23454: result: $cf_cv_working_poll" >&5
23455 echo "${ECHO_T}$cf_cv_working_poll" >&6
23456 test "$cf_cv_working_poll" = "yes" &&
23457 cat >>confdefs.h <<\EOF
23458 #define HAVE_WORKING_POLL 1
23459 EOF
23460
23461 echo "$as_me:23461: checking for va_copy" >&5
23462 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23463 if test "${cf_cv_have_va_copy+set}" = set; then
23464   echo $ECHO_N "(cached) $ECHO_C" >&6
23465 else
23466
23467 cat >"conftest.$ac_ext" <<_ACEOF
23468 #line 23468 "configure"
23469 #include "confdefs.h"
23470
23471 #include <stdarg.h>
23472
23473 int
23474 main (void)
23475 {
23476
23477         static va_list dst;
23478         static va_list src;
23479         va_copy(dst, src)
23480   ;
23481   return 0;
23482 }
23483 _ACEOF
23484 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23485 if { (eval echo "$as_me:23485: \"$ac_link\"") >&5
23486   (eval $ac_link) 2>&5
23487   ac_status=$?
23488   echo "$as_me:23488: \$? = $ac_status" >&5
23489   (exit "$ac_status"); } &&
23490          { ac_try='test -s "conftest$ac_exeext"'
23491   { (eval echo "$as_me:23491: \"$ac_try\"") >&5
23492   (eval $ac_try) 2>&5
23493   ac_status=$?
23494   echo "$as_me:23494: \$? = $ac_status" >&5
23495   (exit "$ac_status"); }; }; then
23496   cf_cv_have_va_copy=yes
23497 else
23498   echo "$as_me: failed program was:" >&5
23499 cat "conftest.$ac_ext" >&5
23500 cf_cv_have_va_copy=no
23501 fi
23502 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23503 fi
23504 echo "$as_me:23504: result: $cf_cv_have_va_copy" >&5
23505 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23506
23507 if test "$cf_cv_have_va_copy" = yes;
23508 then
23509
23510 cat >>confdefs.h <<\EOF
23511 #define HAVE_VA_COPY 1
23512 EOF
23513
23514 else # !cf_cv_have_va_copy
23515
23516 echo "$as_me:23516: checking for __va_copy" >&5
23517 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23518 if test "${cf_cv_have___va_copy+set}" = set; then
23519   echo $ECHO_N "(cached) $ECHO_C" >&6
23520 else
23521
23522 cat >"conftest.$ac_ext" <<_ACEOF
23523 #line 23523 "configure"
23524 #include "confdefs.h"
23525
23526 #include <stdarg.h>
23527
23528 int
23529 main (void)
23530 {
23531
23532         static va_list dst;
23533         static va_list src;
23534         __va_copy(dst, src)
23535   ;
23536   return 0;
23537 }
23538 _ACEOF
23539 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23540 if { (eval echo "$as_me:23540: \"$ac_link\"") >&5
23541   (eval $ac_link) 2>&5
23542   ac_status=$?
23543   echo "$as_me:23543: \$? = $ac_status" >&5
23544   (exit "$ac_status"); } &&
23545          { ac_try='test -s "conftest$ac_exeext"'
23546   { (eval echo "$as_me:23546: \"$ac_try\"") >&5
23547   (eval $ac_try) 2>&5
23548   ac_status=$?
23549   echo "$as_me:23549: \$? = $ac_status" >&5
23550   (exit "$ac_status"); }; }; then
23551   cf_cv_have___va_copy=yes
23552 else
23553   echo "$as_me: failed program was:" >&5
23554 cat "conftest.$ac_ext" >&5
23555 cf_cv_have___va_copy=no
23556 fi
23557 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23558 fi
23559 echo "$as_me:23559: result: $cf_cv_have___va_copy" >&5
23560 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23561
23562 if test "$cf_cv_have___va_copy" = yes
23563 then
23564
23565 cat >>confdefs.h <<\EOF
23566 #define HAVE___VA_COPY 1
23567 EOF
23568
23569 else # !cf_cv_have___va_copy
23570
23571 echo "$as_me:23571: checking for __builtin_va_copy" >&5
23572 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23573 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23574   echo $ECHO_N "(cached) $ECHO_C" >&6
23575 else
23576
23577 cat >"conftest.$ac_ext" <<_ACEOF
23578 #line 23578 "configure"
23579 #include "confdefs.h"
23580
23581 #include <stdarg.h>
23582
23583 int
23584 main (void)
23585 {
23586
23587         static va_list dst;
23588         static va_list src;
23589         __builtin_va_copy(dst, src)
23590   ;
23591   return 0;
23592 }
23593 _ACEOF
23594 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23595 if { (eval echo "$as_me:23595: \"$ac_link\"") >&5
23596   (eval $ac_link) 2>&5
23597   ac_status=$?
23598   echo "$as_me:23598: \$? = $ac_status" >&5
23599   (exit "$ac_status"); } &&
23600          { ac_try='test -s "conftest$ac_exeext"'
23601   { (eval echo "$as_me:23601: \"$ac_try\"") >&5
23602   (eval $ac_try) 2>&5
23603   ac_status=$?
23604   echo "$as_me:23604: \$? = $ac_status" >&5
23605   (exit "$ac_status"); }; }; then
23606   cf_cv_have___builtin_va_copy=yes
23607 else
23608   echo "$as_me: failed program was:" >&5
23609 cat "conftest.$ac_ext" >&5
23610 cf_cv_have___builtin_va_copy=no
23611 fi
23612 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23613 fi
23614 echo "$as_me:23614: result: $cf_cv_have___builtin_va_copy" >&5
23615 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23616
23617 test "$cf_cv_have___builtin_va_copy" = yes &&
23618
23619 cat >>confdefs.h <<\EOF
23620 #define HAVE___BUILTIN_VA_COPY 1
23621 EOF
23622
23623 fi # cf_cv_have___va_copy
23624
23625 fi # cf_cv_have_va_copy
23626
23627 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23628 (*yes*)
23629         ;;
23630
23631 (*)
23632         echo "$as_me:23632: checking if we can simply copy va_list" >&5
23633 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23634 if test "${cf_cv_pointer_va_list+set}" = set; then
23635   echo $ECHO_N "(cached) $ECHO_C" >&6
23636 else
23637
23638 cat >"conftest.$ac_ext" <<_ACEOF
23639 #line 23639 "configure"
23640 #include "confdefs.h"
23641
23642 #include <stdarg.h>
23643
23644 int
23645 main (void)
23646 {
23647
23648         va_list dst;
23649         va_list src;
23650         dst = src
23651   ;
23652   return 0;
23653 }
23654 _ACEOF
23655 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23656 if { (eval echo "$as_me:23656: \"$ac_link\"") >&5
23657   (eval $ac_link) 2>&5
23658   ac_status=$?
23659   echo "$as_me:23659: \$? = $ac_status" >&5
23660   (exit "$ac_status"); } &&
23661          { ac_try='test -s "conftest$ac_exeext"'
23662   { (eval echo "$as_me:23662: \"$ac_try\"") >&5
23663   (eval $ac_try) 2>&5
23664   ac_status=$?
23665   echo "$as_me:23665: \$? = $ac_status" >&5
23666   (exit "$ac_status"); }; }; then
23667   cf_cv_pointer_va_list=yes
23668 else
23669   echo "$as_me: failed program was:" >&5
23670 cat "conftest.$ac_ext" >&5
23671 cf_cv_pointer_va_list=no
23672 fi
23673 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23674 fi
23675 echo "$as_me:23675: result: $cf_cv_pointer_va_list" >&5
23676 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23677
23678         if test "$cf_cv_pointer_va_list" = no
23679         then
23680                 echo "$as_me:23680: checking if we can copy va_list indirectly" >&5
23681 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23682 if test "${cf_cv_array_va_list+set}" = set; then
23683   echo $ECHO_N "(cached) $ECHO_C" >&6
23684 else
23685
23686 cat >"conftest.$ac_ext" <<_ACEOF
23687 #line 23687 "configure"
23688 #include "confdefs.h"
23689
23690 #include <stdarg.h>
23691
23692 int
23693 main (void)
23694 {
23695
23696         va_list dst;
23697         va_list src;
23698         *dst = *src
23699   ;
23700   return 0;
23701 }
23702 _ACEOF
23703 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23704 if { (eval echo "$as_me:23704: \"$ac_link\"") >&5
23705   (eval $ac_link) 2>&5
23706   ac_status=$?
23707   echo "$as_me:23707: \$? = $ac_status" >&5
23708   (exit "$ac_status"); } &&
23709          { ac_try='test -s "conftest$ac_exeext"'
23710   { (eval echo "$as_me:23710: \"$ac_try\"") >&5
23711   (eval $ac_try) 2>&5
23712   ac_status=$?
23713   echo "$as_me:23713: \$? = $ac_status" >&5
23714   (exit "$ac_status"); }; }; then
23715   cf_cv_array_va_list=yes
23716 else
23717   echo "$as_me: failed program was:" >&5
23718 cat "conftest.$ac_ext" >&5
23719 cf_cv_array_va_list=no
23720 fi
23721 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23722 fi
23723 echo "$as_me:23723: result: $cf_cv_array_va_list" >&5
23724 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23725                 test "$cf_cv_array_va_list" = yes &&
23726 cat >>confdefs.h <<\EOF
23727 #define ARRAY_VA_LIST 1
23728 EOF
23729
23730         fi
23731         ;;
23732 esac
23733
23734 echo "$as_me:23734: checking for pid_t" >&5
23735 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23736 if test "${ac_cv_type_pid_t+set}" = set; then
23737   echo $ECHO_N "(cached) $ECHO_C" >&6
23738 else
23739   cat >"conftest.$ac_ext" <<_ACEOF
23740 #line 23740 "configure"
23741 #include "confdefs.h"
23742 $ac_includes_default
23743 int
23744 main (void)
23745 {
23746 if ((pid_t *) 0)
23747   return 0;
23748 if (sizeof (pid_t))
23749   return 0;
23750   ;
23751   return 0;
23752 }
23753 _ACEOF
23754 rm -f "conftest.$ac_objext"
23755 if { (eval echo "$as_me:23755: \"$ac_compile\"") >&5
23756   (eval $ac_compile) 2>&5
23757   ac_status=$?
23758   echo "$as_me:23758: \$? = $ac_status" >&5
23759   (exit "$ac_status"); } &&
23760          { ac_try='test -s "conftest.$ac_objext"'
23761   { (eval echo "$as_me:23761: \"$ac_try\"") >&5
23762   (eval $ac_try) 2>&5
23763   ac_status=$?
23764   echo "$as_me:23764: \$? = $ac_status" >&5
23765   (exit "$ac_status"); }; }; then
23766   ac_cv_type_pid_t=yes
23767 else
23768   echo "$as_me: failed program was:" >&5
23769 cat "conftest.$ac_ext" >&5
23770 ac_cv_type_pid_t=no
23771 fi
23772 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23773 fi
23774 echo "$as_me:23774: result: $ac_cv_type_pid_t" >&5
23775 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23776 if test "$ac_cv_type_pid_t" = yes; then
23777   :
23778 else
23779
23780 cat >>confdefs.h <<EOF
23781 #define pid_t int
23782 EOF
23783
23784 fi
23785
23786 for ac_header in unistd.h vfork.h
23787 do
23788 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23789 echo "$as_me:23789: checking for $ac_header" >&5
23790 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23791 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23792   echo $ECHO_N "(cached) $ECHO_C" >&6
23793 else
23794   cat >"conftest.$ac_ext" <<_ACEOF
23795 #line 23795 "configure"
23796 #include "confdefs.h"
23797 #include <$ac_header>
23798 _ACEOF
23799 if { (eval echo "$as_me:23799: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23800   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23801   ac_status=$?
23802   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23803   rm -f conftest.er1
23804   cat conftest.err >&5
23805   echo "$as_me:23805: \$? = $ac_status" >&5
23806   (exit "$ac_status"); } >/dev/null; then
23807   if test -s conftest.err; then
23808     ac_cpp_err=$ac_c_preproc_warn_flag
23809   else
23810     ac_cpp_err=
23811   fi
23812 else
23813   ac_cpp_err=yes
23814 fi
23815 if test -z "$ac_cpp_err"; then
23816   eval "$as_ac_Header=yes"
23817 else
23818   echo "$as_me: failed program was:" >&5
23819   cat "conftest.$ac_ext" >&5
23820   eval "$as_ac_Header=no"
23821 fi
23822 rm -f conftest.err "conftest.$ac_ext"
23823 fi
23824 echo "$as_me:23824: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23825 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23826 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23827   cat >>confdefs.h <<EOF
23828 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23829 EOF
23830
23831 fi
23832 done
23833
23834 for ac_func in fork vfork
23835 do
23836 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23837 echo "$as_me:23837: checking for $ac_func" >&5
23838 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23839 if eval "test \"\${$as_ac_var+set}\" = set"; then
23840   echo $ECHO_N "(cached) $ECHO_C" >&6
23841 else
23842   cat >"conftest.$ac_ext" <<_ACEOF
23843 #line 23843 "configure"
23844 #include "confdefs.h"
23845 #define $ac_func autoconf_temporary
23846 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23847 #undef $ac_func
23848
23849 #ifdef __cplusplus
23850 extern "C"
23851 #endif
23852
23853 /* We use char because int might match the return type of a gcc2
23854    builtin and then its argument prototype would still apply.  */
23855 char $ac_func (void);
23856
23857 int
23858 main (void)
23859 {
23860
23861 /* The GNU C library defines stubs for functions which it implements
23862     to always fail with ENOSYS.  Some functions are actually named
23863     something starting with __ and the normal name is an alias.  */
23864 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23865 #error found stub for $ac_func
23866 #endif
23867
23868         return $ac_func ();
23869   ;
23870   return 0;
23871 }
23872 _ACEOF
23873 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23874 if { (eval echo "$as_me:23874: \"$ac_link\"") >&5
23875   (eval $ac_link) 2>&5
23876   ac_status=$?
23877   echo "$as_me:23877: \$? = $ac_status" >&5
23878   (exit "$ac_status"); } &&
23879          { ac_try='test -s "conftest$ac_exeext"'
23880   { (eval echo "$as_me:23880: \"$ac_try\"") >&5
23881   (eval $ac_try) 2>&5
23882   ac_status=$?
23883   echo "$as_me:23883: \$? = $ac_status" >&5
23884   (exit "$ac_status"); }; }; then
23885   eval "$as_ac_var=yes"
23886 else
23887   echo "$as_me: failed program was:" >&5
23888 cat "conftest.$ac_ext" >&5
23889 eval "$as_ac_var=no"
23890 fi
23891 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23892 fi
23893 echo "$as_me:23893: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23894 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23895 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23896   cat >>confdefs.h <<EOF
23897 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23898 EOF
23899
23900 fi
23901 done
23902
23903 ac_cv_func_fork_works=$ac_cv_func_fork
23904 if test "x$ac_cv_func_fork" = xyes; then
23905   echo "$as_me:23905: checking for working fork" >&5
23906 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23907 if test "${ac_cv_func_fork_works+set}" = set; then
23908   echo $ECHO_N "(cached) $ECHO_C" >&6
23909 else
23910   if test "$cross_compiling" = yes; then
23911   ac_cv_func_fork_works=cross
23912 else
23913   cat >"conftest.$ac_ext" <<_ACEOF
23914 /* By Rüdiger Kuhlmann. */
23915       #include <sys/types.h>
23916       #if HAVE_UNISTD_H
23917       # include <unistd.h>
23918       #endif
23919       /* Some systems only have a dummy stub for fork() */
23920       int main (void)
23921       {
23922         if (fork() < 0)
23923           $ac_main_return (1);
23924         $ac_main_return (0);
23925       }
23926 _ACEOF
23927 rm -f "conftest$ac_exeext"
23928 if { (eval echo "$as_me:23928: \"$ac_link\"") >&5
23929   (eval $ac_link) 2>&5
23930   ac_status=$?
23931   echo "$as_me:23931: \$? = $ac_status" >&5
23932   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23933   { (eval echo "$as_me:23933: \"$ac_try\"") >&5
23934   (eval $ac_try) 2>&5
23935   ac_status=$?
23936   echo "$as_me:23936: \$? = $ac_status" >&5
23937   (exit "$ac_status"); }; }; then
23938   ac_cv_func_fork_works=yes
23939 else
23940   echo "$as_me: program exited with status $ac_status" >&5
23941 echo "$as_me: failed program was:" >&5
23942 cat "conftest.$ac_ext" >&5
23943 ac_cv_func_fork_works=no
23944 fi
23945 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23946 fi
23947 fi
23948 echo "$as_me:23948: result: $ac_cv_func_fork_works" >&5
23949 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23950
23951 fi
23952 if test "x$ac_cv_func_fork_works" = xcross; then
23953   case $host in
23954     *-*-amigaos* | *-*-msdosdjgpp*)
23955       # Override, as these systems have only a dummy fork() stub
23956       ac_cv_func_fork_works=no
23957       ;;
23958     *)
23959       ac_cv_func_fork_works=yes
23960       ;;
23961   esac
23962   { echo "$as_me:23962: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23963 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23964 fi
23965 ac_cv_func_vfork_works=$ac_cv_func_vfork
23966 if test "x$ac_cv_func_vfork" = xyes; then
23967   echo "$as_me:23967: checking for working vfork" >&5
23968 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23969 if test "${ac_cv_func_vfork_works+set}" = set; then
23970   echo $ECHO_N "(cached) $ECHO_C" >&6
23971 else
23972   if test "$cross_compiling" = yes; then
23973   ac_cv_func_vfork_works=cross
23974 else
23975   cat >"conftest.$ac_ext" <<_ACEOF
23976 #line 23976 "configure"
23977 #include "confdefs.h"
23978 /* Thanks to Paul Eggert for this test.  */
23979 #include <stdio.h>
23980 #include <sys/types.h>
23981 #include <sys/stat.h>
23982 #if HAVE_UNISTD_H
23983 # include <unistd.h>
23984 #endif
23985 #if HAVE_VFORK_H
23986 # include <vfork.h>
23987 #endif
23988 /* On some sparc systems, changes by the child to local and incoming
23989    argument registers are propagated back to the parent.  The compiler
23990    is told about this with #include <vfork.h>, but some compilers
23991    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23992    static variable whose address is put into a register that is
23993    clobbered by the vfork.  */
23994 static
23995 #ifdef __cplusplus
23996 sparc_address_test (int arg)
23997 # else
23998 sparc_address_test (arg) int arg;
23999 #endif
24000 {
24001   static pid_t child;
24002   if (!child) {
24003     child = vfork ();
24004     if (child < 0) {
24005       perror ("vfork");
24006       _exit(2);
24007     }
24008     if (!child) {
24009       arg = getpid();
24010       write(-1, "", 0);
24011       _exit (arg);
24012     }
24013   }
24014 }
24015
24016 int
24017 main (void)
24018 {
24019   pid_t parent = getpid ();
24020   pid_t child;
24021
24022   sparc_address_test ();
24023
24024   child = vfork ();
24025
24026   if (child == 0) {
24027     /* Here is another test for sparc vfork register problems.  This
24028        test uses lots of local variables, at least as many local
24029        variables as main has allocated so far including compiler
24030        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24031        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24032        reuse the register of parent for one of the local variables,
24033        since it will think that parent can't possibly be used any more
24034        in this routine.  Assigning to the local variable will thus
24035        munge parent in the parent process.  */
24036     pid_t
24037       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24038       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24039     /* Convince the compiler that p..p7 are live; otherwise, it might
24040        use the same hardware register for all 8 local variables.  */
24041     if (p != p1 || p != p2 || p != p3 || p != p4
24042         || p != p5 || p != p6 || p != p7)
24043       _exit(1);
24044
24045     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24046        from child file descriptors.  If the child closes a descriptor
24047        before it execs or exits, this munges the parent's descriptor
24048        as well.  Test for this by closing stdout in the child.  */
24049     _exit(close(fileno(stdout)) != 0);
24050   } else {
24051     int status;
24052     struct stat st;
24053
24054     while (wait(&status) != child)
24055       ;
24056     $ac_main_return(
24057          /* Was there some problem with vforking?  */
24058          child < 0
24059
24060          /* Did the child fail?  (This shouldn't happen.)  */
24061          || status
24062
24063          /* Did the vfork/compiler bug occur?  */
24064          || parent != getpid()
24065
24066          /* Did the file descriptor bug occur?  */
24067          || fstat(fileno(stdout), &st) != 0
24068          );
24069   }
24070 }
24071 _ACEOF
24072 rm -f "conftest$ac_exeext"
24073 if { (eval echo "$as_me:24073: \"$ac_link\"") >&5
24074   (eval $ac_link) 2>&5
24075   ac_status=$?
24076   echo "$as_me:24076: \$? = $ac_status" >&5
24077   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24078   { (eval echo "$as_me:24078: \"$ac_try\"") >&5
24079   (eval $ac_try) 2>&5
24080   ac_status=$?
24081   echo "$as_me:24081: \$? = $ac_status" >&5
24082   (exit "$ac_status"); }; }; then
24083   ac_cv_func_vfork_works=yes
24084 else
24085   echo "$as_me: program exited with status $ac_status" >&5
24086 echo "$as_me: failed program was:" >&5
24087 cat "conftest.$ac_ext" >&5
24088 ac_cv_func_vfork_works=no
24089 fi
24090 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24091 fi
24092 fi
24093 echo "$as_me:24093: result: $ac_cv_func_vfork_works" >&5
24094 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24095
24096 fi;
24097 if test "x$ac_cv_func_fork_works" = xcross; then
24098   ac_cv_func_vfork_works=ac_cv_func_vfork
24099   { echo "$as_me:24099: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24100 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24101 fi
24102
24103 if test "x$ac_cv_func_vfork_works" = xyes; then
24104
24105 cat >>confdefs.h <<\EOF
24106 #define HAVE_WORKING_VFORK 1
24107 EOF
24108
24109 else
24110
24111 cat >>confdefs.h <<\EOF
24112 #define vfork fork
24113 EOF
24114
24115 fi
24116 if test "x$ac_cv_func_fork_works" = xyes; then
24117
24118 cat >>confdefs.h <<\EOF
24119 #define HAVE_WORKING_FORK 1
24120 EOF
24121
24122 fi
24123
24124 echo "$as_me:24124: checking if fopen accepts explicit binary mode" >&5
24125 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24126 if test "${cf_cv_fopen_bin_r+set}" = set; then
24127   echo $ECHO_N "(cached) $ECHO_C" >&6
24128 else
24129
24130         if test "$cross_compiling" = yes; then
24131   cf_cv_fopen_bin_r=unknown
24132 else
24133   cat >"conftest.$ac_ext" <<_ACEOF
24134 #line 24134 "configure"
24135 #include "confdefs.h"
24136
24137 $ac_includes_default
24138
24139 int main(void)
24140 {
24141         FILE *fp = fopen("conftest.tmp", "wb");
24142         int rc = 0;
24143         if (fp != 0) {
24144                 int p, q;
24145                 for (p = 0; p < 256; ++p) {
24146                         fputc(p, fp);
24147                 }
24148                 fclose(fp);
24149                 fp = fopen("conftest.tmp", "rb");
24150                 if (fp != 0) {
24151                         for (p = 0; p < 256; ++p) {
24152                                 q = fgetc(fp);
24153                                 if (q != p) {
24154                                         rc = 1;
24155                                         break;
24156                                 }
24157                         }
24158                 } else {
24159                         rc = 1;
24160                 }
24161         } else {
24162                 rc = 1;
24163         }
24164         ${cf_cv_main_return:-return} (rc);
24165 }
24166
24167 _ACEOF
24168 rm -f "conftest$ac_exeext"
24169 if { (eval echo "$as_me:24169: \"$ac_link\"") >&5
24170   (eval $ac_link) 2>&5
24171   ac_status=$?
24172   echo "$as_me:24172: \$? = $ac_status" >&5
24173   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24174   { (eval echo "$as_me:24174: \"$ac_try\"") >&5
24175   (eval $ac_try) 2>&5
24176   ac_status=$?
24177   echo "$as_me:24177: \$? = $ac_status" >&5
24178   (exit "$ac_status"); }; }; then
24179   cf_cv_fopen_bin_r=yes
24180 else
24181   echo "$as_me: program exited with status $ac_status" >&5
24182 echo "$as_me: failed program was:" >&5
24183 cat "conftest.$ac_ext" >&5
24184 cf_cv_fopen_bin_r=no
24185 fi
24186 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24187 fi
24188
24189 fi
24190 echo "$as_me:24190: result: $cf_cv_fopen_bin_r" >&5
24191 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24192 test "x$cf_cv_fopen_bin_r" != xno &&
24193 cat >>confdefs.h <<\EOF
24194 #define USE_FOPEN_BIN_R 1
24195 EOF
24196
24197 # special check for test/ditto.c
24198
24199 echo "$as_me:24199: checking for openpty in -lutil" >&5
24200 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24201 if test "${ac_cv_lib_util_openpty+set}" = set; then
24202   echo $ECHO_N "(cached) $ECHO_C" >&6
24203 else
24204   ac_check_lib_save_LIBS=$LIBS
24205 LIBS="-lutil  $LIBS"
24206 cat >"conftest.$ac_ext" <<_ACEOF
24207 #line 24207 "configure"
24208 #include "confdefs.h"
24209
24210 /* Override any gcc2 internal prototype to avoid an error.  */
24211 #ifdef __cplusplus
24212 extern "C"
24213 #endif
24214 /* We use char because int might match the return type of a gcc2
24215    builtin and then its argument prototype would still apply.  */
24216 char openpty ();
24217 int
24218 main (void)
24219 {
24220 openpty ();
24221   ;
24222   return 0;
24223 }
24224 _ACEOF
24225 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24226 if { (eval echo "$as_me:24226: \"$ac_link\"") >&5
24227   (eval $ac_link) 2>&5
24228   ac_status=$?
24229   echo "$as_me:24229: \$? = $ac_status" >&5
24230   (exit "$ac_status"); } &&
24231          { ac_try='test -s "conftest$ac_exeext"'
24232   { (eval echo "$as_me:24232: \"$ac_try\"") >&5
24233   (eval $ac_try) 2>&5
24234   ac_status=$?
24235   echo "$as_me:24235: \$? = $ac_status" >&5
24236   (exit "$ac_status"); }; }; then
24237   ac_cv_lib_util_openpty=yes
24238 else
24239   echo "$as_me: failed program was:" >&5
24240 cat "conftest.$ac_ext" >&5
24241 ac_cv_lib_util_openpty=no
24242 fi
24243 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24244 LIBS=$ac_check_lib_save_LIBS
24245 fi
24246 echo "$as_me:24246: result: $ac_cv_lib_util_openpty" >&5
24247 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24248 if test "$ac_cv_lib_util_openpty" = yes; then
24249   cf_cv_lib_util=yes
24250 else
24251   cf_cv_lib_util=no
24252 fi
24253
24254 echo "$as_me:24254: checking for openpty header" >&5
24255 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24256 if test "${cf_cv_func_openpty+set}" = set; then
24257   echo $ECHO_N "(cached) $ECHO_C" >&6
24258 else
24259
24260         cf_save_LIBS="$LIBS"
24261         test "$cf_cv_lib_util" = yes && {
24262 cf_add_libs="$LIBS"
24263 # reverse order
24264 cf_add_0lib=
24265 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24266 # filter duplicates
24267 for cf_add_1lib in $cf_add_0lib; do
24268         for cf_add_2lib in $cf_add_libs; do
24269                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24270                         cf_add_1lib=
24271                         break
24272                 fi
24273         done
24274         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24275 done
24276 LIBS="$cf_add_libs"
24277  }
24278         for cf_header in pty.h libutil.h util.h
24279         do
24280         cat >"conftest.$ac_ext" <<_ACEOF
24281 #line 24281 "configure"
24282 #include "confdefs.h"
24283
24284 #include <$cf_header>
24285
24286 int
24287 main (void)
24288 {
24289
24290         int x = openpty((int *)0, (int *)0, (char *)0,
24291                                    (struct termios *)0, (struct winsize *)0);
24292
24293   ;
24294   return 0;
24295 }
24296 _ACEOF
24297 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24298 if { (eval echo "$as_me:24298: \"$ac_link\"") >&5
24299   (eval $ac_link) 2>&5
24300   ac_status=$?
24301   echo "$as_me:24301: \$? = $ac_status" >&5
24302   (exit "$ac_status"); } &&
24303          { ac_try='test -s "conftest$ac_exeext"'
24304   { (eval echo "$as_me:24304: \"$ac_try\"") >&5
24305   (eval $ac_try) 2>&5
24306   ac_status=$?
24307   echo "$as_me:24307: \$? = $ac_status" >&5
24308   (exit "$ac_status"); }; }; then
24309
24310                 cf_cv_func_openpty=$cf_header
24311                 break
24312
24313 else
24314   echo "$as_me: failed program was:" >&5
24315 cat "conftest.$ac_ext" >&5
24316
24317                 cf_cv_func_openpty=no
24318
24319 fi
24320 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24321         done
24322         LIBS="$cf_save_LIBS"
24323
24324 fi
24325 echo "$as_me:24325: result: $cf_cv_func_openpty" >&5
24326 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24327
24328 if test "$cf_cv_func_openpty" != no ; then
24329
24330 cat >>confdefs.h <<EOF
24331 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24332 EOF
24333
24334 cat >>confdefs.h <<\EOF
24335 #define USE_XTERM_PTY 1
24336 EOF
24337
24338         if test "x$cf_cv_lib_util" = xyes ; then
24339
24340 cf_add_libs="$TEST_LIBS"
24341 # reverse order
24342 cf_add_0lib=
24343 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24344 # filter duplicates
24345 for cf_add_1lib in $cf_add_0lib; do
24346         for cf_add_2lib in $cf_add_libs; do
24347                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24348                         cf_add_1lib=
24349                         break
24350                 fi
24351         done
24352         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24353 done
24354 TEST_LIBS="$cf_add_libs"
24355
24356         fi
24357 fi
24358
24359 if test "$with_hashed_db" != no ; then
24360
24361 cat >>confdefs.h <<\EOF
24362 #define USE_HASHED_DB 1
24363 EOF
24364
24365 case $with_hashed_db in
24366 (yes|*able*)
24367         ;;
24368 (*)
24369         if test -d "$with_hashed_db" ; then
24370
24371 if test -n "$with_hashed_db/include" ; then
24372   for cf_add_incdir in $with_hashed_db/include
24373   do
24374         while test "$cf_add_incdir" != /usr/include
24375         do
24376           if test -d "$cf_add_incdir"
24377           then
24378                 cf_have_incdir=no
24379                 if test -n "$CFLAGS$CPPFLAGS" ; then
24380                   # a loop is needed to ensure we can add subdirs of existing dirs
24381                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24382                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24383                           cf_have_incdir=yes; break
24384                         fi
24385                   done
24386                 fi
24387
24388                 if test "$cf_have_incdir" = no ; then
24389                   if test "$cf_add_incdir" = /usr/local/include ; then
24390                         if test "$GCC" = yes
24391                         then
24392                           cf_save_CPPFLAGS=$CPPFLAGS
24393
24394         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24395         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24396
24397                           cat >"conftest.$ac_ext" <<_ACEOF
24398 #line 24398 "configure"
24399 #include "confdefs.h"
24400 #include <stdio.h>
24401 int
24402 main (void)
24403 {
24404 printf("Hello")
24405   ;
24406   return 0;
24407 }
24408 _ACEOF
24409 rm -f "conftest.$ac_objext"
24410 if { (eval echo "$as_me:24410: \"$ac_compile\"") >&5
24411   (eval $ac_compile) 2>&5
24412   ac_status=$?
24413   echo "$as_me:24413: \$? = $ac_status" >&5
24414   (exit "$ac_status"); } &&
24415          { ac_try='test -s "conftest.$ac_objext"'
24416   { (eval echo "$as_me:24416: \"$ac_try\"") >&5
24417   (eval $ac_try) 2>&5
24418   ac_status=$?
24419   echo "$as_me:24419: \$? = $ac_status" >&5
24420   (exit "$ac_status"); }; }; then
24421   :
24422 else
24423   echo "$as_me: failed program was:" >&5
24424 cat "conftest.$ac_ext" >&5
24425 cf_have_incdir=yes
24426 fi
24427 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24428                           CPPFLAGS=$cf_save_CPPFLAGS
24429                         fi
24430                   fi
24431                 fi
24432
24433                 if test "$cf_have_incdir" = no ; then
24434                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24435
24436 echo "${as_me:-configure}:24436: testing adding $cf_add_incdir to include-path ..." 1>&5
24437
24438                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24439
24440                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24441                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24442                   cf_add_incdir="$cf_top_incdir"
24443                 else
24444                   break
24445                 fi
24446           else
24447                 break
24448           fi
24449         done
24450   done
24451 fi
24452
24453 if test -n "$with_hashed_db/lib" ; then
24454         for cf_add_libdir in $with_hashed_db/lib
24455         do
24456                 if test "$cf_add_libdir" = /usr/lib ; then
24457                         :
24458                 elif test -d "$cf_add_libdir"
24459                 then
24460                         cf_have_libdir=no
24461                         if test -n "$LDFLAGS$LIBS" ; then
24462                                 # a loop is needed to ensure we can add subdirs of existing dirs
24463                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24464                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24465                                                 cf_have_libdir=yes; break
24466                                         fi
24467                                 done
24468                         fi
24469                         if test "$cf_have_libdir" = no ; then
24470                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24471
24472 echo "${as_me:-configure}:24472: testing adding $cf_add_libdir to library-path ..." 1>&5
24473
24474                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24475                         fi
24476                 fi
24477         done
24478 fi
24479
24480         else
24481                 case "$with_hashed_db" in
24482                 (./*|../*|/*)
24483                         { echo "$as_me:24483: WARNING: no such directory $with_hashed_db" >&5
24484 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24485                         ;;
24486                 (*)
24487
24488 cf_search=
24489
24490 test "x$prefix" != "xNONE" && \
24491 test -d "$prefix" && \
24492  {
24493         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24494         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24495         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24496         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24497         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24498         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24499 }
24500
24501 for cf_subdir_prefix in \
24502         /usr \
24503         /usr/local \
24504         /usr/pkg \
24505         /opt \
24506         /opt/local \
24507         $HOME
24508 do
24509
24510 test "x$cf_subdir_prefix" != "x$prefix" && \
24511 test -d "$cf_subdir_prefix" && \
24512 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24513         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24514         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24515         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24516         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24517         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24518         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"
24519 }
24520
24521 done
24522
24523         for cf_item in $cf_search
24524         do
24525                 case "$cf_item" in
24526                 (*/$with_hashed_db)
24527
24528 if test -n "$cf_item" ; then
24529   for cf_add_incdir in $cf_item
24530   do
24531         while test "$cf_add_incdir" != /usr/include
24532         do
24533           if test -d "$cf_add_incdir"
24534           then
24535                 cf_have_incdir=no
24536                 if test -n "$CFLAGS$CPPFLAGS" ; then
24537                   # a loop is needed to ensure we can add subdirs of existing dirs
24538                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24539                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24540                           cf_have_incdir=yes; break
24541                         fi
24542                   done
24543                 fi
24544
24545                 if test "$cf_have_incdir" = no ; then
24546                   if test "$cf_add_incdir" = /usr/local/include ; then
24547                         if test "$GCC" = yes
24548                         then
24549                           cf_save_CPPFLAGS=$CPPFLAGS
24550
24551         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24552         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24553
24554                           cat >"conftest.$ac_ext" <<_ACEOF
24555 #line 24555 "configure"
24556 #include "confdefs.h"
24557 #include <stdio.h>
24558 int
24559 main (void)
24560 {
24561 printf("Hello")
24562   ;
24563   return 0;
24564 }
24565 _ACEOF
24566 rm -f "conftest.$ac_objext"
24567 if { (eval echo "$as_me:24567: \"$ac_compile\"") >&5
24568   (eval $ac_compile) 2>&5
24569   ac_status=$?
24570   echo "$as_me:24570: \$? = $ac_status" >&5
24571   (exit "$ac_status"); } &&
24572          { ac_try='test -s "conftest.$ac_objext"'
24573   { (eval echo "$as_me:24573: \"$ac_try\"") >&5
24574   (eval $ac_try) 2>&5
24575   ac_status=$?
24576   echo "$as_me:24576: \$? = $ac_status" >&5
24577   (exit "$ac_status"); }; }; then
24578   :
24579 else
24580   echo "$as_me: failed program was:" >&5
24581 cat "conftest.$ac_ext" >&5
24582 cf_have_incdir=yes
24583 fi
24584 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24585                           CPPFLAGS=$cf_save_CPPFLAGS
24586                         fi
24587                   fi
24588                 fi
24589
24590                 if test "$cf_have_incdir" = no ; then
24591                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24592
24593 echo "${as_me:-configure}:24593: testing adding $cf_add_incdir to include-path ..." 1>&5
24594
24595                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24596
24597                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24598                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24599                   cf_add_incdir="$cf_top_incdir"
24600                 else
24601                   break
24602                 fi
24603           else
24604                 break
24605           fi
24606         done
24607   done
24608 fi
24609
24610                         ;;
24611                 esac
24612         done
24613
24614 cf_search=
24615
24616 test "x$prefix" != "xNONE" && \
24617 test -d "$prefix" && \
24618  {
24619         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24620         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24621         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24622         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24623         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24624         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24625 }
24626
24627 for cf_subdir_prefix in \
24628         /usr \
24629         /usr/local \
24630         /usr/pkg \
24631         /opt \
24632         /opt/local \
24633         $HOME
24634 do
24635
24636 test "x$cf_subdir_prefix" != "x$prefix" && \
24637 test -d "$cf_subdir_prefix" && \
24638 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24639         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24640         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24641         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24642         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24643         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24644         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"
24645 }
24646
24647 done
24648
24649         for cf_item in $cf_search
24650         do
24651                 case "$cf_item" in
24652                 (*/$with_hashed_db)
24653
24654 if test -n "$cf_item" ; then
24655         for cf_add_libdir in $cf_item
24656         do
24657                 if test "$cf_add_libdir" = /usr/lib ; then
24658                         :
24659                 elif test -d "$cf_add_libdir"
24660                 then
24661                         cf_have_libdir=no
24662                         if test -n "$LDFLAGS$LIBS" ; then
24663                                 # a loop is needed to ensure we can add subdirs of existing dirs
24664                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24665                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24666                                                 cf_have_libdir=yes; break
24667                                         fi
24668                                 done
24669                         fi
24670                         if test "$cf_have_libdir" = no ; then
24671                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24672
24673 echo "${as_me:-configure}:24673: testing adding $cf_add_libdir to library-path ..." 1>&5
24674
24675                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24676                         fi
24677                 fi
24678         done
24679 fi
24680
24681                         ;;
24682                 esac
24683         done
24684
24685                         ;;
24686                 esac
24687         fi
24688 esac
24689
24690 echo "$as_me:24690: checking for db.h" >&5
24691 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24692 if test "${ac_cv_header_db_h+set}" = set; then
24693   echo $ECHO_N "(cached) $ECHO_C" >&6
24694 else
24695   cat >"conftest.$ac_ext" <<_ACEOF
24696 #line 24696 "configure"
24697 #include "confdefs.h"
24698 #include <db.h>
24699 _ACEOF
24700 if { (eval echo "$as_me:24700: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24701   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24702   ac_status=$?
24703   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24704   rm -f conftest.er1
24705   cat conftest.err >&5
24706   echo "$as_me:24706: \$? = $ac_status" >&5
24707   (exit "$ac_status"); } >/dev/null; then
24708   if test -s conftest.err; then
24709     ac_cpp_err=$ac_c_preproc_warn_flag
24710   else
24711     ac_cpp_err=
24712   fi
24713 else
24714   ac_cpp_err=yes
24715 fi
24716 if test -z "$ac_cpp_err"; then
24717   ac_cv_header_db_h=yes
24718 else
24719   echo "$as_me: failed program was:" >&5
24720   cat "conftest.$ac_ext" >&5
24721   ac_cv_header_db_h=no
24722 fi
24723 rm -f conftest.err "conftest.$ac_ext"
24724 fi
24725 echo "$as_me:24725: result: $ac_cv_header_db_h" >&5
24726 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24727 if test "$ac_cv_header_db_h" = yes; then
24728
24729 echo "$as_me:24729: checking for version of db" >&5
24730 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24731 if test "${cf_cv_hashed_db_version+set}" = set; then
24732   echo $ECHO_N "(cached) $ECHO_C" >&6
24733 else
24734
24735 cf_cv_hashed_db_version=unknown
24736
24737 for cf_db_version in 1 2 3 4 5 6
24738 do
24739
24740 echo "${as_me:-configure}:24740: testing checking for db version $cf_db_version ..." 1>&5
24741
24742         cat >"conftest.$ac_ext" <<_ACEOF
24743 #line 24743 "configure"
24744 #include "confdefs.h"
24745
24746 $ac_includes_default
24747 #include <db.h>
24748
24749 #ifdef DB_VERSION_MAJOR
24750         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24751 #if $cf_db_version == DB_VERSION_MAJOR
24752         /* ok */
24753 #else
24754         #error $cf_db_version is not DB_VERSION_MAJOR
24755 #endif
24756 #else
24757 #if $cf_db_version == 1
24758         /* ok: assuming this is DB 1.8.5 */
24759 #else
24760         #error $cf_db_version is not 1
24761 #endif
24762 #endif
24763
24764 int
24765 main (void)
24766 {
24767 DBT *foo = 0
24768   ;
24769   return 0;
24770 }
24771 _ACEOF
24772 rm -f "conftest.$ac_objext"
24773 if { (eval echo "$as_me:24773: \"$ac_compile\"") >&5
24774   (eval $ac_compile) 2>&5
24775   ac_status=$?
24776   echo "$as_me:24776: \$? = $ac_status" >&5
24777   (exit "$ac_status"); } &&
24778          { ac_try='test -s "conftest.$ac_objext"'
24779   { (eval echo "$as_me:24779: \"$ac_try\"") >&5
24780   (eval $ac_try) 2>&5
24781   ac_status=$?
24782   echo "$as_me:24782: \$? = $ac_status" >&5
24783   (exit "$ac_status"); }; }; then
24784
24785         cf_cv_hashed_db_version=$cf_db_version
24786         break
24787
24788 else
24789   echo "$as_me: failed program was:" >&5
24790 cat "conftest.$ac_ext" >&5
24791 fi
24792 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24793 done
24794
24795 fi
24796 echo "$as_me:24796: result: $cf_cv_hashed_db_version" >&5
24797 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24798
24799 if test "$cf_cv_hashed_db_version" = unknown ; then
24800         { { echo "$as_me:24800: error: Cannot determine version of db" >&5
24801 echo "$as_me: error: Cannot determine version of db" >&2;}
24802    { (exit 1); exit 1; }; }
24803 else
24804
24805 echo "$as_me:24805: checking for db libraries" >&5
24806 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24807 if test "${cf_cv_hashed_db_libs+set}" = set; then
24808   echo $ECHO_N "(cached) $ECHO_C" >&6
24809 else
24810
24811 cf_cv_hashed_db_libs=unknown
24812 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24813 do
24814         cf_save_libs="$LIBS"
24815         if test -n "$cf_db_libs"; then
24816
24817 cf_add_libs="$LIBS"
24818 # reverse order
24819 cf_add_0lib=
24820 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24821 # filter duplicates
24822 for cf_add_1lib in $cf_add_0lib; do
24823         for cf_add_2lib in $cf_add_libs; do
24824                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24825                         cf_add_1lib=
24826                         break
24827                 fi
24828         done
24829         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24830 done
24831 LIBS="$cf_add_libs"
24832
24833         fi
24834
24835 echo "${as_me:-configure}:24835: testing checking for library $cf_db_libs ..." 1>&5
24836
24837         cat >"conftest.$ac_ext" <<_ACEOF
24838 #line 24838 "configure"
24839 #include "confdefs.h"
24840
24841 $ac_includes_default
24842 #include <db.h>
24843
24844 int
24845 main (void)
24846 {
24847
24848         char *path = "/tmp/foo";
24849 #ifdef DB_VERSION_MAJOR
24850 #if DB_VERSION_MAJOR >= 4
24851         DB *result = 0;
24852         db_create(&result, NULL, 0);
24853         result->open(result,
24854                 NULL,
24855                 path,
24856                 path,
24857                 DB_HASH,
24858                 DB_CREATE,
24859                 0644);
24860 #elif DB_VERSION_MAJOR >= 3
24861         DB *result = 0;
24862         db_create(&result, NULL, 0);
24863         result->open(result,
24864                 path,
24865                 path,
24866                 DB_HASH,
24867                 DB_CREATE,
24868                 0644);
24869 #elif DB_VERSION_MAJOR >= 2
24870         DB *result = 0;
24871         db_open(path,
24872                 DB_HASH,
24873                 DB_CREATE,
24874                 0644,
24875                 (DB_ENV *) 0,
24876                 (DB_INFO *) 0,
24877                 &result);
24878 #endif /* DB_VERSION_MAJOR */
24879 #else
24880         DB *result = dbopen(path,
24881                      2,
24882                      0644,
24883                      DB_HASH,
24884                      0);
24885 #endif
24886         ${cf_cv_main_return:-return}(result != 0)
24887
24888   ;
24889   return 0;
24890 }
24891 _ACEOF
24892 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24893 if { (eval echo "$as_me:24893: \"$ac_link\"") >&5
24894   (eval $ac_link) 2>&5
24895   ac_status=$?
24896   echo "$as_me:24896: \$? = $ac_status" >&5
24897   (exit "$ac_status"); } &&
24898          { ac_try='test -s "conftest$ac_exeext"'
24899   { (eval echo "$as_me:24899: \"$ac_try\"") >&5
24900   (eval $ac_try) 2>&5
24901   ac_status=$?
24902   echo "$as_me:24902: \$? = $ac_status" >&5
24903   (exit "$ac_status"); }; }; then
24904
24905         if test -n "$cf_db_libs" ; then
24906                 cf_cv_hashed_db_libs=$cf_db_libs
24907         else
24908                 cf_cv_hashed_db_libs=default
24909         fi
24910         LIBS="$cf_save_libs"
24911         break
24912
24913 else
24914   echo "$as_me: failed program was:" >&5
24915 cat "conftest.$ac_ext" >&5
24916 fi
24917 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24918         LIBS="$cf_save_libs"
24919 done
24920
24921 fi
24922 echo "$as_me:24922: result: $cf_cv_hashed_db_libs" >&5
24923 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24924
24925         if test "$cf_cv_hashed_db_libs" = unknown ; then
24926                 { { echo "$as_me:24926: error: Cannot determine library for db" >&5
24927 echo "$as_me: error: Cannot determine library for db" >&2;}
24928    { (exit 1); exit 1; }; }
24929         elif test "$cf_cv_hashed_db_libs" != default ; then
24930
24931 cf_add_libs="$LIBS"
24932 # reverse order
24933 cf_add_0lib=
24934 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24935 # filter duplicates
24936 for cf_add_1lib in $cf_add_0lib; do
24937         for cf_add_2lib in $cf_add_libs; do
24938                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24939                         cf_add_1lib=
24940                         break
24941                 fi
24942         done
24943         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24944 done
24945 LIBS="$cf_add_libs"
24946
24947         fi
24948 fi
24949
24950 else
24951
24952         { { echo "$as_me:24952: error: Cannot find db.h" >&5
24953 echo "$as_me: error: Cannot find db.h" >&2;}
24954    { (exit 1); exit 1; }; }
24955
24956 fi
24957
24958 fi
24959
24960 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24961         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24962         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24963 fi
24964
24965 # Just in case, check if the C compiler has a bool type.
24966
24967 echo "$as_me:24967: checking if we should include stdbool.h" >&5
24968 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24969
24970 if test "${cf_cv_header_stdbool_h+set}" = set; then
24971   echo $ECHO_N "(cached) $ECHO_C" >&6
24972 else
24973
24974         cat >"conftest.$ac_ext" <<_ACEOF
24975 #line 24975 "configure"
24976 #include "confdefs.h"
24977
24978 int
24979 main (void)
24980 {
24981 bool foo = false
24982   ;
24983   return 0;
24984 }
24985 _ACEOF
24986 rm -f "conftest.$ac_objext"
24987 if { (eval echo "$as_me:24987: \"$ac_compile\"") >&5
24988   (eval $ac_compile) 2>&5
24989   ac_status=$?
24990   echo "$as_me:24990: \$? = $ac_status" >&5
24991   (exit "$ac_status"); } &&
24992          { ac_try='test -s "conftest.$ac_objext"'
24993   { (eval echo "$as_me:24993: \"$ac_try\"") >&5
24994   (eval $ac_try) 2>&5
24995   ac_status=$?
24996   echo "$as_me:24996: \$? = $ac_status" >&5
24997   (exit "$ac_status"); }; }; then
24998   cf_cv_header_stdbool_h=0
24999 else
25000   echo "$as_me: failed program was:" >&5
25001 cat "conftest.$ac_ext" >&5
25002 cat >"conftest.$ac_ext" <<_ACEOF
25003 #line 25003 "configure"
25004 #include "confdefs.h"
25005
25006 #ifndef __BEOS__
25007 #include <stdbool.h>
25008 #endif
25009
25010 int
25011 main (void)
25012 {
25013 bool foo = false
25014   ;
25015   return 0;
25016 }
25017 _ACEOF
25018 rm -f "conftest.$ac_objext"
25019 if { (eval echo "$as_me:25019: \"$ac_compile\"") >&5
25020   (eval $ac_compile) 2>&5
25021   ac_status=$?
25022   echo "$as_me:25022: \$? = $ac_status" >&5
25023   (exit "$ac_status"); } &&
25024          { ac_try='test -s "conftest.$ac_objext"'
25025   { (eval echo "$as_me:25025: \"$ac_try\"") >&5
25026   (eval $ac_try) 2>&5
25027   ac_status=$?
25028   echo "$as_me:25028: \$? = $ac_status" >&5
25029   (exit "$ac_status"); }; }; then
25030   cf_cv_header_stdbool_h=1
25031 else
25032   echo "$as_me: failed program was:" >&5
25033 cat "conftest.$ac_ext" >&5
25034 cf_cv_header_stdbool_h=0
25035 fi
25036 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25037 fi
25038 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25039 fi
25040
25041 if test "$cf_cv_header_stdbool_h" = 1
25042 then    echo "$as_me:25042: result: yes" >&5
25043 echo "${ECHO_T}yes" >&6
25044 else    echo "$as_me:25044: result: no" >&5
25045 echo "${ECHO_T}no" >&6
25046 fi
25047
25048 echo "$as_me:25048: checking for builtin bool type" >&5
25049 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25050
25051 if test "${cf_cv_cc_bool_type+set}" = set; then
25052   echo $ECHO_N "(cached) $ECHO_C" >&6
25053 else
25054
25055         cat >"conftest.$ac_ext" <<_ACEOF
25056 #line 25056 "configure"
25057 #include "confdefs.h"
25058
25059 #include <stdio.h>
25060 #include <sys/types.h>
25061
25062 int
25063 main (void)
25064 {
25065 bool x = false
25066   ;
25067   return 0;
25068 }
25069 _ACEOF
25070 rm -f "conftest.$ac_objext"
25071 if { (eval echo "$as_me:25071: \"$ac_compile\"") >&5
25072   (eval $ac_compile) 2>&5
25073   ac_status=$?
25074   echo "$as_me:25074: \$? = $ac_status" >&5
25075   (exit "$ac_status"); } &&
25076          { ac_try='test -s "conftest.$ac_objext"'
25077   { (eval echo "$as_me:25077: \"$ac_try\"") >&5
25078   (eval $ac_try) 2>&5
25079   ac_status=$?
25080   echo "$as_me:25080: \$? = $ac_status" >&5
25081   (exit "$ac_status"); }; }; then
25082   cf_cv_cc_bool_type=1
25083 else
25084   echo "$as_me: failed program was:" >&5
25085 cat "conftest.$ac_ext" >&5
25086 cf_cv_cc_bool_type=0
25087 fi
25088 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25089
25090 fi
25091
25092 if test "$cf_cv_cc_bool_type" = 1
25093 then    echo "$as_me:25093: result: yes" >&5
25094 echo "${ECHO_T}yes" >&6
25095 else    echo "$as_me:25095: result: no" >&5
25096 echo "${ECHO_T}no" >&6
25097 fi
25098
25099 # Check for C++ compiler characteristics (and ensure that it's there!)
25100 if test -n "$CXX" ; then
25101         ac_ext=cc
25102 ac_cpp='$CXXCPP $CPPFLAGS'
25103 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25104 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25105 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25106 ac_main_return="return"
25107
25108 if test -n "$GXX" ; then
25109
25110         cf_save="$LIBS"
25111         LIBS="$LIBS $CXXLIBS"
25112         echo "$as_me:25112: checking if we already have C++ library" >&5
25113 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25114         cat >"conftest.$ac_ext" <<_ACEOF
25115 #line 25115 "configure"
25116 #include "confdefs.h"
25117
25118                         #include <iostream>
25119 int
25120 main (void)
25121 {
25122
25123                         std::cout << "Hello World!" << std::endl;
25124   ;
25125   return 0;
25126 }
25127 _ACEOF
25128 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25129 if { (eval echo "$as_me:25129: \"$ac_link\"") >&5
25130   (eval $ac_link) 2>&5
25131   ac_status=$?
25132   echo "$as_me:25132: \$? = $ac_status" >&5
25133   (exit "$ac_status"); } &&
25134          { ac_try='test -s "conftest$ac_exeext"'
25135   { (eval echo "$as_me:25135: \"$ac_try\"") >&5
25136   (eval $ac_try) 2>&5
25137   ac_status=$?
25138   echo "$as_me:25138: \$? = $ac_status" >&5
25139   (exit "$ac_status"); }; }; then
25140   cf_have_libstdcpp=yes
25141 else
25142   echo "$as_me: failed program was:" >&5
25143 cat "conftest.$ac_ext" >&5
25144 cf_have_libstdcpp=no
25145 fi
25146 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25147         echo "$as_me:25147: result: $cf_have_libstdcpp" >&5
25148 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25149         LIBS="$cf_save"
25150
25151         if test "$cf_have_libstdcpp" != yes
25152         then
25153                 case "$cf_cv_system_name" in
25154                 (os2*)
25155                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25156                                 cf_stdcpp_libname=stdcpp
25157                         else
25158                                 cf_stdcpp_libname=stdc++
25159                         fi
25160                         ;;
25161                 (*)
25162                         cf_stdcpp_libname=stdc++
25163                         ;;
25164                 esac
25165
25166                 echo "$as_me:25166: checking for library $cf_stdcpp_libname" >&5
25167 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25168 if test "${cf_cv_libstdcpp+set}" = set; then
25169   echo $ECHO_N "(cached) $ECHO_C" >&6
25170 else
25171
25172                         cf_save="$LIBS"
25173                         LIBS="$LIBS $CXXLIBS"
25174
25175 cf_add_libs="$LIBS"
25176 # reverse order
25177 cf_add_0lib=
25178 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25179 # filter duplicates
25180 for cf_add_1lib in $cf_add_0lib; do
25181         for cf_add_2lib in $cf_add_libs; do
25182                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25183                         cf_add_1lib=
25184                         break
25185                 fi
25186         done
25187         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25188 done
25189 LIBS="$cf_add_libs"
25190
25191                 cat >"conftest.$ac_ext" <<_ACEOF
25192 #line 25192 "configure"
25193 #include "confdefs.h"
25194
25195                                 #include <iostream>
25196 int
25197 main (void)
25198 {
25199
25200                                 std::cout << "Hello World!" << std::endl;
25201   ;
25202   return 0;
25203 }
25204 _ACEOF
25205 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25206 if { (eval echo "$as_me:25206: \"$ac_link\"") >&5
25207   (eval $ac_link) 2>&5
25208   ac_status=$?
25209   echo "$as_me:25209: \$? = $ac_status" >&5
25210   (exit "$ac_status"); } &&
25211          { ac_try='test -s "conftest$ac_exeext"'
25212   { (eval echo "$as_me:25212: \"$ac_try\"") >&5
25213   (eval $ac_try) 2>&5
25214   ac_status=$?
25215   echo "$as_me:25215: \$? = $ac_status" >&5
25216   (exit "$ac_status"); }; }; then
25217   cf_cv_libstdcpp=yes
25218 else
25219   echo "$as_me: failed program was:" >&5
25220 cat "conftest.$ac_ext" >&5
25221 cf_cv_libstdcpp=no
25222 fi
25223 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25224                         LIBS="$cf_save"
25225
25226 fi
25227 echo "$as_me:25227: result: $cf_cv_libstdcpp" >&5
25228 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25229                 test "$cf_cv_libstdcpp" = yes && {
25230 cf_add_libs="$CXXLIBS"
25231 # reverse order
25232 cf_add_0lib=
25233 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25234 # filter duplicates
25235 for cf_add_1lib in $cf_add_0lib; do
25236         for cf_add_2lib in $cf_add_libs; do
25237                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25238                         cf_add_1lib=
25239                         break
25240                 fi
25241         done
25242         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25243 done
25244 CXXLIBS="$cf_add_libs"
25245  }
25246         fi
25247 fi
25248
25249         echo "$as_me:25249: checking whether $CXX understands -c and -o together" >&5
25250 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25251 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25252   echo $ECHO_N "(cached) $ECHO_C" >&6
25253 else
25254
25255 cat > conftest.$ac_ext <<CF_EOF
25256 int main(void)
25257 {
25258         ${cf_cv_main_return:-return}(0);
25259 }
25260 CF_EOF
25261 # We do the test twice because some compilers refuse to overwrite an
25262 # existing .o file with -o, though they will create one.
25263 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25264 if { (eval echo "$as_me:25264: \"$ac_try\"") >&5
25265   (eval $ac_try) 2>&5
25266   ac_status=$?
25267   echo "$as_me:25267: \$? = $ac_status" >&5
25268   (exit "$ac_status"); } &&
25269   test -f conftest2.$ac_objext && { (eval echo "$as_me:25269: \"$ac_try\"") >&5
25270   (eval $ac_try) 2>&5
25271   ac_status=$?
25272   echo "$as_me:25272: \$? = $ac_status" >&5
25273   (exit "$ac_status"); };
25274 then
25275   eval cf_cv_prog_CXX_c_o=yes
25276 else
25277   eval cf_cv_prog_CXX_c_o=no
25278 fi
25279 rm -rf ./conftest*
25280
25281 fi
25282 if test "$cf_cv_prog_CXX_c_o" = yes; then
25283   echo "$as_me:25283: result: yes" >&5
25284 echo "${ECHO_T}yes" >&6
25285 else
25286   echo "$as_me:25286: result: no" >&5
25287 echo "${ECHO_T}no" >&6
25288 fi
25289
25290         case "$GXX_VERSION" in
25291         (1.*|2.[0-6]*|[1-9][0-9].*)
25292                 cf_cxx_library=yes
25293                 ;;
25294         (*-2.7*|2.7*)
25295
25296 cf_cxx_library=unknown
25297 case "$cf_cv_system_name" in
25298 (os2*)
25299         cf_gpp_libname=gpp
25300         ;;
25301 (*)
25302         cf_gpp_libname=g++
25303         ;;
25304 esac
25305 if test "$GXX" = yes; then
25306         echo "$as_me:25306: checking for lib$cf_gpp_libname" >&5
25307 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25308         cf_save="$LIBS"
25309
25310 cf_add_libs="$LIBS"
25311 # reverse order
25312 cf_add_0lib=
25313 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25314 # filter duplicates
25315 for cf_add_1lib in $cf_add_0lib; do
25316         for cf_add_2lib in $cf_add_libs; do
25317                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25318                         cf_add_1lib=
25319                         break
25320                 fi
25321         done
25322         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25323 done
25324 LIBS="$cf_add_libs"
25325
25326         cat >"conftest.$ac_ext" <<_ACEOF
25327 #line 25327 "configure"
25328 #include "confdefs.h"
25329
25330 #include <$cf_gpp_libname/builtin.h>
25331
25332 int
25333 main (void)
25334 {
25335 two_arg_error_handler_t foo2 = lib_error_handler
25336   ;
25337   return 0;
25338 }
25339 _ACEOF
25340 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25341 if { (eval echo "$as_me:25341: \"$ac_link\"") >&5
25342   (eval $ac_link) 2>&5
25343   ac_status=$?
25344   echo "$as_me:25344: \$? = $ac_status" >&5
25345   (exit "$ac_status"); } &&
25346          { ac_try='test -s "conftest$ac_exeext"'
25347   { (eval echo "$as_me:25347: \"$ac_try\"") >&5
25348   (eval $ac_try) 2>&5
25349   ac_status=$?
25350   echo "$as_me:25350: \$? = $ac_status" >&5
25351   (exit "$ac_status"); }; }; then
25352   cf_cxx_library=yes
25353
25354 cf_add_libs="$CXXLIBS"
25355 # reverse order
25356 cf_add_0lib=
25357 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25358 # filter duplicates
25359 for cf_add_1lib in $cf_add_0lib; do
25360         for cf_add_2lib in $cf_add_libs; do
25361                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25362                         cf_add_1lib=
25363                         break
25364                 fi
25365         done
25366         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25367 done
25368 CXXLIBS="$cf_add_libs"
25369
25370          if test "$cf_gpp_libname" = cpp ; then
25371
25372 cat >>confdefs.h <<\EOF
25373 #define HAVE_GPP_BUILTIN_H 1
25374 EOF
25375
25376          else
25377
25378 cat >>confdefs.h <<\EOF
25379 #define HAVE_GXX_BUILTIN_H 1
25380 EOF
25381
25382          fi
25383 else
25384   echo "$as_me: failed program was:" >&5
25385 cat "conftest.$ac_ext" >&5
25386 cat >"conftest.$ac_ext" <<_ACEOF
25387 #line 25387 "configure"
25388 #include "confdefs.h"
25389
25390 #include <builtin.h>
25391
25392 int
25393 main (void)
25394 {
25395 two_arg_error_handler_t foo2 = lib_error_handler
25396   ;
25397   return 0;
25398 }
25399 _ACEOF
25400 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25401 if { (eval echo "$as_me:25401: \"$ac_link\"") >&5
25402   (eval $ac_link) 2>&5
25403   ac_status=$?
25404   echo "$as_me:25404: \$? = $ac_status" >&5
25405   (exit "$ac_status"); } &&
25406          { ac_try='test -s "conftest$ac_exeext"'
25407   { (eval echo "$as_me:25407: \"$ac_try\"") >&5
25408   (eval $ac_try) 2>&5
25409   ac_status=$?
25410   echo "$as_me:25410: \$? = $ac_status" >&5
25411   (exit "$ac_status"); }; }; then
25412   cf_cxx_library=yes
25413
25414 cf_add_libs="$CXXLIBS"
25415 # reverse order
25416 cf_add_0lib=
25417 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25418 # filter duplicates
25419 for cf_add_1lib in $cf_add_0lib; do
25420         for cf_add_2lib in $cf_add_libs; do
25421                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25422                         cf_add_1lib=
25423                         break
25424                 fi
25425         done
25426         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25427 done
25428 CXXLIBS="$cf_add_libs"
25429
25430 cat >>confdefs.h <<\EOF
25431 #define HAVE_BUILTIN_H 1
25432 EOF
25433
25434 else
25435   echo "$as_me: failed program was:" >&5
25436 cat "conftest.$ac_ext" >&5
25437 cf_cxx_library=no
25438 fi
25439 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25440 fi
25441 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25442         LIBS="$cf_save"
25443         echo "$as_me:25443: result: $cf_cxx_library" >&5
25444 echo "${ECHO_T}$cf_cxx_library" >&6
25445 fi
25446
25447                 ;;
25448         (*)
25449                 cf_cxx_library=no
25450                 ;;
25451         esac
25452
25453         ac_ext=cc
25454 ac_cpp='$CXXCPP $CPPFLAGS'
25455 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25456 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25457 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25458 ac_main_return="return"
25459 echo "$as_me:25459: checking how to run the C++ preprocessor" >&5
25460 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25461 if test -z "$CXXCPP"; then
25462   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25463   echo $ECHO_N "(cached) $ECHO_C" >&6
25464 else
25465       # Double quotes because CXXCPP needs to be expanded
25466     for CXXCPP in "$CXX -E" "/lib/cpp"
25467     do
25468       ac_preproc_ok=false
25469 for ac_cxx_preproc_warn_flag in '' yes
25470 do
25471   # Use a header file that comes with gcc, so configuring glibc
25472   # with a fresh cross-compiler works.
25473   # On the NeXT, cc -E runs the code through the compiler's parser,
25474   # not just through cpp. "Syntax error" is here to catch this case.
25475   cat >"conftest.$ac_ext" <<_ACEOF
25476 #line 25476 "configure"
25477 #include "confdefs.h"
25478 #include <assert.h>
25479                      Syntax error
25480 _ACEOF
25481 if { (eval echo "$as_me:25481: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25482   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25483   ac_status=$?
25484   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25485   rm -f conftest.er1
25486   cat conftest.err >&5
25487   echo "$as_me:25487: \$? = $ac_status" >&5
25488   (exit "$ac_status"); } >/dev/null; then
25489   if test -s conftest.err; then
25490     ac_cpp_err=$ac_cxx_preproc_warn_flag
25491   else
25492     ac_cpp_err=
25493   fi
25494 else
25495   ac_cpp_err=yes
25496 fi
25497 if test -z "$ac_cpp_err"; then
25498   :
25499 else
25500   echo "$as_me: failed program was:" >&5
25501   cat "conftest.$ac_ext" >&5
25502   # Broken: fails on valid input.
25503 continue
25504 fi
25505 rm -f conftest.err "conftest.$ac_ext"
25506
25507   # OK, works on sane cases.  Now check whether non-existent headers
25508   # can be detected and how.
25509   cat >"conftest.$ac_ext" <<_ACEOF
25510 #line 25510 "configure"
25511 #include "confdefs.h"
25512 #include <ac_nonexistent.h>
25513 _ACEOF
25514 if { (eval echo "$as_me:25514: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25515   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25516   ac_status=$?
25517   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25518   rm -f conftest.er1
25519   cat conftest.err >&5
25520   echo "$as_me:25520: \$? = $ac_status" >&5
25521   (exit "$ac_status"); } >/dev/null; then
25522   if test -s conftest.err; then
25523     ac_cpp_err=$ac_cxx_preproc_warn_flag
25524   else
25525     ac_cpp_err=
25526   fi
25527 else
25528   ac_cpp_err=yes
25529 fi
25530 if test -z "$ac_cpp_err"; then
25531   # Broken: success on invalid input.
25532 continue
25533 else
25534   echo "$as_me: failed program was:" >&5
25535   cat "conftest.$ac_ext" >&5
25536   # Passes both tests.
25537 ac_preproc_ok=:
25538 break
25539 fi
25540 rm -f conftest.err "conftest.$ac_ext"
25541
25542 done
25543 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25544 rm -f conftest.err "conftest.$ac_ext"
25545 if $ac_preproc_ok; then
25546   break
25547 fi
25548
25549     done
25550     ac_cv_prog_CXXCPP=$CXXCPP
25551
25552 fi
25553   CXXCPP=$ac_cv_prog_CXXCPP
25554 else
25555   ac_cv_prog_CXXCPP=$CXXCPP
25556 fi
25557 echo "$as_me:25557: result: $CXXCPP" >&5
25558 echo "${ECHO_T}$CXXCPP" >&6
25559 ac_preproc_ok=false
25560 for ac_cxx_preproc_warn_flag in '' yes
25561 do
25562   # Use a header file that comes with gcc, so configuring glibc
25563   # with a fresh cross-compiler works.
25564   # On the NeXT, cc -E runs the code through the compiler's parser,
25565   # not just through cpp. "Syntax error" is here to catch this case.
25566   cat >"conftest.$ac_ext" <<_ACEOF
25567 #line 25567 "configure"
25568 #include "confdefs.h"
25569 #include <assert.h>
25570                      Syntax error
25571 _ACEOF
25572 if { (eval echo "$as_me:25572: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25573   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25574   ac_status=$?
25575   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25576   rm -f conftest.er1
25577   cat conftest.err >&5
25578   echo "$as_me:25578: \$? = $ac_status" >&5
25579   (exit "$ac_status"); } >/dev/null; then
25580   if test -s conftest.err; then
25581     ac_cpp_err=$ac_cxx_preproc_warn_flag
25582   else
25583     ac_cpp_err=
25584   fi
25585 else
25586   ac_cpp_err=yes
25587 fi
25588 if test -z "$ac_cpp_err"; then
25589   :
25590 else
25591   echo "$as_me: failed program was:" >&5
25592   cat "conftest.$ac_ext" >&5
25593   # Broken: fails on valid input.
25594 continue
25595 fi
25596 rm -f conftest.err "conftest.$ac_ext"
25597
25598   # OK, works on sane cases.  Now check whether non-existent headers
25599   # can be detected and how.
25600   cat >"conftest.$ac_ext" <<_ACEOF
25601 #line 25601 "configure"
25602 #include "confdefs.h"
25603 #include <ac_nonexistent.h>
25604 _ACEOF
25605 if { (eval echo "$as_me:25605: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25606   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25607   ac_status=$?
25608   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25609   rm -f conftest.er1
25610   cat conftest.err >&5
25611   echo "$as_me:25611: \$? = $ac_status" >&5
25612   (exit "$ac_status"); } >/dev/null; then
25613   if test -s conftest.err; then
25614     ac_cpp_err=$ac_cxx_preproc_warn_flag
25615   else
25616     ac_cpp_err=
25617   fi
25618 else
25619   ac_cpp_err=yes
25620 fi
25621 if test -z "$ac_cpp_err"; then
25622   # Broken: success on invalid input.
25623 continue
25624 else
25625   echo "$as_me: failed program was:" >&5
25626   cat "conftest.$ac_ext" >&5
25627   # Passes both tests.
25628 ac_preproc_ok=:
25629 break
25630 fi
25631 rm -f conftest.err "conftest.$ac_ext"
25632
25633 done
25634 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25635 rm -f conftest.err "conftest.$ac_ext"
25636 if $ac_preproc_ok; then
25637   :
25638 else
25639   { { echo "$as_me:25639: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25640 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25641    { (exit 1); exit 1; }; }
25642 fi
25643
25644 ac_ext=cc
25645 ac_cpp='$CXXCPP $CPPFLAGS'
25646 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25647 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25648 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25649 ac_main_return="return"
25650
25651 for ac_header in typeinfo
25652 do
25653 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25654 echo "$as_me:25654: checking for $ac_header" >&5
25655 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25656 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25657   echo $ECHO_N "(cached) $ECHO_C" >&6
25658 else
25659   cat >"conftest.$ac_ext" <<_ACEOF
25660 #line 25660 "configure"
25661 #include "confdefs.h"
25662 #include <$ac_header>
25663 _ACEOF
25664 if { (eval echo "$as_me:25664: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25665   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25666   ac_status=$?
25667   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25668   rm -f conftest.er1
25669   cat conftest.err >&5
25670   echo "$as_me:25670: \$? = $ac_status" >&5
25671   (exit "$ac_status"); } >/dev/null; then
25672   if test -s conftest.err; then
25673     ac_cpp_err=$ac_cxx_preproc_warn_flag
25674   else
25675     ac_cpp_err=
25676   fi
25677 else
25678   ac_cpp_err=yes
25679 fi
25680 if test -z "$ac_cpp_err"; then
25681   eval "$as_ac_Header=yes"
25682 else
25683   echo "$as_me: failed program was:" >&5
25684   cat "conftest.$ac_ext" >&5
25685   eval "$as_ac_Header=no"
25686 fi
25687 rm -f conftest.err "conftest.$ac_ext"
25688 fi
25689 echo "$as_me:25689: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25690 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25691 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25692   cat >>confdefs.h <<EOF
25693 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25694 EOF
25695
25696 fi
25697 done
25698
25699 for ac_header in iostream
25700 do
25701 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25702 echo "$as_me:25702: checking for $ac_header" >&5
25703 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25704 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25705   echo $ECHO_N "(cached) $ECHO_C" >&6
25706 else
25707   cat >"conftest.$ac_ext" <<_ACEOF
25708 #line 25708 "configure"
25709 #include "confdefs.h"
25710 #include <$ac_header>
25711 _ACEOF
25712 if { (eval echo "$as_me:25712: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25713   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25714   ac_status=$?
25715   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25716   rm -f conftest.er1
25717   cat conftest.err >&5
25718   echo "$as_me:25718: \$? = $ac_status" >&5
25719   (exit "$ac_status"); } >/dev/null; then
25720   if test -s conftest.err; then
25721     ac_cpp_err=$ac_cxx_preproc_warn_flag
25722   else
25723     ac_cpp_err=
25724   fi
25725 else
25726   ac_cpp_err=yes
25727 fi
25728 if test -z "$ac_cpp_err"; then
25729   eval "$as_ac_Header=yes"
25730 else
25731   echo "$as_me: failed program was:" >&5
25732   cat "conftest.$ac_ext" >&5
25733   eval "$as_ac_Header=no"
25734 fi
25735 rm -f conftest.err "conftest.$ac_ext"
25736 fi
25737 echo "$as_me:25737: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25738 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25739 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25740   cat >>confdefs.h <<EOF
25741 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25742 EOF
25743
25744 fi
25745 done
25746
25747 if test x"$ac_cv_header_iostream" = xyes ; then
25748         echo "$as_me:25748: checking if iostream uses std-namespace" >&5
25749 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25750         cat >"conftest.$ac_ext" <<_ACEOF
25751 #line 25751 "configure"
25752 #include "confdefs.h"
25753
25754 #include <iostream>
25755 using std::endl;
25756 using std::cerr;
25757 int
25758 main (void)
25759 {
25760
25761 cerr << "testing" << endl;
25762
25763   ;
25764   return 0;
25765 }
25766 _ACEOF
25767 rm -f "conftest.$ac_objext"
25768 if { (eval echo "$as_me:25768: \"$ac_compile\"") >&5
25769   (eval $ac_compile) 2>&5
25770   ac_status=$?
25771   echo "$as_me:25771: \$? = $ac_status" >&5
25772   (exit "$ac_status"); } &&
25773          { ac_try='test -s "conftest.$ac_objext"'
25774   { (eval echo "$as_me:25774: \"$ac_try\"") >&5
25775   (eval $ac_try) 2>&5
25776   ac_status=$?
25777   echo "$as_me:25777: \$? = $ac_status" >&5
25778   (exit "$ac_status"); }; }; then
25779   cf_iostream_namespace=yes
25780 else
25781   echo "$as_me: failed program was:" >&5
25782 cat "conftest.$ac_ext" >&5
25783 cf_iostream_namespace=no
25784 fi
25785 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25786         echo "$as_me:25786: result: $cf_iostream_namespace" >&5
25787 echo "${ECHO_T}$cf_iostream_namespace" >&6
25788         if test "$cf_iostream_namespace" = yes ; then
25789
25790 cat >>confdefs.h <<\EOF
25791 #define IOSTREAM_NAMESPACE 1
25792 EOF
25793
25794         fi
25795 fi
25796
25797 echo "$as_me:25797: checking if we should include stdbool.h" >&5
25798 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25799
25800 if test "${cf_cv_header_stdbool_h+set}" = set; then
25801   echo $ECHO_N "(cached) $ECHO_C" >&6
25802 else
25803
25804         cat >"conftest.$ac_ext" <<_ACEOF
25805 #line 25805 "configure"
25806 #include "confdefs.h"
25807
25808 int
25809 main (void)
25810 {
25811 bool foo = false
25812   ;
25813   return 0;
25814 }
25815 _ACEOF
25816 rm -f "conftest.$ac_objext"
25817 if { (eval echo "$as_me:25817: \"$ac_compile\"") >&5
25818   (eval $ac_compile) 2>&5
25819   ac_status=$?
25820   echo "$as_me:25820: \$? = $ac_status" >&5
25821   (exit "$ac_status"); } &&
25822          { ac_try='test -s "conftest.$ac_objext"'
25823   { (eval echo "$as_me:25823: \"$ac_try\"") >&5
25824   (eval $ac_try) 2>&5
25825   ac_status=$?
25826   echo "$as_me:25826: \$? = $ac_status" >&5
25827   (exit "$ac_status"); }; }; then
25828   cf_cv_header_stdbool_h=0
25829 else
25830   echo "$as_me: failed program was:" >&5
25831 cat "conftest.$ac_ext" >&5
25832 cat >"conftest.$ac_ext" <<_ACEOF
25833 #line 25833 "configure"
25834 #include "confdefs.h"
25835
25836 #ifndef __BEOS__
25837 #include <stdbool.h>
25838 #endif
25839
25840 int
25841 main (void)
25842 {
25843 bool foo = false
25844   ;
25845   return 0;
25846 }
25847 _ACEOF
25848 rm -f "conftest.$ac_objext"
25849 if { (eval echo "$as_me:25849: \"$ac_compile\"") >&5
25850   (eval $ac_compile) 2>&5
25851   ac_status=$?
25852   echo "$as_me:25852: \$? = $ac_status" >&5
25853   (exit "$ac_status"); } &&
25854          { ac_try='test -s "conftest.$ac_objext"'
25855   { (eval echo "$as_me:25855: \"$ac_try\"") >&5
25856   (eval $ac_try) 2>&5
25857   ac_status=$?
25858   echo "$as_me:25858: \$? = $ac_status" >&5
25859   (exit "$ac_status"); }; }; then
25860   cf_cv_header_stdbool_h=1
25861 else
25862   echo "$as_me: failed program was:" >&5
25863 cat "conftest.$ac_ext" >&5
25864 cf_cv_header_stdbool_h=0
25865 fi
25866 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25867 fi
25868 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25869 fi
25870
25871 if test "$cf_cv_header_stdbool_h" = 1
25872 then    echo "$as_me:25872: result: yes" >&5
25873 echo "${ECHO_T}yes" >&6
25874 else    echo "$as_me:25874: result: no" >&5
25875 echo "${ECHO_T}no" >&6
25876 fi
25877
25878 echo "$as_me:25878: checking for builtin bool type" >&5
25879 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25880
25881 if test "${cf_cv_builtin_bool+set}" = set; then
25882   echo $ECHO_N "(cached) $ECHO_C" >&6
25883 else
25884
25885         cat >"conftest.$ac_ext" <<_ACEOF
25886 #line 25886 "configure"
25887 #include "confdefs.h"
25888
25889 #include <stdio.h>
25890 #include <sys/types.h>
25891
25892 int
25893 main (void)
25894 {
25895 bool x = false
25896   ;
25897   return 0;
25898 }
25899 _ACEOF
25900 rm -f "conftest.$ac_objext"
25901 if { (eval echo "$as_me:25901: \"$ac_compile\"") >&5
25902   (eval $ac_compile) 2>&5
25903   ac_status=$?
25904   echo "$as_me:25904: \$? = $ac_status" >&5
25905   (exit "$ac_status"); } &&
25906          { ac_try='test -s "conftest.$ac_objext"'
25907   { (eval echo "$as_me:25907: \"$ac_try\"") >&5
25908   (eval $ac_try) 2>&5
25909   ac_status=$?
25910   echo "$as_me:25910: \$? = $ac_status" >&5
25911   (exit "$ac_status"); }; }; then
25912   cf_cv_builtin_bool=1
25913 else
25914   echo "$as_me: failed program was:" >&5
25915 cat "conftest.$ac_ext" >&5
25916 cf_cv_builtin_bool=0
25917 fi
25918 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25919
25920 fi
25921
25922 if test "$cf_cv_builtin_bool" = 1
25923 then    echo "$as_me:25923: result: yes" >&5
25924 echo "${ECHO_T}yes" >&6
25925 else    echo "$as_me:25925: result: no" >&5
25926 echo "${ECHO_T}no" >&6
25927 fi
25928
25929 echo "$as_me:25929: checking for bool" >&5
25930 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25931 if test "${ac_cv_type_bool+set}" = set; then
25932   echo $ECHO_N "(cached) $ECHO_C" >&6
25933 else
25934   cat >"conftest.$ac_ext" <<_ACEOF
25935 #line 25935 "configure"
25936 #include "confdefs.h"
25937
25938 $ac_includes_default
25939
25940 #if defined(__cplusplus)
25941
25942 #ifdef HAVE_GXX_BUILTIN_H
25943 #include <g++/builtin.h>
25944 #elif HAVE_GPP_BUILTIN_H
25945 #include <gpp/builtin.h>
25946 #elif HAVE_BUILTIN_H
25947 #include <builtin.h>
25948 #endif
25949
25950 #else
25951
25952 #if $cf_cv_header_stdbool_h
25953 #include <stdbool.h>
25954 #endif
25955
25956 #endif
25957
25958 int
25959 main (void)
25960 {
25961 if ((bool *) 0)
25962   return 0;
25963 if (sizeof (bool))
25964   return 0;
25965   ;
25966   return 0;
25967 }
25968 _ACEOF
25969 rm -f "conftest.$ac_objext"
25970 if { (eval echo "$as_me:25970: \"$ac_compile\"") >&5
25971   (eval $ac_compile) 2>&5
25972   ac_status=$?
25973   echo "$as_me:25973: \$? = $ac_status" >&5
25974   (exit "$ac_status"); } &&
25975          { ac_try='test -s "conftest.$ac_objext"'
25976   { (eval echo "$as_me:25976: \"$ac_try\"") >&5
25977   (eval $ac_try) 2>&5
25978   ac_status=$?
25979   echo "$as_me:25979: \$? = $ac_status" >&5
25980   (exit "$ac_status"); }; }; then
25981   ac_cv_type_bool=yes
25982 else
25983   echo "$as_me: failed program was:" >&5
25984 cat "conftest.$ac_ext" >&5
25985 ac_cv_type_bool=no
25986 fi
25987 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25988 fi
25989 echo "$as_me:25989: result: $ac_cv_type_bool" >&5
25990 echo "${ECHO_T}$ac_cv_type_bool" >&6
25991
25992 echo "$as_me:25992: checking size of bool" >&5
25993 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25994 if test "${ac_cv_sizeof_bool+set}" = set; then
25995   echo $ECHO_N "(cached) $ECHO_C" >&6
25996 else
25997   if test "$ac_cv_type_bool" = yes; then
25998   if test "$cross_compiling" = yes; then
25999   # Depending upon the size, compute the lo and hi bounds.
26000 cat >"conftest.$ac_ext" <<_ACEOF
26001 #line 26001 "configure"
26002 #include "confdefs.h"
26003
26004 $ac_includes_default
26005
26006 #if defined(__cplusplus)
26007
26008 #ifdef HAVE_GXX_BUILTIN_H
26009 #include <g++/builtin.h>
26010 #elif HAVE_GPP_BUILTIN_H
26011 #include <gpp/builtin.h>
26012 #elif HAVE_BUILTIN_H
26013 #include <builtin.h>
26014 #endif
26015
26016 #else
26017
26018 #if $cf_cv_header_stdbool_h
26019 #include <stdbool.h>
26020 #endif
26021
26022 #endif
26023
26024 int
26025 main (void)
26026 {
26027 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26028   ;
26029   return 0;
26030 }
26031 _ACEOF
26032 rm -f "conftest.$ac_objext"
26033 if { (eval echo "$as_me:26033: \"$ac_compile\"") >&5
26034   (eval $ac_compile) 2>&5
26035   ac_status=$?
26036   echo "$as_me:26036: \$? = $ac_status" >&5
26037   (exit "$ac_status"); } &&
26038          { ac_try='test -s "conftest.$ac_objext"'
26039   { (eval echo "$as_me:26039: \"$ac_try\"") >&5
26040   (eval $ac_try) 2>&5
26041   ac_status=$?
26042   echo "$as_me:26042: \$? = $ac_status" >&5
26043   (exit "$ac_status"); }; }; then
26044   ac_lo=0 ac_mid=0
26045   while :; do
26046     cat >"conftest.$ac_ext" <<_ACEOF
26047 #line 26047 "configure"
26048 #include "confdefs.h"
26049
26050 $ac_includes_default
26051
26052 #if defined(__cplusplus)
26053
26054 #ifdef HAVE_GXX_BUILTIN_H
26055 #include <g++/builtin.h>
26056 #elif HAVE_GPP_BUILTIN_H
26057 #include <gpp/builtin.h>
26058 #elif HAVE_BUILTIN_H
26059 #include <builtin.h>
26060 #endif
26061
26062 #else
26063
26064 #if $cf_cv_header_stdbool_h
26065 #include <stdbool.h>
26066 #endif
26067
26068 #endif
26069
26070 int
26071 main (void)
26072 {
26073 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26074   ;
26075   return 0;
26076 }
26077 _ACEOF
26078 rm -f "conftest.$ac_objext"
26079 if { (eval echo "$as_me:26079: \"$ac_compile\"") >&5
26080   (eval $ac_compile) 2>&5
26081   ac_status=$?
26082   echo "$as_me:26082: \$? = $ac_status" >&5
26083   (exit "$ac_status"); } &&
26084          { ac_try='test -s "conftest.$ac_objext"'
26085   { (eval echo "$as_me:26085: \"$ac_try\"") >&5
26086   (eval $ac_try) 2>&5
26087   ac_status=$?
26088   echo "$as_me:26088: \$? = $ac_status" >&5
26089   (exit "$ac_status"); }; }; then
26090   ac_hi=$ac_mid; break
26091 else
26092   echo "$as_me: failed program was:" >&5
26093 cat "conftest.$ac_ext" >&5
26094 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26095 fi
26096 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26097   done
26098 else
26099   echo "$as_me: failed program was:" >&5
26100 cat "conftest.$ac_ext" >&5
26101 ac_hi=-1 ac_mid=-1
26102   while :; do
26103     cat >"conftest.$ac_ext" <<_ACEOF
26104 #line 26104 "configure"
26105 #include "confdefs.h"
26106
26107 $ac_includes_default
26108
26109 #if defined(__cplusplus)
26110
26111 #ifdef HAVE_GXX_BUILTIN_H
26112 #include <g++/builtin.h>
26113 #elif HAVE_GPP_BUILTIN_H
26114 #include <gpp/builtin.h>
26115 #elif HAVE_BUILTIN_H
26116 #include <builtin.h>
26117 #endif
26118
26119 #else
26120
26121 #if $cf_cv_header_stdbool_h
26122 #include <stdbool.h>
26123 #endif
26124
26125 #endif
26126
26127 int
26128 main (void)
26129 {
26130 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26131   ;
26132   return 0;
26133 }
26134 _ACEOF
26135 rm -f "conftest.$ac_objext"
26136 if { (eval echo "$as_me:26136: \"$ac_compile\"") >&5
26137   (eval $ac_compile) 2>&5
26138   ac_status=$?
26139   echo "$as_me:26139: \$? = $ac_status" >&5
26140   (exit "$ac_status"); } &&
26141          { ac_try='test -s "conftest.$ac_objext"'
26142   { (eval echo "$as_me:26142: \"$ac_try\"") >&5
26143   (eval $ac_try) 2>&5
26144   ac_status=$?
26145   echo "$as_me:26145: \$? = $ac_status" >&5
26146   (exit "$ac_status"); }; }; then
26147   ac_lo=$ac_mid; break
26148 else
26149   echo "$as_me: failed program was:" >&5
26150 cat "conftest.$ac_ext" >&5
26151 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26152 fi
26153 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26154   done
26155 fi
26156 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26157 # Binary search between lo and hi bounds.
26158 while test "x$ac_lo" != "x$ac_hi"; do
26159   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26160   cat >"conftest.$ac_ext" <<_ACEOF
26161 #line 26161 "configure"
26162 #include "confdefs.h"
26163
26164 $ac_includes_default
26165
26166 #if defined(__cplusplus)
26167
26168 #ifdef HAVE_GXX_BUILTIN_H
26169 #include <g++/builtin.h>
26170 #elif HAVE_GPP_BUILTIN_H
26171 #include <gpp/builtin.h>
26172 #elif HAVE_BUILTIN_H
26173 #include <builtin.h>
26174 #endif
26175
26176 #else
26177
26178 #if $cf_cv_header_stdbool_h
26179 #include <stdbool.h>
26180 #endif
26181
26182 #endif
26183
26184 int
26185 main (void)
26186 {
26187 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26188   ;
26189   return 0;
26190 }
26191 _ACEOF
26192 rm -f "conftest.$ac_objext"
26193 if { (eval echo "$as_me:26193: \"$ac_compile\"") >&5
26194   (eval $ac_compile) 2>&5
26195   ac_status=$?
26196   echo "$as_me:26196: \$? = $ac_status" >&5
26197   (exit "$ac_status"); } &&
26198          { ac_try='test -s "conftest.$ac_objext"'
26199   { (eval echo "$as_me:26199: \"$ac_try\"") >&5
26200   (eval $ac_try) 2>&5
26201   ac_status=$?
26202   echo "$as_me:26202: \$? = $ac_status" >&5
26203   (exit "$ac_status"); }; }; then
26204   ac_hi=$ac_mid
26205 else
26206   echo "$as_me: failed program was:" >&5
26207 cat "conftest.$ac_ext" >&5
26208 ac_lo=`expr "$ac_mid" + 1`
26209 fi
26210 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26211 done
26212 ac_cv_sizeof_bool=$ac_lo
26213 else
26214   if test "$cross_compiling" = yes; then
26215   { { echo "$as_me:26215: error: cannot run test program while cross compiling" >&5
26216 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26217    { (exit 1); exit 1; }; }
26218 else
26219   cat >"conftest.$ac_ext" <<_ACEOF
26220 #line 26220 "configure"
26221 #include "confdefs.h"
26222
26223 $ac_includes_default
26224
26225 #if defined(__cplusplus)
26226
26227 #ifdef HAVE_GXX_BUILTIN_H
26228 #include <g++/builtin.h>
26229 #elif HAVE_GPP_BUILTIN_H
26230 #include <gpp/builtin.h>
26231 #elif HAVE_BUILTIN_H
26232 #include <builtin.h>
26233 #endif
26234
26235 #else
26236
26237 #if $cf_cv_header_stdbool_h
26238 #include <stdbool.h>
26239 #endif
26240
26241 #endif
26242
26243 int
26244 main (void)
26245 {
26246 FILE *f = fopen ("conftest.val", "w");
26247 if (!f)
26248   $ac_main_return (1);
26249 fprintf (f, "%ld", (long)(sizeof (bool)));
26250 fclose (f);
26251   ;
26252   return 0;
26253 }
26254 _ACEOF
26255 rm -f "conftest$ac_exeext"
26256 if { (eval echo "$as_me:26256: \"$ac_link\"") >&5
26257   (eval $ac_link) 2>&5
26258   ac_status=$?
26259   echo "$as_me:26259: \$? = $ac_status" >&5
26260   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26261   { (eval echo "$as_me:26261: \"$ac_try\"") >&5
26262   (eval $ac_try) 2>&5
26263   ac_status=$?
26264   echo "$as_me:26264: \$? = $ac_status" >&5
26265   (exit "$ac_status"); }; }; then
26266   ac_cv_sizeof_bool=`cat conftest.val`
26267 else
26268   echo "$as_me: program exited with status $ac_status" >&5
26269 echo "$as_me: failed program was:" >&5
26270 cat "conftest.$ac_ext" >&5
26271 fi
26272 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26273 fi
26274 fi
26275 rm -f conftest.val
26276 else
26277   ac_cv_sizeof_bool=0
26278 fi
26279 fi
26280 echo "$as_me:26280: result: $ac_cv_sizeof_bool" >&5
26281 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26282 cat >>confdefs.h <<EOF
26283 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26284 EOF
26285
26286 echo "$as_me:26286: checking for type of bool" >&5
26287 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26288 if test "${cf_cv_type_of_bool+set}" = set; then
26289   echo $ECHO_N "(cached) $ECHO_C" >&6
26290 else
26291
26292         rm -f cf_test.out
26293         if test "$cross_compiling" = yes; then
26294
26295                 case x$ac_cv_sizeof_bool in
26296                 (x1) cf_cv_type_of_bool="unsigned char";;
26297                 (x2) cf_cv_type_of_bool="unsigned short";;
26298                 (x4) cf_cv_type_of_bool="unsigned int";;
26299                 (x8) cf_cv_type_of_bool="unsigned long";;
26300                 (*)  cf_cv_type_of_bool=unknown;;
26301                 esac
26302
26303 else
26304   cat >"conftest.$ac_ext" <<_ACEOF
26305 #line 26305 "configure"
26306 #include "confdefs.h"
26307
26308 $ac_includes_default
26309
26310 #if defined(__cplusplus)
26311
26312 #ifdef HAVE_GXX_BUILTIN_H
26313 #include <g++/builtin.h>
26314 #elif HAVE_GPP_BUILTIN_H
26315 #include <gpp/builtin.h>
26316 #elif HAVE_BUILTIN_H
26317 #include <builtin.h>
26318 #endif
26319
26320 #else
26321
26322 #if $cf_cv_header_stdbool_h
26323 #include <stdbool.h>
26324 #endif
26325
26326 #endif
26327
26328 int main(void)
26329 {
26330         FILE *fp = fopen("cf_test.out", "w");
26331         if (fp != 0) {
26332                 bool x = true;
26333                 if ((bool)(-x) >= 0)
26334                         fputs("unsigned ", fp);
26335                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26336                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26337                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26338                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26339                 fclose(fp);
26340         }
26341         ${cf_cv_main_return:-return}(0);
26342 }
26343
26344 _ACEOF
26345 rm -f "conftest$ac_exeext"
26346 if { (eval echo "$as_me:26346: \"$ac_link\"") >&5
26347   (eval $ac_link) 2>&5
26348   ac_status=$?
26349   echo "$as_me:26349: \$? = $ac_status" >&5
26350   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26351   { (eval echo "$as_me:26351: \"$ac_try\"") >&5
26352   (eval $ac_try) 2>&5
26353   ac_status=$?
26354   echo "$as_me:26354: \$? = $ac_status" >&5
26355   (exit "$ac_status"); }; }; then
26356   cf_cv_type_of_bool=`cat cf_test.out`
26357                  if test -z "$cf_cv_type_of_bool"; then
26358                    cf_cv_type_of_bool=unknown
26359                  fi
26360 else
26361   echo "$as_me: program exited with status $ac_status" >&5
26362 echo "$as_me: failed program was:" >&5
26363 cat "conftest.$ac_ext" >&5
26364 cf_cv_type_of_bool=unknown
26365 fi
26366 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26367 fi
26368         rm -f cf_test.out
26369
26370 fi
26371 echo "$as_me:26371: result: $cf_cv_type_of_bool" >&5
26372 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26373
26374 if test "$cf_cv_type_of_bool" = unknown ; then
26375         case .$NCURSES_BOOL in
26376         (.auto|.) NCURSES_BOOL=unsigned;;
26377         esac
26378         { echo "$as_me:26378: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26379 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26380         cf_cv_type_of_bool=$NCURSES_BOOL
26381 fi
26382
26383 echo "$as_me:26383: checking for special defines needed for etip.h" >&5
26384 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26385 cf_save_CXXFLAGS="$CXXFLAGS"
26386 cf_result="none"
26387
26388 # etip.h includes ncurses.h which includes ncurses_dll.h
26389 # But ncurses_dll.h is generated - fix here.
26390 test -d include || mkdir include
26391 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
26392
26393 for cf_math in "" MATH_H
26394 do
26395 for cf_excp in "" MATH_EXCEPTION
26396 do
26397         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26398         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26399         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26400 cat >"conftest.$ac_ext" <<_ACEOF
26401 #line 26401 "configure"
26402 #include "confdefs.h"
26403
26404 #include <etip.h.in>
26405
26406 int
26407 main (void)
26408 {
26409
26410   ;
26411   return 0;
26412 }
26413 _ACEOF
26414 rm -f "conftest.$ac_objext"
26415 if { (eval echo "$as_me:26415: \"$ac_compile\"") >&5
26416   (eval $ac_compile) 2>&5
26417   ac_status=$?
26418   echo "$as_me:26418: \$? = $ac_status" >&5
26419   (exit "$ac_status"); } &&
26420          { ac_try='test -s "conftest.$ac_objext"'
26421   { (eval echo "$as_me:26421: \"$ac_try\"") >&5
26422   (eval $ac_try) 2>&5
26423   ac_status=$?
26424   echo "$as_me:26424: \$? = $ac_status" >&5
26425   (exit "$ac_status"); }; }; then
26426
26427         test -n "$cf_math" && cat >>confdefs.h <<EOF
26428 #define ETIP_NEEDS_${cf_math} 1
26429 EOF
26430
26431         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26432 #define ETIP_NEEDS_${cf_excp} 1
26433 EOF
26434
26435         cf_result="$cf_math $cf_excp"
26436         break 2
26437
26438 else
26439   echo "$as_me: failed program was:" >&5
26440 cat "conftest.$ac_ext" >&5
26441 fi
26442 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26443 done
26444 done
26445 echo "$as_me:26445: result: $cf_result" >&5
26446 echo "${ECHO_T}$cf_result" >&6
26447 CXXFLAGS="$cf_save_CXXFLAGS"
26448
26449 if test -n "$CXX"; then
26450 echo "$as_me:26450: checking if $CXX accepts override keyword" >&5
26451 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26452 if test "${cf_cv_cpp_override+set}" = set; then
26453   echo $ECHO_N "(cached) $ECHO_C" >&6
26454 else
26455
26456         ac_ext=cc
26457 ac_cpp='$CXXCPP $CPPFLAGS'
26458 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26459 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26460 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26461 ac_main_return="return"
26462
26463         if test "$cross_compiling" = yes; then
26464   cf_cv_cpp_override=unknown
26465 else
26466   cat >"conftest.$ac_ext" <<_ACEOF
26467 #line 26467 "configure"
26468 #include "confdefs.h"
26469
26470 class base
26471 {
26472 public:
26473         virtual int foo(float x) = 0;
26474 };
26475
26476 class derived: public base
26477 {
26478 public:
26479         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26480 };
26481
26482 int main(void) { }
26483
26484 _ACEOF
26485 rm -f "conftest$ac_exeext"
26486 if { (eval echo "$as_me:26486: \"$ac_link\"") >&5
26487   (eval $ac_link) 2>&5
26488   ac_status=$?
26489   echo "$as_me:26489: \$? = $ac_status" >&5
26490   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26491   { (eval echo "$as_me:26491: \"$ac_try\"") >&5
26492   (eval $ac_try) 2>&5
26493   ac_status=$?
26494   echo "$as_me:26494: \$? = $ac_status" >&5
26495   (exit "$ac_status"); }; }; then
26496   cf_cv_cpp_override=yes
26497 else
26498   echo "$as_me: program exited with status $ac_status" >&5
26499 echo "$as_me: failed program was:" >&5
26500 cat "conftest.$ac_ext" >&5
26501 cf_cv_cpp_override=no
26502 fi
26503 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26504 fi
26505         ac_ext=cc
26506 ac_cpp='$CXXCPP $CPPFLAGS'
26507 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26508 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26509 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26510 ac_main_return="return"
26511
26512 fi
26513 echo "$as_me:26513: result: $cf_cv_cpp_override" >&5
26514 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26515 fi
26516 test "$cf_cv_cpp_override" = yes &&
26517 cat >>confdefs.h <<\EOF
26518 #define CPP_HAS_OVERRIDE 1
26519 EOF
26520
26521 if test -n "$CXX"; then
26522 echo "$as_me:26522: checking if $CXX accepts parameter initialization" >&5
26523 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26524 if test "${cf_cv_cpp_param_init+set}" = set; then
26525   echo $ECHO_N "(cached) $ECHO_C" >&6
26526 else
26527
26528         ac_ext=cc
26529 ac_cpp='$CXXCPP $CPPFLAGS'
26530 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26531 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26532 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26533 ac_main_return="return"
26534
26535         if test "$cross_compiling" = yes; then
26536   cf_cv_cpp_param_init=unknown
26537 else
26538   cat >"conftest.$ac_ext" <<_ACEOF
26539 #line 26539 "configure"
26540 #include "confdefs.h"
26541
26542 class TEST {
26543 private:
26544         int value;
26545 public:
26546         TEST(int x = 1);
26547         ~TEST();
26548 };
26549
26550 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26551 {
26552         value = x;
26553 }
26554 int main(void) { }
26555
26556 _ACEOF
26557 rm -f "conftest$ac_exeext"
26558 if { (eval echo "$as_me:26558: \"$ac_link\"") >&5
26559   (eval $ac_link) 2>&5
26560   ac_status=$?
26561   echo "$as_me:26561: \$? = $ac_status" >&5
26562   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26563   { (eval echo "$as_me:26563: \"$ac_try\"") >&5
26564   (eval $ac_try) 2>&5
26565   ac_status=$?
26566   echo "$as_me:26566: \$? = $ac_status" >&5
26567   (exit "$ac_status"); }; }; then
26568   cf_cv_cpp_param_init=yes
26569 else
26570   echo "$as_me: program exited with status $ac_status" >&5
26571 echo "$as_me: failed program was:" >&5
26572 cat "conftest.$ac_ext" >&5
26573 cf_cv_cpp_param_init=no
26574 fi
26575 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26576 fi
26577         ac_ext=cc
26578 ac_cpp='$CXXCPP $CPPFLAGS'
26579 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26580 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26581 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26582 ac_main_return="return"
26583
26584 fi
26585 echo "$as_me:26585: result: $cf_cv_cpp_param_init" >&5
26586 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26587 fi
26588 test "$cf_cv_cpp_param_init" = yes &&
26589 cat >>confdefs.h <<\EOF
26590 #define CPP_HAS_PARAM_INIT 1
26591 EOF
26592
26593 if test -n "$CXX"; then
26594
26595 echo "$as_me:26595: checking if $CXX accepts static_cast" >&5
26596 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26597 if test "${cf_cv_cpp_static_cast+set}" = set; then
26598   echo $ECHO_N "(cached) $ECHO_C" >&6
26599 else
26600
26601         ac_ext=cc
26602 ac_cpp='$CXXCPP $CPPFLAGS'
26603 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26604 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26605 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26606 ac_main_return="return"
26607
26608         cat >"conftest.$ac_ext" <<_ACEOF
26609 #line 26609 "configure"
26610 #include "confdefs.h"
26611
26612 class NCursesPanel
26613 {
26614 public:
26615   NCursesPanel(int nlines,
26616                int ncols,
26617                int begin_y = 0,
26618                int begin_x = 0)
26619   {
26620   }
26621   NCursesPanel();
26622   ~NCursesPanel();
26623 };
26624
26625 template<class T> class NCursesUserPanel : public NCursesPanel
26626 {
26627 public:
26628   NCursesUserPanel (int nlines,
26629                     int ncols,
26630                     int begin_y = 0,
26631                     int begin_x = 0,
26632                     const T* p_UserData = static_cast<T*>(0))
26633     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26634   {
26635   };
26636   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26637   {
26638   };
26639
26640   virtual ~NCursesUserPanel() {};
26641 };
26642
26643 int
26644 main (void)
26645 {
26646
26647         const char* p_UserData = static_cast<char*>(0)
26648   ;
26649   return 0;
26650 }
26651 _ACEOF
26652 rm -f "conftest.$ac_objext"
26653 if { (eval echo "$as_me:26653: \"$ac_compile\"") >&5
26654   (eval $ac_compile) 2>&5
26655   ac_status=$?
26656   echo "$as_me:26656: \$? = $ac_status" >&5
26657   (exit "$ac_status"); } &&
26658          { ac_try='test -s "conftest.$ac_objext"'
26659   { (eval echo "$as_me:26659: \"$ac_try\"") >&5
26660   (eval $ac_try) 2>&5
26661   ac_status=$?
26662   echo "$as_me:26662: \$? = $ac_status" >&5
26663   (exit "$ac_status"); }; }; then
26664   cf_cv_cpp_static_cast=yes
26665 else
26666   echo "$as_me: failed program was:" >&5
26667 cat "conftest.$ac_ext" >&5
26668 cf_cv_cpp_static_cast=no
26669 fi
26670 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26671
26672         ac_ext=cc
26673 ac_cpp='$CXXCPP $CPPFLAGS'
26674 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26675 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26676 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26677 ac_main_return="return"
26678
26679 fi
26680 echo "$as_me:26680: result: $cf_cv_cpp_static_cast" >&5
26681 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26682
26683 fi
26684
26685 test "$cf_cv_cpp_static_cast" = yes &&
26686 cat >>confdefs.h <<\EOF
26687 #define CPP_HAS_STATIC_CAST 1
26688 EOF
26689
26690         CXX_AR='$(AR)'
26691         CXX_ARFLAGS='$(ARFLAGS)'
26692         case "$cf_cv_system_name" in
26693         (irix*)
26694             if test "$GXX" != yes ; then
26695                 CXX_AR='$(CXX)'
26696                 CXX_ARFLAGS='-ar -o'
26697             fi
26698             ;;
26699         (sco3.2v5*)
26700             CXXLDFLAGS="-u main"
26701             ;;
26702         (solaris2*)
26703             if test "$GXX" != yes ; then
26704                 CXX_AR='$(CXX)'
26705                 CXX_ARFLAGS='-xar -o'
26706             fi
26707             ;;
26708         esac
26709
26710 else
26711         cf_cxx_library=no
26712         cf_cv_builtin_bool=1
26713
26714         # Just because we are not configuring against C++ right now does not
26715         # mean that a user will not want to use C++.  Some distributors disable
26716         # the C++ portion of this configuration as a shortcut (or just to avoid
26717         # compiling the demo in the c++ directory).  So we need a reasonable
26718         # default for the 'bool' type.
26719         #
26720         # Caveat: since the storage of the bool type is not standardized, it
26721         # may change.
26722
26723         if test "$NCURSES_BOOL" != auto ; then
26724                 cf_cv_type_of_bool=$NCURSES_BOOL
26725                 cf_cv_header_stdbool_h=0
26726         else
26727                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26728
26729 echo "$as_me:26729: checking for bool" >&5
26730 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26731 if test "${ac_cv_type_bool+set}" = set; then
26732   echo $ECHO_N "(cached) $ECHO_C" >&6
26733 else
26734   cat >"conftest.$ac_ext" <<_ACEOF
26735 #line 26735 "configure"
26736 #include "confdefs.h"
26737
26738 $ac_includes_default
26739
26740 #if defined(__cplusplus)
26741
26742 #ifdef HAVE_GXX_BUILTIN_H
26743 #include <g++/builtin.h>
26744 #elif HAVE_GPP_BUILTIN_H
26745 #include <gpp/builtin.h>
26746 #elif HAVE_BUILTIN_H
26747 #include <builtin.h>
26748 #endif
26749
26750 #else
26751
26752 #if $cf_cv_header_stdbool_h
26753 #include <stdbool.h>
26754 #endif
26755
26756 #endif
26757
26758 int
26759 main (void)
26760 {
26761 if ((bool *) 0)
26762   return 0;
26763 if (sizeof (bool))
26764   return 0;
26765   ;
26766   return 0;
26767 }
26768 _ACEOF
26769 rm -f "conftest.$ac_objext"
26770 if { (eval echo "$as_me:26770: \"$ac_compile\"") >&5
26771   (eval $ac_compile) 2>&5
26772   ac_status=$?
26773   echo "$as_me:26773: \$? = $ac_status" >&5
26774   (exit "$ac_status"); } &&
26775          { ac_try='test -s "conftest.$ac_objext"'
26776   { (eval echo "$as_me:26776: \"$ac_try\"") >&5
26777   (eval $ac_try) 2>&5
26778   ac_status=$?
26779   echo "$as_me:26779: \$? = $ac_status" >&5
26780   (exit "$ac_status"); }; }; then
26781   ac_cv_type_bool=yes
26782 else
26783   echo "$as_me: failed program was:" >&5
26784 cat "conftest.$ac_ext" >&5
26785 ac_cv_type_bool=no
26786 fi
26787 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26788 fi
26789 echo "$as_me:26789: result: $ac_cv_type_bool" >&5
26790 echo "${ECHO_T}$ac_cv_type_bool" >&6
26791
26792 echo "$as_me:26792: checking size of bool" >&5
26793 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26794 if test "${ac_cv_sizeof_bool+set}" = set; then
26795   echo $ECHO_N "(cached) $ECHO_C" >&6
26796 else
26797   if test "$ac_cv_type_bool" = yes; then
26798   if test "$cross_compiling" = yes; then
26799   # Depending upon the size, compute the lo and hi bounds.
26800 cat >"conftest.$ac_ext" <<_ACEOF
26801 #line 26801 "configure"
26802 #include "confdefs.h"
26803
26804 $ac_includes_default
26805
26806 #if defined(__cplusplus)
26807
26808 #ifdef HAVE_GXX_BUILTIN_H
26809 #include <g++/builtin.h>
26810 #elif HAVE_GPP_BUILTIN_H
26811 #include <gpp/builtin.h>
26812 #elif HAVE_BUILTIN_H
26813 #include <builtin.h>
26814 #endif
26815
26816 #else
26817
26818 #if $cf_cv_header_stdbool_h
26819 #include <stdbool.h>
26820 #endif
26821
26822 #endif
26823
26824 int
26825 main (void)
26826 {
26827 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26828   ;
26829   return 0;
26830 }
26831 _ACEOF
26832 rm -f "conftest.$ac_objext"
26833 if { (eval echo "$as_me:26833: \"$ac_compile\"") >&5
26834   (eval $ac_compile) 2>&5
26835   ac_status=$?
26836   echo "$as_me:26836: \$? = $ac_status" >&5
26837   (exit "$ac_status"); } &&
26838          { ac_try='test -s "conftest.$ac_objext"'
26839   { (eval echo "$as_me:26839: \"$ac_try\"") >&5
26840   (eval $ac_try) 2>&5
26841   ac_status=$?
26842   echo "$as_me:26842: \$? = $ac_status" >&5
26843   (exit "$ac_status"); }; }; then
26844   ac_lo=0 ac_mid=0
26845   while :; do
26846     cat >"conftest.$ac_ext" <<_ACEOF
26847 #line 26847 "configure"
26848 #include "confdefs.h"
26849
26850 $ac_includes_default
26851
26852 #if defined(__cplusplus)
26853
26854 #ifdef HAVE_GXX_BUILTIN_H
26855 #include <g++/builtin.h>
26856 #elif HAVE_GPP_BUILTIN_H
26857 #include <gpp/builtin.h>
26858 #elif HAVE_BUILTIN_H
26859 #include <builtin.h>
26860 #endif
26861
26862 #else
26863
26864 #if $cf_cv_header_stdbool_h
26865 #include <stdbool.h>
26866 #endif
26867
26868 #endif
26869
26870 int
26871 main (void)
26872 {
26873 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26874   ;
26875   return 0;
26876 }
26877 _ACEOF
26878 rm -f "conftest.$ac_objext"
26879 if { (eval echo "$as_me:26879: \"$ac_compile\"") >&5
26880   (eval $ac_compile) 2>&5
26881   ac_status=$?
26882   echo "$as_me:26882: \$? = $ac_status" >&5
26883   (exit "$ac_status"); } &&
26884          { ac_try='test -s "conftest.$ac_objext"'
26885   { (eval echo "$as_me:26885: \"$ac_try\"") >&5
26886   (eval $ac_try) 2>&5
26887   ac_status=$?
26888   echo "$as_me:26888: \$? = $ac_status" >&5
26889   (exit "$ac_status"); }; }; then
26890   ac_hi=$ac_mid; break
26891 else
26892   echo "$as_me: failed program was:" >&5
26893 cat "conftest.$ac_ext" >&5
26894 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26895 fi
26896 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26897   done
26898 else
26899   echo "$as_me: failed program was:" >&5
26900 cat "conftest.$ac_ext" >&5
26901 ac_hi=-1 ac_mid=-1
26902   while :; do
26903     cat >"conftest.$ac_ext" <<_ACEOF
26904 #line 26904 "configure"
26905 #include "confdefs.h"
26906
26907 $ac_includes_default
26908
26909 #if defined(__cplusplus)
26910
26911 #ifdef HAVE_GXX_BUILTIN_H
26912 #include <g++/builtin.h>
26913 #elif HAVE_GPP_BUILTIN_H
26914 #include <gpp/builtin.h>
26915 #elif HAVE_BUILTIN_H
26916 #include <builtin.h>
26917 #endif
26918
26919 #else
26920
26921 #if $cf_cv_header_stdbool_h
26922 #include <stdbool.h>
26923 #endif
26924
26925 #endif
26926
26927 int
26928 main (void)
26929 {
26930 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26931   ;
26932   return 0;
26933 }
26934 _ACEOF
26935 rm -f "conftest.$ac_objext"
26936 if { (eval echo "$as_me:26936: \"$ac_compile\"") >&5
26937   (eval $ac_compile) 2>&5
26938   ac_status=$?
26939   echo "$as_me:26939: \$? = $ac_status" >&5
26940   (exit "$ac_status"); } &&
26941          { ac_try='test -s "conftest.$ac_objext"'
26942   { (eval echo "$as_me:26942: \"$ac_try\"") >&5
26943   (eval $ac_try) 2>&5
26944   ac_status=$?
26945   echo "$as_me:26945: \$? = $ac_status" >&5
26946   (exit "$ac_status"); }; }; then
26947   ac_lo=$ac_mid; break
26948 else
26949   echo "$as_me: failed program was:" >&5
26950 cat "conftest.$ac_ext" >&5
26951 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26952 fi
26953 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26954   done
26955 fi
26956 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26957 # Binary search between lo and hi bounds.
26958 while test "x$ac_lo" != "x$ac_hi"; do
26959   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26960   cat >"conftest.$ac_ext" <<_ACEOF
26961 #line 26961 "configure"
26962 #include "confdefs.h"
26963
26964 $ac_includes_default
26965
26966 #if defined(__cplusplus)
26967
26968 #ifdef HAVE_GXX_BUILTIN_H
26969 #include <g++/builtin.h>
26970 #elif HAVE_GPP_BUILTIN_H
26971 #include <gpp/builtin.h>
26972 #elif HAVE_BUILTIN_H
26973 #include <builtin.h>
26974 #endif
26975
26976 #else
26977
26978 #if $cf_cv_header_stdbool_h
26979 #include <stdbool.h>
26980 #endif
26981
26982 #endif
26983
26984 int
26985 main (void)
26986 {
26987 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26988   ;
26989   return 0;
26990 }
26991 _ACEOF
26992 rm -f "conftest.$ac_objext"
26993 if { (eval echo "$as_me:26993: \"$ac_compile\"") >&5
26994   (eval $ac_compile) 2>&5
26995   ac_status=$?
26996   echo "$as_me:26996: \$? = $ac_status" >&5
26997   (exit "$ac_status"); } &&
26998          { ac_try='test -s "conftest.$ac_objext"'
26999   { (eval echo "$as_me:26999: \"$ac_try\"") >&5
27000   (eval $ac_try) 2>&5
27001   ac_status=$?
27002   echo "$as_me:27002: \$? = $ac_status" >&5
27003   (exit "$ac_status"); }; }; then
27004   ac_hi=$ac_mid
27005 else
27006   echo "$as_me: failed program was:" >&5
27007 cat "conftest.$ac_ext" >&5
27008 ac_lo=`expr "$ac_mid" + 1`
27009 fi
27010 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27011 done
27012 ac_cv_sizeof_bool=$ac_lo
27013 else
27014   if test "$cross_compiling" = yes; then
27015   { { echo "$as_me:27015: error: cannot run test program while cross compiling" >&5
27016 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27017    { (exit 1); exit 1; }; }
27018 else
27019   cat >"conftest.$ac_ext" <<_ACEOF
27020 #line 27020 "configure"
27021 #include "confdefs.h"
27022
27023 $ac_includes_default
27024
27025 #if defined(__cplusplus)
27026
27027 #ifdef HAVE_GXX_BUILTIN_H
27028 #include <g++/builtin.h>
27029 #elif HAVE_GPP_BUILTIN_H
27030 #include <gpp/builtin.h>
27031 #elif HAVE_BUILTIN_H
27032 #include <builtin.h>
27033 #endif
27034
27035 #else
27036
27037 #if $cf_cv_header_stdbool_h
27038 #include <stdbool.h>
27039 #endif
27040
27041 #endif
27042
27043 int
27044 main (void)
27045 {
27046 FILE *f = fopen ("conftest.val", "w");
27047 if (!f)
27048   $ac_main_return (1);
27049 fprintf (f, "%ld", (long)(sizeof (bool)));
27050 fclose (f);
27051   ;
27052   return 0;
27053 }
27054 _ACEOF
27055 rm -f "conftest$ac_exeext"
27056 if { (eval echo "$as_me:27056: \"$ac_link\"") >&5
27057   (eval $ac_link) 2>&5
27058   ac_status=$?
27059   echo "$as_me:27059: \$? = $ac_status" >&5
27060   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27061   { (eval echo "$as_me:27061: \"$ac_try\"") >&5
27062   (eval $ac_try) 2>&5
27063   ac_status=$?
27064   echo "$as_me:27064: \$? = $ac_status" >&5
27065   (exit "$ac_status"); }; }; then
27066   ac_cv_sizeof_bool=`cat conftest.val`
27067 else
27068   echo "$as_me: program exited with status $ac_status" >&5
27069 echo "$as_me: failed program was:" >&5
27070 cat "conftest.$ac_ext" >&5
27071 fi
27072 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27073 fi
27074 fi
27075 rm -f conftest.val
27076 else
27077   ac_cv_sizeof_bool=0
27078 fi
27079 fi
27080 echo "$as_me:27080: result: $ac_cv_sizeof_bool" >&5
27081 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27082 cat >>confdefs.h <<EOF
27083 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27084 EOF
27085
27086 echo "$as_me:27086: checking for type of bool" >&5
27087 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27088 if test "${cf_cv_type_of_bool+set}" = set; then
27089   echo $ECHO_N "(cached) $ECHO_C" >&6
27090 else
27091
27092         rm -f cf_test.out
27093         if test "$cross_compiling" = yes; then
27094
27095                 case x$ac_cv_sizeof_bool in
27096                 (x1) cf_cv_type_of_bool="unsigned char";;
27097                 (x2) cf_cv_type_of_bool="unsigned short";;
27098                 (x4) cf_cv_type_of_bool="unsigned int";;
27099                 (x8) cf_cv_type_of_bool="unsigned long";;
27100                 (*)  cf_cv_type_of_bool=unknown;;
27101                 esac
27102
27103 else
27104   cat >"conftest.$ac_ext" <<_ACEOF
27105 #line 27105 "configure"
27106 #include "confdefs.h"
27107
27108 $ac_includes_default
27109
27110 #if defined(__cplusplus)
27111
27112 #ifdef HAVE_GXX_BUILTIN_H
27113 #include <g++/builtin.h>
27114 #elif HAVE_GPP_BUILTIN_H
27115 #include <gpp/builtin.h>
27116 #elif HAVE_BUILTIN_H
27117 #include <builtin.h>
27118 #endif
27119
27120 #else
27121
27122 #if $cf_cv_header_stdbool_h
27123 #include <stdbool.h>
27124 #endif
27125
27126 #endif
27127
27128 int main(void)
27129 {
27130         FILE *fp = fopen("cf_test.out", "w");
27131         if (fp != 0) {
27132                 bool x = true;
27133                 if ((bool)(-x) >= 0)
27134                         fputs("unsigned ", fp);
27135                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27136                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27137                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27138                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27139                 fclose(fp);
27140         }
27141         ${cf_cv_main_return:-return}(0);
27142 }
27143
27144 _ACEOF
27145 rm -f "conftest$ac_exeext"
27146 if { (eval echo "$as_me:27146: \"$ac_link\"") >&5
27147   (eval $ac_link) 2>&5
27148   ac_status=$?
27149   echo "$as_me:27149: \$? = $ac_status" >&5
27150   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27151   { (eval echo "$as_me:27151: \"$ac_try\"") >&5
27152   (eval $ac_try) 2>&5
27153   ac_status=$?
27154   echo "$as_me:27154: \$? = $ac_status" >&5
27155   (exit "$ac_status"); }; }; then
27156   cf_cv_type_of_bool=`cat cf_test.out`
27157                  if test -z "$cf_cv_type_of_bool"; then
27158                    cf_cv_type_of_bool=unknown
27159                  fi
27160 else
27161   echo "$as_me: program exited with status $ac_status" >&5
27162 echo "$as_me: failed program was:" >&5
27163 cat "conftest.$ac_ext" >&5
27164 cf_cv_type_of_bool=unknown
27165 fi
27166 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27167 fi
27168         rm -f cf_test.out
27169
27170 fi
27171 echo "$as_me:27171: result: $cf_cv_type_of_bool" >&5
27172 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27173
27174 if test "$cf_cv_type_of_bool" = unknown ; then
27175         case .$NCURSES_BOOL in
27176         (.auto|.) NCURSES_BOOL=unsigned;;
27177         esac
27178         { echo "$as_me:27178: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27179 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27180         cf_cv_type_of_bool=$NCURSES_BOOL
27181 fi
27182
27183                 else
27184                         echo "$as_me:27184: checking for fallback type of bool" >&5
27185 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27186                         case "$host_cpu" in
27187                         (i?86)  cf_cv_type_of_bool=char ;;
27188                         (*)     cf_cv_type_of_bool=int  ;;
27189                         esac
27190                         echo "$as_me:27190: result: $cf_cv_type_of_bool" >&5
27191 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27192                 fi
27193         fi
27194 fi
27195
27196 # If the C compiler did not declare bool, and we did not determine that the C++
27197 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27198 # ncurses library use the same type as C++ bool.  Note that this allows one to
27199 # specify the type of bool in a configure-script option and postpone
27200 # integration with the C++ compiler provided that the types are compatible.
27201 USE_CXX_BOOL=1
27202 if test "$cf_cv_cc_bool_type" = 1
27203 then
27204         # oops: C has a bool.  Unlikely, but C++ could differ.
27205         USE_CXX_BOOL=0
27206 elif test "$cf_cv_builtin_bool" = 0
27207 then
27208         # C++ has no bool
27209         USE_CXX_BOOL=0
27210 else
27211         # this is the normal case
27212         USE_CXX_BOOL='defined(__cplusplus)'
27213 fi
27214
27215 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27216
27217         if test "$cf_with_ada" != "no" ; then
27218                 if test "$with_libtool" != "no"; then
27219                         { echo "$as_me:27219: WARNING: libtool does not support Ada - disabling feature" >&5
27220 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27221                         cf_with_ada=no
27222                 fi
27223         fi
27224
27225         if test "$cf_with_ada" != "no" ; then
27226
27227 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27228 do
27229
27230 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27231
27232         unset ac_cv_path_cf_TEMP_gnat
27233         unset cf_TEMP_gnat
27234         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27235 set dummy $cf_prog_gnat; ac_word=$2
27236 echo "$as_me:27236: checking for $ac_word" >&5
27237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27238 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27239   echo $ECHO_N "(cached) $ECHO_C" >&6
27240 else
27241   case $cf_TEMP_gnat in
27242   [\\/]* | ?:[\\/]*)
27243   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27244   ;;
27245   *)
27246   ac_save_IFS=$IFS; IFS=$ac_path_separator
27247 ac_dummy="$PATH"
27248 for ac_dir in $ac_dummy; do
27249   IFS=$ac_save_IFS
27250   test -z "$ac_dir" && ac_dir=.
27251   if $as_executable_p "$ac_dir/$ac_word"; then
27252    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27253    echo "$as_me:27253: found $ac_dir/$ac_word" >&5
27254    break
27255 fi
27256 done
27257
27258   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27259   ;;
27260 esac
27261 fi
27262 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27263
27264 if test -n "$cf_TEMP_gnat"; then
27265   echo "$as_me:27265: result: $cf_TEMP_gnat" >&5
27266 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27267 else
27268   echo "$as_me:27268: result: no" >&5
27269 echo "${ECHO_T}no" >&6
27270 fi
27271
27272         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27273
27274         if test "x$cf_TEMP_gnat" != xno; then
27275                 unset cf_cv_gnat_version
27276                 unset cf_TEMP_gnat
27277
27278 echo "$as_me:27278: checking for $cf_prog_gnat version" >&5
27279 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27280 if test "${cf_cv_gnat_version+set}" = set; then
27281   echo $ECHO_N "(cached) $ECHO_C" >&6
27282 else
27283
27284 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27285         grep '[0-9].[0-9][0-9]*' |\
27286         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27287
27288 fi
27289 echo "$as_me:27289: result: $cf_cv_gnat_version" >&5
27290 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27291 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27292 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27293
27294         fi
27295         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27296
27297         unset cf_TEMP_gnat
27298         unset cf_cv_gnat_version
27299         unset ac_cv_path_cf_TEMP_gnat
27300 done
27301
27302 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27303         cf_ada_make=
27304         cf_cv_prog_gnat_correct=no
27305 else
27306         cf_ada_make=gnatmake
27307         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27308                 # gprconfig is newer than gnatmake; we can continue...
27309                 cf_ada_config="##"
27310         else
27311                 rm -rf ./conftest* ./*~conftest*
27312                 if mkdir conftest.src
27313                 then
27314                         cf_ada_config=""
27315                         cd conftest.src
27316                         for cf_gprconfig in Ada C
27317                         do
27318                                 echo "$as_me:27318: checking for gprconfig name for $cf_gprconfig" >&5
27319 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27320                                 if test "$cf_gprconfig" = C
27321                                 then
27322                                         for cf_gprconfig_param in \
27323                                                 "$cf_gprconfig,,,,GNATGCC" \
27324                                                 "$cf_gprconfig,,,,GCC" \
27325                                                 "$cf_gprconfig"
27326                                         do
27327                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27328                                                 test -n "$cf_gprconfig_value" && break
27329                                         done
27330                                 else
27331                                         cf_gprconfig_param=$cf_gprconfig
27332                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27333                                 fi
27334                                 if test -n "$cf_gprconfig_value"
27335                                 then
27336                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27337                                         echo "$as_me:27337: result: $cf_gprconfig_value" >&5
27338 echo "${ECHO_T}$cf_gprconfig_value" >&6
27339                                 else
27340                                         echo "$as_me:27340: result: missing" >&5
27341 echo "${ECHO_T}missing" >&6
27342                                         cf_ada_config="#"
27343                                         break
27344                                 fi
27345                         done
27346                         cd ..
27347                         rm -rf ./conftest* ./*~conftest*
27348                 fi
27349         fi
27350         if test "x$cf_ada_config" != "x#"
27351         then
27352
27353 echo "$as_me:27353: checking for gnat version" >&5
27354 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27355 if test "${cf_cv_gnat_version+set}" = set; then
27356   echo $ECHO_N "(cached) $ECHO_C" >&6
27357 else
27358
27359 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27360         grep '[0-9].[0-9][0-9]*' |\
27361         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27362
27363 fi
27364 echo "$as_me:27364: result: $cf_cv_gnat_version" >&5
27365 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27366 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27367
27368 case "$cf_cv_gnat_version" in
27369 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27370         cf_cv_prog_gnat_correct=yes
27371         ;;
27372 (*)
27373         { echo "$as_me:27373: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27374 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27375         cf_cv_prog_gnat_correct=no
27376         ;;
27377 esac
27378
27379                 # Extract the first word of "m4", so it can be a program name with args.
27380 set dummy m4; ac_word=$2
27381 echo "$as_me:27381: checking for $ac_word" >&5
27382 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27383 if test "${ac_cv_prog_M4_exists+set}" = set; then
27384   echo $ECHO_N "(cached) $ECHO_C" >&6
27385 else
27386   if test -n "$M4_exists"; then
27387   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27388 else
27389   ac_save_IFS=$IFS; IFS=$ac_path_separator
27390 ac_dummy="$PATH"
27391 for ac_dir in $ac_dummy; do
27392   IFS=$ac_save_IFS
27393   test -z "$ac_dir" && ac_dir=.
27394   $as_executable_p "$ac_dir/$ac_word" || continue
27395 ac_cv_prog_M4_exists="yes"
27396 echo "$as_me:27396: found $ac_dir/$ac_word" >&5
27397 break
27398 done
27399
27400   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27401 fi
27402 fi
27403 M4_exists=$ac_cv_prog_M4_exists
27404 if test -n "$M4_exists"; then
27405   echo "$as_me:27405: result: $M4_exists" >&5
27406 echo "${ECHO_T}$M4_exists" >&6
27407 else
27408   echo "$as_me:27408: result: no" >&5
27409 echo "${ECHO_T}no" >&6
27410 fi
27411
27412                 if test "$ac_cv_prog_M4_exists" = no; then
27413                         cf_cv_prog_gnat_correct=no
27414                         { echo "$as_me:27414: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27415 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27416                 fi
27417                 if test "$cf_cv_prog_gnat_correct" = yes; then
27418                         echo "$as_me:27418: checking if GNAT works" >&5
27419 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27420
27421 rm -rf ./conftest* ./*~conftest*
27422 cat >>conftest.ads <<CF_EOF
27423 procedure conftest;
27424 CF_EOF
27425 cat >>conftest.adb <<CF_EOF
27426 with Text_IO;
27427 with GNAT.OS_Lib;
27428 procedure conftest is
27429 begin
27430    Text_IO.Put ("Hello World");
27431    Text_IO.New_Line;
27432    GNAT.OS_Lib.OS_Exit (0);
27433 end conftest;
27434 CF_EOF
27435 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27436    if ( ./conftest 1>&5 2>&1 ) ; then
27437       cf_cv_prog_gnat_correct=yes
27438    else
27439       cf_cv_prog_gnat_correct=no
27440    fi
27441 else
27442    cf_cv_prog_gnat_correct=no
27443 fi
27444 rm -rf ./conftest* ./*~conftest*
27445
27446                         echo "$as_me:27446: result: $cf_cv_prog_gnat_correct" >&5
27447 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27448                 fi
27449         else
27450                 cf_cv_prog_gnat_correct=no
27451         fi
27452 fi
27453
27454                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27455
27456         ADAFLAGS="$ADAFLAGS -gnatpn"
27457
27458         echo "$as_me:27458: checking optimization options for ADAFLAGS" >&5
27459 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27460         case "$CFLAGS" in
27461         (*-g*)
27462
27463         ADAFLAGS="$ADAFLAGS -g"
27464
27465                 ;;
27466         esac
27467         case "$CFLAGS" in
27468         (*-O*)
27469                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27470
27471         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27472
27473                 ;;
27474         esac
27475         echo "$as_me:27475: result: $ADAFLAGS" >&5
27476 echo "${ECHO_T}$ADAFLAGS" >&6
27477
27478 echo "$as_me:27478: checking if GNATPREP supports -T option" >&5
27479 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27480 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27481   echo $ECHO_N "(cached) $ECHO_C" >&6
27482 else
27483
27484 cf_cv_gnatprep_opt_t=no
27485 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27486
27487 fi
27488 echo "$as_me:27488: result: $cf_cv_gnatprep_opt_t" >&5
27489 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27490 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27491
27492 echo "$as_me:27492: checking if GNAT supports generics" >&5
27493 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27494 case "$cf_cv_gnat_version" in
27495 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27496         cf_gnat_generics=yes
27497         ;;
27498 (*)
27499         cf_gnat_generics=no
27500         ;;
27501 esac
27502 echo "$as_me:27502: result: $cf_gnat_generics" >&5
27503 echo "${ECHO_T}$cf_gnat_generics" >&6
27504
27505 if test "$cf_gnat_generics" = yes
27506 then
27507         cf_compile_generics=generics
27508         cf_generic_objects="\${GENOBJS}"
27509 else
27510         cf_compile_generics=
27511         cf_generic_objects=
27512 fi
27513
27514 echo "$as_me:27514: checking if GNAT supports SIGINT" >&5
27515 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27516 if test "${cf_cv_gnat_sigint+set}" = set; then
27517   echo $ECHO_N "(cached) $ECHO_C" >&6
27518 else
27519
27520 rm -rf ./conftest* ./*~conftest*
27521 cat >>conftest.ads <<CF_EOF
27522 with Ada.Interrupts.Names;
27523
27524 package ConfTest is
27525
27526    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27527    pragma Unreserve_All_Interrupts;
27528    pragma Warnings (On);
27529
27530    protected Process is
27531       procedure Stop;
27532       function Continue return Boolean;
27533       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27534    private
27535       Done : Boolean := False;
27536    end Process;
27537
27538 end ConfTest;
27539 CF_EOF
27540 cat >>conftest.adb <<CF_EOF
27541 package body ConfTest is
27542    protected body Process is
27543       procedure Stop is
27544       begin
27545          Done := True;
27546       end Stop;
27547       function Continue return Boolean is
27548       begin
27549          return not Done;
27550       end Continue;
27551    end Process;
27552 end ConfTest;
27553 CF_EOF
27554 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27555       cf_cv_gnat_sigint=yes
27556 else
27557    cf_cv_gnat_sigint=no
27558 fi
27559 rm -rf ./conftest* ./*~conftest*
27560
27561 fi
27562 echo "$as_me:27562: result: $cf_cv_gnat_sigint" >&5
27563 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27564
27565 if test "$cf_cv_gnat_sigint" = yes ; then
27566         USE_GNAT_SIGINT=""
27567 else
27568         USE_GNAT_SIGINT="#"
27569 fi
27570
27571 cf_gnat_libraries=no
27572 cf_gnat_projects=no
27573
27574 if test "$enable_gnat_projects" != no ; then
27575 echo "$as_me:27575: checking if GNAT supports project files" >&5
27576 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27577 case "$cf_cv_gnat_version" in
27578 (3.[0-9]*)
27579         ;;
27580 (*)
27581         case "$cf_cv_system_name" in
27582         (cygwin*|msys*)
27583                 ;;
27584         (*)
27585                 rm -rf ./conftest* ./*~conftest*
27586                 if mkdir conftest.src conftest.bin conftest.lib
27587                 then
27588                         cd conftest.src
27589                         rm -rf ./conftest* ./*~conftest*
27590                         cat >>library.gpr <<CF_EOF
27591 project Library is
27592   Kind := External ("LIB_KIND");
27593   for Library_Name use "ConfTest";
27594   for Object_Dir use ".";
27595   for Library_ALI_Dir use External("LIBRARY_DIR");
27596   for Library_Version use External ("SONAME");
27597   for Library_Kind use Kind;
27598   for Library_Dir use External("BUILD_DIR");
27599   Source_Dir := External ("SOURCE_DIR");
27600   for Source_Dirs use (Source_Dir);
27601 end Library;
27602 CF_EOF
27603                         cat >>confpackage.ads <<CF_EOF
27604 package ConfPackage is
27605    procedure conftest;
27606 end ConfPackage;
27607 CF_EOF
27608                         cat >>confpackage.adb <<CF_EOF
27609 with Text_IO;
27610 package body ConfPackage is
27611    procedure conftest is
27612    begin
27613       Text_IO.Put ("Hello World");
27614       Text_IO.New_Line;
27615    end conftest;
27616 end ConfPackage;
27617 CF_EOF
27618                         if ( "$cf_ada_make" $ADAFLAGS \
27619                                         -Plibrary.gpr \
27620                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27621                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27622                                         -XSOURCE_DIR="`pwd`" \
27623                                         -XSONAME=libConfTest.so.1 \
27624                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27625                                 cf_gnat_projects=yes
27626                         fi
27627                         cd ..
27628                 fi
27629                 if test -f conftest.lib/confpackage.ali
27630                 then
27631                         cf_gnat_libraries=yes
27632                 fi
27633                 rm -rf ./conftest* ./*~conftest*
27634                 ;;
27635         esac
27636         ;;
27637 esac
27638 echo "$as_me:27638: result: $cf_gnat_projects" >&5
27639 echo "${ECHO_T}$cf_gnat_projects" >&6
27640 fi # enable_gnat_projects
27641
27642 if test "$cf_gnat_projects" = yes
27643 then
27644         echo "$as_me:27644: checking if GNAT supports libraries" >&5
27645 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27646         echo "$as_me:27646: result: $cf_gnat_libraries" >&5
27647 echo "${ECHO_T}$cf_gnat_libraries" >&6
27648 fi
27649
27650 USE_OLD_MAKERULES=""
27651 USE_GNAT_PROJECTS="#"
27652 USE_GNAT_MAKE_GPR="#"
27653 USE_GNAT_GPRBUILD="#"
27654
27655 if test "$cf_gnat_projects" = yes
27656 then
27657         USE_OLD_MAKERULES="#"
27658         USE_GNAT_PROJECTS=""
27659         if test "$cf_cv_VERSION_GPRBUILD" != no
27660         then
27661                 USE_GNAT_GPRBUILD=""
27662         elif test "$cf_cv_VERSION_GNATMAKE" != no
27663         then
27664                 USE_GNAT_MAKE_GPR=""
27665         else
27666                 { echo "$as_me:27666: WARNING: use old makefile rules since tools are missing" >&5
27667 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27668         fi
27669 fi
27670
27671 if test "$cf_gnat_libraries" = yes
27672 then
27673         USE_GNAT_LIBRARIES=""
27674 else
27675         USE_GNAT_LIBRARIES="#"
27676 fi
27677
27678 echo "$as_me:27678: checking for ada-compiler" >&5
27679 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27680
27681 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27682 if test "${with_ada_compiler+set}" = set; then
27683   withval="$with_ada_compiler"
27684   cf_ada_compiler=$withval
27685 else
27686   cf_ada_compiler=gnatmake
27687 fi;
27688
27689 echo "$as_me:27689: result: $cf_ada_compiler" >&5
27690 echo "${ECHO_T}$cf_ada_compiler" >&6
27691
27692                         cf_ada_package=terminal_interface
27693
27694 echo "$as_me:27694: checking for ada-include" >&5
27695 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27696
27697 # Check whether --with-ada-include or --without-ada-include was given.
27698 if test "${with_ada_include+set}" = set; then
27699   withval="$with_ada_include"
27700
27701 else
27702   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27703 fi; if test -n "$prefix/share/ada/adainclude" ; then
27704
27705 if test "x$prefix" != xNONE; then
27706         cf_path_syntax="$prefix"
27707 else
27708         cf_path_syntax="$ac_default_prefix"
27709 fi
27710
27711 case ".$withval" in
27712 (.\$\(*\)*|.\'*\'*)
27713         ;;
27714 (..|./*|.\\*)
27715         ;;
27716 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27717         ;;
27718 (.\$\{*prefix\}*|.\$\{*dir\}*)
27719         eval withval="$withval"
27720         case ".$withval" in
27721         (.NONE/*)
27722                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27723                 ;;
27724         esac
27725         ;;
27726 (.no|.NONE/*)
27727         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27728         ;;
27729 (*)
27730         { { echo "$as_me:27730: error: expected a pathname, not \"$withval\"" >&5
27731 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27732    { (exit 1); exit 1; }; }
27733         ;;
27734 esac
27735
27736 fi
27737 eval ADA_INCLUDE="$withval"
27738
27739 echo "$as_me:27739: result: $ADA_INCLUDE" >&5
27740 echo "${ECHO_T}$ADA_INCLUDE" >&6
27741
27742 echo "$as_me:27742: checking for ada-objects" >&5
27743 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27744
27745 # Check whether --with-ada-objects or --without-ada-objects was given.
27746 if test "${with_ada_objects+set}" = set; then
27747   withval="$with_ada_objects"
27748
27749 else
27750   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27751 fi; if test -n "$prefix/lib/ada/adalib" ; then
27752
27753 if test "x$prefix" != xNONE; then
27754         cf_path_syntax="$prefix"
27755 else
27756         cf_path_syntax="$ac_default_prefix"
27757 fi
27758
27759 case ".$withval" in
27760 (.\$\(*\)*|.\'*\'*)
27761         ;;
27762 (..|./*|.\\*)
27763         ;;
27764 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27765         ;;
27766 (.\$\{*prefix\}*|.\$\{*dir\}*)
27767         eval withval="$withval"
27768         case ".$withval" in
27769         (.NONE/*)
27770                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27771                 ;;
27772         esac
27773         ;;
27774 (.no|.NONE/*)
27775         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27776         ;;
27777 (*)
27778         { { echo "$as_me:27778: error: expected a pathname, not \"$withval\"" >&5
27779 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27780    { (exit 1); exit 1; }; }
27781         ;;
27782 esac
27783
27784 fi
27785 eval ADA_OBJECTS="$withval"
27786
27787 echo "$as_me:27787: result: $ADA_OBJECTS" >&5
27788 echo "${ECHO_T}$ADA_OBJECTS" >&6
27789
27790 echo "$as_me:27790: checking if an Ada95 shared-library should be built" >&5
27791 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27792
27793 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27794 if test "${with_ada_sharedlib+set}" = set; then
27795   withval="$with_ada_sharedlib"
27796   with_ada_sharedlib=$withval
27797 else
27798   with_ada_sharedlib=no
27799 fi;
27800 echo "$as_me:27800: result: $with_ada_sharedlib" >&5
27801 echo "${ECHO_T}$with_ada_sharedlib" >&6
27802
27803 if test "x$with_ada_sharedlib" != xno
27804 then
27805         if test "x$cf_gnat_projects" != xyes
27806         then
27807                 { echo "$as_me:27807: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27808 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27809                 with_ada_sharedlib=no
27810         fi
27811 fi
27812
27813 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27814 MAKE_ADA_SHAREDLIB="#"
27815
27816 if test "x$with_ada_sharedlib" != xno
27817 then
27818         MAKE_ADA_SHAREDLIB=
27819         if test "x$with_ada_sharedlib" != xyes
27820         then
27821                 ADA_SHAREDLIB="$with_ada_sharedlib"
27822         fi
27823 fi
27824
27825                         # allow the Ada binding to be renamed
27826
27827 echo "$as_me:27827: checking for ada-libname" >&5
27828 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27829
27830 # Check whether --with-ada-libname or --without-ada-libname was given.
27831 if test "${with_ada_libname+set}" = set; then
27832   withval="$with_ada_libname"
27833   ADA_LIBNAME=$withval
27834 else
27835   ADA_LIBNAME=AdaCurses
27836 fi;
27837 case "x$ADA_LIBNAME" in
27838 (x|xyes|xno)
27839         ADA_LIBNAME=AdaCurses
27840         ;;
27841 esac
27842
27843 echo "$as_me:27843: result: $ADA_LIBNAME" >&5
27844 echo "${ECHO_T}$ADA_LIBNAME" >&6
27845
27846                 fi
27847         fi
27848 else
27849         cf_with_ada=no
27850 fi
27851
27852 # do this "late" to avoid conflict with header-checks
27853 if test "x$with_widec" = xyes ; then
27854         echo "$as_me:27854: checking for wchar_t" >&5
27855 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27856 if test "${ac_cv_type_wchar_t+set}" = set; then
27857   echo $ECHO_N "(cached) $ECHO_C" >&6
27858 else
27859   cat >"conftest.$ac_ext" <<_ACEOF
27860 #line 27860 "configure"
27861 #include "confdefs.h"
27862 $ac_includes_default
27863 int
27864 main (void)
27865 {
27866 if ((wchar_t *) 0)
27867   return 0;
27868 if (sizeof (wchar_t))
27869   return 0;
27870   ;
27871   return 0;
27872 }
27873 _ACEOF
27874 rm -f "conftest.$ac_objext"
27875 if { (eval echo "$as_me:27875: \"$ac_compile\"") >&5
27876   (eval $ac_compile) 2>&5
27877   ac_status=$?
27878   echo "$as_me:27878: \$? = $ac_status" >&5
27879   (exit "$ac_status"); } &&
27880          { ac_try='test -s "conftest.$ac_objext"'
27881   { (eval echo "$as_me:27881: \"$ac_try\"") >&5
27882   (eval $ac_try) 2>&5
27883   ac_status=$?
27884   echo "$as_me:27884: \$? = $ac_status" >&5
27885   (exit "$ac_status"); }; }; then
27886   ac_cv_type_wchar_t=yes
27887 else
27888   echo "$as_me: failed program was:" >&5
27889 cat "conftest.$ac_ext" >&5
27890 ac_cv_type_wchar_t=no
27891 fi
27892 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27893 fi
27894 echo "$as_me:27894: result: $ac_cv_type_wchar_t" >&5
27895 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27896
27897 echo "$as_me:27897: checking size of wchar_t" >&5
27898 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27899 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27900   echo $ECHO_N "(cached) $ECHO_C" >&6
27901 else
27902   if test "$ac_cv_type_wchar_t" = yes; then
27903   if test "$cross_compiling" = yes; then
27904   # Depending upon the size, compute the lo and hi bounds.
27905 cat >"conftest.$ac_ext" <<_ACEOF
27906 #line 27906 "configure"
27907 #include "confdefs.h"
27908 $ac_includes_default
27909 int
27910 main (void)
27911 {
27912 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27913   ;
27914   return 0;
27915 }
27916 _ACEOF
27917 rm -f "conftest.$ac_objext"
27918 if { (eval echo "$as_me:27918: \"$ac_compile\"") >&5
27919   (eval $ac_compile) 2>&5
27920   ac_status=$?
27921   echo "$as_me:27921: \$? = $ac_status" >&5
27922   (exit "$ac_status"); } &&
27923          { ac_try='test -s "conftest.$ac_objext"'
27924   { (eval echo "$as_me:27924: \"$ac_try\"") >&5
27925   (eval $ac_try) 2>&5
27926   ac_status=$?
27927   echo "$as_me:27927: \$? = $ac_status" >&5
27928   (exit "$ac_status"); }; }; then
27929   ac_lo=0 ac_mid=0
27930   while :; do
27931     cat >"conftest.$ac_ext" <<_ACEOF
27932 #line 27932 "configure"
27933 #include "confdefs.h"
27934 $ac_includes_default
27935 int
27936 main (void)
27937 {
27938 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27939   ;
27940   return 0;
27941 }
27942 _ACEOF
27943 rm -f "conftest.$ac_objext"
27944 if { (eval echo "$as_me:27944: \"$ac_compile\"") >&5
27945   (eval $ac_compile) 2>&5
27946   ac_status=$?
27947   echo "$as_me:27947: \$? = $ac_status" >&5
27948   (exit "$ac_status"); } &&
27949          { ac_try='test -s "conftest.$ac_objext"'
27950   { (eval echo "$as_me:27950: \"$ac_try\"") >&5
27951   (eval $ac_try) 2>&5
27952   ac_status=$?
27953   echo "$as_me:27953: \$? = $ac_status" >&5
27954   (exit "$ac_status"); }; }; then
27955   ac_hi=$ac_mid; break
27956 else
27957   echo "$as_me: failed program was:" >&5
27958 cat "conftest.$ac_ext" >&5
27959 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27960 fi
27961 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27962   done
27963 else
27964   echo "$as_me: failed program was:" >&5
27965 cat "conftest.$ac_ext" >&5
27966 ac_hi=-1 ac_mid=-1
27967   while :; do
27968     cat >"conftest.$ac_ext" <<_ACEOF
27969 #line 27969 "configure"
27970 #include "confdefs.h"
27971 $ac_includes_default
27972 int
27973 main (void)
27974 {
27975 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27976   ;
27977   return 0;
27978 }
27979 _ACEOF
27980 rm -f "conftest.$ac_objext"
27981 if { (eval echo "$as_me:27981: \"$ac_compile\"") >&5
27982   (eval $ac_compile) 2>&5
27983   ac_status=$?
27984   echo "$as_me:27984: \$? = $ac_status" >&5
27985   (exit "$ac_status"); } &&
27986          { ac_try='test -s "conftest.$ac_objext"'
27987   { (eval echo "$as_me:27987: \"$ac_try\"") >&5
27988   (eval $ac_try) 2>&5
27989   ac_status=$?
27990   echo "$as_me:27990: \$? = $ac_status" >&5
27991   (exit "$ac_status"); }; }; then
27992   ac_lo=$ac_mid; break
27993 else
27994   echo "$as_me: failed program was:" >&5
27995 cat "conftest.$ac_ext" >&5
27996 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27997 fi
27998 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27999   done
28000 fi
28001 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28002 # Binary search between lo and hi bounds.
28003 while test "x$ac_lo" != "x$ac_hi"; do
28004   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28005   cat >"conftest.$ac_ext" <<_ACEOF
28006 #line 28006 "configure"
28007 #include "confdefs.h"
28008 $ac_includes_default
28009 int
28010 main (void)
28011 {
28012 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28013   ;
28014   return 0;
28015 }
28016 _ACEOF
28017 rm -f "conftest.$ac_objext"
28018 if { (eval echo "$as_me:28018: \"$ac_compile\"") >&5
28019   (eval $ac_compile) 2>&5
28020   ac_status=$?
28021   echo "$as_me:28021: \$? = $ac_status" >&5
28022   (exit "$ac_status"); } &&
28023          { ac_try='test -s "conftest.$ac_objext"'
28024   { (eval echo "$as_me:28024: \"$ac_try\"") >&5
28025   (eval $ac_try) 2>&5
28026   ac_status=$?
28027   echo "$as_me:28027: \$? = $ac_status" >&5
28028   (exit "$ac_status"); }; }; then
28029   ac_hi=$ac_mid
28030 else
28031   echo "$as_me: failed program was:" >&5
28032 cat "conftest.$ac_ext" >&5
28033 ac_lo=`expr "$ac_mid" + 1`
28034 fi
28035 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28036 done
28037 ac_cv_sizeof_wchar_t=$ac_lo
28038 else
28039   if test "$cross_compiling" = yes; then
28040   { { echo "$as_me:28040: error: cannot run test program while cross compiling" >&5
28041 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28042    { (exit 1); exit 1; }; }
28043 else
28044   cat >"conftest.$ac_ext" <<_ACEOF
28045 #line 28045 "configure"
28046 #include "confdefs.h"
28047 $ac_includes_default
28048 int
28049 main (void)
28050 {
28051 FILE *f = fopen ("conftest.val", "w");
28052 if (!f)
28053   $ac_main_return (1);
28054 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28055 fclose (f);
28056   ;
28057   return 0;
28058 }
28059 _ACEOF
28060 rm -f "conftest$ac_exeext"
28061 if { (eval echo "$as_me:28061: \"$ac_link\"") >&5
28062   (eval $ac_link) 2>&5
28063   ac_status=$?
28064   echo "$as_me:28064: \$? = $ac_status" >&5
28065   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28066   { (eval echo "$as_me:28066: \"$ac_try\"") >&5
28067   (eval $ac_try) 2>&5
28068   ac_status=$?
28069   echo "$as_me:28069: \$? = $ac_status" >&5
28070   (exit "$ac_status"); }; }; then
28071   ac_cv_sizeof_wchar_t=`cat conftest.val`
28072 else
28073   echo "$as_me: program exited with status $ac_status" >&5
28074 echo "$as_me: failed program was:" >&5
28075 cat "conftest.$ac_ext" >&5
28076 fi
28077 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28078 fi
28079 fi
28080 rm -f conftest.val
28081 else
28082   ac_cv_sizeof_wchar_t=0
28083 fi
28084 fi
28085 echo "$as_me:28085: result: $ac_cv_sizeof_wchar_t" >&5
28086 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28087 cat >>confdefs.h <<EOF
28088 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28089 EOF
28090
28091         # cross-compiling to mingw can run into the problem that attempting to
28092         # link with the regex library fails, causing the test to not set this to
28093         # a number.  "recent" autoconf does not address this problem either -TD
28094         if test -z "$ac_cv_sizeof_wchar_t"
28095         then
28096                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28097
28098 echo "${as_me:-configure}:28098: testing test failed (assume 2) ..." 1>&5
28099
28100                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28101                 mv confdefs.tmp confdefs.h
28102                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28103         fi
28104 fi
28105
28106 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28107 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28108 ###
28109 ### ticlib modules may be a separate library, otherwise contained in termlib.
28110 ### termlib modules may be a separate library, otherwise contained in ncurses.
28111 ###
28112 ### The of "+" or " " between the tokens controls the way the script
28113 ### chooses to split module lists into libraries.
28114 ###
28115 ### (see CF_LIB_RULES).
28116 echo "$as_me:28116: checking for library subsets" >&5
28117 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28118 LIB_SUBSETS=
28119
28120 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28121         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28122         if test "$with_ticlib" != no ; then
28123                 LIB_SUBSETS="${LIB_SUBSETS} "
28124         else
28125                 LIB_SUBSETS="${LIB_SUBSETS}+"
28126         fi
28127 fi
28128
28129 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28130 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28131
28132 if test "$with_termlib" != no ; then
28133         LIB_SUBSETS="${LIB_SUBSETS} "
28134 else
28135         LIB_SUBSETS="${LIB_SUBSETS}+"
28136 fi
28137
28138 LIB_SUBSETS="${LIB_SUBSETS}base"
28139
28140 # Most term-driver calls are to tinfo, but some like init_pair are to the
28141 # base library (so it resides in base).
28142 if test "$with_term_driver" != no ; then
28143         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28144         case "$cf_cv_system_name" in
28145         (*mingw32*|*mingw64*)
28146                 if test "x$with_exp_win32" = xyes ; then
28147                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28148                 else
28149                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28150                 fi
28151                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28152                 ;;
28153         (*)
28154                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28155                 ;;
28156         esac
28157 elif test "x$with_exp_win32" = xyes ; then
28158         case "$cf_cv_system_name" in
28159         (*mingw32*|*mingw64*)
28160                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28161                 ;;
28162         (*)
28163                 ;;
28164         esac
28165 fi
28166
28167 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28168 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28169
28170 echo "$as_me:28170: result: $LIB_SUBSETS" >&5
28171 echo "${ECHO_T}$LIB_SUBSETS" >&6
28172
28173 ### Construct the list of include-directories to be generated
28174
28175 if test "$srcdir" != "."; then
28176         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28177 fi
28178 CPPFLAGS="-I../include $CPPFLAGS"
28179 if test "$srcdir" != "."; then
28180         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28181 fi
28182 CPPFLAGS="-I. $CPPFLAGS"
28183
28184 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28185 if test "$srcdir" != "."; then
28186         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28187 fi
28188 if test "$GCC" != yes; then
28189         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28190 elif test "$includedir" != "/usr/include"; then
28191         if test "$includedir" = '${prefix}/include' ; then
28192                 if test x$prefix != x/usr ; then
28193                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28194                 fi
28195         else
28196                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28197         fi
28198 fi
28199
28200 ### Build up pieces for makefile rules
28201 echo "$as_me:28201: checking default library suffix" >&5
28202 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28203
28204         case $DFT_LWR_MODEL in
28205         (libtool) DFT_ARG_SUFFIX=''   ;;
28206         (normal)  DFT_ARG_SUFFIX=''   ;;
28207         (debug)   DFT_ARG_SUFFIX='_g' ;;
28208         (profile) DFT_ARG_SUFFIX='_p' ;;
28209         (shared)  DFT_ARG_SUFFIX=''   ;;
28210         esac
28211         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28212 echo "$as_me:28212: result: $DFT_ARG_SUFFIX" >&5
28213 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28214
28215 echo "$as_me:28215: checking default library-dependency suffix" >&5
28216 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28217
28218         case X$DFT_LWR_MODEL in
28219         (Xlibtool)
28220                 DFT_LIB_SUFFIX='.la'
28221                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28222                 ;;
28223         (Xdebug)
28224                 case "$cf_cv_system_name" in
28225                 (*-msvc*)
28226                         DFT_LIB_SUFFIX='_g.lib'
28227                         ;;
28228                 (*)
28229                         DFT_LIB_SUFFIX='_g.a'
28230                         ;;
28231                 esac
28232                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28233                 ;;
28234         (Xprofile)
28235                 case "$cf_cv_system_name" in
28236                 (*-msvc*)
28237                         DFT_LIB_SUFFIX='_p.lib'
28238                         ;;
28239                 (*)
28240                         DFT_LIB_SUFFIX='_p.a'
28241                         ;;
28242                 esac
28243                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28244                 ;;
28245         (Xshared)
28246                 case "$cf_cv_system_name" in
28247                 (aix[5-7]*)
28248                         DFT_LIB_SUFFIX='.so'
28249                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28250                         ;;
28251                 (*-msvc*)
28252                         DFT_LIB_SUFFIX='.dll'
28253                         DFT_DEP_SUFFIX='.dll.lib'
28254                         ;;
28255                 (cygwin*|msys*|mingw*)
28256                         DFT_LIB_SUFFIX='.dll'
28257                         DFT_DEP_SUFFIX='.dll.a'
28258                         ;;
28259                 (darwin*)
28260                         DFT_LIB_SUFFIX='.dylib'
28261                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28262                         ;;
28263                 (hpux*)
28264                         case "$target" in
28265                         (ia64*)
28266                                 DFT_LIB_SUFFIX='.so'
28267                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28268                                 ;;
28269                         (*)
28270                                 DFT_LIB_SUFFIX='.sl'
28271                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28272                                 ;;
28273                         esac
28274                         ;;
28275                 (*)
28276                         DFT_LIB_SUFFIX='.so'
28277                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28278                         ;;
28279                 esac
28280                 ;;
28281         (*)
28282                 case "$target" in
28283                 (*-msvc*)
28284                         DFT_LIB_SUFFIX='.lib'
28285                         ;;
28286                 (*)
28287                         DFT_LIB_SUFFIX='.a'
28288                         ;;
28289                 esac
28290                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28291                 ;;
28292         esac
28293         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28294         then
28295                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28296                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28297         fi
28298 echo "$as_me:28298: result: $DFT_DEP_SUFFIX" >&5
28299 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28300
28301 echo "$as_me:28301: checking default object directory" >&5
28302 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28303
28304         case $DFT_LWR_MODEL in
28305         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28306         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28307         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28308         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28309         (shared)
28310                 case "$cf_cv_system_name" in
28311                 (cygwin|msys)
28312                         DFT_OBJ_SUBDIR='objects' ;;
28313                 (*)
28314                         DFT_OBJ_SUBDIR='obj_s' ;;
28315                 esac
28316         esac
28317 echo "$as_me:28317: result: $DFT_OBJ_SUBDIR" >&5
28318 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28319
28320 if test "x$cf_with_cxx" = xyes ; then
28321 echo "$as_me:28321: checking c++ library-dependency suffix" >&5
28322 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28323 if test "$with_libtool" != "no"; then
28324         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28325         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28326 elif test "$with_shared_cxx" != "no"; then
28327         # also for g++ users...
28328         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28329 else
28330         # we normally make a static library because C/C++ library rules differ
28331
28332         case Xnormal in
28333         (Xlibtool)
28334                 CXX_LIB_SUFFIX='.la'
28335                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28336                 ;;
28337         (Xdebug)
28338                 case "$cf_cv_system_name" in
28339                 (*-msvc*)
28340                         CXX_LIB_SUFFIX='_g.lib'
28341                         ;;
28342                 (*)
28343                         CXX_LIB_SUFFIX='_g.a'
28344                         ;;
28345                 esac
28346                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28347                 ;;
28348         (Xprofile)
28349                 case "$cf_cv_system_name" in
28350                 (*-msvc*)
28351                         CXX_LIB_SUFFIX='_p.lib'
28352                         ;;
28353                 (*)
28354                         CXX_LIB_SUFFIX='_p.a'
28355                         ;;
28356                 esac
28357                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28358                 ;;
28359         (Xshared)
28360                 case "$cf_cv_system_name" in
28361                 (aix[5-7]*)
28362                         CXX_LIB_SUFFIX='.so'
28363                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28364                         ;;
28365                 (*-msvc*)
28366                         CXX_LIB_SUFFIX='.dll'
28367                         CXX_DEP_SUFFIX='.dll.lib'
28368                         ;;
28369                 (cygwin*|msys*|mingw*)
28370                         CXX_LIB_SUFFIX='.dll'
28371                         CXX_DEP_SUFFIX='.dll.a'
28372                         ;;
28373                 (darwin*)
28374                         CXX_LIB_SUFFIX='.dylib'
28375                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28376                         ;;
28377                 (hpux*)
28378                         case "$target" in
28379                         (ia64*)
28380                                 CXX_LIB_SUFFIX='.so'
28381                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28382                                 ;;
28383                         (*)
28384                                 CXX_LIB_SUFFIX='.sl'
28385                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28386                                 ;;
28387                         esac
28388                         ;;
28389                 (*)
28390                         CXX_LIB_SUFFIX='.so'
28391                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28392                         ;;
28393                 esac
28394                 ;;
28395         (*)
28396                 case "$target" in
28397                 (*-msvc*)
28398                         CXX_LIB_SUFFIX='.lib'
28399                         ;;
28400                 (*)
28401                         CXX_LIB_SUFFIX='.a'
28402                         ;;
28403                 esac
28404                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28405                 ;;
28406         esac
28407         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28408         then
28409                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28410                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28411         fi
28412
28413 fi
28414 echo "$as_me:28414: result: $CXX_LIB_SUFFIX" >&5
28415 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28416
28417 fi
28418
28419 # do not want -ldl in build except as needed for -lncurses dependency
28420 if test "x$with_dlsym" = xyes ; then
28421 if test "$DFT_LWR_MODEL" = shared || \
28422    test "$DFT_LWR_MODEL" = libtool ; then
28423
28424 # remove dl library from $LIBS
28425 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28426
28427 fi
28428 fi
28429 ### Set up low-level terminfo dependencies for makefiles.
28430
28431 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28432 # do not need libdl
28433 TICS_LIST=
28434 if test "x$with_dlsym" = xyes ; then
28435
28436 # remove dl library from $SHLIB_LIST
28437 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28438
28439 fi
28440
28441 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28442 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28443 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28444 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28445 then
28446         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28447 fi
28448
28449 if test "$with_ticlib" != no ; then
28450
28451         if test "x$with_ticlib" != xyes ; then
28452                 TICS_NAME=$with_ticlib
28453                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28454                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28455                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28456                 TICS_LIB_SUFFIX="${with_ticlib}"
28457         else
28458                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28459                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28460                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28461                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28462         fi
28463         TICS_LDFLAGS="-L${LIB_DIR}"
28464         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28465 else
28466         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28467         TICS_LDFLAGS="-L${LIB_DIR}"
28468         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28469 fi
28470
28471 if test "$with_termlib" != no ; then
28472
28473         if test "x$with_termlib" != xyes ; then
28474                 TINFO_NAME=$with_termlib
28475                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28476                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28477                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28478                 TINFO_LIB_SUFFIX="${with_termlib}"
28479         else
28480                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28481                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28482                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28483                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28484         fi
28485
28486         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28487         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28488         if test "$DFT_LWR_MODEL" = "libtool"; then
28489                 TEST_ARGS="${TEST_DEPS}"
28490                 TEST_ARG2="${TEST_DEP2}"
28491                 TINFO_LDFLAGS="-L${LIB_DIR}"
28492                 TINFO_LIBS="$TEST_ARGS"
28493                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28494                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28495         else
28496                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28497                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28498                 if test "x$with_term_driver" != xno ; then
28499                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28500                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28501                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28502                 else
28503                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28504                         TINFO_LIBS="$TEST_ARGS"
28505                 fi
28506                 TINFO_LDFLAGS="-L${LIB_DIR}"
28507                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28508         fi
28509 else
28510         # the next lines are needed for linking libtic over libncurses
28511         TINFO_NAME=${LIB_NAME}
28512         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28513         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28514         if test "x$with_tic_depends" = xyes ; then
28515                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28516         else
28517                 TICS_LIST="$SHLIB_LIST"
28518         fi
28519
28520         TINFO_LDFLAGS="-L${LIB_DIR}"
28521         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28522 fi
28523
28524 if test "$DFT_LWR_MODEL" = shared ; then
28525         case "$cf_cv_system_name" in
28526         (cygwin*|msys*)
28527                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28528                 TINFO_SUFFIX=.dll
28529                 ;;
28530         esac
28531 fi
28532
28533 if test "x$with_dlsym" = xyes ; then
28534
28535 # remove dl library from $TICS_LIST
28536 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28537
28538 fi
28539
28540 if test "$DFT_LWR_MODEL" = "libtool"; then
28541         OBJEXT=lo
28542 fi
28543
28544 # needed for Ada95
28545 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28546
28547 case "$DFT_LWR_MODEL" in
28548 (normal|debug|profile)
28549
28550 if test "$GCC" = yes ; then
28551         case "$cf_cv_system_name" in
28552         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28553                 LDFLAGS_STATIC=
28554                 LDFLAGS_SHARED=
28555                 ;;
28556         (*)     # normally, except when broken
28557                 LDFLAGS_STATIC=-static
28558                 LDFLAGS_SHARED=-dynamic
28559                 ;;
28560         esac
28561 else
28562         case "$cf_cv_system_name" in
28563         (aix[4-7]*)     # from ld manpage
28564                 LDFLAGS_STATIC=-bstatic
28565                 LDFLAGS_SHARED=-bdynamic
28566                 ;;
28567         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28568                 # We could also use just "archive" and "shared".
28569                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28570                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28571                 ;;
28572         (irix*)         # from ld manpage IRIX64
28573                 LDFLAGS_STATIC=-Bstatic
28574                 LDFLAGS_SHARED=-Bdynamic
28575                 ;;
28576         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28577                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28578                 LDFLAGS_STATIC=-noso
28579                 LDFLAGS_SHARED=-so_archive
28580                 ;;
28581         (solaris2*)
28582                 LDFLAGS_STATIC=-Bstatic
28583                 LDFLAGS_SHARED=-Bdynamic
28584                 ;;
28585         esac
28586 fi
28587
28588 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28589 then
28590         echo "$as_me:28590: checking if linker supports switching between static/dynamic" >&5
28591 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28592
28593         rm -f libconftest.a
28594         cat >conftest.$ac_ext <<EOF
28595 #line 28595 "configure"
28596 #include <stdio.h>
28597 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28598 EOF
28599         if { (eval echo "$as_me:28599: \"$ac_compile\"") >&5
28600   (eval $ac_compile) 2>&5
28601   ac_status=$?
28602   echo "$as_me:28602: \$? = $ac_status" >&5
28603   (exit "$ac_status"); } ; then
28604                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28605                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28606         fi
28607         rm -f conftest.*
28608
28609         cf_save_LIBS="$LIBS"
28610
28611         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28612         cat >"conftest.$ac_ext" <<_ACEOF
28613 #line 28613 "configure"
28614 #include "confdefs.h"
28615
28616 #line 28616 "configure"
28617 #include <stdio.h>
28618 int cf_ldflags_static(FILE *fp);
28619
28620 int
28621 main (void)
28622 {
28623
28624         return cf_ldflags_static(stdin);
28625
28626   ;
28627   return 0;
28628 }
28629 _ACEOF
28630 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28631 if { (eval echo "$as_me:28631: \"$ac_link\"") >&5
28632   (eval $ac_link) 2>&5
28633   ac_status=$?
28634   echo "$as_me:28634: \$? = $ac_status" >&5
28635   (exit "$ac_status"); } &&
28636          { ac_try='test -s "conftest$ac_exeext"'
28637   { (eval echo "$as_me:28637: \"$ac_try\"") >&5
28638   (eval $ac_try) 2>&5
28639   ac_status=$?
28640   echo "$as_me:28640: \$? = $ac_status" >&5
28641   (exit "$ac_status"); }; }; then
28642
28643         # some linkers simply ignore the -dynamic
28644         case x`file "conftest$ac_exeext" 2>/dev/null` in
28645         (*static*)
28646                 cf_ldflags_static=no
28647                 ;;
28648         (*)
28649                 cf_ldflags_static=yes
28650                 ;;
28651         esac
28652
28653 else
28654   echo "$as_me: failed program was:" >&5
28655 cat "conftest.$ac_ext" >&5
28656 cf_ldflags_static=no
28657 fi
28658 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28659
28660         rm -f libconftest.*
28661         LIBS="$cf_save_LIBS"
28662
28663         echo "$as_me:28663: result: $cf_ldflags_static" >&5
28664 echo "${ECHO_T}$cf_ldflags_static" >&6
28665
28666         if test "$cf_ldflags_static" != yes
28667         then
28668                 LDFLAGS_STATIC=
28669                 LDFLAGS_SHARED=
28670         fi
28671 else
28672         LDFLAGS_STATIC=
28673         LDFLAGS_SHARED=
28674 fi
28675
28676         ;;
28677 esac
28678
28679 echo "$as_me:28679: checking where we will install curses.h" >&5
28680 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28681
28682 includesubdir=
28683 if test "$with_overwrite" = no && \
28684  { test "x$includedir" = 'x${prefix}/include' || \
28685    test "x$includedir" = "x${prefix}/include"; }
28686 then
28687         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28688 fi
28689 echo "$as_me:28689: result: ${includedir}${includesubdir}" >&5
28690 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28691
28692 ### Resolve a conflict between normal and wide-curses by forcing applications
28693 ### that will need libutf8 to add it to their configure script.
28694 if test "$with_overwrite" != no ; then
28695 if test "$NCURSES_LIBUTF8" = 1 ; then
28696         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28697         { echo "$as_me:28697: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28698 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28699 fi
28700 fi
28701 WITH_OVERWRITE=$with_overwrite
28702
28703 ### At least on MinGW a shared library build without libtool
28704 ### requires adding the additional libs to the link list.
28705 case "$cf_cv_system_name" in
28706 (*mingw32*|*mingw64*)
28707         if test "$DFT_LWR_MODEL" != "libtool"; then
28708            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28709         fi
28710         ;;
28711 *)      ;;
28712 esac
28713
28714 ### predefined stuff for the test programs
28715
28716 cat >>confdefs.h <<\EOF
28717 #define HAVE_SLK_COLOR 1
28718 EOF
28719
28720 # pkgsrc uses these
28721
28722 echo "$as_me:28722: checking for desired basename for form library" >&5
28723 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28724
28725 # Check whether --with-form-libname or --without-form-libname was given.
28726 if test "${with_form_libname+set}" = set; then
28727   withval="$with_form_libname"
28728   with_lib_basename=$withval
28729 else
28730   with_lib_basename=form
28731 fi;
28732 FORM_NAME="$with_lib_basename"
28733
28734 case "x$FORM_NAME" in
28735 (x|xno|xnone|xyes)
28736         FORM_NAME=form
28737         ;;
28738 (*)
28739         ;;
28740 esac
28741
28742 echo "$as_me:28742: result: $FORM_NAME" >&5
28743 echo "${ECHO_T}$FORM_NAME" >&6
28744
28745 echo "$as_me:28745: checking for desired basename for menu library" >&5
28746 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28747
28748 # Check whether --with-menu-libname or --without-menu-libname was given.
28749 if test "${with_menu_libname+set}" = set; then
28750   withval="$with_menu_libname"
28751   with_lib_basename=$withval
28752 else
28753   with_lib_basename=menu
28754 fi;
28755 MENU_NAME="$with_lib_basename"
28756
28757 case "x$MENU_NAME" in
28758 (x|xno|xnone|xyes)
28759         MENU_NAME=menu
28760         ;;
28761 (*)
28762         ;;
28763 esac
28764
28765 echo "$as_me:28765: result: $MENU_NAME" >&5
28766 echo "${ECHO_T}$MENU_NAME" >&6
28767
28768 echo "$as_me:28768: checking for desired basename for panel library" >&5
28769 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28770
28771 # Check whether --with-panel-libname or --without-panel-libname was given.
28772 if test "${with_panel_libname+set}" = set; then
28773   withval="$with_panel_libname"
28774   with_lib_basename=$withval
28775 else
28776   with_lib_basename=panel
28777 fi;
28778 PANEL_NAME="$with_lib_basename"
28779
28780 case "x$PANEL_NAME" in
28781 (x|xno|xnone|xyes)
28782         PANEL_NAME=panel
28783         ;;
28784 (*)
28785         ;;
28786 esac
28787
28788 echo "$as_me:28788: result: $PANEL_NAME" >&5
28789 echo "${ECHO_T}$PANEL_NAME" >&6
28790
28791 echo "$as_me:28791: checking for desired basename for cxx library" >&5
28792 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28793
28794 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28795 if test "${with_cxx_libname+set}" = set; then
28796   withval="$with_cxx_libname"
28797   with_lib_basename=$withval
28798 else
28799   with_lib_basename=ncurses++
28800 fi;
28801 CXX_NAME="$with_lib_basename"
28802
28803 case "x$CXX_NAME" in
28804 (x|xno|xnone|xyes)
28805         CXX_NAME=ncurses++
28806         ;;
28807 (*)
28808         ;;
28809 esac
28810
28811 echo "$as_me:28811: result: $CXX_NAME" >&5
28812 echo "${ECHO_T}$CXX_NAME" >&6
28813
28814 ### Construct the list of subdirectories for which we'll customize makefiles
28815 ### with the appropriate compile-rules.
28816
28817 echo "$as_me:28817: checking for src modules" >&5
28818 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28819
28820 # dependencies and linker-arguments for test-programs
28821 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28822 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28823 if test "$DFT_LWR_MODEL" = "libtool"; then
28824         TEST_ARGS="${TEST_DEPS}"
28825         TEST_ARG2="${TEST_DEP2}"
28826 else
28827         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28828         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28829 fi
28830
28831 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28832 cf_cv_src_modules=
28833 for cf_dir in $modules_to_build
28834 do
28835         if test -f "$srcdir/$cf_dir/modules" ; then
28836
28837                 if test -z "$cf_cv_src_modules"; then
28838                         cf_cv_src_modules=$cf_dir
28839                 else
28840                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28841                 fi
28842
28843                 # Make the ncurses_cfg.h file record the library interface files as
28844                 # well.  These are header files that are the same name as their
28845                 # directory.  Ncurses is the only library that does not follow
28846                 # that pattern.
28847                 if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28848
28849 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28850
28851                         cat >>confdefs.h <<EOF
28852 #define HAVE_${cf_have_include}_H 1
28853 EOF
28854
28855                         cat >>confdefs.h <<EOF
28856 #define HAVE_LIB${cf_have_include} 1
28857 EOF
28858
28859 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28860
28861 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28862
28863                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28864                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28865                         if test "$DFT_LWR_MODEL" = "libtool"; then
28866                                 TEST_ARGS="${TEST_DEPS}"
28867                                 TEST_ARG2="${TEST_DEP2}"
28868                         else
28869                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28870                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28871                         fi
28872                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28873                 fi
28874         fi
28875 done
28876 echo "$as_me:28876: result: $cf_cv_src_modules" >&5
28877 echo "${ECHO_T}$cf_cv_src_modules" >&6
28878
28879 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28880 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28881
28882 SRC_SUBDIRS=
28883 if test "x$cf_with_manpages" != xno ; then
28884         SRC_SUBDIRS="$SRC_SUBDIRS man"
28885 fi
28886 SRC_SUBDIRS="$SRC_SUBDIRS include"
28887 for cf_dir in $cf_cv_src_modules
28888 do
28889         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28890 done
28891 if test "x$cf_with_tests" != "xno" ; then
28892         SRC_SUBDIRS="$SRC_SUBDIRS test"
28893 fi
28894 # always make this, to install the ncurses-config script
28895 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28896 if test "$cf_with_cxx_binding" != no; then
28897         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28898         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28899 fi
28900
28901 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28902 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28903
28904 ADA_SUBDIRS=
28905 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28906         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28907         ADA_SUBDIRS="gen src"
28908         if test "x$cf_with_tests" != "xno" ; then
28909                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28910         fi
28911 fi
28912
28913 SUB_MAKEFILES=
28914 for cf_dir in $SRC_SUBDIRS
28915 do
28916         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28917 done
28918
28919 if test -n "$ADA_SUBDIRS"; then
28920         for cf_dir in $ADA_SUBDIRS
28921         do
28922                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28923         done
28924
28925 fi
28926
28927 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28928    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28929    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28930    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28931 fi
28932
28933 DIRS_TO_MAKE="lib"
28934 for cf_item in $cf_list_models
28935 do
28936
28937         case $cf_item in
28938         (libtool) cf_subdir='obj_lo'  ;;
28939         (normal)  cf_subdir='objects' ;;
28940         (debug)   cf_subdir='obj_g' ;;
28941         (profile) cf_subdir='obj_p' ;;
28942         (shared)
28943                 case "$cf_cv_system_name" in
28944                 (cygwin|msys)
28945                         cf_subdir='objects' ;;
28946                 (*)
28947                         cf_subdir='obj_s' ;;
28948                 esac
28949         esac
28950
28951         for cf_item2 in $DIRS_TO_MAKE
28952         do
28953                 test "$cf_item2" = "$cf_subdir" && break
28954         done
28955         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28956 done
28957 for cf_dir in $DIRS_TO_MAKE
28958 do
28959         test ! -d "$cf_dir" && mkdir "$cf_dir"
28960 done
28961
28962 # symbols that differ when compiling Ada95 by itself.
28963 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28964
28965 # values to use as strings
28966
28967 cat >>confdefs.h <<EOF
28968 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28969 EOF
28970
28971 cat >>confdefs.h <<EOF
28972 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28973 EOF
28974
28975 ### Define substitutions for header files to avoid name-pollution
28976
28977 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28978         HAVE_TCGETATTR=1
28979 else
28980         HAVE_TCGETATTR=0
28981 fi
28982
28983 if test "x$ac_cv_header_stdint_h" = xyes ; then
28984         HAVE_STDINT_H=1
28985 else
28986         HAVE_STDINT_H=0
28987 fi
28988
28989 if test "x$ac_cv_header_termio_h" = xyes ; then
28990         HAVE_TERMIO_H=1
28991 else
28992         HAVE_TERMIO_H=0
28993 fi
28994
28995 if test "x$ac_cv_header_termios_h" = xyes ; then
28996         HAVE_TERMIOS_H=1
28997 else
28998         HAVE_TERMIOS_H=0
28999 fi
29000
29001 ################################################################################
29002 test "x$use_database" = xyes && \
29003 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29004
29005 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
29006 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29007
29008 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
29009 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29010 fi
29011
29012 if test "x$cf_with_tests" != xno ; then
29013         MAKE_TESTS=
29014 else
29015         MAKE_TESTS="#"
29016 fi
29017
29018 ADAHTML_DIR=../../doc/html/ada
29019
29020 # workaround for OS/2 (20151017)
29021 case "$cf_cv_system_name" in
29022 (os2*)
29023         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29024         ;;
29025 (*)
29026         LIBTOOL_OPTS_CXX=
29027         ;;
29028 esac
29029
29030 # workaround for g++ versus Solaris (20131116)
29031 case "$cf_cv_system_name" in
29032 (solaris2*)
29033         case "x$CPPFLAGS" in
29034         (*-D_XOPEN_SOURCE_EXTENDED*)
29035                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29036
29037 echo "${as_me:-configure}:29037: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29038
29039                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29040                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29041                 ;;
29042         esac
29043         ;;
29044 esac
29045
29046 # Help to automatically enable the extended curses features when using either
29047 # the *-config or the ".pc" files by adding defines.
29048 echo "$as_me:29048: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
29049 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
29050 PKG_CFLAGS=
29051 for cf_loop1 in $CPPFLAGS_after_XOPEN
29052 do
29053         cf_found=no
29054         for cf_loop2 in $CPPFLAGS_before_XOPEN
29055         do
29056                 if test "x$cf_loop1" = "x$cf_loop2"
29057                 then
29058                         cf_found=yes
29059                         break
29060                 fi
29061         done
29062         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29063 done
29064 echo "$as_me:29064: result: $PKG_CFLAGS" >&5
29065 echo "${ECHO_T}$PKG_CFLAGS" >&6
29066
29067 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29068 case "x$NCURSES_OSPEED" in
29069 (*short*)
29070         cf_compatible=1
29071         ;;
29072 (*)
29073         cf_compatible=0
29074         ;;
29075 esac
29076
29077 cat >>confdefs.h <<EOF
29078 #define NCURSES_OSPEED_COMPAT $cf_compatible
29079 EOF
29080
29081 case "x$cf_cv_typeof_chtype" in
29082 (xshort|xint|xlong)
29083         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29084         ;;
29085 esac
29086
29087 case "x$cf_cv_typeof_mmask_t" in
29088 (xshort|xint|xlong)
29089         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29090         ;;
29091 esac
29092
29093 # substitute into misc/Makefile to suppress
29094 # (un)install.data from the
29095 # (un)install rules.
29096 if test "x$cf_with_db_install" = "xno"; then
29097         MISC_INSTALL_DATA=
29098         MISC_UNINSTALL_DATA=
29099 else
29100         MISC_INSTALL_DATA=install.data
29101         MISC_UNINSTALL_DATA=uninstall.data
29102 fi
29103
29104 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29105         MAKE_DATABASE="#"
29106 else
29107         MAKE_DATABASE="$MAKE_TERMINFO"
29108 fi
29109
29110 if test -n "$PACKAGE"
29111 then
29112         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29113         export PACKAGE
29114         echo "package: $PACKAGE"
29115 fi
29116
29117 UNALTERED_SYMS=
29118 cf_filter_syms=no
29119
29120 if test -n "$RESULTING_SYMS"
29121 then
29122         cf_filter_syms=$cf_dft_filter_syms
29123         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_default" 1>&6
29124
29125 echo "${as_me:-configure}:29125: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29126
29127 fi
29128
29129 if test "x$WILDCARD_SYMS" = xno
29130 then
29131         cf_filter_syms=yes
29132 fi
29133
29134 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29135
29136 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29137 if test "$cf_filter_syms" = yes
29138 then
29139         RESULTING_SYMS=resulting.map
29140 fi
29141
29142 if test "x$cross_compiling" = xyes ; then
29143         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29144         CHECK_BUILD="#"
29145 else
29146         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29147         CHECK_BUILD=
29148 fi
29149
29150 # This is used for the *-config script and *.pc data files.
29151
29152 echo "$as_me:29152: checking for linker search path" >&5
29153 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29154 if test "${cf_cv_ld_searchpath+set}" = set; then
29155   echo $ECHO_N "(cached) $ECHO_C" >&6
29156 else
29157
29158 if test "$cross_compiling" != yes ; then
29159
29160 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29161 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29162
29163 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29164 # update the cache, which makes it run faster.
29165 test -z "$cf_pathlist" && \
29166         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29167
29168 test -z "$cf_pathlist" &&
29169         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29170
29171 # This works with OpenBSD 6.5, which lists only filenames
29172 test -z "$cf_pathlist" &&
29173         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29174
29175 if test -z "$cf_pathlist"
29176 then
29177         # dyld default path with MacOS
29178         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29179         then
29180                 # do this to bypass check
29181                 cf_cv_ld_searchpath='$HOME/lib'
29182                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29183         fi
29184 fi
29185
29186 if test -z "$cf_pathlist"
29187 then
29188         # Solaris is "SunOS"
29189         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29190         then
29191                 case x`(isainfo -b)` in
29192                 (x64)
29193                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29194                         ;;
29195                 (x32)
29196                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29197                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29198                         ;;
29199                 (*)
29200                         { echo "$as_me:29200: WARNING: problem with Solaris architecture" >&5
29201 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29202                         ;;
29203                 esac
29204         fi
29205 fi
29206
29207 if test -z "$cf_pathlist"
29208 then
29209         # HP-UX
29210         if test x"`uname -s`" = xHP-UX
29211         then
29212                 case x`getconf LONG_BIT` in
29213                 (x64)
29214                         cf_pathlist="/usr/lib/hpux64"
29215                         ;;
29216                 (x*)
29217                         cf_pathlist="/usr/lib/hpux32"
29218                         ;;
29219                 esac
29220         fi
29221 fi
29222
29223 fi
29224
29225 # If nothing else, assume it is conventional
29226 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29227
29228 # Finally, check that this is only directories
29229 for cf_path in $0 $cf_pathlist
29230 do
29231         if test -d "$cf_path"; then
29232                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29233                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29234         fi
29235 done
29236
29237 # Ensure that it is nonempty
29238 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29239
29240 fi
29241 echo "$as_me:29241: result: $cf_cv_ld_searchpath" >&5
29242 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29243
29244 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29245
29246 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"
29247 ac_config_commands="$ac_config_commands default"
29248 cat >confcache <<\_ACEOF
29249 # This file is a shell script that caches the results of configure
29250 # tests run on this system so they can be shared between configure
29251 # scripts and configure runs, see configure's option --config-cache.
29252 # It is not useful on other systems.  If it contains results you don't
29253 # want to keep, you may remove or edit it.
29254 #
29255 # config.status only pays attention to the cache file if you give it
29256 # the --recheck option to rerun configure.
29257 #
29258 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29259 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29260 # following values.
29261
29262 _ACEOF
29263
29264 # The following way of writing the cache mishandles newlines in values,
29265 # but we know of no workaround that is simple, portable, and efficient.
29266 # So, don't put newlines in cache variables' values.
29267 # Ultrix sh set writes to stderr and can't be redirected directly,
29268 # and sets the high bit in the cache file unless we assign to the vars.
29269 {
29270   (set) 2>&1 |
29271     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29272     *ac_space=\ *)
29273       # `set' does not quote correctly, so add quotes (double-quote
29274       # substitution turns \\\\ into \\, and sed turns \\ into \).
29275       sed -n \
29276         "s/'/'\\\\''/g;
29277           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29278       ;;
29279     *)
29280       # `set' quotes correctly as required by POSIX, so do not add quotes.
29281       sed -n \
29282         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29283       ;;
29284     esac;
29285 } |
29286   sed '
29287      t clear
29288      : clear
29289      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29290      t end
29291      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29292      : end' >>confcache
29293 if cmp -s $cache_file confcache; then :; else
29294   if test -w $cache_file; then
29295     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29296     cat confcache >$cache_file
29297   else
29298     echo "not updating unwritable cache $cache_file"
29299   fi
29300 fi
29301 rm -f confcache
29302
29303 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29304 # Let make expand exec_prefix.
29305 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29306
29307 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29308 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29309 # trailing colons and then remove the whole line if VPATH becomes empty
29310 # (actually we leave an empty line to preserve line numbers).
29311 if test "x$srcdir" = x.; then
29312   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29313 s/:*\$(srcdir):*/:/;
29314 s/:*\${srcdir}:*/:/;
29315 s/:*@srcdir@:*/:/;
29316 s/^\([^=]*=[    ]*\):*/\1/;
29317 s/:*$//;
29318 s/^[^=]*=[      ]*$//;
29319 }'
29320 fi
29321
29322 DEFS=-DHAVE_CONFIG_H
29323
29324 : "${CONFIG_STATUS=./config.status}"
29325 ac_clean_files_save=$ac_clean_files
29326 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29327 { echo "$as_me:29327: creating $CONFIG_STATUS" >&5
29328 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29329 cat >"$CONFIG_STATUS" <<_ACEOF
29330 #! $SHELL
29331 # Generated automatically by configure.
29332 # Run this file to recreate the current configuration.
29333 # Compiler output produced by configure, useful for debugging
29334 # configure, is in config.log if it exists.
29335
29336 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29337
29338 debug=false
29339 SHELL=\${CONFIG_SHELL-$SHELL}
29340 ac_cs_invocation="\$0 \$@"
29341
29342 CLICOLOR_FORCE= GREP_OPTIONS=
29343 unset CLICOLOR_FORCE GREP_OPTIONS
29344 _ACEOF
29345
29346 cat >>"$CONFIG_STATUS" <<\_ACEOF
29347 # Be Bourne compatible
29348 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29349   emulate sh
29350   NULLCMD=:
29351 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29352   set -o posix
29353 fi
29354
29355 # Name of the executable.
29356 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29357
29358 if expr a : '\(a\)' >/dev/null 2>&1; then
29359   as_expr="expr"
29360 else
29361   as_expr="false"
29362 fi
29363
29364 rm -f conf$$ conf$$.exe conf$$.file
29365 echo >conf$$.file
29366 if ln -s conf$$.file conf$$ 2>/dev/null; then
29367   # We could just check for DJGPP; but this test a) works b) is more generic
29368   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29369   if test -f conf$$.exe; then
29370     # Don't use ln at all; we don't have any links
29371     as_ln_s='cp -p'
29372   else
29373     as_ln_s='ln -s'
29374   fi
29375 elif ln conf$$.file conf$$ 2>/dev/null; then
29376   as_ln_s='ln'
29377 else
29378   as_ln_s='cp -p'
29379 fi
29380 rm -f conf$$ conf$$.exe conf$$.file
29381
29382 as_executable_p="test -f"
29383
29384 # Support unset when possible.
29385 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29386   as_unset="unset"
29387 else
29388   as_unset="false"
29389 fi
29390
29391 # NLS nuisances.
29392 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29393 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29394 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29395 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29396 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29397 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29398 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29399 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29400
29401 # IFS
29402 # We need space, tab and new line, in precisely that order.
29403 as_nl='
29404 '
29405 IFS="   $as_nl"
29406
29407 # CDPATH.
29408 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29409
29410 exec 6>&1
29411
29412 _ACEOF
29413
29414 # Files that config.status was made for.
29415 if test -n "$ac_config_files"; then
29416   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29417 fi
29418
29419 if test -n "$ac_config_headers"; then
29420   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29421 fi
29422
29423 if test -n "$ac_config_links"; then
29424   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29425 fi
29426
29427 if test -n "$ac_config_commands"; then
29428   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29429 fi
29430
29431 cat >>"$CONFIG_STATUS" <<\EOF
29432
29433 ac_cs_usage="\
29434 \`$as_me' instantiates files from templates according to the
29435 current configuration.
29436
29437 Usage: $0 [OPTIONS] [FILE]...
29438
29439   -h, --help       print this help, then exit
29440   -V, --version    print version number, then exit
29441   -d, --debug      don't remove temporary files
29442       --recheck    update $as_me by reconfiguring in the same conditions
29443   --file=FILE[:TEMPLATE]
29444                    instantiate the configuration file FILE
29445   --header=FILE[:TEMPLATE]
29446                    instantiate the configuration header FILE
29447
29448 Configuration files:
29449 $config_files
29450
29451 Configuration headers:
29452 $config_headers
29453
29454 Configuration commands:
29455 $config_commands
29456
29457 Report bugs to <dickey@invisible-island.net>."
29458 EOF
29459
29460 cat >>"$CONFIG_STATUS" <<EOF
29461 ac_cs_version="\\
29462 config.status
29463 configured by $0, generated by GNU Autoconf 2.52.20230114,
29464   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29465
29466 Copyright 2003-2022,2023        Thomas E. Dickey
29467 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29468 Free Software Foundation, Inc.
29469 This config.status script is free software; the Free Software Foundation
29470 gives unlimited permission to copy, distribute and modify it."
29471 srcdir="$srcdir"
29472 INSTALL="$INSTALL"
29473 EOF
29474
29475 cat >>"$CONFIG_STATUS" <<\EOF
29476 # If no file are specified by the user, then we need to provide default
29477 # value.  By we need to know if files were specified by the user.
29478 ac_need_defaults=:
29479 while test $# != 0
29480 do
29481   case $1 in
29482   --*=*)
29483     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29484     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29485     shift
29486     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29487     shift
29488     ;;
29489   -*);;
29490   *) # This is not an option, so the user has probably given explicit
29491      # arguments.
29492      ac_need_defaults=false;;
29493   esac
29494
29495   case $1 in
29496   # Handling of the options.
29497 EOF
29498 cat >>"$CONFIG_STATUS" <<EOF
29499   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29500     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29501     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29502 EOF
29503 cat >>"$CONFIG_STATUS" <<\EOF
29504   --version | --vers* | -V )
29505     echo "$ac_cs_version"; exit 0 ;;
29506   --he | --h)
29507     # Conflict between --help and --header
29508     { { echo "$as_me:29508: error: ambiguous option: $1
29509 Try \`$0 --help' for more information." >&5
29510 echo "$as_me: error: ambiguous option: $1
29511 Try \`$0 --help' for more information." >&2;}
29512    { (exit 1); exit 1; }; };;
29513   --help | --hel | -h )
29514     echo "$ac_cs_usage"; exit 0 ;;
29515   --debug | --d* | -d )
29516     debug=: ;;
29517   --file | --fil | --fi | --f )
29518     shift
29519     CONFIG_FILES="$CONFIG_FILES $1"
29520     ac_need_defaults=false;;
29521   --header | --heade | --head | --hea )
29522     shift
29523     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29524     ac_need_defaults=false;;
29525
29526   # This is an error.
29527   -*) { { echo "$as_me:29527: error: unrecognized option: $1
29528 Try \`$0 --help' for more information." >&5
29529 echo "$as_me: error: unrecognized option: $1
29530 Try \`$0 --help' for more information." >&2;}
29531    { (exit 1); exit 1; }; } ;;
29532
29533   *) ac_config_targets="$ac_config_targets $1" ;;
29534
29535   esac
29536   shift
29537 done
29538
29539 exec 5>>config.log
29540 cat >&5 << _ACEOF
29541
29542 ## ----------------------- ##
29543 ## Running config.status.  ##
29544 ## ----------------------- ##
29545
29546 This file was extended by $as_me 2.52.20230114, executed with
29547   CONFIG_FILES    = $CONFIG_FILES
29548   CONFIG_HEADERS  = $CONFIG_HEADERS
29549   CONFIG_LINKS    = $CONFIG_LINKS
29550   CONFIG_COMMANDS = $CONFIG_COMMANDS
29551   > "$ac_cs_invocation"
29552 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29553
29554 _ACEOF
29555 EOF
29556
29557 cat >>"$CONFIG_STATUS" <<EOF
29558 #
29559 # INIT-COMMANDS section.
29560 #
29561
29562 ### Special initialization commands, used to pass information from the
29563 ### configuration-run into config.status
29564
29565 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29566 AWK="$AWK"
29567 CXX_NAME="$CXX_NAME"
29568 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29569 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29570 ECHO_LD="$ECHO_LD"
29571 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29572 FORM_NAME="$FORM_NAME"
29573 LDCONFIG="$LDCONFIG"
29574 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29575 LIB_NAME="$LIB_NAME"
29576 LIB_PREFIX="$LIB_PREFIX"
29577 LIB_SUBSETS="$LIB_SUBSETS"
29578 LIB_SUFFIX="$LIB_SUFFIX"
29579 LIB_TRACING="$LIB_TRACING"
29580 LN_S="$LN_S"
29581 MAKE_TERMINFO="$MAKE_TERMINFO"
29582 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29583 MENU_NAME="$MENU_NAME"
29584 NCURSES_MAJOR="$NCURSES_MAJOR"
29585 NCURSES_MINOR="$NCURSES_MINOR"
29586 NCURSES_OSPEED="$NCURSES_OSPEED"
29587 NCURSES_PATCH="$NCURSES_PATCH"
29588 PANEL_NAME="$PANEL_NAME"
29589 SRC_SUBDIRS="$SRC_SUBDIRS"
29590 TERMINFO="$TERMINFO"
29591 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29592 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29593 TICS_NAME="$TICS_NAME"
29594 TICS_SUFFIX="$TICS_SUFFIX"
29595 TIC_PATH="$TIC_PATH"
29596 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29597 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29598 TINFO_NAME="$TINFO_NAME"
29599 TINFO_SUFFIX="$TINFO_SUFFIX"
29600 UNALTERED_SYMS="$UNALTERED_SYMS"
29601 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29602 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29603 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29604 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29605 WILDCARD_SYMS="$WILDCARD_SYMS"
29606 WITH_CURSES_H="$with_curses_h"
29607 WITH_ECHO="${enable_echo:=yes}"
29608 WITH_OVERWRITE="$with_overwrite"
29609 cf_LIST_MODELS="$cf_list_models"
29610 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29611 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29612 cf_cv_abi_default="$cf_cv_abi_default"
29613 cf_cv_abi_version="$cf_cv_abi_version"
29614 cf_cv_do_relink="$cf_cv_do_relink"
29615 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29616 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29617 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29618 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29619 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29620 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29621 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29622 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29623 cf_cv_rel_version="$cf_cv_rel_version"
29624 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29625 cf_cv_shared_soname='$cf_cv_shared_soname'
29626 cf_cv_shlib_version="$cf_cv_shlib_version"
29627 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29628 cf_cv_system_name="$cf_cv_system_name"
29629 cf_cv_term_driver="$with_term_driver"
29630 cf_with_ada="$cf_with_ada"
29631 cf_with_cxx_binding="$cf_with_cxx_binding"
29632 cf_with_db_install="$cf_with_db_install"
29633 cf_with_manpages="$cf_with_manpages"
29634 cf_with_tests="$cf_with_tests"
29635 host="$host"
29636 target="$target"
29637 verbose="$verbose"
29638 with_shared_cxx="$with_shared_cxx"
29639
29640 EOF
29641
29642 cat >>"$CONFIG_STATUS" <<\EOF
29643 for ac_config_target in $ac_config_targets
29644 do
29645   case "$ac_config_target" in
29646   # Handling of arguments.
29647   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29648   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29649   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29650   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29651   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29652   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
29653   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29654   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29655   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29656   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29657   *) { { echo "$as_me:29657: error: invalid argument: $ac_config_target" >&5
29658 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29659    { (exit 1); exit 1; }; };;
29660   esac
29661 done
29662
29663 # If the user did not use the arguments to specify the items to instantiate,
29664 # then the envvar interface is used.  Set only those that are not.
29665 # We use the long form for the default assignment because of an extremely
29666 # bizarre bug on SunOS 4.1.3.
29667 if "$ac_need_defaults"; then
29668   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29669   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29670   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29671 fi
29672
29673 # Create a temporary directory, and hook for its removal unless debugging.
29674 $debug ||
29675 {
29676   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29677   trap '{ (exit 1); exit 1; }' 1 2 13 15
29678 }
29679
29680 # Create a (secure) tmp directory for tmp files.
29681 : "${TMPDIR=/tmp}"
29682 {
29683   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29684   test -n "$tmp" && test -d "$tmp"
29685 }  ||
29686 {
29687   tmp=$TMPDIR/cs$$-$RANDOM
29688   (umask 077 && mkdir "$tmp")
29689 } ||
29690 {
29691    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29692    { (exit 1); exit 1; }
29693 }
29694
29695 EOF
29696
29697 cat >>"$CONFIG_STATUS" <<EOF
29698
29699 #
29700 # CONFIG_FILES section.
29701 #
29702
29703 # No need to generate the scripts if there are no CONFIG_FILES.
29704 # This happens for instance when ./config.status config.h
29705 if test -n "\$CONFIG_FILES"; then
29706   # Protect against being on the right side of a sed subst in config.status.
29707   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29708    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
29709 s,@SHELL@,$SHELL,;t t
29710 s,@exec_prefix@,$exec_prefix,;t t
29711 s,@prefix@,$prefix,;t t
29712 s,@program_transform_name@,$program_transform_name,;t t
29713 s,@bindir@,$bindir,;t t
29714 s,@sbindir@,$sbindir,;t t
29715 s,@libexecdir@,$libexecdir,;t t
29716 s,@datarootdir@,$datarootdir,;t t
29717 s,@datadir@,$datadir,;t t
29718 s,@sysconfdir@,$sysconfdir,;t t
29719 s,@sharedstatedir@,$sharedstatedir,;t t
29720 s,@localstatedir@,$localstatedir,;t t
29721 s,@runstatedir@,$runstatedir,;t t
29722 s,@libdir@,$libdir,;t t
29723 s,@includedir@,$includedir,;t t
29724 s,@oldincludedir@,$oldincludedir,;t t
29725 s,@infodir@,$infodir,;t t
29726 s,@mandir@,$mandir,;t t
29727 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29728 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29729 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29730 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29731 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29732 s,@build_alias@,$build_alias,;t t
29733 s,@host_alias@,$host_alias,;t t
29734 s,@target_alias@,$target_alias,;t t
29735 s,@ECHO_C@,$ECHO_C,;t t
29736 s,@ECHO_N@,$ECHO_N,;t t
29737 s,@ECHO_T@,$ECHO_T,;t t
29738 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29739 s,@DEFS@,$DEFS,;t t
29740 s,@LIBS@,$LIBS,;t t
29741 s,@top_builddir@,$top_builddir,;t t
29742 s,@GREP@,$GREP,;t t
29743 s,@EGREP@,$EGREP,;t t
29744 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29745 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29746 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29747 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29748 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29749 s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
29750 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29751 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29752 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29753 s,@VERSION@,$VERSION,;t t
29754 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29755 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29756 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29757 s,@PACKAGE@,$PACKAGE,;t t
29758 s,@build@,$build,;t t
29759 s,@build_cpu@,$build_cpu,;t t
29760 s,@build_vendor@,$build_vendor,;t t
29761 s,@build_os@,$build_os,;t t
29762 s,@host@,$host,;t t
29763 s,@host_cpu@,$host_cpu,;t t
29764 s,@host_vendor@,$host_vendor,;t t
29765 s,@host_os@,$host_os,;t t
29766 s,@target@,$target,;t t
29767 s,@target_cpu@,$target_cpu,;t t
29768 s,@target_vendor@,$target_vendor,;t t
29769 s,@target_os@,$target_os,;t t
29770 s,@FGREP@,$FGREP,;t t
29771 s,@CC@,$CC,;t t
29772 s,@CFLAGS@,$CFLAGS,;t t
29773 s,@LDFLAGS@,$LDFLAGS,;t t
29774 s,@CPPFLAGS@,$CPPFLAGS,;t t
29775 s,@ac_ct_CC@,$ac_ct_CC,;t t
29776 s,@EXEEXT@,$EXEEXT,;t t
29777 s,@OBJEXT@,$OBJEXT,;t t
29778 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29779 s,@CPP@,$CPP,;t t
29780 s,@LDCONFIG@,$LDCONFIG,;t t
29781 s,@CXX@,$CXX,;t t
29782 s,@CXXFLAGS@,$CXXFLAGS,;t t
29783 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29784 s,@AWK@,$AWK,;t t
29785 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29786 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29787 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29788 s,@LINT@,$LINT,;t t
29789 s,@LINT_OPTS@,$LINT_OPTS,;t t
29790 s,@LINT_LIBS@,$LINT_LIBS,;t t
29791 s,@LN_S@,$LN_S,;t t
29792 s,@cf_config_suffix@,$cf_config_suffix,;t t
29793 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29794 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29795 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29796 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29797 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29798 s,@SET_MAKE@,$SET_MAKE,;t t
29799 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29800 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29801 s,@CTAGS@,$CTAGS,;t t
29802 s,@ETAGS@,$ETAGS,;t t
29803 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29804 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29805 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29806 s,@RANLIB@,$RANLIB,;t t
29807 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29808 s,@LD@,$LD,;t t
29809 s,@ac_ct_LD@,$ac_ct_LD,;t t
29810 s,@AR@,$AR,;t t
29811 s,@ac_ct_AR@,$ac_ct_AR,;t t
29812 s,@NM@,$NM,;t t
29813 s,@ac_ct_NM@,$ac_ct_NM,;t t
29814 s,@ARFLAGS@,$ARFLAGS,;t t
29815 s,@DESTDIR@,$DESTDIR,;t t
29816 s,@BUILD_CC@,$BUILD_CC,;t t
29817 s,@BUILD_CPP@,$BUILD_CPP,;t t
29818 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29819 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29820 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29821 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29822 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29823 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29824 s,@cf_list_models@,$cf_list_models,;t t
29825 s,@ABI_VERSION@,$ABI_VERSION,;t t
29826 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29827 s,@LIBTOOL@,$LIBTOOL,;t t
29828 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29829 s,@LT_UNDEF@,$LT_UNDEF,;t t
29830 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29831 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29832 s,@LIB_CREATE@,$LIB_CREATE,;t t
29833 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29834 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29835 s,@LIB_PREP@,$LIB_PREP,;t t
29836 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29837 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29838 s,@LIB_LINK@,$LIB_LINK,;t t
29839 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29840 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29841 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29842 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29843 s,@TICS_NAME@,$TICS_NAME,;t t
29844 s,@TINFO_NAME@,$TINFO_NAME,;t t
29845 s,@LIB_NAME@,$LIB_NAME,;t t
29846 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29847 s,@CC_G_OPT@,$CC_G_OPT,;t t
29848 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29849 s,@LD_MODEL@,$LD_MODEL,;t t
29850 s,@shlibdir@,$shlibdir,;t t
29851 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29852 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29853 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29854 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29855 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29856 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29857 s,@LINK_PROGS@,$LINK_PROGS,;t t
29858 s,@LINK_TESTS@,$LINK_TESTS,;t t
29859 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29860 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29861 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29862 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29863 s,@RPATH_LIST@,$RPATH_LIST,;t t
29864 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29865 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29866 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29867 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29868 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29869 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29870 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29871 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29872 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29873 s,@TIC@,$TIC,;t t
29874 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29875 s,@INFOCMP@,$INFOCMP,;t t
29876 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29877 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29878 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29879 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29880 s,@XTERM_KBS@,$XTERM_KBS,;t t
29881 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29882 s,@TERMINFO@,$TERMINFO,;t t
29883 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29884 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29885 s,@TERMPATH@,$TERMPATH,;t t
29886 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29887 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29888 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29889 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29890 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29891 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29892 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29893 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29894 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29895 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29896 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29897 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29898 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29899 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29900 s,@RGB_PATH@,$RGB_PATH,;t t
29901 s,@no_x11_rgb@,$no_x11_rgb,;t t
29902 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29903 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29904 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29905 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29906 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29907 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29908 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29909 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29910 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29911 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29912 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29913 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29914 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29915 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29916 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29917 s,@PTHREAD@,$PTHREAD,;t t
29918 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29919 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29920 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29921 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29922 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29923 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29924 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29925 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29926 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29927 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29928 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29929 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29930 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29931 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29932 s,@ECHO_LT@,$ECHO_LT,;t t
29933 s,@ECHO_LD@,$ECHO_LD,;t t
29934 s,@RULE_CC@,$RULE_CC,;t t
29935 s,@SHOW_CC@,$SHOW_CC,;t t
29936 s,@ECHO_CC@,$ECHO_CC,;t t
29937 s,@ECHO_LINK@,$ECHO_LINK,;t t
29938 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29939 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29940 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29941 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29942 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29943 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29944 s,@ADAFLAGS@,$ADAFLAGS,;t t
29945 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29946 s,@ADA_TRACE@,$ADA_TRACE,;t t
29947 s,@MATH_LIB@,$MATH_LIB,;t t
29948 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29949 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29950 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29951 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29952 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29953 s,@TEST_LIBS@,$TEST_LIBS,;t t
29954 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29955 s,@CXXCPP@,$CXXCPP,;t t
29956 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29957 s,@CXX_AR@,$CXX_AR,;t t
29958 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29959 s,@CXXLIBS@,$CXXLIBS,;t t
29960 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29961 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29962 s,@M4_exists@,$M4_exists,;t t
29963 s,@cf_ada_make@,$cf_ada_make,;t t
29964 s,@cf_ada_config@,$cf_ada_config,;t t
29965 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29966 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29967 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29968 s,@cf_compile_generics@,$cf_compile_generics,;t t
29969 s,@cf_generic_objects@,$cf_generic_objects,;t t
29970 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29971 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29972 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29973 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29974 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29975 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29976 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29977 s,@cf_ada_package@,$cf_ada_package,;t t
29978 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29979 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29980 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29981 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29982 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29983 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29984 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29985 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29986 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29987 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29988 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29989 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29990 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29991 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29992 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29993 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29994 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29995 s,@TICS_LIBS@,$TICS_LIBS,;t t
29996 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29997 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29998 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29999 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30000 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30001 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
30002 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30003 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
30004 s,@includesubdir@,$includesubdir,;t t
30005 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30006 s,@TICS_LIST@,$TICS_LIST,;t t
30007 s,@TINFO_LIST@,$TINFO_LIST,;t t
30008 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30009 s,@FORM_NAME@,$FORM_NAME,;t t
30010 s,@MENU_NAME@,$MENU_NAME,;t t
30011 s,@PANEL_NAME@,$PANEL_NAME,;t t
30012 s,@CXX_NAME@,$CXX_NAME,;t t
30013 s,@TEST_ARGS@,$TEST_ARGS,;t t
30014 s,@TEST_DEPS@,$TEST_DEPS,;t t
30015 s,@TEST_ARG2@,$TEST_ARG2,;t t
30016 s,@TEST_DEP2@,$TEST_DEP2,;t t
30017 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30018 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30019 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30020 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30021 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30022 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30023 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30024 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30025 s,@cross_compiling@,$cross_compiling,;t t
30026 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30027 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30028 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30029 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30030 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30031 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30032 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30033 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30034 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30035 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30036 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30037 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30038 CEOF
30039
30040 EOF
30041
30042   cat >>"$CONFIG_STATUS" <<\EOF
30043   # Split the substitutions into bite-sized pieces for seds with
30044   # small command number limits, like on Digital OSF/1 and HP-UX.
30045   ac_max_sed_lines=48
30046   ac_sed_frag=1 # Number of current file.
30047   ac_beg=1 # First line for current file.
30048   ac_end=$ac_max_sed_lines # Line after last line for current file.
30049   ac_more_lines=:
30050   ac_sed_cmds=
30051   while "$ac_more_lines"; do
30052     if test "$ac_beg" -gt 1; then
30053       sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30054     else
30055       sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30056     fi
30057     if test ! -s "$tmp"/subs.frag; then
30058       ac_more_lines=false
30059     else
30060       # The purpose of the label and of the branching condition is to
30061       # speed up the sed processing (if there are no `@' at all, there
30062       # is no need to browse any of the substitutions).
30063       # These are the two extra sed commands mentioned above.
30064       (echo ':t
30065   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30066       # It is possible to make a multiline substitution using escaped newlines.
30067       # Ensure that we do not split the substitution between script fragments.
30068       ac_BEG=$ac_end
30069       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30070       sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30071       if test -s "$tmp"/subs.next; then
30072         grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30073         if test ! -s "$tmp"/subs.edit; then
30074           grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30075           if test ! -s "$tmp"/subs.edit; then
30076             if test "$ac_beg" -gt 1; then
30077               ac_end=`expr "$ac_end" - 1`
30078               continue
30079             fi
30080           fi
30081         fi
30082       fi
30083
30084       if test -z "$ac_sed_cmds"; then
30085         ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30086       else
30087         ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30088       fi
30089       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30090       ac_beg=$ac_end
30091       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30092     fi
30093   done
30094   if test -z "$ac_sed_cmds"; then
30095     ac_sed_cmds="cat"
30096   fi
30097 fi # test -n "$CONFIG_FILES"
30098
30099 EOF
30100 cat >>"$CONFIG_STATUS" <<\EOF
30101 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30102   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30103   case "$ac_file" in
30104   - | *:- | *:-:* ) # input from stdin
30105         cat >"$tmp"/stdin
30106         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30107         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30108   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30109         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30110   * )   ac_file_in=$ac_file.in ;;
30111   esac
30112
30113   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30114   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30115          X"$ac_file" : 'X\(//\)[^/]' \| \
30116          X"$ac_file" : 'X\(//\)$' \| \
30117          X"$ac_file" : 'X\(/\)' \| \
30118          .     : '\(.\)' 2>/dev/null ||
30119 echo X"$ac_file" |
30120     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30121           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30122           /^X\(\/\/\)$/{ s//\1/; q; }
30123           /^X\(\/\).*/{ s//\1/; q; }
30124           s/.*/./; q'`
30125   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30126     { case "$ac_dir" in
30127   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30128   *)                      as_incr_dir=.;;
30129 esac
30130 as_dummy="$ac_dir"
30131 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30132   case $as_mkdir_dir in
30133     # Skip DOS drivespec
30134     ?:) as_incr_dir=$as_mkdir_dir ;;
30135     *)
30136       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30137       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30138     ;;
30139   esac
30140 done; }
30141
30142     ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30143     # A "../" for each directory in $ac_dir_suffix.
30144     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30145   else
30146     ac_dir_suffix= ac_dots=
30147   fi
30148
30149   case "$srcdir" in
30150   .)  ac_srcdir=.
30151       if test -z "$ac_dots"; then
30152          ac_top_srcdir=.
30153       else
30154          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30155       fi ;;
30156   [\\/]* | ?:[\\/]* )
30157       ac_srcdir="$srcdir$ac_dir_suffix";
30158       ac_top_srcdir="$srcdir" ;;
30159   *) # Relative path.
30160     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30161     ac_top_srcdir="$ac_dots$srcdir" ;;
30162   esac
30163
30164   case $INSTALL in
30165   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30166   *) ac_INSTALL=$ac_dots$INSTALL ;;
30167   esac
30168
30169   if test x"$ac_file" != x-; then
30170     { echo "$as_me:30170: creating $ac_file" >&5
30171 echo "$as_me: creating $ac_file" >&6;}
30172     rm -f "$ac_file"
30173   fi
30174   # Let's still pretend it is `configure' which instantiates (i.e., don't
30175   # use $as_me), people would be surprised to read:
30176   #    /* config.h.  Generated automatically by config.status.  */
30177   configure_input="Generated automatically from `echo $ac_file_in |
30178                                                  sed 's,.*/,,'` by configure."
30179
30180   # First look for the input files in the build tree, otherwise in the
30181   # src tree.
30182   ac_file_inputs=`IFS=:
30183     for f in $ac_file_in; do
30184       case $f in
30185       -) echo "$tmp"/stdin ;;
30186       [\\/$]*)
30187          # Absolute (can't be DOS-style, as IFS=:)
30188          test -f "$f" || { { echo "$as_me:30188: error: cannot find input file: $f" >&5
30189 echo "$as_me: error: cannot find input file: $f" >&2;}
30190    { (exit 1); exit 1; }; }
30191          echo "$f";;
30192       *) # Relative
30193          if test -f "$f"; then
30194            # Build tree
30195            echo "$f"
30196          elif test -f "$srcdir/$f"; then
30197            # Source tree
30198            echo "$srcdir/$f"
30199          else
30200            # /dev/null tree
30201            { { echo "$as_me:30201: error: cannot find input file: $f" >&5
30202 echo "$as_me: error: cannot find input file: $f" >&2;}
30203    { (exit 1); exit 1; }; }
30204          fi;;
30205       esac
30206     done` || { (exit 1); exit 1; }
30207 EOF
30208 cat >>"$CONFIG_STATUS" <<\EOF
30209   ac_warn_datarootdir=no
30210   if test x"$ac_file" != x-; then
30211     for ac_item in $ac_file_inputs
30212     do
30213       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30214       if test -n "$ac_seen"; then
30215         ac_used=`grep '@datarootdir@' "$ac_item"`
30216         if test -z "$ac_used"; then
30217           { echo "$as_me:30217: WARNING: datarootdir was used implicitly but not set:
30218 $ac_seen" >&5
30219 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30220 $ac_seen" >&2;}
30221           ac_warn_datarootdir=yes
30222         fi
30223       fi
30224       ac_seen=`grep '${datarootdir}' "$ac_item"`
30225       if test -n "$ac_seen"; then
30226         { echo "$as_me:30226: WARNING: datarootdir was used explicitly but not set:
30227 $ac_seen" >&5
30228 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30229 $ac_seen" >&2;}
30230         ac_warn_datarootdir=yes
30231       fi
30232     done
30233   fi
30234
30235 if test "x$ac_warn_datarootdir" = xyes; then
30236   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30237 fi
30238
30239 EOF
30240 cat >>"$CONFIG_STATUS" <<EOF
30241   sed "$ac_vpsub
30242 $extrasub
30243 EOF
30244 cat >>"$CONFIG_STATUS" <<\EOF
30245 :t
30246 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30247 s,@configure_input@,$configure_input,;t t
30248 s,@srcdir@,$ac_srcdir,;t t
30249 s,@top_srcdir@,$ac_top_srcdir,;t t
30250 s,@INSTALL@,$ac_INSTALL,;t t
30251 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30252   rm -f "$tmp"/stdin
30253 EOF
30254 : "${FGREP:=grep -F}"
30255 : "${EGREP:=grep -E}"
30256 cat >>"$CONFIG_STATUS" <<EOF
30257   : "\${FGREP:=$FGREP}"
30258   : "\${EGREP:=$EGREP}"
30259 EOF
30260 cat >>"$CONFIG_STATUS" <<\EOF
30261   if test x"$ac_file" != x-; then
30262     cp "$tmp/out" "$ac_file"
30263
30264     for ac_name in prefix exec_prefix datarootdir
30265     do
30266         ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
30267         if test -n "$ac_seen"; then
30268             ac_init=`$EGREP '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30269             if test -z "$ac_init"; then
30270               ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30271               { echo "$as_me:30271: WARNING: Variable $ac_name is used but was not set:
30272 $ac_seen" >&5
30273 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30274 $ac_seen" >&2;}
30275             fi
30276         fi
30277     done
30278     $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30279     $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30280     if test -s "$tmp"/out; then
30281       ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30282       { echo "$as_me:30282: WARNING: Some variables may not be substituted:
30283 $ac_seen" >&5
30284 echo "$as_me: WARNING: Some variables may not be substituted:
30285 $ac_seen" >&2;}
30286     fi
30287   else
30288     cat "$tmp"/out
30289   fi
30290   rm -f "$tmp"/out
30291
30292 done
30293 EOF
30294 cat >>"$CONFIG_STATUS" <<\EOF
30295
30296 #
30297 # CONFIG_HEADER section.
30298 #
30299
30300 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30301 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30302 #
30303 # ac_d sets the value in "#define NAME VALUE" lines.
30304 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30305 ac_dB='[        ].*$,\1#\2'
30306 ac_dC=' '
30307 ac_dD=',;t'
30308 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30309 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30310 ac_iB='\([      ]\),\1#\2define\3'
30311 ac_iC=' '
30312 ac_iD='\4,;t'
30313 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30314 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30315 ac_uB='$,\1#\2define\3'
30316 ac_uC=' '
30317 ac_uD=',;t'
30318
30319 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30320   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30321   case "$ac_file" in
30322   - | *:- | *:-:* ) # input from stdin
30323         cat >"$tmp"/stdin
30324         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30325         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30326   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30327         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30328   * )   ac_file_in=$ac_file.in ;;
30329   esac
30330
30331   test x"$ac_file" != x- && { echo "$as_me:30331: creating $ac_file" >&5
30332 echo "$as_me: creating $ac_file" >&6;}
30333
30334   # First look for the input files in the build tree, otherwise in the
30335   # src tree.
30336   ac_file_inputs=`IFS=:
30337     for f in $ac_file_in; do
30338       case $f in
30339       -) echo "$tmp"/stdin ;;
30340       [\\/$]*)
30341          # Absolute (can't be DOS-style, as IFS=:)
30342          test -f "$f" || { { echo "$as_me:30342: error: cannot find input file: $f" >&5
30343 echo "$as_me: error: cannot find input file: $f" >&2;}
30344    { (exit 1); exit 1; }; }
30345          echo $f;;
30346       *) # Relative
30347          if test -f "$f"; then
30348            # Build tree
30349            echo $f
30350          elif test -f "$srcdir/$f"; then
30351            # Source tree
30352            echo "$srcdir/$f"
30353          else
30354            # /dev/null tree
30355            { { echo "$as_me:30355: error: cannot find input file: $f" >&5
30356 echo "$as_me: error: cannot find input file: $f" >&2;}
30357    { (exit 1); exit 1; }; }
30358          fi;;
30359       esac
30360     done` || { (exit 1); exit 1; }
30361   # Remove the trailing spaces.
30362   sed 's/[      ]*$//' $ac_file_inputs >"$tmp"/in
30363
30364 EOF
30365
30366 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30367 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30368 # be either 'cat' or 'sort'.
30369 cat confdefs.h | uniq >conftest.vals
30370
30371 # Break up conftest.vals because some shells have a limit on
30372 # the size of here documents, and old seds have small limits too.
30373
30374 rm -f conftest.tail
30375 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30376 while grep . conftest.vals >/dev/null
30377 do
30378   # Write chunks of a limited-size here document to conftest.frag.
30379   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30380   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30381   echo 'CEOF' >> "$CONFIG_STATUS"
30382   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30383   rm -f conftest.vals
30384   mv conftest.tail conftest.vals
30385 done
30386 rm -f conftest.vals
30387
30388 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30389 # marker @DEFS@.
30390 echo '  cat >> conftest.edit <<CEOF
30391 /@DEFS@/r conftest.frag
30392 /@DEFS@/d
30393 CEOF
30394 sed -f conftest.edit "$tmp"/in > "$tmp"/out
30395 rm -f "$tmp"/in
30396 mv "$tmp"/out "$tmp"/in
30397 rm -f conftest.edit conftest.frag
30398 ' >> "$CONFIG_STATUS"
30399
30400 cat >>"$CONFIG_STATUS" <<\EOF
30401   # Let's still pretend it is `configure' which instantiates (i.e., don't
30402   # use $as_me), people would be surprised to read:
30403   #    /* config.h.  Generated automatically by config.status.  */
30404   if test x"$ac_file" = x-; then
30405     echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
30406   else
30407     echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
30408   fi
30409   cat "$tmp"/in >>"$tmp"/config.h
30410   rm -f "$tmp"/in
30411   if test x"$ac_file" != x-; then
30412     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30413       { echo "$as_me:30413: $ac_file is unchanged" >&5
30414 echo "$as_me: $ac_file is unchanged" >&6;}
30415     else
30416       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30417          X"$ac_file" : 'X\(//\)[^/]' \| \
30418          X"$ac_file" : 'X\(//\)$' \| \
30419          X"$ac_file" : 'X\(/\)' \| \
30420          .     : '\(.\)' 2>/dev/null ||
30421 echo X"$ac_file" |
30422     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30423           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30424           /^X\(\/\/\)$/{ s//\1/; q; }
30425           /^X\(\/\).*/{ s//\1/; q; }
30426           s/.*/./; q'`
30427       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30428         { case "$ac_dir" in
30429   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30430   *)                      as_incr_dir=.;;
30431 esac
30432 as_dummy="$ac_dir"
30433 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30434   case $as_mkdir_dir in
30435     # Skip DOS drivespec
30436     ?:) as_incr_dir=$as_mkdir_dir ;;
30437     *)
30438       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30439       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30440     ;;
30441   esac
30442 done; }
30443
30444       fi
30445       rm -f "$ac_file"
30446       mv "$tmp/config.h" "$ac_file"
30447     fi
30448   else
30449     cat "$tmp"/config.h
30450     rm -f "$tmp"/config.h
30451   fi
30452 done
30453 EOF
30454 cat >>"$CONFIG_STATUS" <<\EOF
30455 #
30456 # CONFIG_COMMANDS section.
30457 #
30458 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30459   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30460   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30461
30462   case "$ac_dest" in
30463     default )
30464 if test "x$cf_with_tests" != xno ; then
30465
30466 for cf_dir in test
30467 do
30468         if test ! -d "$srcdir/$cf_dir" ; then
30469                 continue
30470         elif test -f "$srcdir/$cf_dir/programs" ; then
30471                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30472         fi
30473 done
30474
30475 fi
30476
30477 cf_prefix=$LIB_PREFIX
30478
30479 case "$cf_cv_shlib_version" in
30480 (cygdll|msysdll|mingw|msvcdll)
30481         TINFO_NAME=$TINFO_ARG_SUFFIX
30482         TINFO_SUFFIX=.dll
30483         ;;
30484 esac
30485
30486 if test -n "$TINFO_SUFFIX" ; then
30487         case "$TINFO_SUFFIX" in
30488         (tw*)
30489                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30490                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30491                 ;;
30492         (t*)
30493                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30494                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30495                 ;;
30496         (w*)
30497                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30498                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30499                 ;;
30500         esac
30501 fi
30502
30503 for cf_dir in $SRC_SUBDIRS
30504 do
30505         if test ! -d "$srcdir/$cf_dir" ; then
30506                 continue
30507         elif test -f "$srcdir/$cf_dir/modules" ; then
30508
30509                 SHARED_LIB=
30510                 Libs_To_Make=
30511                 cf_awk_program=
30512                 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
30513                 then
30514                         cf_awk_program="$cf_awk_program\
30515 /deprecated in ABI${cf_cv_abi_default}/ { next; }\
30516 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
30517 "
30518                 fi
30519
30520                 if test "x$WILDCARD_SYMS" = xno
30521                 then
30522                         cf_awk_program="$cf_awk_program\
30523 /[      ]_\\*;/ { skip=1; next; }\
30524 "
30525                 fi
30526
30527                 if test "x$cf_awk_program" != "x"
30528                 then
30529                         cat >>$cf_dir/Makefile <<CF_EOF
30530
30531 # Generated by CF_LIB_RULES
30532 resulting.map: $UNALTERED_SYMS
30533         $AWK 'BEGIN { skip = 1; last=""; } \
30534 $cf_awk_program \
30535 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30536  skip = 0; last = \$\$0; } \
30537 END { print last; }' < "$UNALTERED_SYMS" >\$@
30538
30539 distclean::
30540         rm -f resulting.map
30541 CF_EOF
30542                 fi
30543
30544                 for cf_item in $cf_LIST_MODELS
30545                 do
30546
30547         case X$cf_item in
30548         (Xlibtool)
30549                 cf_suffix='.la'
30550                 cf_depsuf=$cf_suffix
30551                 ;;
30552         (Xdebug)
30553                 case "$cf_cv_system_name" in
30554                 (*-msvc*)
30555                         cf_suffix='_g.lib'
30556                         ;;
30557                 (*)
30558                         cf_suffix='_g.a'
30559                         ;;
30560                 esac
30561                 cf_depsuf=$cf_suffix
30562                 ;;
30563         (Xprofile)
30564                 case "$cf_cv_system_name" in
30565                 (*-msvc*)
30566                         cf_suffix='_p.lib'
30567                         ;;
30568                 (*)
30569                         cf_suffix='_p.a'
30570                         ;;
30571                 esac
30572                 cf_depsuf=$cf_suffix
30573                 ;;
30574         (Xshared)
30575                 case "$cf_cv_system_name" in
30576                 (aix[5-7]*)
30577                         cf_suffix='.so'
30578                         cf_depsuf=$cf_suffix
30579                         ;;
30580                 (*-msvc*)
30581                         cf_suffix='.dll'
30582                         cf_depsuf='.dll.lib'
30583                         ;;
30584                 (cygwin*|msys*|mingw*)
30585                         cf_suffix='.dll'
30586                         cf_depsuf='.dll.a'
30587                         ;;
30588                 (darwin*)
30589                         cf_suffix='.dylib'
30590                         cf_depsuf=$cf_suffix
30591                         ;;
30592                 (hpux*)
30593                         case "$target" in
30594                         (ia64*)
30595                                 cf_suffix='.so'
30596                                 cf_depsuf=$cf_suffix
30597                                 ;;
30598                         (*)
30599                                 cf_suffix='.sl'
30600                                 cf_depsuf=$cf_suffix
30601                                 ;;
30602                         esac
30603                         ;;
30604                 (*)
30605                         cf_suffix='.so'
30606                         cf_depsuf=$cf_suffix
30607                         ;;
30608                 esac
30609                 ;;
30610         (*)
30611                 case "$target" in
30612                 (*-msvc*)
30613                         cf_suffix='.lib'
30614                         ;;
30615                 (*)
30616                         cf_suffix='.a'
30617                         ;;
30618                 esac
30619                 cf_depsuf=$cf_suffix
30620                 ;;
30621         esac
30622         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30623         then
30624                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30625                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30626         fi
30627
30628                         if test "$cf_dir" = "c++"
30629                         then
30630
30631 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30632
30633 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30634
30635                         else
30636
30637 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30638
30639 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30640
30641                         fi
30642                         test -z "$cf_libname" && cf_libname="$cf_dir"
30643                         if test "$cf_item" = shared ; then
30644                                 if test -n "${LIB_SUFFIX}"
30645                                 then
30646                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30647                                 else
30648                                         cf_shared_suffix="$cf_suffix"
30649                                 fi
30650                                 if test "$cf_cv_do_symlinks" = yes ; then
30651                                         cf_version_name=
30652
30653                                         case "$cf_cv_shlib_version" in
30654                                         (rel)
30655                                                 cf_version_name=REL_VERSION
30656                                                 ;;
30657                                         (abi)
30658                                                 cf_version_name=ABI_VERSION
30659                                                 ;;
30660                                         esac
30661
30662                                         if test -n "$cf_version_name"
30663                                         then
30664                                                 case "$cf_cv_system_name" in
30665                                                 (darwin*)
30666                                                         # "w", etc?
30667                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30668                                                         ;;
30669                                                 (*)
30670                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30671                                                         ;;
30672                                                 esac
30673                                         fi
30674                                         if test -n "${USE_LIB_SUFFIX}"
30675                                         then
30676                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30677                                         else
30678                                                 cf_shared_suffix="$cf_suffix"
30679                                         fi
30680                                 fi
30681                                 # cygwin needs import library, and has unique naming convention
30682                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30683                                 # use 'cyg' prefix for shared lib.
30684                                 case "$cf_cv_shlib_version" in
30685                                 (cygdll)
30686                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30687                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30688                                         ;;
30689                                 (msysdll)
30690                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30691                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30692                                         ;;
30693                                 (mingw)
30694                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30695                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30696                                         ;;
30697                                 (msvcdll)
30698                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30699                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30700                                         ;;
30701                                 (*)
30702                                         cf_add_lib=
30703                                         ;;
30704                                 esac
30705                                 if test -n "$cf_add_lib"
30706                                 then
30707                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30708                                         continue
30709                                 fi
30710                         fi
30711                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30712                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30713                 done
30714
30715                 if test "$cf_dir" = ncurses ; then
30716                         cf_subsets="$LIB_SUBSETS"
30717                         cf_r_parts="$cf_subsets"
30718                         cf_liblist="$Libs_To_Make"
30719
30720                         while test -n "$cf_r_parts"
30721                         do
30722                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30723                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30724                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30725                                         cf_add_lib=
30726                                         case "$cf_l_parts" in
30727                                         (*termlib*)
30728                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30729                                                 ;;
30730                                         (*ticlib*)
30731                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30732                                                 ;;
30733                                         (*)
30734                                                 break
30735                                                 ;;
30736                                         esac
30737                                         if test -n "$cf_add_lib"; then
30738                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30739                                         fi
30740                                 else
30741                                         break
30742                                 fi
30743                         done
30744                 else
30745                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30746                 fi
30747
30748                 if test "$cf_dir" = c++; then
30749                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30750                                 cf_list=
30751                                 for cf_item in $Libs_To_Make
30752                                 do
30753                                         case "$cf_item" in
30754                                         (*.a)
30755                                                 ;;
30756                                         (*)
30757                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30758                                                 ;;
30759                                         esac
30760                                         for cf_test in $cf_list
30761                                         do
30762                                                 if test "$cf_test" = "$cf_item"
30763                                                 then
30764                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30765                                                         cf_item=
30766                                                         break
30767                                                 fi
30768                                         done
30769                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30770                                 done
30771                                 Libs_To_Make="$cf_list"
30772                         fi
30773                 fi
30774
30775                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30776                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30777                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30778                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30779
30780                 $AWK -f "$srcdir/mk-0th.awk" \
30781                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30782                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30783
30784                 for cf_subset in $cf_subsets
30785                 do
30786                         cf_subdirs=
30787                         for cf_item in $cf_LIST_MODELS
30788                         do
30789
30790                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30791
30792 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30793
30794                         CXX_MODEL=$cf_ITEM
30795                         if test "$CXX_MODEL" = SHARED; then
30796                                 case "$cf_cv_shlib_version" in
30797                                 (cygdll|msysdll|mingw|msvcdll)
30798                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30799
30800 echo "${as_me:-configure}:30800: testing overriding CXX_MODEL to SHARED ..." 1>&5
30801
30802                                         with_shared_cxx=yes
30803                                         ;;
30804                                 (*)
30805                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30806                                         ;;
30807                                 esac
30808                         fi
30809
30810         case X$cf_item in
30811         (Xlibtool)
30812                 cf_suffix='.la'
30813                 cf_depsuf=$cf_suffix
30814                 ;;
30815         (Xdebug)
30816                 case "$cf_cv_system_name" in
30817                 (*-msvc*)
30818                         cf_suffix='_g.lib'
30819                         ;;
30820                 (*)
30821                         cf_suffix='_g.a'
30822                         ;;
30823                 esac
30824                 cf_depsuf=$cf_suffix
30825                 ;;
30826         (Xprofile)
30827                 case "$cf_cv_system_name" in
30828                 (*-msvc*)
30829                         cf_suffix='_p.lib'
30830                         ;;
30831                 (*)
30832                         cf_suffix='_p.a'
30833                         ;;
30834                 esac
30835                 cf_depsuf=$cf_suffix
30836                 ;;
30837         (Xshared)
30838                 case "$cf_cv_system_name" in
30839                 (aix[5-7]*)
30840                         cf_suffix='.so'
30841                         cf_depsuf=$cf_suffix
30842                         ;;
30843                 (*-msvc*)
30844                         cf_suffix='.dll'
30845                         cf_depsuf='.dll.lib'
30846                         ;;
30847                 (cygwin*|msys*|mingw*)
30848                         cf_suffix='.dll'
30849                         cf_depsuf='.dll.a'
30850                         ;;
30851                 (darwin*)
30852                         cf_suffix='.dylib'
30853                         cf_depsuf=$cf_suffix
30854                         ;;
30855                 (hpux*)
30856                         case "$target" in
30857                         (ia64*)
30858                                 cf_suffix='.so'
30859                                 cf_depsuf=$cf_suffix
30860                                 ;;
30861                         (*)
30862                                 cf_suffix='.sl'
30863                                 cf_depsuf=$cf_suffix
30864                                 ;;
30865                         esac
30866                         ;;
30867                 (*)
30868                         cf_suffix='.so'
30869                         cf_depsuf=$cf_suffix
30870                         ;;
30871                 esac
30872                 ;;
30873         (*)
30874                 case "$target" in
30875                 (*-msvc*)
30876                         cf_suffix='.lib'
30877                         ;;
30878                 (*)
30879                         cf_suffix='.a'
30880                         ;;
30881                 esac
30882                 cf_depsuf=$cf_suffix
30883                 ;;
30884         esac
30885         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30886         then
30887                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30888                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30889         fi
30890
30891         case $cf_item in
30892         (libtool) cf_subdir='obj_lo'  ;;
30893         (normal)  cf_subdir='objects' ;;
30894         (debug)   cf_subdir='obj_g' ;;
30895         (profile) cf_subdir='obj_p' ;;
30896         (shared)
30897                 case "$cf_cv_system_name" in
30898                 (cygwin|msys)
30899                         cf_subdir='objects' ;;
30900                 (*)
30901                         cf_subdir='obj_s' ;;
30902                 esac
30903         esac
30904
30905                         # Test for case where we build libtinfo with a different name.
30906                         cf_libname=$cf_dir
30907                         if test "$cf_dir" = ncurses ; then
30908                                 case "$cf_subset" in
30909                                 (*base*)
30910                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30911                                         ;;
30912                                 (*termlib*)
30913                                         cf_libname=$TINFO_LIB_SUFFIX
30914                                         ;;
30915                                 (ticlib*)
30916                                         cf_libname=$TICS_LIB_SUFFIX
30917                                         ;;
30918                                 esac
30919                         elif test "$cf_dir" = c++ ; then
30920
30921 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30922
30923 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30924
30925                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30926                         else
30927
30928 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30929
30930 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30931
30932                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30933                         fi
30934                         if test -n "${USE_ARG_SUFFIX}" ; then
30935                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30936                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30937                         fi
30938
30939                         # These dependencies really are for development, not
30940                         # builds, but they are useful in porting, too.
30941                         cf_depend="../include/ncurses_cfg.h"
30942                         if test "$srcdir" = "."; then
30943                                 cf_reldir="."
30944                         else
30945                                 cf_reldir="\${srcdir}"
30946                         fi
30947
30948                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30949                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30950                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30951                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30952                         fi
30953
30954                         cf_dir_suffix=
30955                         old_cf_suffix="$cf_suffix"
30956                         if test "$cf_cv_shlib_version_infix" = yes ; then
30957                         if test -n "$USE_LIB_SUFFIX" ; then
30958                                 case "$USE_LIB_SUFFIX" in
30959                                 (tw*)
30960                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30961                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30962                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30963                                         ;;
30964                                 (t*)
30965                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30966                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30967                                         cf_dir_suffix=t$EXTRA_SUFFIX
30968                                         ;;
30969                                 (w*)
30970                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30971                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30972                                         cf_dir_suffix=w$EXTRA_SUFFIX
30973                                         ;;
30974                                 (*)
30975                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30976                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30977                                         cf_dir_suffix=$EXTRA_SUFFIX
30978                                         ;;
30979                                 esac
30980                         fi
30981                         fi
30982
30983                         $AWK -f "$srcdir/mk-1st.awk" \
30984                                 name=${cf_libname}${cf_dir_suffix} \
30985                                 traces=$LIB_TRACING \
30986                                 MODEL=$cf_ITEM \
30987                                 CXX_MODEL=$CXX_MODEL \
30988                                 LIB_SUFFIX=$LIB_SUFFIX \
30989                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30990                                 make_phony="${cf_cv_make_PHONY:-no}" \
30991                                 model=$cf_subdir \
30992                                 prefix=$cf_prefix \
30993                                 suffix=$cf_suffix \
30994                                 subset=$cf_subset \
30995                                 driver=$cf_cv_term_driver \
30996                                 SymLink="$LN_S" \
30997                                 TermlibRoot=$TINFO_NAME \
30998                                 TermlibSuffix=$TINFO_SUFFIX \
30999                                 ShlibVer=$cf_cv_shlib_version \
31000                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
31001                                 ReLink=${cf_cv_do_relink:-no} \
31002                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
31003                                 DoLinks=$cf_cv_do_symlinks \
31004                                 rmSoLocs=$cf_cv_rm_so_locs \
31005                                 ldconfig="$LDCONFIG" \
31006                                 overwrite=$WITH_OVERWRITE \
31007                                 depend="$cf_depend" \
31008                                 host="$host" \
31009                                 libtool_version="$LIBTOOL_VERSION" \
31010                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31011
31012                         cf_suffix="$old_cf_suffix"
31013
31014                         for cf_subdir2 in $cf_subdirs lib
31015                         do
31016                                 test "$cf_subdir" = "$cf_subdir2" && break
31017                         done
31018                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31019                         $AWK -f "$srcdir/mk-2nd.awk" \
31020                                 name=$cf_dir \
31021                                 traces=$LIB_TRACING \
31022                                 MODEL=$cf_ITEM \
31023                                 model=$cf_subdir \
31024                                 subset=$cf_subset \
31025                                 srcdir=$srcdir \
31026                                 echo=$WITH_ECHO \
31027                                 crenames=$cf_cv_prog_CC_c_o \
31028                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31029                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31030                         cf_subdirs="$cf_subdirs $cf_subdir"
31031                         done
31032                 done
31033         fi
31034
31035         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31036 done
31037
31038 echo >> Makefile
31039 echo '# generated by CF_LIB_RULES' >> Makefile
31040
31041 if test "x$cf_cv_make_PHONY" = xyes ; then
31042         cat >> Makefile <<-CF_EOF
31043
31044         .PHONY :        libs
31045         .PHONY :        lintlib
31046         .PHONY :        install.includes
31047         .PHONY :        uninstall.includes
31048         .PHONY :        install.libs
31049         .PHONY :        uninstall.libs
31050 CF_EOF
31051 fi
31052
31053 for cf_dir in $SRC_SUBDIRS
31054 do
31055         if test ! -d "$srcdir/$cf_dir" ; then
31056                 continue
31057         fi
31058
31059         if test -f "$cf_dir/Makefile" ; then
31060                 case "$cf_dir" in
31061                 (Ada95)
31062                         echo 'libs \' >> Makefile
31063                         echo 'install.libs \' >> Makefile
31064                         echo 'uninstall.libs ::' >> Makefile
31065                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31066                         ;;
31067                 esac
31068         fi
31069
31070         if test -f "$srcdir/$cf_dir/modules" ; then
31071
31072                 if test "x$cf_cv_make_PHONY" = xyes ; then
31073                         cat >> Makefile <<-CF_EOF
31074
31075                         .PHONY :        install.$cf_dir
31076                         .PHONY :        uninstall.$cf_dir
31077 CF_EOF
31078                 fi
31079
31080                 echo >> Makefile
31081                 if test -f "$srcdir/$cf_dir/headers" ; then
31082 cat >> Makefile <<CF_EOF
31083 install.includes \\
31084 uninstall.includes \\
31085 CF_EOF
31086                 fi
31087
31088 cat >> Makefile <<CF_EOF
31089 lint \\
31090 libs \\
31091 lintlib \\
31092 install.libs \\
31093 uninstall.libs \\
31094 install.$cf_dir \\
31095 uninstall.$cf_dir ::
31096         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31097 CF_EOF
31098         elif test -f "$srcdir/$cf_dir/headers" ; then
31099 cat >> Makefile <<CF_EOF
31100
31101 libs \\
31102 install.libs \\
31103 uninstall.libs \\
31104 install.includes \\
31105 uninstall.includes ::
31106         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31107 CF_EOF
31108 fi
31109 done
31110
31111 if test "x$cf_cv_make_PHONY" = xyes ; then
31112         cat >> Makefile <<-CF_EOF
31113
31114         .PHONY :        install.data
31115         .PHONY :        uninstall.data
31116 CF_EOF
31117 fi
31118
31119 if test "x$cf_with_db_install" = xyes; then
31120 cat >> Makefile <<CF_EOF
31121
31122 install.libs uninstall.libs \\
31123 install.data uninstall.data ::
31124 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31125 CF_EOF
31126 else
31127 cat >> Makefile <<CF_EOF
31128
31129 install.libs uninstall.libs ::
31130         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31131 CF_EOF
31132 fi
31133
31134 if test "x$cf_with_manpages" = xyes; then
31135
31136 if test "x$cf_cv_make_PHONY" = xyes ; then
31137         cat >> Makefile <<-CF_EOF
31138
31139         .PHONY :        install.man
31140         .PHONY :        uninstall.man
31141 CF_EOF
31142 fi
31143
31144 cat >> Makefile <<CF_EOF
31145
31146 install.man \\
31147 uninstall.man ::
31148         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31149 CF_EOF
31150 fi
31151
31152 cat >> Makefile <<CF_EOF
31153
31154 distclean ::
31155         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31156         rm -f headers.sh headers.sed mk_shared_lib.sh
31157         rm -f edit_man.* man_alias.*
31158         rm -rf \${DIRS_TO_MAKE}
31159 CF_EOF
31160
31161 rm -f headers.sed headers.sh
31162
31163 echo creating headers.sh
31164 cat >headers.sh <<CF_EOF
31165 #! $SHELL
31166 # This shell script is generated by the 'configure' script.  It is invoked in a
31167 # subdirectory of the build tree.  It generates a sed-script in the parent
31168 # directory that is used to adjust includes for header files that reside in a
31169 # subdirectory of /usr/include, etc.
31170 PRG=""
31171 while test \$# != 3
31172 do
31173 PRG="\$PRG \$1"; shift
31174 done
31175 DST=\$1
31176 REF=\$2
31177 SRC=\$3
31178 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31179 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31180 echo installing \$SRC in \$DST
31181 CF_EOF
31182
31183 if test "$WITH_CURSES_H" = yes; then
31184         cat >>headers.sh <<CF_EOF
31185 case \$DST in
31186 (/*/include/*)
31187         END=\`basename \$DST\`
31188         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31189         do
31190                 NAME=\`basename \$i\`
31191                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31192         done
31193         ;;
31194 (*)
31195         echo "" >> \$TMPSED
31196         ;;
31197 esac
31198 CF_EOF
31199
31200 else
31201         cat >>headers.sh <<CF_EOF
31202 case \$DST in
31203 (/*/include/*)
31204         END=\`basename \$DST\`
31205         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31206         do
31207                 NAME=\`basename \$i\`
31208                 if test "\$NAME" = "curses.h"
31209                 then
31210                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31211                         NAME=ncurses.h
31212                 fi
31213                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31214         done
31215         ;;
31216 (*)
31217         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31218         ;;
31219 esac
31220 CF_EOF
31221 fi
31222 cat >>headers.sh <<CF_EOF
31223 rm -f \$TMPSRC
31224 sed -f \$TMPSED \$SRC > \$TMPSRC
31225 NAME=\`basename \$SRC\`
31226 CF_EOF
31227 if test "$WITH_CURSES_H" != yes; then
31228         cat >>headers.sh <<CF_EOF
31229 test "\$NAME" = "curses.h" && NAME=ncurses.h
31230 CF_EOF
31231 fi
31232 cat >>headers.sh <<CF_EOF
31233 # Just in case someone gzip'd manpages, remove the conflicting copy.
31234 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31235
31236 eval \$PRG \$TMPSRC \$DST/\$NAME
31237 rm -f \$TMPSRC \$TMPSED
31238 CF_EOF
31239
31240 chmod 0755 headers.sh
31241
31242 for cf_dir in $SRC_SUBDIRS
31243 do
31244         if test ! -d "$srcdir/$cf_dir" ; then
31245                 continue
31246         fi
31247
31248         if test -f "$srcdir/$cf_dir/headers" ; then
31249                 $AWK -f "$srcdir/mk-hdr.awk" \
31250                         subset="$LIB_SUBSETS" \
31251                         compat="$WITH_CURSES_H" \
31252                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31253         fi
31254
31255         if test -f "$srcdir/$cf_dir/modules" ; then
31256                 if test "$cf_dir" != "c++" ; then
31257                         if test "x$cf_cv_make_PHONY" = xyes ; then
31258                                 cat >> $cf_dir/Makefile <<-CF_EOF
31259
31260                                 .PHONY :        depend
31261 CF_EOF
31262                         fi
31263
31264                         cat >>$cf_dir/Makefile <<"CF_EOF"
31265 depend : ${AUTO_SRC}
31266         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31267
31268 # DO NOT DELETE THIS LINE -- make depend depends on it.
31269 CF_EOF
31270                 fi
31271         fi
31272 done
31273
31274 if test "$MANPAGE_RENAMES" != no ; then
31275         # Construct a sed-script to perform renaming within man-pages
31276         test -n "$verbose" && echo "creating edit_man.sed"
31277         test ! -d man && mkdir man
31278         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31279 fi
31280
31281 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31282 if test -z "$USE_OLD_MAKERULES" ; then
31283         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31284 fi
31285 fi
31286  ;;
31287   esac
31288 done
31289 EOF
31290
31291 cat >>"$CONFIG_STATUS" <<\EOF
31292
31293 { (exit 0); exit 0; }
31294 EOF
31295 chmod +x "$CONFIG_STATUS"
31296 ac_clean_files=$ac_clean_files_save
31297
31298 # configure is writing to config.log, and then calls config.status.
31299 # config.status does its own redirection, appending to config.log.
31300 # Unfortunately, on DOS this fails, as config.log is still kept open
31301 # by configure, so config.status won't be able to write to it; its
31302 # output is simply discarded.  So we exec the FD to /dev/null,
31303 # effectively closing config.log, so it can be properly (re)opened and
31304 # appended to by config.status.  When coming back to configure, we
31305 # need to make the FD available again.
31306 if test "$no_create" != yes; then
31307   ac_cs_success=:
31308   exec 5>/dev/null
31309   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31310   exec 5>>config.log
31311   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31312   # would make configure fail if this is the last instruction.
31313   "$ac_cs_success" || { (exit 1); exit 1; }
31314 fi
31315 ${MAKE:-make} preinstall