]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
09733186648c776e0bbc5ceb8e756e6e5895c6fd
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.776 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20231210.
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  name ncurses*X-config file with X
729   --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD
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[=XXX]  suffix pkg-config files with XXX
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix=DESTDIR use DESTDIR as installation directory prefix
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[={rel|abi}] use release or ABI version in shared library file names
756   --with-libtool-opts[=XXX] give libtool additional options XXX
757   --with-export-syms[=SYM-FILE] limit symbols exported by libtool to those listed in SYM-FILE
758   --with-versioned-syms[=MAP-FILE] version ELF shared library symbols per MAP-FILE
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 X 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   --disable-widec         compile without wide character and UTF-8 support
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     obtain X11 color definitions from FILE (default: EPREFIX/lib/X11/rgb.txt)
799   --with-bool=TYPE        fall back to TYPE for curses 'bool' typedef
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    use signed chars for Boolean array 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   --disable-opaque-curses do not make WINDOW, etc., structures opaque
833   --disable-opaque-form   do not make form library structures opaque
834   --disable-opaque-menu   do not make menu library structures opaque
835   --disable-opaque-panel  do not 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-check-size     compile-in code to detect screensize of serial terminals
840   --enable-hard-tabs      compile with hard-tabs code
841   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
842 Experimental Code:
843   --disable-assumed-color do not assume anything about default-colors
844   --disable-hashmap       compile without hashmap scrolling-optimization
845   --enable-colorfgbg      compile-in experimental $COLORFGBG code
846   --enable-fvisibility    compile with -fvisibility=hidden
847   --enable-interop        compile-in interop bindings
848   --enable-safe-sprintf   compile with experimental safe-sprintf code
849   --disable-scroll-hints  compile without scroll-hints code
850   --enable-wgetch-events  compile with wgetch-events code
851   --enable-exp-win32      compile with experimental-Windows driver
852 Testing/development Options:
853   --disable-echo          do not display "compiling" commands
854   --disable-stripping     do not strip (debug info) installed executables
855   --with-strip-program=XX specify program to use when stripping in install
856   --enable-warnings       test: turn on gcc compiler warnings
857   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
858   --enable-string-hacks   work around bogus compiler/loader warnings
859   --enable-assertions     test: turn on generation of assertion code
860   --with-dmalloc          test: use Gray Watson's dmalloc library
861   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
862   --with-valgrind         test: use valgrind
863   --disable-leaks         test: free permanent memory, analyze leaks
864   --enable-expanded       test: generate functions for certain macros
865   --disable-macros        test: use functions rather than macros
866   --with-trace            test: add trace() function to all models of ncurses
867   --disable-gnat-projects test: disable GNAT projects even if usable
868 Ada Binding Options:
869   --with-ada-compiler[=CMD] use CMD as Ada95 compiler (default: gnatmake)
870   --with-ada-include=DIR  find Ada95 includes in DIR (default: PREFIX/share/ada/adainclude)
871   --with-ada-objects=DIR  find Ada95 objects in DIR (default: PREFIX/lib/ada/adalib)
872   --with-ada-sharedlib    build Ada95 shared library; requires GNAT project support
873   --with-ada-libname[=XXX]  use XXX as Ada95 library name
874 Library basenames for pkgsrc:
875   --with-form-libname[=XXX] override ifelse(,,form,) basename of library
876   --with-menu-libname[=XXX] override ifelse(,,menu,) basename of library
877   --with-panel-libname[=XXX] override ifelse(,,panel,) basename of library
878   --with-cxx-libname[=XXX] override ifelse(ncurses++,,cxx,ncurses++) basename of library
879
880 Some influential environment variables:
881   CC          C compiler command
882   CFLAGS      C compiler flags
883   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
884               nonstandard directory <lib dir>
885   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
886               headers in a nonstandard directory <include dir>
887   CPP         C preprocessor
888   CXX         C++ compiler command
889   CXXFLAGS    C++ compiler flags
890   CXXCPP      C++ preprocessor
891
892 Use these variables to override the choices made by `configure' or to help
893 it to find libraries and programs with nonstandard names/locations.
894
895 EOF
896 fi
897
898 if test "$ac_init_help" = "recursive"; then
899   # If there are subdirs, report their specific --help.
900   ac_popdir=`pwd`
901   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
902     cd "$ac_subdir"
903     # A "../" for each directory in /$ac_subdir.
904     ac_dots=`echo "$ac_subdir" |
905              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
906
907     case "$srcdir" in
908     .) # No --srcdir option.  We are building in place.
909       ac_sub_srcdir="$srcdir" ;;
910     [\\/]* | ?:[\\/]* ) # Absolute path.
911       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
912     *) # Relative path.
913       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
914     esac
915
916     # Check for guested configure; otherwise get Cygnus style configure.
917     if test -f "$ac_sub_srcdir/configure.gnu"; then
918       echo
919       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
920     elif test -f "$ac_sub_srcdir/configure"; then
921       echo
922       $SHELL "$ac_sub_srcdir/configure" --help=recursive
923     elif test -f "$ac_sub_srcdir/configure.ac" ||
924            test -f "$ac_sub_srcdir/configure.in"; then
925       echo
926       "$ac_configure" --help
927     else
928       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
929     fi
930     cd "$ac_popdir"
931   done
932 fi
933
934 test -n "$ac_init_help" && exit 0
935 if "$ac_init_version"; then
936   cat <<\EOF
937
938 Copyright 2003-2022,2023        Thomas E. Dickey
939 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
940 Free Software Foundation, Inc.
941 This configure script is free software; the Free Software Foundation
942 gives unlimited permission to copy, distribute and modify it.
943 EOF
944   exit 0
945 fi
946 exec 5>config.log
947 cat >&5 <<EOF
948 This file contains any messages produced by compilers while
949 running configure, to aid debugging if configure makes a mistake.
950
951 It was created by $as_me, which was
952 generated by GNU Autoconf 2.52.20231210.  Invocation command line was
953
954   $ $0 $@
955
956 EOF
957 {
958 cat <<_ASUNAME
959 ## ---------- ##
960 ## Platform.  ##
961 ## ---------- ##
962
963 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
964 uname -m = `(uname -m) 2>/dev/null || echo unknown`
965 uname -r = `(uname -r) 2>/dev/null || echo unknown`
966 uname -s = `(uname -s) 2>/dev/null || echo unknown`
967 uname -v = `(uname -v) 2>/dev/null || echo unknown`
968
969 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
970 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
971
972 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
973 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
974 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
975 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
976 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
977 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
978 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
979
980 PATH = $PATH
981
982 _ASUNAME
983 } >&5
984
985 cat >&5 <<EOF
986 ## ------------ ##
987 ## Core tests.  ##
988 ## ------------ ##
989
990 EOF
991
992 # Keep a trace of the command line.
993 # Strip out --no-create and --no-recursion so they do not pile up.
994 # Also quote any args containing shell meta-characters.
995 ac_configure_args=
996 ac_sep=
997 for ac_arg
998 do
999   case "$ac_arg" in
1000   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1001   | --no-cr | --no-c) ;;
1002   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1003   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1004   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1005     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1006     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1007     ac_sep=" " ;;
1008   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1009      ac_sep=" " ;;
1010   esac
1011   # Get rid of the leading space.
1012 done
1013
1014 # When interrupted or exit'd, cleanup temporary files, and complete
1015 # config.log.  We remove comments because anyway the quotes in there
1016 # would cause problems or look ugly.
1017 trap 'exit_status=$?
1018   # Save into config.log some information that might help in debugging.
1019   echo >&5
1020   echo "## ----------------- ##" >&5
1021   echo "## Cache variables.  ##" >&5
1022   echo "## ----------------- ##" >&5
1023   echo >&5
1024   # The following way of writing the cache mishandles newlines in values,
1025 {
1026   (set) 2>&1 |
1027     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1028     *ac_space=\ *)
1029       sed -n \
1030         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1031           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1032       ;;
1033     *)
1034       sed -n \
1035         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1036       ;;
1037     esac;
1038 } >&5
1039   sed "/^$/d" confdefs.h >conftest.log
1040   if test -s conftest.log; then
1041     echo >&5
1042     echo "## ------------ ##" >&5
1043     echo "## confdefs.h.  ##" >&5
1044     echo "## ------------ ##" >&5
1045     echo >&5
1046     cat conftest.log >&5
1047   fi
1048   (echo; echo) >&5
1049   test "$ac_signal" != 0 &&
1050     echo "$as_me: caught signal $ac_signal" >&5
1051   echo "$as_me: exit $exit_status" >&5
1052   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1053     exit $exit_status
1054      ' 0
1055 for ac_signal in 1 2 13 15; do
1056   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1057 done
1058 ac_signal=0
1059
1060 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1061 rm -rf conftest* confdefs.h
1062 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1063 echo >confdefs.h
1064
1065 # Let the site file select an alternate cache file if it wants to.
1066 # Prefer explicitly selected file to automatically selected ones.
1067 if test -z "$CONFIG_SITE"; then
1068   if test "x$prefix" != xNONE; then
1069     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1070   else
1071     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1072   fi
1073 fi
1074 for ac_site_file in $CONFIG_SITE; do
1075   if test -r "$ac_site_file"; then
1076     { echo "$as_me:1076: loading site script $ac_site_file" >&5
1077 echo "$as_me: loading site script $ac_site_file" >&6;}
1078     cat "$ac_site_file" >&5
1079     . "$ac_site_file"
1080   fi
1081 done
1082
1083 if test -r "$cache_file"; then
1084   # Some versions of bash will fail to source /dev/null (special
1085   # files actually), so we avoid doing that.
1086   if test -f "$cache_file"; then
1087     { echo "$as_me:1087: loading cache $cache_file" >&5
1088 echo "$as_me: loading cache $cache_file" >&6;}
1089     case $cache_file in
1090       [\\/]* | ?:[\\/]* ) . $cache_file;;
1091       *)                      . ./$cache_file;;
1092     esac
1093   fi
1094 else
1095   { echo "$as_me:1095: creating cache $cache_file" >&5
1096 echo "$as_me: creating cache $cache_file" >&6;}
1097   >$cache_file
1098 fi
1099
1100 # Check that the precious variables saved in the cache have kept the same
1101 # value.
1102 ac_cache_corrupted=false
1103 for ac_var in `(set) 2>&1 |
1104                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1105   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1106   eval ac_new_set=\$ac_env_${ac_var}_set
1107   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1108   eval ac_new_val="\$ac_env_${ac_var}_value"
1109   case "$ac_old_set,$ac_new_set" in
1110     set,)
1111       { echo "$as_me:1111: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1112 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1113       ac_cache_corrupted=: ;;
1114     ,set)
1115       { echo "$as_me:1115: error: \`$ac_var' was not set in the previous run" >&5
1116 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1117       ac_cache_corrupted=: ;;
1118     ,);;
1119     *)
1120       if test "x$ac_old_val" != "x$ac_new_val"; then
1121         { echo "$as_me:1121: error: \`$ac_var' has changed since the previous run:" >&5
1122 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1123         { echo "$as_me:1123:   former value:  $ac_old_val" >&5
1124 echo "$as_me:   former value:  $ac_old_val" >&2;}
1125         { echo "$as_me:1125:   current value: $ac_new_val" >&5
1126 echo "$as_me:   current value: $ac_new_val" >&2;}
1127         ac_cache_corrupted=:
1128       fi;;
1129   esac
1130   # Pass precious variables to config.status.  It doesn't matter if
1131   # we pass some twice (in addition to the command line arguments).
1132   if test "$ac_new_set" = set; then
1133     case "$ac_new_val" in
1134     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1135       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1136       ac_configure_args="$ac_configure_args '$ac_arg'"
1137       ;;
1138     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1139        ;;
1140     esac
1141   fi
1142 done
1143 if "$ac_cache_corrupted"; then
1144   { echo "$as_me:1144: error: changes in the environment can compromise the build" >&5
1145 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1146   { { echo "$as_me:1146: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1147 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1148    { (exit 1); exit 1; }; }
1149 fi
1150
1151 ac_ext=c
1152 ac_cpp='$CPP $CPPFLAGS'
1153 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1154 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1155 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1156 ac_main_return="return"
1157
1158 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1159   *c*,-n*) ECHO_N=
1160            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1161            ECHO_T='     '
1162            ;;
1163   *c*,*  ) ECHO_N=-n
1164            ECHO_C=
1165            ECHO_T=
1166            ;;
1167   *)       ECHO_N=
1168            ECHO_C='\c'
1169            ECHO_T=
1170            ;;
1171 esac
1172 echo "#! $SHELL" >conftest.sh
1173 echo  "exit 0"   >>conftest.sh
1174 chmod +x conftest.sh
1175 if { (echo "$as_me:1175: PATH=\".;.\"; conftest.sh") >&5
1176   (PATH=".;."; conftest.sh) 2>&5
1177   ac_status=$?
1178   echo "$as_me:1178: \$? = $ac_status" >&5
1179   (exit "$ac_status"); }; then
1180   ac_path_separator=';'
1181 else
1182   ac_path_separator=:
1183 fi
1184 PATH_SEPARATOR="$ac_path_separator"
1185 rm -f conftest.sh
1186
1187 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1188
1189 top_builddir=`pwd`
1190
1191 for ac_prog in ggrep grep
1192 do
1193   # Extract the first word of "$ac_prog", so it can be a program name with args.
1194 set dummy $ac_prog; ac_word=$2
1195 echo "$as_me:1195: checking for $ac_word" >&5
1196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1197 if test "${ac_cv_prog_GREP+set}" = set; then
1198   echo $ECHO_N "(cached) $ECHO_C" >&6
1199 else
1200   if test -n "$GREP"; then
1201   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1202 else
1203   ac_save_IFS=$IFS; IFS=$ac_path_separator
1204 ac_dummy="$PATH"
1205 for ac_dir in $ac_dummy; do
1206   IFS=$ac_save_IFS
1207   test -z "$ac_dir" && ac_dir=.
1208   $as_executable_p "$ac_dir/$ac_word" || continue
1209 ac_cv_prog_GREP="$ac_prog"
1210 echo "$as_me:1210: found $ac_dir/$ac_word" >&5
1211 break
1212 done
1213
1214 fi
1215 fi
1216 GREP=$ac_cv_prog_GREP
1217 if test -n "$GREP"; then
1218   echo "$as_me:1218: result: $GREP" >&5
1219 echo "${ECHO_T}$GREP" >&6
1220 else
1221   echo "$as_me:1221: result: no" >&5
1222 echo "${ECHO_T}no" >&6
1223 fi
1224
1225   test -n "$GREP" && break
1226 done
1227 test -n "$GREP" || GREP=": "
1228
1229 echo "$as_me:1229: checking for egrep" >&5
1230 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1231 if test "${ac_cv_path_EGREP+set}" = set; then
1232   echo $ECHO_N "(cached) $ECHO_C" >&6
1233 else
1234   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1235    then ac_cv_path_EGREP="$GREP -E"
1236    else
1237      for ac_prog in gegrep egrep
1238 do
1239   # Extract the first word of "$ac_prog", so it can be a program name with args.
1240 set dummy $ac_prog; ac_word=$2
1241 echo "$as_me:1241: checking for $ac_word" >&5
1242 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1243 if test "${ac_cv_path_EGREP+set}" = set; then
1244   echo $ECHO_N "(cached) $ECHO_C" >&6
1245 else
1246   case $EGREP in
1247   [\\/]* | ?:[\\/]*)
1248   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1249   ;;
1250   *)
1251   ac_save_IFS=$IFS; IFS=$ac_path_separator
1252 ac_dummy="$PATH"
1253 for ac_dir in $ac_dummy; do
1254   IFS=$ac_save_IFS
1255   test -z "$ac_dir" && ac_dir=.
1256   if $as_executable_p "$ac_dir/$ac_word"; then
1257    ac_cv_path_EGREP="$ac_dir/$ac_word"
1258    echo "$as_me:1258: found $ac_dir/$ac_word" >&5
1259    break
1260 fi
1261 done
1262
1263   ;;
1264 esac
1265 fi
1266 EGREP=$ac_cv_path_EGREP
1267
1268 if test -n "$EGREP"; then
1269   echo "$as_me:1269: result: $EGREP" >&5
1270 echo "${ECHO_T}$EGREP" >&6
1271 else
1272   echo "$as_me:1272: result: no" >&5
1273 echo "${ECHO_T}no" >&6
1274 fi
1275
1276   test -n "$EGREP" && break
1277 done
1278 test -n "$EGREP" || EGREP=": "
1279
1280      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1280: error: cannot find workable egrep" >&5
1281 echo "$as_me: error: cannot find workable egrep" >&2;}
1282    { (exit 1); exit 1; }; }
1283    fi
1284 fi
1285 echo "$as_me:1285: result: $ac_cv_path_EGREP" >&5
1286 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1287  EGREP="$ac_cv_path_EGREP"
1288
1289 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1290 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1291 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1292 cf_cv_abi_version=${NCURSES_MAJOR}
1293 cf_cv_abi_default=${NCURSES_MAJOR}
1294 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1295 cf_cv_timestamp=`date`
1296 echo "$as_me:1296: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&5
1297 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&6
1298
1299 if test -f "$srcdir/VERSION" ; then
1300         echo "$as_me:1300: checking for package version" >&5
1301 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1302
1303         # if there are not enough fields, cut returns the last one...
1304         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1305         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1306         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1307
1308         # this is how CF_BUNDLED_INTL uses $VERSION:
1309         VERSION="$cf_field1"
1310
1311         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1312         test -z "$VERSION_MAJOR" && { { echo "$as_me:1312: error: missing major-version" >&5
1313 echo "$as_me: error: missing major-version" >&2;}
1314    { (exit 1); exit 1; }; }
1315
1316         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1317         test -z "$VERSION_MINOR" && { { echo "$as_me:1317: error: missing minor-version" >&5
1318 echo "$as_me: error: missing minor-version" >&2;}
1319    { (exit 1); exit 1; }; }
1320
1321         echo "$as_me:1321: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1322 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1323
1324         echo "$as_me:1324: checking for package patch date" >&5
1325 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1326         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1327         case .$VERSION_PATCH in
1328         (.)
1329                 { { echo "$as_me:1329: error: missing patch-date $VERSION_PATCH" >&5
1330 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1331    { (exit 1); exit 1; }; }
1332                 ;;
1333         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1334                 ;;
1335         (*)
1336                 { { echo "$as_me:1336: error: illegal patch-date $VERSION_PATCH" >&5
1337 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1338    { (exit 1); exit 1; }; }
1339                 ;;
1340         esac
1341         echo "$as_me:1341: result: $VERSION_PATCH" >&5
1342 echo "${ECHO_T}$VERSION_PATCH" >&6
1343 else
1344         { { echo "$as_me:1344: error: did not find $srcdir/VERSION" >&5
1345 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1346    { (exit 1); exit 1; }; }
1347 fi
1348
1349 # show the actual data that we have for versions:
1350 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1351
1352 echo "${as_me:-configure}:1352: testing ABI VERSION $VERSION ..." 1>&5
1353
1354 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1355
1356 echo "${as_me:-configure}:1356: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1357
1358 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1359
1360 echo "${as_me:-configure}:1360: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1361
1362 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1363
1364 echo "${as_me:-configure}:1364: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1365
1366         cf_PACKAGE=NCURSES
1367         PACKAGE=ncurses
1368
1369 cat >>confdefs.h <<EOF
1370 #define PACKAGE "$PACKAGE"
1371 EOF
1372
1373 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1374
1375         cat >>confdefs.h <<EOF
1376 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1377 EOF
1378
1379         cat >>confdefs.h <<EOF
1380 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1381 EOF
1382
1383 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1384
1385 # Check whether --with-rel-version or --without-rel-version was given.
1386 if test "${with_rel_version+set}" = set; then
1387   withval="$with_rel_version"
1388   { echo "$as_me:1388: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1389 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1390  cf_cv_rel_version=$withval
1391 fi;
1392
1393  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1394  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1395  test -n "NCURSES_MINOR" || NCURSES_MINOR=0
1396
1397 if test -n "$NCURSES_MAJOR" ; then
1398   case `echo "$NCURSES_MAJOR" | sed -e 's/^[0-9]*$/0/g'` in
1399   (0)
1400         ;;
1401   (*)
1402         { { echo "$as_me:1402: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1403 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1404    { (exit 1); exit 1; }; }
1405         ;;
1406   esac
1407 else
1408   { { echo "$as_me:1408: error: Release major-version value is empty" >&5
1409 echo "$as_me: error: Release major-version value is empty" >&2;}
1410    { (exit 1); exit 1; }; }
1411 fi
1412
1413 if test -n "$NCURSES_MINOR" ; then
1414   case `echo "$NCURSES_MINOR" | sed -e 's/^[0-9]*$/0/g'` in
1415   (0)
1416         ;;
1417   (*)
1418         { { echo "$as_me:1418: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1419 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1420    { (exit 1); exit 1; }; }
1421         ;;
1422   esac
1423 else
1424   { { echo "$as_me:1424: error: Release minor-version value is empty" >&5
1425 echo "$as_me: error: Release minor-version value is empty" >&2;}
1426    { (exit 1); exit 1; }; }
1427 fi
1428
1429 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1430
1431 # Check whether --with-abi-version or --without-abi-version was given.
1432 if test "${with_abi_version+set}" = set; then
1433   withval="$with_abi_version"
1434
1435         if test "x$cf_cv_abi_version" != "x$withval"
1436         then
1437                 { echo "$as_me:1437: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1438 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1439                 case "$cf_cv_rel_version" in
1440                 (5.*)
1441                         cf_cv_rel_version=$withval.0
1442                         ;;
1443                 (6.*)
1444                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1445                         ;;
1446                 esac
1447         fi
1448         cf_cv_abi_version=$withval
1449 fi;
1450
1451 if test -n "$cf_cv_abi_version" ; then
1452   case `echo "$cf_cv_abi_version" | sed -e 's/^[0-9]*$/0/g'` in
1453   (0)
1454         ;;
1455   (*)
1456         { { echo "$as_me:1456: error: ABI version is not a number: $cf_cv_abi_version" >&5
1457 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1458    { (exit 1); exit 1; }; }
1459         ;;
1460   esac
1461 else
1462   { { echo "$as_me:1462: error: ABI version value is empty" >&5
1463 echo "$as_me: error: ABI version value is empty" >&2;}
1464    { (exit 1); exit 1; }; }
1465 fi
1466
1467 cf_cv_abi_default=$cf_cv_abi_version
1468
1469 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1470 then
1471         case "$cf_cv_rel_version" in
1472         (5.*)
1473                 cf_cv_rel_version=$with_abi_version.0
1474                 ;;
1475         esac
1476 fi
1477
1478 ac_aux_dir=
1479 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1480   if test -f "$ac_dir/install-sh"; then
1481     ac_aux_dir=$ac_dir
1482     ac_install_sh="$ac_aux_dir/install-sh -c"
1483     break
1484   elif test -f "$ac_dir/install.sh"; then
1485     ac_aux_dir=$ac_dir
1486     ac_install_sh="$ac_aux_dir/install.sh -c"
1487     break
1488   elif test -f "$ac_dir/shtool"; then
1489     ac_aux_dir=$ac_dir
1490     ac_install_sh="$ac_aux_dir/shtool install -c"
1491     break
1492   fi
1493 done
1494 if test -z "$ac_aux_dir"; then
1495   { { echo "$as_me:1495: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1496 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1497    { (exit 1); exit 1; }; }
1498 fi
1499 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1500 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1501 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1502
1503 # Make sure we can run config.sub.
1504 $ac_config_sub sun4 >/dev/null 2>&1 ||
1505   { { echo "$as_me:1505: error: cannot run $ac_config_sub" >&5
1506 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1507    { (exit 1); exit 1; }; }
1508
1509 echo "$as_me:1509: checking build system type" >&5
1510 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1511 if test "${ac_cv_build+set}" = set; then
1512   echo $ECHO_N "(cached) $ECHO_C" >&6
1513 else
1514   ac_cv_build_alias=$build_alias
1515 test -z "$ac_cv_build_alias" &&
1516   ac_cv_build_alias=`$ac_config_guess`
1517 test -z "$ac_cv_build_alias" &&
1518   { { echo "$as_me:1518: error: cannot guess build type; you must specify one" >&5
1519 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1520    { (exit 1); exit 1; }; }
1521 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1522   { { echo "$as_me:1522: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1523 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1524    { (exit 1); exit 1; }; }
1525
1526 fi
1527 echo "$as_me:1527: result: $ac_cv_build" >&5
1528 echo "${ECHO_T}$ac_cv_build" >&6
1529 build=$ac_cv_build
1530 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1531 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1532 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1533
1534 echo "$as_me:1534: checking host system type" >&5
1535 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1536 if test "${ac_cv_host+set}" = set; then
1537   echo $ECHO_N "(cached) $ECHO_C" >&6
1538 else
1539   ac_cv_host_alias=$host_alias
1540 test -z "$ac_cv_host_alias" &&
1541   ac_cv_host_alias=$ac_cv_build_alias
1542 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1543   { { echo "$as_me:1543: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1544 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1545    { (exit 1); exit 1; }; }
1546
1547 fi
1548 echo "$as_me:1548: result: $ac_cv_host" >&5
1549 echo "${ECHO_T}$ac_cv_host" >&6
1550 host=$ac_cv_host
1551 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1552 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1553 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1554
1555 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1556         echo "$as_me:1556: checking target system type" >&5
1557 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1558 if test "${ac_cv_target+set}" = set; then
1559   echo $ECHO_N "(cached) $ECHO_C" >&6
1560 else
1561   ac_cv_target_alias=$target_alias
1562 test "x$ac_cv_target_alias" = "x" &&
1563   ac_cv_target_alias=$ac_cv_host_alias
1564 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1565   { { echo "$as_me:1565: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1566 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1567    { (exit 1); exit 1; }; }
1568
1569 fi
1570 echo "$as_me:1570: result: $ac_cv_target" >&5
1571 echo "${ECHO_T}$ac_cv_target" >&6
1572 target=$ac_cv_target
1573 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1574 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1575 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1576
1577 # The aliases save the names the user supplied, while $host etc.
1578 # will get canonicalized.
1579 test -n "$target_alias" &&
1580   test "$program_prefix$program_suffix$program_transform_name" = \
1581     NONENONEs,x,x, &&
1582   program_prefix=${target_alias}-
1583         system_name="$host_os"
1584 else
1585         system_name="`(uname -s -r) 2>/dev/null`"
1586         if test -z "$system_name" ; then
1587                 system_name="`(hostname) 2>/dev/null`"
1588         fi
1589 fi
1590 test -n "$system_name" &&
1591 cat >>confdefs.h <<EOF
1592 #define SYSTEM_NAME "$system_name"
1593 EOF
1594
1595 if test "${cf_cv_system_name+set}" = set; then
1596   echo $ECHO_N "(cached) $ECHO_C" >&6
1597 else
1598   cf_cv_system_name="$system_name"
1599 fi
1600
1601 test -z "$system_name" && system_name="$cf_cv_system_name"
1602 test -n "$cf_cv_system_name" && echo "$as_me:1602: result: Configuring for $cf_cv_system_name" >&5
1603 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1604
1605 if test ".$system_name" != ".$cf_cv_system_name" ; then
1606         echo "$as_me:1606: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1607 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1608         { { echo "$as_me:1608: error: \"Please remove config.cache and try again.\"" >&5
1609 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1610    { (exit 1); exit 1; }; }
1611 fi
1612
1613 # Check whether --with-system-type or --without-system-type was given.
1614 if test "${with_system_type+set}" = set; then
1615   withval="$with_system_type"
1616   { echo "$as_me:1616: WARNING: overriding system type to $withval" >&5
1617 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1618         cf_cv_system_name=$withval
1619         host_os=$withval
1620
1621 fi;
1622
1623 ###     Save the given $CFLAGS to allow user-override.
1624 cf_user_CFLAGS="$CFLAGS"
1625
1626 ###     Default install-location
1627 echo "$as_me:1627: checking for fgrep" >&5
1628 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1629 if test "${ac_cv_path_FGREP+set}" = set; then
1630   echo $ECHO_N "(cached) $ECHO_C" >&6
1631 else
1632   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1633    then ac_cv_path_FGREP="$GREP -F"
1634    else
1635      for ac_prog in gfgrep fgrep
1636 do
1637   # Extract the first word of "$ac_prog", so it can be a program name with args.
1638 set dummy $ac_prog; ac_word=$2
1639 echo "$as_me:1639: checking for $ac_word" >&5
1640 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1641 if test "${ac_cv_path_FGREP+set}" = set; then
1642   echo $ECHO_N "(cached) $ECHO_C" >&6
1643 else
1644   case $FGREP in
1645   [\\/]* | ?:[\\/]*)
1646   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1647   ;;
1648   *)
1649   ac_save_IFS=$IFS; IFS=$ac_path_separator
1650 ac_dummy="$PATH"
1651 for ac_dir in $ac_dummy; do
1652   IFS=$ac_save_IFS
1653   test -z "$ac_dir" && ac_dir=.
1654   if $as_executable_p "$ac_dir/$ac_word"; then
1655    ac_cv_path_FGREP="$ac_dir/$ac_word"
1656    echo "$as_me:1656: found $ac_dir/$ac_word" >&5
1657    break
1658 fi
1659 done
1660
1661   ;;
1662 esac
1663 fi
1664 FGREP=$ac_cv_path_FGREP
1665
1666 if test -n "$FGREP"; then
1667   echo "$as_me:1667: result: $FGREP" >&5
1668 echo "${ECHO_T}$FGREP" >&6
1669 else
1670   echo "$as_me:1670: result: no" >&5
1671 echo "${ECHO_T}no" >&6
1672 fi
1673
1674   test -n "$FGREP" && break
1675 done
1676 test -n "$FGREP" || FGREP=": "
1677
1678      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1678: error: cannot find workable fgrep" >&5
1679 echo "$as_me: error: cannot find workable fgrep" >&2;}
1680    { (exit 1); exit 1; }; }
1681    fi
1682 fi
1683 echo "$as_me:1683: result: $ac_cv_path_FGREP" >&5
1684 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1685  FGREP="$ac_cv_path_FGREP"
1686
1687 echo "$as_me:1687: checking for prefix" >&5
1688 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1689 if test "x$prefix" = "xNONE" ; then
1690         case "$cf_cv_system_name" in
1691                 # non-vendor systems don't have a conflict
1692         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1693                 prefix=/usr
1694                 ;;
1695         (*)     prefix=$ac_default_prefix
1696                 ;;
1697         esac
1698 fi
1699 echo "$as_me:1699: result: $prefix" >&5
1700 echo "${ECHO_T}$prefix" >&6
1701
1702 if test "x$prefix" = "xNONE" ; then
1703 echo "$as_me:1703: checking for default include-directory" >&5
1704 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1705 test -n "$verbose" && echo 1>&6
1706 for cf_symbol in \
1707         "$includedir" \
1708         "$includedir/ncurses" \
1709         "$prefix/include" \
1710         "$prefix/include/ncurses" \
1711         /usr/local/include \
1712         /usr/local/include/ncurses \
1713         /usr/include \
1714         /usr/include/ncurses
1715 do
1716         cf_dir=`eval echo "$cf_symbol"`
1717         if test -f "$cf_dir/curses.h" ; then
1718         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1719                 includedir="$cf_symbol"
1720                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1721                 break
1722         fi
1723         fi
1724         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1725 done
1726 echo "$as_me:1726: result: $includedir" >&5
1727 echo "${ECHO_T}$includedir" >&6
1728 fi
1729
1730 ### Defaults for ncurses ABI
1731
1732 # ABI 5 defaults:
1733 cf_dft_ccharw_max=5
1734 cf_dft_chtype=auto
1735 cf_dft_ext_colors=no
1736 cf_dft_ext_const=no
1737 cf_dft_ext_mouse=no
1738 cf_dft_ext_putwin=no
1739 cf_dft_ext_spfuncs=no
1740 cf_dft_filter_syms=no
1741 cf_dft_interop=no
1742 cf_dft_mmask_t=auto
1743 cf_dft_opaque_curses=no
1744 cf_dft_ordinate_type=short
1745 cf_dft_signed_char=no
1746 cf_dft_tparm_arg=long
1747 cf_dft_widec=no
1748 cf_dft_with_lp64=no
1749
1750 # ABI 6 default differences from ABI 5:
1751 case x$cf_cv_abi_default in
1752 (x[6789])
1753         cf_dft_chtype=uint32_t
1754         cf_dft_ext_colors=yes
1755         cf_dft_ext_const=yes
1756         cf_dft_ext_mouse=yes
1757         cf_dft_ext_putwin=yes
1758         cf_dft_ext_spfuncs=yes
1759         cf_dft_filter_syms=yes
1760         cf_dft_interop=yes
1761         cf_dft_mmask_t=uint32_t
1762         cf_dft_opaque_curses=yes
1763         cf_dft_tparm_arg=intptr_t
1764         cf_dft_widec=yes
1765         cf_dft_with_lp64=yes
1766         ;;
1767 esac
1768
1769 # ABI 7 default differences from ABI 6:
1770 case x$cf_cv_abi_default in
1771 (x[789])
1772         cf_dft_ccharw_max=6
1773         cf_dft_mmask_t=uint64_t
1774         cf_dft_ordinate_type=int
1775         cf_dft_signed_char=yes
1776         # also: remove the wgetch-events feature in ABI 7
1777         ;;
1778 esac
1779
1780 ### override ABI version, e.g., packagers
1781
1782 # Check whether --with-abi-altered or --without-abi-altered was given.
1783 if test "${with_abi_altered+set}" = set; then
1784   withval="$with_abi_altered"
1785
1786 if test -n "$withval" ; then
1787   case `echo "$withval" | sed -e 's/^[0-9]*$/0/g'` in
1788   (0)
1789         ;;
1790   (*)
1791         { { echo "$as_me:1791: error: ABI altered is not a number: $withval" >&5
1792 echo "$as_me: error: ABI altered is not a number: $withval" >&2;}
1793    { (exit 1); exit 1; }; }
1794         ;;
1795   esac
1796 else
1797   { { echo "$as_me:1797: error: ABI altered value is empty" >&5
1798 echo "$as_me: error: ABI altered value is empty" >&2;}
1799    { (exit 1); exit 1; }; }
1800 fi
1801
1802         if test "$cf_cv_abi_version" != "$withval"
1803         then
1804                 { echo "$as_me:1804: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&5
1805 echo "$as_me: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&2;}
1806                 cf_cv_abi_version=$withval
1807         fi
1808
1809 fi;
1810
1811 ###     Checks for programs.
1812
1813 # Check whether --with-ada or --without-ada was given.
1814 if test "${with_ada+set}" = set; then
1815   withval="$with_ada"
1816   cf_with_ada=$withval
1817 else
1818   cf_with_ada=yes
1819 fi;
1820
1821 if test "x$cf_with_ada" = xyes
1822 then
1823         cf_prog_cc="gnatgcc gcc cc"
1824 else
1825         cf_prog_cc="gcc cc"
1826 fi
1827
1828 ac_ext=c
1829 ac_cpp='$CPP $CPPFLAGS'
1830 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1831 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1832 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1833 ac_main_return="return"
1834 if test -n "$ac_tool_prefix"; then
1835   for ac_prog in $cf_prog_cc
1836   do
1837     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1838 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1839 echo "$as_me:1839: checking for $ac_word" >&5
1840 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1841 if test "${ac_cv_prog_CC+set}" = set; then
1842   echo $ECHO_N "(cached) $ECHO_C" >&6
1843 else
1844   if test -n "$CC"; then
1845   ac_cv_prog_CC="$CC" # Let the user override the test.
1846 else
1847   ac_save_IFS=$IFS; IFS=$ac_path_separator
1848 ac_dummy="$PATH"
1849 for ac_dir in $ac_dummy; do
1850   IFS=$ac_save_IFS
1851   test -z "$ac_dir" && ac_dir=.
1852   $as_executable_p "$ac_dir/$ac_word" || continue
1853 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1854 echo "$as_me:1854: found $ac_dir/$ac_word" >&5
1855 break
1856 done
1857
1858 fi
1859 fi
1860 CC=$ac_cv_prog_CC
1861 if test -n "$CC"; then
1862   echo "$as_me:1862: result: $CC" >&5
1863 echo "${ECHO_T}$CC" >&6
1864 else
1865   echo "$as_me:1865: result: no" >&5
1866 echo "${ECHO_T}no" >&6
1867 fi
1868
1869     test -n "$CC" && break
1870   done
1871 fi
1872 if test -z "$CC"; then
1873   ac_ct_CC=$CC
1874   for ac_prog in $cf_prog_cc
1875 do
1876   # Extract the first word of "$ac_prog", so it can be a program name with args.
1877 set dummy $ac_prog; ac_word=$2
1878 echo "$as_me:1878: checking for $ac_word" >&5
1879 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1880 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1881   echo $ECHO_N "(cached) $ECHO_C" >&6
1882 else
1883   if test -n "$ac_ct_CC"; then
1884   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1885 else
1886   ac_save_IFS=$IFS; IFS=$ac_path_separator
1887 ac_dummy="$PATH"
1888 for ac_dir in $ac_dummy; do
1889   IFS=$ac_save_IFS
1890   test -z "$ac_dir" && ac_dir=.
1891   $as_executable_p "$ac_dir/$ac_word" || continue
1892 ac_cv_prog_ac_ct_CC="$ac_prog"
1893 echo "$as_me:1893: found $ac_dir/$ac_word" >&5
1894 break
1895 done
1896
1897 fi
1898 fi
1899 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1900 if test -n "$ac_ct_CC"; then
1901   echo "$as_me:1901: result: $ac_ct_CC" >&5
1902 echo "${ECHO_T}$ac_ct_CC" >&6
1903 else
1904   echo "$as_me:1904: result: no" >&5
1905 echo "${ECHO_T}no" >&6
1906 fi
1907
1908   test -n "$ac_ct_CC" && break
1909 done
1910
1911   CC=$ac_ct_CC
1912 fi
1913
1914 test -z "$CC" && { { echo "$as_me:1914: error: no acceptable cc found in \$PATH" >&5
1915 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1916    { (exit 1); exit 1; }; }
1917
1918 # Provide some information about the compiler.
1919 echo "$as_me:1919:" \
1920      "checking for C compiler version" >&5
1921 ac_compiler=`set X $ac_compile; echo "$2"`
1922 { (eval echo "$as_me:1922: \"$ac_compiler --version </dev/null >&5\"") >&5
1923   (eval $ac_compiler --version </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 { (eval echo "$as_me:1932: \"$ac_compiler -V </dev/null >&5\"") >&5
1933   (eval $ac_compiler -V </dev/null >&5) 2>&5
1934   ac_status=$?
1935   echo "$as_me:1935: \$? = $ac_status" >&5
1936   (exit "$ac_status"); }
1937
1938 cat >"conftest.$ac_ext" <<_ACEOF
1939 #line 1939 "configure"
1940 #include "confdefs.h"
1941
1942 int
1943 main (void)
1944 {
1945
1946   ;
1947   return 0;
1948 }
1949 _ACEOF
1950 ac_clean_files_save=$ac_clean_files
1951 ac_clean_files="$ac_clean_files a.out a.exe"
1952 # Try to create an executable without -o first, disregard a.out.
1953 # It will help us diagnose broken compilers, and finding out an intuition
1954 # of exeext.
1955 echo "$as_me:1955: checking for C compiler default output" >&5
1956 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1957 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1958 if { (eval echo "$as_me:1958: \"$ac_link_default\"") >&5
1959   (eval $ac_link_default) 2>&5
1960   ac_status=$?
1961   echo "$as_me:1961: \$? = $ac_status" >&5
1962   (exit "$ac_status"); }; then
1963   # Find the output, starting from the most likely.  This scheme is
1964 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1965 # resort.
1966 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1967                 ls a.out conftest 2>/dev/null;
1968                 ls a.* conftest.* 2>/dev/null`; do
1969   case $ac_file in
1970     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1971     a.out ) # We found the default executable, but exeext='' is most
1972             # certainly right.
1973             break;;
1974     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1975           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1976           export ac_cv_exeext
1977           break;;
1978     * ) break;;
1979   esac
1980 done
1981 else
1982   echo "$as_me: failed program was:" >&5
1983 cat "conftest.$ac_ext" >&5
1984 { { echo "$as_me:1984: error: C compiler cannot create executables" >&5
1985 echo "$as_me: error: C compiler cannot create executables" >&2;}
1986    { (exit 77); exit 77; }; }
1987 fi
1988
1989 ac_exeext=$ac_cv_exeext
1990 echo "$as_me:1990: result: $ac_file" >&5
1991 echo "${ECHO_T}$ac_file" >&6
1992
1993 # Check the compiler produces executables we can run.  If not, either
1994 # the compiler is broken, or we cross compile.
1995 echo "$as_me:1995: checking whether the C compiler works" >&5
1996 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1997 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1998 # If not cross compiling, check that we can run a simple program.
1999 if test "$cross_compiling" != yes; then
2000   if { ac_try='./$ac_file'
2001   { (eval echo "$as_me:2001: \"$ac_try\"") >&5
2002   (eval $ac_try) 2>&5
2003   ac_status=$?
2004   echo "$as_me:2004: \$? = $ac_status" >&5
2005   (exit "$ac_status"); }; }; then
2006     cross_compiling=no
2007   else
2008     if test "$cross_compiling" = maybe; then
2009         cross_compiling=yes
2010     else
2011         { { echo "$as_me:2011: error: cannot run C compiled programs.
2012 If you meant to cross compile, use \`--host'." >&5
2013 echo "$as_me: error: cannot run C compiled programs.
2014 If you meant to cross compile, use \`--host'." >&2;}
2015    { (exit 1); exit 1; }; }
2016     fi
2017   fi
2018 fi
2019 echo "$as_me:2019: result: yes" >&5
2020 echo "${ECHO_T}yes" >&6
2021
2022 rm -f a.out a.exe "conftest$ac_cv_exeext"
2023 ac_clean_files=$ac_clean_files_save
2024 # Check the compiler produces executables we can run.  If not, either
2025 # the compiler is broken, or we cross compile.
2026 echo "$as_me:2026: checking whether we are cross compiling" >&5
2027 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2028 echo "$as_me:2028: result: $cross_compiling" >&5
2029 echo "${ECHO_T}$cross_compiling" >&6
2030
2031 echo "$as_me:2031: checking for executable suffix" >&5
2032 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
2033 if { (eval echo "$as_me:2033: \"$ac_link\"") >&5
2034   (eval $ac_link) 2>&5
2035   ac_status=$?
2036   echo "$as_me:2036: \$? = $ac_status" >&5
2037   (exit "$ac_status"); }; then
2038   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2039 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2040 # work properly (i.e., refer to `conftest.exe'), while it won't with
2041 # `rm'.
2042 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2043   case $ac_file in
2044     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2045     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2046           export ac_cv_exeext
2047           break;;
2048     * ) break;;
2049   esac
2050 done
2051 else
2052   { { echo "$as_me:2052: error: cannot compute EXEEXT: cannot compile and link" >&5
2053 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2054    { (exit 1); exit 1; }; }
2055 fi
2056
2057 rm -f "conftest$ac_cv_exeext"
2058 echo "$as_me:2058: result: $ac_cv_exeext" >&5
2059 echo "${ECHO_T}$ac_cv_exeext" >&6
2060
2061 rm -f "conftest.$ac_ext"
2062 EXEEXT=$ac_cv_exeext
2063 ac_exeext=$EXEEXT
2064 echo "$as_me:2064: checking for object suffix" >&5
2065 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2066 if test "${ac_cv_objext+set}" = set; then
2067   echo $ECHO_N "(cached) $ECHO_C" >&6
2068 else
2069   cat >"conftest.$ac_ext" <<_ACEOF
2070 #line 2070 "configure"
2071 #include "confdefs.h"
2072
2073 int
2074 main (void)
2075 {
2076
2077   ;
2078   return 0;
2079 }
2080 _ACEOF
2081 rm -f conftest.o conftest.obj
2082 if { (eval echo "$as_me:2082: \"$ac_compile\"") >&5
2083   (eval $ac_compile) 2>&5
2084   ac_status=$?
2085   echo "$as_me:2085: \$? = $ac_status" >&5
2086   (exit "$ac_status"); }; then
2087   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2088   case $ac_file in
2089     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2090     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2091        break;;
2092   esac
2093 done
2094 else
2095   echo "$as_me: failed program was:" >&5
2096 cat "conftest.$ac_ext" >&5
2097 { { echo "$as_me:2097: error: cannot compute OBJEXT: cannot compile" >&5
2098 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2099    { (exit 1); exit 1; }; }
2100 fi
2101
2102 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2103 fi
2104 echo "$as_me:2104: result: $ac_cv_objext" >&5
2105 echo "${ECHO_T}$ac_cv_objext" >&6
2106 OBJEXT=$ac_cv_objext
2107 ac_objext=$OBJEXT
2108 echo "$as_me:2108: checking whether we are using the GNU C compiler" >&5
2109 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2110 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2111   echo $ECHO_N "(cached) $ECHO_C" >&6
2112 else
2113   cat >"conftest.$ac_ext" <<_ACEOF
2114 #line 2114 "configure"
2115 #include "confdefs.h"
2116
2117 int
2118 main (void)
2119 {
2120 #ifndef __GNUC__
2121        choke me
2122 #endif
2123
2124   ;
2125   return 0;
2126 }
2127 _ACEOF
2128 rm -f "conftest.$ac_objext"
2129 if { (eval echo "$as_me:2129: \"$ac_compile\"") >&5
2130   (eval $ac_compile) 2>&5
2131   ac_status=$?
2132   echo "$as_me:2132: \$? = $ac_status" >&5
2133   (exit "$ac_status"); } &&
2134          { ac_try='test -s "conftest.$ac_objext"'
2135   { (eval echo "$as_me:2135: \"$ac_try\"") >&5
2136   (eval $ac_try) 2>&5
2137   ac_status=$?
2138   echo "$as_me:2138: \$? = $ac_status" >&5
2139   (exit "$ac_status"); }; }; then
2140   ac_compiler_gnu=yes
2141 else
2142   echo "$as_me: failed program was:" >&5
2143 cat "conftest.$ac_ext" >&5
2144 ac_compiler_gnu=no
2145 fi
2146 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2147 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2148
2149 fi
2150 echo "$as_me:2150: result: $ac_cv_c_compiler_gnu" >&5
2151 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2152 GCC=`test $ac_compiler_gnu = yes && echo yes`
2153 ac_test_CFLAGS=${CFLAGS+set}
2154 ac_save_CFLAGS=$CFLAGS
2155 CFLAGS="-g"
2156 echo "$as_me:2156: checking whether $CC accepts -g" >&5
2157 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2158 if test "${ac_cv_prog_cc_g+set}" = set; then
2159   echo $ECHO_N "(cached) $ECHO_C" >&6
2160 else
2161   cat >"conftest.$ac_ext" <<_ACEOF
2162 #line 2162 "configure"
2163 #include "confdefs.h"
2164
2165 int
2166 main (void)
2167 {
2168
2169   ;
2170   return 0;
2171 }
2172 _ACEOF
2173 rm -f "conftest.$ac_objext"
2174 if { (eval echo "$as_me:2174: \"$ac_compile\"") >&5
2175   (eval $ac_compile) 2>&5
2176   ac_status=$?
2177   echo "$as_me:2177: \$? = $ac_status" >&5
2178   (exit "$ac_status"); } &&
2179          { ac_try='test -s "conftest.$ac_objext"'
2180   { (eval echo "$as_me:2180: \"$ac_try\"") >&5
2181   (eval $ac_try) 2>&5
2182   ac_status=$?
2183   echo "$as_me:2183: \$? = $ac_status" >&5
2184   (exit "$ac_status"); }; }; then
2185   ac_cv_prog_cc_g=yes
2186 else
2187   echo "$as_me: failed program was:" >&5
2188 cat "conftest.$ac_ext" >&5
2189 ac_cv_prog_cc_g=no
2190 fi
2191 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2192 fi
2193 echo "$as_me:2193: result: $ac_cv_prog_cc_g" >&5
2194 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2195 if test "$ac_test_CFLAGS" = set; then
2196   CFLAGS=$ac_save_CFLAGS
2197 elif test $ac_cv_prog_cc_g = yes; then
2198   if test "$GCC" = yes; then
2199     CFLAGS="-g -O2"
2200   else
2201     CFLAGS="-g"
2202   fi
2203 else
2204   if test "$GCC" = yes; then
2205     CFLAGS="-O2"
2206   else
2207     CFLAGS=
2208   fi
2209 fi
2210 # Some people use a C++ compiler to compile C.  Since we use `exit',
2211 # in C++ we need to declare it.  In case someone uses the same compiler
2212 # for both compiling C and C++ we need to have the C++ compiler decide
2213 # the declaration of exit, since it's the most demanding environment.
2214 cat >"conftest.$ac_ext" <<_ACEOF
2215 #ifndef __cplusplus
2216   choke me
2217 #endif
2218 _ACEOF
2219 rm -f "conftest.$ac_objext"
2220 if { (eval echo "$as_me:2220: \"$ac_compile\"") >&5
2221   (eval $ac_compile) 2>&5
2222   ac_status=$?
2223   echo "$as_me:2223: \$? = $ac_status" >&5
2224   (exit "$ac_status"); } &&
2225          { ac_try='test -s "conftest.$ac_objext"'
2226   { (eval echo "$as_me:2226: \"$ac_try\"") >&5
2227   (eval $ac_try) 2>&5
2228   ac_status=$?
2229   echo "$as_me:2229: \$? = $ac_status" >&5
2230   (exit "$ac_status"); }; }; then
2231   for ac_declaration in \
2232    ''\
2233    '#include <stdlib.h>' \
2234    'extern "C" void std::exit (int) throw (); using std::exit;' \
2235    'extern "C" void std::exit (int); using std::exit;' \
2236    'extern "C" void exit (int) throw ();' \
2237    'extern "C" void exit (int);' \
2238    'void exit (int);'
2239 do
2240   cat >"conftest.$ac_ext" <<_ACEOF
2241 #line 2241 "configure"
2242 #include "confdefs.h"
2243 #include <stdlib.h>
2244 $ac_declaration
2245 int
2246 main (void)
2247 {
2248 exit (42);
2249   ;
2250   return 0;
2251 }
2252 _ACEOF
2253 rm -f "conftest.$ac_objext"
2254 if { (eval echo "$as_me:2254: \"$ac_compile\"") >&5
2255   (eval $ac_compile) 2>&5
2256   ac_status=$?
2257   echo "$as_me:2257: \$? = $ac_status" >&5
2258   (exit "$ac_status"); } &&
2259          { ac_try='test -s "conftest.$ac_objext"'
2260   { (eval echo "$as_me:2260: \"$ac_try\"") >&5
2261   (eval $ac_try) 2>&5
2262   ac_status=$?
2263   echo "$as_me:2263: \$? = $ac_status" >&5
2264   (exit "$ac_status"); }; }; then
2265   :
2266 else
2267   echo "$as_me: failed program was:" >&5
2268 cat "conftest.$ac_ext" >&5
2269 continue
2270 fi
2271 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2272   cat >"conftest.$ac_ext" <<_ACEOF
2273 #line 2273 "configure"
2274 #include "confdefs.h"
2275 $ac_declaration
2276 int
2277 main (void)
2278 {
2279 exit (42);
2280   ;
2281   return 0;
2282 }
2283 _ACEOF
2284 rm -f "conftest.$ac_objext"
2285 if { (eval echo "$as_me:2285: \"$ac_compile\"") >&5
2286   (eval $ac_compile) 2>&5
2287   ac_status=$?
2288   echo "$as_me:2288: \$? = $ac_status" >&5
2289   (exit "$ac_status"); } &&
2290          { ac_try='test -s "conftest.$ac_objext"'
2291   { (eval echo "$as_me:2291: \"$ac_try\"") >&5
2292   (eval $ac_try) 2>&5
2293   ac_status=$?
2294   echo "$as_me:2294: \$? = $ac_status" >&5
2295   (exit "$ac_status"); }; }; then
2296   break
2297 else
2298   echo "$as_me: failed program was:" >&5
2299 cat "conftest.$ac_ext" >&5
2300 fi
2301 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2302 done
2303 rm -rf conftest*
2304 if test -n "$ac_declaration"; then
2305   echo '#ifdef __cplusplus' >>confdefs.h
2306   echo "$ac_declaration"    >>confdefs.h
2307   echo '#endif'             >>confdefs.h
2308 fi
2309
2310 else
2311   echo "$as_me: failed program was:" >&5
2312 cat "conftest.$ac_ext" >&5
2313 fi
2314 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2315 ac_ext=c
2316 ac_cpp='$CPP $CPPFLAGS'
2317 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2318 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2319 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2320 ac_main_return="return"
2321
2322 GCC_VERSION=none
2323 if test "$GCC" = yes ; then
2324         echo "$as_me:2324: checking version of $CC" >&5
2325 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2326         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2327         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2328         echo "$as_me:2328: result: $GCC_VERSION" >&5
2329 echo "${ECHO_T}$GCC_VERSION" >&6
2330 fi
2331
2332 INTEL_COMPILER=no
2333
2334 if test "$GCC" = yes ; then
2335         case "$host_os" in
2336         (linux*|gnu*)
2337                 echo "$as_me:2337: checking if this is really Intel C compiler" >&5
2338 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2339                 cf_save_CFLAGS="$CFLAGS"
2340                 CFLAGS="$CFLAGS -no-gcc"
2341                 cat >"conftest.$ac_ext" <<_ACEOF
2342 #line 2342 "configure"
2343 #include "confdefs.h"
2344
2345 int
2346 main (void)
2347 {
2348
2349 #ifdef __INTEL_COMPILER
2350 #else
2351 #error __INTEL_COMPILER is not defined
2352 #endif
2353
2354   ;
2355   return 0;
2356 }
2357 _ACEOF
2358 rm -f "conftest.$ac_objext"
2359 if { (eval echo "$as_me:2359: \"$ac_compile\"") >&5
2360   (eval $ac_compile) 2>&5
2361   ac_status=$?
2362   echo "$as_me:2362: \$? = $ac_status" >&5
2363   (exit "$ac_status"); } &&
2364          { ac_try='test -s "conftest.$ac_objext"'
2365   { (eval echo "$as_me:2365: \"$ac_try\"") >&5
2366   (eval $ac_try) 2>&5
2367   ac_status=$?
2368   echo "$as_me:2368: \$? = $ac_status" >&5
2369   (exit "$ac_status"); }; }; then
2370   INTEL_COMPILER=yes
2371 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2372
2373 else
2374   echo "$as_me: failed program was:" >&5
2375 cat "conftest.$ac_ext" >&5
2376 fi
2377 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2378                 CFLAGS="$cf_save_CFLAGS"
2379                 echo "$as_me:2379: result: $INTEL_COMPILER" >&5
2380 echo "${ECHO_T}$INTEL_COMPILER" >&6
2381                 ;;
2382         esac
2383 fi
2384
2385 CLANG_COMPILER=no
2386
2387 if test "$GCC" = yes ; then
2388         echo "$as_me:2388: checking if this is really Clang C compiler" >&5
2389 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2390         cf_save_CFLAGS="$CFLAGS"
2391         cat >"conftest.$ac_ext" <<_ACEOF
2392 #line 2392 "configure"
2393 #include "confdefs.h"
2394
2395 int
2396 main (void)
2397 {
2398
2399 #ifdef __clang__
2400 #else
2401 #error __clang__ is not defined
2402 #endif
2403
2404   ;
2405   return 0;
2406 }
2407 _ACEOF
2408 rm -f "conftest.$ac_objext"
2409 if { (eval echo "$as_me:2409: \"$ac_compile\"") >&5
2410   (eval $ac_compile) 2>&5
2411   ac_status=$?
2412   echo "$as_me:2412: \$? = $ac_status" >&5
2413   (exit "$ac_status"); } &&
2414          { ac_try='test -s "conftest.$ac_objext"'
2415   { (eval echo "$as_me:2415: \"$ac_try\"") >&5
2416   (eval $ac_try) 2>&5
2417   ac_status=$?
2418   echo "$as_me:2418: \$? = $ac_status" >&5
2419   (exit "$ac_status"); }; }; then
2420   CLANG_COMPILER=yes
2421
2422 else
2423   echo "$as_me: failed program was:" >&5
2424 cat "conftest.$ac_ext" >&5
2425 fi
2426 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2427         CFLAGS="$cf_save_CFLAGS"
2428         echo "$as_me:2428: result: $CLANG_COMPILER" >&5
2429 echo "${ECHO_T}$CLANG_COMPILER" >&6
2430 fi
2431
2432 CLANG_VERSION=none
2433
2434 if test "x$CLANG_COMPILER" = "xyes" ; then
2435         case "$CC" in
2436         (c[1-9][0-9]|*/c[1-9][0-9])
2437                 { echo "$as_me:2437: WARNING: replacing broken compiler alias $CC" >&5
2438 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2439                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2440                 CC=clang
2441                 ;;
2442         esac
2443
2444         echo "$as_me:2444: checking version of $CC" >&5
2445 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2446         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.].*//'`"
2447         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2448         echo "$as_me:2448: result: $CLANG_VERSION" >&5
2449 echo "${ECHO_T}$CLANG_VERSION" >&6
2450
2451         for cf_clang_opt in \
2452                 -Qunused-arguments \
2453                 -Wno-error=implicit-function-declaration
2454         do
2455                 echo "$as_me:2455: checking if option $cf_clang_opt works" >&5
2456 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2457                 cf_save_CFLAGS="$CFLAGS"
2458                 CFLAGS="$CFLAGS $cf_clang_opt"
2459                 cat >"conftest.$ac_ext" <<_ACEOF
2460 #line 2460 "configure"
2461 #include "confdefs.h"
2462
2463                         #include <stdio.h>
2464 int
2465 main (void)
2466 {
2467
2468                         printf("hello!\\n");
2469   ;
2470   return 0;
2471 }
2472 _ACEOF
2473 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2474 if { (eval echo "$as_me:2474: \"$ac_link\"") >&5
2475   (eval $ac_link) 2>&5
2476   ac_status=$?
2477   echo "$as_me:2477: \$? = $ac_status" >&5
2478   (exit "$ac_status"); } &&
2479          { ac_try='test -s "conftest$ac_exeext"'
2480   { (eval echo "$as_me:2480: \"$ac_try\"") >&5
2481   (eval $ac_try) 2>&5
2482   ac_status=$?
2483   echo "$as_me:2483: \$? = $ac_status" >&5
2484   (exit "$ac_status"); }; }; then
2485
2486                         cf_clang_optok=yes
2487 else
2488   echo "$as_me: failed program was:" >&5
2489 cat "conftest.$ac_ext" >&5
2490
2491                         cf_clang_optok=no
2492 fi
2493 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2494                 echo "$as_me:2494: result: $cf_clang_optok" >&5
2495 echo "${ECHO_T}$cf_clang_optok" >&6
2496                 CFLAGS="$cf_save_CFLAGS"
2497                 if test "$cf_clang_optok" = yes; then
2498                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2499
2500 echo "${as_me:-configure}:2500: testing adding option $cf_clang_opt ..." 1>&5
2501
2502         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2503         CFLAGS="${CFLAGS}$cf_clang_opt"
2504
2505                 fi
2506         done
2507 fi
2508
2509 echo "$as_me:2509: checking for $CC option to accept ANSI C" >&5
2510 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2511 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2512   echo $ECHO_N "(cached) $ECHO_C" >&6
2513 else
2514   ac_cv_prog_cc_stdc=no
2515 ac_save_CC=$CC
2516 cat >"conftest.$ac_ext" <<_ACEOF
2517 #line 2517 "configure"
2518 #include "confdefs.h"
2519 #include <stdarg.h>
2520 #include <stdio.h>
2521 #include <sys/types.h>
2522 #include <sys/stat.h>
2523 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2524 struct buf { int x; };
2525 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2526 static char *e (char **p, int i)
2527 {
2528   return p[i];
2529 }
2530 static char *f (char * (*g) (char **, int), char **p, ...)
2531 {
2532   char *s;
2533   va_list v;
2534   va_start (v,p);
2535   s = g (p, va_arg (v,int));
2536   va_end (v);
2537   return s;
2538 }
2539 int test (int i, double x);
2540 struct s1 {int (*f) (int a);};
2541 struct s2 {int (*f) (double a);};
2542 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2543 int argc;
2544 char **argv;
2545 int
2546 main (void)
2547 {
2548 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2549   ;
2550   return 0;
2551 }
2552 _ACEOF
2553 # Don't try gcc -ansi; that turns off useful extensions and
2554 # breaks some systems' header files.
2555 # AIX                   -qlanglvl=ansi
2556 # Ultrix and OSF/1      -std1
2557 # HP-UX 10.20 and later -Ae
2558 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2559 # SVR4                  -Xc -D__EXTENSIONS__
2560 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2561 do
2562   CC="$ac_save_CC $ac_arg"
2563   rm -f "conftest.$ac_objext"
2564 if { (eval echo "$as_me:2564: \"$ac_compile\"") >&5
2565   (eval $ac_compile) 2>&5
2566   ac_status=$?
2567   echo "$as_me:2567: \$? = $ac_status" >&5
2568   (exit "$ac_status"); } &&
2569          { ac_try='test -s "conftest.$ac_objext"'
2570   { (eval echo "$as_me:2570: \"$ac_try\"") >&5
2571   (eval $ac_try) 2>&5
2572   ac_status=$?
2573   echo "$as_me:2573: \$? = $ac_status" >&5
2574   (exit "$ac_status"); }; }; then
2575   ac_cv_prog_cc_stdc=$ac_arg
2576 break
2577 else
2578   echo "$as_me: failed program was:" >&5
2579 cat "conftest.$ac_ext" >&5
2580 fi
2581 rm -f "conftest.$ac_objext"
2582 done
2583 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2584 CC=$ac_save_CC
2585
2586 fi
2587
2588 case "x$ac_cv_prog_cc_stdc" in
2589   x|xno)
2590     echo "$as_me:2590: result: none needed" >&5
2591 echo "${ECHO_T}none needed" >&6 ;;
2592   *)
2593     echo "$as_me:2593: result: $ac_cv_prog_cc_stdc" >&5
2594 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2595     CC="$CC $ac_cv_prog_cc_stdc" ;;
2596 esac
2597
2598 # This should have been defined by AC_PROG_CC
2599 : "${CC:=cc}"
2600
2601 echo "$as_me:2601: checking \$CFLAGS variable" >&5
2602 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2603 case "x$CFLAGS" in
2604 (*-[IUD]*)
2605         echo "$as_me:2605: result: broken" >&5
2606 echo "${ECHO_T}broken" >&6
2607         { echo "$as_me:2607: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2608 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2609         cf_flags="$CFLAGS"
2610         CFLAGS=
2611         for cf_arg in $cf_flags
2612         do
2613
2614 cf_fix_cppflags=no
2615 cf_new_cflags=
2616 cf_new_cppflags=
2617 cf_new_extra_cppflags=
2618
2619 for cf_add_cflags in $cf_arg
2620 do
2621 case "$cf_fix_cppflags" in
2622 (no)
2623         case "$cf_add_cflags" in
2624         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2625                 case "$cf_add_cflags" in
2626                 (-D*)
2627                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2628
2629                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2630                                 && test -z "${cf_tst_cflags}" \
2631                                 && cf_fix_cppflags=yes
2632
2633                         if test "$cf_fix_cppflags" = yes ; then
2634
2635         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2636         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2637
2638                                 continue
2639                         elif test "${cf_tst_cflags}" = "\"'" ; then
2640
2641         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2642         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2643
2644                                 continue
2645                         fi
2646                         ;;
2647                 esac
2648                 case "$CPPFLAGS" in
2649                 (*$cf_add_cflags)
2650                         ;;
2651                 (*)
2652                         case "$cf_add_cflags" in
2653                         (-D*)
2654                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2655
2656 CPPFLAGS=`echo "$CPPFLAGS" | \
2657         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2658                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2659
2660                                 ;;
2661                         esac
2662
2663         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2664         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2665
2666                         ;;
2667                 esac
2668                 ;;
2669         (*)
2670
2671         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2672         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2673
2674                 ;;
2675         esac
2676         ;;
2677 (yes)
2678
2679         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2680         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2681
2682         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2683
2684         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2685                 && test -z "${cf_tst_cflags}" \
2686                 && cf_fix_cppflags=no
2687         ;;
2688 esac
2689 done
2690
2691 if test -n "$cf_new_cflags" ; then
2692
2693         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2694         CFLAGS="${CFLAGS}$cf_new_cflags"
2695
2696 fi
2697
2698 if test -n "$cf_new_cppflags" ; then
2699
2700         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2701         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2702
2703 fi
2704
2705 if test -n "$cf_new_extra_cppflags" ; then
2706
2707         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2708         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2709
2710 fi
2711
2712         done
2713         ;;
2714 (*)
2715         echo "$as_me:2715: result: ok" >&5
2716 echo "${ECHO_T}ok" >&6
2717         ;;
2718 esac
2719
2720 echo "$as_me:2720: checking \$CC variable" >&5
2721 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2722 case "$CC" in
2723 (*[\ \  ]-*)
2724         echo "$as_me:2724: result: broken" >&5
2725 echo "${ECHO_T}broken" >&6
2726         { echo "$as_me:2726: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2727 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2728         # humor him...
2729         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2730         cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2731         CC="$cf_prog"
2732         for cf_arg in $cf_flags
2733         do
2734                 case "x$cf_arg" in
2735                 (x-[IUDfgOW]*)
2736
2737 cf_fix_cppflags=no
2738 cf_new_cflags=
2739 cf_new_cppflags=
2740 cf_new_extra_cppflags=
2741
2742 for cf_add_cflags in $cf_arg
2743 do
2744 case "$cf_fix_cppflags" in
2745 (no)
2746         case "$cf_add_cflags" in
2747         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2748                 case "$cf_add_cflags" in
2749                 (-D*)
2750                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2751
2752                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2753                                 && test -z "${cf_tst_cflags}" \
2754                                 && cf_fix_cppflags=yes
2755
2756                         if test "$cf_fix_cppflags" = yes ; then
2757
2758         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2759         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2760
2761                                 continue
2762                         elif test "${cf_tst_cflags}" = "\"'" ; then
2763
2764         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2765         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2766
2767                                 continue
2768                         fi
2769                         ;;
2770                 esac
2771                 case "$CPPFLAGS" in
2772                 (*$cf_add_cflags)
2773                         ;;
2774                 (*)
2775                         case "$cf_add_cflags" in
2776                         (-D*)
2777                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2778
2779 CPPFLAGS=`echo "$CPPFLAGS" | \
2780         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2781                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2782
2783                                 ;;
2784                         esac
2785
2786         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2787         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2788
2789                         ;;
2790                 esac
2791                 ;;
2792         (*)
2793
2794         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2795         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2796
2797                 ;;
2798         esac
2799         ;;
2800 (yes)
2801
2802         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2803         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2804
2805         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2806
2807         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2808                 && test -z "${cf_tst_cflags}" \
2809                 && cf_fix_cppflags=no
2810         ;;
2811 esac
2812 done
2813
2814 if test -n "$cf_new_cflags" ; then
2815
2816         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2817         CFLAGS="${CFLAGS}$cf_new_cflags"
2818
2819 fi
2820
2821 if test -n "$cf_new_cppflags" ; then
2822
2823         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2824         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2825
2826 fi
2827
2828 if test -n "$cf_new_extra_cppflags" ; then
2829
2830         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2831         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2832
2833 fi
2834
2835                         ;;
2836                 (*)
2837                         CC="$CC $cf_arg"
2838                         ;;
2839                 esac
2840         done
2841         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2842
2843 echo "${as_me:-configure}:2843: testing resulting CC: '$CC' ..." 1>&5
2844
2845         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2846
2847 echo "${as_me:-configure}:2847: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2848
2849         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2850
2851 echo "${as_me:-configure}:2851: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2852
2853         ;;
2854 (*)
2855         echo "$as_me:2855: result: ok" >&5
2856 echo "${ECHO_T}ok" >&6
2857         ;;
2858 esac
2859
2860 ac_ext=c
2861 ac_cpp='$CPP $CPPFLAGS'
2862 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2863 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2864 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2865 ac_main_return="return"
2866 echo "$as_me:2866: checking how to run the C preprocessor" >&5
2867 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2868 # On Suns, sometimes $CPP names a directory.
2869 if test -n "$CPP" && test -d "$CPP"; then
2870   CPP=
2871 fi
2872 if test -z "$CPP"; then
2873   if test "${ac_cv_prog_CPP+set}" = set; then
2874   echo $ECHO_N "(cached) $ECHO_C" >&6
2875 else
2876       # Double quotes because CPP needs to be expanded
2877     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2878     do
2879       ac_preproc_ok=false
2880 for ac_c_preproc_warn_flag in '' yes
2881 do
2882   # Use a header file that comes with gcc, so configuring glibc
2883   # with a fresh cross-compiler works.
2884   # On the NeXT, cc -E runs the code through the compiler's parser,
2885   # not just through cpp. "Syntax error" is here to catch this case.
2886   cat >"conftest.$ac_ext" <<_ACEOF
2887 #line 2887 "configure"
2888 #include "confdefs.h"
2889 #include <assert.h>
2890                      Syntax error
2891 _ACEOF
2892 if { (eval echo "$as_me:2892: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2893   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2894   ac_status=$?
2895   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2896   rm -f conftest.er1
2897   cat conftest.err >&5
2898   echo "$as_me:2898: \$? = $ac_status" >&5
2899   (exit "$ac_status"); } >/dev/null; then
2900   if test -s conftest.err; then
2901     ac_cpp_err=$ac_c_preproc_warn_flag
2902   else
2903     ac_cpp_err=
2904   fi
2905 else
2906   ac_cpp_err=yes
2907 fi
2908 if test -z "$ac_cpp_err"; then
2909   :
2910 else
2911   echo "$as_me: failed program was:" >&5
2912   cat "conftest.$ac_ext" >&5
2913   # Broken: fails on valid input.
2914 continue
2915 fi
2916 rm -f conftest.err "conftest.$ac_ext"
2917
2918   # OK, works on sane cases.  Now check whether non-existent headers
2919   # can be detected and how.
2920   cat >"conftest.$ac_ext" <<_ACEOF
2921 #line 2921 "configure"
2922 #include "confdefs.h"
2923 #include <ac_nonexistent.h>
2924 _ACEOF
2925 if { (eval echo "$as_me:2925: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2926   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2927   ac_status=$?
2928   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2929   rm -f conftest.er1
2930   cat conftest.err >&5
2931   echo "$as_me:2931: \$? = $ac_status" >&5
2932   (exit "$ac_status"); } >/dev/null; then
2933   if test -s conftest.err; then
2934     ac_cpp_err=$ac_c_preproc_warn_flag
2935   else
2936     ac_cpp_err=
2937   fi
2938 else
2939   ac_cpp_err=yes
2940 fi
2941 if test -z "$ac_cpp_err"; then
2942   # Broken: success on invalid input.
2943 continue
2944 else
2945   echo "$as_me: failed program was:" >&5
2946   cat "conftest.$ac_ext" >&5
2947   # Passes both tests.
2948 ac_preproc_ok=:
2949 break
2950 fi
2951 rm -f conftest.err "conftest.$ac_ext"
2952
2953 done
2954 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2955 rm -f conftest.err "conftest.$ac_ext"
2956 if $ac_preproc_ok; then
2957   break
2958 fi
2959
2960     done
2961     ac_cv_prog_CPP=$CPP
2962
2963 fi
2964   CPP=$ac_cv_prog_CPP
2965 else
2966   ac_cv_prog_CPP=$CPP
2967 fi
2968 echo "$as_me:2968: result: $CPP" >&5
2969 echo "${ECHO_T}$CPP" >&6
2970 ac_preproc_ok=false
2971 for ac_c_preproc_warn_flag in '' yes
2972 do
2973   # Use a header file that comes with gcc, so configuring glibc
2974   # with a fresh cross-compiler works.
2975   # On the NeXT, cc -E runs the code through the compiler's parser,
2976   # not just through cpp. "Syntax error" is here to catch this case.
2977   cat >"conftest.$ac_ext" <<_ACEOF
2978 #line 2978 "configure"
2979 #include "confdefs.h"
2980 #include <assert.h>
2981                      Syntax error
2982 _ACEOF
2983 if { (eval echo "$as_me:2983: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2984   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2985   ac_status=$?
2986   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2987   rm -f conftest.er1
2988   cat conftest.err >&5
2989   echo "$as_me:2989: \$? = $ac_status" >&5
2990   (exit "$ac_status"); } >/dev/null; then
2991   if test -s conftest.err; then
2992     ac_cpp_err=$ac_c_preproc_warn_flag
2993   else
2994     ac_cpp_err=
2995   fi
2996 else
2997   ac_cpp_err=yes
2998 fi
2999 if test -z "$ac_cpp_err"; then
3000   :
3001 else
3002   echo "$as_me: failed program was:" >&5
3003   cat "conftest.$ac_ext" >&5
3004   # Broken: fails on valid input.
3005 continue
3006 fi
3007 rm -f conftest.err "conftest.$ac_ext"
3008
3009   # OK, works on sane cases.  Now check whether non-existent headers
3010   # can be detected and how.
3011   cat >"conftest.$ac_ext" <<_ACEOF
3012 #line 3012 "configure"
3013 #include "confdefs.h"
3014 #include <ac_nonexistent.h>
3015 _ACEOF
3016 if { (eval echo "$as_me:3016: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3017   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3018   ac_status=$?
3019   $EGREP -v '^ *\+' conftest.er1 >conftest.err
3020   rm -f conftest.er1
3021   cat conftest.err >&5
3022   echo "$as_me:3022: \$? = $ac_status" >&5
3023   (exit "$ac_status"); } >/dev/null; then
3024   if test -s conftest.err; then
3025     ac_cpp_err=$ac_c_preproc_warn_flag
3026   else
3027     ac_cpp_err=
3028   fi
3029 else
3030   ac_cpp_err=yes
3031 fi
3032 if test -z "$ac_cpp_err"; then
3033   # Broken: success on invalid input.
3034 continue
3035 else
3036   echo "$as_me: failed program was:" >&5
3037   cat "conftest.$ac_ext" >&5
3038   # Passes both tests.
3039 ac_preproc_ok=:
3040 break
3041 fi
3042 rm -f conftest.err "conftest.$ac_ext"
3043
3044 done
3045 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3046 rm -f conftest.err "conftest.$ac_ext"
3047 if $ac_preproc_ok; then
3048   :
3049 else
3050   { { echo "$as_me:3050: error: C preprocessor \"$CPP\" fails sanity check" >&5
3051 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3052    { (exit 1); exit 1; }; }
3053 fi
3054
3055 ac_ext=c
3056 ac_cpp='$CPP $CPPFLAGS'
3057 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3058 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3059 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3060 ac_main_return="return"
3061
3062 if test $ac_cv_c_compiler_gnu = yes; then
3063     echo "$as_me:3063: checking whether $CC needs -traditional" >&5
3064 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3065 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3066   echo $ECHO_N "(cached) $ECHO_C" >&6
3067 else
3068     ac_pattern="Autoconf.*'x'"
3069   cat >"conftest.$ac_ext" <<_ACEOF
3070 #line 3070 "configure"
3071 #include "confdefs.h"
3072 #include <sgtty.h>
3073 int Autoconf = TIOCGETP;
3074 _ACEOF
3075 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3076   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3077   ac_cv_prog_gcc_traditional=yes
3078 else
3079   ac_cv_prog_gcc_traditional=no
3080 fi
3081 rm -rf conftest*
3082
3083   if test $ac_cv_prog_gcc_traditional = no; then
3084     cat >"conftest.$ac_ext" <<_ACEOF
3085 #line 3085 "configure"
3086 #include "confdefs.h"
3087 #include <termio.h>
3088 int Autoconf = TCGETA;
3089 _ACEOF
3090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3091   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3092   ac_cv_prog_gcc_traditional=yes
3093 fi
3094 rm -rf conftest*
3095
3096   fi
3097 fi
3098 echo "$as_me:3098: result: $ac_cv_prog_gcc_traditional" >&5
3099 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3100   if test $ac_cv_prog_gcc_traditional = yes; then
3101     CC="$CC -traditional"
3102   fi
3103 fi
3104
3105 echo "$as_me:3105: checking whether $CC understands -c and -o together" >&5
3106 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3107 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3108   echo $ECHO_N "(cached) $ECHO_C" >&6
3109 else
3110
3111 cat > conftest.$ac_ext <<CF_EOF
3112 int main(void)
3113 {
3114         ${cf_cv_main_return:-return}(0);
3115 }
3116 CF_EOF
3117 # We do the test twice because some compilers refuse to overwrite an
3118 # existing .o file with -o, though they will create one.
3119 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3120 if { (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   test -f conftest2.$ac_objext && { (eval echo "$as_me:3125: \"$ac_try\"") >&5
3126   (eval $ac_try) 2>&5
3127   ac_status=$?
3128   echo "$as_me:3128: \$? = $ac_status" >&5
3129   (exit "$ac_status"); };
3130 then
3131   eval cf_cv_prog_CC_c_o=yes
3132 else
3133   eval cf_cv_prog_CC_c_o=no
3134 fi
3135 rm -rf ./conftest*
3136
3137 fi
3138 if test "$cf_cv_prog_CC_c_o" = yes; then
3139   echo "$as_me:3139: result: yes" >&5
3140 echo "${ECHO_T}yes" >&6
3141 else
3142   echo "$as_me:3142: result: no" >&5
3143 echo "${ECHO_T}no" >&6
3144 fi
3145
3146 if test "$cross_compiling" = yes ; then
3147         LDCONFIG=:
3148 else
3149         case "$cf_cv_system_name" in
3150         (dragonfly*|mirbsd*|freebsd*)
3151                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3152                 ;;
3153         (*) LDPATH=$PATH:/sbin:/usr/sbin
3154                 # Extract the first word of "ldconfig", so it can be a program name with args.
3155 set dummy ldconfig; ac_word=$2
3156 echo "$as_me:3156: checking for $ac_word" >&5
3157 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3158 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3159   echo $ECHO_N "(cached) $ECHO_C" >&6
3160 else
3161   case $LDCONFIG in
3162   [\\/]* | ?:[\\/]*)
3163   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3164   ;;
3165   *)
3166   ac_save_IFS=$IFS; IFS=$ac_path_separator
3167 ac_dummy="$LDPATH"
3168 for ac_dir in $ac_dummy; do
3169   IFS=$ac_save_IFS
3170   test -z "$ac_dir" && ac_dir=.
3171   if $as_executable_p "$ac_dir/$ac_word"; then
3172    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3173    echo "$as_me:3173: found $ac_dir/$ac_word" >&5
3174    break
3175 fi
3176 done
3177
3178   ;;
3179 esac
3180 fi
3181 LDCONFIG=$ac_cv_path_LDCONFIG
3182
3183 if test -n "$LDCONFIG"; then
3184   echo "$as_me:3184: result: $LDCONFIG" >&5
3185 echo "${ECHO_T}$LDCONFIG" >&6
3186 else
3187   echo "$as_me:3187: result: no" >&5
3188 echo "${ECHO_T}no" >&6
3189 fi
3190
3191                 ;;
3192         esac
3193 fi
3194
3195 echo "$as_me:3195: checking if you want to ensure bool is consistent with C++" >&5
3196 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3197
3198 # Check whether --with-cxx or --without-cxx was given.
3199 if test "${with_cxx+set}" = set; then
3200   withval="$with_cxx"
3201   cf_with_cxx=$withval
3202 else
3203   cf_with_cxx=yes
3204 fi;
3205 echo "$as_me:3205: result: $cf_with_cxx" >&5
3206 echo "${ECHO_T}$cf_with_cxx" >&6
3207 if test "X$cf_with_cxx" = Xno ; then
3208         CXX=""
3209         GXX=""
3210 else
3211         # with autoconf 2.13, we can change the error to a warning:
3212                 ac_ext=cc
3213 ac_cpp='$CXXCPP $CPPFLAGS'
3214 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3215 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3216 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3217 ac_main_return="return"
3218 if test -n "$ac_tool_prefix"; then
3219   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3220   do
3221     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3222 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3223 echo "$as_me:3223: checking for $ac_word" >&5
3224 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3225 if test "${ac_cv_prog_CXX+set}" = set; then
3226   echo $ECHO_N "(cached) $ECHO_C" >&6
3227 else
3228   if test -n "$CXX"; then
3229   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3230 else
3231   ac_save_IFS=$IFS; IFS=$ac_path_separator
3232 ac_dummy="$PATH"
3233 for ac_dir in $ac_dummy; do
3234   IFS=$ac_save_IFS
3235   test -z "$ac_dir" && ac_dir=.
3236   $as_executable_p "$ac_dir/$ac_word" || continue
3237 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3238 echo "$as_me:3238: found $ac_dir/$ac_word" >&5
3239 break
3240 done
3241
3242 fi
3243 fi
3244 CXX=$ac_cv_prog_CXX
3245 if test -n "$CXX"; then
3246   echo "$as_me:3246: result: $CXX" >&5
3247 echo "${ECHO_T}$CXX" >&6
3248 else
3249   echo "$as_me:3249: result: no" >&5
3250 echo "${ECHO_T}no" >&6
3251 fi
3252
3253     test -n "$CXX" && break
3254   done
3255 fi
3256 if test -z "$CXX"; then
3257   ac_ct_CXX=$CXX
3258   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3259 do
3260   # Extract the first word of "$ac_prog", so it can be a program name with args.
3261 set dummy $ac_prog; ac_word=$2
3262 echo "$as_me:3262: checking for $ac_word" >&5
3263 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3264 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3265   echo $ECHO_N "(cached) $ECHO_C" >&6
3266 else
3267   if test -n "$ac_ct_CXX"; then
3268   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3269 else
3270   ac_save_IFS=$IFS; IFS=$ac_path_separator
3271 ac_dummy="$PATH"
3272 for ac_dir in $ac_dummy; do
3273   IFS=$ac_save_IFS
3274   test -z "$ac_dir" && ac_dir=.
3275   $as_executable_p "$ac_dir/$ac_word" || continue
3276 ac_cv_prog_ac_ct_CXX="$ac_prog"
3277 echo "$as_me:3277: found $ac_dir/$ac_word" >&5
3278 break
3279 done
3280
3281 fi
3282 fi
3283 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3284 if test -n "$ac_ct_CXX"; then
3285   echo "$as_me:3285: result: $ac_ct_CXX" >&5
3286 echo "${ECHO_T}$ac_ct_CXX" >&6
3287 else
3288   echo "$as_me:3288: result: no" >&5
3289 echo "${ECHO_T}no" >&6
3290 fi
3291
3292   test -n "$ac_ct_CXX" && break
3293 done
3294 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3295
3296   CXX=$ac_ct_CXX
3297 fi
3298
3299 # Provide some information about the compiler.
3300 echo "$as_me:3300:" \
3301      "checking for C++ compiler version" >&5
3302 ac_compiler=`set X $ac_compile; echo $2`
3303 { (eval echo "$as_me:3303: \"$ac_compiler --version </dev/null >&5\"") >&5
3304   (eval $ac_compiler --version </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 { (eval echo "$as_me:3313: \"$ac_compiler -V </dev/null >&5\"") >&5
3314   (eval $ac_compiler -V </dev/null >&5) 2>&5
3315   ac_status=$?
3316   echo "$as_me:3316: \$? = $ac_status" >&5
3317   (exit "$ac_status"); }
3318
3319 echo "$as_me:3319: checking whether we are using the GNU C++ compiler" >&5
3320 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3321 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3322   echo $ECHO_N "(cached) $ECHO_C" >&6
3323 else
3324   cat >"conftest.$ac_ext" <<_ACEOF
3325 #line 3325 "configure"
3326 #include "confdefs.h"
3327
3328 int
3329 main (void)
3330 {
3331 #ifndef __GNUC__
3332        choke me
3333 #endif
3334
3335   ;
3336   return 0;
3337 }
3338 _ACEOF
3339 rm -f "conftest.$ac_objext"
3340 if { (eval echo "$as_me:3340: \"$ac_compile\"") >&5
3341   (eval $ac_compile) 2>&5
3342   ac_status=$?
3343   echo "$as_me:3343: \$? = $ac_status" >&5
3344   (exit "$ac_status"); } &&
3345          { ac_try='test -s "conftest.$ac_objext"'
3346   { (eval echo "$as_me:3346: \"$ac_try\"") >&5
3347   (eval $ac_try) 2>&5
3348   ac_status=$?
3349   echo "$as_me:3349: \$? = $ac_status" >&5
3350   (exit "$ac_status"); }; }; then
3351   ac_compiler_gnu=yes
3352 else
3353   echo "$as_me: failed program was:" >&5
3354 cat "conftest.$ac_ext" >&5
3355 ac_compiler_gnu=no
3356 fi
3357 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3358 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3359
3360 fi
3361 echo "$as_me:3361: result: $ac_cv_cxx_compiler_gnu" >&5
3362 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3363 GXX=`test $ac_compiler_gnu = yes && echo yes`
3364 ac_test_CXXFLAGS=${CXXFLAGS+set}
3365 ac_save_CXXFLAGS=$CXXFLAGS
3366 CXXFLAGS="-g"
3367 echo "$as_me:3367: checking whether $CXX accepts -g" >&5
3368 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3369 if test "${ac_cv_prog_cxx_g+set}" = set; then
3370   echo $ECHO_N "(cached) $ECHO_C" >&6
3371 else
3372   cat >"conftest.$ac_ext" <<_ACEOF
3373 #line 3373 "configure"
3374 #include "confdefs.h"
3375
3376 int
3377 main (void)
3378 {
3379
3380   ;
3381   return 0;
3382 }
3383 _ACEOF
3384 rm -f "conftest.$ac_objext"
3385 if { (eval echo "$as_me:3385: \"$ac_compile\"") >&5
3386   (eval $ac_compile) 2>&5
3387   ac_status=$?
3388   echo "$as_me:3388: \$? = $ac_status" >&5
3389   (exit "$ac_status"); } &&
3390          { ac_try='test -s "conftest.$ac_objext"'
3391   { (eval echo "$as_me:3391: \"$ac_try\"") >&5
3392   (eval $ac_try) 2>&5
3393   ac_status=$?
3394   echo "$as_me:3394: \$? = $ac_status" >&5
3395   (exit "$ac_status"); }; }; then
3396   ac_cv_prog_cxx_g=yes
3397 else
3398   echo "$as_me: failed program was:" >&5
3399 cat "conftest.$ac_ext" >&5
3400 ac_cv_prog_cxx_g=no
3401 fi
3402 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3403 fi
3404 echo "$as_me:3404: result: $ac_cv_prog_cxx_g" >&5
3405 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3406 if test "$ac_test_CXXFLAGS" = set; then
3407   CXXFLAGS=$ac_save_CXXFLAGS
3408 elif test $ac_cv_prog_cxx_g = yes; then
3409   if test "$GXX" = yes; then
3410     CXXFLAGS="-g -O2"
3411   else
3412     CXXFLAGS="-g"
3413   fi
3414 else
3415   if test "$GXX" = yes; then
3416     CXXFLAGS="-O2"
3417   else
3418     CXXFLAGS=
3419   fi
3420 fi
3421 for ac_declaration in \
3422    ''\
3423    '#include <stdlib.h>' \
3424    'extern "C" void std::exit (int) throw (); using std::exit;' \
3425    'extern "C" void std::exit (int); using std::exit;' \
3426    'extern "C" void exit (int) throw ();' \
3427    'extern "C" void exit (int);' \
3428    'void exit (int);'
3429 do
3430   cat >"conftest.$ac_ext" <<_ACEOF
3431 #line 3431 "configure"
3432 #include "confdefs.h"
3433 #include <stdlib.h>
3434 $ac_declaration
3435 int
3436 main (void)
3437 {
3438 exit (42);
3439   ;
3440   return 0;
3441 }
3442 _ACEOF
3443 rm -f "conftest.$ac_objext"
3444 if { (eval echo "$as_me:3444: \"$ac_compile\"") >&5
3445   (eval $ac_compile) 2>&5
3446   ac_status=$?
3447   echo "$as_me:3447: \$? = $ac_status" >&5
3448   (exit "$ac_status"); } &&
3449          { ac_try='test -s "conftest.$ac_objext"'
3450   { (eval echo "$as_me:3450: \"$ac_try\"") >&5
3451   (eval $ac_try) 2>&5
3452   ac_status=$?
3453   echo "$as_me:3453: \$? = $ac_status" >&5
3454   (exit "$ac_status"); }; }; then
3455   :
3456 else
3457   echo "$as_me: failed program was:" >&5
3458 cat "conftest.$ac_ext" >&5
3459 continue
3460 fi
3461 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3462   cat >"conftest.$ac_ext" <<_ACEOF
3463 #line 3463 "configure"
3464 #include "confdefs.h"
3465 $ac_declaration
3466 int
3467 main (void)
3468 {
3469 exit (42);
3470   ;
3471   return 0;
3472 }
3473 _ACEOF
3474 rm -f "conftest.$ac_objext"
3475 if { (eval echo "$as_me:3475: \"$ac_compile\"") >&5
3476   (eval $ac_compile) 2>&5
3477   ac_status=$?
3478   echo "$as_me:3478: \$? = $ac_status" >&5
3479   (exit "$ac_status"); } &&
3480          { ac_try='test -s "conftest.$ac_objext"'
3481   { (eval echo "$as_me:3481: \"$ac_try\"") >&5
3482   (eval $ac_try) 2>&5
3483   ac_status=$?
3484   echo "$as_me:3484: \$? = $ac_status" >&5
3485   (exit "$ac_status"); }; }; then
3486   break
3487 else
3488   echo "$as_me: failed program was:" >&5
3489 cat "conftest.$ac_ext" >&5
3490 fi
3491 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3492 done
3493 rm -rf conftest*
3494 if test -n "$ac_declaration"; then
3495   echo '#ifdef __cplusplus' >>confdefs.h
3496   echo "$ac_declaration"    >>confdefs.h
3497   echo '#endif'             >>confdefs.h
3498 fi
3499
3500 ac_ext=c
3501 ac_cpp='$CPP $CPPFLAGS'
3502 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3503 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3504 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3505 ac_main_return="return"
3506
3507         ac_ext=cc
3508 ac_cpp='$CXXCPP $CPPFLAGS'
3509 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3510 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3511 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3512 ac_main_return="return"
3513
3514         if test "x$cf_with_cxx" != xno
3515         then
3516                 # Several of the C++ configurations do not work, particularly when
3517                 # cross-compiling (20140913 -TD)
3518                 echo "$as_me:3518: checking if $CXX works" >&5
3519 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3520
3521                 save_CPPFLAGS="$CPPFLAGS"
3522                 eval cf_includedir=${includedir}
3523                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3524
3525 cat >"conftest.$ac_ext" <<_ACEOF
3526 #line 3526 "configure"
3527 #include "confdefs.h"
3528
3529 #include <stdlib.h>
3530 #include <stdio.h>
3531
3532 int
3533 main (void)
3534 {
3535
3536                 printf("Hello world!\n")
3537
3538   ;
3539   return 0;
3540 }
3541 _ACEOF
3542 rm -f "conftest.$ac_objext"
3543 if { (eval echo "$as_me:3543: \"$ac_compile\"") >&5
3544   (eval $ac_compile) 2>&5
3545   ac_status=$?
3546   echo "$as_me:3546: \$? = $ac_status" >&5
3547   (exit "$ac_status"); } &&
3548          { ac_try='test -s "conftest.$ac_objext"'
3549   { (eval echo "$as_me:3549: \"$ac_try\"") >&5
3550   (eval $ac_try) 2>&5
3551   ac_status=$?
3552   echo "$as_me:3552: \$? = $ac_status" >&5
3553   (exit "$ac_status"); }; }; then
3554   cf_cxx_works=yes
3555 else
3556   echo "$as_me: failed program was:" >&5
3557 cat "conftest.$ac_ext" >&5
3558 cf_cxx_works=no
3559 fi
3560 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3561                 CPPFLAGS="$save_CPPFLAGS"
3562
3563                 echo "$as_me:3563: result: $cf_cxx_works" >&5
3564 echo "${ECHO_T}$cf_cxx_works" >&6
3565                 if test "x$cf_cxx_works" = xno
3566                 then
3567                         { echo "$as_me:3567: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3568 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3569                         cf_with_cxx=no; CXX=""; GXX="";
3570                 fi
3571         fi
3572         ac_ext=c
3573 ac_cpp='$CPP $CPPFLAGS'
3574 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3575 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3576 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3577 ac_main_return="return"
3578
3579         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3580         if test "$CXX" = "g++" ; then
3581                 # Extract the first word of "g++", so it can be a program name with args.
3582 set dummy g++; ac_word=$2
3583 echo "$as_me:3583: checking for $ac_word" >&5
3584 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3585 if test "${ac_cv_path_CXX+set}" = set; then
3586   echo $ECHO_N "(cached) $ECHO_C" >&6
3587 else
3588   case $CXX in
3589   [\\/]* | ?:[\\/]*)
3590   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3591   ;;
3592   *)
3593   ac_save_IFS=$IFS; IFS=$ac_path_separator
3594 ac_dummy="$PATH"
3595 for ac_dir in $ac_dummy; do
3596   IFS=$ac_save_IFS
3597   test -z "$ac_dir" && ac_dir=.
3598   if $as_executable_p "$ac_dir/$ac_word"; then
3599    ac_cv_path_CXX="$ac_dir/$ac_word"
3600    echo "$as_me:3600: found $ac_dir/$ac_word" >&5
3601    break
3602 fi
3603 done
3604
3605   ;;
3606 esac
3607 fi
3608 CXX=$ac_cv_path_CXX
3609
3610 if test -n "$CXX"; then
3611   echo "$as_me:3611: result: $CXX" >&5
3612 echo "${ECHO_T}$CXX" >&6
3613 else
3614   echo "$as_me:3614: result: no" >&5
3615 echo "${ECHO_T}no" >&6
3616 fi
3617
3618         fi
3619         case "x$CXX" in
3620         (x|xg++)
3621                 { echo "$as_me:3621: WARNING: You don't have any C++ compiler, too bad" >&5
3622 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3623                 cf_with_cxx=no; CXX=""; GXX="";
3624                 ;;
3625         esac
3626 fi
3627
3628 GXX_VERSION=none
3629 if test "$GXX" = yes; then
3630         echo "$as_me:3630: checking version of ${CXX:-g++}" >&5
3631 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3632         GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3633         if test -z "$GXX_VERSION"
3634         then
3635                 GXX_VERSION=unknown
3636                 GXX=no
3637         fi
3638         echo "$as_me:3638: result: $GXX_VERSION" >&5
3639 echo "${ECHO_T}$GXX_VERSION" >&6
3640 fi
3641
3642 case "$GXX_VERSION" in
3643 ([1-9][0-9].*)
3644         ;;
3645 (1.*|2.[0-6]*)
3646         { echo "$as_me:3646: WARNING: templates do not work" >&5
3647 echo "$as_me: WARNING: templates do not work" >&2;}
3648         ;;
3649 esac
3650
3651 echo "$as_me:3651: checking if you want to build C++ binding and demo" >&5
3652 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3653
3654 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3655 if test "${with_cxx_binding+set}" = set; then
3656   withval="$with_cxx_binding"
3657   cf_with_cxx_binding=$withval
3658 else
3659   cf_with_cxx_binding=$cf_with_cxx
3660 fi;
3661 echo "$as_me:3661: result: $cf_with_cxx_binding" >&5
3662 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3663
3664 echo "$as_me:3664: checking if you want to build with Ada" >&5
3665 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3666 echo "$as_me:3666: result: $cf_with_ada" >&5
3667 echo "${ECHO_T}$cf_with_ada" >&6
3668
3669 echo "$as_me:3669: checking if you want to install terminal database" >&5
3670 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3671
3672 # Check whether --enable-db-install or --disable-db-install was given.
3673 if test "${enable_db_install+set}" = set; then
3674   enableval="$enable_db_install"
3675   cf_with_db_install=$enableval
3676 else
3677   cf_with_db_install=yes
3678 fi;
3679 echo "$as_me:3679: result: $cf_with_db_install" >&5
3680 echo "${ECHO_T}$cf_with_db_install" >&6
3681
3682 echo "$as_me:3682: checking if you want to install manpages" >&5
3683 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3684
3685 # Check whether --with-manpages or --without-manpages was given.
3686 if test "${with_manpages+set}" = set; then
3687   withval="$with_manpages"
3688   cf_with_manpages=$withval
3689 else
3690   cf_with_manpages=yes
3691 fi;
3692 echo "$as_me:3692: result: $cf_with_manpages" >&5
3693 echo "${ECHO_T}$cf_with_manpages" >&6
3694
3695 echo "$as_me:3695: checking if you want to build programs such as tic" >&5
3696 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3697
3698 # Check whether --with-progs or --without-progs was given.
3699 if test "${with_progs+set}" = set; then
3700   withval="$with_progs"
3701   cf_with_progs=$withval
3702 else
3703   cf_with_progs=yes
3704 fi;
3705 echo "$as_me:3705: result: $cf_with_progs" >&5
3706 echo "${ECHO_T}$cf_with_progs" >&6
3707
3708 echo "$as_me:3708: checking if you want to build test-programs" >&5
3709 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3710
3711 # Check whether --with-tests or --without-tests was given.
3712 if test "${with_tests+set}" = set; then
3713   withval="$with_tests"
3714   cf_with_tests=$withval
3715 else
3716   cf_with_tests=yes
3717 fi;
3718 echo "$as_me:3718: result: $cf_with_tests" >&5
3719 echo "${ECHO_T}$cf_with_tests" >&6
3720
3721 echo "$as_me:3721: checking if you wish to install curses.h" >&5
3722 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3723
3724 # Check whether --with-curses-h or --without-curses-h was given.
3725 if test "${with_curses_h+set}" = set; then
3726   withval="$with_curses_h"
3727   with_curses_h=$withval
3728 else
3729   with_curses_h=yes
3730 fi;
3731 echo "$as_me:3731: result: $with_curses_h" >&5
3732 echo "${ECHO_T}$with_curses_h" >&6
3733
3734 modules_to_build="ncurses"
3735 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3736 modules_to_build="$modules_to_build panel menu form"
3737
3738 test "$program_prefix" != NONE &&
3739   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3740 # Use a double $ so make ignores it.
3741 test "$program_suffix" != NONE &&
3742   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3743 # Double any \ or $.  echo might interpret backslashes.
3744 # By default was `s,x,x', remove it if useless.
3745 cat <<\_ACEOF >conftest.sed
3746 s/[\\$]/&&/g;s/;s,x,x,$//
3747 _ACEOF
3748 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3749 rm conftest.sed
3750
3751 for ac_prog in mawk gawk nawk awk
3752 do
3753   # Extract the first word of "$ac_prog", so it can be a program name with args.
3754 set dummy $ac_prog; ac_word=$2
3755 echo "$as_me:3755: checking for $ac_word" >&5
3756 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3757 if test "${ac_cv_prog_AWK+set}" = set; then
3758   echo $ECHO_N "(cached) $ECHO_C" >&6
3759 else
3760   if test -n "$AWK"; then
3761   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3762 else
3763   ac_save_IFS=$IFS; IFS=$ac_path_separator
3764 ac_dummy="$PATH"
3765 for ac_dir in $ac_dummy; do
3766   IFS=$ac_save_IFS
3767   test -z "$ac_dir" && ac_dir=.
3768   $as_executable_p "$ac_dir/$ac_word" || continue
3769 ac_cv_prog_AWK="$ac_prog"
3770 echo "$as_me:3770: found $ac_dir/$ac_word" >&5
3771 break
3772 done
3773
3774 fi
3775 fi
3776 AWK=$ac_cv_prog_AWK
3777 if test -n "$AWK"; then
3778   echo "$as_me:3778: result: $AWK" >&5
3779 echo "${ECHO_T}$AWK" >&6
3780 else
3781   echo "$as_me:3781: result: no" >&5
3782 echo "${ECHO_T}no" >&6
3783 fi
3784
3785   test -n "$AWK" && break
3786 done
3787
3788 test -z "$AWK" && { { echo "$as_me:3788: error: No awk program found" >&5
3789 echo "$as_me: error: No awk program found" >&2;}
3790    { (exit 1); exit 1; }; }
3791
3792 # Find a good install program.  We prefer a C program (faster),
3793 # so one script is as good as another.  But avoid the broken or
3794 # incompatible versions:
3795 # SysV /etc/install, /usr/sbin/install
3796 # SunOS /usr/etc/install
3797 # IRIX /sbin/install
3798 # AIX /bin/install
3799 # AmigaOS /C/install, which installs bootblocks on floppy discs
3800 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3801 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3802 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3803 # ./install, which can be erroneously created by make from ./install.sh.
3804 echo "$as_me:3804: checking for a BSD compatible install" >&5
3805 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3806 if test -z "$INSTALL"; then
3807 if test "${ac_cv_path_install+set}" = set; then
3808   echo $ECHO_N "(cached) $ECHO_C" >&6
3809 else
3810     ac_save_IFS=$IFS; IFS=$ac_path_separator
3811   for ac_dir in $PATH; do
3812     IFS=$ac_save_IFS
3813     # Account for people who put trailing slashes in PATH elements.
3814     case $ac_dir/ in
3815     / | ./ | .// | /cC/* \
3816     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3817     | /usr/ucb/* ) ;;
3818     *)
3819       # OSF1 and SCO ODT 3.0 have their own names for install.
3820       # Don't use installbsd from OSF since it installs stuff as root
3821       # by default.
3822       for ac_prog in ginstall scoinst install; do
3823         if $as_executable_p "$ac_dir/$ac_prog"; then
3824           if test $ac_prog = install &&
3825             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3826             # AIX install.  It has an incompatible calling convention.
3827             :
3828           elif test $ac_prog = install &&
3829             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3830             # program-specific install script used by HP pwplus--don't use.
3831             :
3832           else
3833             ac_cv_path_install="$ac_dir/$ac_prog -c"
3834             break 2
3835           fi
3836         fi
3837       done
3838       ;;
3839     esac
3840   done
3841
3842 fi
3843   if test "${ac_cv_path_install+set}" = set; then
3844     INSTALL=$ac_cv_path_install
3845   else
3846     # As a last resort, use the slow shell script.  We don't cache a
3847     # path for INSTALL within a source directory, because that will
3848     # break other packages using the cache if that directory is
3849     # removed, or if the path is relative.
3850     INSTALL=$ac_install_sh
3851   fi
3852 fi
3853 echo "$as_me:3853: result: $INSTALL" >&5
3854 echo "${ECHO_T}$INSTALL" >&6
3855
3856 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3857 # It thinks the first close brace ends the variable substitution.
3858 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3859
3860 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3861
3862 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3863
3864 case $INSTALL in
3865 (/*)
3866         ;;
3867 (*)
3868         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3869         test -z "$cf_dir" && cf_dir=.
3870         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3871         ;;
3872 esac
3873
3874 for ac_prog in lint cppcheck splint
3875 do
3876   # Extract the first word of "$ac_prog", so it can be a program name with args.
3877 set dummy $ac_prog; ac_word=$2
3878 echo "$as_me:3878: checking for $ac_word" >&5
3879 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3880 if test "${ac_cv_prog_LINT+set}" = set; then
3881   echo $ECHO_N "(cached) $ECHO_C" >&6
3882 else
3883   if test -n "$LINT"; then
3884   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3885 else
3886   ac_save_IFS=$IFS; IFS=$ac_path_separator
3887 ac_dummy="$PATH"
3888 for ac_dir in $ac_dummy; do
3889   IFS=$ac_save_IFS
3890   test -z "$ac_dir" && ac_dir=.
3891   $as_executable_p "$ac_dir/$ac_word" || continue
3892 ac_cv_prog_LINT="$ac_prog"
3893 echo "$as_me:3893: found $ac_dir/$ac_word" >&5
3894 break
3895 done
3896
3897 fi
3898 fi
3899 LINT=$ac_cv_prog_LINT
3900 if test -n "$LINT"; then
3901   echo "$as_me:3901: result: $LINT" >&5
3902 echo "${ECHO_T}$LINT" >&6
3903 else
3904   echo "$as_me:3904: result: no" >&5
3905 echo "${ECHO_T}no" >&6
3906 fi
3907
3908   test -n "$LINT" && break
3909 done
3910
3911 case "x$LINT" in
3912 (xcppcheck|x*/cppcheck)
3913         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3914         ;;
3915 esac
3916
3917 echo "$as_me:3917: checking whether ln -s works" >&5
3918 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3919 LN_S=$as_ln_s
3920 if test "$LN_S" = "ln -s"; then
3921   echo "$as_me:3921: result: yes" >&5
3922 echo "${ECHO_T}yes" >&6
3923 else
3924   echo "$as_me:3924: result: no, using $LN_S" >&5
3925 echo "${ECHO_T}no, using $LN_S" >&6
3926 fi
3927
3928 echo "$as_me:3928: checking if $LN_S -f options work" >&5
3929 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3930
3931 rm -f conf$$.src conf$$dst
3932 echo >conf$$.dst
3933 echo first >conf$$.src
3934 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3935         cf_prog_ln_sf=yes
3936 else
3937         cf_prog_ln_sf=no
3938 fi
3939 rm -f conf$$.dst conf$$src
3940 echo "$as_me:3940: result: $cf_prog_ln_sf" >&5
3941 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3942
3943 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3944
3945 echo "$as_me:3945: checking for long file names" >&5
3946 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3947 if test "${ac_cv_sys_long_file_names+set}" = set; then
3948   echo $ECHO_N "(cached) $ECHO_C" >&6
3949 else
3950   ac_cv_sys_long_file_names=yes
3951 # Test for long file names in all the places we know might matter:
3952 #      .                the current directory, where building will happen
3953 #      $prefix/lib      where we will be installing things
3954 #      $exec_prefix/lib likewise
3955 # eval it to expand exec_prefix.
3956 #      $TMPDIR          if set, where it might want to write temporary files
3957 # if $TMPDIR is not set:
3958 #      /tmp             where it might want to write temporary files
3959 #      /var/tmp         likewise
3960 #      /usr/tmp         likewise
3961 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3962   ac_tmpdirs=$TMPDIR
3963 else
3964   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3965 fi
3966 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3967   test -d "$ac_dir" || continue
3968   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3969   ac_xdir=$ac_dir/cf$$
3970   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3971   ac_tf1=$ac_xdir/conftest9012345
3972   ac_tf2=$ac_xdir/conftest9012346
3973   (echo 1 >"$ac_tf1") 2>/dev/null
3974   (echo 2 >"$ac_tf2") 2>/dev/null
3975   ac_val=`cat "$ac_tf1" 2>/dev/null`
3976   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3977     ac_cv_sys_long_file_names=no
3978     rm -rf "$ac_xdir" 2>/dev/null
3979     break
3980   fi
3981   rm -rf "$ac_xdir" 2>/dev/null
3982 done
3983 fi
3984 echo "$as_me:3984: result: $ac_cv_sys_long_file_names" >&5
3985 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3986 if test "$ac_cv_sys_long_file_names" = yes; then
3987
3988 cat >>confdefs.h <<\EOF
3989 #define HAVE_LONG_FILE_NAMES 1
3990 EOF
3991
3992 fi
3993
3994 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3995 # of package conflict.
3996 cf_config_suffix=
3997
3998 # Check whether --with-config-suffix or --without-config-suffix was given.
3999 if test "${with_config_suffix+set}" = set; then
4000   withval="$with_config_suffix"
4001   case "x$withval" in
4002         (xyes|xno)
4003                 { echo "$as_me:4003: WARNING: expected a value for config-suffix option" >&5
4004 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
4005                 ;;
4006         (*)     cf_config_suffix="$withval"
4007                 ;;
4008         esac
4009 fi;
4010
4011 # If we find pkg-config, check if we should install the ".pc" files.
4012
4013 echo "$as_me:4013: checking if you want to use pkg-config" >&5
4014 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4015
4016 # Check whether --with-pkg-config or --without-pkg-config was given.
4017 if test "${with_pkg_config+set}" = set; then
4018   withval="$with_pkg_config"
4019   cf_pkg_config=$withval
4020 else
4021   cf_pkg_config=yes
4022 fi;
4023 echo "$as_me:4023: result: $cf_pkg_config" >&5
4024 echo "${ECHO_T}$cf_pkg_config" >&6
4025
4026 case "$cf_pkg_config" in
4027 (no)
4028         PKG_CONFIG=none
4029         ;;
4030 (yes)
4031
4032 if test -n "$ac_tool_prefix"; then
4033   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4034 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4035 echo "$as_me:4035: checking for $ac_word" >&5
4036 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4037 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4038   echo $ECHO_N "(cached) $ECHO_C" >&6
4039 else
4040   case $PKG_CONFIG in
4041   [\\/]* | ?:[\\/]*)
4042   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4043   ;;
4044   *)
4045   ac_save_IFS=$IFS; IFS=$ac_path_separator
4046 ac_dummy="$PATH"
4047 for ac_dir in $ac_dummy; do
4048   IFS=$ac_save_IFS
4049   test -z "$ac_dir" && ac_dir=.
4050   if $as_executable_p "$ac_dir/$ac_word"; then
4051    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4052    echo "$as_me:4052: found $ac_dir/$ac_word" >&5
4053    break
4054 fi
4055 done
4056
4057   ;;
4058 esac
4059 fi
4060 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4061
4062 if test -n "$PKG_CONFIG"; then
4063   echo "$as_me:4063: result: $PKG_CONFIG" >&5
4064 echo "${ECHO_T}$PKG_CONFIG" >&6
4065 else
4066   echo "$as_me:4066: result: no" >&5
4067 echo "${ECHO_T}no" >&6
4068 fi
4069
4070 fi
4071 if test -z "$ac_cv_path_PKG_CONFIG"; then
4072   ac_pt_PKG_CONFIG=$PKG_CONFIG
4073   # Extract the first word of "pkg-config", so it can be a program name with args.
4074 set dummy pkg-config; ac_word=$2
4075 echo "$as_me:4075: checking for $ac_word" >&5
4076 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4077 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4078   echo $ECHO_N "(cached) $ECHO_C" >&6
4079 else
4080   case $ac_pt_PKG_CONFIG in
4081   [\\/]* | ?:[\\/]*)
4082   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4083   ;;
4084   *)
4085   ac_save_IFS=$IFS; IFS=$ac_path_separator
4086 ac_dummy="$PATH"
4087 for ac_dir in $ac_dummy; do
4088   IFS=$ac_save_IFS
4089   test -z "$ac_dir" && ac_dir=.
4090   if $as_executable_p "$ac_dir/$ac_word"; then
4091    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4092    echo "$as_me:4092: found $ac_dir/$ac_word" >&5
4093    break
4094 fi
4095 done
4096
4097   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4098   ;;
4099 esac
4100 fi
4101 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4102
4103 if test -n "$ac_pt_PKG_CONFIG"; then
4104   echo "$as_me:4104: result: $ac_pt_PKG_CONFIG" >&5
4105 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4106 else
4107   echo "$as_me:4107: result: no" >&5
4108 echo "${ECHO_T}no" >&6
4109 fi
4110
4111   PKG_CONFIG=$ac_pt_PKG_CONFIG
4112 else
4113   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4114 fi
4115
4116         ;;
4117 (*)
4118         PKG_CONFIG=$withval
4119         ;;
4120 esac
4121
4122 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4123 if test "$PKG_CONFIG" != none ; then
4124
4125 if test "x$prefix" != xNONE; then
4126         cf_path_syntax="$prefix"
4127 else
4128         cf_path_syntax="$ac_default_prefix"
4129 fi
4130
4131 case ".$PKG_CONFIG" in
4132 (.\$\(*\)*|.\'*\'*)
4133         ;;
4134 (..|./*|.\\*)
4135         ;;
4136 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4137         ;;
4138 (.\$\{*prefix\}*|.\$\{*dir\}*)
4139         eval PKG_CONFIG="$PKG_CONFIG"
4140         case ".$PKG_CONFIG" in
4141         (.NONE/*)
4142                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4143                 ;;
4144         esac
4145         ;;
4146 (.no|.NONE/*)
4147         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4148         ;;
4149 (*)
4150         { { echo "$as_me:4150: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4151 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4152    { (exit 1); exit 1; }; }
4153         ;;
4154 esac
4155
4156 elif test "x$cf_pkg_config" != xno ; then
4157         { echo "$as_me:4157: WARNING: pkg-config is not installed" >&5
4158 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4159 fi
4160
4161 case "$PKG_CONFIG" in
4162 (no|none|yes)
4163         echo "$as_me:4163: checking for pkg-config library directory" >&5
4164 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4165         ;;
4166 (*)
4167         echo "$as_me:4167: checking for $PKG_CONFIG library directory" >&5
4168 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4169         ;;
4170 esac
4171
4172 # if $PKG_CONFIG_LIBDIR is set, try to use that
4173 if test -n "$PKG_CONFIG_PATH"; then
4174         cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[     ]*,,' -e 's,[   ]*$,,'`
4175 elif test -n "$PKG_CONFIG_LIBDIR"; then
4176         cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,' -e 's,[   ]*$,,'`
4177 else
4178         cf_search_path=auto
4179 fi
4180
4181 # if the option is used, let that override.  otherwise default to "libdir"
4182
4183 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4184 if test "${with_pkg_config_libdir+set}" = set; then
4185   withval="$with_pkg_config_libdir"
4186   cf_search_path=$withval
4187 else
4188   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4189 fi;
4190
4191 case "x$cf_search_path" in
4192 (xlibdir)
4193         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4194         echo "$as_me:4194: result: $PKG_CONFIG_LIBDIR" >&5
4195 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4196         cf_search_path=
4197         ;;
4198 (x)
4199         ;;
4200 (x/*\ *)
4201         PKG_CONFIG_LIBDIR=
4202         ;;
4203 (x/*)
4204         PKG_CONFIG_LIBDIR="$cf_search_path"
4205         echo "$as_me:4205: result: $PKG_CONFIG_LIBDIR" >&5
4206 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4207         cf_search_path=
4208         ;;
4209 (xyes|xauto)
4210         echo "$as_me:4210: result: auto" >&5
4211 echo "${ECHO_T}auto" >&6
4212         cf_search_path=
4213         # Look for the library directory using the same prefix as the executable
4214         echo "$as_me:4214: checking for search-list" >&5
4215 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4216         if test "x$PKG_CONFIG" != xnone
4217         then
4218                 # works for pkg-config since version 0.24 (2009)
4219                 # works for pkgconf since version 0.8.3 (2012)
4220                 for cf_pkg_program in \
4221                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4222                         pkg-config \
4223                         pkgconf
4224                 do
4225                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4226                         test -n "$cf_search_path" && break
4227                 done
4228
4229                 # works for pkg-config since import in 2005 of original 2001 HP code.
4230                 test -z "$cf_search_path" && \
4231                 cf_search_path=`
4232                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4233 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4234         sub(\"^[^']*'\",\"\"); \
4235         sub(\"'.*\",\"\"); \
4236         printf \" %s\", \\$0; } \
4237 { next; } \
4238 "`
4239         fi
4240
4241         echo "$as_me:4241: result: $cf_search_path" >&5
4242 echo "${ECHO_T}$cf_search_path" >&6
4243         ;;
4244 (*)
4245         { { echo "$as_me:4245: error: Unexpected option value: $cf_search_path" >&5
4246 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4247    { (exit 1); exit 1; }; }
4248         ;;
4249 esac
4250
4251 if test -n "$cf_search_path"
4252 then
4253         echo "$as_me:4253: checking for first directory" >&5
4254 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4255         cf_pkg_config_path=none
4256         for cf_config in $cf_search_path
4257         do
4258                 if test -d "$cf_config"
4259                 then
4260                         cf_pkg_config_path=$cf_config
4261                         break
4262                 fi
4263         done
4264         echo "$as_me:4264: result: $cf_pkg_config_path" >&5
4265 echo "${ECHO_T}$cf_pkg_config_path" >&6
4266
4267         if test "x$cf_pkg_config_path" != xnone ; then
4268                 # limit this to the first directory found
4269                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4270         fi
4271
4272         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4273         then
4274                 echo "$as_me:4274: checking for workaround" >&5
4275 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4276                 if test "$prefix" = "NONE" ; then
4277                         cf_prefix="$ac_default_prefix"
4278                 else
4279                         cf_prefix="$prefix"
4280                 fi
4281                 eval cf_libdir=$libdir
4282                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4283                 cf_backup=
4284                 for cf_config in $cf_search_path
4285                 do
4286                         case $cf_config in
4287                         $cf_libdir/pkgconfig)
4288                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4289                                 break
4290                                 ;;
4291                         *)
4292                                 test -z "$cf_backup" && cf_backup=$cf_config
4293                                 ;;
4294                         esac
4295                 done
4296                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4297                 echo "$as_me:4297: result: $PKG_CONFIG_LIBDIR" >&5
4298 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4299         fi
4300 fi
4301
4302 if test "x$PKG_CONFIG" != xnone
4303 then
4304         echo "$as_me:4304: checking if we should install .pc files for $PKG_CONFIG" >&5
4305 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4306 else
4307         echo "$as_me:4307: checking if we should install .pc files" >&5
4308 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4309 fi
4310
4311 # Check whether --enable-pc-files or --disable-pc-files was given.
4312 if test "${enable_pc_files+set}" = set; then
4313   enableval="$enable_pc_files"
4314   enable_pc_files=$enableval
4315 else
4316   enable_pc_files=no
4317 fi;
4318 echo "$as_me:4318: result: $enable_pc_files" >&5
4319 echo "${ECHO_T}$enable_pc_files" >&6
4320
4321 if test "x$enable_pc_files" != xno
4322 then
4323         MAKE_PC_FILES=
4324         case "x$PKG_CONFIG_LIBDIR" in
4325         (xno|xnone|xyes|x)
4326                 { echo "$as_me:4326: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4327 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4328                 ;;
4329         (*)
4330                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4331
4332 if test "x$prefix" != xNONE; then
4333         cf_path_syntax="$prefix"
4334 else
4335         cf_path_syntax="$ac_default_prefix"
4336 fi
4337
4338 case ".$cf_pkg_config_libdir" in
4339 (.\$\(*\)*|.\'*\'*)
4340         ;;
4341 (..|./*|.\\*)
4342         ;;
4343 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4344         ;;
4345 (.\$\{*prefix\}*|.\$\{*dir\}*)
4346         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4347         case ".$cf_pkg_config_libdir" in
4348         (.NONE/*)
4349                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4350                 ;;
4351         esac
4352         ;;
4353 (.no|.NONE/*)
4354         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4355         ;;
4356 (*)
4357         { { echo "$as_me:4357: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4358 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4359    { (exit 1); exit 1; }; }
4360         ;;
4361 esac
4362
4363                 ;;
4364         esac
4365 else
4366         MAKE_PC_FILES="#"
4367 fi
4368
4369 if test -z "$MAKE_PC_FILES"
4370 then
4371         echo "$as_me:4371: checking for suffix to add to pkg-config files" >&5
4372 echo $ECHO_N "checking for suffix to add to pkg-config files... $ECHO_C" >&6
4373
4374 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4375 if test "${with_pc_suffix+set}" = set; then
4376   withval="$with_pc_suffix"
4377   case "x$withval" in
4378         (xyes|xno)
4379                 PC_MODULE_SUFFIX=
4380                 ;;
4381         (*)     PC_MODULE_SUFFIX="$withval"
4382                 ;;
4383         esac
4384 fi;
4385         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4386         echo "$as_me:4386: result: $PC_MODULE_SUFFIX" >&5
4387 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4388         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4389
4390 fi
4391
4392 echo "$as_me:4392: checking if we should assume mixed-case filenames" >&5
4393 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4394
4395 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4396 if test "${enable_mixed_case+set}" = set; then
4397   enableval="$enable_mixed_case"
4398   enable_mixedcase=$enableval
4399 else
4400   enable_mixedcase=auto
4401 fi;
4402 echo "$as_me:4402: result: $enable_mixedcase" >&5
4403 echo "${ECHO_T}$enable_mixedcase" >&6
4404 if test "$enable_mixedcase" = "auto" ; then
4405
4406 echo "$as_me:4406: checking if filesystem supports mixed-case filenames" >&5
4407 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4408 if test "${cf_cv_mixedcase+set}" = set; then
4409   echo $ECHO_N "(cached) $ECHO_C" >&6
4410 else
4411
4412 if test "$cross_compiling" = yes ; then
4413         case "$target_alias" in
4414         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4415                 cf_cv_mixedcase=no
4416                 ;;
4417         (*)
4418                 cf_cv_mixedcase=yes
4419                 ;;
4420         esac
4421 else
4422         rm -f conftest CONFTEST
4423         echo test >conftest
4424         if test -f CONFTEST ; then
4425                 cf_cv_mixedcase=no
4426         else
4427                 cf_cv_mixedcase=yes
4428         fi
4429         rm -f conftest CONFTEST
4430 fi
4431
4432 fi
4433 echo "$as_me:4433: result: $cf_cv_mixedcase" >&5
4434 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4435 test "$cf_cv_mixedcase" = yes &&
4436 cat >>confdefs.h <<\EOF
4437 #define MIXEDCASE_FILENAMES 1
4438 EOF
4439
4440 else
4441         cf_cv_mixedcase=$enable_mixedcase
4442         if test "x$enable_mixedcase" = "xyes" ; then
4443
4444 cat >>confdefs.h <<\EOF
4445 #define MIXEDCASE_FILENAMES 1
4446 EOF
4447
4448         fi
4449 fi
4450
4451 # do this after mixed-case option (tags/TAGS is not as important as tic).
4452 echo "$as_me:4452: checking whether ${MAKE-make} sets \${MAKE}" >&5
4453 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4454 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4455 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4456   echo $ECHO_N "(cached) $ECHO_C" >&6
4457 else
4458   cat >conftest.make <<\EOF
4459 all:
4460         @echo 'ac_maketemp="${MAKE}"'
4461 EOF
4462 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4463 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4464 if test -n "$ac_maketemp"; then
4465   eval ac_cv_prog_make_${ac_make}_set=yes
4466 else
4467   eval ac_cv_prog_make_${ac_make}_set=no
4468 fi
4469 rm -f conftest.make
4470 fi
4471 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4472   echo "$as_me:4472: result: yes" >&5
4473 echo "${ECHO_T}yes" >&6
4474   SET_MAKE=
4475 else
4476   echo "$as_me:4476: result: no" >&5
4477 echo "${ECHO_T}no" >&6
4478   SET_MAKE="MAKE=${MAKE-make}"
4479 fi
4480
4481 echo "$as_me:4481: checking for \".PHONY\" make-support" >&5
4482 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4483 if test "${cf_cv_make_PHONY+set}" = set; then
4484   echo $ECHO_N "(cached) $ECHO_C" >&6
4485 else
4486
4487         rm -rf conftest*
4488         (
4489                 mkdir conftest || exit 1
4490                 cd conftest
4491                 cat >makefile <<'CF_EOF'
4492 .PHONY: always
4493 DATA=0
4494 always: always.out
4495         @echo "** making $@ $(DATA)"
4496 once: once.out
4497         @echo "** making $@ $(DATA)"
4498 always.out:
4499         @echo "** making $@ $(DATA)"
4500         echo $(DATA) > $@
4501 once.out:
4502         @echo "** making $@ $(DATA)"
4503         echo $(DATA) > $@
4504 CF_EOF
4505                 for cf_data in 1 2 3
4506                 do
4507                         ${MAKE:-make} always DATA=$cf_data
4508                         ${MAKE:-make} once   DATA=$cf_data
4509                         ${MAKE:-make} -t always once
4510                         if test -f always ; then
4511                                 echo "no (case 1)" > ../conftest.tmp
4512                         elif test ! -f always.out ; then
4513                                 echo "no (case 2)" > ../conftest.tmp
4514                         elif test ! -f once.out ; then
4515                                 echo "no (case 3)" > ../conftest.tmp
4516                         elif ! cmp -s always.out once.out ; then
4517                                 echo "no (case 4)" > ../conftest.tmp
4518                                 diff always.out once.out
4519                         else
4520                                 cf_check="`cat always.out`"
4521                                 if test "x$cf_check" != "x$cf_data" ; then
4522                                         echo "no (case 5)" > ../conftest.tmp
4523                                 else
4524                                         echo yes > ../conftest.tmp
4525                                         rm -f ./*.out
4526                                         continue
4527                                 fi
4528                         fi
4529                         break
4530                 done
4531         ) >&5 2>&1
4532         cf_cv_make_PHONY="`cat conftest.tmp`"
4533         rm -rf conftest*
4534
4535 fi
4536 echo "$as_me:4536: result: $cf_cv_make_PHONY" >&5
4537 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4538 MAKE_NO_PHONY="#"
4539 MAKE_PHONY="#"
4540 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4541 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4542
4543 for ac_prog in exctags ctags
4544 do
4545   # Extract the first word of "$ac_prog", so it can be a program name with args.
4546 set dummy $ac_prog; ac_word=$2
4547 echo "$as_me:4547: checking for $ac_word" >&5
4548 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4549 if test "${ac_cv_prog_CTAGS+set}" = set; then
4550   echo $ECHO_N "(cached) $ECHO_C" >&6
4551 else
4552   if test -n "$CTAGS"; then
4553   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4554 else
4555   ac_save_IFS=$IFS; IFS=$ac_path_separator
4556 ac_dummy="$PATH"
4557 for ac_dir in $ac_dummy; do
4558   IFS=$ac_save_IFS
4559   test -z "$ac_dir" && ac_dir=.
4560   $as_executable_p "$ac_dir/$ac_word" || continue
4561 ac_cv_prog_CTAGS="$ac_prog"
4562 echo "$as_me:4562: found $ac_dir/$ac_word" >&5
4563 break
4564 done
4565
4566 fi
4567 fi
4568 CTAGS=$ac_cv_prog_CTAGS
4569 if test -n "$CTAGS"; then
4570   echo "$as_me:4570: result: $CTAGS" >&5
4571 echo "${ECHO_T}$CTAGS" >&6
4572 else
4573   echo "$as_me:4573: result: no" >&5
4574 echo "${ECHO_T}no" >&6
4575 fi
4576
4577   test -n "$CTAGS" && break
4578 done
4579
4580 for ac_prog in exetags etags
4581 do
4582   # Extract the first word of "$ac_prog", so it can be a program name with args.
4583 set dummy $ac_prog; ac_word=$2
4584 echo "$as_me:4584: checking for $ac_word" >&5
4585 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4586 if test "${ac_cv_prog_ETAGS+set}" = set; then
4587   echo $ECHO_N "(cached) $ECHO_C" >&6
4588 else
4589   if test -n "$ETAGS"; then
4590   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4591 else
4592   ac_save_IFS=$IFS; IFS=$ac_path_separator
4593 ac_dummy="$PATH"
4594 for ac_dir in $ac_dummy; do
4595   IFS=$ac_save_IFS
4596   test -z "$ac_dir" && ac_dir=.
4597   $as_executable_p "$ac_dir/$ac_word" || continue
4598 ac_cv_prog_ETAGS="$ac_prog"
4599 echo "$as_me:4599: found $ac_dir/$ac_word" >&5
4600 break
4601 done
4602
4603 fi
4604 fi
4605 ETAGS=$ac_cv_prog_ETAGS
4606 if test -n "$ETAGS"; then
4607   echo "$as_me:4607: result: $ETAGS" >&5
4608 echo "${ECHO_T}$ETAGS" >&6
4609 else
4610   echo "$as_me:4610: result: no" >&5
4611 echo "${ECHO_T}no" >&6
4612 fi
4613
4614   test -n "$ETAGS" && break
4615 done
4616
4617 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4618 set dummy ${CTAGS:-ctags}; ac_word=$2
4619 echo "$as_me:4619: checking for $ac_word" >&5
4620 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4621 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4622   echo $ECHO_N "(cached) $ECHO_C" >&6
4623 else
4624   if test -n "$MAKE_LOWER_TAGS"; then
4625   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4626 else
4627   ac_save_IFS=$IFS; IFS=$ac_path_separator
4628 ac_dummy="$PATH"
4629 for ac_dir in $ac_dummy; do
4630   IFS=$ac_save_IFS
4631   test -z "$ac_dir" && ac_dir=.
4632   $as_executable_p "$ac_dir/$ac_word" || continue
4633 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4634 echo "$as_me:4634: found $ac_dir/$ac_word" >&5
4635 break
4636 done
4637
4638   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4639 fi
4640 fi
4641 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4642 if test -n "$MAKE_LOWER_TAGS"; then
4643   echo "$as_me:4643: result: $MAKE_LOWER_TAGS" >&5
4644 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4645 else
4646   echo "$as_me:4646: result: no" >&5
4647 echo "${ECHO_T}no" >&6
4648 fi
4649
4650 if test "$cf_cv_mixedcase" = yes ; then
4651         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4652 set dummy ${ETAGS:-etags}; ac_word=$2
4653 echo "$as_me:4653: checking for $ac_word" >&5
4654 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4655 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4656   echo $ECHO_N "(cached) $ECHO_C" >&6
4657 else
4658   if test -n "$MAKE_UPPER_TAGS"; then
4659   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4660 else
4661   ac_save_IFS=$IFS; IFS=$ac_path_separator
4662 ac_dummy="$PATH"
4663 for ac_dir in $ac_dummy; do
4664   IFS=$ac_save_IFS
4665   test -z "$ac_dir" && ac_dir=.
4666   $as_executable_p "$ac_dir/$ac_word" || continue
4667 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4668 echo "$as_me:4668: found $ac_dir/$ac_word" >&5
4669 break
4670 done
4671
4672   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4673 fi
4674 fi
4675 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4676 if test -n "$MAKE_UPPER_TAGS"; then
4677   echo "$as_me:4677: result: $MAKE_UPPER_TAGS" >&5
4678 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4679 else
4680   echo "$as_me:4680: result: no" >&5
4681 echo "${ECHO_T}no" >&6
4682 fi
4683
4684 else
4685         MAKE_UPPER_TAGS=no
4686 fi
4687
4688 if test "$MAKE_UPPER_TAGS" = yes ; then
4689         MAKE_UPPER_TAGS=
4690 else
4691         MAKE_UPPER_TAGS="#"
4692 fi
4693
4694 if test "$MAKE_LOWER_TAGS" = yes ; then
4695         MAKE_LOWER_TAGS=
4696 else
4697         MAKE_LOWER_TAGS="#"
4698 fi
4699
4700 echo "$as_me:4700: checking for makeflags variable" >&5
4701 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4702 if test "${cf_cv_makeflags+set}" = set; then
4703   echo $ECHO_N "(cached) $ECHO_C" >&6
4704 else
4705
4706         cf_cv_makeflags=''
4707         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4708         do
4709                 cat >cf_makeflags.tmp <<CF_EOF
4710 SHELL = $SHELL
4711 all :
4712         @ echo '.$cf_option'
4713 CF_EOF
4714                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4715                 case "$cf_result" in
4716                 (.*k|.*kw)
4717                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4718                         case "$cf_result" in
4719                         (.*CC=*)        cf_cv_makeflags=
4720                                 ;;
4721                         (*)     cf_cv_makeflags=$cf_option
4722                                 ;;
4723                         esac
4724                         break
4725                         ;;
4726                 (.-)
4727                         ;;
4728                 (*)
4729
4730 echo "${as_me:-configure}:4730: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4731
4732                         ;;
4733                 esac
4734         done
4735         rm -f cf_makeflags.tmp
4736
4737 fi
4738 echo "$as_me:4738: result: $cf_cv_makeflags" >&5
4739 echo "${ECHO_T}$cf_cv_makeflags" >&6
4740
4741 if test -n "$ac_tool_prefix"; then
4742   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4743 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4744 echo "$as_me:4744: checking for $ac_word" >&5
4745 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4746 if test "${ac_cv_prog_RANLIB+set}" = set; then
4747   echo $ECHO_N "(cached) $ECHO_C" >&6
4748 else
4749   if test -n "$RANLIB"; then
4750   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4751 else
4752   ac_save_IFS=$IFS; IFS=$ac_path_separator
4753 ac_dummy="$PATH"
4754 for ac_dir in $ac_dummy; do
4755   IFS=$ac_save_IFS
4756   test -z "$ac_dir" && ac_dir=.
4757   $as_executable_p "$ac_dir/$ac_word" || continue
4758 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4759 echo "$as_me:4759: found $ac_dir/$ac_word" >&5
4760 break
4761 done
4762
4763 fi
4764 fi
4765 RANLIB=$ac_cv_prog_RANLIB
4766 if test -n "$RANLIB"; then
4767   echo "$as_me:4767: result: $RANLIB" >&5
4768 echo "${ECHO_T}$RANLIB" >&6
4769 else
4770   echo "$as_me:4770: result: no" >&5
4771 echo "${ECHO_T}no" >&6
4772 fi
4773
4774 fi
4775 if test -z "$ac_cv_prog_RANLIB"; then
4776   ac_ct_RANLIB=$RANLIB
4777   # Extract the first word of "ranlib", so it can be a program name with args.
4778 set dummy ranlib; ac_word=$2
4779 echo "$as_me:4779: checking for $ac_word" >&5
4780 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4781 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4782   echo $ECHO_N "(cached) $ECHO_C" >&6
4783 else
4784   if test -n "$ac_ct_RANLIB"; then
4785   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4786 else
4787   ac_save_IFS=$IFS; IFS=$ac_path_separator
4788 ac_dummy="$PATH"
4789 for ac_dir in $ac_dummy; do
4790   IFS=$ac_save_IFS
4791   test -z "$ac_dir" && ac_dir=.
4792   $as_executable_p "$ac_dir/$ac_word" || continue
4793 ac_cv_prog_ac_ct_RANLIB="ranlib"
4794 echo "$as_me:4794: found $ac_dir/$ac_word" >&5
4795 break
4796 done
4797
4798   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4799 fi
4800 fi
4801 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4802 if test -n "$ac_ct_RANLIB"; then
4803   echo "$as_me:4803: result: $ac_ct_RANLIB" >&5
4804 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4805 else
4806   echo "$as_me:4806: result: no" >&5
4807 echo "${ECHO_T}no" >&6
4808 fi
4809
4810   RANLIB=$ac_ct_RANLIB
4811 else
4812   RANLIB="$ac_cv_prog_RANLIB"
4813 fi
4814
4815 if test -n "$ac_tool_prefix"; then
4816   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4817 set dummy ${ac_tool_prefix}ld; ac_word=$2
4818 echo "$as_me:4818: checking for $ac_word" >&5
4819 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4820 if test "${ac_cv_prog_LD+set}" = set; then
4821   echo $ECHO_N "(cached) $ECHO_C" >&6
4822 else
4823   if test -n "$LD"; then
4824   ac_cv_prog_LD="$LD" # Let the user override the test.
4825 else
4826   ac_save_IFS=$IFS; IFS=$ac_path_separator
4827 ac_dummy="$PATH"
4828 for ac_dir in $ac_dummy; do
4829   IFS=$ac_save_IFS
4830   test -z "$ac_dir" && ac_dir=.
4831   $as_executable_p "$ac_dir/$ac_word" || continue
4832 ac_cv_prog_LD="${ac_tool_prefix}ld"
4833 echo "$as_me:4833: found $ac_dir/$ac_word" >&5
4834 break
4835 done
4836
4837 fi
4838 fi
4839 LD=$ac_cv_prog_LD
4840 if test -n "$LD"; then
4841   echo "$as_me:4841: result: $LD" >&5
4842 echo "${ECHO_T}$LD" >&6
4843 else
4844   echo "$as_me:4844: result: no" >&5
4845 echo "${ECHO_T}no" >&6
4846 fi
4847
4848 fi
4849 if test -z "$ac_cv_prog_LD"; then
4850   ac_ct_LD=$LD
4851   # Extract the first word of "ld", so it can be a program name with args.
4852 set dummy ld; ac_word=$2
4853 echo "$as_me:4853: checking for $ac_word" >&5
4854 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4855 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4856   echo $ECHO_N "(cached) $ECHO_C" >&6
4857 else
4858   if test -n "$ac_ct_LD"; then
4859   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4860 else
4861   ac_save_IFS=$IFS; IFS=$ac_path_separator
4862 ac_dummy="$PATH"
4863 for ac_dir in $ac_dummy; do
4864   IFS=$ac_save_IFS
4865   test -z "$ac_dir" && ac_dir=.
4866   $as_executable_p "$ac_dir/$ac_word" || continue
4867 ac_cv_prog_ac_ct_LD="ld"
4868 echo "$as_me:4868: found $ac_dir/$ac_word" >&5
4869 break
4870 done
4871
4872   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4873 fi
4874 fi
4875 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4876 if test -n "$ac_ct_LD"; then
4877   echo "$as_me:4877: result: $ac_ct_LD" >&5
4878 echo "${ECHO_T}$ac_ct_LD" >&6
4879 else
4880   echo "$as_me:4880: result: no" >&5
4881 echo "${ECHO_T}no" >&6
4882 fi
4883
4884   LD=$ac_ct_LD
4885 else
4886   LD="$ac_cv_prog_LD"
4887 fi
4888
4889 if test -n "$ac_tool_prefix"; then
4890   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4891 set dummy ${ac_tool_prefix}ar; ac_word=$2
4892 echo "$as_me:4892: checking for $ac_word" >&5
4893 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4894 if test "${ac_cv_prog_AR+set}" = set; then
4895   echo $ECHO_N "(cached) $ECHO_C" >&6
4896 else
4897   if test -n "$AR"; then
4898   ac_cv_prog_AR="$AR" # Let the user override the test.
4899 else
4900   ac_save_IFS=$IFS; IFS=$ac_path_separator
4901 ac_dummy="$PATH"
4902 for ac_dir in $ac_dummy; do
4903   IFS=$ac_save_IFS
4904   test -z "$ac_dir" && ac_dir=.
4905   $as_executable_p "$ac_dir/$ac_word" || continue
4906 ac_cv_prog_AR="${ac_tool_prefix}ar"
4907 echo "$as_me:4907: found $ac_dir/$ac_word" >&5
4908 break
4909 done
4910
4911 fi
4912 fi
4913 AR=$ac_cv_prog_AR
4914 if test -n "$AR"; then
4915   echo "$as_me:4915: result: $AR" >&5
4916 echo "${ECHO_T}$AR" >&6
4917 else
4918   echo "$as_me:4918: result: no" >&5
4919 echo "${ECHO_T}no" >&6
4920 fi
4921
4922 fi
4923 if test -z "$ac_cv_prog_AR"; then
4924   ac_ct_AR=$AR
4925   # Extract the first word of "ar", so it can be a program name with args.
4926 set dummy ar; ac_word=$2
4927 echo "$as_me:4927: checking for $ac_word" >&5
4928 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4929 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4930   echo $ECHO_N "(cached) $ECHO_C" >&6
4931 else
4932   if test -n "$ac_ct_AR"; then
4933   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4934 else
4935   ac_save_IFS=$IFS; IFS=$ac_path_separator
4936 ac_dummy="$PATH"
4937 for ac_dir in $ac_dummy; do
4938   IFS=$ac_save_IFS
4939   test -z "$ac_dir" && ac_dir=.
4940   $as_executable_p "$ac_dir/$ac_word" || continue
4941 ac_cv_prog_ac_ct_AR="ar"
4942 echo "$as_me:4942: found $ac_dir/$ac_word" >&5
4943 break
4944 done
4945
4946   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4947 fi
4948 fi
4949 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4950 if test -n "$ac_ct_AR"; then
4951   echo "$as_me:4951: result: $ac_ct_AR" >&5
4952 echo "${ECHO_T}$ac_ct_AR" >&6
4953 else
4954   echo "$as_me:4954: result: no" >&5
4955 echo "${ECHO_T}no" >&6
4956 fi
4957
4958   AR=$ac_ct_AR
4959 else
4960   AR="$ac_cv_prog_AR"
4961 fi
4962
4963 if test -n "$ac_tool_prefix"; then
4964   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4965 set dummy ${ac_tool_prefix}nm; ac_word=$2
4966 echo "$as_me:4966: checking for $ac_word" >&5
4967 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4968 if test "${ac_cv_prog_NM+set}" = set; then
4969   echo $ECHO_N "(cached) $ECHO_C" >&6
4970 else
4971   if test -n "$NM"; then
4972   ac_cv_prog_NM="$NM" # Let the user override the test.
4973 else
4974   ac_save_IFS=$IFS; IFS=$ac_path_separator
4975 ac_dummy="$PATH"
4976 for ac_dir in $ac_dummy; do
4977   IFS=$ac_save_IFS
4978   test -z "$ac_dir" && ac_dir=.
4979   $as_executable_p "$ac_dir/$ac_word" || continue
4980 ac_cv_prog_NM="${ac_tool_prefix}nm"
4981 echo "$as_me:4981: found $ac_dir/$ac_word" >&5
4982 break
4983 done
4984
4985 fi
4986 fi
4987 NM=$ac_cv_prog_NM
4988 if test -n "$NM"; then
4989   echo "$as_me:4989: result: $NM" >&5
4990 echo "${ECHO_T}$NM" >&6
4991 else
4992   echo "$as_me:4992: result: no" >&5
4993 echo "${ECHO_T}no" >&6
4994 fi
4995
4996 fi
4997 if test -z "$ac_cv_prog_NM"; then
4998   ac_ct_NM=$NM
4999   # Extract the first word of "nm", so it can be a program name with args.
5000 set dummy nm; ac_word=$2
5001 echo "$as_me:5001: checking for $ac_word" >&5
5002 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5003 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
5004   echo $ECHO_N "(cached) $ECHO_C" >&6
5005 else
5006   if test -n "$ac_ct_NM"; then
5007   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5008 else
5009   ac_save_IFS=$IFS; IFS=$ac_path_separator
5010 ac_dummy="$PATH"
5011 for ac_dir in $ac_dummy; do
5012   IFS=$ac_save_IFS
5013   test -z "$ac_dir" && ac_dir=.
5014   $as_executable_p "$ac_dir/$ac_word" || continue
5015 ac_cv_prog_ac_ct_NM="nm"
5016 echo "$as_me:5016: found $ac_dir/$ac_word" >&5
5017 break
5018 done
5019
5020   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5021 fi
5022 fi
5023 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5024 if test -n "$ac_ct_NM"; then
5025   echo "$as_me:5025: result: $ac_ct_NM" >&5
5026 echo "${ECHO_T}$ac_ct_NM" >&6
5027 else
5028   echo "$as_me:5028: result: no" >&5
5029 echo "${ECHO_T}no" >&6
5030 fi
5031
5032   NM=$ac_ct_NM
5033 else
5034   NM="$ac_cv_prog_NM"
5035 fi
5036
5037 if test -n "$ac_tool_prefix"; then
5038   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5039 set dummy ${ac_tool_prefix}ar; ac_word=$2
5040 echo "$as_me:5040: checking for $ac_word" >&5
5041 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5042 if test "${ac_cv_prog_AR+set}" = set; then
5043   echo $ECHO_N "(cached) $ECHO_C" >&6
5044 else
5045   if test -n "$AR"; then
5046   ac_cv_prog_AR="$AR" # Let the user override the test.
5047 else
5048   ac_save_IFS=$IFS; IFS=$ac_path_separator
5049 ac_dummy="$PATH"
5050 for ac_dir in $ac_dummy; do
5051   IFS=$ac_save_IFS
5052   test -z "$ac_dir" && ac_dir=.
5053   $as_executable_p "$ac_dir/$ac_word" || continue
5054 ac_cv_prog_AR="${ac_tool_prefix}ar"
5055 echo "$as_me:5055: found $ac_dir/$ac_word" >&5
5056 break
5057 done
5058
5059 fi
5060 fi
5061 AR=$ac_cv_prog_AR
5062 if test -n "$AR"; then
5063   echo "$as_me:5063: result: $AR" >&5
5064 echo "${ECHO_T}$AR" >&6
5065 else
5066   echo "$as_me:5066: result: no" >&5
5067 echo "${ECHO_T}no" >&6
5068 fi
5069
5070 fi
5071 if test -z "$ac_cv_prog_AR"; then
5072   ac_ct_AR=$AR
5073   # Extract the first word of "ar", so it can be a program name with args.
5074 set dummy ar; ac_word=$2
5075 echo "$as_me:5075: checking for $ac_word" >&5
5076 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5077 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5078   echo $ECHO_N "(cached) $ECHO_C" >&6
5079 else
5080   if test -n "$ac_ct_AR"; then
5081   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5082 else
5083   ac_save_IFS=$IFS; IFS=$ac_path_separator
5084 ac_dummy="$PATH"
5085 for ac_dir in $ac_dummy; do
5086   IFS=$ac_save_IFS
5087   test -z "$ac_dir" && ac_dir=.
5088   $as_executable_p "$ac_dir/$ac_word" || continue
5089 ac_cv_prog_ac_ct_AR="ar"
5090 echo "$as_me:5090: found $ac_dir/$ac_word" >&5
5091 break
5092 done
5093
5094   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5095 fi
5096 fi
5097 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5098 if test -n "$ac_ct_AR"; then
5099   echo "$as_me:5099: result: $ac_ct_AR" >&5
5100 echo "${ECHO_T}$ac_ct_AR" >&6
5101 else
5102   echo "$as_me:5102: result: no" >&5
5103 echo "${ECHO_T}no" >&6
5104 fi
5105
5106   AR=$ac_ct_AR
5107 else
5108   AR="$ac_cv_prog_AR"
5109 fi
5110
5111 echo "$as_me:5111: checking for options to update archives" >&5
5112 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5113 if test "${cf_cv_ar_flags+set}" = set; then
5114   echo $ECHO_N "(cached) $ECHO_C" >&6
5115 else
5116
5117         case "$cf_cv_system_name" in
5118         (*-msvc*)
5119                 cf_cv_ar_flags=''
5120                 cat >mk_static_lib.sh <<-EOF
5121                 #!$SHELL
5122                 MSVC_BIN="$AR"
5123                 out="\$1"
5124                 shift
5125                 exec \$MSVC_BIN -out:"\$out" \$@
5126                 EOF
5127                 chmod +x mk_static_lib.sh
5128                 AR=`pwd`/mk_static_lib.sh
5129                 ;;
5130         (*)
5131                 cf_cv_ar_flags=unknown
5132                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5133                 do
5134
5135                         # check if $ARFLAGS already contains this choice
5136                         if test "x$ARFLAGS" != "x" ; then
5137                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5138                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5139                                         cf_cv_ar_flags=
5140                                         break
5141                                 fi
5142                         fi
5143
5144                         rm -f "conftest.$ac_cv_objext"
5145                         rm -f conftest.a
5146
5147                         cat >"conftest.$ac_ext" <<EOF
5148 #line 5148 "configure"
5149 int     testdata[3] = { 123, 456, 789 };
5150 EOF
5151                         if { (eval echo "$as_me:5151: \"$ac_compile\"") >&5
5152   (eval $ac_compile) 2>&5
5153   ac_status=$?
5154   echo "$as_me:5154: \$? = $ac_status" >&5
5155   (exit "$ac_status"); } ; then
5156                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5157                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5158                                 if test -f conftest.a ; then
5159                                         cf_cv_ar_flags="$cf_ar_flags"
5160                                         break
5161                                 fi
5162                         else
5163                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5164
5165 echo "${as_me:-configure}:5165: testing cannot compile test-program ..." 1>&5
5166
5167                                 break
5168                         fi
5169                 done
5170                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5171                 ;;
5172         esac
5173
5174 fi
5175 echo "$as_me:5175: result: $cf_cv_ar_flags" >&5
5176 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5177
5178 if test -n "$ARFLAGS" ; then
5179         if test -n "$cf_cv_ar_flags" ; then
5180                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5181         fi
5182 else
5183         ARFLAGS=$cf_cv_ar_flags
5184 fi
5185
5186 echo "$as_me:5186: checking for an installation directory prefix" >&5
5187 echo $ECHO_N "checking for an installation directory prefix... $ECHO_C" >&6
5188
5189 # Check whether --with-install-prefix or --without-install-prefix was given.
5190 if test "${with_install_prefix+set}" = set; then
5191   withval="$with_install_prefix"
5192   case "x$withval" in
5193         (xyes|xno)
5194                 ;;
5195         (*)     DESTDIR="$withval"
5196                 ;;
5197         esac
5198 fi;
5199 echo "$as_me:5199: result: ${DESTDIR:-(none)}" >&5
5200 echo "${ECHO_T}${DESTDIR:-(none)}" >&6
5201
5202 ###############################################################################
5203
5204 # If we're cross-compiling, allow the user to override the tools and their
5205 # options.  The configure script is oriented toward identifying the host
5206 # compiler, etc., but we need a build compiler to generate parts of the source.
5207
5208 case "$cf_cv_system_name" in
5209 (*-msvc*)
5210         LDFLAGS="$LDFLAGS user32.lib"
5211         export LDFLAGS
5212         ;;
5213 esac
5214
5215 if test "$cross_compiling" = yes ; then
5216
5217         # defaults that we might want to override
5218         : ${BUILD_CFLAGS:=''}
5219         : ${BUILD_CPPFLAGS:=''}
5220         : ${BUILD_LDFLAGS:=''}
5221         : ${BUILD_LIBS:=''}
5222         : ${BUILD_EXEEXT:='$x'}
5223         : ${BUILD_OBJEXT:='o'}
5224
5225 # Check whether --with-build-cc or --without-build-cc was given.
5226 if test "${with_build_cc+set}" = set; then
5227   withval="$with_build_cc"
5228   BUILD_CC="$withval"
5229 else
5230   for ac_prog in gcc clang c99 c89 cc cl
5231 do
5232   # Extract the first word of "$ac_prog", so it can be a program name with args.
5233 set dummy $ac_prog; ac_word=$2
5234 echo "$as_me:5234: checking for $ac_word" >&5
5235 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5236 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5237   echo $ECHO_N "(cached) $ECHO_C" >&6
5238 else
5239   if test -n "$BUILD_CC"; then
5240   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5241 else
5242   ac_save_IFS=$IFS; IFS=$ac_path_separator
5243 ac_dummy="$PATH"
5244 for ac_dir in $ac_dummy; do
5245   IFS=$ac_save_IFS
5246   test -z "$ac_dir" && ac_dir=.
5247   $as_executable_p "$ac_dir/$ac_word" || continue
5248 ac_cv_prog_BUILD_CC="$ac_prog"
5249 echo "$as_me:5249: found $ac_dir/$ac_word" >&5
5250 break
5251 done
5252
5253 fi
5254 fi
5255 BUILD_CC=$ac_cv_prog_BUILD_CC
5256 if test -n "$BUILD_CC"; then
5257   echo "$as_me:5257: result: $BUILD_CC" >&5
5258 echo "${ECHO_T}$BUILD_CC" >&6
5259 else
5260   echo "$as_me:5260: result: no" >&5
5261 echo "${ECHO_T}no" >&6
5262 fi
5263
5264   test -n "$BUILD_CC" && break
5265 done
5266 test -n "$BUILD_CC" || BUILD_CC="none"
5267
5268 fi;
5269         echo "$as_me:5269: checking for native build C compiler" >&5
5270 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5271         echo "$as_me:5271: result: $BUILD_CC" >&5
5272 echo "${ECHO_T}$BUILD_CC" >&6
5273
5274         echo "$as_me:5274: checking for native build C preprocessor" >&5
5275 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5276
5277 # Check whether --with-build-cpp or --without-build-cpp was given.
5278 if test "${with_build_cpp+set}" = set; then
5279   withval="$with_build_cpp"
5280   BUILD_CPP="$withval"
5281 else
5282   BUILD_CPP='${BUILD_CC} -E'
5283 fi;
5284         echo "$as_me:5284: result: $BUILD_CPP" >&5
5285 echo "${ECHO_T}$BUILD_CPP" >&6
5286
5287         echo "$as_me:5287: checking for native build C flags" >&5
5288 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5289
5290 # Check whether --with-build-cflags or --without-build-cflags was given.
5291 if test "${with_build_cflags+set}" = set; then
5292   withval="$with_build_cflags"
5293   BUILD_CFLAGS="$withval"
5294 fi;
5295         echo "$as_me:5295: result: $BUILD_CFLAGS" >&5
5296 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5297
5298         echo "$as_me:5298: checking for native build C preprocessor-flags" >&5
5299 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5300
5301 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5302 if test "${with_build_cppflags+set}" = set; then
5303   withval="$with_build_cppflags"
5304   BUILD_CPPFLAGS="$withval"
5305 fi;
5306         echo "$as_me:5306: result: $BUILD_CPPFLAGS" >&5
5307 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5308
5309         echo "$as_me:5309: checking for native build linker-flags" >&5
5310 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5311
5312 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5313 if test "${with_build_ldflags+set}" = set; then
5314   withval="$with_build_ldflags"
5315   BUILD_LDFLAGS="$withval"
5316 fi;
5317         echo "$as_me:5317: result: $BUILD_LDFLAGS" >&5
5318 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5319
5320         echo "$as_me:5320: checking for native build linker-libraries" >&5
5321 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5322
5323 # Check whether --with-build-libs or --without-build-libs was given.
5324 if test "${with_build_libs+set}" = set; then
5325   withval="$with_build_libs"
5326   BUILD_LIBS="$withval"
5327 fi;
5328         echo "$as_me:5328: result: $BUILD_LIBS" >&5
5329 echo "${ECHO_T}$BUILD_LIBS" >&6
5330
5331         # this assumes we're on Unix.
5332         BUILD_EXEEXT=
5333         BUILD_OBJEXT=o
5334
5335         : ${BUILD_CC:='${CC}'}
5336
5337         echo "$as_me:5337: checking if the build-compiler \"$BUILD_CC\" works" >&5
5338 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5339
5340         cf_save_crossed=$cross_compiling
5341         cf_save_ac_link=$ac_link
5342         cross_compiling=no
5343         cf_build_cppflags=$BUILD_CPPFLAGS
5344         test "$cf_build_cppflags" = "#" && cf_build_cppflags=
5345         ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5346
5347         if test "$cross_compiling" = yes; then
5348   cf_ok_build_cc=unknown
5349 else
5350   cat >"conftest.$ac_ext" <<_ACEOF
5351 #line 5351 "configure"
5352 #include "confdefs.h"
5353 #include <stdio.h>
5354                 int main(int argc, char *argv[])
5355                 {
5356                         ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
5357                 }
5358
5359 _ACEOF
5360 rm -f "conftest$ac_exeext"
5361 if { (eval echo "$as_me:5361: \"$ac_link\"") >&5
5362   (eval $ac_link) 2>&5
5363   ac_status=$?
5364   echo "$as_me:5364: \$? = $ac_status" >&5
5365   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5366   { (eval echo "$as_me:5366: \"$ac_try\"") >&5
5367   (eval $ac_try) 2>&5
5368   ac_status=$?
5369   echo "$as_me:5369: \$? = $ac_status" >&5
5370   (exit "$ac_status"); }; }; then
5371   cf_ok_build_cc=yes
5372 else
5373   echo "$as_me: program exited with status $ac_status" >&5
5374 echo "$as_me: failed program was:" >&5
5375 cat "conftest.$ac_ext" >&5
5376 cf_ok_build_cc=no
5377 fi
5378 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5379 fi
5380
5381         cross_compiling=$cf_save_crossed
5382         ac_link=$cf_save_ac_link
5383
5384         echo "$as_me:5384: result: $cf_ok_build_cc" >&5
5385 echo "${ECHO_T}$cf_ok_build_cc" >&6
5386
5387         if test "$cf_ok_build_cc" != yes
5388         then
5389                 { { echo "$as_me:5389: error: Cross-build requires two compilers.
5390 Use --with-build-cc to specify the native compiler." >&5
5391 echo "$as_me: error: Cross-build requires two compilers.
5392 Use --with-build-cc to specify the native compiler." >&2;}
5393    { (exit 1); exit 1; }; }
5394         fi
5395
5396 else
5397         : ${BUILD_CC:='${CC}'}
5398         : ${BUILD_CPP:='${CPP}'}
5399         : ${BUILD_CFLAGS:='${CFLAGS}'}
5400         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5401         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5402         : ${BUILD_LIBS:='${LIBS}'}
5403         : ${BUILD_EXEEXT:='$x'}
5404         : ${BUILD_OBJEXT:='o'}
5405 fi
5406
5407 ###############################################################################
5408
5409 ### Options to allow the user to specify the set of libraries which are used.
5410 ### Use "--without-normal --with-shared" to allow the default model to be
5411 ### shared, for example.
5412 cf_list_models=""
5413
5414 echo "$as_me:5414: checking if libtool -version-number should be used" >&5
5415 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5416
5417 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5418 if test "${enable_libtool_version+set}" = set; then
5419   enableval="$enable_libtool_version"
5420   test "$enableval" != no && enableval=yes
5421         if test "$enableval" != "yes" ; then
5422     cf_libtool_version=no
5423         else
5424                 cf_libtool_version=yes
5425         fi
5426 else
5427   enableval=yes
5428         cf_libtool_version=yes
5429
5430 fi;
5431 echo "$as_me:5431: result: $cf_libtool_version" >&5
5432 echo "${ECHO_T}$cf_libtool_version" >&6
5433
5434 if test "$cf_libtool_version" = yes ; then
5435         LIBTOOL_VERSION="-version-number"
5436 else
5437         LIBTOOL_VERSION="-version-info"
5438         case "x$VERSION" in
5439         (x)
5440                 { echo "$as_me:5440: WARNING: VERSION was not set" >&5
5441 echo "$as_me: WARNING: VERSION was not set" >&2;}
5442                 ;;
5443         (x*.*.*)
5444                 ABI_VERSION="$VERSION"
5445                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5446
5447 echo "${as_me:-configure}:5447: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5448
5449                 ;;
5450         (x*:*:*)
5451                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5452                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5453
5454 echo "${as_me:-configure}:5454: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5455
5456                 ;;
5457         (*)
5458                 { echo "$as_me:5458: WARNING: unexpected VERSION value: $VERSION" >&5
5459 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5460                 ;;
5461         esac
5462 fi
5463
5464 LIBTOOL=
5465
5466 # common library maintenance symbols that are convenient for libtool scripts:
5467 LIB_CREATE='${AR} -cr'
5468 LIB_OBJECT='${OBJECTS}'
5469 LIB_SUFFIX=.a
5470 LIB_PREP="$RANLIB"
5471
5472 # symbols used to prop libtool up to enable it to determine what it should be
5473 # doing:
5474 LIB_CLEAN=
5475 LIB_COMPILE=
5476 LIB_LINK='${CC}'
5477 LIB_INSTALL=
5478 LIB_UNINSTALL=
5479
5480 echo "$as_me:5480: checking if you want to build libraries with libtool" >&5
5481 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5482
5483 # Check whether --with-libtool or --without-libtool was given.
5484 if test "${with_libtool+set}" = set; then
5485   withval="$with_libtool"
5486   with_libtool=$withval
5487 else
5488   with_libtool=no
5489 fi;
5490 echo "$as_me:5490: result: $with_libtool" >&5
5491 echo "${ECHO_T}$with_libtool" >&6
5492 if test "$with_libtool" != "no"; then
5493
5494         if test "$with_libtool" != "yes" ; then
5495
5496 if test "x$prefix" != xNONE; then
5497         cf_path_syntax="$prefix"
5498 else
5499         cf_path_syntax="$ac_default_prefix"
5500 fi
5501
5502 case ".$with_libtool" in
5503 (.\$\(*\)*|.\'*\'*)
5504         ;;
5505 (..|./*|.\\*)
5506         ;;
5507 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5508         ;;
5509 (.\$\{*prefix\}*|.\$\{*dir\}*)
5510         eval with_libtool="$with_libtool"
5511         case ".$with_libtool" in
5512         (.NONE/*)
5513                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5514                 ;;
5515         esac
5516         ;;
5517 (.no|.NONE/*)
5518         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5519         ;;
5520 (*)
5521         { { echo "$as_me:5521: error: expected a pathname, not \"$with_libtool\"" >&5
5522 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5523    { (exit 1); exit 1; }; }
5524         ;;
5525 esac
5526
5527                 LIBTOOL=$with_libtool
5528         else
5529                 if test -n "$ac_tool_prefix"; then
5530   for ac_prog in libtool glibtool
5531   do
5532     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5533 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5534 echo "$as_me:5534: checking for $ac_word" >&5
5535 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5536 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5537   echo $ECHO_N "(cached) $ECHO_C" >&6
5538 else
5539   if test -n "$LIBTOOL"; then
5540   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5541 else
5542   ac_save_IFS=$IFS; IFS=$ac_path_separator
5543 ac_dummy="$PATH"
5544 for ac_dir in $ac_dummy; do
5545   IFS=$ac_save_IFS
5546   test -z "$ac_dir" && ac_dir=.
5547   $as_executable_p "$ac_dir/$ac_word" || continue
5548 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5549 echo "$as_me:5549: found $ac_dir/$ac_word" >&5
5550 break
5551 done
5552
5553 fi
5554 fi
5555 LIBTOOL=$ac_cv_prog_LIBTOOL
5556 if test -n "$LIBTOOL"; then
5557   echo "$as_me:5557: result: $LIBTOOL" >&5
5558 echo "${ECHO_T}$LIBTOOL" >&6
5559 else
5560   echo "$as_me:5560: result: no" >&5
5561 echo "${ECHO_T}no" >&6
5562 fi
5563
5564     test -n "$LIBTOOL" && break
5565   done
5566 fi
5567 if test -z "$LIBTOOL"; then
5568   ac_ct_LIBTOOL=$LIBTOOL
5569   for ac_prog in libtool glibtool
5570 do
5571   # Extract the first word of "$ac_prog", so it can be a program name with args.
5572 set dummy $ac_prog; ac_word=$2
5573 echo "$as_me:5573: checking for $ac_word" >&5
5574 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5575 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5576   echo $ECHO_N "(cached) $ECHO_C" >&6
5577 else
5578   if test -n "$ac_ct_LIBTOOL"; then
5579   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5580 else
5581   ac_save_IFS=$IFS; IFS=$ac_path_separator
5582 ac_dummy="$PATH"
5583 for ac_dir in $ac_dummy; do
5584   IFS=$ac_save_IFS
5585   test -z "$ac_dir" && ac_dir=.
5586   $as_executable_p "$ac_dir/$ac_word" || continue
5587 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5588 echo "$as_me:5588: found $ac_dir/$ac_word" >&5
5589 break
5590 done
5591
5592 fi
5593 fi
5594 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5595 if test -n "$ac_ct_LIBTOOL"; then
5596   echo "$as_me:5596: result: $ac_ct_LIBTOOL" >&5
5597 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5598 else
5599   echo "$as_me:5599: result: no" >&5
5600 echo "${ECHO_T}no" >&6
5601 fi
5602
5603   test -n "$ac_ct_LIBTOOL" && break
5604 done
5605 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5606
5607   LIBTOOL=$ac_ct_LIBTOOL
5608 fi
5609
5610 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5611 then
5612         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.].*//'`
5613 else
5614         cf_cv_libtool_version=
5615 fi
5616 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5617
5618                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5619                 then
5620
5621 unset ac_cv_prog_ac_ct_LIBTOOL
5622 unset ac_ct_LIBTOOL
5623 unset LIBTOOL
5624
5625                         if test -n "$ac_tool_prefix"; then
5626   for ac_prog in glibtool
5627   do
5628     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5629 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5630 echo "$as_me:5630: checking for $ac_word" >&5
5631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5632 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5633   echo $ECHO_N "(cached) $ECHO_C" >&6
5634 else
5635   if test -n "$LIBTOOL"; then
5636   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5637 else
5638   ac_save_IFS=$IFS; IFS=$ac_path_separator
5639 ac_dummy="$PATH"
5640 for ac_dir in $ac_dummy; do
5641   IFS=$ac_save_IFS
5642   test -z "$ac_dir" && ac_dir=.
5643   $as_executable_p "$ac_dir/$ac_word" || continue
5644 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5645 echo "$as_me:5645: found $ac_dir/$ac_word" >&5
5646 break
5647 done
5648
5649 fi
5650 fi
5651 LIBTOOL=$ac_cv_prog_LIBTOOL
5652 if test -n "$LIBTOOL"; then
5653   echo "$as_me:5653: result: $LIBTOOL" >&5
5654 echo "${ECHO_T}$LIBTOOL" >&6
5655 else
5656   echo "$as_me:5656: result: no" >&5
5657 echo "${ECHO_T}no" >&6
5658 fi
5659
5660     test -n "$LIBTOOL" && break
5661   done
5662 fi
5663 if test -z "$LIBTOOL"; then
5664   ac_ct_LIBTOOL=$LIBTOOL
5665   for ac_prog in glibtool
5666 do
5667   # Extract the first word of "$ac_prog", so it can be a program name with args.
5668 set dummy $ac_prog; ac_word=$2
5669 echo "$as_me:5669: checking for $ac_word" >&5
5670 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5671 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5672   echo $ECHO_N "(cached) $ECHO_C" >&6
5673 else
5674   if test -n "$ac_ct_LIBTOOL"; then
5675   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5676 else
5677   ac_save_IFS=$IFS; IFS=$ac_path_separator
5678 ac_dummy="$PATH"
5679 for ac_dir in $ac_dummy; do
5680   IFS=$ac_save_IFS
5681   test -z "$ac_dir" && ac_dir=.
5682   $as_executable_p "$ac_dir/$ac_word" || continue
5683 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5684 echo "$as_me:5684: found $ac_dir/$ac_word" >&5
5685 break
5686 done
5687
5688 fi
5689 fi
5690 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5691 if test -n "$ac_ct_LIBTOOL"; then
5692   echo "$as_me:5692: result: $ac_ct_LIBTOOL" >&5
5693 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5694 else
5695   echo "$as_me:5695: result: no" >&5
5696 echo "${ECHO_T}no" >&6
5697 fi
5698
5699   test -n "$ac_ct_LIBTOOL" && break
5700 done
5701 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5702
5703   LIBTOOL=$ac_ct_LIBTOOL
5704 fi
5705
5706 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5707 then
5708         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.].*//'`
5709 else
5710         cf_cv_libtool_version=
5711 fi
5712 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5713
5714                 fi
5715         fi
5716         if test -z "$LIBTOOL" ; then
5717                 { { echo "$as_me:5717: error: Cannot find libtool" >&5
5718 echo "$as_me: error: Cannot find libtool" >&2;}
5719    { (exit 1); exit 1; }; }
5720         fi
5721         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5722         LIB_OBJECT='${OBJECTS:.o=.lo}'
5723         LIB_SUFFIX=.la
5724         LIB_CLEAN='${LIBTOOL} --mode=clean'
5725         LIB_COMPILE='${LIBTOOL} --mode=compile'
5726         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5727         LIB_INSTALL='${LIBTOOL} --mode=install'
5728         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5729         LIB_PREP=:
5730
5731 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5732 then
5733         echo "$as_me:5733: checking version of $LIBTOOL" >&5
5734 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5735
5736 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5737 then
5738         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.].*//'`
5739 else
5740         cf_cv_libtool_version=
5741 fi
5742 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5743
5744         echo "$as_me:5744: result: $cf_cv_libtool_version" >&5
5745 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5746         if test -n "$cf_cv_libtool_version"
5747         then
5748                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5749                 case "x$cf_check_libtool_version" in
5750                 (*...GNU-libtool...*)
5751                         ;;
5752                 (*)
5753                         { { echo "$as_me:5753: error: This is not GNU libtool" >&5
5754 echo "$as_me: error: This is not GNU libtool" >&2;}
5755    { (exit 1); exit 1; }; }
5756                         ;;
5757                 esac
5758         else
5759                 { { echo "$as_me:5759: error: No version found for $LIBTOOL" >&5
5760 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5761    { (exit 1); exit 1; }; }
5762         fi
5763 else
5764         { { echo "$as_me:5764: error: GNU libtool has not been found" >&5
5765 echo "$as_me: error: GNU libtool has not been found" >&2;}
5766    { (exit 1); exit 1; }; }
5767 fi
5768
5769         # special hack to add -no-undefined (which libtool should do for itself)
5770         LT_UNDEF=
5771         case "$cf_cv_system_name" in
5772         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5773                 LT_UNDEF=-no-undefined
5774                 ;;
5775         esac
5776
5777         # special hack to add --tag option for C++ compiler
5778         case "$cf_cv_libtool_version" in
5779         (1.[5-9]*|[2-9].[0-9.a-z]*)
5780                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5781                 LIBTOOL="$LIBTOOL --tag=CC"
5782                 ;;
5783         (*)
5784                 LIBTOOL_CXX="$LIBTOOL"
5785                 ;;
5786         esac
5787 else
5788         LIBTOOL=""
5789         LIBTOOL_CXX=""
5790 fi
5791
5792 test -z "$LIBTOOL" && ECHO_LT=
5793
5794 if test "$with_libtool" != "no" ; then
5795
5796 cf_list_models="$cf_list_models libtool"
5797
5798 else
5799
5800 echo "$as_me:5800: checking if you want to build shared libraries" >&5
5801 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5802
5803 # Check whether --with-shared or --without-shared was given.
5804 if test "${with_shared+set}" = set; then
5805   withval="$with_shared"
5806   with_shared=$withval
5807 else
5808   with_shared=no
5809 fi;
5810 echo "$as_me:5810: result: $with_shared" >&5
5811 echo "${ECHO_T}$with_shared" >&6
5812 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5813
5814 echo "$as_me:5814: checking if you want to build static libraries" >&5
5815 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5816
5817 # Check whether --with-normal or --without-normal was given.
5818 if test "${with_normal+set}" = set; then
5819   withval="$with_normal"
5820   with_normal=$withval
5821 else
5822   with_normal=yes
5823 fi;
5824 echo "$as_me:5824: result: $with_normal" >&5
5825 echo "${ECHO_T}$with_normal" >&6
5826 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5827
5828 echo "$as_me:5828: checking if you want to build debug libraries" >&5
5829 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5830
5831 # Check whether --with-debug or --without-debug was given.
5832 if test "${with_debug+set}" = set; then
5833   withval="$with_debug"
5834   with_debug=$withval
5835 else
5836   with_debug=yes
5837 fi;
5838 echo "$as_me:5838: result: $with_debug" >&5
5839 echo "${ECHO_T}$with_debug" >&6
5840 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5841
5842 echo "$as_me:5842: checking if you want to build profiling libraries" >&5
5843 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5844
5845 # Check whether --with-profile or --without-profile was given.
5846 if test "${with_profile+set}" = set; then
5847   withval="$with_profile"
5848   with_profile=$withval
5849 else
5850   with_profile=no
5851 fi;
5852 echo "$as_me:5852: result: $with_profile" >&5
5853 echo "${ECHO_T}$with_profile" >&6
5854 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5855
5856 fi
5857
5858 if test "X$cf_with_cxx_binding" != Xno; then
5859 if test "x$with_shared" = "xyes"; then
5860 echo "$as_me:5860: checking if you want to build C++ shared libraries" >&5
5861 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5862
5863 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5864 if test "${with_cxx_shared+set}" = set; then
5865   withval="$with_cxx_shared"
5866   with_shared_cxx=$withval
5867 else
5868   with_shared_cxx=no
5869 fi;
5870 echo "$as_me:5870: result: $with_shared_cxx" >&5
5871 echo "${ECHO_T}$with_shared_cxx" >&6
5872 fi
5873 fi
5874
5875 ###############################################################################
5876
5877 echo "$as_me:5877: checking for specified models" >&5
5878 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5879 test -z "$cf_list_models" && cf_list_models=normal
5880 test "$with_libtool" != "no" && cf_list_models=libtool
5881 echo "$as_me:5881: result: $cf_list_models" >&5
5882 echo "${ECHO_T}$cf_list_models" >&6
5883
5884 ### Use the first model as the default, and save its suffix for use in building
5885 ### up test-applications.
5886 echo "$as_me:5886: checking for default model" >&5
5887 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5888 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5889 echo "$as_me:5889: result: $DFT_LWR_MODEL" >&5
5890 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5891
5892 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5893
5894 TICS_NAME=tic
5895
5896 TINFO_NAME=tinfo
5897
5898 LIB_NAME=ncurses
5899
5900 LIB_DIR=../lib
5901 LIB_2ND=../../lib
5902
5903 echo "$as_me:5903: checking if you want to have a library-prefix" >&5
5904 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5905
5906 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5907 if test "${with_lib_prefix+set}" = set; then
5908   withval="$with_lib_prefix"
5909   with_lib_prefix=$withval
5910 else
5911   with_lib_prefix=auto
5912 fi;
5913 echo "$as_me:5913: result: $with_lib_prefix" >&5
5914 echo "${ECHO_T}$with_lib_prefix" >&6
5915
5916 if test "$with_lib_prefix" = auto
5917 then
5918
5919         case "$cf_cv_system_name" in
5920         (OS/2*|os2*)
5921                 if test "$DFT_LWR_MODEL" = libtool; then
5922                         LIB_PREFIX='lib'
5923                 else
5924                         LIB_PREFIX=''
5925                 fi
5926                 ;;
5927         (*-msvc*)
5928                 LIB_PREFIX=''
5929                 ;;
5930         (*)     LIB_PREFIX='lib'
5931                 ;;
5932         esac
5933 cf_prefix=$LIB_PREFIX
5934
5935 elif test "$with_lib_prefix" = no
5936 then
5937         LIB_PREFIX=
5938 else
5939         LIB_PREFIX=$with_lib_prefix
5940 fi
5941
5942 LIB_SUFFIX=
5943
5944         echo "$as_me:5944: checking for PATH separator" >&5
5945 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5946         case "$cf_cv_system_name" in
5947         (os2*)  PATH_SEPARATOR=';'  ;;
5948         (*)     ${PATH_SEPARATOR:=':'}  ;;
5949         esac
5950
5951         echo "$as_me:5951: result: $PATH_SEPARATOR" >&5
5952 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5953
5954 # headers needed for checks...
5955 echo "$as_me:5955: checking for ANSI C header files" >&5
5956 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5957 if test "${ac_cv_header_stdc+set}" = set; then
5958   echo $ECHO_N "(cached) $ECHO_C" >&6
5959 else
5960   cat >"conftest.$ac_ext" <<_ACEOF
5961 #line 5961 "configure"
5962 #include "confdefs.h"
5963 #include <stdlib.h>
5964 #include <stdarg.h>
5965 #include <string.h>
5966 #include <float.h>
5967
5968 _ACEOF
5969 if { (eval echo "$as_me:5969: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5970   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5971   ac_status=$?
5972   $EGREP -v '^ *\+' conftest.er1 >conftest.err
5973   rm -f conftest.er1
5974   cat conftest.err >&5
5975   echo "$as_me:5975: \$? = $ac_status" >&5
5976   (exit "$ac_status"); } >/dev/null; then
5977   if test -s conftest.err; then
5978     ac_cpp_err=$ac_c_preproc_warn_flag
5979   else
5980     ac_cpp_err=
5981   fi
5982 else
5983   ac_cpp_err=yes
5984 fi
5985 if test -z "$ac_cpp_err"; then
5986   ac_cv_header_stdc=yes
5987 else
5988   echo "$as_me: failed program was:" >&5
5989   cat "conftest.$ac_ext" >&5
5990   ac_cv_header_stdc=no
5991 fi
5992 rm -f conftest.err "conftest.$ac_ext"
5993
5994 if test $ac_cv_header_stdc = yes; then
5995   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5996   cat >"conftest.$ac_ext" <<_ACEOF
5997 #line 5997 "configure"
5998 #include "confdefs.h"
5999 #include <string.h>
6000
6001 _ACEOF
6002 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6003   $EGREP "memchr" >/dev/null 2>&1; then
6004   :
6005 else
6006   ac_cv_header_stdc=no
6007 fi
6008 rm -rf conftest*
6009
6010 fi
6011
6012 if test $ac_cv_header_stdc = yes; then
6013   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6014   cat >"conftest.$ac_ext" <<_ACEOF
6015 #line 6015 "configure"
6016 #include "confdefs.h"
6017 #include <stdlib.h>
6018
6019 _ACEOF
6020 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6021   $EGREP "free" >/dev/null 2>&1; then
6022   :
6023 else
6024   ac_cv_header_stdc=no
6025 fi
6026 rm -rf conftest*
6027
6028 fi
6029
6030 if test $ac_cv_header_stdc = yes; then
6031   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6032   if test "$cross_compiling" = yes; then
6033   :
6034 else
6035   cat >"conftest.$ac_ext" <<_ACEOF
6036 #line 6036 "configure"
6037 #include "confdefs.h"
6038 #include <ctype.h>
6039 #if ((' ' & 0x0FF) == 0x020)
6040 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6041 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6042 #else
6043 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6044                      || ('j' <= (c) && (c) <= 'r') \
6045                      || ('s' <= (c) && (c) <= 'z'))
6046 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6047 #endif
6048
6049 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6050 int
6051 main (void)
6052 {
6053   int i;
6054   for (i = 0; i < 256; i++)
6055     if (XOR (islower (i), ISLOWER (i))
6056         || toupper (i) != TOUPPER (i))
6057       $ac_main_return(2);
6058   $ac_main_return (0);
6059 }
6060 _ACEOF
6061 rm -f "conftest$ac_exeext"
6062 if { (eval echo "$as_me:6062: \"$ac_link\"") >&5
6063   (eval $ac_link) 2>&5
6064   ac_status=$?
6065   echo "$as_me:6065: \$? = $ac_status" >&5
6066   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6067   { (eval echo "$as_me:6067: \"$ac_try\"") >&5
6068   (eval $ac_try) 2>&5
6069   ac_status=$?
6070   echo "$as_me:6070: \$? = $ac_status" >&5
6071   (exit "$ac_status"); }; }; then
6072   :
6073 else
6074   echo "$as_me: program exited with status $ac_status" >&5
6075 echo "$as_me: failed program was:" >&5
6076 cat "conftest.$ac_ext" >&5
6077 ac_cv_header_stdc=no
6078 fi
6079 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6080 fi
6081 fi
6082 fi
6083 echo "$as_me:6083: result: $ac_cv_header_stdc" >&5
6084 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6085 if test $ac_cv_header_stdc = yes; then
6086
6087 cat >>confdefs.h <<\EOF
6088 #define STDC_HEADERS 1
6089 EOF
6090
6091 fi
6092
6093 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6094
6095 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6096                   inttypes.h stdint.h unistd.h
6097 do
6098 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6099 echo "$as_me:6099: checking for $ac_header" >&5
6100 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6101 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6102   echo $ECHO_N "(cached) $ECHO_C" >&6
6103 else
6104   cat >"conftest.$ac_ext" <<_ACEOF
6105 #line 6105 "configure"
6106 #include "confdefs.h"
6107 $ac_includes_default
6108 #include <$ac_header>
6109 _ACEOF
6110 rm -f "conftest.$ac_objext"
6111 if { (eval echo "$as_me:6111: \"$ac_compile\"") >&5
6112   (eval $ac_compile) 2>&5
6113   ac_status=$?
6114   echo "$as_me:6114: \$? = $ac_status" >&5
6115   (exit "$ac_status"); } &&
6116          { ac_try='test -s "conftest.$ac_objext"'
6117   { (eval echo "$as_me:6117: \"$ac_try\"") >&5
6118   (eval $ac_try) 2>&5
6119   ac_status=$?
6120   echo "$as_me:6120: \$? = $ac_status" >&5
6121   (exit "$ac_status"); }; }; then
6122   eval "$as_ac_Header=yes"
6123 else
6124   echo "$as_me: failed program was:" >&5
6125 cat "conftest.$ac_ext" >&5
6126 eval "$as_ac_Header=no"
6127 fi
6128 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6129 fi
6130 echo "$as_me:6130: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6131 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6132 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6133   cat >>confdefs.h <<EOF
6134 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6135 EOF
6136
6137 fi
6138 done
6139
6140 echo "$as_me:6140: checking whether exit is declared" >&5
6141 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6142 if test "${ac_cv_have_decl_exit+set}" = set; then
6143   echo $ECHO_N "(cached) $ECHO_C" >&6
6144 else
6145   cat >"conftest.$ac_ext" <<_ACEOF
6146 #line 6146 "configure"
6147 #include "confdefs.h"
6148 $ac_includes_default
6149 int
6150 main (void)
6151 {
6152 #ifndef exit
6153   (void) exit;
6154 #endif
6155
6156   ;
6157   return 0;
6158 }
6159 _ACEOF
6160 rm -f "conftest.$ac_objext"
6161 if { (eval echo "$as_me:6161: \"$ac_compile\"") >&5
6162   (eval $ac_compile) 2>&5
6163   ac_status=$?
6164   echo "$as_me:6164: \$? = $ac_status" >&5
6165   (exit "$ac_status"); } &&
6166          { ac_try='test -s "conftest.$ac_objext"'
6167   { (eval echo "$as_me:6167: \"$ac_try\"") >&5
6168   (eval $ac_try) 2>&5
6169   ac_status=$?
6170   echo "$as_me:6170: \$? = $ac_status" >&5
6171   (exit "$ac_status"); }; }; then
6172   ac_cv_have_decl_exit=yes
6173 else
6174   echo "$as_me: failed program was:" >&5
6175 cat "conftest.$ac_ext" >&5
6176 ac_cv_have_decl_exit=no
6177 fi
6178 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6179 fi
6180 echo "$as_me:6180: result: $ac_cv_have_decl_exit" >&5
6181 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6182
6183 ac_header_dirent=no
6184 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6185   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6186 echo "$as_me:6186: checking for $ac_hdr that defines DIR" >&5
6187 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
6188 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6189   echo $ECHO_N "(cached) $ECHO_C" >&6
6190 else
6191   cat >"conftest.$ac_ext" <<_ACEOF
6192 #line 6192 "configure"
6193 #include "confdefs.h"
6194 #include <sys/types.h>
6195 #include <$ac_hdr>
6196
6197 int
6198 main (void)
6199 {
6200 if ((DIR *) 0)
6201 return 0;
6202   ;
6203   return 0;
6204 }
6205 _ACEOF
6206 rm -f "conftest.$ac_objext"
6207 if { (eval echo "$as_me:6207: \"$ac_compile\"") >&5
6208   (eval $ac_compile) 2>&5
6209   ac_status=$?
6210   echo "$as_me:6210: \$? = $ac_status" >&5
6211   (exit "$ac_status"); } &&
6212          { ac_try='test -s "conftest.$ac_objext"'
6213   { (eval echo "$as_me:6213: \"$ac_try\"") >&5
6214   (eval $ac_try) 2>&5
6215   ac_status=$?
6216   echo "$as_me:6216: \$? = $ac_status" >&5
6217   (exit "$ac_status"); }; }; then
6218   eval "$as_ac_Header=yes"
6219 else
6220   echo "$as_me: failed program was:" >&5
6221 cat "conftest.$ac_ext" >&5
6222 eval "$as_ac_Header=no"
6223 fi
6224 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6225 fi
6226 echo "$as_me:6226: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6227 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6228 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6229   cat >>confdefs.h <<EOF
6230 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6231 EOF
6232
6233 ac_header_dirent=$ac_hdr; break
6234 fi
6235
6236 done
6237 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6238 if test $ac_header_dirent = dirent.h; then
6239   echo "$as_me:6239: checking for opendir in -ldir" >&5
6240 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
6241 if test "${ac_cv_lib_dir_opendir+set}" = set; then
6242   echo $ECHO_N "(cached) $ECHO_C" >&6
6243 else
6244   ac_check_lib_save_LIBS=$LIBS
6245 LIBS="-ldir  $LIBS"
6246 cat >"conftest.$ac_ext" <<_ACEOF
6247 #line 6247 "configure"
6248 #include "confdefs.h"
6249
6250 /* Override any gcc2 internal prototype to avoid an error.  */
6251 #ifdef __cplusplus
6252 extern "C"
6253 #endif
6254 /* We use char because int might match the return type of a gcc2
6255    builtin and then its argument prototype would still apply.  */
6256 char opendir (void);
6257 int
6258 main (void)
6259 {
6260 opendir ();
6261   ;
6262   return 0;
6263 }
6264 _ACEOF
6265 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6266 if { (eval echo "$as_me:6266: \"$ac_link\"") >&5
6267   (eval $ac_link) 2>&5
6268   ac_status=$?
6269   echo "$as_me:6269: \$? = $ac_status" >&5
6270   (exit "$ac_status"); } &&
6271          { ac_try='test -s "conftest$ac_exeext"'
6272   { (eval echo "$as_me:6272: \"$ac_try\"") >&5
6273   (eval $ac_try) 2>&5
6274   ac_status=$?
6275   echo "$as_me:6275: \$? = $ac_status" >&5
6276   (exit "$ac_status"); }; }; then
6277   ac_cv_lib_dir_opendir=yes
6278 else
6279   echo "$as_me: failed program was:" >&5
6280 cat "conftest.$ac_ext" >&5
6281 ac_cv_lib_dir_opendir=no
6282 fi
6283 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6284 LIBS=$ac_check_lib_save_LIBS
6285 fi
6286 echo "$as_me:6286: result: $ac_cv_lib_dir_opendir" >&5
6287 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
6288 if test "$ac_cv_lib_dir_opendir" = yes; then
6289   LIBS="$LIBS -ldir"
6290 fi
6291
6292 else
6293   echo "$as_me:6293: checking for opendir in -lx" >&5
6294 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
6295 if test "${ac_cv_lib_x_opendir+set}" = set; then
6296   echo $ECHO_N "(cached) $ECHO_C" >&6
6297 else
6298   ac_check_lib_save_LIBS=$LIBS
6299 LIBS="-lx  $LIBS"
6300 cat >"conftest.$ac_ext" <<_ACEOF
6301 #line 6301 "configure"
6302 #include "confdefs.h"
6303
6304 /* Override any gcc2 internal prototype to avoid an error.  */
6305 #ifdef __cplusplus
6306 extern "C"
6307 #endif
6308 /* We use char because int might match the return type of a gcc2
6309    builtin and then its argument prototype would still apply.  */
6310 char opendir (void);
6311 int
6312 main (void)
6313 {
6314 opendir ();
6315   ;
6316   return 0;
6317 }
6318 _ACEOF
6319 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6320 if { (eval echo "$as_me:6320: \"$ac_link\"") >&5
6321   (eval $ac_link) 2>&5
6322   ac_status=$?
6323   echo "$as_me:6323: \$? = $ac_status" >&5
6324   (exit "$ac_status"); } &&
6325          { ac_try='test -s "conftest$ac_exeext"'
6326   { (eval echo "$as_me:6326: \"$ac_try\"") >&5
6327   (eval $ac_try) 2>&5
6328   ac_status=$?
6329   echo "$as_me:6329: \$? = $ac_status" >&5
6330   (exit "$ac_status"); }; }; then
6331   ac_cv_lib_x_opendir=yes
6332 else
6333   echo "$as_me: failed program was:" >&5
6334 cat "conftest.$ac_ext" >&5
6335 ac_cv_lib_x_opendir=no
6336 fi
6337 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6338 LIBS=$ac_check_lib_save_LIBS
6339 fi
6340 echo "$as_me:6340: result: $ac_cv_lib_x_opendir" >&5
6341 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
6342 if test "$ac_cv_lib_x_opendir" = yes; then
6343   LIBS="$LIBS -lx"
6344 fi
6345
6346 fi
6347
6348 ###############################################################################
6349
6350 echo "$as_me:6350: checking if you want to build a separate terminfo library" >&5
6351 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
6352
6353 # Check whether --with-termlib or --without-termlib was given.
6354 if test "${with_termlib+set}" = set; then
6355   withval="$with_termlib"
6356   with_termlib=$withval
6357 else
6358   with_termlib=no
6359 fi;
6360 echo "$as_me:6360: result: $with_termlib" >&5
6361 echo "${ECHO_T}$with_termlib" >&6
6362
6363 echo "$as_me:6363: checking if you want to build a separate tic library" >&5
6364 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
6365
6366 # Check whether --with-ticlib or --without-ticlib was given.
6367 if test "${with_ticlib+set}" = set; then
6368   withval="$with_ticlib"
6369   with_ticlib=$withval
6370 else
6371   with_ticlib=no
6372 fi;
6373 echo "$as_me:6373: result: $with_ticlib" >&5
6374 echo "${ECHO_T}$with_ticlib" >&6
6375
6376 if test X"$CC_G_OPT" = X"" ; then
6377         CC_G_OPT='-g'
6378         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
6379 fi
6380
6381 if test X"$CXX_G_OPT" = X"" ; then
6382         CXX_G_OPT='-g'
6383         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
6384 fi
6385
6386 echo "$as_me:6386: checking for default loader flags" >&5
6387 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
6388 case "$DFT_LWR_MODEL" in
6389 (libtool) LD_MODEL=''   ;;
6390 (normal)  LD_MODEL=''   ;;
6391 (debug)   LD_MODEL=$CC_G_OPT ;;
6392 (profile) LD_MODEL='-pg';;
6393 (shared)  LD_MODEL=''   ;;
6394 esac
6395 echo "$as_me:6395: result: ${LD_MODEL:-(none)}" >&5
6396 echo "${ECHO_T}${LD_MODEL:-(none)}" >&6
6397
6398 case "$DFT_LWR_MODEL" in
6399 (shared)
6400
6401 echo "$as_me:6401: checking if rpath option should be used" >&5
6402 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
6403
6404 # Check whether --enable-rpath or --disable-rpath was given.
6405 if test "${enable_rpath+set}" = set; then
6406   enableval="$enable_rpath"
6407   cf_cv_enable_rpath=$enableval
6408 else
6409   cf_cv_enable_rpath=no
6410 fi;
6411 echo "$as_me:6411: result: $cf_cv_enable_rpath" >&5
6412 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
6413
6414 echo "$as_me:6414: checking if shared libraries should be relinked during install" >&5
6415 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6416
6417 # Check whether --enable-relink or --disable-relink was given.
6418 if test "${enable_relink+set}" = set; then
6419   enableval="$enable_relink"
6420   cf_cv_do_relink=$enableval
6421 else
6422   cf_cv_do_relink=yes
6423 fi;
6424 echo "$as_me:6424: result: $cf_cv_do_relink" >&5
6425 echo "${ECHO_T}$cf_cv_do_relink" >&6
6426         ;;
6427 esac
6428
6429 # we will build libraries one-level down.
6430 rel_builddir=..
6431
6432 LD_RPATH_OPT=
6433 if test "x$cf_cv_enable_rpath" != xno
6434 then
6435         echo "$as_me:6435: checking for an rpath option" >&5
6436 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6437         case "$cf_cv_system_name" in
6438         (irix*)
6439                 if test "$GCC" = yes; then
6440                         LD_RPATH_OPT="-Wl,-rpath,"
6441                 else
6442                         LD_RPATH_OPT="-rpath "
6443                 fi
6444                 ;;
6445         (linux*|gnu*|k*bsd*-gnu|freebsd*)
6446                 LD_RPATH_OPT="-Wl,-rpath,"
6447                 ;;
6448         (openbsd[2-9].*|mirbsd*)
6449                 LD_RPATH_OPT="-Wl,-rpath,"
6450                 ;;
6451         (dragonfly*)
6452                 LD_RPATH_OPT="-rpath "
6453                 ;;
6454         (netbsd*)
6455                 LD_RPATH_OPT="-Wl,-rpath,"
6456                 ;;
6457         (osf*|mls+*)
6458                 LD_RPATH_OPT="-rpath "
6459                 ;;
6460         (solaris2*)
6461                 LD_RPATH_OPT="-R"
6462                 ;;
6463         (*)
6464                 ;;
6465         esac
6466         echo "$as_me:6466: result: $LD_RPATH_OPT" >&5
6467 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6468
6469         case "x$LD_RPATH_OPT" in
6470         (x-R*)
6471                 echo "$as_me:6471: checking if we need a space after rpath option" >&5
6472 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6473                 cf_save_LIBS="$LIBS"
6474
6475 cf_add_libs="$LIBS"
6476 # reverse order
6477 cf_add_0lib=
6478 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6479 # filter duplicates
6480 for cf_add_1lib in $cf_add_0lib; do
6481         for cf_add_2lib in $cf_add_libs; do
6482                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6483                         cf_add_1lib=
6484                         break
6485                 fi
6486         done
6487         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6488 done
6489 LIBS="$cf_add_libs"
6490
6491                 cat >"conftest.$ac_ext" <<_ACEOF
6492 #line 6492 "configure"
6493 #include "confdefs.h"
6494
6495 int
6496 main (void)
6497 {
6498
6499   ;
6500   return 0;
6501 }
6502 _ACEOF
6503 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6504 if { (eval echo "$as_me:6504: \"$ac_link\"") >&5
6505   (eval $ac_link) 2>&5
6506   ac_status=$?
6507   echo "$as_me:6507: \$? = $ac_status" >&5
6508   (exit "$ac_status"); } &&
6509          { ac_try='test -s "conftest$ac_exeext"'
6510   { (eval echo "$as_me:6510: \"$ac_try\"") >&5
6511   (eval $ac_try) 2>&5
6512   ac_status=$?
6513   echo "$as_me:6513: \$? = $ac_status" >&5
6514   (exit "$ac_status"); }; }; then
6515   cf_rpath_space=no
6516 else
6517   echo "$as_me: failed program was:" >&5
6518 cat "conftest.$ac_ext" >&5
6519 cf_rpath_space=yes
6520 fi
6521 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6522                 LIBS="$cf_save_LIBS"
6523                 echo "$as_me:6523: result: $cf_rpath_space" >&5
6524 echo "${ECHO_T}$cf_rpath_space" >&6
6525                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6526                 ;;
6527         esac
6528 fi
6529
6530         RM_SHARED_OPTS=
6531         LOCAL_LDFLAGS=
6532         LOCAL_LDFLAGS2=
6533         LD_SHARED_OPTS=
6534         INSTALL_LIB="-m 644"
6535         : ${rel_builddir:=.}
6536
6537         shlibdir=$libdir
6538
6539         MAKE_DLLS="#"
6540
6541         cf_cv_do_symlinks=no
6542         cf_ld_rpath_opt=
6543         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6544
6545         echo "$as_me:6545: checking whether to use release or ABI version in shared library file names" >&5
6546 echo $ECHO_N "checking whether to use release or ABI version in shared library file names... $ECHO_C" >&6
6547
6548 # Check whether --with-shlib-version or --without-shlib-version was given.
6549 if test "${with_shlib_version+set}" = set; then
6550   withval="$with_shlib_version"
6551   test -z "$withval" && withval=auto
6552         case "$withval" in
6553         (yes)
6554                 cf_cv_shlib_version=auto
6555                 ;;
6556         (rel|abi|auto)
6557                 cf_cv_shlib_version=$withval
6558                 ;;
6559         (*)
6560                 echo "$as_me:6560: result: $withval" >&5
6561 echo "${ECHO_T}$withval" >&6
6562                 { { echo "$as_me:6562: error: option value must be one of: rel, abi, or auto" >&5
6563 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6564    { (exit 1); exit 1; }; }
6565                 ;;
6566         esac
6567
6568 else
6569   cf_cv_shlib_version=auto
6570 fi;
6571         echo "$as_me:6571: result: $cf_cv_shlib_version" >&5
6572 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6573
6574         cf_cv_rm_so_locs=no
6575         cf_try_cflags=
6576
6577         # Some less-capable ports of gcc support only -fpic
6578         CC_SHARED_OPTS=
6579
6580         cf_try_fPIC=no
6581         if test "$GCC" = yes
6582         then
6583                 cf_try_fPIC=yes
6584         else
6585                 case "$cf_cv_system_name" in
6586                 (*linux*)       # e.g., PGI compiler
6587                         cf_try_fPIC=yes
6588                         ;;
6589                 esac
6590         fi
6591
6592         if test "$cf_try_fPIC" = yes
6593         then
6594                 echo "$as_me:6594: checking which $CC option to use" >&5
6595 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6596                 cf_save_CFLAGS="$CFLAGS"
6597                 for CC_SHARED_OPTS in -fPIC -fpic ''
6598                 do
6599                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6600                         cat >"conftest.$ac_ext" <<_ACEOF
6601 #line 6601 "configure"
6602 #include "confdefs.h"
6603 #include <stdio.h>
6604 int
6605 main (void)
6606 {
6607 int x = 1; (void)x
6608   ;
6609   return 0;
6610 }
6611 _ACEOF
6612 rm -f "conftest.$ac_objext"
6613 if { (eval echo "$as_me:6613: \"$ac_compile\"") >&5
6614   (eval $ac_compile) 2>&5
6615   ac_status=$?
6616   echo "$as_me:6616: \$? = $ac_status" >&5
6617   (exit "$ac_status"); } &&
6618          { ac_try='test -s "conftest.$ac_objext"'
6619   { (eval echo "$as_me:6619: \"$ac_try\"") >&5
6620   (eval $ac_try) 2>&5
6621   ac_status=$?
6622   echo "$as_me:6622: \$? = $ac_status" >&5
6623   (exit "$ac_status"); }; }; then
6624   break
6625 else
6626   echo "$as_me: failed program was:" >&5
6627 cat "conftest.$ac_ext" >&5
6628 fi
6629 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6630                 done
6631                 echo "$as_me:6631: result: $CC_SHARED_OPTS" >&5
6632 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6633                 CFLAGS="$cf_save_CFLAGS"
6634         fi
6635
6636         cf_cv_shlib_version_infix=no
6637
6638         case "$cf_cv_system_name" in
6639         (aix4.3-9*|aix[5-7]*)
6640                 if test "$GCC" = yes; then
6641                         CC_SHARED_OPTS='-Wl,-brtl'
6642                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6643                 else
6644                         CC_SHARED_OPTS='-brtl'
6645                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6646                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6647                 fi
6648                 ;;
6649         (beos*)
6650                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6651                 ;;
6652         (cygwin*)
6653                 CC_SHARED_OPTS=
6654                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6655                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6656                 cf_cv_shlib_version=cygdll
6657                 cf_cv_shlib_version_infix=cygdll
6658                 shlibdir=$bindir
6659                 MAKE_DLLS=
6660                 cat >mk_shared_lib.sh <<-CF_EOF
6661                 #!$SHELL
6662                 SHARED_LIB=\$1
6663                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6664                 shift
6665                 cat <<-EOF
6666                 Linking shared library
6667                 ** SHARED_LIB \$SHARED_LIB
6668                 ** IMPORT_LIB \$IMPORT_LIB
6669 EOF
6670                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6671 CF_EOF
6672                 chmod +x mk_shared_lib.sh
6673                 ;;
6674         (msys*)
6675                 CC_SHARED_OPTS=
6676                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6677                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6678                 cf_cv_shlib_version=msysdll
6679                 cf_cv_shlib_version_infix=msysdll
6680                 shlibdir=$bindir
6681                 MAKE_DLLS=
6682                 cat >mk_shared_lib.sh <<-CF_EOF
6683                 #!$SHELL
6684                 SHARED_LIB=\$1
6685                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6686                 shift
6687                 cat <<-EOF
6688                 Linking shared library
6689                 ** SHARED_LIB \$SHARED_LIB
6690                 ** IMPORT_LIB \$IMPORT_LIB
6691 EOF
6692                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6693 CF_EOF
6694                 chmod +x mk_shared_lib.sh
6695                 ;;
6696         (darwin*)
6697                 cf_try_cflags="no-cpp-precomp"
6698                 CC_SHARED_OPTS="-dynamic"
6699                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6700                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6701                 cf_cv_shlib_version_infix=yes
6702                 echo "$as_me:6702: checking if ld -search_paths_first works" >&5
6703 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6704 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6705   echo $ECHO_N "(cached) $ECHO_C" >&6
6706 else
6707
6708                         cf_save_LDFLAGS=$LDFLAGS
6709                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6710                         cat >"conftest.$ac_ext" <<_ACEOF
6711 #line 6711 "configure"
6712 #include "confdefs.h"
6713
6714 int
6715 main (void)
6716 {
6717 int i;
6718   ;
6719   return 0;
6720 }
6721 _ACEOF
6722 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6723 if { (eval echo "$as_me:6723: \"$ac_link\"") >&5
6724   (eval $ac_link) 2>&5
6725   ac_status=$?
6726   echo "$as_me:6726: \$? = $ac_status" >&5
6727   (exit "$ac_status"); } &&
6728          { ac_try='test -s "conftest$ac_exeext"'
6729   { (eval echo "$as_me:6729: \"$ac_try\"") >&5
6730   (eval $ac_try) 2>&5
6731   ac_status=$?
6732   echo "$as_me:6732: \$? = $ac_status" >&5
6733   (exit "$ac_status"); }; }; then
6734   cf_cv_ldflags_search_paths_first=yes
6735 else
6736   echo "$as_me: failed program was:" >&5
6737 cat "conftest.$ac_ext" >&5
6738 cf_cv_ldflags_search_paths_first=no
6739 fi
6740 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6741                                 LDFLAGS=$cf_save_LDFLAGS
6742 fi
6743 echo "$as_me:6743: result: $cf_cv_ldflags_search_paths_first" >&5
6744 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6745                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6746                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6747                 fi
6748                 ;;
6749         (haiku*)
6750
6751         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6752         if test "$cf_cv_shlib_version" = rel; then
6753                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6754         else
6755                 cf_cv_shared_soname='`basename $@`'
6756         fi
6757
6758                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6759                 ;;
6760         (hpux[7-8]*)
6761                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6762                 if test "$GCC" != yes; then
6763                         CC_SHARED_OPTS='+Z'
6764                 fi
6765                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6766                 INSTALL_LIB="-m 555"
6767                 ;;
6768         (hpux*)
6769                 # (tested with gcc 2.7.2 -- I don't have c89)
6770                 if test "$GCC" = yes; then
6771                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6772                 else
6773                         CC_SHARED_OPTS='+Z'
6774                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6775                 fi
6776                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6777                 # HP-UX shared libraries must be executable, and should be
6778                 # readonly to exploit a quirk in the memory manager.
6779                 INSTALL_LIB="-m 555"
6780                 ;;
6781         (interix*)
6782                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6783                 if test "$cf_cv_shlib_version" = rel; then
6784                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6785                 else
6786                         cf_shared_soname='`basename $@`'
6787                 fi
6788                 CC_SHARED_OPTS=
6789                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6790                 ;;
6791         (irix*)
6792                 if test "$cf_cv_enable_rpath" = yes ; then
6793                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6794                 fi
6795                 # tested with IRIX 5.2 and 'cc'.
6796                 if test "$GCC" != yes; then
6797                         CC_SHARED_OPTS='-KPIC'
6798                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6799                 else
6800                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6801                 fi
6802                 cf_cv_rm_so_locs=yes
6803                 ;;
6804         (linux*|gnu*|k*bsd*-gnu)
6805                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6806                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6807                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6808                 fi
6809                 if test "$cf_cv_enable_rpath" = yes ; then
6810                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6811                 fi
6812
6813         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6814         if test "$cf_cv_shlib_version" = rel; then
6815                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6816         else
6817                 cf_cv_shared_soname='`basename $@`'
6818         fi
6819
6820                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6821                 ;;
6822         (mingw*msvc*)
6823                 cf_cv_shlib_version=msvcdll
6824                 cf_cv_shlib_version_infix=msvcdll
6825                 shlibdir=$bindir
6826                 MAKE_DLLS=
6827                 if test "$DFT_LWR_MODEL" = "shared" ; then
6828                         LOCAL_LDFLAGS="-link -dll"
6829                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6830                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6831                 fi
6832                 CC_SHARED_OPTS=
6833                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6834                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6835                 cat >mk_shared_lib.sh <<-CF_EOF
6836                 #!$SHELL
6837                 SHARED_LIB=\$1
6838                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6839                 shift
6840                 my_ld=\$1
6841                 shift
6842                 cat <<-EOF
6843                 Linking shared library
6844                 ** SHARED LIB \$SHARED_LIB
6845                 ** IMPORT_LIB \$IMPORT_LIB
6846 EOF
6847                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6848                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6849                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6850 CF_EOF
6851                 chmod +x mk_shared_lib.sh
6852                 cat >mk_prog.sh <<-CF_EOF
6853                 #!$SHELL
6854                 shift
6855                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6856                 LD="$LD"
6857                 clopts=()
6858                 ldopts=("/subsystem:console")
6859                 libs=()
6860                 isdll=0
6861                 while test \$# -gt 0; do
6862                         case "\$1" in
6863                                 -link)
6864                                         # ignore -link argument
6865                                         ;;
6866                                 -M[TD] | -M[TD]d)
6867                                         # ignore runtime-library option
6868                                         ;;
6869                                 -dll)
6870                                         isdll=1
6871                                         ;;
6872                                 -W* | -w*)
6873                                         # ignore warnings
6874                                         ;;
6875                                 -D*)
6876                                         clopts+=("\$1")
6877                                         ;;
6878                                 -I*)
6879                                         clopts+=("\$1")
6880                                         ;;
6881                                 -l*)
6882                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6883                                         ;;
6884                                 -L*)
6885                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6886                                         ;;
6887                                 *.obj | *.o)
6888                                         ldopts+=("\$1")
6889                                         ;;
6890                                 -Wl,*)
6891                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6892                                                 ldopts+=("\${linkarg}")
6893                                         done
6894                                         ;;
6895                                 *.lib)
6896                                         ldopts+=("\$1")
6897                                         ;;
6898                                 -o)
6899                                         shift
6900                                         ldopts+=("-out:\$1")
6901                                         ;;
6902                                 *)
6903                                         clopts+=("\$1")
6904                                         ldopts+=("\$1")
6905                                         ;;
6906                         esac
6907                         shift
6908                 done
6909                 if [ "\$isdll" -ne 0 ]; then
6910                         for lib in \${libs[*]}; do
6911                                 ldopts+=("\$lib.dll.lib")
6912                         done
6913                 else
6914                         for lib in \${libs[*]}; do
6915                                 ldopts+=("\$lib.lib")
6916                         done
6917                 fi
6918                 cat <<-EOF
6919                 Creating program
6920                 ** ld options:   "\${ldopts[@]}"
6921 EOF
6922                 exec \$LD \${ldopts[@]}
6923 CF_EOF
6924                 chmod +x mk_prog.sh
6925                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6926                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6927                 ;;
6928         (mingw*)
6929                 cf_cv_shlib_version=mingw
6930                 cf_cv_shlib_version_infix=mingw
6931                 shlibdir=$bindir
6932                 MAKE_DLLS=
6933                 if test "$DFT_LWR_MODEL" = "shared" ; then
6934                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6935                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6936                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6937                 fi
6938                 CC_SHARED_OPTS=
6939                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6940                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6941                 cat >mk_shared_lib.sh <<-CF_EOF
6942                 #!$SHELL
6943                 SHARED_LIB=\$1
6944                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6945                 shift
6946                 cat <<-EOF
6947                 Linking shared library
6948                 ** SHARED_LIB \$SHARED_LIB
6949                 ** IMPORT_LIB \$IMPORT_LIB
6950 EOF
6951                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6952 CF_EOF
6953                 chmod +x mk_shared_lib.sh
6954                 ;;
6955         (openbsd[2-9].*|mirbsd*)
6956                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6957                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6958                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6959                 fi
6960                 if test "$cf_cv_enable_rpath" = yes ; then
6961                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6962                 fi
6963                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6964
6965         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6966         if test "$cf_cv_shlib_version" = rel; then
6967                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6968         else
6969                 cf_cv_shared_soname='`basename $@`'
6970         fi
6971
6972                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6973                 ;;
6974         (nskJ*)
6975                 CC_SHARED_OPTS=
6976                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6977                 ;;
6978         (nskL*)
6979                 CC_SHARED_OPTS=
6980                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6981                 ;;
6982         (nto-qnx*|openbsd*|freebsd[12].*)
6983                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6984                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6985                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6986                 ;;
6987         (dragonfly*|freebsd*)
6988                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6989                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6990                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6991                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6992                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6993                 fi
6994
6995         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6996         if test "$cf_cv_shlib_version" = rel; then
6997                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6998         else
6999                 cf_cv_shared_soname='`basename $@`'
7000         fi
7001
7002                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7003                 ;;
7004         (netbsd*)
7005                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7006                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7007                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7008                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7009                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7010                         if test "$cf_cv_shlib_version" = auto; then
7011                         if test -f /usr/libexec/ld.elf_so; then
7012                                 cf_cv_shlib_version=abi
7013                         else
7014                                 cf_cv_shlib_version=rel
7015                         fi
7016                         fi
7017
7018         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7019         if test "$cf_cv_shlib_version" = rel; then
7020                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7021         else
7022                 cf_cv_shared_soname='`basename $@`'
7023         fi
7024
7025                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7026                 else
7027                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
7028                 fi
7029                 ;;
7030         (osf*|mls+*)
7031                 # tested with OSF/1 V3.2 and 'cc'
7032                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7033                 # link with shared libs).
7034                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7035                 case "$host_os" in
7036                 (osf4*)
7037                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7038                         ;;
7039                 esac
7040                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7041                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7042                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7043                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7044                 fi
7045                 cf_cv_rm_so_locs=yes
7046                 ;;
7047         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
7048                 # tested with osr5.0.5
7049                 if test "$GCC" != yes; then
7050                         CC_SHARED_OPTS='-belf -KPIC'
7051                 fi
7052                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7053                 if test "$cf_cv_enable_rpath" = yes ; then
7054                         # only way is to set LD_RUN_PATH but no switch for it
7055                         RUN_PATH=$libdir
7056                 fi
7057                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7058                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7059                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7060                 ;;
7061         (sunos4*)
7062                 # tested with SunOS 4.1.1 and gcc 2.7.0
7063                 if test "$GCC" != yes; then
7064                         CC_SHARED_OPTS='-KPIC'
7065                 fi
7066                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
7067                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7068                 ;;
7069         (solaris2*)
7070                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7071                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7072                 if test "$DFT_LWR_MODEL" = "shared" ; then
7073                         LOCAL_LDFLAGS="-R\$(LOCAL_LIBDIR):\${libdir}"
7074                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7075                 fi
7076                 if test "$cf_cv_enable_rpath" = yes ; then
7077                         EXTRA_LDFLAGS="-R\${libdir} $EXTRA_LDFLAGS"
7078                 fi
7079
7080         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7081         if test "$cf_cv_shlib_version" = rel; then
7082                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7083         else
7084                 cf_cv_shared_soname='`basename $@`'
7085         fi
7086
7087                 if test "$GCC" != yes; then
7088                         cf_save_CFLAGS="$CFLAGS"
7089                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7090                         do
7091                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7092                                 cat >"conftest.$ac_ext" <<_ACEOF
7093 #line 7093 "configure"
7094 #include "confdefs.h"
7095 #include <stdio.h>
7096 int
7097 main (void)
7098 {
7099 printf("Hello\\n");
7100   ;
7101   return 0;
7102 }
7103 _ACEOF
7104 rm -f "conftest.$ac_objext"
7105 if { (eval echo "$as_me:7105: \"$ac_compile\"") >&5
7106   (eval $ac_compile) 2>&5
7107   ac_status=$?
7108   echo "$as_me:7108: \$? = $ac_status" >&5
7109   (exit "$ac_status"); } &&
7110          { ac_try='test -s "conftest.$ac_objext"'
7111   { (eval echo "$as_me:7111: \"$ac_try\"") >&5
7112   (eval $ac_try) 2>&5
7113   ac_status=$?
7114   echo "$as_me:7114: \$? = $ac_status" >&5
7115   (exit "$ac_status"); }; }; then
7116   break
7117 else
7118   echo "$as_me: failed program was:" >&5
7119 cat "conftest.$ac_ext" >&5
7120 fi
7121 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7122                         done
7123                         CFLAGS="$cf_save_CFLAGS"
7124                         CC_SHARED_OPTS=$cf_shared_opts
7125                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
7126                 else
7127                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7128                 fi
7129                 ;;
7130         (sysv5uw7*|unix_sv*)
7131                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7132                 if test "$GCC" != yes; then
7133                         CC_SHARED_OPTS='-KPIC'
7134                 fi
7135                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
7136                 ;;
7137         (*)
7138                 CC_SHARED_OPTS='unknown'
7139                 MK_SHARED_LIB='echo unknown'
7140                 ;;
7141         esac
7142
7143         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7144         case "$cf_cv_shlib_version" in
7145         (rel|abi)
7146                 case "$MK_SHARED_LIB" in
7147                 (*'-o $@')
7148                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7149                         ;;
7150                 (*)
7151                         { echo "$as_me:7151: WARNING: ignored --with-shlib-version" >&5
7152 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7153                         ;;
7154                 esac
7155                 ;;
7156         esac
7157
7158         if test -n "$cf_try_cflags"
7159         then
7160 cat > conftest.$ac_ext <<EOF
7161 #line 7161 "${as_me:-configure}"
7162 #include <stdio.h>
7163 int main(int argc, char *argv[])
7164 {
7165         printf("hello\\n");
7166         return (argv[argc-1] == 0) ;
7167 }
7168 EOF
7169                 cf_save_CFLAGS="$CFLAGS"
7170                 for cf_opt in $cf_try_cflags
7171                 do
7172                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
7173                         echo "$as_me:7173: checking if CFLAGS option -$cf_opt works" >&5
7174 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7175                         if { (eval echo "$as_me:7175: \"$ac_compile\"") >&5
7176   (eval $ac_compile) 2>&5
7177   ac_status=$?
7178   echo "$as_me:7178: \$? = $ac_status" >&5
7179   (exit "$ac_status"); }; then
7180                                 echo "$as_me:7180: result: yes" >&5
7181 echo "${ECHO_T}yes" >&6
7182                                 cf_save_CFLAGS="$CFLAGS"
7183                         else
7184                                 echo "$as_me:7184: result: no" >&5
7185 echo "${ECHO_T}no" >&6
7186                         fi
7187                 done
7188                 CFLAGS="$cf_save_CFLAGS"
7189         fi
7190
7191         # RPATH_LIST is a colon-separated list of directories
7192         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7193         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7194
7195         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7196
7197         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7198
7199 echo "${as_me:-configure}:7199: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7200
7201         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7202
7203 echo "${as_me:-configure}:7203: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7204
7205 for model in $cf_list_models ; do
7206         case "$model" in
7207         (libtool)
7208
7209 echo "$as_me:7209: checking for additional libtool options" >&5
7210 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
7211
7212 # Check whether --with-libtool-opts or --without-libtool-opts was given.
7213 if test "${with_libtool_opts+set}" = set; then
7214   withval="$with_libtool_opts"
7215   with_libtool_opts=$withval
7216 else
7217   with_libtool_opts=no
7218 fi;
7219 echo "$as_me:7219: result: $with_libtool_opts" >&5
7220 echo "${ECHO_T}$with_libtool_opts" >&6
7221
7222 case .$with_libtool_opts in
7223 (.yes|.no|.)
7224         ;;
7225 (*)
7226         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
7227         ;;
7228 esac
7229
7230 echo "$as_me:7230: checking if exported-symbols file should be used" >&5
7231 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
7232
7233 # Check whether --with-export-syms or --without-export-syms was given.
7234 if test "${with_export_syms+set}" = set; then
7235   withval="$with_export_syms"
7236   with_export_syms=$withval
7237 else
7238   with_export_syms=no
7239 fi;
7240 if test "x$with_export_syms" = xyes
7241 then
7242         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
7243
7244 fi
7245 echo "$as_me:7245: result: $with_export_syms" >&5
7246 echo "${ECHO_T}$with_export_syms" >&6
7247 if test "x$with_export_syms" != xno
7248 then
7249         EXPORT_SYMS="-export-symbols $with_export_syms"
7250
7251 fi
7252
7253                 ;;
7254         (shared)
7255                 if test "$CC_SHARED_OPTS" = "unknown"; then
7256                         { { echo "$as_me:7256: error: Shared libraries are not supported in this version" >&5
7257 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
7258    { (exit 1); exit 1; }; }
7259                 fi
7260                 # workaround for inept transition to PIE vs PIC...
7261                 echo "$as_me:7261: checking if current CFLAGS link properly" >&5
7262 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
7263                 cat >"conftest.$ac_ext" <<_ACEOF
7264 #line 7264 "configure"
7265 #include "confdefs.h"
7266 #include <stdio.h>
7267 int
7268 main (void)
7269 {
7270 printf("Hello work\\n");
7271   ;
7272   return 0;
7273 }
7274 _ACEOF
7275 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7276 if { (eval echo "$as_me:7276: \"$ac_link\"") >&5
7277   (eval $ac_link) 2>&5
7278   ac_status=$?
7279   echo "$as_me:7279: \$? = $ac_status" >&5
7280   (exit "$ac_status"); } &&
7281          { ac_try='test -s "conftest$ac_exeext"'
7282   { (eval echo "$as_me:7282: \"$ac_try\"") >&5
7283   (eval $ac_try) 2>&5
7284   ac_status=$?
7285   echo "$as_me:7285: \$? = $ac_status" >&5
7286   (exit "$ac_status"); }; }; then
7287   cf_cflags_work=yes
7288 else
7289   echo "$as_me: failed program was:" >&5
7290 cat "conftest.$ac_ext" >&5
7291 cf_cflags_work=no
7292 fi
7293 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7294                 echo "$as_me:7294: result: $cf_cflags_work" >&5
7295 echo "${ECHO_T}$cf_cflags_work" >&6
7296                 if test "$cf_cflags_work" = no
7297                 then
7298                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
7299
7300 echo "${as_me:-configure}:7300: testing try to work around by appending shared-options ..." 1>&5
7301
7302                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
7303                 fi
7304
7305 echo "$as_me:7305: checking if versioned-symbols file should be used" >&5
7306 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
7307
7308 # Check whether --with-versioned-syms or --without-versioned-syms was given.
7309 if test "${with_versioned_syms+set}" = set; then
7310   withval="$with_versioned_syms"
7311   with_versioned_syms=$withval
7312 else
7313   with_versioned_syms=no
7314 fi;
7315 case "x$with_versioned_syms" in
7316 (xyes)
7317         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
7318
7319         ;;
7320 (xno)
7321         ;;
7322 (x/*)
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         ;;
7327 (*)
7328         test -f "$with_versioned_syms" || { { echo "$as_me:7328: error: expected a filename: $with_versioned_syms" >&5
7329 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7330    { (exit 1); exit 1; }; }
7331         with_versioned_syms=`pwd`/"$with_versioned_syms"
7332         ;;
7333 esac
7334 echo "$as_me:7334: result: $with_versioned_syms" >&5
7335 echo "${ECHO_T}$with_versioned_syms" >&6
7336
7337 RESULTING_SYMS=
7338 VERSIONED_SYMS=
7339 WILDCARD_SYMS=
7340
7341 if test "x$with_versioned_syms" != xno
7342 then
7343         RESULTING_SYMS=$with_versioned_syms
7344         case "x$MK_SHARED_LIB" in
7345         (*-Wl,*)
7346                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
7347                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
7348                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7349
7350 echo "${as_me:-configure}:7350: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7351
7352                 ;;
7353         (*-dy\ *)
7354                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
7355                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
7356                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7357
7358 echo "${as_me:-configure}:7358: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7359
7360                 ;;
7361         (*)
7362                 { echo "$as_me:7362: WARNING: this system does not support versioned-symbols" >&5
7363 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
7364                 ;;
7365         esac
7366
7367         # Linux ld can selectively override scope, e.g., of symbols beginning with
7368         # "_" by first declaring some as global, and then using a wildcard to
7369         # declare the others as local.  Some other loaders cannot do this.  Check
7370         # by constructing a (very) simple shared library and inspecting its
7371         # symbols.
7372         if test "x$VERSIONED_SYMS" != "x"
7373         then
7374                 echo "$as_me:7374: checking if wildcards can be used to selectively omit symbols" >&5
7375 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
7376                 WILDCARD_SYMS=no
7377
7378                 # make sources
7379                 rm -f conftest.*
7380
7381                 cat >conftest.ver <<EOF
7382 module_1.0 {
7383 global:
7384         globalf1;
7385 local:
7386         localf1;
7387 };
7388 module_2.0 {
7389 global:
7390         globalf2;
7391 local:
7392         localf2;
7393         _*;
7394 } module_1.0;
7395 submodule_1.0 {
7396 global:
7397         subglobalf1;
7398         _ismissing;
7399 local:
7400         sublocalf1;
7401 };
7402 submodule_2.0 {
7403 global:
7404         subglobalf2;
7405 local:
7406         sublocalf2;
7407         _*;
7408 } submodule_1.0;
7409 EOF
7410                 cat >conftest.$ac_ext <<EOF
7411 #line 7411 "configure"
7412 extern int _ismissing(void);    int _ismissing(void)  { return 1; }
7413 extern int _localf1(void);      int _localf1(void)    { return 1; }
7414 extern int _localf2(void);      int _localf2(void)    { return 2; }
7415 extern int globalf1(void);      int globalf1(void)    { return 1; }
7416 extern int globalf2(void);      int globalf2(void)    { return 2; }
7417 extern int _sublocalf1(void);   int _sublocalf1(void) { return 1; }
7418 extern int _sublocalf2(void);   int _sublocalf2(void) { return 2; }
7419 extern int subglobalf1(void);   int subglobalf1(void) { return 1; }
7420 extern int subglobalf2(void);   int subglobalf2(void) { return 2; }
7421 EOF
7422                 cat >conftest.mk <<EOF
7423 CC=${CC}
7424 CFLAGS=${CFLAGS}
7425 CPPFLAGS=${CPPFLAGS}
7426 LDFLAGS=${LDFLAGS}
7427 LIBS=${LIBS}
7428 VERSIONED_SYMS=${VERSIONED_SYMS}
7429 RESULTING_SYMS=conftest.ver
7430 MK_SHARED_LIB=${MK_SHARED_LIB}
7431 conftest.so: conftest.$ac_cv_objext
7432                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
7433 EOF
7434
7435                 # compile source, make library
7436                 if make -f conftest.mk 2>&5 >/dev/null
7437                 then
7438                         # test for missing symbol in either Data or Text section
7439                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
7440                         test -n "$cf_missing" && WILDCARD_SYMS=yes
7441                 fi
7442                 echo "$as_me:7442: result: $WILDCARD_SYMS" >&5
7443 echo "${ECHO_T}$WILDCARD_SYMS" >&6
7444                 rm -f conftest.*
7445         fi
7446 fi
7447
7448                 ;;
7449         esac
7450 done
7451
7452 ### Checks for special libraries, must be done up-front.
7453 SHLIB_LIST=""
7454
7455 echo "$as_me:7455: checking if you want to link with the GPM mouse library" >&5
7456 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7457
7458 # Check whether --with-gpm or --without-gpm was given.
7459 if test "${with_gpm+set}" = set; then
7460   withval="$with_gpm"
7461   with_gpm=$withval
7462 else
7463   with_gpm=maybe
7464 fi;
7465 echo "$as_me:7465: result: $with_gpm" >&5
7466 echo "${ECHO_T}$with_gpm" >&6
7467
7468 if test "$with_gpm" != no ; then
7469         echo "$as_me:7469: checking for gpm.h" >&5
7470 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7471 if test "${ac_cv_header_gpm_h+set}" = set; then
7472   echo $ECHO_N "(cached) $ECHO_C" >&6
7473 else
7474   cat >"conftest.$ac_ext" <<_ACEOF
7475 #line 7475 "configure"
7476 #include "confdefs.h"
7477 #include <gpm.h>
7478 _ACEOF
7479 if { (eval echo "$as_me:7479: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7480   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7481   ac_status=$?
7482   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7483   rm -f conftest.er1
7484   cat conftest.err >&5
7485   echo "$as_me:7485: \$? = $ac_status" >&5
7486   (exit "$ac_status"); } >/dev/null; then
7487   if test -s conftest.err; then
7488     ac_cpp_err=$ac_c_preproc_warn_flag
7489   else
7490     ac_cpp_err=
7491   fi
7492 else
7493   ac_cpp_err=yes
7494 fi
7495 if test -z "$ac_cpp_err"; then
7496   ac_cv_header_gpm_h=yes
7497 else
7498   echo "$as_me: failed program was:" >&5
7499   cat "conftest.$ac_ext" >&5
7500   ac_cv_header_gpm_h=no
7501 fi
7502 rm -f conftest.err "conftest.$ac_ext"
7503 fi
7504 echo "$as_me:7504: result: $ac_cv_header_gpm_h" >&5
7505 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7506 if test "$ac_cv_header_gpm_h" = yes; then
7507
7508 cat >>confdefs.h <<\EOF
7509 #define HAVE_GPM_H 1
7510 EOF
7511
7512                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7513                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7514
7515 echo "${as_me:-configure}:7515: testing assuming we really have GPM library ..." 1>&5
7516
7517 cat >>confdefs.h <<\EOF
7518 #define HAVE_LIBGPM 1
7519 EOF
7520
7521                         with_gpm=yes
7522                 else
7523                         echo "$as_me:7523: checking for Gpm_Open in -lgpm" >&5
7524 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7525 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7526   echo $ECHO_N "(cached) $ECHO_C" >&6
7527 else
7528   ac_check_lib_save_LIBS=$LIBS
7529 LIBS="-lgpm  $LIBS"
7530 cat >"conftest.$ac_ext" <<_ACEOF
7531 #line 7531 "configure"
7532 #include "confdefs.h"
7533
7534 /* Override any gcc2 internal prototype to avoid an error.  */
7535 #ifdef __cplusplus
7536 extern "C"
7537 #endif
7538 /* We use char because int might match the return type of a gcc2
7539    builtin and then its argument prototype would still apply.  */
7540 char Gpm_Open (void);
7541 int
7542 main (void)
7543 {
7544 Gpm_Open ();
7545   ;
7546   return 0;
7547 }
7548 _ACEOF
7549 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7550 if { (eval echo "$as_me:7550: \"$ac_link\"") >&5
7551   (eval $ac_link) 2>&5
7552   ac_status=$?
7553   echo "$as_me:7553: \$? = $ac_status" >&5
7554   (exit "$ac_status"); } &&
7555          { ac_try='test -s "conftest$ac_exeext"'
7556   { (eval echo "$as_me:7556: \"$ac_try\"") >&5
7557   (eval $ac_try) 2>&5
7558   ac_status=$?
7559   echo "$as_me:7559: \$? = $ac_status" >&5
7560   (exit "$ac_status"); }; }; then
7561   ac_cv_lib_gpm_Gpm_Open=yes
7562 else
7563   echo "$as_me: failed program was:" >&5
7564 cat "conftest.$ac_ext" >&5
7565 ac_cv_lib_gpm_Gpm_Open=no
7566 fi
7567 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7568 LIBS=$ac_check_lib_save_LIBS
7569 fi
7570 echo "$as_me:7570: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7571 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7572 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7573   with_gpm=yes
7574 else
7575
7576                                 if test "$with_gpm" = maybe; then
7577                                         { echo "$as_me:7577: WARNING: Cannot link with GPM library" >&5
7578 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7579                                         with_gpm=no
7580                                 else
7581                                         { { echo "$as_me:7581: error: Cannot link with GPM library" >&5
7582 echo "$as_me: error: Cannot link with GPM library" >&2;}
7583    { (exit 1); exit 1; }; }
7584                                 fi
7585
7586 fi
7587
7588                 fi
7589
7590 else
7591
7592                 test "$with_gpm" != maybe && { echo "$as_me:7592: WARNING: Cannot find GPM header" >&5
7593 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7594                 with_gpm=no
7595
7596 fi
7597
7598 fi
7599
7600 if test "$with_gpm" != no ; then
7601         echo "$as_me:7601: checking if you want to load GPM dynamically" >&5
7602 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7603
7604 # Check whether --with-dlsym or --without-dlsym was given.
7605 if test "${with_dlsym+set}" = set; then
7606   withval="$with_dlsym"
7607   with_dlsym=$withval
7608 else
7609   with_dlsym=yes
7610 fi;
7611         echo "$as_me:7611: result: $with_dlsym" >&5
7612 echo "${ECHO_T}$with_dlsym" >&6
7613         if test "x$with_dlsym" = xyes ; then
7614
7615 cf_have_dlsym=no
7616 echo "$as_me:7616: checking for dlsym" >&5
7617 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7618 if test "${ac_cv_func_dlsym+set}" = set; then
7619   echo $ECHO_N "(cached) $ECHO_C" >&6
7620 else
7621   cat >"conftest.$ac_ext" <<_ACEOF
7622 #line 7622 "configure"
7623 #include "confdefs.h"
7624 #define dlsym autoconf_temporary
7625 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7626 #undef dlsym
7627
7628 #ifdef __cplusplus
7629 extern "C"
7630 #endif
7631
7632 /* We use char because int might match the return type of a gcc2
7633    builtin and then its argument prototype would still apply.  */
7634 char dlsym (void);
7635
7636 int
7637 main (void)
7638 {
7639
7640 /* The GNU C library defines stubs for functions which it implements
7641     to always fail with ENOSYS.  Some functions are actually named
7642     something starting with __ and the normal name is an alias.  */
7643 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7644 #error found stub for dlsym
7645 #endif
7646
7647         return dlsym ();
7648   ;
7649   return 0;
7650 }
7651 _ACEOF
7652 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7653 if { (eval echo "$as_me:7653: \"$ac_link\"") >&5
7654   (eval $ac_link) 2>&5
7655   ac_status=$?
7656   echo "$as_me:7656: \$? = $ac_status" >&5
7657   (exit "$ac_status"); } &&
7658          { ac_try='test -s "conftest$ac_exeext"'
7659   { (eval echo "$as_me:7659: \"$ac_try\"") >&5
7660   (eval $ac_try) 2>&5
7661   ac_status=$?
7662   echo "$as_me:7662: \$? = $ac_status" >&5
7663   (exit "$ac_status"); }; }; then
7664   ac_cv_func_dlsym=yes
7665 else
7666   echo "$as_me: failed program was:" >&5
7667 cat "conftest.$ac_ext" >&5
7668 ac_cv_func_dlsym=no
7669 fi
7670 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7671 fi
7672 echo "$as_me:7672: result: $ac_cv_func_dlsym" >&5
7673 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7674 if test "$ac_cv_func_dlsym" = yes; then
7675   cf_have_dlsym=yes
7676 else
7677
7678 cf_have_libdl=no
7679 echo "$as_me:7679: checking for dlsym in -ldl" >&5
7680 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7681 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7682   echo $ECHO_N "(cached) $ECHO_C" >&6
7683 else
7684   ac_check_lib_save_LIBS=$LIBS
7685 LIBS="-ldl  $LIBS"
7686 cat >"conftest.$ac_ext" <<_ACEOF
7687 #line 7687 "configure"
7688 #include "confdefs.h"
7689
7690 /* Override any gcc2 internal prototype to avoid an error.  */
7691 #ifdef __cplusplus
7692 extern "C"
7693 #endif
7694 /* We use char because int might match the return type of a gcc2
7695    builtin and then its argument prototype would still apply.  */
7696 char dlsym (void);
7697 int
7698 main (void)
7699 {
7700 dlsym ();
7701   ;
7702   return 0;
7703 }
7704 _ACEOF
7705 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7706 if { (eval echo "$as_me:7706: \"$ac_link\"") >&5
7707   (eval $ac_link) 2>&5
7708   ac_status=$?
7709   echo "$as_me:7709: \$? = $ac_status" >&5
7710   (exit "$ac_status"); } &&
7711          { ac_try='test -s "conftest$ac_exeext"'
7712   { (eval echo "$as_me:7712: \"$ac_try\"") >&5
7713   (eval $ac_try) 2>&5
7714   ac_status=$?
7715   echo "$as_me:7715: \$? = $ac_status" >&5
7716   (exit "$ac_status"); }; }; then
7717   ac_cv_lib_dl_dlsym=yes
7718 else
7719   echo "$as_me: failed program was:" >&5
7720 cat "conftest.$ac_ext" >&5
7721 ac_cv_lib_dl_dlsym=no
7722 fi
7723 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7724 LIBS=$ac_check_lib_save_LIBS
7725 fi
7726 echo "$as_me:7726: result: $ac_cv_lib_dl_dlsym" >&5
7727 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7728 if test "$ac_cv_lib_dl_dlsym" = yes; then
7729
7730         cf_have_dlsym=yes
7731         cf_have_libdl=yes
7732 fi
7733
7734 fi
7735
7736 if test "$cf_have_dlsym" = yes ; then
7737         test "$cf_have_libdl" = yes && {
7738 cf_add_libs="$LIBS"
7739 # reverse order
7740 cf_add_0lib=
7741 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7742 # filter duplicates
7743 for cf_add_1lib in $cf_add_0lib; do
7744         for cf_add_2lib in $cf_add_libs; do
7745                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7746                         cf_add_1lib=
7747                         break
7748                 fi
7749         done
7750         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7751 done
7752 LIBS="$cf_add_libs"
7753  }
7754
7755         echo "$as_me:7755: checking whether able to link to dl*() functions" >&5
7756 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7757         cat >"conftest.$ac_ext" <<_ACEOF
7758 #line 7758 "configure"
7759 #include "confdefs.h"
7760 #include <dlfcn.h>
7761 int
7762 main (void)
7763 {
7764
7765                 void *obj;
7766                 if ((obj = dlopen("filename", 0)) != 0) {
7767                         if (dlsym(obj, "symbolname") == 0) {
7768                         dlclose(obj);
7769                         }
7770                 }
7771   ;
7772   return 0;
7773 }
7774 _ACEOF
7775 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7776 if { (eval echo "$as_me:7776: \"$ac_link\"") >&5
7777   (eval $ac_link) 2>&5
7778   ac_status=$?
7779   echo "$as_me:7779: \$? = $ac_status" >&5
7780   (exit "$ac_status"); } &&
7781          { ac_try='test -s "conftest$ac_exeext"'
7782   { (eval echo "$as_me:7782: \"$ac_try\"") >&5
7783   (eval $ac_try) 2>&5
7784   ac_status=$?
7785   echo "$as_me:7785: \$? = $ac_status" >&5
7786   (exit "$ac_status"); }; }; then
7787
7788 cat >>confdefs.h <<\EOF
7789 #define HAVE_LIBDL 1
7790 EOF
7791
7792 else
7793   echo "$as_me: failed program was:" >&5
7794 cat "conftest.$ac_ext" >&5
7795
7796                 { { echo "$as_me:7796: error: Cannot link test program for libdl" >&5
7797 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7798    { (exit 1); exit 1; }; }
7799 fi
7800 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7801         echo "$as_me:7801: result: ok" >&5
7802 echo "${ECHO_T}ok" >&6
7803 else
7804         { { echo "$as_me:7804: error: Cannot find dlsym function" >&5
7805 echo "$as_me: error: Cannot find dlsym function" >&2;}
7806    { (exit 1); exit 1; }; }
7807 fi
7808
7809                 if test "x$with_gpm" != xyes ; then
7810                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7811
7812 echo "${as_me:-configure}:7812: testing assuming soname for gpm is $with_gpm ..." 1>&5
7813
7814                         cf_cv_gpm_soname="$with_gpm"
7815                 else
7816
7817 echo "$as_me:7817: checking for soname of gpm library" >&5
7818 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7819 if test "${cf_cv_gpm_soname+set}" = set; then
7820   echo $ECHO_N "(cached) $ECHO_C" >&6
7821 else
7822
7823 cf_cv_gpm_soname=unknown
7824 if test "$cross_compiling" != yes ; then
7825 cat >conftest.$ac_ext <<CF_EOF
7826 #include <gpm.h>
7827 int main(void)
7828 {
7829 if (Gpm_Open(0,0)) Gpm_Close();
7830         ${cf_cv_main_return:-return}(0);
7831 }
7832 CF_EOF
7833 cf_save_LIBS="$LIBS"
7834
7835 cf_add_libs="$LIBS"
7836 # reverse order
7837 cf_add_0lib=
7838 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7839 # filter duplicates
7840 for cf_add_1lib in $cf_add_0lib; do
7841         for cf_add_2lib in $cf_add_libs; do
7842                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7843                         cf_add_1lib=
7844                         break
7845                 fi
7846         done
7847         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7848 done
7849 LIBS="$cf_add_libs"
7850
7851         if { (eval echo "$as_me:7851: \"$ac_compile\"") >&5
7852   (eval $ac_compile) 2>&5
7853   ac_status=$?
7854   echo "$as_me:7854: \$? = $ac_status" >&5
7855   (exit "$ac_status"); } ; then
7856                 if { (eval echo "$as_me:7856: \"$ac_link\"") >&5
7857   (eval $ac_link) 2>&5
7858   ac_status=$?
7859   echo "$as_me:7859: \$? = $ac_status" >&5
7860   (exit "$ac_status"); } ; then
7861                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7862                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7863                 fi
7864         fi
7865 rm -rf ./conftest*
7866 LIBS="$cf_save_LIBS"
7867 fi
7868
7869 fi
7870 echo "$as_me:7870: result: $cf_cv_gpm_soname" >&5
7871 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7872
7873                 fi
7874                 test "$cf_cv_gpm_soname" != "unknown" &&
7875 cat >>confdefs.h <<EOF
7876 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7877 EOF
7878
7879                 SHLIB_LIST="-ldl $SHLIB_LIST"
7880
7881 cf_add_libs="$PRIVATE_LIBS"
7882 # reverse order
7883 cf_add_0lib=
7884 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7885 # filter duplicates
7886 for cf_add_1lib in $cf_add_0lib; do
7887         for cf_add_2lib in $cf_add_libs; do
7888                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7889                         cf_add_1lib=
7890                         break
7891                 fi
7892         done
7893         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7894 done
7895 PRIVATE_LIBS="$cf_add_libs"
7896
7897         else
7898                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7899
7900 cf_add_libs="$TEST_LIBS"
7901 # reverse order
7902 cf_add_0lib=
7903 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7904 # filter duplicates
7905 for cf_add_1lib in $cf_add_0lib; do
7906         for cf_add_2lib in $cf_add_libs; do
7907                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7908                         cf_add_1lib=
7909                         break
7910                 fi
7911         done
7912         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7913 done
7914 TEST_LIBS="$cf_add_libs"
7915
7916 cf_add_libs="$PRIVATE_LIBS"
7917 # reverse order
7918 cf_add_0lib=
7919 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7920 # filter duplicates
7921 for cf_add_1lib in $cf_add_0lib; do
7922         for cf_add_2lib in $cf_add_libs; do
7923                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7924                         cf_add_1lib=
7925                         break
7926                 fi
7927         done
7928         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7929 done
7930 PRIVATE_LIBS="$cf_add_libs"
7931
7932         fi
7933
7934 cat >>confdefs.h <<\EOF
7935 #define HAVE_LIBGPM 1
7936 EOF
7937
7938 echo "$as_me:7938: checking for Gpm_Wgetch in -lgpm" >&5
7939 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7940 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7941   echo $ECHO_N "(cached) $ECHO_C" >&6
7942 else
7943   ac_check_lib_save_LIBS=$LIBS
7944 LIBS="-lgpm  $LIBS"
7945 cat >"conftest.$ac_ext" <<_ACEOF
7946 #line 7946 "configure"
7947 #include "confdefs.h"
7948
7949 /* Override any gcc2 internal prototype to avoid an error.  */
7950 #ifdef __cplusplus
7951 extern "C"
7952 #endif
7953 /* We use char because int might match the return type of a gcc2
7954    builtin and then its argument prototype would still apply.  */
7955 char Gpm_Wgetch (void);
7956 int
7957 main (void)
7958 {
7959 Gpm_Wgetch ();
7960   ;
7961   return 0;
7962 }
7963 _ACEOF
7964 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7965 if { (eval echo "$as_me:7965: \"$ac_link\"") >&5
7966   (eval $ac_link) 2>&5
7967   ac_status=$?
7968   echo "$as_me:7968: \$? = $ac_status" >&5
7969   (exit "$ac_status"); } &&
7970          { ac_try='test -s "conftest$ac_exeext"'
7971   { (eval echo "$as_me:7971: \"$ac_try\"") >&5
7972   (eval $ac_try) 2>&5
7973   ac_status=$?
7974   echo "$as_me:7974: \$? = $ac_status" >&5
7975   (exit "$ac_status"); }; }; then
7976   ac_cv_lib_gpm_Gpm_Wgetch=yes
7977 else
7978   echo "$as_me: failed program was:" >&5
7979 cat "conftest.$ac_ext" >&5
7980 ac_cv_lib_gpm_Gpm_Wgetch=no
7981 fi
7982 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7983 LIBS=$ac_check_lib_save_LIBS
7984 fi
7985 echo "$as_me:7985: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7986 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7987 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7988
7989 echo "$as_me:7989: checking if GPM is weakly bound to curses library" >&5
7990 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7991 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7992   echo $ECHO_N "(cached) $ECHO_C" >&6
7993 else
7994
7995 cf_cv_check_gpm_wgetch=unknown
7996 if test "$cross_compiling" != yes ; then
7997
7998 cat >conftest.$ac_ext <<CF_EOF
7999 #include <gpm.h>
8000 int main(void)
8001 {
8002         Gpm_Wgetch();
8003         ${cf_cv_main_return:-return}(0);
8004 }
8005 CF_EOF
8006
8007         cf_save_LIBS="$LIBS"
8008         # This only works if we can look at the symbol table.  If a shared
8009         # library is stripped for install, we cannot use that.  So we're forced
8010         # to rely on the static library, noting that some packagers may not
8011         # include it.
8012         LIBS="-static -lgpm -dynamic $LIBS"
8013         if { (eval echo "$as_me:8013: \"$ac_compile\"") >&5
8014   (eval $ac_compile) 2>&5
8015   ac_status=$?
8016   echo "$as_me:8016: \$? = $ac_status" >&5
8017   (exit "$ac_status"); } ; then
8018                 if { (eval echo "$as_me:8018: \"$ac_link\"") >&5
8019   (eval $ac_link) 2>&5
8020   ac_status=$?
8021   echo "$as_me:8021: \$? = $ac_status" >&5
8022   (exit "$ac_status"); } ; then
8023                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
8024                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
8025                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
8026                 fi
8027         fi
8028         rm -rf ./conftest*
8029         LIBS="$cf_save_LIBS"
8030 fi
8031
8032 fi
8033 echo "$as_me:8033: result: $cf_cv_check_gpm_wgetch" >&5
8034 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
8035
8036 if test "$cf_cv_check_gpm_wgetch" != yes ; then
8037         { echo "$as_me:8037: WARNING: GPM library is already linked with curses - read the FAQ" >&5
8038 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
8039 fi
8040
8041 fi
8042
8043 fi
8044
8045 echo "$as_me:8045: checking if you want to use PCRE2 for regular-expressions" >&5
8046 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
8047
8048 # Check whether --with-pcre2 or --without-pcre2 was given.
8049 if test "${with_pcre2+set}" = set; then
8050   withval="$with_pcre2"
8051
8052 fi;
8053 test -z "$with_pcre2" && with_pcre2=no
8054 echo "$as_me:8054: result: $with_pcre2" >&5
8055 echo "${ECHO_T}$with_pcre2" >&6
8056
8057 if test "x$with_pcre2" != xno ; then
8058         cf_with_pcre2_ok=no
8059         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
8060         do
8061
8062 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
8063         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
8064
8065 echo "${as_me:-configure}:8065: testing found package $cf_with_pcre2 ..." 1>&5
8066
8067         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
8068         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
8069         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
8070
8071 echo "${as_me:-configure}:8071: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8072
8073         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
8074
8075 echo "${as_me:-configure}:8075: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
8076
8077 cf_fix_cppflags=no
8078 cf_new_cflags=
8079 cf_new_cppflags=
8080 cf_new_extra_cppflags=
8081
8082 for cf_add_cflags in $cf_pkgconfig_incs
8083 do
8084 case "$cf_fix_cppflags" in
8085 (no)
8086         case "$cf_add_cflags" in
8087         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8088                 case "$cf_add_cflags" in
8089                 (-D*)
8090                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8091
8092                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8093                                 && test -z "${cf_tst_cflags}" \
8094                                 && cf_fix_cppflags=yes
8095
8096                         if test "$cf_fix_cppflags" = yes ; then
8097
8098         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8099         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8100
8101                                 continue
8102                         elif test "${cf_tst_cflags}" = "\"'" ; then
8103
8104         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8105         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8106
8107                                 continue
8108                         fi
8109                         ;;
8110                 esac
8111                 case "$CPPFLAGS" in
8112                 (*$cf_add_cflags)
8113                         ;;
8114                 (*)
8115                         case "$cf_add_cflags" in
8116                         (-D*)
8117                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8118
8119 CPPFLAGS=`echo "$CPPFLAGS" | \
8120         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8121                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8122
8123                                 ;;
8124                         esac
8125
8126         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8127         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8128
8129                         ;;
8130                 esac
8131                 ;;
8132         (*)
8133
8134         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8135         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8136
8137                 ;;
8138         esac
8139         ;;
8140 (yes)
8141
8142         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8143         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8144
8145         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8146
8147         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8148                 && test -z "${cf_tst_cflags}" \
8149                 && cf_fix_cppflags=no
8150         ;;
8151 esac
8152 done
8153
8154 if test -n "$cf_new_cflags" ; then
8155
8156         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8157         CFLAGS="${CFLAGS}$cf_new_cflags"
8158
8159 fi
8160
8161 if test -n "$cf_new_cppflags" ; then
8162
8163         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8164         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8165
8166 fi
8167
8168 if test -n "$cf_new_extra_cppflags" ; then
8169
8170         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8171         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8172
8173 fi
8174
8175 cf_add_libs="$LIBS"
8176 # reverse order
8177 cf_add_0lib=
8178 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8179 # filter duplicates
8180 for cf_add_1lib in $cf_add_0lib; do
8181         for cf_add_2lib in $cf_add_libs; do
8182                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8183                         cf_add_1lib=
8184                         break
8185                 fi
8186         done
8187         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8188 done
8189 LIBS="$cf_add_libs"
8190
8191         cf_with_pcre2_ok=yes; break
8192 else
8193         cf_pkgconfig_incs=
8194         cf_pkgconfig_libs=
8195         :
8196 fi
8197
8198         done
8199         cf_with_pcre2_ok=yes || { { echo "$as_me:8199: error: Cannot find PCRE2 library" >&5
8200 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
8201    { (exit 1); exit 1; }; }
8202
8203 cat >>confdefs.h <<\EOF
8204 #define HAVE_LIB_PCRE2 1
8205 EOF
8206
8207         # if pkgconfig gave no results, look for the libraries directly
8208         case "$LIBS" in
8209         (*pcre2-posix*|*pcreposix*)
8210                 ;;
8211         (*)
8212                 echo "$as_me:8212: checking for regcomp in -lpcre2-posix" >&5
8213 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
8214 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
8215   echo $ECHO_N "(cached) $ECHO_C" >&6
8216 else
8217   ac_check_lib_save_LIBS=$LIBS
8218 LIBS="-lpcre2-posix  $LIBS"
8219 cat >"conftest.$ac_ext" <<_ACEOF
8220 #line 8220 "configure"
8221 #include "confdefs.h"
8222
8223 /* Override any gcc2 internal prototype to avoid an error.  */
8224 #ifdef __cplusplus
8225 extern "C"
8226 #endif
8227 /* We use char because int might match the return type of a gcc2
8228    builtin and then its argument prototype would still apply.  */
8229 char regcomp (void);
8230 int
8231 main (void)
8232 {
8233 regcomp ();
8234   ;
8235   return 0;
8236 }
8237 _ACEOF
8238 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8239 if { (eval echo "$as_me:8239: \"$ac_link\"") >&5
8240   (eval $ac_link) 2>&5
8241   ac_status=$?
8242   echo "$as_me:8242: \$? = $ac_status" >&5
8243   (exit "$ac_status"); } &&
8244          { ac_try='test -s "conftest$ac_exeext"'
8245   { (eval echo "$as_me:8245: \"$ac_try\"") >&5
8246   (eval $ac_try) 2>&5
8247   ac_status=$?
8248   echo "$as_me:8248: \$? = $ac_status" >&5
8249   (exit "$ac_status"); }; }; then
8250   ac_cv_lib_pcre2_posix_regcomp=yes
8251 else
8252   echo "$as_me: failed program was:" >&5
8253 cat "conftest.$ac_ext" >&5
8254 ac_cv_lib_pcre2_posix_regcomp=no
8255 fi
8256 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8257 LIBS=$ac_check_lib_save_LIBS
8258 fi
8259 echo "$as_me:8259: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
8260 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
8261 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
8262
8263 cf_add_libs="$LIBS"
8264 # reverse order
8265 cf_add_0lib=
8266 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8267 # filter duplicates
8268 for cf_add_1lib in $cf_add_0lib; do
8269         for cf_add_2lib in $cf_add_libs; do
8270                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8271                         cf_add_1lib=
8272                         break
8273                 fi
8274         done
8275         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8276 done
8277 LIBS="$cf_add_libs"
8278
8279 else
8280   echo "$as_me:8280: checking for regcomp in -lpcreposix" >&5
8281 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
8282 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
8283   echo $ECHO_N "(cached) $ECHO_C" >&6
8284 else
8285   ac_check_lib_save_LIBS=$LIBS
8286 LIBS="-lpcreposix  $LIBS"
8287 cat >"conftest.$ac_ext" <<_ACEOF
8288 #line 8288 "configure"
8289 #include "confdefs.h"
8290
8291 /* Override any gcc2 internal prototype to avoid an error.  */
8292 #ifdef __cplusplus
8293 extern "C"
8294 #endif
8295 /* We use char because int might match the return type of a gcc2
8296    builtin and then its argument prototype would still apply.  */
8297 char regcomp (void);
8298 int
8299 main (void)
8300 {
8301 regcomp ();
8302   ;
8303   return 0;
8304 }
8305 _ACEOF
8306 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8307 if { (eval echo "$as_me:8307: \"$ac_link\"") >&5
8308   (eval $ac_link) 2>&5
8309   ac_status=$?
8310   echo "$as_me:8310: \$? = $ac_status" >&5
8311   (exit "$ac_status"); } &&
8312          { ac_try='test -s "conftest$ac_exeext"'
8313   { (eval echo "$as_me:8313: \"$ac_try\"") >&5
8314   (eval $ac_try) 2>&5
8315   ac_status=$?
8316   echo "$as_me:8316: \$? = $ac_status" >&5
8317   (exit "$ac_status"); }; }; then
8318   ac_cv_lib_pcreposix_regcomp=yes
8319 else
8320   echo "$as_me: failed program was:" >&5
8321 cat "conftest.$ac_ext" >&5
8322 ac_cv_lib_pcreposix_regcomp=no
8323 fi
8324 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8325 LIBS=$ac_check_lib_save_LIBS
8326 fi
8327 echo "$as_me:8327: result: $ac_cv_lib_pcreposix_regcomp" >&5
8328 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
8329 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
8330
8331 cf_add_libs="$LIBS"
8332 # reverse order
8333 cf_add_0lib=
8334 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8335 # filter duplicates
8336 for cf_add_1lib in $cf_add_0lib; do
8337         for cf_add_2lib in $cf_add_libs; do
8338                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8339                         cf_add_1lib=
8340                         break
8341                 fi
8342         done
8343         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8344 done
8345 LIBS="$cf_add_libs"
8346
8347 else
8348   { { echo "$as_me:8348: error: Cannot find PCRE2 POSIX library" >&5
8349 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
8350    { (exit 1); exit 1; }; }
8351 fi
8352
8353 fi
8354
8355                 ;;
8356         esac
8357
8358         # either way, check for the library header files
8359
8360 for ac_header in pcre2posix.h pcreposix.h
8361 do
8362 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8363 echo "$as_me:8363: checking for $ac_header" >&5
8364 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8365 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8366   echo $ECHO_N "(cached) $ECHO_C" >&6
8367 else
8368   cat >"conftest.$ac_ext" <<_ACEOF
8369 #line 8369 "configure"
8370 #include "confdefs.h"
8371 #include <$ac_header>
8372 _ACEOF
8373 if { (eval echo "$as_me:8373: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8374   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8375   ac_status=$?
8376   $EGREP -v '^ *\+' conftest.er1 >conftest.err
8377   rm -f conftest.er1
8378   cat conftest.err >&5
8379   echo "$as_me:8379: \$? = $ac_status" >&5
8380   (exit "$ac_status"); } >/dev/null; then
8381   if test -s conftest.err; then
8382     ac_cpp_err=$ac_c_preproc_warn_flag
8383   else
8384     ac_cpp_err=
8385   fi
8386 else
8387   ac_cpp_err=yes
8388 fi
8389 if test -z "$ac_cpp_err"; then
8390   eval "$as_ac_Header=yes"
8391 else
8392   echo "$as_me: failed program was:" >&5
8393   cat "conftest.$ac_ext" >&5
8394   eval "$as_ac_Header=no"
8395 fi
8396 rm -f conftest.err "conftest.$ac_ext"
8397 fi
8398 echo "$as_me:8398: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8399 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8400 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8401   cat >>confdefs.h <<EOF
8402 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8403 EOF
8404
8405 fi
8406 done
8407
8408 for ac_func in PCRE2regcomp
8409 do
8410 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8411 echo "$as_me:8411: checking for $ac_func" >&5
8412 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8413 if eval "test \"\${$as_ac_var+set}\" = set"; then
8414   echo $ECHO_N "(cached) $ECHO_C" >&6
8415 else
8416   cat >"conftest.$ac_ext" <<_ACEOF
8417 #line 8417 "configure"
8418 #include "confdefs.h"
8419 #define $ac_func autoconf_temporary
8420 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8421 #undef $ac_func
8422
8423 #ifdef __cplusplus
8424 extern "C"
8425 #endif
8426
8427 /* We use char because int might match the return type of a gcc2
8428    builtin and then its argument prototype would still apply.  */
8429 char $ac_func (void);
8430
8431 int
8432 main (void)
8433 {
8434
8435 /* The GNU C library defines stubs for functions which it implements
8436     to always fail with ENOSYS.  Some functions are actually named
8437     something starting with __ and the normal name is an alias.  */
8438 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8439 #error found stub for $ac_func
8440 #endif
8441
8442         return $ac_func ();
8443   ;
8444   return 0;
8445 }
8446 _ACEOF
8447 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8448 if { (eval echo "$as_me:8448: \"$ac_link\"") >&5
8449   (eval $ac_link) 2>&5
8450   ac_status=$?
8451   echo "$as_me:8451: \$? = $ac_status" >&5
8452   (exit "$ac_status"); } &&
8453          { ac_try='test -s "conftest$ac_exeext"'
8454   { (eval echo "$as_me:8454: \"$ac_try\"") >&5
8455   (eval $ac_try) 2>&5
8456   ac_status=$?
8457   echo "$as_me:8457: \$? = $ac_status" >&5
8458   (exit "$ac_status"); }; }; then
8459   eval "$as_ac_var=yes"
8460 else
8461   echo "$as_me: failed program was:" >&5
8462 cat "conftest.$ac_ext" >&5
8463 eval "$as_ac_var=no"
8464 fi
8465 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8466 fi
8467 echo "$as_me:8467: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8468 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8469 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8470   cat >>confdefs.h <<EOF
8471 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8472 EOF
8473
8474 fi
8475 done
8476
8477 fi
8478
8479 # not everyone has "test -c"
8480 if test -c /dev/sysmouse 2>/dev/null ; then
8481 echo "$as_me:8481: checking if you want to use sysmouse" >&5
8482 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8483
8484 # Check whether --with-sysmouse or --without-sysmouse was given.
8485 if test "${with_sysmouse+set}" = set; then
8486   withval="$with_sysmouse"
8487   cf_with_sysmouse=$withval
8488 else
8489   cf_with_sysmouse=maybe
8490 fi;
8491         if test "$cf_with_sysmouse" != no ; then
8492         cat >"conftest.$ac_ext" <<_ACEOF
8493 #line 8493 "configure"
8494 #include "confdefs.h"
8495
8496 #include <osreldate.h>
8497 #if (__FreeBSD_version >= 400017)
8498 #include <sys/consio.h>
8499 #include <sys/fbio.h>
8500 #else
8501 #include <machine/console.h>
8502 #endif
8503
8504 int
8505 main (void)
8506 {
8507
8508         struct mouse_info the_mouse;
8509         ioctl(0, CONS_MOUSECTL, &the_mouse);
8510
8511   ;
8512   return 0;
8513 }
8514 _ACEOF
8515 rm -f "conftest.$ac_objext"
8516 if { (eval echo "$as_me:8516: \"$ac_compile\"") >&5
8517   (eval $ac_compile) 2>&5
8518   ac_status=$?
8519   echo "$as_me:8519: \$? = $ac_status" >&5
8520   (exit "$ac_status"); } &&
8521          { ac_try='test -s "conftest.$ac_objext"'
8522   { (eval echo "$as_me:8522: \"$ac_try\"") >&5
8523   (eval $ac_try) 2>&5
8524   ac_status=$?
8525   echo "$as_me:8525: \$? = $ac_status" >&5
8526   (exit "$ac_status"); }; }; then
8527   cf_with_sysmouse=yes
8528 else
8529   echo "$as_me: failed program was:" >&5
8530 cat "conftest.$ac_ext" >&5
8531 cf_with_sysmouse=no
8532 fi
8533 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8534         fi
8535 echo "$as_me:8535: result: $cf_with_sysmouse" >&5
8536 echo "${ECHO_T}$cf_with_sysmouse" >&6
8537 test "$cf_with_sysmouse" = yes &&
8538 cat >>confdefs.h <<\EOF
8539 #define USE_SYSMOUSE 1
8540 EOF
8541
8542 fi
8543
8544 # pretend that ncurses==ncursesw==ncursest
8545 echo "$as_me:8545: checking if you want to disable library suffixes" >&5
8546 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8547
8548 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8549 if test "${enable_lib_suffixes+set}" = set; then
8550   enableval="$enable_lib_suffixes"
8551   test "$enableval" != no && enableval=yes
8552         if test "$enableval" != "yes" ; then
8553     disable_lib_suffixes=yes
8554         else
8555                 disable_lib_suffixes=no
8556         fi
8557 else
8558   enableval=yes
8559         disable_lib_suffixes=no
8560
8561 fi;
8562 echo "$as_me:8562: result: $disable_lib_suffixes" >&5
8563 echo "${ECHO_T}$disable_lib_suffixes" >&6
8564
8565 ### If we're building with rpath, try to link non-standard libs that way too.
8566 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8567
8568 echo "$as_me:8568: checking if rpath-hack should be disabled" >&5
8569 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8570
8571 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8572 if test "${enable_rpath_hack+set}" = set; then
8573   enableval="$enable_rpath_hack"
8574   test "$enableval" != no && enableval=yes
8575         if test "$enableval" != "yes" ; then
8576     enable_rpath_hack=no
8577         else
8578                 enable_rpath_hack=yes
8579         fi
8580 else
8581   enableval=yes
8582         enable_rpath_hack=yes
8583
8584 fi;
8585 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8586 echo "$as_me:8586: result: $cf_disable_rpath_hack" >&5
8587 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8588
8589 if test "$enable_rpath_hack" = yes ; then
8590
8591 echo "$as_me:8591: checking for updated LDFLAGS" >&5
8592 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8593 if test -n "$LD_RPATH_OPT" ; then
8594         echo "$as_me:8594: result: maybe" >&5
8595 echo "${ECHO_T}maybe" >&6
8596
8597         for ac_prog in ldd
8598 do
8599   # Extract the first word of "$ac_prog", so it can be a program name with args.
8600 set dummy $ac_prog; ac_word=$2
8601 echo "$as_me:8601: checking for $ac_word" >&5
8602 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8603 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8604   echo $ECHO_N "(cached) $ECHO_C" >&6
8605 else
8606   if test -n "$cf_ldd_prog"; then
8607   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8608 else
8609   ac_save_IFS=$IFS; IFS=$ac_path_separator
8610 ac_dummy="$PATH"
8611 for ac_dir in $ac_dummy; do
8612   IFS=$ac_save_IFS
8613   test -z "$ac_dir" && ac_dir=.
8614   $as_executable_p "$ac_dir/$ac_word" || continue
8615 ac_cv_prog_cf_ldd_prog="$ac_prog"
8616 echo "$as_me:8616: found $ac_dir/$ac_word" >&5
8617 break
8618 done
8619
8620 fi
8621 fi
8622 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8623 if test -n "$cf_ldd_prog"; then
8624   echo "$as_me:8624: result: $cf_ldd_prog" >&5
8625 echo "${ECHO_T}$cf_ldd_prog" >&6
8626 else
8627   echo "$as_me:8627: result: no" >&5
8628 echo "${ECHO_T}no" >&6
8629 fi
8630
8631   test -n "$cf_ldd_prog" && break
8632 done
8633 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8634
8635         cf_rpath_list="/usr/lib /lib"
8636         if test "$cf_ldd_prog" != no
8637         then
8638                 cf_rpath_oops=
8639
8640 cat >"conftest.$ac_ext" <<_ACEOF
8641 #line 8641 "configure"
8642 #include "confdefs.h"
8643 #include <stdio.h>
8644 int
8645 main (void)
8646 {
8647 printf("Hello");
8648   ;
8649   return 0;
8650 }
8651 _ACEOF
8652 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8653 if { (eval echo "$as_me:8653: \"$ac_link\"") >&5
8654   (eval $ac_link) 2>&5
8655   ac_status=$?
8656   echo "$as_me:8656: \$? = $ac_status" >&5
8657   (exit "$ac_status"); } &&
8658          { ac_try='test -s "conftest$ac_exeext"'
8659   { (eval echo "$as_me:8659: \"$ac_try\"") >&5
8660   (eval $ac_try) 2>&5
8661   ac_status=$?
8662   echo "$as_me:8662: \$? = $ac_status" >&5
8663   (exit "$ac_status"); }; }; then
8664   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8665                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8666 else
8667   echo "$as_me: failed program was:" >&5
8668 cat "conftest.$ac_ext" >&5
8669 fi
8670 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8671
8672                 # If we passed the link-test, but get a "not found" on a given library,
8673                 # this could be due to inept reconfiguration of gcc to make it only
8674                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8675                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8676                 # /usr/local libraries.
8677                 if test -n "$cf_rpath_oops"
8678                 then
8679                         for cf_rpath_src in $cf_rpath_oops
8680                         do
8681                                 for cf_rpath_dir in \
8682                                         /usr/local \
8683                                         /usr/pkg \
8684                                         /opt/sfw
8685                                 do
8686                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8687                                         then
8688                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8689
8690 echo "${as_me:-configure}:8690: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8691
8692                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8693                                                 break
8694                                         fi
8695                                 done
8696                         done
8697                 fi
8698         fi
8699
8700         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8701
8702 echo "${as_me:-configure}:8702: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8703
8704 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8705
8706 echo "${as_me:-configure}:8706: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8707
8708 cf_rpath_dst=
8709 for cf_rpath_src in $LDFLAGS
8710 do
8711         case "$cf_rpath_src" in
8712         (-L*)
8713
8714                 # check if this refers to a directory which we will ignore
8715                 cf_rpath_skip=no
8716                 if test -n "$cf_rpath_list"
8717                 then
8718                         for cf_rpath_item in $cf_rpath_list
8719                         do
8720                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8721                                 then
8722                                         cf_rpath_skip=yes
8723                                         break
8724                                 fi
8725                         done
8726                 fi
8727
8728                 if test "$cf_rpath_skip" = no
8729                 then
8730                         # transform the option
8731                         if test "$LD_RPATH_OPT" = "-R " ; then
8732                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8733                         else
8734                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8735                         fi
8736
8737                         # if we have not already added this, add it now
8738                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8739                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8740                         then
8741                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8742
8743 echo "${as_me:-configure}:8743: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8744
8745                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8746                         fi
8747                 fi
8748                 ;;
8749         esac
8750         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8751 done
8752 LDFLAGS=$cf_rpath_dst
8753
8754 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8755
8756 echo "${as_me:-configure}:8756: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8757
8758 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8759
8760 echo "${as_me:-configure}:8760: testing ...checking LIBS $LIBS ..." 1>&5
8761
8762 cf_rpath_dst=
8763 for cf_rpath_src in $LIBS
8764 do
8765         case "$cf_rpath_src" in
8766         (-L*)
8767
8768                 # check if this refers to a directory which we will ignore
8769                 cf_rpath_skip=no
8770                 if test -n "$cf_rpath_list"
8771                 then
8772                         for cf_rpath_item in $cf_rpath_list
8773                         do
8774                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8775                                 then
8776                                         cf_rpath_skip=yes
8777                                         break
8778                                 fi
8779                         done
8780                 fi
8781
8782                 if test "$cf_rpath_skip" = no
8783                 then
8784                         # transform the option
8785                         if test "$LD_RPATH_OPT" = "-R " ; then
8786                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8787                         else
8788                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8789                         fi
8790
8791                         # if we have not already added this, add it now
8792                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8793                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8794                         then
8795                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8796
8797 echo "${as_me:-configure}:8797: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8798
8799                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8800                         fi
8801                 fi
8802                 ;;
8803         esac
8804         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8805 done
8806 LIBS=$cf_rpath_dst
8807
8808 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8809
8810 echo "${as_me:-configure}:8810: testing ...checked LIBS $LIBS ..." 1>&5
8811
8812         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8813
8814 echo "${as_me:-configure}:8814: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8815
8816 else
8817         echo "$as_me:8817: result: no" >&5
8818 echo "${ECHO_T}no" >&6
8819 fi
8820
8821 fi
8822
8823 fi
8824
8825 ### Depending on the system, someone may use rpath to build ncurses but not
8826 # want users of the package to rely upon that feature.  Give those people an
8827 # option to suppress that detail from EXTRA_LDFLAGS.
8828 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8829 if test -n "$EXTRA_PKG_LDFLAGS"
8830 then
8831         echo "$as_me:8831: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8832 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8833
8834 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8835 if test "${enable_pkg_ldflags+set}" = set; then
8836   enableval="$enable_pkg_ldflags"
8837   test "$enableval" != no && enableval=yes
8838         if test "$enableval" != "yes" ; then
8839     disable_pkg_ldflags=yes
8840         else
8841                 disable_pkg_ldflags=no
8842         fi
8843 else
8844   enableval=yes
8845         disable_pkg_ldflags=no
8846
8847 fi;
8848         echo "$as_me:8848: result: $disable_pkg_ldflags" >&5
8849 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8850         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8851 fi
8852
8853 ###############################################################################
8854
8855 ###     use option --with-extra-suffix to append suffix to headers and libraries
8856 echo "$as_me:8856: checking for extra suffix to append to header/library paths" >&5
8857 echo $ECHO_N "checking for extra suffix to append to header/library paths... $ECHO_C" >&6
8858 EXTRA_SUFFIX=
8859
8860 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8861 if test "${with_extra_suffix+set}" = set; then
8862   withval="$with_extra_suffix"
8863   case x$withval in
8864         (xno)
8865                 ;;
8866         (xyes|x)
8867                 EXTRA_SUFFIX=$cf_cv_abi_version
8868                 ;;
8869         (*)
8870                 EXTRA_SUFFIX=$withval
8871                 ;;
8872         esac
8873
8874 fi;
8875 echo "$as_me:8875: result: ${EXTRA_SUFFIX:-(none)}" >&5
8876 echo "${ECHO_T}${EXTRA_SUFFIX:-(none)}" >&6
8877
8878 ###     use option --disable-overwrite to leave out the link to -lcurses
8879 echo "$as_me:8879: checking if you wish to install ncurses overwriting curses" >&5
8880 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8881
8882 # Check whether --enable-overwrite or --disable-overwrite was given.
8883 if test "${enable_overwrite+set}" = set; then
8884   enableval="$enable_overwrite"
8885   with_overwrite=$enableval
8886 else
8887   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8888 fi;
8889 echo "$as_me:8889: result: $with_overwrite" >&5
8890 echo "${ECHO_T}$with_overwrite" >&6
8891
8892 echo "$as_me:8892: checking if external terminfo-database is used" >&5
8893 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8894
8895 # Check whether --enable-database or --disable-database was given.
8896 if test "${enable_database+set}" = set; then
8897   enableval="$enable_database"
8898   use_database=$enableval
8899 else
8900   use_database=yes
8901 fi;
8902 echo "$as_me:8902: result: $use_database" >&5
8903 echo "${ECHO_T}$use_database" >&6
8904
8905 case "$host_os" in
8906 (os2*)
8907         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8908         ;;
8909 (*)
8910         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8911         ;;
8912 esac
8913
8914 NCURSES_USE_DATABASE=0
8915 if test "$use_database" != no ; then
8916         NCURSES_USE_DATABASE=1
8917
8918         echo "$as_me:8918: checking which terminfo source-file will be installed" >&5
8919 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8920
8921 # Check whether --with-database or --without-database was given.
8922 if test "${with_database+set}" = set; then
8923   withval="$with_database"
8924   TERMINFO_SRC=$withval
8925 fi;
8926         echo "$as_me:8926: result: $TERMINFO_SRC" >&5
8927 echo "${ECHO_T}$TERMINFO_SRC" >&6
8928
8929         echo "$as_me:8929: checking whether to use hashed database instead of directory/tree" >&5
8930 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8931
8932 # Check whether --with-hashed-db or --without-hashed-db was given.
8933 if test "${with_hashed_db+set}" = set; then
8934   withval="$with_hashed_db"
8935
8936 else
8937   with_hashed_db=no
8938 fi;
8939         echo "$as_me:8939: result: $with_hashed_db" >&5
8940 echo "${ECHO_T}$with_hashed_db" >&6
8941 else
8942         with_hashed_db=no
8943 fi
8944
8945 echo "$as_me:8945: checking for list of fallback terminal descriptions" >&5
8946 echo $ECHO_N "checking for list of fallback terminal descriptions... $ECHO_C" >&6
8947
8948 # Check whether --with-fallbacks or --without-fallbacks was given.
8949 if test "${with_fallbacks+set}" = set; then
8950   withval="$with_fallbacks"
8951   with_fallback=$withval
8952 else
8953   with_fallback=
8954 fi;
8955 echo "$as_me:8955: result: ${with_fallback:-(none)}" >&5
8956 echo "${ECHO_T}${with_fallback:-(none)}" >&6
8957
8958 case ".$with_fallback" in
8959 (.|.no)
8960         FALLBACK_LIST=
8961         ;;
8962 (.yes)
8963         { echo "$as_me:8963: WARNING: expected a list of terminal descriptions" >&5
8964 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8965         ;;
8966 (*)
8967         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8968         ;;
8969 esac
8970
8971 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8972 # tree for generating the terminal descriptions that will be compiled into the
8973 # library.  If your toolchain is old, it may not handle current terminal
8974 # databases.  Use configure-options to point to the tools which will be used,
8975 # rather than the first ones found on the $PATH.
8976 if test -n "$ac_tool_prefix"; then
8977   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8978 set dummy ${ac_tool_prefix}tic; ac_word=$2
8979 echo "$as_me:8979: checking for $ac_word" >&5
8980 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8981 if test "${ac_cv_prog_TIC+set}" = set; then
8982   echo $ECHO_N "(cached) $ECHO_C" >&6
8983 else
8984   if test -n "$TIC"; then
8985   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8986 else
8987   ac_save_IFS=$IFS; IFS=$ac_path_separator
8988 ac_dummy="$PATH"
8989 for ac_dir in $ac_dummy; do
8990   IFS=$ac_save_IFS
8991   test -z "$ac_dir" && ac_dir=.
8992   $as_executable_p "$ac_dir/$ac_word" || continue
8993 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8994 echo "$as_me:8994: found $ac_dir/$ac_word" >&5
8995 break
8996 done
8997
8998 fi
8999 fi
9000 TIC=$ac_cv_prog_TIC
9001 if test -n "$TIC"; then
9002   echo "$as_me:9002: result: $TIC" >&5
9003 echo "${ECHO_T}$TIC" >&6
9004 else
9005   echo "$as_me:9005: result: no" >&5
9006 echo "${ECHO_T}no" >&6
9007 fi
9008
9009 fi
9010 if test -z "$ac_cv_prog_TIC"; then
9011   ac_ct_TIC=$TIC
9012   # Extract the first word of "tic", so it can be a program name with args.
9013 set dummy tic; ac_word=$2
9014 echo "$as_me:9014: checking for $ac_word" >&5
9015 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9016 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
9017   echo $ECHO_N "(cached) $ECHO_C" >&6
9018 else
9019   if test -n "$ac_ct_TIC"; then
9020   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
9021 else
9022   ac_save_IFS=$IFS; IFS=$ac_path_separator
9023 ac_dummy="$PATH"
9024 for ac_dir in $ac_dummy; do
9025   IFS=$ac_save_IFS
9026   test -z "$ac_dir" && ac_dir=.
9027   $as_executable_p "$ac_dir/$ac_word" || continue
9028 ac_cv_prog_ac_ct_TIC="tic"
9029 echo "$as_me:9029: found $ac_dir/$ac_word" >&5
9030 break
9031 done
9032
9033 fi
9034 fi
9035 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
9036 if test -n "$ac_ct_TIC"; then
9037   echo "$as_me:9037: result: $ac_ct_TIC" >&5
9038 echo "${ECHO_T}$ac_ct_TIC" >&6
9039 else
9040   echo "$as_me:9040: result: no" >&5
9041 echo "${ECHO_T}no" >&6
9042 fi
9043
9044   TIC=$ac_ct_TIC
9045 else
9046   TIC="$ac_cv_prog_TIC"
9047 fi
9048
9049 if test -n "$ac_tool_prefix"; then
9050   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
9051 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
9052 echo "$as_me:9052: checking for $ac_word" >&5
9053 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9054 if test "${ac_cv_prog_INFOCMP+set}" = set; then
9055   echo $ECHO_N "(cached) $ECHO_C" >&6
9056 else
9057   if test -n "$INFOCMP"; then
9058   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
9059 else
9060   ac_save_IFS=$IFS; IFS=$ac_path_separator
9061 ac_dummy="$PATH"
9062 for ac_dir in $ac_dummy; do
9063   IFS=$ac_save_IFS
9064   test -z "$ac_dir" && ac_dir=.
9065   $as_executable_p "$ac_dir/$ac_word" || continue
9066 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
9067 echo "$as_me:9067: found $ac_dir/$ac_word" >&5
9068 break
9069 done
9070
9071 fi
9072 fi
9073 INFOCMP=$ac_cv_prog_INFOCMP
9074 if test -n "$INFOCMP"; then
9075   echo "$as_me:9075: result: $INFOCMP" >&5
9076 echo "${ECHO_T}$INFOCMP" >&6
9077 else
9078   echo "$as_me:9078: result: no" >&5
9079 echo "${ECHO_T}no" >&6
9080 fi
9081
9082 fi
9083 if test -z "$ac_cv_prog_INFOCMP"; then
9084   ac_ct_INFOCMP=$INFOCMP
9085   # Extract the first word of "infocmp", so it can be a program name with args.
9086 set dummy infocmp; ac_word=$2
9087 echo "$as_me:9087: checking for $ac_word" >&5
9088 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9089 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
9090   echo $ECHO_N "(cached) $ECHO_C" >&6
9091 else
9092   if test -n "$ac_ct_INFOCMP"; then
9093   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
9094 else
9095   ac_save_IFS=$IFS; IFS=$ac_path_separator
9096 ac_dummy="$PATH"
9097 for ac_dir in $ac_dummy; do
9098   IFS=$ac_save_IFS
9099   test -z "$ac_dir" && ac_dir=.
9100   $as_executable_p "$ac_dir/$ac_word" || continue
9101 ac_cv_prog_ac_ct_INFOCMP="infocmp"
9102 echo "$as_me:9102: found $ac_dir/$ac_word" >&5
9103 break
9104 done
9105
9106 fi
9107 fi
9108 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
9109 if test -n "$ac_ct_INFOCMP"; then
9110   echo "$as_me:9110: result: $ac_ct_INFOCMP" >&5
9111 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
9112 else
9113   echo "$as_me:9113: result: no" >&5
9114 echo "${ECHO_T}no" >&6
9115 fi
9116
9117   INFOCMP=$ac_ct_INFOCMP
9118 else
9119   INFOCMP="$ac_cv_prog_INFOCMP"
9120 fi
9121
9122 if test -n "$FALLBACK_LIST"
9123 then
9124
9125 # Check whether --with-tic-path or --without-tic-path was given.
9126 if test "${with_tic_path+set}" = set; then
9127   withval="$with_tic_path"
9128   echo "$as_me:9128: checking for tic program for fallbacks" >&5
9129 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
9130                 TIC=$withval
9131                 echo "$as_me:9131: result: $TIC" >&5
9132 echo "${ECHO_T}$TIC" >&6
9133
9134 if test "x$prefix" != xNONE; then
9135         cf_path_syntax="$prefix"
9136 else
9137         cf_path_syntax="$ac_default_prefix"
9138 fi
9139
9140 case ".$TIC" in
9141 (.\$\(*\)*|.\'*\'*)
9142         ;;
9143 (..|./*|.\\*)
9144         ;;
9145 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9146         ;;
9147 (.\$\{*prefix\}*|.\$\{*dir\}*)
9148         eval TIC="$TIC"
9149         case ".$TIC" in
9150         (.NONE/*)
9151                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9152                 ;;
9153         esac
9154         ;;
9155 (.no|.NONE/*)
9156         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9157         ;;
9158 (*)
9159         { { echo "$as_me:9159: error: expected a pathname, not \"$TIC\"" >&5
9160 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
9161    { (exit 1); exit 1; }; }
9162         ;;
9163 esac
9164
9165 else
9166
9167 test -z "$TIC" && TIC="tic"
9168 for ac_prog in $TIC tic
9169 do
9170   # Extract the first word of "$ac_prog", so it can be a program name with args.
9171 set dummy $ac_prog; ac_word=$2
9172 echo "$as_me:9172: checking for $ac_word" >&5
9173 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9174 if test "${ac_cv_path_TIC+set}" = set; then
9175   echo $ECHO_N "(cached) $ECHO_C" >&6
9176 else
9177   case $TIC in
9178   [\\/]* | ?:[\\/]*)
9179   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
9180   ;;
9181   *)
9182   ac_save_IFS=$IFS; IFS=$ac_path_separator
9183 ac_dummy="$PATH:/usr/local/ncurses/bin"
9184 for ac_dir in $ac_dummy; do
9185   IFS=$ac_save_IFS
9186   test -z "$ac_dir" && ac_dir=.
9187   if $as_executable_p "$ac_dir/$ac_word"; then
9188    ac_cv_path_TIC="$ac_dir/$ac_word"
9189    echo "$as_me:9189: found $ac_dir/$ac_word" >&5
9190    break
9191 fi
9192 done
9193
9194   ;;
9195 esac
9196 fi
9197 TIC=$ac_cv_path_TIC
9198
9199 if test -n "$TIC"; then
9200   echo "$as_me:9200: result: $TIC" >&5
9201 echo "${ECHO_T}$TIC" >&6
9202 else
9203   echo "$as_me:9203: result: no" >&5
9204 echo "${ECHO_T}no" >&6
9205 fi
9206
9207   test -n "$TIC" && break
9208 done
9209 test -n "$TIC" || TIC="$TIC"
9210
9211 cf_path_prog=""
9212 cf_path_args=""
9213 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9214 for cf_temp in $ac_cv_path_TIC
9215 do
9216         if test -z "$cf_path_prog" ; then
9217                 if test "$with_full_paths" = yes ; then
9218
9219 if test "x$prefix" != xNONE; then
9220         cf_path_syntax="$prefix"
9221 else
9222         cf_path_syntax="$ac_default_prefix"
9223 fi
9224
9225 case ".$cf_temp" in
9226 (.\$\(*\)*|.\'*\'*)
9227         ;;
9228 (..|./*|.\\*)
9229         ;;
9230 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9231         ;;
9232 (.\$\{*prefix\}*|.\$\{*dir\}*)
9233         eval cf_temp="$cf_temp"
9234         case ".$cf_temp" in
9235         (.NONE/*)
9236                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9237                 ;;
9238         esac
9239         ;;
9240 (.no|.NONE/*)
9241         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9242         ;;
9243 (*)
9244         break
9245         ;;
9246 esac
9247
9248                         cf_path_prog="$cf_temp"
9249                 else
9250                         cf_path_prog="`basename "$cf_temp"`"
9251                 fi
9252         elif test -z "$cf_path_args" ; then
9253                 cf_path_args="$cf_temp"
9254         else
9255                 cf_path_args="$cf_path_args $cf_temp"
9256         fi
9257 done
9258 IFS="$cf_save_ifs"
9259
9260 if test -n "$cf_path_prog" ; then
9261
9262 echo "${as_me:-configure}:9262: testing defining path for ${cf_path_prog} ..." 1>&5
9263
9264 cat >>confdefs.h <<EOF
9265 #define TIC_PATH "$cf_path_prog"
9266 EOF
9267
9268         test -n "$cf_path_args" &&
9269 cat >>confdefs.h <<EOF
9270 #define TIC_ARGS "$cf_path_args"
9271 EOF
9272
9273 fi
9274
9275                 if test -z "$TIC"
9276                 then
9277                         { echo "$as_me:9277: WARNING: no tic program found for fallbacks" >&5
9278 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
9279                 fi
9280
9281 fi;
9282
9283 # Check whether --with-infocmp-path or --without-infocmp-path was given.
9284 if test "${with_infocmp_path+set}" = set; then
9285   withval="$with_infocmp_path"
9286   echo "$as_me:9286: checking for infocmp program for fallbacks" >&5
9287 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
9288                 INFOCMP=$withval
9289                 echo "$as_me:9289: result: $INFOCMP" >&5
9290 echo "${ECHO_T}$INFOCMP" >&6
9291
9292 if test "x$prefix" != xNONE; then
9293         cf_path_syntax="$prefix"
9294 else
9295         cf_path_syntax="$ac_default_prefix"
9296 fi
9297
9298 case ".$INFOCMP" in
9299 (.\$\(*\)*|.\'*\'*)
9300         ;;
9301 (..|./*|.\\*)
9302         ;;
9303 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9304         ;;
9305 (.\$\{*prefix\}*|.\$\{*dir\}*)
9306         eval INFOCMP="$INFOCMP"
9307         case ".$INFOCMP" in
9308         (.NONE/*)
9309                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9310                 ;;
9311         esac
9312         ;;
9313 (.no|.NONE/*)
9314         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9315         ;;
9316 (*)
9317         { { echo "$as_me:9317: error: expected a pathname, not \"$INFOCMP\"" >&5
9318 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
9319    { (exit 1); exit 1; }; }
9320         ;;
9321 esac
9322
9323 else
9324
9325 test -z "$INFOCMP" && INFOCMP="infocmp"
9326 for ac_prog in $INFOCMP infocmp
9327 do
9328   # Extract the first word of "$ac_prog", so it can be a program name with args.
9329 set dummy $ac_prog; ac_word=$2
9330 echo "$as_me:9330: checking for $ac_word" >&5
9331 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9332 if test "${ac_cv_path_INFOCMP+set}" = set; then
9333   echo $ECHO_N "(cached) $ECHO_C" >&6
9334 else
9335   case $INFOCMP in
9336   [\\/]* | ?:[\\/]*)
9337   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
9338   ;;
9339   *)
9340   ac_save_IFS=$IFS; IFS=$ac_path_separator
9341 ac_dummy="$PATH:/usr/local/ncurses/bin"
9342 for ac_dir in $ac_dummy; do
9343   IFS=$ac_save_IFS
9344   test -z "$ac_dir" && ac_dir=.
9345   if $as_executable_p "$ac_dir/$ac_word"; then
9346    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
9347    echo "$as_me:9347: found $ac_dir/$ac_word" >&5
9348    break
9349 fi
9350 done
9351
9352   ;;
9353 esac
9354 fi
9355 INFOCMP=$ac_cv_path_INFOCMP
9356
9357 if test -n "$INFOCMP"; then
9358   echo "$as_me:9358: result: $INFOCMP" >&5
9359 echo "${ECHO_T}$INFOCMP" >&6
9360 else
9361   echo "$as_me:9361: result: no" >&5
9362 echo "${ECHO_T}no" >&6
9363 fi
9364
9365   test -n "$INFOCMP" && break
9366 done
9367 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
9368
9369 cf_path_prog=""
9370 cf_path_args=""
9371 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9372 for cf_temp in $ac_cv_path_INFOCMP
9373 do
9374         if test -z "$cf_path_prog" ; then
9375                 if test "$with_full_paths" = yes ; then
9376
9377 if test "x$prefix" != xNONE; then
9378         cf_path_syntax="$prefix"
9379 else
9380         cf_path_syntax="$ac_default_prefix"
9381 fi
9382
9383 case ".$cf_temp" in
9384 (.\$\(*\)*|.\'*\'*)
9385         ;;
9386 (..|./*|.\\*)
9387         ;;
9388 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9389         ;;
9390 (.\$\{*prefix\}*|.\$\{*dir\}*)
9391         eval cf_temp="$cf_temp"
9392         case ".$cf_temp" in
9393         (.NONE/*)
9394                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9395                 ;;
9396         esac
9397         ;;
9398 (.no|.NONE/*)
9399         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9400         ;;
9401 (*)
9402         break
9403         ;;
9404 esac
9405
9406                         cf_path_prog="$cf_temp"
9407                 else
9408                         cf_path_prog="`basename "$cf_temp"`"
9409                 fi
9410         elif test -z "$cf_path_args" ; then
9411                 cf_path_args="$cf_temp"
9412         else
9413                 cf_path_args="$cf_path_args $cf_temp"
9414         fi
9415 done
9416 IFS="$cf_save_ifs"
9417
9418 if test -n "$cf_path_prog" ; then
9419
9420 echo "${as_me:-configure}:9420: testing defining path for ${cf_path_prog} ..." 1>&5
9421
9422 cat >>confdefs.h <<EOF
9423 #define INFOCMP_PATH "$cf_path_prog"
9424 EOF
9425
9426         test -n "$cf_path_args" &&
9427 cat >>confdefs.h <<EOF
9428 #define INFOCMP_ARGS "$cf_path_args"
9429 EOF
9430
9431 fi
9432
9433                 if test -z "$INFOCMP"
9434                 then
9435                         { echo "$as_me:9435: WARNING: no infocmp program found for fallbacks" >&5
9436 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9437                 fi
9438
9439 fi;
9440
9441         test -z "$TIC" && FALLBACK_LIST=
9442         test -z "$INFOCMP" && FALLBACK_LIST=
9443         if test -z "$FALLBACK_LIST"
9444         then
9445                 { echo "$as_me:9445: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9446 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9447         fi
9448 fi
9449
9450 USE_FALLBACKS=
9451 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9452
9453 echo "$as_me:9453: checking if you want modern xterm or antique" >&5
9454 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9455
9456 # Check whether --with-xterm-new or --without-xterm-new was given.
9457 if test "${with_xterm_new+set}" = set; then
9458   withval="$with_xterm_new"
9459   with_xterm_new=$withval
9460 else
9461   with_xterm_new=yes
9462 fi;
9463 case "$with_xterm_new" in
9464 (no) with_xterm_new=xterm-old;;
9465 (*)      with_xterm_new=xterm-new;;
9466 esac
9467 echo "$as_me:9467: result: $with_xterm_new" >&5
9468 echo "${ECHO_T}$with_xterm_new" >&6
9469 WHICH_XTERM=$with_xterm_new
9470
9471 case $host_os in
9472 (*linux-gnu|*cygwin|*mingw32|*msys)
9473         want_xterm_kbs=DEL
9474         ;;
9475 (*)
9476         want_xterm_kbs=BS
9477         ;;
9478 esac
9479
9480 echo "$as_me:9480: checking if xterm backspace sends BS or DEL" >&5
9481 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9482
9483 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9484 if test "${with_xterm_kbs+set}" = set; then
9485   withval="$with_xterm_kbs"
9486   with_xterm_kbs=$withval
9487 else
9488   with_xterm_kbs=auto
9489 fi;
9490 case x$with_xterm_kbs in
9491 (xyes|xno|xBS|xbs|x8)
9492         with_xterm_kbs=BS
9493         ;;
9494 (xDEL|xdel|x127)
9495         with_xterm_kbs=DEL
9496         ;;
9497 (xauto)
9498         with_xterm_kbs=$want_xterm_kbs
9499         ;;
9500 (*)
9501         with_xterm_kbs=$withval
9502         ;;
9503 esac
9504 echo "$as_me:9504: result: $with_xterm_kbs" >&5
9505 echo "${ECHO_T}$with_xterm_kbs" >&6
9506 XTERM_KBS=$with_xterm_kbs
9507
9508 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9509 then
9510         { echo "$as_me:9510: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&5
9511 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&2;}
9512 fi
9513
9514 MAKE_TERMINFO=
9515 if test "$use_database" = no ; then
9516         TERMINFO="${datadir}/terminfo"
9517         MAKE_TERMINFO="#"
9518 else
9519
9520 echo "$as_me:9520: checking for list of terminfo directories" >&5
9521 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9522
9523 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9524 if test "${with_terminfo_dirs+set}" = set; then
9525   withval="$with_terminfo_dirs"
9526
9527 else
9528   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9529 fi;
9530 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9531 cf_dst_path=
9532 for cf_src_path in $withval
9533 do
9534
9535 if test "x$prefix" != xNONE; then
9536         cf_path_syntax="$prefix"
9537 else
9538         cf_path_syntax="$ac_default_prefix"
9539 fi
9540
9541 case ".$cf_src_path" in
9542 (.\$\(*\)*|.\'*\'*)
9543         ;;
9544 (..|./*|.\\*)
9545         ;;
9546 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9547         ;;
9548 (.\$\{*prefix\}*|.\$\{*dir\}*)
9549         eval cf_src_path="$cf_src_path"
9550         case ".$cf_src_path" in
9551         (.NONE/*)
9552                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9553                 ;;
9554         esac
9555         ;;
9556 (.no|.NONE/*)
9557         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9558         ;;
9559 (*)
9560         { { echo "$as_me:9560: error: expected a pathname, not \"$cf_src_path\"" >&5
9561 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9562    { (exit 1); exit 1; }; }
9563         ;;
9564 esac
9565
9566   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9567   cf_dst_path="${cf_dst_path}${cf_src_path}"
9568 done
9569 IFS="$ac_save_ifs"
9570
9571 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9572 # so we have to check/work around.  We do prefer the result of "eval"...
9573 eval cf_dst_eval="$cf_dst_path"
9574 case "x$cf_dst_eval" in
9575 (xNONE*)
9576         TERMINFO_DIRS=$cf_dst_path
9577         ;;
9578 (*)
9579         TERMINFO_DIRS="$cf_dst_eval"
9580         ;;
9581 esac
9582
9583 echo "$as_me:9583: result: $TERMINFO_DIRS" >&5
9584 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9585 test -n "$TERMINFO_DIRS" &&
9586 cat >>confdefs.h <<EOF
9587 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9588 EOF
9589
9590 case "x$TERMINFO" in
9591 x???:*)
9592         { echo "$as_me:9592: WARNING: ignoring non-directory/file TERMINFO value" >&5
9593 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9594         unset TERMINFO
9595         ;;
9596 esac
9597
9598 echo "$as_me:9598: checking for default terminfo directory" >&5
9599 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9600
9601 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9602 if test "${with_default_terminfo_dir+set}" = set; then
9603   withval="$with_default_terminfo_dir"
9604
9605 else
9606   withval="${TERMINFO:-${datadir}/terminfo}"
9607 fi; if test -n "${datadir}/terminfo" ; then
9608
9609 if test "x$prefix" != xNONE; then
9610         cf_path_syntax="$prefix"
9611 else
9612         cf_path_syntax="$ac_default_prefix"
9613 fi
9614
9615 case ".$withval" in
9616 (.\$\(*\)*|.\'*\'*)
9617         ;;
9618 (..|./*|.\\*)
9619         ;;
9620 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9621         ;;
9622 (.\$\{*prefix\}*|.\$\{*dir\}*)
9623         eval withval="$withval"
9624         case ".$withval" in
9625         (.NONE/*)
9626                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9627                 ;;
9628         esac
9629         ;;
9630 (.no|.NONE/*)
9631         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9632         ;;
9633 (*)
9634         { { echo "$as_me:9634: error: expected a pathname, not \"$withval\"" >&5
9635 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9636    { (exit 1); exit 1; }; }
9637         ;;
9638 esac
9639
9640 fi
9641 eval TERMINFO="$withval"
9642
9643 echo "$as_me:9643: result: $TERMINFO" >&5
9644 echo "${ECHO_T}$TERMINFO" >&6
9645
9646 cat >>confdefs.h <<EOF
9647 #define TERMINFO "$TERMINFO"
9648 EOF
9649
9650 fi
9651
9652 ###     use option --disable-big-core to make tic run on small machines
9653 ###     We need 4Mb, check if we can allocate 50% more than that.
9654 echo "$as_me:9654: checking if big-core option selected" >&5
9655 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9656
9657 # Check whether --enable-big-core or --disable-big-core was given.
9658 if test "${enable_big_core+set}" = set; then
9659   enableval="$enable_big_core"
9660   with_big_core=$enableval
9661 else
9662   if test "$cross_compiling" = yes; then
9663   with_big_core=no
9664 else
9665   cat >"conftest.$ac_ext" <<_ACEOF
9666 #line 9666 "configure"
9667 #include "confdefs.h"
9668
9669 #include <stdlib.h>
9670 #include <string.h>
9671 int main(void) {
9672         unsigned long n = 6000000L;
9673         char *s = malloc(n);
9674         if (s != 0)
9675                 s[0] = s[n-1] = 0;
9676         ${cf_cv_main_return:-return}(s == 0);
9677 }
9678 _ACEOF
9679 rm -f "conftest$ac_exeext"
9680 if { (eval echo "$as_me:9680: \"$ac_link\"") >&5
9681   (eval $ac_link) 2>&5
9682   ac_status=$?
9683   echo "$as_me:9683: \$? = $ac_status" >&5
9684   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9685   { (eval echo "$as_me:9685: \"$ac_try\"") >&5
9686   (eval $ac_try) 2>&5
9687   ac_status=$?
9688   echo "$as_me:9688: \$? = $ac_status" >&5
9689   (exit "$ac_status"); }; }; then
9690   with_big_core=yes
9691 else
9692   echo "$as_me: program exited with status $ac_status" >&5
9693 echo "$as_me: failed program was:" >&5
9694 cat "conftest.$ac_ext" >&5
9695 with_big_core=no
9696 fi
9697 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9698 fi
9699 fi;
9700 echo "$as_me:9700: result: $with_big_core" >&5
9701 echo "${ECHO_T}$with_big_core" >&6
9702 test "x$with_big_core" = "xyes" &&
9703 cat >>confdefs.h <<\EOF
9704 #define HAVE_BIG_CORE 1
9705 EOF
9706
9707 ### ISO C only guarantees 512-char strings, we have tables which load faster
9708 ### when constructed using "big" strings.  More than the C compiler, the awk
9709 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9710 echo "$as_me:9710: checking if big-strings option selected" >&5
9711 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9712
9713 # Check whether --enable-big-strings or --disable-big-strings was given.
9714 if test "${enable_big_strings+set}" = set; then
9715   enableval="$enable_big_strings"
9716   with_big_strings=$enableval
9717 else
9718
9719         case x$AWK in
9720         (x)
9721                 eval with_big_strings=no
9722                 ;;
9723         (*)
9724                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9725                         | $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
9726                         eval with_big_strings=yes
9727                 else
9728                         eval with_big_strings=no
9729                 fi
9730                 ;;
9731         esac
9732
9733 fi;
9734 echo "$as_me:9734: result: $with_big_strings" >&5
9735 echo "${ECHO_T}$with_big_strings" >&6
9736
9737 USE_BIG_STRINGS=0
9738 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9739
9740 ###     use option --enable-termcap to compile in the termcap fallback support
9741 echo "$as_me:9741: checking if you want termcap-fallback support" >&5
9742 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9743
9744 # Check whether --enable-termcap or --disable-termcap was given.
9745 if test "${enable_termcap+set}" = set; then
9746   enableval="$enable_termcap"
9747   with_termcap=$enableval
9748 else
9749   with_termcap=no
9750 fi;
9751 echo "$as_me:9751: result: $with_termcap" >&5
9752 echo "${ECHO_T}$with_termcap" >&6
9753
9754 NCURSES_USE_TERMCAP=0
9755 if test "x$with_termcap" != "xyes" ; then
9756         if test "$use_database" = no ; then
9757                 if test -z "$with_fallback" ; then
9758                         { { echo "$as_me:9758: error: You have disabled the database w/o specifying fallbacks" >&5
9759 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9760    { (exit 1); exit 1; }; }
9761                 fi
9762         fi
9763
9764 cat >>confdefs.h <<\EOF
9765 #define PURE_TERMINFO 1
9766 EOF
9767
9768 else
9769
9770         if test "$with_ticlib" != no ; then
9771                 { { echo "$as_me:9771: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9772 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9773    { (exit 1); exit 1; }; }
9774         fi
9775
9776         NCURSES_USE_TERMCAP=1
9777         echo "$as_me:9777: checking for list of termcap files" >&5
9778 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9779
9780 # Check whether --with-termpath or --without-termpath was given.
9781 if test "${with_termpath+set}" = set; then
9782   withval="$with_termpath"
9783
9784 else
9785   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9786 fi;
9787 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9788 cf_dst_path=
9789 for cf_src_path in $withval
9790 do
9791
9792 if test "x$prefix" != xNONE; then
9793         cf_path_syntax="$prefix"
9794 else
9795         cf_path_syntax="$ac_default_prefix"
9796 fi
9797
9798 case ".$cf_src_path" in
9799 (.\$\(*\)*|.\'*\'*)
9800         ;;
9801 (..|./*|.\\*)
9802         ;;
9803 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9804         ;;
9805 (.\$\{*prefix\}*|.\$\{*dir\}*)
9806         eval cf_src_path="$cf_src_path"
9807         case ".$cf_src_path" in
9808         (.NONE/*)
9809                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9810                 ;;
9811         esac
9812         ;;
9813 (.no|.NONE/*)
9814         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9815         ;;
9816 (*)
9817         { { echo "$as_me:9817: error: expected a pathname, not \"$cf_src_path\"" >&5
9818 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9819    { (exit 1); exit 1; }; }
9820         ;;
9821 esac
9822
9823   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9824   cf_dst_path="${cf_dst_path}${cf_src_path}"
9825 done
9826 IFS="$ac_save_ifs"
9827
9828 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9829 # so we have to check/work around.  We do prefer the result of "eval"...
9830 eval cf_dst_eval="$cf_dst_path"
9831 case "x$cf_dst_eval" in
9832 (xNONE*)
9833         TERMPATH=$cf_dst_path
9834         ;;
9835 (*)
9836         TERMPATH="$cf_dst_eval"
9837         ;;
9838 esac
9839
9840         echo "$as_me:9840: result: $TERMPATH" >&5
9841 echo "${ECHO_T}$TERMPATH" >&6
9842         test -n "$TERMPATH" &&
9843 cat >>confdefs.h <<EOF
9844 #define TERMPATH "$TERMPATH"
9845 EOF
9846
9847         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9848         echo "$as_me:9848: checking if fast termcap-loader is needed" >&5
9849 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9850
9851 # Check whether --enable-getcap or --disable-getcap was given.
9852 if test "${enable_getcap+set}" = set; then
9853   enableval="$enable_getcap"
9854   with_getcap=$enableval
9855 else
9856   with_getcap=no
9857 fi;
9858         echo "$as_me:9858: result: $with_getcap" >&5
9859 echo "${ECHO_T}$with_getcap" >&6
9860         test "x$with_getcap" = "xyes" &&
9861 cat >>confdefs.h <<\EOF
9862 #define USE_GETCAP 1
9863 EOF
9864
9865         echo "$as_me:9865: checking if translated termcaps will be cached in ~/.terminfo" >&5
9866 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9867
9868 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9869 if test "${enable_getcap_cache+set}" = set; then
9870   enableval="$enable_getcap_cache"
9871   with_getcap_cache=$enableval
9872 else
9873   with_getcap_cache=no
9874 fi;
9875         echo "$as_me:9875: result: $with_getcap_cache" >&5
9876 echo "${ECHO_T}$with_getcap_cache" >&6
9877         test "x$with_getcap_cache" = "xyes" &&
9878 cat >>confdefs.h <<\EOF
9879 #define USE_GETCAP_CACHE 1
9880 EOF
9881
9882 fi
9883
9884 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9885 echo "$as_me:9885: checking if ~/.terminfo is wanted" >&5
9886 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9887
9888 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9889 if test "${enable_home_terminfo+set}" = set; then
9890   enableval="$enable_home_terminfo"
9891   with_home_terminfo=$enableval
9892 else
9893   with_home_terminfo=yes
9894 fi;
9895 echo "$as_me:9895: result: $with_home_terminfo" >&5
9896 echo "${ECHO_T}$with_home_terminfo" >&6
9897 test "x$with_home_terminfo" = "xyes" &&
9898 cat >>confdefs.h <<\EOF
9899 #define USE_HOME_TERMINFO 1
9900 EOF
9901
9902 echo "$as_me:9902: checking if you want to permit root to use ncurses environment variables" >&5
9903 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9904
9905 # Check whether --enable-root-environ or --disable-root-environ was given.
9906 if test "${enable_root_environ+set}" = set; then
9907   enableval="$enable_root_environ"
9908   with_root_environ=$enableval
9909 else
9910   with_root_environ=yes
9911 fi;
9912 echo "$as_me:9912: result: $with_root_environ" >&5
9913 echo "${ECHO_T}$with_root_environ" >&6
9914 test "x$with_root_environ" = xyes &&
9915 cat >>confdefs.h <<\EOF
9916 #define USE_ROOT_ENVIRON 1
9917 EOF
9918
9919 echo "$as_me:9919: checking if you want to permit setuid programs to access all files" >&5
9920 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9921
9922 # Check whether --enable-root-access or --disable-root-access was given.
9923 if test "${enable_root_access+set}" = set; then
9924   enableval="$enable_root_access"
9925   with_root_access=$enableval
9926 else
9927   with_root_access=yes
9928 fi;
9929 echo "$as_me:9929: result: $with_root_access" >&5
9930 echo "${ECHO_T}$with_root_access" >&6
9931 test "x$with_root_access" = xyes &&
9932 cat >>confdefs.h <<\EOF
9933 #define USE_ROOT_ACCESS 1
9934 EOF
9935
9936 echo "$as_me:9936: checking if you want to permit setuid use of ncurses environment variables" >&5
9937 echo $ECHO_N "checking if you want to permit setuid use of ncurses environment variables... $ECHO_C" >&6
9938
9939 # Check whether --enable-setuid-environ or --disable-setuid-environ was given.
9940 if test "${enable_setuid_environ+set}" = set; then
9941   enableval="$enable_setuid_environ"
9942   with_setuid_environ=$enableval
9943 else
9944   with_setuid_environ=$with_root_environ
9945 fi;
9946 echo "$as_me:9946: result: $with_setuid_environ" >&5
9947 echo "${ECHO_T}$with_setuid_environ" >&6
9948 test "x$with_setuid_environ" = xyes &&
9949 cat >>confdefs.h <<\EOF
9950 #define USE_SETUID_ENVIRON 1
9951 EOF
9952
9953 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9954 ###   to reduce storage requirements for the terminfo database.
9955
9956 for ac_header in \
9957 unistd.h \
9958
9959 do
9960 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9961 echo "$as_me:9961: checking for $ac_header" >&5
9962 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9963 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9964   echo $ECHO_N "(cached) $ECHO_C" >&6
9965 else
9966   cat >"conftest.$ac_ext" <<_ACEOF
9967 #line 9967 "configure"
9968 #include "confdefs.h"
9969 #include <$ac_header>
9970 _ACEOF
9971 if { (eval echo "$as_me:9971: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9972   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9973   ac_status=$?
9974   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9975   rm -f conftest.er1
9976   cat conftest.err >&5
9977   echo "$as_me:9977: \$? = $ac_status" >&5
9978   (exit "$ac_status"); } >/dev/null; then
9979   if test -s conftest.err; then
9980     ac_cpp_err=$ac_c_preproc_warn_flag
9981   else
9982     ac_cpp_err=
9983   fi
9984 else
9985   ac_cpp_err=yes
9986 fi
9987 if test -z "$ac_cpp_err"; then
9988   eval "$as_ac_Header=yes"
9989 else
9990   echo "$as_me: failed program was:" >&5
9991   cat "conftest.$ac_ext" >&5
9992   eval "$as_ac_Header=no"
9993 fi
9994 rm -f conftest.err "conftest.$ac_ext"
9995 fi
9996 echo "$as_me:9996: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9997 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9998 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9999   cat >>confdefs.h <<EOF
10000 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10001 EOF
10002
10003 fi
10004 done
10005
10006 for ac_func in \
10007         remove \
10008         unlink
10009 do
10010 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10011 echo "$as_me:10011: checking for $ac_func" >&5
10012 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10013 if eval "test \"\${$as_ac_var+set}\" = set"; then
10014   echo $ECHO_N "(cached) $ECHO_C" >&6
10015 else
10016   cat >"conftest.$ac_ext" <<_ACEOF
10017 #line 10017 "configure"
10018 #include "confdefs.h"
10019 #define $ac_func autoconf_temporary
10020 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10021 #undef $ac_func
10022
10023 #ifdef __cplusplus
10024 extern "C"
10025 #endif
10026
10027 /* We use char because int might match the return type of a gcc2
10028    builtin and then its argument prototype would still apply.  */
10029 char $ac_func (void);
10030
10031 int
10032 main (void)
10033 {
10034
10035 /* The GNU C library defines stubs for functions which it implements
10036     to always fail with ENOSYS.  Some functions are actually named
10037     something starting with __ and the normal name is an alias.  */
10038 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10039 #error found stub for $ac_func
10040 #endif
10041
10042         return $ac_func ();
10043   ;
10044   return 0;
10045 }
10046 _ACEOF
10047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10048 if { (eval echo "$as_me:10048: \"$ac_link\"") >&5
10049   (eval $ac_link) 2>&5
10050   ac_status=$?
10051   echo "$as_me:10051: \$? = $ac_status" >&5
10052   (exit "$ac_status"); } &&
10053          { ac_try='test -s "conftest$ac_exeext"'
10054   { (eval echo "$as_me:10054: \"$ac_try\"") >&5
10055   (eval $ac_try) 2>&5
10056   ac_status=$?
10057   echo "$as_me:10057: \$? = $ac_status" >&5
10058   (exit "$ac_status"); }; }; then
10059   eval "$as_ac_var=yes"
10060 else
10061   echo "$as_me: failed program was:" >&5
10062 cat "conftest.$ac_ext" >&5
10063 eval "$as_ac_var=no"
10064 fi
10065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10066 fi
10067 echo "$as_me:10067: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10068 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10069 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10070   cat >>confdefs.h <<EOF
10071 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10072 EOF
10073
10074 fi
10075 done
10076
10077 if test "$cross_compiling" = yes ; then
10078
10079 for ac_func in \
10080                 link \
10081                 symlink
10082 do
10083 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10084 echo "$as_me:10084: checking for $ac_func" >&5
10085 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10086 if eval "test \"\${$as_ac_var+set}\" = set"; then
10087   echo $ECHO_N "(cached) $ECHO_C" >&6
10088 else
10089   cat >"conftest.$ac_ext" <<_ACEOF
10090 #line 10090 "configure"
10091 #include "confdefs.h"
10092 #define $ac_func autoconf_temporary
10093 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10094 #undef $ac_func
10095
10096 #ifdef __cplusplus
10097 extern "C"
10098 #endif
10099
10100 /* We use char because int might match the return type of a gcc2
10101    builtin and then its argument prototype would still apply.  */
10102 char $ac_func (void);
10103
10104 int
10105 main (void)
10106 {
10107
10108 /* The GNU C library defines stubs for functions which it implements
10109     to always fail with ENOSYS.  Some functions are actually named
10110     something starting with __ and the normal name is an alias.  */
10111 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10112 #error found stub for $ac_func
10113 #endif
10114
10115         return $ac_func ();
10116   ;
10117   return 0;
10118 }
10119 _ACEOF
10120 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10121 if { (eval echo "$as_me:10121: \"$ac_link\"") >&5
10122   (eval $ac_link) 2>&5
10123   ac_status=$?
10124   echo "$as_me:10124: \$? = $ac_status" >&5
10125   (exit "$ac_status"); } &&
10126          { ac_try='test -s "conftest$ac_exeext"'
10127   { (eval echo "$as_me:10127: \"$ac_try\"") >&5
10128   (eval $ac_try) 2>&5
10129   ac_status=$?
10130   echo "$as_me:10130: \$? = $ac_status" >&5
10131   (exit "$ac_status"); }; }; then
10132   eval "$as_ac_var=yes"
10133 else
10134   echo "$as_me: failed program was:" >&5
10135 cat "conftest.$ac_ext" >&5
10136 eval "$as_ac_var=no"
10137 fi
10138 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10139 fi
10140 echo "$as_me:10140: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10141 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10142 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10143   cat >>confdefs.h <<EOF
10144 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10145 EOF
10146
10147 fi
10148 done
10149
10150 else
10151         echo "$as_me:10151: checking if link/symlink functions work" >&5
10152 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
10153 if test "${cf_cv_link_funcs+set}" = set; then
10154   echo $ECHO_N "(cached) $ECHO_C" >&6
10155 else
10156
10157                 cf_cv_link_funcs=
10158                 for cf_func in link symlink ; do
10159                         if test "$cross_compiling" = yes; then
10160
10161                         eval 'ac_cv_func_'$cf_func'=error'
10162 else
10163   cat >"conftest.$ac_ext" <<_ACEOF
10164 #line 10164 "configure"
10165 #include "confdefs.h"
10166
10167 $ac_includes_default
10168
10169 int main(void)
10170 {
10171         int fail = 0;
10172         char src[] = "conftest.tmp";
10173         char dst[] = "conftest.chk";
10174         struct stat src_sb, dst_sb;
10175         FILE *fp = fopen(src, "w");
10176         if (fp == 0) { fail = 3; } else {
10177                 fclose(fp); stat(src, &src_sb);
10178                 if ($cf_func(src, dst) < 0) {
10179                         fail = 1;
10180                 } else if (stat(dst, &dst_sb) < 0) {
10181                         fail = 2;
10182                 } else {
10183                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
10184                         if (diff < 0) diff = -diff;
10185                         if (diff > 2) fail = 3;
10186                 }
10187         }
10188 #ifdef HAVE_UNLINK
10189         unlink(dst); unlink(src);
10190 #else
10191         remove(dst); remove(src);
10192 #endif
10193         ${cf_cv_main_return:-return} (fail);
10194 }
10195
10196 _ACEOF
10197 rm -f "conftest$ac_exeext"
10198 if { (eval echo "$as_me:10198: \"$ac_link\"") >&5
10199   (eval $ac_link) 2>&5
10200   ac_status=$?
10201   echo "$as_me:10201: \$? = $ac_status" >&5
10202   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10203   { (eval echo "$as_me:10203: \"$ac_try\"") >&5
10204   (eval $ac_try) 2>&5
10205   ac_status=$?
10206   echo "$as_me:10206: \$? = $ac_status" >&5
10207   (exit "$ac_status"); }; }; then
10208
10209                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
10210                         eval 'ac_cv_func_'$cf_func'=yes'
10211 else
10212   echo "$as_me: program exited with status $ac_status" >&5
10213 echo "$as_me: failed program was:" >&5
10214 cat "conftest.$ac_ext" >&5
10215
10216                         eval 'ac_cv_func_'$cf_func'=no'
10217 fi
10218 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10219 fi
10220                 done
10221                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
10222
10223 fi
10224 echo "$as_me:10224: result: $cf_cv_link_funcs" >&5
10225 echo "${ECHO_T}$cf_cv_link_funcs" >&6
10226         test "$ac_cv_func_link"    = yes &&
10227 cat >>confdefs.h <<\EOF
10228 #define HAVE_LINK 1
10229 EOF
10230
10231         test "$ac_cv_func_symlink" = yes &&
10232 cat >>confdefs.h <<\EOF
10233 #define HAVE_SYMLINK 1
10234 EOF
10235
10236 fi
10237
10238 with_links=no
10239 with_symlinks=no
10240
10241 # soft links (symbolic links) are useful for some systems where hard links do
10242 # not work, or to make it simpler to copy terminfo trees around.
10243 if test "x$ac_cv_func_symlink" = xyes ; then
10244         echo "$as_me:10244: checking if tic should use symbolic links" >&5
10245 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
10246
10247 # Check whether --enable-symlinks or --disable-symlinks was given.
10248 if test "${enable_symlinks+set}" = set; then
10249   enableval="$enable_symlinks"
10250   with_symlinks=$enableval
10251 else
10252   with_symlinks=no
10253 fi;
10254         echo "$as_me:10254: result: $with_symlinks" >&5
10255 echo "${ECHO_T}$with_symlinks" >&6
10256 fi
10257
10258 # If we have hard links and did not choose to use soft links instead, there is
10259 # no reason to make this choice optional - use the hard links.
10260 if test "$with_symlinks" = no ; then
10261         echo "$as_me:10261: checking if tic should use hard links" >&5
10262 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
10263         if test "x$ac_cv_func_link" = xyes ; then
10264                 with_links=yes
10265         else
10266                 with_links=no
10267         fi
10268         echo "$as_me:10268: result: $with_links" >&5
10269 echo "${ECHO_T}$with_links" >&6
10270 fi
10271
10272 test "x$with_links" = xyes &&
10273 cat >>confdefs.h <<\EOF
10274 #define USE_LINKS 1
10275 EOF
10276
10277 test "x$with_symlinks" = xyes &&
10278 cat >>confdefs.h <<\EOF
10279 #define USE_SYMLINKS 1
10280 EOF
10281
10282 ###   use option --enable-broken-linker to force on use of broken-linker support
10283
10284 echo "$as_me:10284: checking if you want broken-linker support code" >&5
10285 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10286
10287 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10288 if test "${enable_broken_linker+set}" = set; then
10289   enableval="$enable_broken_linker"
10290   with_broken_linker=$enableval
10291 else
10292   with_broken_linker=no
10293 fi;
10294 echo "$as_me:10294: result: $with_broken_linker" >&5
10295 echo "${ECHO_T}$with_broken_linker" >&6
10296
10297 : "${BROKEN_LINKER:=0}"
10298 if test "x$with_broken_linker" = xyes ; then
10299
10300 cat >>confdefs.h <<\EOF
10301 #define BROKEN_LINKER 1
10302 EOF
10303
10304         BROKEN_LINKER=1
10305 fi
10306
10307 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
10308 echo "$as_me:10308: checking if tputs should process BSD-style prefix padding" >&5
10309 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
10310
10311 # Check whether --enable-bsdpad or --disable-bsdpad was given.
10312 if test "${enable_bsdpad+set}" = set; then
10313   enableval="$enable_bsdpad"
10314   with_bsdpad=$enableval
10315 else
10316   with_bsdpad=no
10317 fi;
10318 echo "$as_me:10318: result: $with_bsdpad" >&5
10319 echo "${ECHO_T}$with_bsdpad" >&6
10320 test "x$with_bsdpad" = xyes &&
10321 cat >>confdefs.h <<\EOF
10322 #define BSD_TPUTS 1
10323 EOF
10324
10325 ###   use option --enable-widec to turn on use of wide-character support
10326 NCURSES_CH_T=chtype
10327 NCURSES_LIBUTF8=0
10328
10329 NEED_WCHAR_H=0
10330 NCURSES_MBSTATE_T=0
10331 NCURSES_WCHAR_T=0
10332 NCURSES_WINT_T=0
10333
10334 # Check to define _XOPEN_SOURCE "automatically"
10335 CPPFLAGS_before_XOPEN="$CPPFLAGS"
10336
10337 echo "$as_me:10337: checking if the POSIX test-macros are already defined" >&5
10338 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10339 if test "${cf_cv_posix_visible+set}" = set; then
10340   echo $ECHO_N "(cached) $ECHO_C" >&6
10341 else
10342
10343 cat >"conftest.$ac_ext" <<_ACEOF
10344 #line 10344 "configure"
10345 #include "confdefs.h"
10346 #include <stdio.h>
10347 int
10348 main (void)
10349 {
10350
10351 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10352         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10353         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10354         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10355 #error conflicting symbols found
10356 #endif
10357
10358   ;
10359   return 0;
10360 }
10361 _ACEOF
10362 rm -f "conftest.$ac_objext"
10363 if { (eval echo "$as_me:10363: \"$ac_compile\"") >&5
10364   (eval $ac_compile) 2>&5
10365   ac_status=$?
10366   echo "$as_me:10366: \$? = $ac_status" >&5
10367   (exit "$ac_status"); } &&
10368          { ac_try='test -s "conftest.$ac_objext"'
10369   { (eval echo "$as_me:10369: \"$ac_try\"") >&5
10370   (eval $ac_try) 2>&5
10371   ac_status=$?
10372   echo "$as_me:10372: \$? = $ac_status" >&5
10373   (exit "$ac_status"); }; }; then
10374   cf_cv_posix_visible=no
10375 else
10376   echo "$as_me: failed program was:" >&5
10377 cat "conftest.$ac_ext" >&5
10378 cf_cv_posix_visible=yes
10379 fi
10380 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10381
10382 fi
10383 echo "$as_me:10383: result: $cf_cv_posix_visible" >&5
10384 echo "${ECHO_T}$cf_cv_posix_visible" >&6
10385
10386 if test "$cf_cv_posix_visible" = no; then
10387
10388 cf_XOPEN_SOURCE=600
10389 cf_POSIX_C_SOURCE=199506L
10390 cf_xopen_source=
10391
10392 case "$host_os" in
10393 (aix[4-7]*)
10394         cf_xopen_source="-D_ALL_SOURCE"
10395         ;;
10396 (darwin[0-8].*)
10397         cf_xopen_source="-D_APPLE_C_SOURCE"
10398         ;;
10399 (darwin*)
10400         cf_xopen_source="-D_DARWIN_C_SOURCE"
10401         cf_XOPEN_SOURCE=
10402         ;;
10403 (freebsd*|dragonfly*|midnightbsd*)
10404         # 5.x headers associate
10405         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10406         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10407         cf_POSIX_C_SOURCE=200112L
10408         cf_XOPEN_SOURCE=600
10409         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10410         ;;
10411 (hpux11*)
10412         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10413         ;;
10414 (hpux*)
10415         cf_xopen_source="-D_HPUX_SOURCE"
10416         ;;
10417 (irix[56].*)
10418         cf_xopen_source="-D_SGI_SOURCE"
10419         cf_XOPEN_SOURCE=
10420         ;;
10421 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
10422
10423 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10424
10425 echo "$as_me:10425: checking if this is the GNU C library" >&5
10426 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10427 if test "${cf_cv_gnu_library+set}" = set; then
10428   echo $ECHO_N "(cached) $ECHO_C" >&6
10429 else
10430
10431 cat >"conftest.$ac_ext" <<_ACEOF
10432 #line 10432 "configure"
10433 #include "confdefs.h"
10434 #include <sys/types.h>
10435 int
10436 main (void)
10437 {
10438
10439         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10440                 return 0;
10441         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10442                 return 0;
10443         #else
10444         #       error not GNU C library
10445         #endif
10446   ;
10447   return 0;
10448 }
10449 _ACEOF
10450 rm -f "conftest.$ac_objext"
10451 if { (eval echo "$as_me:10451: \"$ac_compile\"") >&5
10452   (eval $ac_compile) 2>&5
10453   ac_status=$?
10454   echo "$as_me:10454: \$? = $ac_status" >&5
10455   (exit "$ac_status"); } &&
10456          { ac_try='test -s "conftest.$ac_objext"'
10457   { (eval echo "$as_me:10457: \"$ac_try\"") >&5
10458   (eval $ac_try) 2>&5
10459   ac_status=$?
10460   echo "$as_me:10460: \$? = $ac_status" >&5
10461   (exit "$ac_status"); }; }; then
10462   cf_cv_gnu_library=yes
10463 else
10464   echo "$as_me: failed program was:" >&5
10465 cat "conftest.$ac_ext" >&5
10466 cf_cv_gnu_library=no
10467 fi
10468 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10469
10470 fi
10471 echo "$as_me:10471: result: $cf_cv_gnu_library" >&5
10472 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10473
10474 if test x$cf_cv_gnu_library = xyes; then
10475
10476         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10477         # was changed to help a little.  newlib incorporated the change about 4
10478         # years later.
10479         echo "$as_me:10479: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10480 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10481 if test "${cf_cv_gnu_library_219+set}" = set; then
10482   echo $ECHO_N "(cached) $ECHO_C" >&6
10483 else
10484
10485                 cf_save="$CPPFLAGS"
10486
10487         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10488         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10489
10490                 cat >"conftest.$ac_ext" <<_ACEOF
10491 #line 10491 "configure"
10492 #include "confdefs.h"
10493 #include <sys/types.h>
10494 int
10495 main (void)
10496 {
10497
10498                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10499                                 return 0;
10500                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10501                                 return 0;
10502                         #else
10503                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10504                         #endif
10505   ;
10506   return 0;
10507 }
10508 _ACEOF
10509 rm -f "conftest.$ac_objext"
10510 if { (eval echo "$as_me:10510: \"$ac_compile\"") >&5
10511   (eval $ac_compile) 2>&5
10512   ac_status=$?
10513   echo "$as_me:10513: \$? = $ac_status" >&5
10514   (exit "$ac_status"); } &&
10515          { ac_try='test -s "conftest.$ac_objext"'
10516   { (eval echo "$as_me:10516: \"$ac_try\"") >&5
10517   (eval $ac_try) 2>&5
10518   ac_status=$?
10519   echo "$as_me:10519: \$? = $ac_status" >&5
10520   (exit "$ac_status"); }; }; then
10521   cf_cv_gnu_library_219=yes
10522 else
10523   echo "$as_me: failed program was:" >&5
10524 cat "conftest.$ac_ext" >&5
10525 cf_cv_gnu_library_219=no
10526 fi
10527 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10528                 CPPFLAGS="$cf_save"
10529
10530 fi
10531 echo "$as_me:10531: result: $cf_cv_gnu_library_219" >&5
10532 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10533
10534         if test "x$cf_cv_gnu_library_219" = xyes; then
10535                 cf_save="$CPPFLAGS"
10536                 echo "$as_me:10536: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10537 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10538 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10539   echo $ECHO_N "(cached) $ECHO_C" >&6
10540 else
10541
10542 cf_fix_cppflags=no
10543 cf_new_cflags=
10544 cf_new_cppflags=
10545 cf_new_extra_cppflags=
10546
10547 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10548 do
10549 case "$cf_fix_cppflags" in
10550 (no)
10551         case "$cf_add_cflags" in
10552         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10553                 case "$cf_add_cflags" in
10554                 (-D*)
10555                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10556
10557                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10558                                 && test -z "${cf_tst_cflags}" \
10559                                 && cf_fix_cppflags=yes
10560
10561                         if test "$cf_fix_cppflags" = yes ; then
10562
10563         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10564         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10565
10566                                 continue
10567                         elif test "${cf_tst_cflags}" = "\"'" ; then
10568
10569         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10570         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10571
10572                                 continue
10573                         fi
10574                         ;;
10575                 esac
10576                 case "$CPPFLAGS" in
10577                 (*$cf_add_cflags)
10578                         ;;
10579                 (*)
10580                         case "$cf_add_cflags" in
10581                         (-D*)
10582                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10583
10584 CPPFLAGS=`echo "$CPPFLAGS" | \
10585         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10586                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10587
10588                                 ;;
10589                         esac
10590
10591         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10592         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10593
10594                         ;;
10595                 esac
10596                 ;;
10597         (*)
10598
10599         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10600         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10601
10602                 ;;
10603         esac
10604         ;;
10605 (yes)
10606
10607         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10608         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10609
10610         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10611
10612         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10613                 && test -z "${cf_tst_cflags}" \
10614                 && cf_fix_cppflags=no
10615         ;;
10616 esac
10617 done
10618
10619 if test -n "$cf_new_cflags" ; then
10620
10621         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10622         CFLAGS="${CFLAGS}$cf_new_cflags"
10623
10624 fi
10625
10626 if test -n "$cf_new_cppflags" ; then
10627
10628         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10629         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10630
10631 fi
10632
10633 if test -n "$cf_new_extra_cppflags" ; then
10634
10635         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10636         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10637
10638 fi
10639
10640                         cat >"conftest.$ac_ext" <<_ACEOF
10641 #line 10641 "configure"
10642 #include "confdefs.h"
10643
10644                                 #include <limits.h>
10645                                 #include <sys/types.h>
10646
10647 int
10648 main (void)
10649 {
10650
10651                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10652                                         return 0;
10653                                 #else
10654                                 #       error GNU C library is too old
10655                                 #endif
10656   ;
10657   return 0;
10658 }
10659 _ACEOF
10660 rm -f "conftest.$ac_objext"
10661 if { (eval echo "$as_me:10661: \"$ac_compile\"") >&5
10662   (eval $ac_compile) 2>&5
10663   ac_status=$?
10664   echo "$as_me:10664: \$? = $ac_status" >&5
10665   (exit "$ac_status"); } &&
10666          { ac_try='test -s "conftest.$ac_objext"'
10667   { (eval echo "$as_me:10667: \"$ac_try\"") >&5
10668   (eval $ac_try) 2>&5
10669   ac_status=$?
10670   echo "$as_me:10670: \$? = $ac_status" >&5
10671   (exit "$ac_status"); }; }; then
10672   cf_cv_gnu_dftsrc_219=yes
10673 else
10674   echo "$as_me: failed program was:" >&5
10675 cat "conftest.$ac_ext" >&5
10676 cf_cv_gnu_dftsrc_219=no
10677 fi
10678 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10679
10680 fi
10681 echo "$as_me:10681: result: $cf_cv_gnu_dftsrc_219" >&5
10682 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10683                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10684         else
10685                 cf_cv_gnu_dftsrc_219=maybe
10686         fi
10687
10688         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10689
10690                 echo "$as_me:10690: checking if we must define _GNU_SOURCE" >&5
10691 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10692 if test "${cf_cv_gnu_source+set}" = set; then
10693   echo $ECHO_N "(cached) $ECHO_C" >&6
10694 else
10695
10696                 cat >"conftest.$ac_ext" <<_ACEOF
10697 #line 10697 "configure"
10698 #include "confdefs.h"
10699 #include <sys/types.h>
10700 int
10701 main (void)
10702 {
10703
10704                         #ifndef _XOPEN_SOURCE
10705                         #error  expected _XOPEN_SOURCE to be defined
10706                         #endif
10707   ;
10708   return 0;
10709 }
10710 _ACEOF
10711 rm -f "conftest.$ac_objext"
10712 if { (eval echo "$as_me:10712: \"$ac_compile\"") >&5
10713   (eval $ac_compile) 2>&5
10714   ac_status=$?
10715   echo "$as_me:10715: \$? = $ac_status" >&5
10716   (exit "$ac_status"); } &&
10717          { ac_try='test -s "conftest.$ac_objext"'
10718   { (eval echo "$as_me:10718: \"$ac_try\"") >&5
10719   (eval $ac_try) 2>&5
10720   ac_status=$?
10721   echo "$as_me:10721: \$? = $ac_status" >&5
10722   (exit "$ac_status"); }; }; then
10723   cf_cv_gnu_source=no
10724 else
10725   echo "$as_me: failed program was:" >&5
10726 cat "conftest.$ac_ext" >&5
10727 cf_save="$CPPFLAGS"
10728
10729 cf_fix_cppflags=no
10730 cf_new_cflags=
10731 cf_new_cppflags=
10732 cf_new_extra_cppflags=
10733
10734 for cf_add_cflags in -D_GNU_SOURCE
10735 do
10736 case "$cf_fix_cppflags" in
10737 (no)
10738         case "$cf_add_cflags" in
10739         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10740                 case "$cf_add_cflags" in
10741                 (-D*)
10742                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10743
10744                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10745                                 && test -z "${cf_tst_cflags}" \
10746                                 && cf_fix_cppflags=yes
10747
10748                         if test "$cf_fix_cppflags" = yes ; then
10749
10750         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10751         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10752
10753                                 continue
10754                         elif test "${cf_tst_cflags}" = "\"'" ; then
10755
10756         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10757         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10758
10759                                 continue
10760                         fi
10761                         ;;
10762                 esac
10763                 case "$CPPFLAGS" in
10764                 (*$cf_add_cflags)
10765                         ;;
10766                 (*)
10767                         case "$cf_add_cflags" in
10768                         (-D*)
10769                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10770
10771 CPPFLAGS=`echo "$CPPFLAGS" | \
10772         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10773                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10774
10775                                 ;;
10776                         esac
10777
10778         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10779         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10780
10781                         ;;
10782                 esac
10783                 ;;
10784         (*)
10785
10786         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10787         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10788
10789                 ;;
10790         esac
10791         ;;
10792 (yes)
10793
10794         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10795         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10796
10797         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10798
10799         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10800                 && test -z "${cf_tst_cflags}" \
10801                 && cf_fix_cppflags=no
10802         ;;
10803 esac
10804 done
10805
10806 if test -n "$cf_new_cflags" ; then
10807
10808         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10809         CFLAGS="${CFLAGS}$cf_new_cflags"
10810
10811 fi
10812
10813 if test -n "$cf_new_cppflags" ; then
10814
10815         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10816         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10817
10818 fi
10819
10820 if test -n "$cf_new_extra_cppflags" ; then
10821
10822         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10823         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10824
10825 fi
10826
10827                          cat >"conftest.$ac_ext" <<_ACEOF
10828 #line 10828 "configure"
10829 #include "confdefs.h"
10830 #include <sys/types.h>
10831 int
10832 main (void)
10833 {
10834
10835                                 #ifdef _XOPEN_SOURCE
10836                                 #error  expected _XOPEN_SOURCE to be undefined
10837                                 #endif
10838   ;
10839   return 0;
10840 }
10841 _ACEOF
10842 rm -f "conftest.$ac_objext"
10843 if { (eval echo "$as_me:10843: \"$ac_compile\"") >&5
10844   (eval $ac_compile) 2>&5
10845   ac_status=$?
10846   echo "$as_me:10846: \$? = $ac_status" >&5
10847   (exit "$ac_status"); } &&
10848          { ac_try='test -s "conftest.$ac_objext"'
10849   { (eval echo "$as_me:10849: \"$ac_try\"") >&5
10850   (eval $ac_try) 2>&5
10851   ac_status=$?
10852   echo "$as_me:10852: \$? = $ac_status" >&5
10853   (exit "$ac_status"); }; }; then
10854   cf_cv_gnu_source=no
10855 else
10856   echo "$as_me: failed program was:" >&5
10857 cat "conftest.$ac_ext" >&5
10858 cf_cv_gnu_source=yes
10859 fi
10860 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10861                         CPPFLAGS="$cf_save"
10862
10863 fi
10864 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10865
10866 fi
10867 echo "$as_me:10867: result: $cf_cv_gnu_source" >&5
10868 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10869
10870                 if test "$cf_cv_gnu_source" = yes
10871                 then
10872                 echo "$as_me:10872: checking if we should also define _DEFAULT_SOURCE" >&5
10873 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10874 if test "${cf_cv_default_source+set}" = set; then
10875   echo $ECHO_N "(cached) $ECHO_C" >&6
10876 else
10877
10878         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10879         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10880
10881                         cat >"conftest.$ac_ext" <<_ACEOF
10882 #line 10882 "configure"
10883 #include "confdefs.h"
10884 #include <sys/types.h>
10885 int
10886 main (void)
10887 {
10888
10889                                 #ifdef _DEFAULT_SOURCE
10890                                 #error  expected _DEFAULT_SOURCE to be undefined
10891                                 #endif
10892   ;
10893   return 0;
10894 }
10895 _ACEOF
10896 rm -f "conftest.$ac_objext"
10897 if { (eval echo "$as_me:10897: \"$ac_compile\"") >&5
10898   (eval $ac_compile) 2>&5
10899   ac_status=$?
10900   echo "$as_me:10900: \$? = $ac_status" >&5
10901   (exit "$ac_status"); } &&
10902          { ac_try='test -s "conftest.$ac_objext"'
10903   { (eval echo "$as_me:10903: \"$ac_try\"") >&5
10904   (eval $ac_try) 2>&5
10905   ac_status=$?
10906   echo "$as_me:10906: \$? = $ac_status" >&5
10907   (exit "$ac_status"); }; }; then
10908   cf_cv_default_source=no
10909 else
10910   echo "$as_me: failed program was:" >&5
10911 cat "conftest.$ac_ext" >&5
10912 cf_cv_default_source=yes
10913 fi
10914 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10915
10916 fi
10917 echo "$as_me:10917: result: $cf_cv_default_source" >&5
10918 echo "${ECHO_T}$cf_cv_default_source" >&6
10919                         if test "$cf_cv_default_source" = yes
10920                         then
10921
10922         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10923         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10924
10925                         fi
10926                 fi
10927         fi
10928
10929 fi
10930
10931         ;;
10932 (minix*)
10933         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10934         ;;
10935 (mirbsd*)
10936         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10937         cf_XOPEN_SOURCE=
10938
10939 if test "$cf_cv_posix_visible" = no; then
10940
10941 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10942
10943 cf_save_CFLAGS="$CFLAGS"
10944 cf_save_CPPFLAGS="$CPPFLAGS"
10945
10946 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10947         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10948                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10949
10950 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10951         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10952                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10953
10954 echo "$as_me:10954: checking if we should define _POSIX_C_SOURCE" >&5
10955 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10956 if test "${cf_cv_posix_c_source+set}" = set; then
10957   echo $ECHO_N "(cached) $ECHO_C" >&6
10958 else
10959
10960 echo "${as_me:-configure}:10960: testing if the symbol is already defined go no further ..." 1>&5
10961
10962         cat >"conftest.$ac_ext" <<_ACEOF
10963 #line 10963 "configure"
10964 #include "confdefs.h"
10965 #include <sys/types.h>
10966 int
10967 main (void)
10968 {
10969
10970 #ifndef _POSIX_C_SOURCE
10971 #error _POSIX_C_SOURCE is not defined
10972 #endif
10973   ;
10974   return 0;
10975 }
10976 _ACEOF
10977 rm -f "conftest.$ac_objext"
10978 if { (eval echo "$as_me:10978: \"$ac_compile\"") >&5
10979   (eval $ac_compile) 2>&5
10980   ac_status=$?
10981   echo "$as_me:10981: \$? = $ac_status" >&5
10982   (exit "$ac_status"); } &&
10983          { ac_try='test -s "conftest.$ac_objext"'
10984   { (eval echo "$as_me:10984: \"$ac_try\"") >&5
10985   (eval $ac_try) 2>&5
10986   ac_status=$?
10987   echo "$as_me:10987: \$? = $ac_status" >&5
10988   (exit "$ac_status"); }; }; then
10989   cf_cv_posix_c_source=no
10990 else
10991   echo "$as_me: failed program was:" >&5
10992 cat "conftest.$ac_ext" >&5
10993 cf_want_posix_source=no
10994          case .$cf_POSIX_C_SOURCE in
10995          (.[12]??*)
10996                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10997                 ;;
10998          (.2)
10999                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11000                 cf_want_posix_source=yes
11001                 ;;
11002          (.*)
11003                 cf_want_posix_source=yes
11004                 ;;
11005          esac
11006          if test "$cf_want_posix_source" = yes ; then
11007                 cat >"conftest.$ac_ext" <<_ACEOF
11008 #line 11008 "configure"
11009 #include "confdefs.h"
11010 #include <sys/types.h>
11011 int
11012 main (void)
11013 {
11014
11015 #ifdef _POSIX_SOURCE
11016 #error _POSIX_SOURCE is defined
11017 #endif
11018   ;
11019   return 0;
11020 }
11021 _ACEOF
11022 rm -f "conftest.$ac_objext"
11023 if { (eval echo "$as_me:11023: \"$ac_compile\"") >&5
11024   (eval $ac_compile) 2>&5
11025   ac_status=$?
11026   echo "$as_me:11026: \$? = $ac_status" >&5
11027   (exit "$ac_status"); } &&
11028          { ac_try='test -s "conftest.$ac_objext"'
11029   { (eval echo "$as_me:11029: \"$ac_try\"") >&5
11030   (eval $ac_try) 2>&5
11031   ac_status=$?
11032   echo "$as_me:11032: \$? = $ac_status" >&5
11033   (exit "$ac_status"); }; }; then
11034   :
11035 else
11036   echo "$as_me: failed program was:" >&5
11037 cat "conftest.$ac_ext" >&5
11038 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11039 fi
11040 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11041          fi
11042
11043 echo "${as_me:-configure}:11043: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11044
11045          CFLAGS="$cf_trim_CFLAGS"
11046          CPPFLAGS="$cf_trim_CPPFLAGS"
11047
11048         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11049         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11050
11051 echo "${as_me:-configure}:11051: testing if the second compile does not leave our definition intact error ..." 1>&5
11052
11053          cat >"conftest.$ac_ext" <<_ACEOF
11054 #line 11054 "configure"
11055 #include "confdefs.h"
11056 #include <sys/types.h>
11057 int
11058 main (void)
11059 {
11060
11061 #ifndef _POSIX_C_SOURCE
11062 #error _POSIX_C_SOURCE is not defined
11063 #endif
11064   ;
11065   return 0;
11066 }
11067 _ACEOF
11068 rm -f "conftest.$ac_objext"
11069 if { (eval echo "$as_me:11069: \"$ac_compile\"") >&5
11070   (eval $ac_compile) 2>&5
11071   ac_status=$?
11072   echo "$as_me:11072: \$? = $ac_status" >&5
11073   (exit "$ac_status"); } &&
11074          { ac_try='test -s "conftest.$ac_objext"'
11075   { (eval echo "$as_me:11075: \"$ac_try\"") >&5
11076   (eval $ac_try) 2>&5
11077   ac_status=$?
11078   echo "$as_me:11078: \$? = $ac_status" >&5
11079   (exit "$ac_status"); }; }; then
11080   :
11081 else
11082   echo "$as_me: failed program was:" >&5
11083 cat "conftest.$ac_ext" >&5
11084 cf_cv_posix_c_source=no
11085 fi
11086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11087          CFLAGS="$cf_save_CFLAGS"
11088          CPPFLAGS="$cf_save_CPPFLAGS"
11089
11090 fi
11091 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11092
11093 fi
11094 echo "$as_me:11094: result: $cf_cv_posix_c_source" >&5
11095 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11096
11097 if test "$cf_cv_posix_c_source" != no ; then
11098         CFLAGS="$cf_trim_CFLAGS"
11099         CPPFLAGS="$cf_trim_CPPFLAGS"
11100
11101 cf_fix_cppflags=no
11102 cf_new_cflags=
11103 cf_new_cppflags=
11104 cf_new_extra_cppflags=
11105
11106 for cf_add_cflags in $cf_cv_posix_c_source
11107 do
11108 case "$cf_fix_cppflags" in
11109 (no)
11110         case "$cf_add_cflags" in
11111         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11112                 case "$cf_add_cflags" in
11113                 (-D*)
11114                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11115
11116                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11117                                 && test -z "${cf_tst_cflags}" \
11118                                 && cf_fix_cppflags=yes
11119
11120                         if test "$cf_fix_cppflags" = yes ; then
11121
11122         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11123         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11124
11125                                 continue
11126                         elif test "${cf_tst_cflags}" = "\"'" ; then
11127
11128         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11129         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11130
11131                                 continue
11132                         fi
11133                         ;;
11134                 esac
11135                 case "$CPPFLAGS" in
11136                 (*$cf_add_cflags)
11137                         ;;
11138                 (*)
11139                         case "$cf_add_cflags" in
11140                         (-D*)
11141                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11142
11143 CPPFLAGS=`echo "$CPPFLAGS" | \
11144         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11145                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11146
11147                                 ;;
11148                         esac
11149
11150         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11151         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11152
11153                         ;;
11154                 esac
11155                 ;;
11156         (*)
11157
11158         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11159         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11160
11161                 ;;
11162         esac
11163         ;;
11164 (yes)
11165
11166         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11167         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11168
11169         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11170
11171         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11172                 && test -z "${cf_tst_cflags}" \
11173                 && cf_fix_cppflags=no
11174         ;;
11175 esac
11176 done
11177
11178 if test -n "$cf_new_cflags" ; then
11179
11180         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11181         CFLAGS="${CFLAGS}$cf_new_cflags"
11182
11183 fi
11184
11185 if test -n "$cf_new_cppflags" ; then
11186
11187         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11188         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11189
11190 fi
11191
11192 if test -n "$cf_new_extra_cppflags" ; then
11193
11194         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11195         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11196
11197 fi
11198
11199 fi
11200
11201 fi # cf_cv_posix_visible
11202
11203         ;;
11204 (netbsd*)
11205         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11206         ;;
11207 (openbsd[6-9]*)
11208         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
11209         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
11210         # Abusing the conformance level is a workaround.
11211         { echo "$as_me:11211: WARNING: this system does not provide usable locale support" >&5
11212 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
11213         cf_xopen_source="-D_BSD_SOURCE"
11214         cf_XOPEN_SOURCE=700
11215         ;;
11216 (openbsd[4-5]*)
11217         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11218         cf_xopen_source="-D_BSD_SOURCE"
11219         cf_XOPEN_SOURCE=600
11220         ;;
11221 (openbsd*)
11222         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11223         ;;
11224 (osf[45]*)
11225         cf_xopen_source="-D_OSF_SOURCE"
11226         ;;
11227 (nto-qnx*)
11228         cf_xopen_source="-D_QNX_SOURCE"
11229         ;;
11230 (sco*)
11231         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11232         ;;
11233 (solaris2.*)
11234         cf_xopen_source="-D__EXTENSIONS__"
11235         cf_cv_xopen_source=broken
11236         ;;
11237 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11238         cf_XOPEN_SOURCE=
11239         cf_POSIX_C_SOURCE=
11240         ;;
11241 (*)
11242
11243 echo "$as_me:11243: checking if we should define _XOPEN_SOURCE" >&5
11244 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11245 if test "${cf_cv_xopen_source+set}" = set; then
11246   echo $ECHO_N "(cached) $ECHO_C" >&6
11247 else
11248
11249         cat >"conftest.$ac_ext" <<_ACEOF
11250 #line 11250 "configure"
11251 #include "confdefs.h"
11252
11253 $ac_includes_default
11254
11255 int
11256 main (void)
11257 {
11258
11259 #ifndef _XOPEN_SOURCE
11260 #error _XOPEN_SOURCE is not defined
11261 #endif
11262
11263   ;
11264   return 0;
11265 }
11266 _ACEOF
11267 rm -f "conftest.$ac_objext"
11268 if { (eval echo "$as_me:11268: \"$ac_compile\"") >&5
11269   (eval $ac_compile) 2>&5
11270   ac_status=$?
11271   echo "$as_me:11271: \$? = $ac_status" >&5
11272   (exit "$ac_status"); } &&
11273          { ac_try='test -s "conftest.$ac_objext"'
11274   { (eval echo "$as_me:11274: \"$ac_try\"") >&5
11275   (eval $ac_try) 2>&5
11276   ac_status=$?
11277   echo "$as_me:11277: \$? = $ac_status" >&5
11278   (exit "$ac_status"); }; }; then
11279   cf_cv_xopen_source=no
11280 else
11281   echo "$as_me: failed program was:" >&5
11282 cat "conftest.$ac_ext" >&5
11283 cf_save="$CPPFLAGS"
11284
11285         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11286         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11287
11288          cat >"conftest.$ac_ext" <<_ACEOF
11289 #line 11289 "configure"
11290 #include "confdefs.h"
11291
11292 $ac_includes_default
11293
11294 int
11295 main (void)
11296 {
11297
11298 #ifndef _XOPEN_SOURCE
11299 #error _XOPEN_SOURCE is not defined
11300 #endif
11301
11302   ;
11303   return 0;
11304 }
11305 _ACEOF
11306 rm -f "conftest.$ac_objext"
11307 if { (eval echo "$as_me:11307: \"$ac_compile\"") >&5
11308   (eval $ac_compile) 2>&5
11309   ac_status=$?
11310   echo "$as_me:11310: \$? = $ac_status" >&5
11311   (exit "$ac_status"); } &&
11312          { ac_try='test -s "conftest.$ac_objext"'
11313   { (eval echo "$as_me:11313: \"$ac_try\"") >&5
11314   (eval $ac_try) 2>&5
11315   ac_status=$?
11316   echo "$as_me:11316: \$? = $ac_status" >&5
11317   (exit "$ac_status"); }; }; then
11318   cf_cv_xopen_source=no
11319 else
11320   echo "$as_me: failed program was:" >&5
11321 cat "conftest.$ac_ext" >&5
11322 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11323 fi
11324 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11325                 CPPFLAGS="$cf_save"
11326
11327 fi
11328 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11329
11330 fi
11331 echo "$as_me:11331: result: $cf_cv_xopen_source" >&5
11332 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11333
11334 if test "$cf_cv_xopen_source" != no ; then
11335
11336 CFLAGS=`echo "$CFLAGS" | \
11337         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11338                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11339
11340 CPPFLAGS=`echo "$CPPFLAGS" | \
11341         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11342                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11343
11344         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11345
11346 for cf_add_cflags in $cf_temp_xopen_source
11347 do
11348         case "x$cf_add_cflags" in
11349         (x-[DU]*)
11350
11351 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11352 while true
11353 do
11354         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11355         test "$CFLAGS" != "$cf_old_cflag" || break
11356
11357         CFLAGS="$cf_old_cflag"
11358 done
11359
11360 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11361 while true
11362 do
11363         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11364         test "$CPPFLAGS" != "$cf_old_cflag" || break
11365
11366         CPPFLAGS="$cf_old_cflag"
11367 done
11368
11369                 ;;
11370         esac
11371
11372 cf_fix_cppflags=no
11373 cf_new_cflags=
11374 cf_new_cppflags=
11375 cf_new_extra_cppflags=
11376
11377 for cf_add_cflags in $cf_add_cflags
11378 do
11379 case "$cf_fix_cppflags" in
11380 (no)
11381         case "$cf_add_cflags" in
11382         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11383                 case "$cf_add_cflags" in
11384                 (-D*)
11385                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11386
11387                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11388                                 && test -z "${cf_tst_cflags}" \
11389                                 && cf_fix_cppflags=yes
11390
11391                         if test "$cf_fix_cppflags" = yes ; then
11392
11393         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11394         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11395
11396                                 continue
11397                         elif test "${cf_tst_cflags}" = "\"'" ; then
11398
11399         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11400         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11401
11402                                 continue
11403                         fi
11404                         ;;
11405                 esac
11406                 case "$CPPFLAGS" in
11407                 (*$cf_add_cflags)
11408                         ;;
11409                 (*)
11410                         case "$cf_add_cflags" in
11411                         (-D*)
11412                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11413
11414 CPPFLAGS=`echo "$CPPFLAGS" | \
11415         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11416                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11417
11418                                 ;;
11419                         esac
11420
11421         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11422         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11423
11424                         ;;
11425                 esac
11426                 ;;
11427         (*)
11428
11429         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11430         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11431
11432                 ;;
11433         esac
11434         ;;
11435 (yes)
11436
11437         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11438         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11439
11440         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11441
11442         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11443                 && test -z "${cf_tst_cflags}" \
11444                 && cf_fix_cppflags=no
11445         ;;
11446 esac
11447 done
11448
11449 if test -n "$cf_new_cflags" ; then
11450
11451         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11452         CFLAGS="${CFLAGS}$cf_new_cflags"
11453
11454 fi
11455
11456 if test -n "$cf_new_cppflags" ; then
11457
11458         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11459         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11460
11461 fi
11462
11463 if test -n "$cf_new_extra_cppflags" ; then
11464
11465         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11466         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11467
11468 fi
11469
11470 done
11471
11472 fi
11473
11474         cf_save_xopen_cppflags="$CPPFLAGS"
11475
11476 if test "$cf_cv_posix_visible" = no; then
11477
11478 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11479
11480 cf_save_CFLAGS="$CFLAGS"
11481 cf_save_CPPFLAGS="$CPPFLAGS"
11482
11483 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11484         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11485                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11486
11487 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11488         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11489                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11490
11491 echo "$as_me:11491: checking if we should define _POSIX_C_SOURCE" >&5
11492 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11493 if test "${cf_cv_posix_c_source+set}" = set; then
11494   echo $ECHO_N "(cached) $ECHO_C" >&6
11495 else
11496
11497 echo "${as_me:-configure}:11497: testing if the symbol is already defined go no further ..." 1>&5
11498
11499         cat >"conftest.$ac_ext" <<_ACEOF
11500 #line 11500 "configure"
11501 #include "confdefs.h"
11502 #include <sys/types.h>
11503 int
11504 main (void)
11505 {
11506
11507 #ifndef _POSIX_C_SOURCE
11508 #error _POSIX_C_SOURCE is not defined
11509 #endif
11510   ;
11511   return 0;
11512 }
11513 _ACEOF
11514 rm -f "conftest.$ac_objext"
11515 if { (eval echo "$as_me:11515: \"$ac_compile\"") >&5
11516   (eval $ac_compile) 2>&5
11517   ac_status=$?
11518   echo "$as_me:11518: \$? = $ac_status" >&5
11519   (exit "$ac_status"); } &&
11520          { ac_try='test -s "conftest.$ac_objext"'
11521   { (eval echo "$as_me:11521: \"$ac_try\"") >&5
11522   (eval $ac_try) 2>&5
11523   ac_status=$?
11524   echo "$as_me:11524: \$? = $ac_status" >&5
11525   (exit "$ac_status"); }; }; then
11526   cf_cv_posix_c_source=no
11527 else
11528   echo "$as_me: failed program was:" >&5
11529 cat "conftest.$ac_ext" >&5
11530 cf_want_posix_source=no
11531          case .$cf_POSIX_C_SOURCE in
11532          (.[12]??*)
11533                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11534                 ;;
11535          (.2)
11536                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11537                 cf_want_posix_source=yes
11538                 ;;
11539          (.*)
11540                 cf_want_posix_source=yes
11541                 ;;
11542          esac
11543          if test "$cf_want_posix_source" = yes ; then
11544                 cat >"conftest.$ac_ext" <<_ACEOF
11545 #line 11545 "configure"
11546 #include "confdefs.h"
11547 #include <sys/types.h>
11548 int
11549 main (void)
11550 {
11551
11552 #ifdef _POSIX_SOURCE
11553 #error _POSIX_SOURCE is defined
11554 #endif
11555   ;
11556   return 0;
11557 }
11558 _ACEOF
11559 rm -f "conftest.$ac_objext"
11560 if { (eval echo "$as_me:11560: \"$ac_compile\"") >&5
11561   (eval $ac_compile) 2>&5
11562   ac_status=$?
11563   echo "$as_me:11563: \$? = $ac_status" >&5
11564   (exit "$ac_status"); } &&
11565          { ac_try='test -s "conftest.$ac_objext"'
11566   { (eval echo "$as_me:11566: \"$ac_try\"") >&5
11567   (eval $ac_try) 2>&5
11568   ac_status=$?
11569   echo "$as_me:11569: \$? = $ac_status" >&5
11570   (exit "$ac_status"); }; }; then
11571   :
11572 else
11573   echo "$as_me: failed program was:" >&5
11574 cat "conftest.$ac_ext" >&5
11575 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11576 fi
11577 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11578          fi
11579
11580 echo "${as_me:-configure}:11580: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11581
11582          CFLAGS="$cf_trim_CFLAGS"
11583          CPPFLAGS="$cf_trim_CPPFLAGS"
11584
11585         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11586         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11587
11588 echo "${as_me:-configure}:11588: testing if the second compile does not leave our definition intact error ..." 1>&5
11589
11590          cat >"conftest.$ac_ext" <<_ACEOF
11591 #line 11591 "configure"
11592 #include "confdefs.h"
11593 #include <sys/types.h>
11594 int
11595 main (void)
11596 {
11597
11598 #ifndef _POSIX_C_SOURCE
11599 #error _POSIX_C_SOURCE is not defined
11600 #endif
11601   ;
11602   return 0;
11603 }
11604 _ACEOF
11605 rm -f "conftest.$ac_objext"
11606 if { (eval echo "$as_me:11606: \"$ac_compile\"") >&5
11607   (eval $ac_compile) 2>&5
11608   ac_status=$?
11609   echo "$as_me:11609: \$? = $ac_status" >&5
11610   (exit "$ac_status"); } &&
11611          { ac_try='test -s "conftest.$ac_objext"'
11612   { (eval echo "$as_me:11612: \"$ac_try\"") >&5
11613   (eval $ac_try) 2>&5
11614   ac_status=$?
11615   echo "$as_me:11615: \$? = $ac_status" >&5
11616   (exit "$ac_status"); }; }; then
11617   :
11618 else
11619   echo "$as_me: failed program was:" >&5
11620 cat "conftest.$ac_ext" >&5
11621 cf_cv_posix_c_source=no
11622 fi
11623 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11624          CFLAGS="$cf_save_CFLAGS"
11625          CPPFLAGS="$cf_save_CPPFLAGS"
11626
11627 fi
11628 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11629
11630 fi
11631 echo "$as_me:11631: result: $cf_cv_posix_c_source" >&5
11632 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11633
11634 if test "$cf_cv_posix_c_source" != no ; then
11635         CFLAGS="$cf_trim_CFLAGS"
11636         CPPFLAGS="$cf_trim_CPPFLAGS"
11637
11638 cf_fix_cppflags=no
11639 cf_new_cflags=
11640 cf_new_cppflags=
11641 cf_new_extra_cppflags=
11642
11643 for cf_add_cflags in $cf_cv_posix_c_source
11644 do
11645 case "$cf_fix_cppflags" in
11646 (no)
11647         case "$cf_add_cflags" in
11648         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11649                 case "$cf_add_cflags" in
11650                 (-D*)
11651                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11652
11653                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11654                                 && test -z "${cf_tst_cflags}" \
11655                                 && cf_fix_cppflags=yes
11656
11657                         if test "$cf_fix_cppflags" = yes ; then
11658
11659         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11660         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11661
11662                                 continue
11663                         elif test "${cf_tst_cflags}" = "\"'" ; then
11664
11665         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11666         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11667
11668                                 continue
11669                         fi
11670                         ;;
11671                 esac
11672                 case "$CPPFLAGS" in
11673                 (*$cf_add_cflags)
11674                         ;;
11675                 (*)
11676                         case "$cf_add_cflags" in
11677                         (-D*)
11678                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11679
11680 CPPFLAGS=`echo "$CPPFLAGS" | \
11681         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11682                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11683
11684                                 ;;
11685                         esac
11686
11687         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11688         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11689
11690                         ;;
11691                 esac
11692                 ;;
11693         (*)
11694
11695         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11696         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11697
11698                 ;;
11699         esac
11700         ;;
11701 (yes)
11702
11703         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11704         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11705
11706         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11707
11708         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11709                 && test -z "${cf_tst_cflags}" \
11710                 && cf_fix_cppflags=no
11711         ;;
11712 esac
11713 done
11714
11715 if test -n "$cf_new_cflags" ; then
11716
11717         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11718         CFLAGS="${CFLAGS}$cf_new_cflags"
11719
11720 fi
11721
11722 if test -n "$cf_new_cppflags" ; then
11723
11724         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11725         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11726
11727 fi
11728
11729 if test -n "$cf_new_extra_cppflags" ; then
11730
11731         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11732         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11733
11734 fi
11735
11736 fi
11737
11738 fi # cf_cv_posix_visible
11739
11740         # Some of these niche implementations use copy/paste, double-check...
11741         if test "$cf_cv_xopen_source" = no ; then
11742                 test -n "$verbose" && echo "    checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
11743
11744 echo "${as_me:-configure}:11744: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
11745
11746                 cat >"conftest.$ac_ext" <<_ACEOF
11747 #line 11747 "configure"
11748 #include "confdefs.h"
11749
11750 $ac_includes_default
11751
11752 int
11753 main (void)
11754 {
11755
11756 #ifndef _XOPEN_SOURCE
11757 #error _XOPEN_SOURCE is not defined
11758 #endif
11759
11760   ;
11761   return 0;
11762 }
11763 _ACEOF
11764 rm -f "conftest.$ac_objext"
11765 if { (eval echo "$as_me:11765: \"$ac_compile\"") >&5
11766   (eval $ac_compile) 2>&5
11767   ac_status=$?
11768   echo "$as_me:11768: \$? = $ac_status" >&5
11769   (exit "$ac_status"); } &&
11770          { ac_try='test -s "conftest.$ac_objext"'
11771   { (eval echo "$as_me:11771: \"$ac_try\"") >&5
11772   (eval $ac_try) 2>&5
11773   ac_status=$?
11774   echo "$as_me:11774: \$? = $ac_status" >&5
11775   (exit "$ac_status"); }; }; then
11776   :
11777 else
11778   echo "$as_me: failed program was:" >&5
11779 cat "conftest.$ac_ext" >&5
11780
11781                         { echo "$as_me:11781: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
11782 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
11783                         CPPFLAGS="$cf_save_xopen_cppflags"
11784 fi
11785 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11786         fi
11787         ;;
11788 esac
11789
11790 if test -n "$cf_xopen_source" ; then
11791
11792 for cf_add_cflags in $cf_xopen_source
11793 do
11794         case "x$cf_add_cflags" in
11795         (x-[DU]*)
11796
11797 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11798 while true
11799 do
11800         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11801         test "$CFLAGS" != "$cf_old_cflag" || break
11802         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11803
11804 echo "${as_me:-configure}:11804: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11805
11806         CFLAGS="$cf_old_cflag"
11807 done
11808
11809 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11810 while true
11811 do
11812         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11813         test "$CPPFLAGS" != "$cf_old_cflag" || break
11814         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11815
11816 echo "${as_me:-configure}:11816: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11817
11818         CPPFLAGS="$cf_old_cflag"
11819 done
11820
11821                 ;;
11822         esac
11823
11824 cf_fix_cppflags=no
11825 cf_new_cflags=
11826 cf_new_cppflags=
11827 cf_new_extra_cppflags=
11828
11829 for cf_add_cflags in $cf_add_cflags
11830 do
11831 case "$cf_fix_cppflags" in
11832 (no)
11833         case "$cf_add_cflags" in
11834         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11835                 case "$cf_add_cflags" in
11836                 (-D*)
11837                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11838
11839                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11840                                 && test -z "${cf_tst_cflags}" \
11841                                 && cf_fix_cppflags=yes
11842
11843                         if test "$cf_fix_cppflags" = yes ; then
11844
11845         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11846         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11847
11848                                 continue
11849                         elif test "${cf_tst_cflags}" = "\"'" ; then
11850
11851         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11852         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11853
11854                                 continue
11855                         fi
11856                         ;;
11857                 esac
11858                 case "$CPPFLAGS" in
11859                 (*$cf_add_cflags)
11860                         ;;
11861                 (*)
11862                         case "$cf_add_cflags" in
11863                         (-D*)
11864                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11865
11866 CPPFLAGS=`echo "$CPPFLAGS" | \
11867         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11868                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11869
11870                                 ;;
11871                         esac
11872
11873         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11874         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11875
11876                         ;;
11877                 esac
11878                 ;;
11879         (*)
11880
11881         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11882         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11883
11884                 ;;
11885         esac
11886         ;;
11887 (yes)
11888
11889         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11890         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11891
11892         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11893
11894         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11895                 && test -z "${cf_tst_cflags}" \
11896                 && cf_fix_cppflags=no
11897         ;;
11898 esac
11899 done
11900
11901 if test -n "$cf_new_cflags" ; then
11902         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11903
11904 echo "${as_me:-configure}:11904: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11905
11906         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11907         CFLAGS="${CFLAGS}$cf_new_cflags"
11908
11909 fi
11910
11911 if test -n "$cf_new_cppflags" ; then
11912         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11913
11914 echo "${as_me:-configure}:11914: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11915
11916         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11917         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11918
11919 fi
11920
11921 if test -n "$cf_new_extra_cppflags" ; then
11922         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11923
11924 echo "${as_me:-configure}:11924: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11925
11926         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11927         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11928
11929 fi
11930
11931 done
11932
11933 fi
11934
11935 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11936         echo "$as_me:11936: checking if _XOPEN_SOURCE really is set" >&5
11937 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11938         cat >"conftest.$ac_ext" <<_ACEOF
11939 #line 11939 "configure"
11940 #include "confdefs.h"
11941 #include <stdlib.h>
11942 int
11943 main (void)
11944 {
11945
11946 #ifndef _XOPEN_SOURCE
11947 #error _XOPEN_SOURCE is not defined
11948 #endif
11949   ;
11950   return 0;
11951 }
11952 _ACEOF
11953 rm -f "conftest.$ac_objext"
11954 if { (eval echo "$as_me:11954: \"$ac_compile\"") >&5
11955   (eval $ac_compile) 2>&5
11956   ac_status=$?
11957   echo "$as_me:11957: \$? = $ac_status" >&5
11958   (exit "$ac_status"); } &&
11959          { ac_try='test -s "conftest.$ac_objext"'
11960   { (eval echo "$as_me:11960: \"$ac_try\"") >&5
11961   (eval $ac_try) 2>&5
11962   ac_status=$?
11963   echo "$as_me:11963: \$? = $ac_status" >&5
11964   (exit "$ac_status"); }; }; then
11965   cf_XOPEN_SOURCE_set=yes
11966 else
11967   echo "$as_me: failed program was:" >&5
11968 cat "conftest.$ac_ext" >&5
11969 cf_XOPEN_SOURCE_set=no
11970 fi
11971 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11972         echo "$as_me:11972: result: $cf_XOPEN_SOURCE_set" >&5
11973 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11974         if test "$cf_XOPEN_SOURCE_set" = yes
11975         then
11976                 cat >"conftest.$ac_ext" <<_ACEOF
11977 #line 11977 "configure"
11978 #include "confdefs.h"
11979 #include <stdlib.h>
11980 int
11981 main (void)
11982 {
11983
11984 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11985 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11986 #endif
11987   ;
11988   return 0;
11989 }
11990 _ACEOF
11991 rm -f "conftest.$ac_objext"
11992 if { (eval echo "$as_me:11992: \"$ac_compile\"") >&5
11993   (eval $ac_compile) 2>&5
11994   ac_status=$?
11995   echo "$as_me:11995: \$? = $ac_status" >&5
11996   (exit "$ac_status"); } &&
11997          { ac_try='test -s "conftest.$ac_objext"'
11998   { (eval echo "$as_me:11998: \"$ac_try\"") >&5
11999   (eval $ac_try) 2>&5
12000   ac_status=$?
12001   echo "$as_me:12001: \$? = $ac_status" >&5
12002   (exit "$ac_status"); }; }; then
12003   cf_XOPEN_SOURCE_set_ok=yes
12004 else
12005   echo "$as_me: failed program was:" >&5
12006 cat "conftest.$ac_ext" >&5
12007 cf_XOPEN_SOURCE_set_ok=no
12008 fi
12009 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12010                 if test "$cf_XOPEN_SOURCE_set_ok" = no
12011                 then
12012                         { echo "$as_me:12012: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12013 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12014                 fi
12015         else
12016
12017 echo "$as_me:12017: checking if we should define _XOPEN_SOURCE" >&5
12018 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12019 if test "${cf_cv_xopen_source+set}" = set; then
12020   echo $ECHO_N "(cached) $ECHO_C" >&6
12021 else
12022
12023         cat >"conftest.$ac_ext" <<_ACEOF
12024 #line 12024 "configure"
12025 #include "confdefs.h"
12026
12027 $ac_includes_default
12028
12029 int
12030 main (void)
12031 {
12032
12033 #ifndef _XOPEN_SOURCE
12034 #error _XOPEN_SOURCE is not defined
12035 #endif
12036
12037   ;
12038   return 0;
12039 }
12040 _ACEOF
12041 rm -f "conftest.$ac_objext"
12042 if { (eval echo "$as_me:12042: \"$ac_compile\"") >&5
12043   (eval $ac_compile) 2>&5
12044   ac_status=$?
12045   echo "$as_me:12045: \$? = $ac_status" >&5
12046   (exit "$ac_status"); } &&
12047          { ac_try='test -s "conftest.$ac_objext"'
12048   { (eval echo "$as_me:12048: \"$ac_try\"") >&5
12049   (eval $ac_try) 2>&5
12050   ac_status=$?
12051   echo "$as_me:12051: \$? = $ac_status" >&5
12052   (exit "$ac_status"); }; }; then
12053   cf_cv_xopen_source=no
12054 else
12055   echo "$as_me: failed program was:" >&5
12056 cat "conftest.$ac_ext" >&5
12057 cf_save="$CPPFLAGS"
12058
12059         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12060         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12061
12062          cat >"conftest.$ac_ext" <<_ACEOF
12063 #line 12063 "configure"
12064 #include "confdefs.h"
12065
12066 $ac_includes_default
12067
12068 int
12069 main (void)
12070 {
12071
12072 #ifndef _XOPEN_SOURCE
12073 #error _XOPEN_SOURCE is not defined
12074 #endif
12075
12076   ;
12077   return 0;
12078 }
12079 _ACEOF
12080 rm -f "conftest.$ac_objext"
12081 if { (eval echo "$as_me:12081: \"$ac_compile\"") >&5
12082   (eval $ac_compile) 2>&5
12083   ac_status=$?
12084   echo "$as_me:12084: \$? = $ac_status" >&5
12085   (exit "$ac_status"); } &&
12086          { ac_try='test -s "conftest.$ac_objext"'
12087   { (eval echo "$as_me:12087: \"$ac_try\"") >&5
12088   (eval $ac_try) 2>&5
12089   ac_status=$?
12090   echo "$as_me:12090: \$? = $ac_status" >&5
12091   (exit "$ac_status"); }; }; then
12092   cf_cv_xopen_source=no
12093 else
12094   echo "$as_me: failed program was:" >&5
12095 cat "conftest.$ac_ext" >&5
12096 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12097 fi
12098 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12099                 CPPFLAGS="$cf_save"
12100
12101 fi
12102 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12103
12104 fi
12105 echo "$as_me:12105: result: $cf_cv_xopen_source" >&5
12106 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12107
12108 if test "$cf_cv_xopen_source" != no ; then
12109
12110 CFLAGS=`echo "$CFLAGS" | \
12111         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12112                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12113
12114 CPPFLAGS=`echo "$CPPFLAGS" | \
12115         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12116                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12117
12118         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12119
12120 for cf_add_cflags in $cf_temp_xopen_source
12121 do
12122         case "x$cf_add_cflags" in
12123         (x-[DU]*)
12124
12125 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12126 while true
12127 do
12128         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
12129         test "$CFLAGS" != "$cf_old_cflag" || break
12130
12131         CFLAGS="$cf_old_cflag"
12132 done
12133
12134 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12135 while true
12136 do
12137         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
12138         test "$CPPFLAGS" != "$cf_old_cflag" || break
12139
12140         CPPFLAGS="$cf_old_cflag"
12141 done
12142
12143                 ;;
12144         esac
12145
12146 cf_fix_cppflags=no
12147 cf_new_cflags=
12148 cf_new_cppflags=
12149 cf_new_extra_cppflags=
12150
12151 for cf_add_cflags in $cf_add_cflags
12152 do
12153 case "$cf_fix_cppflags" in
12154 (no)
12155         case "$cf_add_cflags" in
12156         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12157                 case "$cf_add_cflags" in
12158                 (-D*)
12159                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12160
12161                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12162                                 && test -z "${cf_tst_cflags}" \
12163                                 && cf_fix_cppflags=yes
12164
12165                         if test "$cf_fix_cppflags" = yes ; then
12166
12167         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12168         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12169
12170                                 continue
12171                         elif test "${cf_tst_cflags}" = "\"'" ; then
12172
12173         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12174         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12175
12176                                 continue
12177                         fi
12178                         ;;
12179                 esac
12180                 case "$CPPFLAGS" in
12181                 (*$cf_add_cflags)
12182                         ;;
12183                 (*)
12184                         case "$cf_add_cflags" in
12185                         (-D*)
12186                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12187
12188 CPPFLAGS=`echo "$CPPFLAGS" | \
12189         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12190                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12191
12192                                 ;;
12193                         esac
12194
12195         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12196         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12197
12198                         ;;
12199                 esac
12200                 ;;
12201         (*)
12202
12203         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12204         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12205
12206                 ;;
12207         esac
12208         ;;
12209 (yes)
12210
12211         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12212         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12213
12214         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12215
12216         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12217                 && test -z "${cf_tst_cflags}" \
12218                 && cf_fix_cppflags=no
12219         ;;
12220 esac
12221 done
12222
12223 if test -n "$cf_new_cflags" ; then
12224
12225         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12226         CFLAGS="${CFLAGS}$cf_new_cflags"
12227
12228 fi
12229
12230 if test -n "$cf_new_cppflags" ; then
12231
12232         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12233         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12234
12235 fi
12236
12237 if test -n "$cf_new_extra_cppflags" ; then
12238
12239         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12240         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12241
12242 fi
12243
12244 done
12245
12246 fi
12247
12248         fi
12249 fi
12250 fi # cf_cv_posix_visible
12251
12252 CPPFLAGS_after_XOPEN="$CPPFLAGS"
12253
12254 # Work around breakage on OS X
12255
12256 echo "$as_me:12256: checking if SIGWINCH is defined" >&5
12257 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12258 if test "${cf_cv_define_sigwinch+set}" = set; then
12259   echo $ECHO_N "(cached) $ECHO_C" >&6
12260 else
12261
12262         cat >"conftest.$ac_ext" <<_ACEOF
12263 #line 12263 "configure"
12264 #include "confdefs.h"
12265
12266 #include <sys/types.h>
12267 #include <sys/signal.h>
12268
12269 int
12270 main (void)
12271 {
12272 int x = SIGWINCH; (void)x
12273   ;
12274   return 0;
12275 }
12276 _ACEOF
12277 rm -f "conftest.$ac_objext"
12278 if { (eval echo "$as_me:12278: \"$ac_compile\"") >&5
12279   (eval $ac_compile) 2>&5
12280   ac_status=$?
12281   echo "$as_me:12281: \$? = $ac_status" >&5
12282   (exit "$ac_status"); } &&
12283          { ac_try='test -s "conftest.$ac_objext"'
12284   { (eval echo "$as_me:12284: \"$ac_try\"") >&5
12285   (eval $ac_try) 2>&5
12286   ac_status=$?
12287   echo "$as_me:12287: \$? = $ac_status" >&5
12288   (exit "$ac_status"); }; }; then
12289   cf_cv_define_sigwinch=yes
12290 else
12291   echo "$as_me: failed program was:" >&5
12292 cat "conftest.$ac_ext" >&5
12293 cat >"conftest.$ac_ext" <<_ACEOF
12294 #line 12294 "configure"
12295 #include "confdefs.h"
12296
12297 #undef _XOPEN_SOURCE
12298 #undef _POSIX_SOURCE
12299 #undef _POSIX_C_SOURCE
12300 #include <sys/types.h>
12301 #include <sys/signal.h>
12302
12303 int
12304 main (void)
12305 {
12306 int x = SIGWINCH; (void)x
12307   ;
12308   return 0;
12309 }
12310 _ACEOF
12311 rm -f "conftest.$ac_objext"
12312 if { (eval echo "$as_me:12312: \"$ac_compile\"") >&5
12313   (eval $ac_compile) 2>&5
12314   ac_status=$?
12315   echo "$as_me:12315: \$? = $ac_status" >&5
12316   (exit "$ac_status"); } &&
12317          { ac_try='test -s "conftest.$ac_objext"'
12318   { (eval echo "$as_me:12318: \"$ac_try\"") >&5
12319   (eval $ac_try) 2>&5
12320   ac_status=$?
12321   echo "$as_me:12321: \$? = $ac_status" >&5
12322   (exit "$ac_status"); }; }; then
12323   cf_cv_define_sigwinch=maybe
12324 else
12325   echo "$as_me: failed program was:" >&5
12326 cat "conftest.$ac_ext" >&5
12327 cf_cv_define_sigwinch=no
12328 fi
12329 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12330
12331 fi
12332 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12333
12334 fi
12335 echo "$as_me:12335: result: $cf_cv_define_sigwinch" >&5
12336 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12337
12338 if test "$cf_cv_define_sigwinch" = maybe ; then
12339 echo "$as_me:12339: checking for actual SIGWINCH definition" >&5
12340 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12341 if test "${cf_cv_fixup_sigwinch+set}" = set; then
12342   echo $ECHO_N "(cached) $ECHO_C" >&6
12343 else
12344
12345 cf_cv_fixup_sigwinch=unknown
12346 cf_sigwinch=32
12347 while test "$cf_sigwinch" != 1
12348 do
12349         cat >"conftest.$ac_ext" <<_ACEOF
12350 #line 12350 "configure"
12351 #include "confdefs.h"
12352
12353 #undef _XOPEN_SOURCE
12354 #undef _POSIX_SOURCE
12355 #undef _POSIX_C_SOURCE
12356 #include <sys/types.h>
12357 #include <sys/signal.h>
12358
12359 int
12360 main (void)
12361 {
12362
12363 #if SIGWINCH != $cf_sigwinch
12364 #error SIGWINCH is not $cf_sigwinch
12365 #endif
12366 int x = SIGWINCH; (void)x
12367   ;
12368   return 0;
12369 }
12370 _ACEOF
12371 rm -f "conftest.$ac_objext"
12372 if { (eval echo "$as_me:12372: \"$ac_compile\"") >&5
12373   (eval $ac_compile) 2>&5
12374   ac_status=$?
12375   echo "$as_me:12375: \$? = $ac_status" >&5
12376   (exit "$ac_status"); } &&
12377          { ac_try='test -s "conftest.$ac_objext"'
12378   { (eval echo "$as_me:12378: \"$ac_try\"") >&5
12379   (eval $ac_try) 2>&5
12380   ac_status=$?
12381   echo "$as_me:12381: \$? = $ac_status" >&5
12382   (exit "$ac_status"); }; }; then
12383   cf_cv_fixup_sigwinch=$cf_sigwinch
12384          break
12385 else
12386   echo "$as_me: failed program was:" >&5
12387 cat "conftest.$ac_ext" >&5
12388 fi
12389 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12390
12391 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
12392 done
12393
12394 fi
12395 echo "$as_me:12395: result: $cf_cv_fixup_sigwinch" >&5
12396 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12397
12398         if test "$cf_cv_fixup_sigwinch" != unknown ; then
12399                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12400         fi
12401 fi
12402
12403 # Checks for CODESET support.
12404
12405 echo "$as_me:12405: checking for nl_langinfo and CODESET" >&5
12406 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
12407 if test "${am_cv_langinfo_codeset+set}" = set; then
12408   echo $ECHO_N "(cached) $ECHO_C" >&6
12409 else
12410   cat >"conftest.$ac_ext" <<_ACEOF
12411 #line 12411 "configure"
12412 #include "confdefs.h"
12413
12414 $ac_includes_default
12415 #include <langinfo.h>
12416 int
12417 main (void)
12418 {
12419 char* cs = nl_langinfo(CODESET); (void)cs
12420   ;
12421   return 0;
12422 }
12423 _ACEOF
12424 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12425 if { (eval echo "$as_me:12425: \"$ac_link\"") >&5
12426   (eval $ac_link) 2>&5
12427   ac_status=$?
12428   echo "$as_me:12428: \$? = $ac_status" >&5
12429   (exit "$ac_status"); } &&
12430          { ac_try='test -s "conftest$ac_exeext"'
12431   { (eval echo "$as_me:12431: \"$ac_try\"") >&5
12432   (eval $ac_try) 2>&5
12433   ac_status=$?
12434   echo "$as_me:12434: \$? = $ac_status" >&5
12435   (exit "$ac_status"); }; }; then
12436   am_cv_langinfo_codeset=yes
12437 else
12438   echo "$as_me: failed program was:" >&5
12439 cat "conftest.$ac_ext" >&5
12440 am_cv_langinfo_codeset=no
12441 fi
12442 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12443
12444 fi
12445 echo "$as_me:12445: result: $am_cv_langinfo_codeset" >&5
12446 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12447         if test "$am_cv_langinfo_codeset" = yes; then
12448
12449 cat >>confdefs.h <<\EOF
12450 #define HAVE_LANGINFO_CODESET 1
12451 EOF
12452
12453         fi
12454
12455 # use these variables to work around a defect in gcc's fixincludes.
12456 NCURSES_OK_WCHAR_T=
12457 NCURSES_OK_WINT_T=
12458
12459 echo "$as_me:12459: checking if you want wide-character code" >&5
12460 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12461
12462 # Check whether --enable-widec or --disable-widec was given.
12463 if test "${enable_widec+set}" = set; then
12464   enableval="$enable_widec"
12465   with_widec=$enableval
12466 else
12467   with_widec=$cf_dft_widec
12468 fi;
12469 echo "$as_me:12469: result: $with_widec" >&5
12470 echo "${ECHO_T}$with_widec" >&6
12471
12472 NCURSES_WCWIDTH_GRAPHICS=1
12473
12474 if test "x$with_widec" = xyes ; then
12475         if test "x$disable_lib_suffixes" = xno ; then
12476                 LIB_SUFFIX="w${LIB_SUFFIX}"
12477         fi
12478
12479 cat >>confdefs.h <<\EOF
12480 #define USE_WIDEC_SUPPORT 1
12481 EOF
12482
12483 cat >>confdefs.h <<\EOF
12484 #define NCURSES_WIDECHAR 1
12485 EOF
12486
12487         case "$CPPFLAGS" in
12488         (*_XOPEN_SOURCE=*)
12489                 ;;
12490         (*)
12491                 { echo "$as_me:12491: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12492 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12493                 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12494                 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12495                 ;;
12496         esac
12497
12498 for ac_header in \
12499 wchar.h \
12500 wctype.h \
12501
12502 do
12503 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12504 echo "$as_me:12504: checking for $ac_header" >&5
12505 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12506 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12507   echo $ECHO_N "(cached) $ECHO_C" >&6
12508 else
12509   cat >"conftest.$ac_ext" <<_ACEOF
12510 #line 12510 "configure"
12511 #include "confdefs.h"
12512 #include <$ac_header>
12513 _ACEOF
12514 if { (eval echo "$as_me:12514: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12515   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12516   ac_status=$?
12517   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12518   rm -f conftest.er1
12519   cat conftest.err >&5
12520   echo "$as_me:12520: \$? = $ac_status" >&5
12521   (exit "$ac_status"); } >/dev/null; then
12522   if test -s conftest.err; then
12523     ac_cpp_err=$ac_c_preproc_warn_flag
12524   else
12525     ac_cpp_err=
12526   fi
12527 else
12528   ac_cpp_err=yes
12529 fi
12530 if test -z "$ac_cpp_err"; then
12531   eval "$as_ac_Header=yes"
12532 else
12533   echo "$as_me: failed program was:" >&5
12534   cat "conftest.$ac_ext" >&5
12535   eval "$as_ac_Header=no"
12536 fi
12537 rm -f conftest.err "conftest.$ac_ext"
12538 fi
12539 echo "$as_me:12539: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12540 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12541 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12542   cat >>confdefs.h <<EOF
12543 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12544 EOF
12545
12546 fi
12547 done
12548
12549 echo "$as_me:12549: checking if wchar.h can be used as is" >&5
12550 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12551 if test "${cf_cv_wchar_h_okay+set}" = set; then
12552   echo $ECHO_N "(cached) $ECHO_C" >&6
12553 else
12554
12555 cat >"conftest.$ac_ext" <<_ACEOF
12556 #line 12556 "configure"
12557 #include "confdefs.h"
12558
12559 $ac_includes_default
12560 #ifdef HAVE_WCHAR_H
12561 #include <wchar.h>
12562 #endif
12563 #ifdef HAVE_WCTYPE_H
12564 #include <wctype.h>
12565 #endif
12566
12567 int
12568 main (void)
12569 {
12570
12571         wint_t foo = 0;
12572         int bar = iswpunct(foo); (void) bar
12573   ;
12574   return 0;
12575 }
12576 _ACEOF
12577 rm -f "conftest.$ac_objext"
12578 if { (eval echo "$as_me:12578: \"$ac_compile\"") >&5
12579   (eval $ac_compile) 2>&5
12580   ac_status=$?
12581   echo "$as_me:12581: \$? = $ac_status" >&5
12582   (exit "$ac_status"); } &&
12583          { ac_try='test -s "conftest.$ac_objext"'
12584   { (eval echo "$as_me:12584: \"$ac_try\"") >&5
12585   (eval $ac_try) 2>&5
12586   ac_status=$?
12587   echo "$as_me:12587: \$? = $ac_status" >&5
12588   (exit "$ac_status"); }; }; then
12589   cf_cv_wchar_h_okay=yes
12590 else
12591   echo "$as_me: failed program was:" >&5
12592 cat "conftest.$ac_ext" >&5
12593 cf_cv_wchar_h_okay=no
12594 fi
12595 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12596 fi
12597 echo "$as_me:12597: result: $cf_cv_wchar_h_okay" >&5
12598 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12599
12600 if test "$cf_cv_wchar_h_okay" = no
12601 then
12602
12603 echo "$as_me:12603: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12604 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12605 cat >"conftest.$ac_ext" <<_ACEOF
12606 #line 12606 "configure"
12607 #include "confdefs.h"
12608 #include <sys/types.h>
12609
12610 int
12611 main (void)
12612 {
12613
12614 #ifndef _XOPEN_SOURCE_EXTENDED
12615 #error _XOPEN_SOURCE_EXTENDED is not defined
12616 #endif
12617   ;
12618   return 0;
12619 }
12620 _ACEOF
12621 rm -f "conftest.$ac_objext"
12622 if { (eval echo "$as_me:12622: \"$ac_compile\"") >&5
12623   (eval $ac_compile) 2>&5
12624   ac_status=$?
12625   echo "$as_me:12625: \$? = $ac_status" >&5
12626   (exit "$ac_status"); } &&
12627          { ac_try='test -s "conftest.$ac_objext"'
12628   { (eval echo "$as_me:12628: \"$ac_try\"") >&5
12629   (eval $ac_try) 2>&5
12630   ac_status=$?
12631   echo "$as_me:12631: \$? = $ac_status" >&5
12632   (exit "$ac_status"); }; }; then
12633   cf_result=no
12634 else
12635   echo "$as_me: failed program was:" >&5
12636 cat "conftest.$ac_ext" >&5
12637 cf_result=yes
12638 fi
12639 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12640 echo "$as_me:12640: result: $cf_result" >&5
12641 echo "${ECHO_T}$cf_result" >&6
12642
12643 if test "$cf_result" = yes ; then
12644         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12645 elif test "x" != "x" ; then
12646         echo "$as_me:12646: checking checking for compatible value versus " >&5
12647 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12648         cat >"conftest.$ac_ext" <<_ACEOF
12649 #line 12649 "configure"
12650 #include "confdefs.h"
12651 #include <sys/types.h>
12652
12653 int
12654 main (void)
12655 {
12656
12657 #if _XOPEN_SOURCE_EXTENDED- < 0
12658 #error _XOPEN_SOURCE_EXTENDED- is negative
12659 #endif
12660   ;
12661   return 0;
12662 }
12663 _ACEOF
12664 rm -f "conftest.$ac_objext"
12665 if { (eval echo "$as_me:12665: \"$ac_compile\"") >&5
12666   (eval $ac_compile) 2>&5
12667   ac_status=$?
12668   echo "$as_me:12668: \$? = $ac_status" >&5
12669   (exit "$ac_status"); } &&
12670          { ac_try='test -s "conftest.$ac_objext"'
12671   { (eval echo "$as_me:12671: \"$ac_try\"") >&5
12672   (eval $ac_try) 2>&5
12673   ac_status=$?
12674   echo "$as_me:12674: \$? = $ac_status" >&5
12675   (exit "$ac_status"); }; }; then
12676   cf_result=yes
12677 else
12678   echo "$as_me: failed program was:" >&5
12679 cat "conftest.$ac_ext" >&5
12680 cf_result=no
12681 fi
12682 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12683         echo "$as_me:12683: result: $cf_result" >&5
12684 echo "${ECHO_T}$cf_result" >&6
12685         if test "$cf_result" = no ; then
12686                 # perhaps we can override it - try...
12687                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12688         fi
12689 fi
12690
12691 fi
12692
12693 echo "$as_me:12693: checking if wcwidth agrees graphics are single-width" >&5
12694 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12695 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12696   echo $ECHO_N "(cached) $ECHO_C" >&6
12697 else
12698
12699 cat >conftest.in <<CF_EOF
12700 -       VT100 symbols
12701 0x250c  upper left corner
12702 0x2514  lower left corner
12703 0x2510  upper right corner
12704 0x2518  lower right corner
12705 0x251c  tee pointing left
12706 0x2524  tee pointing right
12707 0x2534  tee pointing up
12708 0x252c  tee pointing down
12709 0x2500  horizontal line
12710 0x2502  vertical line
12711 0x253c  large plus or crossover
12712 0x23ba  scan line 1
12713 0x23bd  scan line 9
12714 0x25c6  diamond
12715 0x2592  checker board (stipple)
12716 0x00b0  degree symbol
12717 0x00b1  plus/minus
12718 0x00b7  bullet
12719 -       Teletype 5410v1 symbols
12720 0x2190  arrow pointing left
12721 0x2192  arrow pointing right
12722 0x2193  arrow pointing down
12723 0x2191  arrow pointing up
12724 0x2592  board of squares
12725 0x2603  lantern symbol
12726 0x25ae  solid square block
12727 -       these defaults were invented for ncurses
12728 0x23bb  scan line 3
12729 0x23bc  scan line 7
12730 0x2264  less-than-or-equal-to
12731 0x2265  greater-than-or-equal-to
12732 0x03c0  greek pi
12733 0x2260  not-equal
12734 0x00a3  pound-sterling symbol
12735 -       thick-line-drawing
12736 0x250f  upper left corner
12737 0x2517  lower left corner
12738 0x2513  upper right corner
12739 0x251b  lower right corner
12740 0x2523  tee pointing left
12741 0x252b  tee pointing right
12742 0x253b  tee pointing up
12743 0x2533  tee pointing down
12744 0x2501  horizontal line
12745 0x2503  vertical line
12746 0x254b  large plus or crossover
12747 -       double-line-drawing
12748 0x2554  upper left corner
12749 0x255a  lower left corner
12750 0x2557  upper right corner
12751 0x255d  lower right corner
12752 0x2563  tee pointing left
12753 0x2560  tee pointing right
12754 0x2569  tee pointing up
12755 0x2566  tee pointing down
12756 0x2550  horizontal line
12757 0x2551  vertical line
12758 0x256c  large plus or crossover
12759 CF_EOF
12760 if test "$cross_compiling" = yes; then
12761   cf_cv_wcwidth_graphics=unknown
12762 else
12763   cat >"conftest.$ac_ext" <<_ACEOF
12764 #line 12764 "configure"
12765 #include "confdefs.h"
12766
12767 $ac_includes_default
12768
12769 #include <locale.h>
12770 #include <wchar.h>
12771
12772 #define MY_LEN 80
12773
12774 int
12775 main(void)
12776 {
12777         FILE *fp;
12778         unsigned value;
12779         char buffer[MY_LEN + 1];
12780         char notes[MY_LEN + 1];
12781         int totals = 0;
12782         int passed = 0;
12783
12784         if (setlocale(LC_ALL, "en_US.UTF8") ||
12785                 setlocale(LC_ALL, "en_US.UTF-8") ||
12786                 setlocale(LC_ALL, "en_US.utf8") ||
12787                 setlocale(LC_ALL, "en_US.utf-8")) {
12788                 if ((fp = fopen("conftest.in", "r")) != 0) {
12789                         while (fgets(buffer, MY_LEN, fp) != 0) {
12790                                 if (*buffer == '-') {
12791                                         fprintf(stderr, "\\t%s", buffer);
12792                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12793                                         ++totals;
12794                                         if (wcwidth((int)value) == 1)
12795                                                 ++passed;
12796                                         fprintf(stderr, "%d\\t%s", wcwidth((int)value), buffer);
12797                                 } else {
12798                                         fprintf(stderr, "?\\t%s", buffer);
12799                                 }
12800                         }
12801                 }
12802         }
12803         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12804         return (totals == passed) ? 0 : 1;
12805 }
12806
12807 _ACEOF
12808 rm -f "conftest$ac_exeext"
12809 if { (eval echo "$as_me:12809: \"$ac_link\"") >&5
12810   (eval $ac_link) 2>&5
12811   ac_status=$?
12812   echo "$as_me:12812: \$? = $ac_status" >&5
12813   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12814   { (eval echo "$as_me:12814: \"$ac_try\"") >&5
12815   (eval $ac_try) 2>&5
12816   ac_status=$?
12817   echo "$as_me:12817: \$? = $ac_status" >&5
12818   (exit "$ac_status"); }; }; then
12819   cf_cv_wcwidth_graphics=yes
12820 else
12821   echo "$as_me: program exited with status $ac_status" >&5
12822 echo "$as_me: failed program was:" >&5
12823 cat "conftest.$ac_ext" >&5
12824 cf_cv_wcwidth_graphics=no
12825 fi
12826 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12827 fi
12828
12829 fi
12830 echo "$as_me:12830: result: $cf_cv_wcwidth_graphics" >&5
12831 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12832
12833         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12834
12835         # with_overwrite=no
12836         NCURSES_CH_T=cchar_t
12837
12838 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12839 do
12840 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12841 echo "$as_me:12841: checking for $ac_func" >&5
12842 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12843 if eval "test \"\${$as_ac_var+set}\" = set"; then
12844   echo $ECHO_N "(cached) $ECHO_C" >&6
12845 else
12846   cat >"conftest.$ac_ext" <<_ACEOF
12847 #line 12847 "configure"
12848 #include "confdefs.h"
12849 #define $ac_func autoconf_temporary
12850 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12851 #undef $ac_func
12852
12853 #ifdef __cplusplus
12854 extern "C"
12855 #endif
12856
12857 /* We use char because int might match the return type of a gcc2
12858    builtin and then its argument prototype would still apply.  */
12859 char $ac_func (void);
12860
12861 int
12862 main (void)
12863 {
12864
12865 /* The GNU C library defines stubs for functions which it implements
12866     to always fail with ENOSYS.  Some functions are actually named
12867     something starting with __ and the normal name is an alias.  */
12868 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12869 #error found stub for $ac_func
12870 #endif
12871
12872         return $ac_func ();
12873   ;
12874   return 0;
12875 }
12876 _ACEOF
12877 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12878 if { (eval echo "$as_me:12878: \"$ac_link\"") >&5
12879   (eval $ac_link) 2>&5
12880   ac_status=$?
12881   echo "$as_me:12881: \$? = $ac_status" >&5
12882   (exit "$ac_status"); } &&
12883          { ac_try='test -s "conftest$ac_exeext"'
12884   { (eval echo "$as_me:12884: \"$ac_try\"") >&5
12885   (eval $ac_try) 2>&5
12886   ac_status=$?
12887   echo "$as_me:12887: \$? = $ac_status" >&5
12888   (exit "$ac_status"); }; }; then
12889   eval "$as_ac_var=yes"
12890 else
12891   echo "$as_me: failed program was:" >&5
12892 cat "conftest.$ac_ext" >&5
12893 eval "$as_ac_var=no"
12894 fi
12895 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12896 fi
12897 echo "$as_me:12897: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12898 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12899 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12900   cat >>confdefs.h <<EOF
12901 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12902 EOF
12903
12904 fi
12905 done
12906
12907         if test "x$ac_cv_func_putwc" != xyes ; then
12908
12909 for ac_header in wchar.h
12910 do
12911 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12912 echo "$as_me:12912: checking for $ac_header" >&5
12913 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12914 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12915   echo $ECHO_N "(cached) $ECHO_C" >&6
12916 else
12917   cat >"conftest.$ac_ext" <<_ACEOF
12918 #line 12918 "configure"
12919 #include "confdefs.h"
12920 #include <$ac_header>
12921 _ACEOF
12922 if { (eval echo "$as_me:12922: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12923   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12924   ac_status=$?
12925   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12926   rm -f conftest.er1
12927   cat conftest.err >&5
12928   echo "$as_me:12928: \$? = $ac_status" >&5
12929   (exit "$ac_status"); } >/dev/null; then
12930   if test -s conftest.err; then
12931     ac_cpp_err=$ac_c_preproc_warn_flag
12932   else
12933     ac_cpp_err=
12934   fi
12935 else
12936   ac_cpp_err=yes
12937 fi
12938 if test -z "$ac_cpp_err"; then
12939   eval "$as_ac_Header=yes"
12940 else
12941   echo "$as_me: failed program was:" >&5
12942   cat "conftest.$ac_ext" >&5
12943   eval "$as_ac_Header=no"
12944 fi
12945 rm -f conftest.err "conftest.$ac_ext"
12946 fi
12947 echo "$as_me:12947: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12948 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12949 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12950   cat >>confdefs.h <<EOF
12951 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12952 EOF
12953
12954 fi
12955 done
12956
12957 echo "$as_me:12957: checking for multibyte character support" >&5
12958 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12959 if test "${cf_cv_utf8_lib+set}" = set; then
12960   echo $ECHO_N "(cached) $ECHO_C" >&6
12961 else
12962
12963         cf_save_LIBS="$LIBS"
12964         cat >"conftest.$ac_ext" <<_ACEOF
12965 #line 12965 "configure"
12966 #include "confdefs.h"
12967
12968 $ac_includes_default
12969 #ifdef HAVE_WCHAR_H
12970 #include <wchar.h>
12971 #endif
12972
12973 int
12974 main (void)
12975 {
12976 putwc(0,0);
12977   ;
12978   return 0;
12979 }
12980 _ACEOF
12981 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12982 if { (eval echo "$as_me:12982: \"$ac_link\"") >&5
12983   (eval $ac_link) 2>&5
12984   ac_status=$?
12985   echo "$as_me:12985: \$? = $ac_status" >&5
12986   (exit "$ac_status"); } &&
12987          { ac_try='test -s "conftest$ac_exeext"'
12988   { (eval echo "$as_me:12988: \"$ac_try\"") >&5
12989   (eval $ac_try) 2>&5
12990   ac_status=$?
12991   echo "$as_me:12991: \$? = $ac_status" >&5
12992   (exit "$ac_status"); }; }; then
12993   cf_cv_utf8_lib=yes
12994 else
12995   echo "$as_me: failed program was:" >&5
12996 cat "conftest.$ac_ext" >&5
12997
12998 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12999 # will be set on completion of the AC_TRY_LINK below.
13000 cf_cv_header_path_utf8=
13001 cf_cv_library_path_utf8=
13002
13003 echo "${as_me:-configure}:13003: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
13004
13005 cf_save_LIBS="$LIBS"
13006
13007 cat >"conftest.$ac_ext" <<_ACEOF
13008 #line 13008 "configure"
13009 #include "confdefs.h"
13010
13011 #include <libutf8.h>
13012 int
13013 main (void)
13014 {
13015 putwc(0,0);
13016   ;
13017   return 0;
13018 }
13019 _ACEOF
13020 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13021 if { (eval echo "$as_me:13021: \"$ac_link\"") >&5
13022   (eval $ac_link) 2>&5
13023   ac_status=$?
13024   echo "$as_me:13024: \$? = $ac_status" >&5
13025   (exit "$ac_status"); } &&
13026          { ac_try='test -s "conftest$ac_exeext"'
13027   { (eval echo "$as_me:13027: \"$ac_try\"") >&5
13028   (eval $ac_try) 2>&5
13029   ac_status=$?
13030   echo "$as_me:13030: \$? = $ac_status" >&5
13031   (exit "$ac_status"); }; }; then
13032
13033         cf_cv_find_linkage_utf8=yes
13034         cf_cv_header_path_utf8=/usr/include
13035         cf_cv_library_path_utf8=/usr/lib
13036
13037 else
13038   echo "$as_me: failed program was:" >&5
13039 cat "conftest.$ac_ext" >&5
13040
13041 LIBS="-lutf8  $cf_save_LIBS"
13042
13043 cat >"conftest.$ac_ext" <<_ACEOF
13044 #line 13044 "configure"
13045 #include "confdefs.h"
13046
13047 #include <libutf8.h>
13048 int
13049 main (void)
13050 {
13051 putwc(0,0);
13052   ;
13053   return 0;
13054 }
13055 _ACEOF
13056 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13057 if { (eval echo "$as_me:13057: \"$ac_link\"") >&5
13058   (eval $ac_link) 2>&5
13059   ac_status=$?
13060   echo "$as_me:13060: \$? = $ac_status" >&5
13061   (exit "$ac_status"); } &&
13062          { ac_try='test -s "conftest$ac_exeext"'
13063   { (eval echo "$as_me:13063: \"$ac_try\"") >&5
13064   (eval $ac_try) 2>&5
13065   ac_status=$?
13066   echo "$as_me:13066: \$? = $ac_status" >&5
13067   (exit "$ac_status"); }; }; then
13068
13069         cf_cv_find_linkage_utf8=yes
13070         cf_cv_header_path_utf8=/usr/include
13071         cf_cv_library_path_utf8=/usr/lib
13072         cf_cv_library_file_utf8="-lutf8"
13073
13074 else
13075   echo "$as_me: failed program was:" >&5
13076 cat "conftest.$ac_ext" >&5
13077
13078         cf_cv_find_linkage_utf8=no
13079         LIBS="$cf_save_LIBS"
13080
13081         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
13082
13083 echo "${as_me:-configure}:13083: testing find linkage for utf8 library ..." 1>&5
13084
13085 echo "${as_me:-configure}:13085: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13086
13087         cf_save_CPPFLAGS="$CPPFLAGS"
13088         cf_test_CPPFLAGS="$CPPFLAGS"
13089
13090 cf_search=
13091
13092 # collect the current set of include-directories from compiler flags
13093 cf_header_path_list=""
13094 if test -n "${CFLAGS}${CPPFLAGS}" ; then
13095         for cf_header_path in $CPPFLAGS $CFLAGS
13096         do
13097                 case "$cf_header_path" in
13098                 (-I*)
13099                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13100
13101 test "x$cf_header_path" != "xNONE" && \
13102 test -d "$cf_header_path" && \
13103  {
13104         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
13105         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
13106         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
13107         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
13108         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
13109         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13110 }
13111
13112                         cf_header_path_list="$cf_header_path_list $cf_search"
13113                         ;;
13114                 esac
13115         done
13116 fi
13117
13118 # add the variations for the package we are looking for
13119
13120 cf_search=
13121
13122 test "x$prefix" != "xNONE" && \
13123 test -d "$prefix" && \
13124  {
13125         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
13126         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
13127         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
13128         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
13129         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
13130         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
13131 }
13132
13133 for cf_subdir_prefix in \
13134         /usr \
13135         /usr/local \
13136         /usr/pkg \
13137         /opt \
13138         /opt/local \
13139         $HOME
13140 do
13141
13142 test "x$cf_subdir_prefix" != "x$prefix" && \
13143 test -d "$cf_subdir_prefix" && \
13144 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13145         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
13146         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
13147         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13148         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13149         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13150         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13151 }
13152
13153 done
13154
13155 test "$includedir" != NONE && \
13156 test "$includedir" != "/usr/include" && \
13157 test -d "$includedir" && {
13158         test -d "$includedir" &&    cf_search="$cf_search $includedir"
13159         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
13160 }
13161
13162 test "$oldincludedir" != NONE && \
13163 test "$oldincludedir" != "/usr/include" && \
13164 test -d "$oldincludedir" && {
13165         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
13166         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
13167 }
13168
13169 cf_search="$cf_search $cf_header_path_list"
13170
13171         for cf_cv_header_path_utf8 in $cf_search
13172         do
13173                 if test -d "$cf_cv_header_path_utf8" ; then
13174                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
13175
13176 echo "${as_me:-configure}:13176: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13177
13178                         CPPFLAGS="$cf_save_CPPFLAGS"
13179
13180         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13181         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13182
13183                         cat >"conftest.$ac_ext" <<_ACEOF
13184 #line 13184 "configure"
13185 #include "confdefs.h"
13186
13187 #include <libutf8.h>
13188 int
13189 main (void)
13190 {
13191 putwc(0,0);
13192   ;
13193   return 0;
13194 }
13195 _ACEOF
13196 rm -f "conftest.$ac_objext"
13197 if { (eval echo "$as_me:13197: \"$ac_compile\"") >&5
13198   (eval $ac_compile) 2>&5
13199   ac_status=$?
13200   echo "$as_me:13200: \$? = $ac_status" >&5
13201   (exit "$ac_status"); } &&
13202          { ac_try='test -s "conftest.$ac_objext"'
13203   { (eval echo "$as_me:13203: \"$ac_try\"") >&5
13204   (eval $ac_try) 2>&5
13205   ac_status=$?
13206   echo "$as_me:13206: \$? = $ac_status" >&5
13207   (exit "$ac_status"); }; }; then
13208
13209                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13210
13211 echo "${as_me:-configure}:13211: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13212
13213                                 cf_cv_find_linkage_utf8=maybe
13214                                 cf_test_CPPFLAGS="$CPPFLAGS"
13215                                 break
13216 else
13217   echo "$as_me: failed program was:" >&5
13218 cat "conftest.$ac_ext" >&5
13219
13220                                 CPPFLAGS="$cf_save_CPPFLAGS"
13221
13222 fi
13223 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13224                 fi
13225         done
13226
13227         if test "$cf_cv_find_linkage_utf8" = maybe ; then
13228
13229 echo "${as_me:-configure}:13229: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13230
13231                 cf_save_LIBS="$LIBS"
13232                 cf_save_LDFLAGS="$LDFLAGS"
13233
13234                 if test "$cf_cv_find_linkage_utf8" != yes ; then
13235
13236 cf_search=
13237 cf_library_path_list=""
13238 if test -n "${LDFLAGS}${LIBS}" ; then
13239         for cf_library_path in $LDFLAGS $LIBS
13240         do
13241                 case "$cf_library_path" in
13242                 (-L*)
13243                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13244
13245 test "x$cf_library_path" != "xNONE" && \
13246 test -d "$cf_library_path" && \
13247  {
13248         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
13249         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
13250         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
13251         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13252         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
13253         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13254 }
13255
13256                         cf_library_path_list="$cf_library_path_list $cf_search"
13257                         ;;
13258                 esac
13259         done
13260 fi
13261
13262 cf_search=
13263
13264 test "x$prefix" != "xNONE" && \
13265 test -d "$prefix" && \
13266  {
13267         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
13268         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
13269         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
13270         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
13271         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
13272         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
13273 }
13274
13275 for cf_subdir_prefix in \
13276         /usr \
13277         /usr/local \
13278         /usr/pkg \
13279         /opt \
13280         /opt/local \
13281         $HOME
13282 do
13283
13284 test "x$cf_subdir_prefix" != "x$prefix" && \
13285 test -d "$cf_subdir_prefix" && \
13286 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13287         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
13288         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13289         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13290         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13291         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13292         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13293 }
13294
13295 done
13296
13297 cf_search="$cf_library_path_list $cf_search"
13298
13299                         for cf_cv_library_path_utf8 in $cf_search
13300                         do
13301                                 if test -d "$cf_cv_library_path_utf8" ; then
13302                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
13303
13304 echo "${as_me:-configure}:13304: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13305
13306                                         CPPFLAGS="$cf_test_CPPFLAGS"
13307                                         LIBS="-lutf8  $cf_save_LIBS"
13308                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
13309                                         cat >"conftest.$ac_ext" <<_ACEOF
13310 #line 13310 "configure"
13311 #include "confdefs.h"
13312
13313 #include <libutf8.h>
13314 int
13315 main (void)
13316 {
13317 putwc(0,0);
13318   ;
13319   return 0;
13320 }
13321 _ACEOF
13322 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13323 if { (eval echo "$as_me:13323: \"$ac_link\"") >&5
13324   (eval $ac_link) 2>&5
13325   ac_status=$?
13326   echo "$as_me:13326: \$? = $ac_status" >&5
13327   (exit "$ac_status"); } &&
13328          { ac_try='test -s "conftest$ac_exeext"'
13329   { (eval echo "$as_me:13329: \"$ac_try\"") >&5
13330   (eval $ac_try) 2>&5
13331   ac_status=$?
13332   echo "$as_me:13332: \$? = $ac_status" >&5
13333   (exit "$ac_status"); }; }; then
13334
13335                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13336
13337 echo "${as_me:-configure}:13337: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13338
13339                                         cf_cv_find_linkage_utf8=yes
13340                                         cf_cv_library_file_utf8="-lutf8"
13341                                         break
13342 else
13343   echo "$as_me: failed program was:" >&5
13344 cat "conftest.$ac_ext" >&5
13345
13346                                         CPPFLAGS="$cf_save_CPPFLAGS"
13347                                         LIBS="$cf_save_LIBS"
13348                                         LDFLAGS="$cf_save_LDFLAGS"
13349
13350 fi
13351 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13352                                 fi
13353                         done
13354                         CPPFLAGS="$cf_save_CPPFLAGS"
13355                         LDFLAGS="$cf_save_LDFLAGS"
13356                 fi
13357
13358         else
13359                 cf_cv_find_linkage_utf8=no
13360         fi
13361
13362 fi
13363 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13364
13365 fi
13366 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13367
13368 LIBS="$cf_save_LIBS"
13369
13370 if test "$cf_cv_find_linkage_utf8" = yes ; then
13371 cf_cv_utf8_lib=add-on
13372 else
13373 cf_cv_utf8_lib=no
13374 fi
13375
13376 fi
13377 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13378 fi
13379 echo "$as_me:13379: result: $cf_cv_utf8_lib" >&5
13380 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13381
13382 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13383 # ncurses/ncursesw:
13384 if test "$cf_cv_utf8_lib" = "add-on" ; then
13385
13386 cat >>confdefs.h <<\EOF
13387 #define HAVE_LIBUTF8_H 1
13388 EOF
13389
13390 if test -n "$cf_cv_header_path_utf8" ; then
13391   for cf_add_incdir in $cf_cv_header_path_utf8
13392   do
13393         while test "$cf_add_incdir" != /usr/include
13394         do
13395           if test -d "$cf_add_incdir"
13396           then
13397                 cf_have_incdir=no
13398                 if test -n "$CFLAGS$CPPFLAGS" ; then
13399                   # a loop is needed to ensure we can add subdirs of existing dirs
13400                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13401                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13402                           cf_have_incdir=yes; break
13403                         fi
13404                   done
13405                 fi
13406
13407                 if test "$cf_have_incdir" = no ; then
13408                   if test "$cf_add_incdir" = /usr/local/include ; then
13409                         if test "$GCC" = yes
13410                         then
13411                           cf_save_CPPFLAGS=$CPPFLAGS
13412
13413         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13414         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13415
13416                           cat >"conftest.$ac_ext" <<_ACEOF
13417 #line 13417 "configure"
13418 #include "confdefs.h"
13419 #include <stdio.h>
13420 int
13421 main (void)
13422 {
13423 printf("Hello")
13424   ;
13425   return 0;
13426 }
13427 _ACEOF
13428 rm -f "conftest.$ac_objext"
13429 if { (eval echo "$as_me:13429: \"$ac_compile\"") >&5
13430   (eval $ac_compile) 2>&5
13431   ac_status=$?
13432   echo "$as_me:13432: \$? = $ac_status" >&5
13433   (exit "$ac_status"); } &&
13434          { ac_try='test -s "conftest.$ac_objext"'
13435   { (eval echo "$as_me:13435: \"$ac_try\"") >&5
13436   (eval $ac_try) 2>&5
13437   ac_status=$?
13438   echo "$as_me:13438: \$? = $ac_status" >&5
13439   (exit "$ac_status"); }; }; then
13440   :
13441 else
13442   echo "$as_me: failed program was:" >&5
13443 cat "conftest.$ac_ext" >&5
13444 cf_have_incdir=yes
13445 fi
13446 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13447                           CPPFLAGS=$cf_save_CPPFLAGS
13448                         fi
13449                   fi
13450                 fi
13451
13452                 if test "$cf_have_incdir" = no ; then
13453                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13454
13455 echo "${as_me:-configure}:13455: testing adding $cf_add_incdir to include-path ..." 1>&5
13456
13457                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13458
13459                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13460                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13461                   cf_add_incdir="$cf_top_incdir"
13462                 else
13463                   break
13464                 fi
13465           else
13466                 break
13467           fi
13468         done
13469   done
13470 fi
13471
13472 if test -n "$cf_cv_library_path_utf8" ; then
13473         for cf_add_libdir in $cf_cv_library_path_utf8
13474         do
13475                 if test "$cf_add_libdir" = /usr/lib ; then
13476                         :
13477                 elif test -d "$cf_add_libdir"
13478                 then
13479                         cf_have_libdir=no
13480                         if test -n "$LDFLAGS$LIBS" ; then
13481                                 # a loop is needed to ensure we can add subdirs of existing dirs
13482                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13483                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13484                                                 cf_have_libdir=yes; break
13485                                         fi
13486                                 done
13487                         fi
13488                         if test "$cf_have_libdir" = no ; then
13489                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13490
13491 echo "${as_me:-configure}:13491: testing adding $cf_add_libdir to library-path ..." 1>&5
13492
13493                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13494                         fi
13495                 fi
13496         done
13497 fi
13498
13499 cf_add_libs="$LIBS"
13500 # reverse order
13501 cf_add_0lib=
13502 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13503 # filter duplicates
13504 for cf_add_1lib in $cf_add_0lib; do
13505         for cf_add_2lib in $cf_add_libs; do
13506                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13507                         cf_add_1lib=
13508                         break
13509                 fi
13510         done
13511         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13512 done
13513 LIBS="$cf_add_libs"
13514
13515 fi
13516
13517                 if test "$cf_cv_utf8_lib" != no ; then
13518                         NCURSES_LIBUTF8=1
13519                 fi
13520         fi
13521
13522 # This is needed on Tru64 5.0 to declare mbstate_t
13523 echo "$as_me:13523: checking if we must include wchar.h to declare mbstate_t" >&5
13524 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13525 if test "${cf_cv_mbstate_t+set}" = set; then
13526   echo $ECHO_N "(cached) $ECHO_C" >&6
13527 else
13528
13529 cat >"conftest.$ac_ext" <<_ACEOF
13530 #line 13530 "configure"
13531 #include "confdefs.h"
13532
13533 #include <stdlib.h>
13534 #include <stdarg.h>
13535 #include <stdio.h>
13536 #ifdef HAVE_LIBUTF8_H
13537 #include <libutf8.h>
13538 #endif
13539 int
13540 main (void)
13541 {
13542 mbstate_t state; (void)state
13543   ;
13544   return 0;
13545 }
13546 _ACEOF
13547 rm -f "conftest.$ac_objext"
13548 if { (eval echo "$as_me:13548: \"$ac_compile\"") >&5
13549   (eval $ac_compile) 2>&5
13550   ac_status=$?
13551   echo "$as_me:13551: \$? = $ac_status" >&5
13552   (exit "$ac_status"); } &&
13553          { ac_try='test -s "conftest.$ac_objext"'
13554   { (eval echo "$as_me:13554: \"$ac_try\"") >&5
13555   (eval $ac_try) 2>&5
13556   ac_status=$?
13557   echo "$as_me:13557: \$? = $ac_status" >&5
13558   (exit "$ac_status"); }; }; then
13559   cf_cv_mbstate_t=no
13560 else
13561   echo "$as_me: failed program was:" >&5
13562 cat "conftest.$ac_ext" >&5
13563 cat >"conftest.$ac_ext" <<_ACEOF
13564 #line 13564 "configure"
13565 #include "confdefs.h"
13566
13567 #include <stdlib.h>
13568 #include <stdarg.h>
13569 #include <stdio.h>
13570 #include <wchar.h>
13571 #ifdef HAVE_LIBUTF8_H
13572 #include <libutf8.h>
13573 #endif
13574 int
13575 main (void)
13576 {
13577 mbstate_t value; (void) value
13578   ;
13579   return 0;
13580 }
13581 _ACEOF
13582 rm -f "conftest.$ac_objext"
13583 if { (eval echo "$as_me:13583: \"$ac_compile\"") >&5
13584   (eval $ac_compile) 2>&5
13585   ac_status=$?
13586   echo "$as_me:13586: \$? = $ac_status" >&5
13587   (exit "$ac_status"); } &&
13588          { ac_try='test -s "conftest.$ac_objext"'
13589   { (eval echo "$as_me:13589: \"$ac_try\"") >&5
13590   (eval $ac_try) 2>&5
13591   ac_status=$?
13592   echo "$as_me:13592: \$? = $ac_status" >&5
13593   (exit "$ac_status"); }; }; then
13594   cf_cv_mbstate_t=yes
13595 else
13596   echo "$as_me: failed program was:" >&5
13597 cat "conftest.$ac_ext" >&5
13598 cf_cv_mbstate_t=unknown
13599 fi
13600 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13601 fi
13602 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13603 fi
13604 echo "$as_me:13604: result: $cf_cv_mbstate_t" >&5
13605 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13606
13607 if test "$cf_cv_mbstate_t" = yes ; then
13608
13609 cat >>confdefs.h <<\EOF
13610 #define NEED_WCHAR_H 1
13611 EOF
13612
13613         NEED_WCHAR_H=1
13614 fi
13615
13616 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13617 if test "$cf_cv_mbstate_t" = unknown ; then
13618         NCURSES_MBSTATE_T=1
13619 fi
13620
13621 # This is needed on Tru64 5.0 to declare wchar_t
13622 echo "$as_me:13622: checking if we must include wchar.h to declare wchar_t" >&5
13623 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13624 if test "${cf_cv_wchar_t+set}" = set; then
13625   echo $ECHO_N "(cached) $ECHO_C" >&6
13626 else
13627
13628 cat >"conftest.$ac_ext" <<_ACEOF
13629 #line 13629 "configure"
13630 #include "confdefs.h"
13631
13632 #include <stdlib.h>
13633 #include <stdarg.h>
13634 #include <stdio.h>
13635 #ifdef HAVE_LIBUTF8_H
13636 #include <libutf8.h>
13637 #endif
13638 int
13639 main (void)
13640 {
13641 wchar_t state; (void)state
13642   ;
13643   return 0;
13644 }
13645 _ACEOF
13646 rm -f "conftest.$ac_objext"
13647 if { (eval echo "$as_me:13647: \"$ac_compile\"") >&5
13648   (eval $ac_compile) 2>&5
13649   ac_status=$?
13650   echo "$as_me:13650: \$? = $ac_status" >&5
13651   (exit "$ac_status"); } &&
13652          { ac_try='test -s "conftest.$ac_objext"'
13653   { (eval echo "$as_me:13653: \"$ac_try\"") >&5
13654   (eval $ac_try) 2>&5
13655   ac_status=$?
13656   echo "$as_me:13656: \$? = $ac_status" >&5
13657   (exit "$ac_status"); }; }; then
13658   cf_cv_wchar_t=no
13659 else
13660   echo "$as_me: failed program was:" >&5
13661 cat "conftest.$ac_ext" >&5
13662 cat >"conftest.$ac_ext" <<_ACEOF
13663 #line 13663 "configure"
13664 #include "confdefs.h"
13665
13666 #include <stdlib.h>
13667 #include <stdarg.h>
13668 #include <stdio.h>
13669 #include <wchar.h>
13670 #ifdef HAVE_LIBUTF8_H
13671 #include <libutf8.h>
13672 #endif
13673 int
13674 main (void)
13675 {
13676 wchar_t value; (void) value
13677   ;
13678   return 0;
13679 }
13680 _ACEOF
13681 rm -f "conftest.$ac_objext"
13682 if { (eval echo "$as_me:13682: \"$ac_compile\"") >&5
13683   (eval $ac_compile) 2>&5
13684   ac_status=$?
13685   echo "$as_me:13685: \$? = $ac_status" >&5
13686   (exit "$ac_status"); } &&
13687          { ac_try='test -s "conftest.$ac_objext"'
13688   { (eval echo "$as_me:13688: \"$ac_try\"") >&5
13689   (eval $ac_try) 2>&5
13690   ac_status=$?
13691   echo "$as_me:13691: \$? = $ac_status" >&5
13692   (exit "$ac_status"); }; }; then
13693   cf_cv_wchar_t=yes
13694 else
13695   echo "$as_me: failed program was:" >&5
13696 cat "conftest.$ac_ext" >&5
13697 cf_cv_wchar_t=unknown
13698 fi
13699 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13700 fi
13701 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13702 fi
13703 echo "$as_me:13703: result: $cf_cv_wchar_t" >&5
13704 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13705
13706 if test "$cf_cv_wchar_t" = yes ; then
13707
13708 cat >>confdefs.h <<\EOF
13709 #define NEED_WCHAR_H 1
13710 EOF
13711
13712         NEED_WCHAR_H=1
13713 fi
13714
13715 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13716 if test "$cf_cv_wchar_t" = unknown ; then
13717         NCURSES_WCHAR_T=1
13718 fi
13719
13720 # if we find wchar_t in either place, use substitution to provide a fallback.
13721 if test "$cf_cv_wchar_t" != unknown ; then
13722         NCURSES_OK_WCHAR_T=1
13723 fi
13724
13725 # This is needed on Tru64 5.0 to declare wint_t
13726 echo "$as_me:13726: checking if we must include wchar.h to declare wint_t" >&5
13727 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13728 if test "${cf_cv_wint_t+set}" = set; then
13729   echo $ECHO_N "(cached) $ECHO_C" >&6
13730 else
13731
13732 cat >"conftest.$ac_ext" <<_ACEOF
13733 #line 13733 "configure"
13734 #include "confdefs.h"
13735
13736 #include <stdlib.h>
13737 #include <stdarg.h>
13738 #include <stdio.h>
13739 #ifdef HAVE_LIBUTF8_H
13740 #include <libutf8.h>
13741 #endif
13742 int
13743 main (void)
13744 {
13745 wint_t state; (void)state
13746   ;
13747   return 0;
13748 }
13749 _ACEOF
13750 rm -f "conftest.$ac_objext"
13751 if { (eval echo "$as_me:13751: \"$ac_compile\"") >&5
13752   (eval $ac_compile) 2>&5
13753   ac_status=$?
13754   echo "$as_me:13754: \$? = $ac_status" >&5
13755   (exit "$ac_status"); } &&
13756          { ac_try='test -s "conftest.$ac_objext"'
13757   { (eval echo "$as_me:13757: \"$ac_try\"") >&5
13758   (eval $ac_try) 2>&5
13759   ac_status=$?
13760   echo "$as_me:13760: \$? = $ac_status" >&5
13761   (exit "$ac_status"); }; }; then
13762   cf_cv_wint_t=no
13763 else
13764   echo "$as_me: failed program was:" >&5
13765 cat "conftest.$ac_ext" >&5
13766 cat >"conftest.$ac_ext" <<_ACEOF
13767 #line 13767 "configure"
13768 #include "confdefs.h"
13769
13770 #include <stdlib.h>
13771 #include <stdarg.h>
13772 #include <stdio.h>
13773 #include <wchar.h>
13774 #ifdef HAVE_LIBUTF8_H
13775 #include <libutf8.h>
13776 #endif
13777 int
13778 main (void)
13779 {
13780 wint_t value; (void) value
13781   ;
13782   return 0;
13783 }
13784 _ACEOF
13785 rm -f "conftest.$ac_objext"
13786 if { (eval echo "$as_me:13786: \"$ac_compile\"") >&5
13787   (eval $ac_compile) 2>&5
13788   ac_status=$?
13789   echo "$as_me:13789: \$? = $ac_status" >&5
13790   (exit "$ac_status"); } &&
13791          { ac_try='test -s "conftest.$ac_objext"'
13792   { (eval echo "$as_me:13792: \"$ac_try\"") >&5
13793   (eval $ac_try) 2>&5
13794   ac_status=$?
13795   echo "$as_me:13795: \$? = $ac_status" >&5
13796   (exit "$ac_status"); }; }; then
13797   cf_cv_wint_t=yes
13798 else
13799   echo "$as_me: failed program was:" >&5
13800 cat "conftest.$ac_ext" >&5
13801 cf_cv_wint_t=unknown
13802 fi
13803 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13804 fi
13805 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13806 fi
13807 echo "$as_me:13807: result: $cf_cv_wint_t" >&5
13808 echo "${ECHO_T}$cf_cv_wint_t" >&6
13809
13810 if test "$cf_cv_wint_t" = yes ; then
13811
13812 cat >>confdefs.h <<\EOF
13813 #define NEED_WCHAR_H 1
13814 EOF
13815
13816         NEED_WCHAR_H=1
13817 fi
13818
13819 # if we do not find wint_t in either place, use substitution to provide a fallback.
13820 if test "$cf_cv_wint_t" = unknown ; then
13821         NCURSES_WINT_T=1
13822 fi
13823
13824 # if we find wint_t in either place, use substitution to provide a fallback.
13825 if test "$cf_cv_wint_t" != unknown ; then
13826         NCURSES_OK_WINT_T=1
13827 fi
13828
13829         if test "$NCURSES_MBSTATE_T" != 0; then
13830
13831 cat >>confdefs.h <<\EOF
13832 #define NEED_MBSTATE_T_DEF 1
13833 EOF
13834
13835         fi
13836 fi
13837
13838 ###   use option --disable-lp64 to allow long chtype
13839 echo "$as_me:13839: checking whether to enable _LP64 definition in curses.h" >&5
13840 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13841
13842 # Check whether --enable-lp64 or --disable-lp64 was given.
13843 if test "${enable_lp64+set}" = set; then
13844   enableval="$enable_lp64"
13845   with_lp64=$enableval
13846 else
13847   with_lp64=$cf_dft_with_lp64
13848 fi;
13849 echo "$as_me:13849: result: $with_lp64" >&5
13850 echo "${ECHO_T}$with_lp64" >&6
13851
13852 if test "x$with_lp64" = xyes ; then
13853         cf_cv_enable_lp64=1
13854 else
13855         cf_cv_enable_lp64=0
13856 fi
13857
13858 # Check whether --enable-largefile or --disable-largefile was given.
13859 if test "${enable_largefile+set}" = set; then
13860   enableval="$enable_largefile"
13861
13862 fi;
13863 if test "$enable_largefile" != no; then
13864
13865   echo "$as_me:13865: checking for special C compiler options needed for large files" >&5
13866 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13867 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13868   echo $ECHO_N "(cached) $ECHO_C" >&6
13869 else
13870   ac_cv_sys_largefile_CC=no
13871      if test "$GCC" != yes; then
13872        ac_save_CC=$CC
13873        while :; do
13874          # IRIX 6.2 and later do not support large files by default,
13875          # so use the C compiler's -n32 option if that helps.
13876          cat >"conftest.$ac_ext" <<_ACEOF
13877 #line 13877 "configure"
13878 #include "confdefs.h"
13879 #include <sys/types.h>
13880  /* Check that off_t can represent 2**63 - 1 correctly.
13881     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13882     since some C++ compilers masquerading as C compilers
13883     incorrectly reject 9223372036854775807.  */
13884 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13885   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13886                        && LARGE_OFF_T % 2147483647 == 1)
13887                       ? 1 : -1];
13888 int
13889 main (void)
13890 {
13891
13892   ;
13893   return 0;
13894 }
13895 _ACEOF
13896          rm -f "conftest.$ac_objext"
13897 if { (eval echo "$as_me:13897: \"$ac_compile\"") >&5
13898   (eval $ac_compile) 2>&5
13899   ac_status=$?
13900   echo "$as_me:13900: \$? = $ac_status" >&5
13901   (exit "$ac_status"); } &&
13902          { ac_try='test -s "conftest.$ac_objext"'
13903   { (eval echo "$as_me:13903: \"$ac_try\"") >&5
13904   (eval $ac_try) 2>&5
13905   ac_status=$?
13906   echo "$as_me:13906: \$? = $ac_status" >&5
13907   (exit "$ac_status"); }; }; then
13908   break
13909 else
13910   echo "$as_me: failed program was:" >&5
13911 cat "conftest.$ac_ext" >&5
13912 fi
13913 rm -f "conftest.$ac_objext"
13914          CC="$CC -n32"
13915          rm -f "conftest.$ac_objext"
13916 if { (eval echo "$as_me:13916: \"$ac_compile\"") >&5
13917   (eval $ac_compile) 2>&5
13918   ac_status=$?
13919   echo "$as_me:13919: \$? = $ac_status" >&5
13920   (exit "$ac_status"); } &&
13921          { ac_try='test -s "conftest.$ac_objext"'
13922   { (eval echo "$as_me:13922: \"$ac_try\"") >&5
13923   (eval $ac_try) 2>&5
13924   ac_status=$?
13925   echo "$as_me:13925: \$? = $ac_status" >&5
13926   (exit "$ac_status"); }; }; then
13927   ac_cv_sys_largefile_CC=' -n32'; break
13928 else
13929   echo "$as_me: failed program was:" >&5
13930 cat "conftest.$ac_ext" >&5
13931 fi
13932 rm -f "conftest.$ac_objext"
13933          break
13934        done
13935        CC=$ac_save_CC
13936        rm -f "conftest.$ac_ext"
13937     fi
13938 fi
13939 echo "$as_me:13939: result: $ac_cv_sys_largefile_CC" >&5
13940 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13941   if test "$ac_cv_sys_largefile_CC" != no; then
13942     CC=$CC$ac_cv_sys_largefile_CC
13943   fi
13944
13945   echo "$as_me:13945: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13946 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13947 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13948   echo $ECHO_N "(cached) $ECHO_C" >&6
13949 else
13950   while :; do
13951   ac_cv_sys_file_offset_bits=no
13952   cat >"conftest.$ac_ext" <<_ACEOF
13953 #line 13953 "configure"
13954 #include "confdefs.h"
13955 #include <sys/types.h>
13956  /* Check that off_t can represent 2**63 - 1 correctly.
13957     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13958     since some C++ compilers masquerading as C compilers
13959     incorrectly reject 9223372036854775807.  */
13960 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13961   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13962                        && LARGE_OFF_T % 2147483647 == 1)
13963                       ? 1 : -1];
13964 int
13965 main (void)
13966 {
13967
13968   ;
13969   return 0;
13970 }
13971 _ACEOF
13972 rm -f "conftest.$ac_objext"
13973 if { (eval echo "$as_me:13973: \"$ac_compile\"") >&5
13974   (eval $ac_compile) 2>&5
13975   ac_status=$?
13976   echo "$as_me:13976: \$? = $ac_status" >&5
13977   (exit "$ac_status"); } &&
13978          { ac_try='test -s "conftest.$ac_objext"'
13979   { (eval echo "$as_me:13979: \"$ac_try\"") >&5
13980   (eval $ac_try) 2>&5
13981   ac_status=$?
13982   echo "$as_me:13982: \$? = $ac_status" >&5
13983   (exit "$ac_status"); }; }; then
13984   break
13985 else
13986   echo "$as_me: failed program was:" >&5
13987 cat "conftest.$ac_ext" >&5
13988 fi
13989 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13990   cat >"conftest.$ac_ext" <<_ACEOF
13991 #line 13991 "configure"
13992 #include "confdefs.h"
13993 #define _FILE_OFFSET_BITS 64
13994 #include <sys/types.h>
13995  /* Check that off_t can represent 2**63 - 1 correctly.
13996     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13997     since some C++ compilers masquerading as C compilers
13998     incorrectly reject 9223372036854775807.  */
13999 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14000   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14001                        && LARGE_OFF_T % 2147483647 == 1)
14002                       ? 1 : -1];
14003 int
14004 main (void)
14005 {
14006
14007   ;
14008   return 0;
14009 }
14010 _ACEOF
14011 rm -f "conftest.$ac_objext"
14012 if { (eval echo "$as_me:14012: \"$ac_compile\"") >&5
14013   (eval $ac_compile) 2>&5
14014   ac_status=$?
14015   echo "$as_me:14015: \$? = $ac_status" >&5
14016   (exit "$ac_status"); } &&
14017          { ac_try='test -s "conftest.$ac_objext"'
14018   { (eval echo "$as_me:14018: \"$ac_try\"") >&5
14019   (eval $ac_try) 2>&5
14020   ac_status=$?
14021   echo "$as_me:14021: \$? = $ac_status" >&5
14022   (exit "$ac_status"); }; }; then
14023   ac_cv_sys_file_offset_bits=64; break
14024 else
14025   echo "$as_me: failed program was:" >&5
14026 cat "conftest.$ac_ext" >&5
14027 fi
14028 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14029   break
14030 done
14031 fi
14032 echo "$as_me:14032: result: $ac_cv_sys_file_offset_bits" >&5
14033 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14034 if test "$ac_cv_sys_file_offset_bits" != no; then
14035
14036 cat >>confdefs.h <<EOF
14037 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14038 EOF
14039
14040 fi
14041 rm -rf conftest*
14042   echo "$as_me:14042: checking for _LARGE_FILES value needed for large files" >&5
14043 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14044 if test "${ac_cv_sys_large_files+set}" = set; then
14045   echo $ECHO_N "(cached) $ECHO_C" >&6
14046 else
14047   while :; do
14048   ac_cv_sys_large_files=no
14049   cat >"conftest.$ac_ext" <<_ACEOF
14050 #line 14050 "configure"
14051 #include "confdefs.h"
14052 #include <sys/types.h>
14053  /* Check that off_t can represent 2**63 - 1 correctly.
14054     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14055     since some C++ compilers masquerading as C compilers
14056     incorrectly reject 9223372036854775807.  */
14057 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14058   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14059                        && LARGE_OFF_T % 2147483647 == 1)
14060                       ? 1 : -1];
14061 int
14062 main (void)
14063 {
14064
14065   ;
14066   return 0;
14067 }
14068 _ACEOF
14069 rm -f "conftest.$ac_objext"
14070 if { (eval echo "$as_me:14070: \"$ac_compile\"") >&5
14071   (eval $ac_compile) 2>&5
14072   ac_status=$?
14073   echo "$as_me:14073: \$? = $ac_status" >&5
14074   (exit "$ac_status"); } &&
14075          { ac_try='test -s "conftest.$ac_objext"'
14076   { (eval echo "$as_me:14076: \"$ac_try\"") >&5
14077   (eval $ac_try) 2>&5
14078   ac_status=$?
14079   echo "$as_me:14079: \$? = $ac_status" >&5
14080   (exit "$ac_status"); }; }; then
14081   break
14082 else
14083   echo "$as_me: failed program was:" >&5
14084 cat "conftest.$ac_ext" >&5
14085 fi
14086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14087   cat >"conftest.$ac_ext" <<_ACEOF
14088 #line 14088 "configure"
14089 #include "confdefs.h"
14090 #define _LARGE_FILES 1
14091 #include <sys/types.h>
14092  /* Check that off_t can represent 2**63 - 1 correctly.
14093     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14094     since some C++ compilers masquerading as C compilers
14095     incorrectly reject 9223372036854775807.  */
14096 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14097   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14098                        && LARGE_OFF_T % 2147483647 == 1)
14099                       ? 1 : -1];
14100 int
14101 main (void)
14102 {
14103
14104   ;
14105   return 0;
14106 }
14107 _ACEOF
14108 rm -f "conftest.$ac_objext"
14109 if { (eval echo "$as_me:14109: \"$ac_compile\"") >&5
14110   (eval $ac_compile) 2>&5
14111   ac_status=$?
14112   echo "$as_me:14112: \$? = $ac_status" >&5
14113   (exit "$ac_status"); } &&
14114          { ac_try='test -s "conftest.$ac_objext"'
14115   { (eval echo "$as_me:14115: \"$ac_try\"") >&5
14116   (eval $ac_try) 2>&5
14117   ac_status=$?
14118   echo "$as_me:14118: \$? = $ac_status" >&5
14119   (exit "$ac_status"); }; }; then
14120   ac_cv_sys_large_files=1; break
14121 else
14122   echo "$as_me: failed program was:" >&5
14123 cat "conftest.$ac_ext" >&5
14124 fi
14125 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14126   break
14127 done
14128 fi
14129 echo "$as_me:14129: result: $ac_cv_sys_large_files" >&5
14130 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14131 if test "$ac_cv_sys_large_files" != no; then
14132
14133 cat >>confdefs.h <<EOF
14134 #define _LARGE_FILES $ac_cv_sys_large_files
14135 EOF
14136
14137 fi
14138 rm -rf conftest*
14139 fi
14140
14141         if test "$enable_largefile" != no ; then
14142         echo "$as_me:14142: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14143 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14144 if test "${ac_cv_sys_largefile_source+set}" = set; then
14145   echo $ECHO_N "(cached) $ECHO_C" >&6
14146 else
14147   while :; do
14148   ac_cv_sys_largefile_source=no
14149   cat >"conftest.$ac_ext" <<_ACEOF
14150 #line 14150 "configure"
14151 #include "confdefs.h"
14152 #include <stdio.h>
14153     #include <sys/types.h>
14154 int
14155 main (void)
14156 {
14157
14158     int (*my_fseeko)(FILE *, off_t, int) = fseeko;
14159     return my_fseeko(stdin, 0, 0);
14160   ;
14161   return 0;
14162 }
14163 _ACEOF
14164 rm -f "conftest.$ac_objext"
14165 if { (eval echo "$as_me:14165: \"$ac_compile\"") >&5
14166   (eval $ac_compile) 2>&5
14167   ac_status=$?
14168   echo "$as_me:14168: \$? = $ac_status" >&5
14169   (exit "$ac_status"); } &&
14170          { ac_try='test -s "conftest.$ac_objext"'
14171   { (eval echo "$as_me:14171: \"$ac_try\"") >&5
14172   (eval $ac_try) 2>&5
14173   ac_status=$?
14174   echo "$as_me:14174: \$? = $ac_status" >&5
14175   (exit "$ac_status"); }; }; then
14176   break
14177 else
14178   echo "$as_me: failed program was:" >&5
14179 cat "conftest.$ac_ext" >&5
14180 fi
14181 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14182   cat >"conftest.$ac_ext" <<_ACEOF
14183 #line 14183 "configure"
14184 #include "confdefs.h"
14185 #define _LARGEFILE_SOURCE 1
14186 #include <stdio.h>
14187     #include <sys/types.h>
14188 int
14189 main (void)
14190 {
14191
14192     int (*my_fseeko)(FILE *, off_t, int) = fseeko;
14193     return my_fseeko(stdin, 0, 0);
14194   ;
14195   return 0;
14196 }
14197 _ACEOF
14198 rm -f "conftest.$ac_objext"
14199 if { (eval echo "$as_me:14199: \"$ac_compile\"") >&5
14200   (eval $ac_compile) 2>&5
14201   ac_status=$?
14202   echo "$as_me:14202: \$? = $ac_status" >&5
14203   (exit "$ac_status"); } &&
14204          { ac_try='test -s "conftest.$ac_objext"'
14205   { (eval echo "$as_me:14205: \"$ac_try\"") >&5
14206   (eval $ac_try) 2>&5
14207   ac_status=$?
14208   echo "$as_me:14208: \$? = $ac_status" >&5
14209   (exit "$ac_status"); }; }; then
14210   ac_cv_sys_largefile_source=1; break
14211 else
14212   echo "$as_me: failed program was:" >&5
14213 cat "conftest.$ac_ext" >&5
14214 fi
14215 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14216   break
14217 done
14218 fi
14219 echo "$as_me:14219: result: $ac_cv_sys_largefile_source" >&5
14220 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14221 if test "$ac_cv_sys_largefile_source" != no; then
14222
14223 cat >>confdefs.h <<EOF
14224 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14225 EOF
14226
14227 fi
14228 rm -rf conftest*
14229
14230 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14231 # in glibc 2.1.3, but that breaks too many other things.
14232 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14233 echo "$as_me:14233: checking for fseeko" >&5
14234 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14235 if test "${ac_cv_func_fseeko+set}" = set; then
14236   echo $ECHO_N "(cached) $ECHO_C" >&6
14237 else
14238   cat >"conftest.$ac_ext" <<_ACEOF
14239 #line 14239 "configure"
14240 #include "confdefs.h"
14241 #include <stdio.h>
14242                              #include <sys/types.h>
14243 int
14244 main (void)
14245 {
14246 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
14247                             return my_fseeko && my_fseeko (stdin, 0, 0);
14248   ;
14249   return 0;
14250 }
14251 _ACEOF
14252 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14253 if { (eval echo "$as_me:14253: \"$ac_link\"") >&5
14254   (eval $ac_link) 2>&5
14255   ac_status=$?
14256   echo "$as_me:14256: \$? = $ac_status" >&5
14257   (exit "$ac_status"); } &&
14258          { ac_try='test -s "conftest$ac_exeext"'
14259   { (eval echo "$as_me:14259: \"$ac_try\"") >&5
14260   (eval $ac_try) 2>&5
14261   ac_status=$?
14262   echo "$as_me:14262: \$? = $ac_status" >&5
14263   (exit "$ac_status"); }; }; then
14264   ac_cv_func_fseeko=yes
14265 else
14266   echo "$as_me: failed program was:" >&5
14267 cat "conftest.$ac_ext" >&5
14268 ac_cv_func_fseeko=no
14269 fi
14270 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14271 fi
14272 echo "$as_me:14272: result: $ac_cv_func_fseeko" >&5
14273 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14274 if test $ac_cv_func_fseeko = yes; then
14275
14276 cat >>confdefs.h <<\EOF
14277 #define HAVE_FSEEKO 1
14278 EOF
14279
14280 fi
14281
14282         # Normally we would collect these definitions in the config.h,
14283         # but (like _XOPEN_SOURCE), some environments rely on having these
14284         # defined before any of the system headers are included.  Another
14285         # case comes up with C++, e.g., on AIX the compiler compiles the
14286         # header files by themselves before looking at the body files it is
14287         # told to compile.  For ncurses, those header files do not include
14288         # the config.h
14289         if test "$ac_cv_sys_large_files" != no
14290         then
14291
14292         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14293         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14294
14295         fi
14296         if test "$ac_cv_sys_largefile_source" != no
14297         then
14298
14299         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14300         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14301
14302         fi
14303         if test "$ac_cv_sys_file_offset_bits" != no
14304         then
14305
14306         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14307         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14308
14309         fi
14310
14311         echo "$as_me:14311: checking whether to use struct dirent64" >&5
14312 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14313 if test "${cf_cv_struct_dirent64+set}" = set; then
14314   echo $ECHO_N "(cached) $ECHO_C" >&6
14315 else
14316
14317                 cat >"conftest.$ac_ext" <<_ACEOF
14318 #line 14318 "configure"
14319 #include "confdefs.h"
14320
14321 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14322 #include <sys/types.h>
14323 #include <dirent.h>
14324
14325 #ifndef __REDIRECT
14326 /* if transitional largefile support is setup, this is true */
14327 extern struct dirent64 * readdir(DIR *);
14328 #endif
14329
14330 int
14331 main (void)
14332 {
14333
14334                 DIR *dp = opendir(".");
14335                 struct dirent64 *x = readdir(dp);
14336                 struct dirent *y = readdir(dp);
14337                 int z = x - y;
14338                 (void)z;
14339
14340   ;
14341   return 0;
14342 }
14343 _ACEOF
14344 rm -f "conftest.$ac_objext"
14345 if { (eval echo "$as_me:14345: \"$ac_compile\"") >&5
14346   (eval $ac_compile) 2>&5
14347   ac_status=$?
14348   echo "$as_me:14348: \$? = $ac_status" >&5
14349   (exit "$ac_status"); } &&
14350          { ac_try='test -s "conftest.$ac_objext"'
14351   { (eval echo "$as_me:14351: \"$ac_try\"") >&5
14352   (eval $ac_try) 2>&5
14353   ac_status=$?
14354   echo "$as_me:14354: \$? = $ac_status" >&5
14355   (exit "$ac_status"); }; }; then
14356   cf_cv_struct_dirent64=yes
14357 else
14358   echo "$as_me: failed program was:" >&5
14359 cat "conftest.$ac_ext" >&5
14360 cf_cv_struct_dirent64=no
14361 fi
14362 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14363
14364 fi
14365 echo "$as_me:14365: result: $cf_cv_struct_dirent64" >&5
14366 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14367         test "$cf_cv_struct_dirent64" = yes &&
14368 cat >>confdefs.h <<\EOF
14369 #define HAVE_STRUCT_DIRENT64 1
14370 EOF
14371
14372         fi
14373
14374 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
14375 echo "$as_me:14375: checking if you want tparm not to use X/Open fixed-parameter list" >&5
14376 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
14377
14378 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
14379 if test "${enable_tparm_varargs+set}" = set; then
14380   enableval="$enable_tparm_varargs"
14381   with_tparm_varargs=$enableval
14382 else
14383   with_tparm_varargs=yes
14384 fi;
14385 echo "$as_me:14385: result: $with_tparm_varargs" >&5
14386 echo "${ECHO_T}$with_tparm_varargs" >&6
14387 NCURSES_TPARM_VARARGS=0
14388 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
14389
14390 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
14391 if test "$with_ticlib" != no ; then
14392 echo "$as_me:14392: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
14393 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
14394
14395 # Check whether --enable-tic-depends or --disable-tic-depends was given.
14396 if test "${enable_tic_depends+set}" = set; then
14397   enableval="$enable_tic_depends"
14398   with_tic_depends=$enableval
14399 else
14400   with_tic_depends=yes
14401 fi;
14402 echo "$as_me:14402: result: $with_tic_depends" >&5
14403 echo "${ECHO_T}$with_tic_depends" >&6
14404 else
14405         with_tic_depends=no
14406 fi
14407
14408 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
14409 echo "$as_me:14409: checking if you want to enable wattr* macros" >&5
14410 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
14411
14412 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
14413 if test "${enable_wattr_macros+set}" = set; then
14414   enableval="$enable_wattr_macros"
14415   with_wattr_macros=$enableval
14416 else
14417   with_wattr_macros=no
14418 fi;
14419 if [ "x$with_wattr_macros" != xyes ]; then
14420         NCURSES_WATTR_MACROS=0
14421         echo "$as_me:14421: result: no" >&5
14422 echo "${ECHO_T}no" >&6
14423 else
14424         NCURSES_WATTR_MACROS=1
14425         echo "$as_me:14425: result: yes" >&5
14426 echo "${ECHO_T}yes" >&6
14427 fi
14428
14429 echo "$as_me:14429: checking for X11 rgb file" >&5
14430 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14431
14432 # Check whether --with-x11-rgb or --without-x11-rgb was given.
14433 if test "${with_x11_rgb+set}" = set; then
14434   withval="$with_x11_rgb"
14435   RGB_PATH=$withval
14436 else
14437   RGB_PATH=auto
14438 fi;
14439
14440 if test "x$RGB_PATH" = xauto
14441 then
14442         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14443         for cf_path in \
14444                 /opt/local/share/X11/rgb.txt \
14445                 /opt/X11/share/X11/rgb.txt \
14446                 /usr/share/X11/rgb.txt \
14447                 /usr/X11/share/X11/rgb.txt \
14448                 /usr/X11/lib/X11/rgb.txt \
14449                 /usr/lib/X11/rgb.txt \
14450                 /etc/X11/rgb.txt \
14451                 /usr/pkg/lib/X11/rgb.txt \
14452                 /usr/X11R7/lib/X11/rgb.txt \
14453                 /usr/X11R6/lib/X11/rgb.txt \
14454                 /usr/X11R5/lib/X11/rgb.txt \
14455                 /usr/X11R4/lib/X11/rgb.txt \
14456                 /usr/local/lib/X11/rgb.txt \
14457                 /usr/local/share/X11/rgb.txt \
14458                 /usr/lib64/X11/rgb.txt
14459         do
14460                 if test -f "$cf_path" ; then
14461                         RGB_PATH="$cf_path"
14462                         break
14463                 fi
14464         done
14465 else
14466         cf_path=$RGB_PATH
14467
14468 if test "x$prefix" != xNONE; then
14469         cf_path_syntax="$prefix"
14470 else
14471         cf_path_syntax="$ac_default_prefix"
14472 fi
14473
14474 case ".$cf_path" in
14475 (.\$\(*\)*|.\'*\'*)
14476         ;;
14477 (..|./*|.\\*)
14478         ;;
14479 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14480         ;;
14481 (.\$\{*prefix\}*|.\$\{*dir\}*)
14482         eval cf_path="$cf_path"
14483         case ".$cf_path" in
14484         (.NONE/*)
14485                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14486                 ;;
14487         esac
14488         ;;
14489 (.no|.NONE/*)
14490         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14491         ;;
14492 (*)
14493         { { echo "$as_me:14493: error: expected a pathname, not \"$cf_path\"" >&5
14494 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14495    { (exit 1); exit 1; }; }
14496         ;;
14497 esac
14498
14499 fi
14500
14501 echo "$as_me:14501: result: $RGB_PATH" >&5
14502 echo "${ECHO_T}$RGB_PATH" >&6
14503
14504 cat >>confdefs.h <<EOF
14505 #define RGB_PATH "$cf_path"
14506 EOF
14507
14508 no_x11_rgb=
14509 if test "$RGB_PATH" = no
14510 then
14511         no_x11_rgb="#"
14512 fi
14513
14514 ###   use option --with-bool to override bool's type
14515
14516 echo "$as_me:14516: checking for type of bool" >&5
14517 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14518
14519 # Check whether --with-bool or --without-bool was given.
14520 if test "${with_bool+set}" = set; then
14521   withval="$with_bool"
14522   NCURSES_BOOL="$withval"
14523 else
14524   NCURSES_BOOL=auto
14525 fi;
14526 echo "$as_me:14526: result: $NCURSES_BOOL" >&5
14527 echo "${ECHO_T}$NCURSES_BOOL" >&6
14528 case x$NCURSES_BOOL in
14529 (x|xyes|xno)
14530         { { echo "$as_me:14530: error: expected a type name for bool" >&5
14531 echo "$as_me: error: expected a type name for bool" >&2;}
14532    { (exit 1); exit 1; }; }
14533         ;;
14534 esac
14535
14536 echo "$as_me:14536: checking for alternate terminal capabilities file" >&5
14537 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14538
14539 # Check whether --with-caps or --without-caps was given.
14540 if test "${with_caps+set}" = set; then
14541   withval="$with_caps"
14542   TERMINFO_CAPS=Caps.$withval
14543 else
14544   TERMINFO_CAPS=Caps
14545 fi;
14546 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14547 then
14548         { echo "$as_me:14548: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14549 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14550         TERMINFO_CAPS=Caps
14551 fi
14552 echo "$as_me:14552: result: $TERMINFO_CAPS" >&5
14553 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14554
14555 ###   use option --with-chtype to override chtype's type
14556
14557 echo "$as_me:14557: checking for type of chtype" >&5
14558 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14559
14560 # Check whether --with-chtype or --without-chtype was given.
14561 if test "${with_chtype+set}" = set; then
14562   withval="$with_chtype"
14563   NCURSES_CHTYPE="$withval"
14564 else
14565   NCURSES_CHTYPE=$cf_dft_chtype
14566 fi;
14567 echo "$as_me:14567: result: $NCURSES_CHTYPE" >&5
14568 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14569 case x$NCURSES_CHTYPE in
14570 (x|xyes|xno)
14571         { { echo "$as_me:14571: error: expected a type name for chtype" >&5
14572 echo "$as_me: error: expected a type name for chtype" >&2;}
14573    { (exit 1); exit 1; }; }
14574         ;;
14575 esac
14576
14577 ###   use option --with-ospeed to override ospeed's type
14578
14579 echo "$as_me:14579: checking for type of ospeed" >&5
14580 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14581
14582 # Check whether --with-ospeed or --without-ospeed was given.
14583 if test "${with_ospeed+set}" = set; then
14584   withval="$with_ospeed"
14585   NCURSES_OSPEED="$withval"
14586 else
14587   NCURSES_OSPEED=short
14588 fi;
14589 echo "$as_me:14589: result: $NCURSES_OSPEED" >&5
14590 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14591 case x$NCURSES_OSPEED in
14592 (x|xyes|xno)
14593         { { echo "$as_me:14593: error: expected a type name for ospeed" >&5
14594 echo "$as_me: error: expected a type name for ospeed" >&2;}
14595    { (exit 1); exit 1; }; }
14596         ;;
14597 esac
14598
14599 ###   use option --with-mmask-t to override mmask_t's type
14600
14601 echo "$as_me:14601: checking for type of mmask-t" >&5
14602 echo $ECHO_N "checking for type of mmask-t... $ECHO_C" >&6
14603
14604 # Check whether --with-mmask-t or --without-mmask-t was given.
14605 if test "${with_mmask_t+set}" = set; then
14606   withval="$with_mmask_t"
14607   NCURSES_MMASK_T="$withval"
14608 else
14609   NCURSES_MMASK_T=$cf_dft_mmask_t
14610 fi;
14611 echo "$as_me:14611: result: $NCURSES_MMASK_T" >&5
14612 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14613 case x$NCURSES_MMASK_T in
14614 (x|xyes|xno)
14615         { { echo "$as_me:14615: error: expected a type name for mmask-t" >&5
14616 echo "$as_me: error: expected a type name for mmask-t" >&2;}
14617    { (exit 1); exit 1; }; }
14618         ;;
14619 esac
14620
14621 ###   use option --with-ccharw-max to override CCHARW_MAX size
14622 echo "$as_me:14622: checking for size CCHARW_MAX" >&5
14623 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14624
14625 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14626 if test "${with_ccharw_max+set}" = set; then
14627   withval="$with_ccharw_max"
14628   NCURSES_CCHARW_MAX="$withval"
14629 else
14630   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14631 fi;
14632 echo "$as_me:14632: result: $NCURSES_CCHARW_MAX" >&5
14633 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14634
14635 echo "$as_me:14635: checking for signed char" >&5
14636 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14637 if test "${ac_cv_type_signed_char+set}" = set; then
14638   echo $ECHO_N "(cached) $ECHO_C" >&6
14639 else
14640   cat >"conftest.$ac_ext" <<_ACEOF
14641 #line 14641 "configure"
14642 #include "confdefs.h"
14643 $ac_includes_default
14644 int
14645 main (void)
14646 {
14647 if ((signed char *) 0)
14648   return 0;
14649 if (sizeof (signed char))
14650   return 0;
14651   ;
14652   return 0;
14653 }
14654 _ACEOF
14655 rm -f "conftest.$ac_objext"
14656 if { (eval echo "$as_me:14656: \"$ac_compile\"") >&5
14657   (eval $ac_compile) 2>&5
14658   ac_status=$?
14659   echo "$as_me:14659: \$? = $ac_status" >&5
14660   (exit "$ac_status"); } &&
14661          { ac_try='test -s "conftest.$ac_objext"'
14662   { (eval echo "$as_me:14662: \"$ac_try\"") >&5
14663   (eval $ac_try) 2>&5
14664   ac_status=$?
14665   echo "$as_me:14665: \$? = $ac_status" >&5
14666   (exit "$ac_status"); }; }; then
14667   ac_cv_type_signed_char=yes
14668 else
14669   echo "$as_me: failed program was:" >&5
14670 cat "conftest.$ac_ext" >&5
14671 ac_cv_type_signed_char=no
14672 fi
14673 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14674 fi
14675 echo "$as_me:14675: result: $ac_cv_type_signed_char" >&5
14676 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14677
14678 echo "$as_me:14678: checking size of signed char" >&5
14679 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14680 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14681   echo $ECHO_N "(cached) $ECHO_C" >&6
14682 else
14683   if test "$ac_cv_type_signed_char" = yes; then
14684   if test "$cross_compiling" = yes; then
14685   # Depending upon the size, compute the lo and hi bounds.
14686 cat >"conftest.$ac_ext" <<_ACEOF
14687 #line 14687 "configure"
14688 #include "confdefs.h"
14689 $ac_includes_default
14690 int
14691 main (void)
14692 {
14693 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14694   ;
14695   return 0;
14696 }
14697 _ACEOF
14698 rm -f "conftest.$ac_objext"
14699 if { (eval echo "$as_me:14699: \"$ac_compile\"") >&5
14700   (eval $ac_compile) 2>&5
14701   ac_status=$?
14702   echo "$as_me:14702: \$? = $ac_status" >&5
14703   (exit "$ac_status"); } &&
14704          { ac_try='test -s "conftest.$ac_objext"'
14705   { (eval echo "$as_me:14705: \"$ac_try\"") >&5
14706   (eval $ac_try) 2>&5
14707   ac_status=$?
14708   echo "$as_me:14708: \$? = $ac_status" >&5
14709   (exit "$ac_status"); }; }; then
14710   ac_lo=0 ac_mid=0
14711   while :; do
14712     cat >"conftest.$ac_ext" <<_ACEOF
14713 #line 14713 "configure"
14714 #include "confdefs.h"
14715 $ac_includes_default
14716 int
14717 main (void)
14718 {
14719 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14720   ;
14721   return 0;
14722 }
14723 _ACEOF
14724 rm -f "conftest.$ac_objext"
14725 if { (eval echo "$as_me:14725: \"$ac_compile\"") >&5
14726   (eval $ac_compile) 2>&5
14727   ac_status=$?
14728   echo "$as_me:14728: \$? = $ac_status" >&5
14729   (exit "$ac_status"); } &&
14730          { ac_try='test -s "conftest.$ac_objext"'
14731   { (eval echo "$as_me:14731: \"$ac_try\"") >&5
14732   (eval $ac_try) 2>&5
14733   ac_status=$?
14734   echo "$as_me:14734: \$? = $ac_status" >&5
14735   (exit "$ac_status"); }; }; then
14736   ac_hi=$ac_mid; break
14737 else
14738   echo "$as_me: failed program was:" >&5
14739 cat "conftest.$ac_ext" >&5
14740 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14741 fi
14742 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14743   done
14744 else
14745   echo "$as_me: failed program was:" >&5
14746 cat "conftest.$ac_ext" >&5
14747 ac_hi=-1 ac_mid=-1
14748   while :; do
14749     cat >"conftest.$ac_ext" <<_ACEOF
14750 #line 14750 "configure"
14751 #include "confdefs.h"
14752 $ac_includes_default
14753 int
14754 main (void)
14755 {
14756 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14757   ;
14758   return 0;
14759 }
14760 _ACEOF
14761 rm -f "conftest.$ac_objext"
14762 if { (eval echo "$as_me:14762: \"$ac_compile\"") >&5
14763   (eval $ac_compile) 2>&5
14764   ac_status=$?
14765   echo "$as_me:14765: \$? = $ac_status" >&5
14766   (exit "$ac_status"); } &&
14767          { ac_try='test -s "conftest.$ac_objext"'
14768   { (eval echo "$as_me:14768: \"$ac_try\"") >&5
14769   (eval $ac_try) 2>&5
14770   ac_status=$?
14771   echo "$as_me:14771: \$? = $ac_status" >&5
14772   (exit "$ac_status"); }; }; then
14773   ac_lo=$ac_mid; break
14774 else
14775   echo "$as_me: failed program was:" >&5
14776 cat "conftest.$ac_ext" >&5
14777 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14778 fi
14779 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14780   done
14781 fi
14782 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14783 # Binary search between lo and hi bounds.
14784 while test "x$ac_lo" != "x$ac_hi"; do
14785   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14786   cat >"conftest.$ac_ext" <<_ACEOF
14787 #line 14787 "configure"
14788 #include "confdefs.h"
14789 $ac_includes_default
14790 int
14791 main (void)
14792 {
14793 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14794   ;
14795   return 0;
14796 }
14797 _ACEOF
14798 rm -f "conftest.$ac_objext"
14799 if { (eval echo "$as_me:14799: \"$ac_compile\"") >&5
14800   (eval $ac_compile) 2>&5
14801   ac_status=$?
14802   echo "$as_me:14802: \$? = $ac_status" >&5
14803   (exit "$ac_status"); } &&
14804          { ac_try='test -s "conftest.$ac_objext"'
14805   { (eval echo "$as_me:14805: \"$ac_try\"") >&5
14806   (eval $ac_try) 2>&5
14807   ac_status=$?
14808   echo "$as_me:14808: \$? = $ac_status" >&5
14809   (exit "$ac_status"); }; }; then
14810   ac_hi=$ac_mid
14811 else
14812   echo "$as_me: failed program was:" >&5
14813 cat "conftest.$ac_ext" >&5
14814 ac_lo=`expr "$ac_mid" + 1`
14815 fi
14816 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14817 done
14818 ac_cv_sizeof_signed_char=$ac_lo
14819 else
14820   if test "$cross_compiling" = yes; then
14821   { { echo "$as_me:14821: error: cannot run test program while cross compiling" >&5
14822 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14823    { (exit 1); exit 1; }; }
14824 else
14825   cat >"conftest.$ac_ext" <<_ACEOF
14826 #line 14826 "configure"
14827 #include "confdefs.h"
14828 $ac_includes_default
14829 int
14830 main (void)
14831 {
14832 FILE *f = fopen ("conftest.val", "w");
14833 if (!f)
14834   $ac_main_return (1);
14835 fprintf (f, "%ld", (long)(sizeof (signed char)));
14836 fclose (f);
14837   ;
14838   return 0;
14839 }
14840 _ACEOF
14841 rm -f "conftest$ac_exeext"
14842 if { (eval echo "$as_me:14842: \"$ac_link\"") >&5
14843   (eval $ac_link) 2>&5
14844   ac_status=$?
14845   echo "$as_me:14845: \$? = $ac_status" >&5
14846   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14847   { (eval echo "$as_me:14847: \"$ac_try\"") >&5
14848   (eval $ac_try) 2>&5
14849   ac_status=$?
14850   echo "$as_me:14850: \$? = $ac_status" >&5
14851   (exit "$ac_status"); }; }; then
14852   ac_cv_sizeof_signed_char=`cat conftest.val`
14853 else
14854   echo "$as_me: program exited with status $ac_status" >&5
14855 echo "$as_me: failed program was:" >&5
14856 cat "conftest.$ac_ext" >&5
14857 fi
14858 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14859 fi
14860 fi
14861 rm -f conftest.val
14862 else
14863   ac_cv_sizeof_signed_char=0
14864 fi
14865 fi
14866 echo "$as_me:14866: result: $ac_cv_sizeof_signed_char" >&5
14867 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14868 cat >>confdefs.h <<EOF
14869 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14870 EOF
14871
14872 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14873         NCURSES_SBOOL="signed char"
14874 else
14875         NCURSES_SBOOL="char"
14876 fi
14877 echo "$as_me:14877: checking whether to use signed chars for Boolean array in term.h" >&5
14878 echo $ECHO_N "checking whether to use signed chars for Boolean array in term.h... $ECHO_C" >&6
14879
14880 # Check whether --enable-signed-char or --disable-signed-char was given.
14881 if test "${enable_signed_char+set}" = set; then
14882   enableval="$enable_signed_char"
14883   with_signed_char=$enableval
14884 else
14885   with_signed_char=$cf_dft_signed_char
14886 fi;
14887 echo "$as_me:14887: result: $with_signed_char" >&5
14888 echo "${ECHO_T}$with_signed_char" >&6
14889 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14890
14891 ###   use option --with-tparm-arg to override tparm's argument type
14892
14893 echo "$as_me:14893: checking for type of tparm-arg" >&5
14894 echo $ECHO_N "checking for type of tparm-arg... $ECHO_C" >&6
14895
14896 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14897 if test "${with_tparm_arg+set}" = set; then
14898   withval="$with_tparm_arg"
14899   NCURSES_TPARM_ARG="$withval"
14900 else
14901   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14902 fi;
14903 echo "$as_me:14903: result: $NCURSES_TPARM_ARG" >&5
14904 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14905 case x$NCURSES_TPARM_ARG in
14906 (x|xyes|xno)
14907         { { echo "$as_me:14907: error: expected a type name for tparm-arg" >&5
14908 echo "$as_me: error: expected a type name for tparm-arg" >&2;}
14909    { (exit 1); exit 1; }; }
14910         ;;
14911 esac
14912
14913 ### Enable compiling-in rcs id's
14914 echo "$as_me:14914: checking if RCS identifiers should be compiled-in" >&5
14915 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14916
14917 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14918 if test "${with_rcs_ids+set}" = set; then
14919   withval="$with_rcs_ids"
14920   with_rcs_ids=$withval
14921 else
14922   with_rcs_ids=no
14923 fi;
14924 echo "$as_me:14924: result: $with_rcs_ids" >&5
14925 echo "${ECHO_T}$with_rcs_ids" >&6
14926 test "x$with_rcs_ids" = xyes &&
14927 cat >>confdefs.h <<\EOF
14928 #define USE_RCS_IDS 1
14929 EOF
14930
14931 ###############################################################################
14932
14933 echo "$as_me:14933: checking format of man-pages" >&5
14934 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14935
14936 # Check whether --with-manpage-format or --without-manpage-format was given.
14937 if test "${with_manpage_format+set}" = set; then
14938   withval="$with_manpage_format"
14939   MANPAGE_FORMAT=$withval
14940 else
14941   MANPAGE_FORMAT=unknown
14942 fi;
14943
14944 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14945 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14946
14947 cf_unknown=
14948
14949 case "$MANPAGE_FORMAT" in
14950 (unknown)
14951         if test -z "$MANPATH" ; then
14952                 MANPATH="/usr/man:/usr/share/man"
14953         fi
14954
14955         # look for the 'date' man-page (it is most likely to be installed!)
14956         MANPAGE_FORMAT=
14957         cf_preform="no"
14958         cf_catonly="yes"
14959         cf_example="date"
14960
14961         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14962         for cf_dir in $MANPATH; do
14963                 test -z "$cf_dir" && cf_dir=/usr/man
14964                 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
14965                 do
14966                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14967                         if test "x$cf_test" = "x$cf_name" ; then
14968
14969                                 case "$cf_name" in
14970                                 (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
14971                                 (*.xz)  MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
14972                                 (*.gz)  MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14973                                 (*.Z)   MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14974                                 (*.0)   MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14975                                 (*)     MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14976                                 esac
14977
14978                                 case "$cf_name" in
14979                                 ($cf_dir/man*)
14980                                         cf_catonly=no
14981                                         ;;
14982                                 ($cf_dir/cat*)
14983                                         cf_preform=yes
14984                                         ;;
14985                                 esac
14986                                 break
14987                         fi
14988
14989                         # if we found a match in either man* or cat*, stop looking
14990                         if test -n "$MANPAGE_FORMAT" ; then
14991                                 cf_found=no
14992                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14993                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14994                                 case "$cf_name" in
14995                                 ($cf_dir/cat*)
14996                                         cf_found=yes
14997                                         ;;
14998                                 esac
14999                                 test "$cf_found" = yes && break
15000                         fi
15001                 done
15002                 # only check the first directory in $MANPATH where we find manpages
15003                 if test -n "$MANPAGE_FORMAT" ; then
15004                         break
15005                 fi
15006         done
15007         # if we did not find the example, just assume it is normal
15008         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
15009         IFS="$ac_save_ifs"
15010         ;;
15011 (*)
15012         for cf_option in $MANPAGE_FORMAT; do
15013         case "$cf_option" in
15014         (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
15015                 ;;
15016         (*)
15017                 cf_unknown="$cf_unknown $cf_option"
15018                 ;;
15019         esac
15020         done
15021         ;;
15022 esac
15023
15024 echo "$as_me:15024: result: $MANPAGE_FORMAT" >&5
15025 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
15026 if test -n "$cf_unknown" ; then
15027         { echo "$as_me:15027: WARNING: Unexpected manpage-format $cf_unknown" >&5
15028 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
15029 fi
15030
15031 cf_manpage_format=no
15032 cf_manpage_inboth=no
15033 cf_manpage_so_strip=
15034 cf_manpage_compress=
15035
15036 for cf_item in $MANPAGE_FORMAT
15037 do
15038 case "$cf_item" in
15039 (catonly)
15040         cf_manpage_format=yes
15041         cf_manpage_inboth=no
15042         ;;
15043 (formatted)
15044         cf_manpage_format=yes
15045         cf_manpage_inboth=yes
15046         ;;
15047 (compress)
15048         cf_manpage_so_strip="Z"
15049         cf_manpage_compress=compress
15050         ;;
15051 (gzip)
15052         cf_manpage_so_strip="gz"
15053         cf_manpage_compress=gzip
15054         ;;
15055 (bzip2)
15056         cf_manpage_so_strip="bz2"
15057         cf_manpage_compress=bzip2
15058         ;;
15059 (xz)
15060         cf_manpage_so_strip="xz"
15061         cf_manpage_compress=xz
15062         ;;
15063 esac
15064 done
15065
15066 echo "$as_me:15066: checking for manpage renaming" >&5
15067 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
15068
15069 # Check whether --with-manpage-renames or --without-manpage-renames was given.
15070 if test "${with_manpage_renames+set}" = set; then
15071   withval="$with_manpage_renames"
15072   MANPAGE_RENAMES=$withval
15073 else
15074   MANPAGE_RENAMES=yes
15075 fi;
15076
15077 case ".$MANPAGE_RENAMES" in
15078 (.no)
15079         ;;
15080 (.|.yes)
15081         # Debian 'man' program?
15082         if test -f /etc/debian_version ; then
15083                 MANPAGE_RENAMES=man/man_db.renames
15084         else
15085                 MANPAGE_RENAMES=no
15086         fi
15087         ;;
15088 esac
15089
15090 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
15091         MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
15092 elif test "$MANPAGE_RENAMES" = no ; then
15093         :
15094 elif test ! -f "$MANPAGE_RENAMES" ; then
15095         { { echo "$as_me:15095: error: not a filename: $MANPAGE_RENAMES" >&5
15096 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
15097    { (exit 1); exit 1; }; }
15098 fi
15099
15100 echo "$as_me:15100: result: $MANPAGE_RENAMES" >&5
15101 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
15102
15103 echo "$as_me:15103: checking if manpage aliases will be installed" >&5
15104 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
15105
15106 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
15107 if test "${with_manpage_aliases+set}" = set; then
15108   withval="$with_manpage_aliases"
15109   MANPAGE_ALIASES=$withval
15110 else
15111   MANPAGE_ALIASES=yes
15112 fi;
15113
15114 echo "$as_me:15114: result: $MANPAGE_ALIASES" >&5
15115 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
15116
15117 case "x$LN_S" in
15118 (xln*)
15119         cf_use_symlinks=yes
15120         ;;
15121 (*)
15122         cf_use_symlinks=no
15123         ;;
15124 esac
15125
15126 MANPAGE_SYMLINKS=no
15127 if test "$MANPAGE_ALIASES" = yes ; then
15128 echo "$as_me:15128: checking if manpage symlinks should be used" >&5
15129 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
15130
15131 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
15132 if test "${with_manpage_symlinks+set}" = set; then
15133   withval="$with_manpage_symlinks"
15134   MANPAGE_SYMLINKS=$withval
15135 else
15136   MANPAGE_SYMLINKS=$cf_use_symlinks
15137 fi;
15138
15139 if test "$cf_use_symlinks" = no; then
15140 if test "$MANPAGE_SYMLINKS" = yes ; then
15141         { echo "$as_me:15141: WARNING: cannot make symlinks" >&5
15142 echo "$as_me: WARNING: cannot make symlinks" >&2;}
15143         MANPAGE_SYMLINKS=no
15144 fi
15145 fi
15146
15147 echo "$as_me:15147: result: $MANPAGE_SYMLINKS" >&5
15148 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
15149 fi
15150
15151 echo "$as_me:15151: checking for manpage tbl" >&5
15152 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
15153
15154 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
15155 if test "${with_manpage_tbl+set}" = set; then
15156   withval="$with_manpage_tbl"
15157   MANPAGE_TBL=$withval
15158 else
15159   MANPAGE_TBL=no
15160 fi;
15161
15162 echo "$as_me:15162: result: $MANPAGE_TBL" >&5
15163 echo "${ECHO_T}$MANPAGE_TBL" >&6
15164
15165 if test "$prefix" = "NONE" ; then
15166         cf_prefix="$ac_default_prefix"
15167 else
15168         cf_prefix="$prefix"
15169 fi
15170
15171 test ! -d man && mkdir man
15172
15173 cf_edit_man=./edit_man.sh
15174 cf_man_alias=`pwd`/man_alias.sed
15175
15176 cat >$cf_edit_man <<CF_EOF
15177 #! $SHELL
15178 # this script is generated by the configure-script CF_MAN_PAGES macro.
15179
15180 prefix="$cf_prefix"
15181 datarootdir="$datarootdir"
15182 datadir="$datadir"
15183
15184 NCURSES_MAJOR="$NCURSES_MAJOR"
15185 NCURSES_MINOR="$NCURSES_MINOR"
15186 NCURSES_PATCH="$NCURSES_PATCH"
15187
15188 NCURSES_OSPEED="$NCURSES_OSPEED"
15189 TERMINFO="$TERMINFO"
15190 TERMINFO_DIRS="$TERMINFO_DIRS"
15191
15192 INSTALL="$INSTALL"
15193 INSTALL_DATA="$INSTALL_DATA"
15194
15195 transform="$program_transform_name"
15196
15197 TMP=\${TMPDIR:=/tmp}/man\$\$
15198 trap "rm -f \$TMP; exit 1" 1 2 3 15
15199 trap "rm -f \$TMP" 0
15200
15201 form=\$1
15202 shift || exit 1
15203
15204 verb=\$1
15205 shift || exit 1
15206
15207 mandir=\$1
15208 shift || exit 1
15209
15210 srcdir=\$1
15211 top_srcdir=\$srcdir/..
15212 shift || exit 1
15213
15214 if test "\$form" = normal ; then
15215         if test "$cf_manpage_format" = yes ; then
15216         if test "$cf_manpage_inboth" = no ; then
15217                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15218                 exit $?
15219         fi
15220         fi
15221         cf_subdir=\$mandir/man
15222         cf_tables=$MANPAGE_TBL
15223 else
15224         cf_subdir=\$mandir/cat
15225         cf_tables=yes
15226 fi
15227
15228 # process the list of source-files
15229 for i in "\$@" ; do
15230 case \$i in
15231 (*.orig|*.rej) ;;
15232 (*.[0-9]*)
15233         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
15234         if test "\$verb" = installing ; then
15235         if test ! -d "\$cf_subdir\${section}" ; then
15236                 mkdir -p "\$cf_subdir\$section"
15237         fi
15238         fi
15239
15240         # replace variables in man page
15241         if test ! -f "$cf_man_alias" ; then
15242 cat >>$cf_man_alias <<-CF_EOF2
15243                 s,@DATADIR@,\$datadir,g
15244                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
15245                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
15246                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
15247                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
15248                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
15249                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
15250 CF_EOF
15251
15252         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
15253         do
15254                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15255                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
15256 cat >>$cf_edit_man <<-CF_EOF
15257                 s,@$cf_NAME@,$cf_name,g
15258 CF_EOF
15259         done
15260
15261 cat >>$cf_edit_man <<CF_EOF
15262 CF_EOF2
15263                 echo "...made $cf_man_alias"
15264         fi
15265
15266         aliases=
15267         cf_source=\`basename "\$i"\`
15268         cf_full_alias=\$cf_source
15269         test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
15270         if test ! -f "\$cf_full_alias" ; then
15271                 echo ".. skipped \$cf_source"
15272                 continue
15273         fi
15274 CF_EOF
15275
15276 if test "$MANPAGE_ALIASES" != no ; then
15277 cat >>$cf_edit_man <<CF_EOF
15278         nCurses=ignore.3x
15279         cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
15280         test "$with_curses_h" = yes && nCurses=ncurses.3x
15281         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\`
15282 CF_EOF
15283 fi
15284
15285 if test "$MANPAGE_RENAMES" = no ; then
15286 cat >>$cf_edit_man <<CF_EOF
15287         # perform program transformations for section 1 man pages
15288         if test \$section = 1 ; then
15289                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
15290         else
15291                 cf_target=\$cf_subdir\${section}/\$cf_source
15292         fi
15293 CF_EOF
15294 else
15295 cat >>$cf_edit_man <<CF_EOF
15296         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15297         if test -z "\$cf_target" ; then
15298                 echo "? missing rename for \$cf_source"
15299                 cf_target="\$cf_source"
15300         fi
15301         cf_target="\$cf_subdir\${section}/\${cf_target}"
15302
15303 CF_EOF
15304 fi
15305
15306 cat >>$cf_edit_man <<CF_EOF
15307         sed     -f "$cf_man_alias" \\
15308 CF_EOF
15309
15310 if test "$MANPAGE_RENAMES" != no ; then
15311 cat >>$cf_edit_man <<CF_EOF
15312                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15313 CF_EOF
15314 else
15315 cat >>$cf_edit_man <<CF_EOF
15316                 < "\$i" >\$TMP
15317 CF_EOF
15318 fi
15319
15320 cat >>$cf_edit_man <<CF_EOF
15321 if test \$cf_tables = yes ; then
15322         tbl \$TMP >\$TMP.out
15323         mv \$TMP.out \$TMP
15324 fi
15325 CF_EOF
15326
15327 if test "$with_overwrite" != yes ; then
15328 cat >>$cf_edit_man <<CF_EOF
15329         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15330         mv \$TMP.out \$TMP
15331 CF_EOF
15332 fi
15333
15334 if test "$with_curses_h" != yes ; then
15335 cat >>$cf_edit_man <<CF_EOF
15336         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15337         mv \$TMP.out \$TMP
15338 CF_EOF
15339 fi
15340
15341 cat >>$cf_edit_man <<CF_EOF
15342         if test "\$form" = format ; then
15343                 nroff -man \$TMP >\$TMP.out
15344                 mv \$TMP.out \$TMP
15345         fi
15346 CF_EOF
15347
15348 if test -n "$cf_manpage_compress" ; then
15349 cat >>$cf_edit_man <<CF_EOF
15350         if test "\$verb" = installing ; then
15351         if ( "$cf_manpage_compress" -f \$TMP )
15352         then
15353                 mv \$TMP.$cf_manpage_so_strip \$TMP
15354         fi
15355         fi
15356         cf_target="\$cf_target.$cf_manpage_so_strip"
15357 CF_EOF
15358 fi
15359
15360 case "$MANPAGE_FORMAT" in
15361 (*BSDI*)
15362 cat >>$cf_edit_man <<CF_EOF
15363         if test "\$form" = format ; then
15364                 # BSDI installs only .0 suffixes in the cat directories
15365                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15366         fi
15367 CF_EOF
15368   ;;
15369 esac
15370
15371 cat >>$cf_edit_man <<CF_EOF
15372         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15373         extra_suffix=
15374         if test -n "$EXTRA_SUFFIX" ; then
15375                 case \$cf_target in
15376                 (*${EXTRA_SUFFIX}\$suffix)
15377                         extra_suffix="$EXTRA_SUFFIX"
15378                         ;;
15379                 esac
15380         fi
15381         if test "\$verb" = installing ; then
15382                 echo "\$verb \$cf_target"
15383                 \$INSTALL_DATA \$TMP "\$cf_target"
15384                 test -d "\$cf_subdir\${section}" &&
15385                 test -n "\$aliases" && (
15386                         cd "\$cf_subdir\${section}" && (
15387                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15388                                 test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\`
15389                                 cf_target=\`basename "\$cf_target"\`
15390                                 for cf_alias in \$aliases
15391                                 do
15392                                         if test "\$section" = 1 ; then
15393                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15394                                         fi
15395                                         cf_alias="\${cf_alias}\${extra_suffix}"
15396
15397                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15398                                                 if test -f "\$cf_alias\${suffix}" ; then
15399                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15400                                                         then
15401                                                                 continue
15402                                                         fi
15403                                                 fi
15404                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15405 CF_EOF
15406 case "x$LN_S" in
15407 (*-f)
15408 cat >>$cf_edit_man <<CF_EOF
15409                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15410 CF_EOF
15411         ;;
15412 (*)
15413 cat >>$cf_edit_man <<CF_EOF
15414                                                 rm -f "\$cf_alias\${suffix}"
15415                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15416 CF_EOF
15417         ;;
15418 esac
15419 cat >>$cf_edit_man <<CF_EOF
15420                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15421                                                 echo ".so \$cf_source" >\$TMP
15422 CF_EOF
15423 if test -n "$cf_manpage_compress" ; then
15424 cat >>$cf_edit_man <<CF_EOF
15425                                                 if test -n "$cf_manpage_so_strip" ; then
15426                                                         "$cf_manpage_compress" -f \$TMP
15427                                                         mv \$TMP.$cf_manpage_so_strip \$TMP
15428                                                 fi
15429 CF_EOF
15430 fi
15431 cat >>$cf_edit_man <<CF_EOF
15432                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15433                                                 rm -f "\$cf_alias\${suffix}"
15434                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15435                                         fi
15436                                 done
15437                         )
15438                 )
15439         elif test "\$verb" = removing ; then
15440                 test -f "\$cf_target" && (
15441                         echo "\$verb \$cf_target"
15442                         rm -f "\$cf_target"
15443                 )
15444                 test -d "\$cf_subdir\${section}" &&
15445                 test -n "\$aliases" && (
15446                         cd "\$cf_subdir\${section}" && (
15447                                 for cf_alias in \$aliases
15448                                 do
15449                                         if test "\$section" = 1 ; then
15450                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15451                                         fi
15452                                         cf_alias="\${cf_alias}\${extra_suffix}"
15453
15454                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15455                                         rm -f "\$cf_alias\${suffix}"
15456                                 done
15457                         )
15458                 )
15459         else
15460 #               echo ".hy 0"
15461                 cat \$TMP
15462         fi
15463         ;;
15464 esac
15465 done
15466
15467 if test "$cf_manpage_inboth" = yes ; then
15468 if test "\$form" != format ; then
15469         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15470 fi
15471 fi
15472
15473 exit 0
15474 CF_EOF
15475 chmod 755 "$cf_edit_man"
15476
15477 ###############################################################################
15478
15479 ### Note that some functions (such as const) are normally disabled anyway.
15480 echo "$as_me:15480: checking if you want to build with function extensions" >&5
15481 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15482
15483 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15484 if test "${enable_ext_funcs+set}" = set; then
15485   enableval="$enable_ext_funcs"
15486   with_ext_funcs=$enableval
15487 else
15488   with_ext_funcs=yes
15489 fi;
15490 echo "$as_me:15490: result: $with_ext_funcs" >&5
15491 echo "${ECHO_T}$with_ext_funcs" >&6
15492 if test "x$with_ext_funcs" = xyes ; then
15493         NCURSES_EXT_FUNCS=1
15494
15495 cat >>confdefs.h <<\EOF
15496 #define NCURSES_EXT_FUNCS 1
15497 EOF
15498
15499 cat >>confdefs.h <<\EOF
15500 #define HAVE_ASSUME_DEFAULT_COLORS 1
15501 EOF
15502
15503 cat >>confdefs.h <<\EOF
15504 #define HAVE_CURSES_VERSION 1
15505 EOF
15506
15507 cat >>confdefs.h <<\EOF
15508 #define HAVE_HAS_KEY 1
15509 EOF
15510
15511 cat >>confdefs.h <<\EOF
15512 #define HAVE_RESIZETERM 1
15513 EOF
15514
15515 cat >>confdefs.h <<\EOF
15516 #define HAVE_RESIZE_TERM 1
15517 EOF
15518
15519 cat >>confdefs.h <<\EOF
15520 #define HAVE_TERM_ENTRY_H 1
15521 EOF
15522
15523 cat >>confdefs.h <<\EOF
15524 #define HAVE_USE_DEFAULT_COLORS 1
15525 EOF
15526
15527 cat >>confdefs.h <<\EOF
15528 #define HAVE_USE_SCREEN 1
15529 EOF
15530
15531 cat >>confdefs.h <<\EOF
15532 #define HAVE_USE_WINDOW 1
15533 EOF
15534
15535 cat >>confdefs.h <<\EOF
15536 #define HAVE_WRESIZE 1
15537 EOF
15538
15539         GENERATED_EXT_FUNCS=generated
15540         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15541 else
15542         NCURSES_EXT_FUNCS=0
15543         GENERATED_EXT_FUNCS=
15544 fi
15545
15546 echo "$as_me:15546: checking if you want to build with SCREEN extensions" >&5
15547 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15548
15549 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15550 if test "${enable_sp_funcs+set}" = set; then
15551   enableval="$enable_sp_funcs"
15552   with_sp_funcs=$enableval
15553 else
15554   with_sp_funcs=$cf_dft_ext_spfuncs
15555 fi;
15556 echo "$as_me:15556: result: $with_sp_funcs" >&5
15557 echo "${ECHO_T}$with_sp_funcs" >&6
15558 if test "x$with_sp_funcs" = xyes ; then
15559         NCURSES_SP_FUNCS=1
15560
15561 cat >>confdefs.h <<\EOF
15562 #define NCURSES_SP_FUNCS 1
15563 EOF
15564
15565 cat >>confdefs.h <<\EOF
15566 #define HAVE_TPUTS_SP 1
15567 EOF
15568
15569         GENERATED_SP_FUNCS=generated
15570 else
15571         NCURSES_SP_FUNCS=0
15572         GENERATED_SP_FUNCS=
15573 fi
15574
15575 echo "$as_me:15575: checking if you want to build with terminal-driver" >&5
15576 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15577
15578 # Check whether --enable-term-driver or --disable-term-driver was given.
15579 if test "${enable_term_driver+set}" = set; then
15580   enableval="$enable_term_driver"
15581   with_term_driver=$enableval
15582 else
15583   with_term_driver=no
15584 fi;
15585 echo "$as_me:15585: result: $with_term_driver" >&5
15586 echo "${ECHO_T}$with_term_driver" >&6
15587 if test "x$with_term_driver" = xyes ; then
15588
15589 cat >>confdefs.h <<\EOF
15590 #define USE_TERM_DRIVER 1
15591 EOF
15592
15593         if test "x$with_termlib" != xno ; then
15594                 { { echo "$as_me:15594: error: The term-driver option conflicts with the termlib option" >&5
15595 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15596    { (exit 1); exit 1; }; }
15597         fi
15598         if test "x$with_sp_funcs" != xyes ; then
15599                 { { echo "$as_me:15599: error: The term-driver option relies upon sp-funcs" >&5
15600 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15601    { (exit 1); exit 1; }; }
15602         fi
15603 fi
15604
15605 ###   use option --enable-const to turn on use of const beyond that in XSI.
15606 echo "$as_me:15606: checking for extended use of const keyword" >&5
15607 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15608
15609 # Check whether --enable-const or --disable-const was given.
15610 if test "${enable_const+set}" = set; then
15611   enableval="$enable_const"
15612   with_ext_const=$enableval
15613 else
15614   with_ext_const=$cf_dft_ext_const
15615 fi;
15616 echo "$as_me:15616: result: $with_ext_const" >&5
15617 echo "${ECHO_T}$with_ext_const" >&6
15618 NCURSES_CONST='/*nothing*/'
15619 if test "x$with_ext_const" = xyes ; then
15620         NCURSES_CONST=const
15621 fi
15622
15623 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15624 echo "$as_me:15624: checking if you want to use extended colors" >&5
15625 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15626
15627 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15628 if test "${enable_ext_colors+set}" = set; then
15629   enableval="$enable_ext_colors"
15630   with_ext_colors=$enableval
15631 else
15632   with_ext_colors=$cf_dft_ext_colors
15633 fi;
15634 echo "$as_me:15634: result: $with_ext_colors" >&5
15635 echo "${ECHO_T}$with_ext_colors" >&6
15636 NCURSES_EXT_COLORS=0
15637 if test "x$with_ext_colors" = xyes ; then
15638         if test "x$with_widec" != xyes ; then
15639                 { echo "$as_me:15639: WARNING: This option applies only to wide-character library" >&5
15640 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15641         else
15642                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15643
15644 if test "${with_abi_version+set}" != set; then
15645         case "$cf_cv_rel_version" in
15646         (5.*)
15647                 cf_cv_rel_version=6.0
15648                 cf_cv_abi_version=6
15649                 cf_cv_abi_default=6
15650                 { echo "$as_me:15650: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15651 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15652                 ;;
15653         esac
15654 fi
15655
15656                 NCURSES_EXT_COLORS=1
15657
15658 cat >>confdefs.h <<\EOF
15659 #define NCURSES_EXT_COLORS 1
15660 EOF
15661
15662 cat >>confdefs.h <<\EOF
15663 #define HAVE_ALLOC_PAIR 1
15664 EOF
15665
15666 cat >>confdefs.h <<\EOF
15667 #define HAVE_INIT_EXTENDED_COLOR 1
15668 EOF
15669
15670 cat >>confdefs.h <<\EOF
15671 #define HAVE_RESET_COLOR_PAIRS 1
15672 EOF
15673
15674         fi
15675 fi
15676
15677 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15678 echo "$as_me:15678: checking if you want to use extended mouse encoding" >&5
15679 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15680
15681 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15682 if test "${enable_ext_mouse+set}" = set; then
15683   enableval="$enable_ext_mouse"
15684   with_ext_mouse=$enableval
15685 else
15686   with_ext_mouse=$cf_dft_ext_mouse
15687 fi;
15688 echo "$as_me:15688: result: $with_ext_mouse" >&5
15689 echo "${ECHO_T}$with_ext_mouse" >&6
15690 if test "x$with_ext_mouse" = xyes ; then
15691
15692 if test "${with_abi_version+set}" != set; then
15693         case "$cf_cv_rel_version" in
15694         (5.*)
15695                 cf_cv_rel_version=6.0
15696                 cf_cv_abi_version=6
15697                 cf_cv_abi_default=6
15698                 { echo "$as_me:15698: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15699 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15700                 ;;
15701         esac
15702 fi
15703
15704 fi
15705
15706 if test $cf_cv_abi_default -le 5 ; then
15707         NCURSES_MOUSE_VERSION=1
15708 elif test $cf_cv_abi_default -le 6 ; then
15709         NCURSES_MOUSE_VERSION=2
15710 else
15711         NCURSES_MOUSE_VERSION=3
15712 fi
15713
15714 ###   use option --enable-ext-putwin to turn on extended screendumps
15715 echo "$as_me:15715: checking if you want to use extended putwin/screendump" >&5
15716 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15717
15718 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15719 if test "${enable_ext_putwin+set}" = set; then
15720   enableval="$enable_ext_putwin"
15721   with_ext_putwin=$enableval
15722 else
15723   with_ext_putwin=$cf_dft_ext_putwin
15724 fi;
15725 echo "$as_me:15725: result: $with_ext_putwin" >&5
15726 echo "${ECHO_T}$with_ext_putwin" >&6
15727 if test "x$with_ext_putwin" = xyes ; then
15728
15729 cat >>confdefs.h <<\EOF
15730 #define NCURSES_EXT_PUTWIN 1
15731 EOF
15732
15733 fi
15734
15735 echo "$as_me:15735: checking if you want \$NCURSES_NO_PADDING code" >&5
15736 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15737
15738 # Check whether --enable-no-padding or --disable-no-padding was given.
15739 if test "${enable_no_padding+set}" = set; then
15740   enableval="$enable_no_padding"
15741   with_no_padding=$enableval
15742 else
15743   with_no_padding=$with_ext_funcs
15744 fi;
15745 echo "$as_me:15745: result: $with_no_padding" >&5
15746 echo "${ECHO_T}$with_no_padding" >&6
15747 test "x$with_no_padding" = xyes &&
15748 cat >>confdefs.h <<\EOF
15749 #define NCURSES_NO_PADDING 1
15750 EOF
15751
15752 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15753 echo "$as_me:15753: checking if you want SIGWINCH handler" >&5
15754 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15755
15756 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15757 if test "${enable_sigwinch+set}" = set; then
15758   enableval="$enable_sigwinch"
15759   with_sigwinch=$enableval
15760 else
15761   with_sigwinch=$with_ext_funcs
15762 fi;
15763 echo "$as_me:15763: result: $with_sigwinch" >&5
15764 echo "${ECHO_T}$with_sigwinch" >&6
15765 if test "x$with_sigwinch" = xyes
15766 then
15767
15768 cat >>confdefs.h <<\EOF
15769 #define USE_SIGWINCH 1
15770 EOF
15771
15772         cf_cv_enable_sigwinch=1
15773 else
15774         cf_cv_enable_sigwinch=0
15775 fi
15776
15777 ###   use option --enable-tcap-names to allow user to define new capabilities
15778 echo "$as_me:15778: checking if you want user-definable terminal capabilities like termcap" >&5
15779 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15780
15781 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15782 if test "${enable_tcap_names+set}" = set; then
15783   enableval="$enable_tcap_names"
15784   with_tcap_names=$enableval
15785 else
15786   with_tcap_names=$with_ext_funcs
15787 fi;
15788 echo "$as_me:15788: result: $with_tcap_names" >&5
15789 echo "${ECHO_T}$with_tcap_names" >&6
15790 NCURSES_XNAMES=0
15791 if test "x$with_tcap_names" = xyes; then
15792         NCURSES_XNAMES=1
15793
15794 cat >>confdefs.h <<\EOF
15795 #define NCURSES_XNAMES 1
15796 EOF
15797
15798 fi
15799
15800 ##############################################################################
15801
15802 echo "$as_me:15802: checking if you want to link with the pthread library" >&5
15803 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15804
15805 # Check whether --with-pthread or --without-pthread was given.
15806 if test "${with_pthread+set}" = set; then
15807   withval="$with_pthread"
15808   with_pthread=$withval
15809 else
15810   with_pthread=no
15811 fi;
15812 echo "$as_me:15812: result: $with_pthread" >&5
15813 echo "${ECHO_T}$with_pthread" >&6
15814
15815 if test "$with_pthread" != no ; then
15816         echo "$as_me:15816: checking for pthread.h" >&5
15817 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15818 if test "${ac_cv_header_pthread_h+set}" = set; then
15819   echo $ECHO_N "(cached) $ECHO_C" >&6
15820 else
15821   cat >"conftest.$ac_ext" <<_ACEOF
15822 #line 15822 "configure"
15823 #include "confdefs.h"
15824 #include <pthread.h>
15825 _ACEOF
15826 if { (eval echo "$as_me:15826: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15827   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15828   ac_status=$?
15829   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15830   rm -f conftest.er1
15831   cat conftest.err >&5
15832   echo "$as_me:15832: \$? = $ac_status" >&5
15833   (exit "$ac_status"); } >/dev/null; then
15834   if test -s conftest.err; then
15835     ac_cpp_err=$ac_c_preproc_warn_flag
15836   else
15837     ac_cpp_err=
15838   fi
15839 else
15840   ac_cpp_err=yes
15841 fi
15842 if test -z "$ac_cpp_err"; then
15843   ac_cv_header_pthread_h=yes
15844 else
15845   echo "$as_me: failed program was:" >&5
15846   cat "conftest.$ac_ext" >&5
15847   ac_cv_header_pthread_h=no
15848 fi
15849 rm -f conftest.err "conftest.$ac_ext"
15850 fi
15851 echo "$as_me:15851: result: $ac_cv_header_pthread_h" >&5
15852 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15853 if test "$ac_cv_header_pthread_h" = yes; then
15854
15855 cat >>confdefs.h <<\EOF
15856 #define HAVE_PTHREADS_H 1
15857 EOF
15858
15859         for cf_lib_pthread in pthread c_r
15860         do
15861             echo "$as_me:15861: checking if we can link with the $cf_lib_pthread library" >&5
15862 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15863             cf_save_LIBS="$LIBS"
15864
15865 cf_add_libs="$LIBS"
15866 # reverse order
15867 cf_add_0lib=
15868 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15869 # filter duplicates
15870 for cf_add_1lib in $cf_add_0lib; do
15871         for cf_add_2lib in $cf_add_libs; do
15872                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15873                         cf_add_1lib=
15874                         break
15875                 fi
15876         done
15877         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15878 done
15879 LIBS="$cf_add_libs"
15880
15881             cat >"conftest.$ac_ext" <<_ACEOF
15882 #line 15882 "configure"
15883 #include "confdefs.h"
15884
15885 #include <pthread.h>
15886
15887 int
15888 main (void)
15889 {
15890
15891                 int rc = pthread_create(0,0,0,0);
15892                 int r2 = pthread_mutexattr_settype(0, 0);
15893
15894   ;
15895   return 0;
15896 }
15897 _ACEOF
15898 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15899 if { (eval echo "$as_me:15899: \"$ac_link\"") >&5
15900   (eval $ac_link) 2>&5
15901   ac_status=$?
15902   echo "$as_me:15902: \$? = $ac_status" >&5
15903   (exit "$ac_status"); } &&
15904          { ac_try='test -s "conftest$ac_exeext"'
15905   { (eval echo "$as_me:15905: \"$ac_try\"") >&5
15906   (eval $ac_try) 2>&5
15907   ac_status=$?
15908   echo "$as_me:15908: \$? = $ac_status" >&5
15909   (exit "$ac_status"); }; }; then
15910   with_pthread=yes
15911 else
15912   echo "$as_me: failed program was:" >&5
15913 cat "conftest.$ac_ext" >&5
15914 with_pthread=no
15915 fi
15916 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15917             LIBS="$cf_save_LIBS"
15918             echo "$as_me:15918: result: $with_pthread" >&5
15919 echo "${ECHO_T}$with_pthread" >&6
15920             test "$with_pthread" = yes && break
15921         done
15922
15923         if test "$with_pthread" = yes ; then
15924
15925 cf_add_libs="$LIBS"
15926 # reverse order
15927 cf_add_0lib=
15928 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15929 # filter duplicates
15930 for cf_add_1lib in $cf_add_0lib; do
15931         for cf_add_2lib in $cf_add_libs; do
15932                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15933                         cf_add_1lib=
15934                         break
15935                 fi
15936         done
15937         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15938 done
15939 LIBS="$cf_add_libs"
15940
15941 cat >>confdefs.h <<\EOF
15942 #define HAVE_LIBPTHREADS 1
15943 EOF
15944
15945         else
15946             { { echo "$as_me:15946: error: Cannot link with pthread library" >&5
15947 echo "$as_me: error: Cannot link with pthread library" >&2;}
15948    { (exit 1); exit 1; }; }
15949         fi
15950
15951 fi
15952
15953 fi
15954
15955 if test "x$with_pthread" != xno; then
15956         echo "$as_me:15956: checking for pthread_kill" >&5
15957 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15958 if test "${ac_cv_func_pthread_kill+set}" = set; then
15959   echo $ECHO_N "(cached) $ECHO_C" >&6
15960 else
15961   cat >"conftest.$ac_ext" <<_ACEOF
15962 #line 15962 "configure"
15963 #include "confdefs.h"
15964 #define pthread_kill autoconf_temporary
15965 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15966 #undef pthread_kill
15967
15968 #ifdef __cplusplus
15969 extern "C"
15970 #endif
15971
15972 /* We use char because int might match the return type of a gcc2
15973    builtin and then its argument prototype would still apply.  */
15974 char pthread_kill (void);
15975
15976 int
15977 main (void)
15978 {
15979
15980 /* The GNU C library defines stubs for functions which it implements
15981     to always fail with ENOSYS.  Some functions are actually named
15982     something starting with __ and the normal name is an alias.  */
15983 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15984 #error found stub for pthread_kill
15985 #endif
15986
15987         return pthread_kill ();
15988   ;
15989   return 0;
15990 }
15991 _ACEOF
15992 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15993 if { (eval echo "$as_me:15993: \"$ac_link\"") >&5
15994   (eval $ac_link) 2>&5
15995   ac_status=$?
15996   echo "$as_me:15996: \$? = $ac_status" >&5
15997   (exit "$ac_status"); } &&
15998          { ac_try='test -s "conftest$ac_exeext"'
15999   { (eval echo "$as_me:15999: \"$ac_try\"") >&5
16000   (eval $ac_try) 2>&5
16001   ac_status=$?
16002   echo "$as_me:16002: \$? = $ac_status" >&5
16003   (exit "$ac_status"); }; }; then
16004   ac_cv_func_pthread_kill=yes
16005 else
16006   echo "$as_me: failed program was:" >&5
16007 cat "conftest.$ac_ext" >&5
16008 ac_cv_func_pthread_kill=no
16009 fi
16010 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16011 fi
16012 echo "$as_me:16012: result: $ac_cv_func_pthread_kill" >&5
16013 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
16014 if test "$ac_cv_func_pthread_kill" = yes; then
16015
16016                 echo "$as_me:16016: checking if you want to allow EINTR in wgetch with pthreads" >&5
16017 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
16018
16019 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
16020 if test "${enable_pthreads_eintr+set}" = set; then
16021   enableval="$enable_pthreads_eintr"
16022   use_pthreads_eintr=$enableval
16023 else
16024   use_pthreads_eintr=no
16025 fi;
16026                 echo "$as_me:16026: result: $use_pthreads_eintr" >&5
16027 echo "${ECHO_T}$use_pthreads_eintr" >&6
16028                 if test "x$use_pthreads_eintr" = xyes ; then
16029
16030 cat >>confdefs.h <<\EOF
16031 #define USE_PTHREADS_EINTR 1
16032 EOF
16033
16034                 fi
16035 fi
16036
16037         echo "$as_me:16037: checking if you want to use weak-symbols for pthreads" >&5
16038 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
16039
16040 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
16041 if test "${enable_weak_symbols+set}" = set; then
16042   enableval="$enable_weak_symbols"
16043   use_weak_symbols=$enableval
16044 else
16045   use_weak_symbols=no
16046 fi;
16047         echo "$as_me:16047: result: $use_weak_symbols" >&5
16048 echo "${ECHO_T}$use_weak_symbols" >&6
16049         if test "x$use_weak_symbols" = xyes ; then
16050
16051 echo "$as_me:16051: checking if $CC supports weak symbols" >&5
16052 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
16053 if test "${cf_cv_weak_symbols+set}" = set; then
16054   echo $ECHO_N "(cached) $ECHO_C" >&6
16055 else
16056
16057 cat >"conftest.$ac_ext" <<_ACEOF
16058 #line 16058 "configure"
16059 #include "confdefs.h"
16060
16061 #include <stdio.h>
16062 int
16063 main (void)
16064 {
16065
16066 #if defined(__GNUC__)
16067 #  if defined __USE_ISOC99
16068 #    define _cat_pragma(exp)    _Pragma(#exp)
16069 #    define _weak_pragma(exp)   _cat_pragma(weak name)
16070 #  else
16071 #    define _weak_pragma(exp)
16072 #  endif
16073 #  define _declare(name)        __extension__ extern __typeof__(name) name
16074 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
16075 #endif
16076
16077 weak_symbol(fopen);
16078
16079   ;
16080   return 0;
16081 }
16082 _ACEOF
16083 rm -f "conftest.$ac_objext"
16084 if { (eval echo "$as_me:16084: \"$ac_compile\"") >&5
16085   (eval $ac_compile) 2>&5
16086   ac_status=$?
16087   echo "$as_me:16087: \$? = $ac_status" >&5
16088   (exit "$ac_status"); } &&
16089          { ac_try='test -s "conftest.$ac_objext"'
16090   { (eval echo "$as_me:16090: \"$ac_try\"") >&5
16091   (eval $ac_try) 2>&5
16092   ac_status=$?
16093   echo "$as_me:16093: \$? = $ac_status" >&5
16094   (exit "$ac_status"); }; }; then
16095   cf_cv_weak_symbols=yes
16096 else
16097   echo "$as_me: failed program was:" >&5
16098 cat "conftest.$ac_ext" >&5
16099 cf_cv_weak_symbols=no
16100 fi
16101 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16102
16103 fi
16104 echo "$as_me:16104: result: $cf_cv_weak_symbols" >&5
16105 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16106
16107         else
16108                 cf_cv_weak_symbols=no
16109         fi
16110
16111         if test "x$cf_cv_weak_symbols" = xyes ; then
16112
16113 cat >>confdefs.h <<\EOF
16114 #define USE_WEAK_SYMBOLS 1
16115 EOF
16116
16117         fi
16118 fi
16119
16120 PTHREAD=
16121 if test "x$with_pthread" = "xyes" ; then
16122
16123 cat >>confdefs.h <<\EOF
16124 #define USE_PTHREADS 1
16125 EOF
16126
16127         enable_reentrant=yes
16128         if test "x$cf_cv_weak_symbols" = xyes ; then
16129                 PTHREAD=-lpthread
16130
16131 cf_add_libs="$PRIVATE_LIBS"
16132 # reverse order
16133 cf_add_0lib=
16134 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16135 # filter duplicates
16136 for cf_add_1lib in $cf_add_0lib; do
16137         for cf_add_2lib in $cf_add_libs; do
16138                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16139                         cf_add_1lib=
16140                         break
16141                 fi
16142         done
16143         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16144 done
16145 PRIVATE_LIBS="$cf_add_libs"
16146
16147         fi
16148 fi
16149
16150 # Reentrant code has to be opaque; there's little advantage to making ncurses
16151 # opaque outside of that, so there is no --enable-opaque option.  We can use
16152 # this option without --with-pthreads, but this will be always set for
16153 # pthreads.
16154 echo "$as_me:16154: checking if you want reentrant code" >&5
16155 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16156
16157 # Check whether --enable-reentrant or --disable-reentrant was given.
16158 if test "${enable_reentrant+set}" = set; then
16159   enableval="$enable_reentrant"
16160   with_reentrant=$enableval
16161 else
16162   with_reentrant=no
16163 fi;
16164 echo "$as_me:16164: result: $with_reentrant" >&5
16165 echo "${ECHO_T}$with_reentrant" >&6
16166 if test "x$with_reentrant" = xyes ; then
16167         cf_cv_enable_reentrant=1
16168         cf_cv_enable_opaque="NCURSES_INTERNALS"
16169         NCURSES_SIZE_T=int
16170         if test "x$cf_cv_weak_symbols" = xyes ; then
16171
16172 # remove pthread library from $LIBS
16173 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
16174
16175 cf_add_libs="$TEST_LIBS"
16176 # reverse order
16177 cf_add_0lib=
16178 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16179 # filter duplicates
16180 for cf_add_1lib in $cf_add_0lib; do
16181         for cf_add_2lib in $cf_add_libs; do
16182                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16183                         cf_add_1lib=
16184                         break
16185                 fi
16186         done
16187         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16188 done
16189 TEST_LIBS="$cf_add_libs"
16190
16191 cf_add_libs="$TEST_LIBS2"
16192 # reverse order
16193 cf_add_0lib=
16194 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16195 # filter duplicates
16196 for cf_add_1lib in $cf_add_0lib; do
16197         for cf_add_2lib in $cf_add_libs; do
16198                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16199                         cf_add_1lib=
16200                         break
16201                 fi
16202         done
16203         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16204 done
16205 TEST_LIBS2="$cf_add_libs"
16206
16207 cf_add_libs="$PRIVATE_LIBS"
16208 # reverse order
16209 cf_add_0lib=
16210 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16211 # filter duplicates
16212 for cf_add_1lib in $cf_add_0lib; do
16213         for cf_add_2lib in $cf_add_libs; do
16214                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16215                         cf_add_1lib=
16216                         break
16217                 fi
16218         done
16219         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16220 done
16221 PRIVATE_LIBS="$cf_add_libs"
16222
16223         else
16224                 # when not using weak symbols but with_reentrant,
16225                 # add 't' to the library suffix on all platforms
16226                 # except cygwin, where we only do that if ALSO
16227                 # compiling with full thread support.
16228                 case "$host" in
16229                 (*cygwin* | *msys*)
16230                         if test "$with_pthread" = "yes" ; then
16231                                 if test "x$disable_lib_suffixes" = "xno" ; then
16232                                         LIB_SUFFIX="t${LIB_SUFFIX}"
16233                                 fi
16234                         fi ;;
16235                 (*)
16236                         if test "x$disable_lib_suffixes" = "xno" ; then
16237                                 LIB_SUFFIX="t${LIB_SUFFIX}"
16238                         fi
16239                         ;;
16240                 esac
16241         fi
16242
16243 cat >>confdefs.h <<\EOF
16244 #define USE_REENTRANT 1
16245 EOF
16246
16247 if test "${with_abi_version+set}" != set; then
16248         case "$cf_cv_rel_version" in
16249         (5.*)
16250                 cf_cv_rel_version=6.0
16251                 cf_cv_abi_version=6
16252                 cf_cv_abi_default=6
16253                 { echo "$as_me:16253: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16254 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16255                 ;;
16256         esac
16257 fi
16258
16259 else
16260         cf_cv_enable_reentrant=0
16261         cf_cv_enable_opaque="NCURSES_OPAQUE"
16262         NCURSES_SIZE_T=$cf_dft_ordinate_type
16263 fi
16264
16265 echo "$as_me:16265: checking whether curses library structures should be opaque" >&5
16266 echo $ECHO_N "checking whether curses library structures should be opaque... $ECHO_C" >&6
16267
16268 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16269 if test "${enable_opaque_curses+set}" = set; then
16270   enableval="$enable_opaque_curses"
16271   test "$enableval" != yes && enableval=no
16272         if test "$enableval" != "no" ; then
16273     enable_opaque_curses=yes
16274         else
16275
16276          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16277          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16278
16279         fi
16280 else
16281   enableval=no
16282
16283          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16284          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16285
16286 fi;
16287 echo "$as_me:16287: result: $enable_opaque_curses" >&5
16288 echo "${ECHO_T}$enable_opaque_curses" >&6
16289
16290 test "$cf_cv_enable_reentrant" = 1 && \
16291 test "$enable_opaque_curses" = no && \
16292 { { echo "$as_me:16292: error: reentrant configuration requires opaque library" >&5
16293 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16294    { (exit 1); exit 1; }; }
16295
16296 echo "$as_me:16296: checking whether form library structures should be opaque" >&5
16297 echo $ECHO_N "checking whether form library structures should be opaque... $ECHO_C" >&6
16298
16299 # Check whether --enable-opaque-form or --disable-opaque-form was given.
16300 if test "${enable_opaque_form+set}" = set; then
16301   enableval="$enable_opaque_form"
16302   enable_opaque_form=yes
16303 else
16304   enable_opaque_form=$cf_dft_opaque_curses
16305 fi;
16306 echo "$as_me:16306: result: $enable_opaque_form" >&5
16307 echo "${ECHO_T}$enable_opaque_form" >&6
16308
16309 echo "$as_me:16309: checking whether menu library structures should be opaque" >&5
16310 echo $ECHO_N "checking whether menu library structures should be opaque... $ECHO_C" >&6
16311
16312 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16313 if test "${enable_opaque_menu+set}" = set; then
16314   enableval="$enable_opaque_menu"
16315   enable_opaque_menu=yes
16316 else
16317   enable_opaque_menu=$cf_dft_opaque_curses
16318 fi;
16319 echo "$as_me:16319: result: $enable_opaque_menu" >&5
16320 echo "${ECHO_T}$enable_opaque_menu" >&6
16321
16322 echo "$as_me:16322: checking whether panel library structures should be opaque" >&5
16323 echo $ECHO_N "checking whether panel library structures should be opaque... $ECHO_C" >&6
16324
16325 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16326 if test "${enable_opaque_panel+set}" = set; then
16327   enableval="$enable_opaque_panel"
16328   enable_opaque_panel=yes
16329 else
16330   enable_opaque_panel=$cf_dft_opaque_curses
16331 fi;
16332 echo "$as_me:16332: result: $enable_opaque_panel" >&5
16333 echo "${ECHO_T}$enable_opaque_panel" >&6
16334
16335 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16336 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16337 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16338 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16339
16340 ### Allow using a different wrap-prefix
16341 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16342         echo "$as_me:16342: checking for prefix used to wrap public variables" >&5
16343 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16344
16345 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16346 if test "${with_wrap_prefix+set}" = set; then
16347   withval="$with_wrap_prefix"
16348   NCURSES_WRAP_PREFIX=$withval
16349 else
16350   NCURSES_WRAP_PREFIX=_nc_
16351 fi;
16352         echo "$as_me:16352: result: $NCURSES_WRAP_PREFIX" >&5
16353 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16354 else
16355         NCURSES_WRAP_PREFIX=_nc_
16356 fi
16357
16358 cat >>confdefs.h <<EOF
16359 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16360 EOF
16361
16362 ###############################################################################
16363 # These options are relatively safe to experiment with.
16364
16365 echo "$as_me:16365: checking if you want all development code" >&5
16366 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16367
16368 # Check whether --with-develop or --without-develop was given.
16369 if test "${with_develop+set}" = set; then
16370   withval="$with_develop"
16371   with_develop=$withval
16372 else
16373   with_develop=no
16374 fi;
16375 echo "$as_me:16375: result: $with_develop" >&5
16376 echo "${ECHO_T}$with_develop" >&6
16377
16378 ###   use option --enable-check-size to detect screensize with CPR
16379 echo "$as_me:16379: checking if you want to check screensize of serial terminals" >&5
16380 echo $ECHO_N "checking if you want to check screensize of serial terminals... $ECHO_C" >&6
16381
16382 # Check whether --enable-check-size or --disable-check-size was given.
16383 if test "${enable_check_size+set}" = set; then
16384   enableval="$enable_check_size"
16385
16386 else
16387   enable_check_size=$with_develop
16388 fi;
16389 echo "$as_me:16389: result: $enable_check_size" >&5
16390 echo "${ECHO_T}$enable_check_size" >&6
16391 test "x$enable_check_size" = xyes &&
16392 cat >>confdefs.h <<\EOF
16393 #define USE_CHECK_SIZE 1
16394 EOF
16395
16396 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16397 echo "$as_me:16397: checking if you want hard-tabs code" >&5
16398 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16399
16400 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16401 if test "${enable_hard_tabs+set}" = set; then
16402   enableval="$enable_hard_tabs"
16403
16404 else
16405   enable_hard_tabs=$with_develop
16406 fi;
16407 echo "$as_me:16407: result: $enable_hard_tabs" >&5
16408 echo "${ECHO_T}$enable_hard_tabs" >&6
16409 test "x$enable_hard_tabs" = xyes &&
16410 cat >>confdefs.h <<\EOF
16411 #define USE_HARD_TABS 1
16412 EOF
16413
16414 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16415 echo "$as_me:16415: checking if you want limited support for xmc" >&5
16416 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16417
16418 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16419 if test "${enable_xmc_glitch+set}" = set; then
16420   enableval="$enable_xmc_glitch"
16421
16422 else
16423   enable_xmc_glitch=$with_develop
16424 fi;
16425 echo "$as_me:16425: result: $enable_xmc_glitch" >&5
16426 echo "${ECHO_T}$enable_xmc_glitch" >&6
16427 test "x$enable_xmc_glitch" = xyes &&
16428 cat >>confdefs.h <<\EOF
16429 #define USE_XMC_SUPPORT 1
16430 EOF
16431
16432 ###############################################################################
16433 # These are just experimental, probably should not be in a package:
16434
16435 echo "$as_me:16435: checking if you do not want to assume colors are white-on-black" >&5
16436 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16437
16438 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16439 if test "${enable_assumed_color+set}" = set; then
16440   enableval="$enable_assumed_color"
16441   with_assumed_color=$enableval
16442 else
16443   with_assumed_color=yes
16444 fi;
16445 echo "$as_me:16445: result: $with_assumed_color" >&5
16446 echo "${ECHO_T}$with_assumed_color" >&6
16447 test "x$with_assumed_color" = xyes &&
16448 cat >>confdefs.h <<\EOF
16449 #define USE_ASSUMED_COLOR 1
16450 EOF
16451
16452 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16453 echo "$as_me:16453: checking if you want hashmap scrolling-optimization code" >&5
16454 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16455
16456 # Check whether --enable-hashmap or --disable-hashmap was given.
16457 if test "${enable_hashmap+set}" = set; then
16458   enableval="$enable_hashmap"
16459   with_hashmap=$enableval
16460 else
16461   with_hashmap=yes
16462 fi;
16463 echo "$as_me:16463: result: $with_hashmap" >&5
16464 echo "${ECHO_T}$with_hashmap" >&6
16465 test "x$with_hashmap" = xyes &&
16466 cat >>confdefs.h <<\EOF
16467 #define USE_HASHMAP 1
16468 EOF
16469
16470 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16471 echo "$as_me:16471: checking if you want colorfgbg code" >&5
16472 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16473
16474 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16475 if test "${enable_colorfgbg+set}" = set; then
16476   enableval="$enable_colorfgbg"
16477   with_colorfgbg=$enableval
16478 else
16479   with_colorfgbg=no
16480 fi;
16481 echo "$as_me:16481: result: $with_colorfgbg" >&5
16482 echo "${ECHO_T}$with_colorfgbg" >&6
16483 test "x$with_colorfgbg" = xyes &&
16484 cat >>confdefs.h <<\EOF
16485 #define USE_COLORFGBG 1
16486 EOF
16487
16488 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16489 echo "$as_me:16489: checking if you want to use gcc -fvisibility option" >&5
16490 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16491
16492 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16493 if test "${enable_fvisibility+set}" = set; then
16494   enableval="$enable_fvisibility"
16495   cf_with_fvisibility=$enableval
16496 else
16497   cf_with_fvisibility=no
16498 fi;
16499 echo "$as_me:16499: result: $cf_with_fvisibility" >&5
16500 echo "${ECHO_T}$cf_with_fvisibility" >&6
16501
16502 NCURSES_IMPEXP=
16503 NCURSES_CXX_IMPEXP=
16504 if test "x$cf_with_fvisibility" = xyes; then
16505
16506 echo "$as_me:16506: checking if $CC -fvisibility=hidden option works" >&5
16507 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16508 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16509   echo $ECHO_N "(cached) $ECHO_C" >&6
16510 else
16511
16512     cf_save_cflags="$CFLAGS"
16513     CFLAGS="$CFLAGS -fvisibility=hidden"
16514     cat >"conftest.$ac_ext" <<_ACEOF
16515 #line 16515 "configure"
16516 #include "confdefs.h"
16517
16518 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16519
16520 int
16521 main (void)
16522 {
16523
16524         if (somefunc()) return 1;
16525
16526   ;
16527   return 0;
16528 }
16529 _ACEOF
16530 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16531 if { (eval echo "$as_me:16531: \"$ac_link\"") >&5
16532   (eval $ac_link) 2>&5
16533   ac_status=$?
16534   echo "$as_me:16534: \$? = $ac_status" >&5
16535   (exit "$ac_status"); } &&
16536          { ac_try='test -s "conftest$ac_exeext"'
16537   { (eval echo "$as_me:16537: \"$ac_try\"") >&5
16538   (eval $ac_try) 2>&5
16539   ac_status=$?
16540   echo "$as_me:16540: \$? = $ac_status" >&5
16541   (exit "$ac_status"); }; }; then
16542   cf_cv_fvisibility_hidden=yes
16543 else
16544   echo "$as_me: failed program was:" >&5
16545 cat "conftest.$ac_ext" >&5
16546 cf_cv_fvisibility_hidden=no
16547 fi
16548 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16549     CFLAGS=$cf_save_cflags
16550
16551 fi
16552 echo "$as_me:16552: result: $cf_cv_fvisibility_hidden" >&5
16553 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16554
16555         if test "x$cf_cv_fvisibility_hidden" = xyes
16556         then
16557
16558 cf_fix_cppflags=no
16559 cf_new_cflags=
16560 cf_new_cppflags=
16561 cf_new_extra_cppflags=
16562
16563 for cf_add_cflags in -fvisibility=hidden
16564 do
16565 case "$cf_fix_cppflags" in
16566 (no)
16567         case "$cf_add_cflags" in
16568         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16569                 case "$cf_add_cflags" in
16570                 (-D*)
16571                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16572
16573                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16574                                 && test -z "${cf_tst_cflags}" \
16575                                 && cf_fix_cppflags=yes
16576
16577                         if test "$cf_fix_cppflags" = yes ; then
16578
16579         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16580         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16581
16582                                 continue
16583                         elif test "${cf_tst_cflags}" = "\"'" ; then
16584
16585         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16586         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16587
16588                                 continue
16589                         fi
16590                         ;;
16591                 esac
16592                 case "$CPPFLAGS" in
16593                 (*$cf_add_cflags)
16594                         ;;
16595                 (*)
16596                         case "$cf_add_cflags" in
16597                         (-D*)
16598                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16599
16600 CPPFLAGS=`echo "$CPPFLAGS" | \
16601         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16602                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16603
16604                                 ;;
16605                         esac
16606
16607         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16608         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16609
16610                         ;;
16611                 esac
16612                 ;;
16613         (*)
16614
16615         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16616         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16617
16618                 ;;
16619         esac
16620         ;;
16621 (yes)
16622
16623         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16624         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16625
16626         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16627
16628         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16629                 && test -z "${cf_tst_cflags}" \
16630                 && cf_fix_cppflags=no
16631         ;;
16632 esac
16633 done
16634
16635 if test -n "$cf_new_cflags" ; then
16636
16637         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16638         CFLAGS="${CFLAGS}$cf_new_cflags"
16639
16640 fi
16641
16642 if test -n "$cf_new_cppflags" ; then
16643
16644         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16645         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16646
16647 fi
16648
16649 if test -n "$cf_new_extra_cppflags" ; then
16650
16651         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16652         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16653
16654 fi
16655
16656                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16657         fi
16658         if test -n "$CXX"
16659         then
16660                 ac_ext=cc
16661 ac_cpp='$CXXCPP $CPPFLAGS'
16662 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16663 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16664 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16665 ac_main_return="return"
16666
16667 echo "$as_me:16667: checking if $CXX -fvisibility=hidden option works" >&5
16668 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16669 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16670   echo $ECHO_N "(cached) $ECHO_C" >&6
16671 else
16672
16673     cf_save_cflags="$CXXFLAGS"
16674     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16675     cat >"conftest.$ac_ext" <<_ACEOF
16676 #line 16676 "configure"
16677 #include "confdefs.h"
16678
16679 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16680
16681 int
16682 main (void)
16683 {
16684
16685         if (somefunc()) return 1;
16686
16687   ;
16688   return 0;
16689 }
16690 _ACEOF
16691 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16692 if { (eval echo "$as_me:16692: \"$ac_link\"") >&5
16693   (eval $ac_link) 2>&5
16694   ac_status=$?
16695   echo "$as_me:16695: \$? = $ac_status" >&5
16696   (exit "$ac_status"); } &&
16697          { ac_try='test -s "conftest$ac_exeext"'
16698   { (eval echo "$as_me:16698: \"$ac_try\"") >&5
16699   (eval $ac_try) 2>&5
16700   ac_status=$?
16701   echo "$as_me:16701: \$? = $ac_status" >&5
16702   (exit "$ac_status"); }; }; then
16703   cf_cv_fvisibility_hidden2=yes
16704 else
16705   echo "$as_me: failed program was:" >&5
16706 cat "conftest.$ac_ext" >&5
16707 cf_cv_fvisibility_hidden2=no
16708 fi
16709 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16710     CXXFLAGS=$cf_save_cflags
16711
16712 fi
16713 echo "$as_me:16713: result: $cf_cv_fvisibility_hidden2" >&5
16714 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16715
16716                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16717                 then
16718
16719 cf_save_CXXFLAGS="$CFLAGS"
16720 CFLAGS="$CXXFLAGS"
16721
16722 cf_fix_cppflags=no
16723 cf_new_cflags=
16724 cf_new_cppflags=
16725 cf_new_extra_cppflags=
16726
16727 for cf_add_cflags in -fvisibility=hidden
16728 do
16729 case "$cf_fix_cppflags" in
16730 (no)
16731         case "$cf_add_cflags" in
16732         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16733                 case "$cf_add_cflags" in
16734                 (-D*)
16735                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16736
16737                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16738                                 && test -z "${cf_tst_cflags}" \
16739                                 && cf_fix_cppflags=yes
16740
16741                         if test "$cf_fix_cppflags" = yes ; then
16742
16743         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16744         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16745
16746                                 continue
16747                         elif test "${cf_tst_cflags}" = "\"'" ; then
16748
16749         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16750         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16751
16752                                 continue
16753                         fi
16754                         ;;
16755                 esac
16756                 case "$CPPFLAGS" in
16757                 (*$cf_add_cflags)
16758                         ;;
16759                 (*)
16760                         case "$cf_add_cflags" in
16761                         (-D*)
16762                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16763
16764 CPPFLAGS=`echo "$CPPFLAGS" | \
16765         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16766                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16767
16768                                 ;;
16769                         esac
16770
16771         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16772         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16773
16774                         ;;
16775                 esac
16776                 ;;
16777         (*)
16778
16779         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16780         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16781
16782                 ;;
16783         esac
16784         ;;
16785 (yes)
16786
16787         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16788         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16789
16790         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16791
16792         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16793                 && test -z "${cf_tst_cflags}" \
16794                 && cf_fix_cppflags=no
16795         ;;
16796 esac
16797 done
16798
16799 if test -n "$cf_new_cflags" ; then
16800
16801         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16802         CFLAGS="${CFLAGS}$cf_new_cflags"
16803
16804 fi
16805
16806 if test -n "$cf_new_cppflags" ; then
16807
16808         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16809         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16810
16811 fi
16812
16813 if test -n "$cf_new_extra_cppflags" ; then
16814
16815         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16816         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16817
16818 fi
16819
16820 CXXFLAGS="$CFLAGS"
16821 CFLAGS="$cf_save_CXXFLAGS"
16822
16823                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16824                 fi
16825                 ac_ext=c
16826 ac_cpp='$CPP $CPPFLAGS'
16827 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16828 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16829 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16830 ac_main_return="return"
16831
16832         fi
16833 fi
16834
16835 ###   use option --enable-interop to turn on use of bindings used for interop
16836 echo "$as_me:16836: checking if you want interop bindings" >&5
16837 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16838
16839 # Check whether --enable-interop or --disable-interop was given.
16840 if test "${enable_interop+set}" = set; then
16841   enableval="$enable_interop"
16842   with_exp_interop=$enableval
16843 else
16844   with_exp_interop=$cf_dft_interop
16845 fi;
16846 echo "$as_me:16846: result: $with_exp_interop" >&5
16847 echo "${ECHO_T}$with_exp_interop" >&6
16848
16849 NCURSES_INTEROP_FUNCS=0
16850 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16851
16852 echo "$as_me:16852: checking if you want experimental safe-sprintf code" >&5
16853 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16854
16855 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16856 if test "${enable_safe_sprintf+set}" = set; then
16857   enableval="$enable_safe_sprintf"
16858   with_safe_sprintf=$enableval
16859 else
16860   with_safe_sprintf=no
16861 fi;
16862 echo "$as_me:16862: result: $with_safe_sprintf" >&5
16863 echo "${ECHO_T}$with_safe_sprintf" >&6
16864
16865 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16866 # when hashmap is used scroll hints are useless
16867 if test "$with_hashmap" = no ; then
16868 echo "$as_me:16868: checking if you want to experiment without scrolling-hints code" >&5
16869 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16870
16871 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16872 if test "${enable_scroll_hints+set}" = set; then
16873   enableval="$enable_scroll_hints"
16874   with_scroll_hints=$enableval
16875 else
16876   with_scroll_hints=yes
16877 fi;
16878 echo "$as_me:16878: result: $with_scroll_hints" >&5
16879 echo "${ECHO_T}$with_scroll_hints" >&6
16880 test "x$with_scroll_hints" = xyes &&
16881 cat >>confdefs.h <<\EOF
16882 #define USE_SCROLL_HINTS 1
16883 EOF
16884
16885 fi
16886
16887 echo "$as_me:16887: checking if you want wgetch-events code" >&5
16888 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16889
16890 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16891 if test "${enable_wgetch_events+set}" = set; then
16892   enableval="$enable_wgetch_events"
16893   with_wgetch_events=$enableval
16894 else
16895   with_wgetch_events=no
16896 fi;
16897 echo "$as_me:16897: result: $with_wgetch_events" >&5
16898 echo "${ECHO_T}$with_wgetch_events" >&6
16899 if test "x$with_wgetch_events" = xyes ; then
16900
16901 cat >>confdefs.h <<\EOF
16902 #define NCURSES_WGETCH_EVENTS 1
16903 EOF
16904
16905         NCURSES_WGETCH_EVENTS=1
16906 else
16907         NCURSES_WGETCH_EVENTS=0
16908 fi
16909
16910 case "$cf_cv_system_name" in
16911 (*mingw32*|*mingw64*|*-msvc*)
16912         echo "$as_me:16912: checking if you want experimental-Windows driver" >&5
16913 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16914
16915 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16916 if test "${enable_exp_win32+set}" = set; then
16917   enableval="$enable_exp_win32"
16918   with_exp_win32=$enableval
16919 else
16920   with_exp_win32=no
16921 fi;
16922         echo "$as_me:16922: result: $with_exp_win32" >&5
16923 echo "${ECHO_T}$with_exp_win32" >&6
16924         if test "x$with_exp_win32" = xyes
16925         then
16926
16927 cat >>confdefs.h <<\EOF
16928 #define EXP_WIN32_DRIVER 1
16929 EOF
16930
16931                 EXP_WIN32_DRIVER=1
16932                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16933         else
16934                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16935                 EXP_WIN32_DRIVER=0
16936         fi
16937         ;;
16938 (*)
16939         EXP_WIN32_DRIVER=0
16940         INTERNALS_HDR=
16941         ;;
16942 esac
16943
16944 ###############################################################################
16945
16946 ###     use option --disable-echo to suppress full display compiling commands
16947
16948 echo "$as_me:16948: checking if you want to see long compiling messages" >&5
16949 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16950
16951 # Check whether --enable-echo or --disable-echo was given.
16952 if test "${enable_echo+set}" = set; then
16953   enableval="$enable_echo"
16954   test "$enableval" != no && enableval=yes
16955         if test "$enableval" != "yes" ; then
16956
16957         ECHO_LT='--silent'
16958         ECHO_LD='@echo linking $@;'
16959         RULE_CC='@echo compiling $<'
16960         SHOW_CC='@echo compiling $@'
16961         ECHO_CC='@'
16962
16963         else
16964
16965         ECHO_LT=''
16966         ECHO_LD=''
16967         RULE_CC=''
16968         SHOW_CC=''
16969         ECHO_CC=''
16970
16971         fi
16972 else
16973   enableval=yes
16974
16975         ECHO_LT=''
16976         ECHO_LD=''
16977         RULE_CC=''
16978         SHOW_CC=''
16979         ECHO_CC=''
16980
16981 fi;
16982 echo "$as_me:16982: result: $enableval" >&5
16983 echo "${ECHO_T}$enableval" >&6
16984
16985 if test "x$enable_echo" = xyes; then
16986         ECHO_LINK=
16987 else
16988         ECHO_LINK='@ echo linking $@ ... ;'
16989         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16990         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16991 fi
16992
16993 # --disable-stripping is used for debugging
16994
16995 echo "$as_me:16995: checking if you want to install stripped executables" >&5
16996 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16997
16998 # Check whether --enable-stripping or --disable-stripping was given.
16999 if test "${enable_stripping+set}" = set; then
17000   enableval="$enable_stripping"
17001   test "$enableval" != no && enableval=yes
17002         if test "$enableval" != "yes" ; then
17003     enable_stripping=no
17004         else
17005                 enable_stripping=yes
17006         fi
17007 else
17008   enableval=yes
17009         enable_stripping=yes
17010
17011 fi;
17012 echo "$as_me:17012: result: $enable_stripping" >&5
17013 echo "${ECHO_T}$enable_stripping" >&6
17014
17015 if test "$enable_stripping" = yes
17016 then
17017         INSTALL_OPT_S="-s"
17018 else
17019         INSTALL_OPT_S=
17020 fi
17021
17022 : "${INSTALL:=install}"
17023 echo "$as_me:17023: checking if install accepts -p option" >&5
17024 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
17025 if test "${cf_cv_install_p+set}" = set; then
17026   echo $ECHO_N "(cached) $ECHO_C" >&6
17027 else
17028
17029         rm -rf ./conftest*
17030         date >conftest.in
17031         mkdir conftest.out
17032         sleep 3
17033         if $INSTALL -p conftest.in conftest.out 2>/dev/null
17034         then
17035                 if test -f conftest.out/conftest.in
17036                 then
17037                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
17038                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
17039                         if test -s conftest.err
17040                         then
17041                                 cf_cv_install_p=no
17042                         else
17043                                 cf_cv_install_p=yes
17044                         fi
17045                 else
17046                         cf_cv_install_p=no
17047                 fi
17048         else
17049                 cf_cv_install_p=no
17050         fi
17051         rm -rf ./conftest*
17052
17053 fi
17054 echo "$as_me:17054: result: $cf_cv_install_p" >&5
17055 echo "${ECHO_T}$cf_cv_install_p" >&6
17056
17057 echo "$as_me:17057: checking if install needs to be told about ownership" >&5
17058 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
17059 case `$ac_config_guess` in
17060 (*minix)
17061         with_install_o=yes
17062         ;;
17063 (*)
17064         with_install_o=no
17065         ;;
17066 esac
17067
17068 echo "$as_me:17068: result: $with_install_o" >&5
17069 echo "${ECHO_T}$with_install_o" >&6
17070 if test "x$with_install_o" = xyes
17071 then
17072         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'`"
17073 else
17074         INSTALL_OPT_O=
17075 fi
17076
17077 if test -n "$INSTALL_OPT_S"
17078 then
17079         echo "$as_me:17079: checking if you want to specify strip-program" >&5
17080 echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6
17081
17082 # Check whether --with-strip-program or --without-strip-program was given.
17083 if test "${with_strip_program+set}" = set; then
17084   withval="$with_strip_program"
17085   with_strip_program=$withval
17086 else
17087   with_strip_program=no
17088 fi;
17089         echo "$as_me:17089: result: $with_strip_program" >&5
17090 echo "${ECHO_T}$with_strip_program" >&6
17091         if test "$with_strip_program" != no
17092         then
17093                 echo "$as_me:17093: checking if strip-program is supported with this installer" >&5
17094 echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6
17095                 cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'`
17096                 check_install_strip=no
17097                 if test -f "$cf_install_program"
17098                 then
17099                         check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
17100                         if test -n "$check_install_version"
17101                         then
17102                                 check_install_strip="option"
17103                         else
17104                                 for check_strip_variable in STRIPBIN STRIP
17105                                 do
17106                                         if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null
17107                                         then
17108                                                 check_install_strip="environ"
17109                                                 break
17110                                         fi
17111                                 done
17112                         fi
17113                 fi
17114                 echo "$as_me:17114: result: $check_install_strip" >&5
17115 echo "${ECHO_T}$check_install_strip" >&6
17116                 case "$check_install_strip" in
17117                 (no)
17118                         { echo "$as_me:17118: WARNING: $cf_install_program does not support strip program option" >&5
17119 echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;}
17120                         with_strip_program=no
17121                         ;;
17122                 (environ)
17123                         cat >install.tmp <<-CF_EOF
17124                         #! $SHELL
17125                         STRIPBIN="$with_strip_program" \\
17126                         STRIP="$with_strip_program" \\
17127                         $INSTALL "$@"
17128                         CF_EOF
17129                         INSTALL="`pwd`/install.tmp"
17130                         chmod +x "$INSTALL"
17131                         test -n "$verbose" && echo "    created $INSTALL" 1>&6
17132
17133 echo "${as_me:-configure}:17133: testing created $INSTALL ..." 1>&5
17134
17135                         ;;
17136                 (option)
17137                         INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
17138                         ;;
17139                 esac
17140         fi
17141 fi
17142
17143 # If we're avoiding relinking of shared libraries during install, that is to
17144 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
17145 # the install program has "-p" (for preserving timestamps).
17146 cf_cv_do_reranlib=yes
17147 if test "x$cf_cv_install_p" = xyes
17148 then
17149         if test "x$cf_cv_do_relink" != xyes
17150         then
17151                 cf_cv_do_reranlib=no
17152                 INSTALL_OPT_P="-p"
17153                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17154         fi
17155 fi
17156
17157 ###     use option --enable-warnings to turn on all gcc warnings
17158
17159 echo "$as_me:17159: checking if you want to use C11 _Noreturn feature" >&5
17160 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17161
17162 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17163 if test "${enable_stdnoreturn+set}" = set; then
17164   enableval="$enable_stdnoreturn"
17165   test "$enableval" != yes && enableval=no
17166         if test "$enableval" != "no" ; then
17167     enable_stdnoreturn=yes
17168         else
17169                 enable_stdnoreturn=no
17170         fi
17171 else
17172   enableval=no
17173         enable_stdnoreturn=no
17174
17175 fi;
17176 echo "$as_me:17176: result: $enable_stdnoreturn" >&5
17177 echo "${ECHO_T}$enable_stdnoreturn" >&6
17178
17179 if test $enable_stdnoreturn = yes; then
17180 echo "$as_me:17180: checking for C11 _Noreturn feature" >&5
17181 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17182 if test "${cf_cv_c11_noreturn+set}" = set; then
17183   echo $ECHO_N "(cached) $ECHO_C" >&6
17184 else
17185   cat >"conftest.$ac_ext" <<_ACEOF
17186 #line 17186 "configure"
17187 #include "confdefs.h"
17188
17189 $ac_includes_default
17190 #include <stdnoreturn.h>
17191 static _Noreturn void giveup(void) { exit(0); }
17192
17193 int
17194 main (void)
17195 {
17196 if (feof(stdin)) giveup()
17197   ;
17198   return 0;
17199 }
17200 _ACEOF
17201 rm -f "conftest.$ac_objext"
17202 if { (eval echo "$as_me:17202: \"$ac_compile\"") >&5
17203   (eval $ac_compile) 2>&5
17204   ac_status=$?
17205   echo "$as_me:17205: \$? = $ac_status" >&5
17206   (exit "$ac_status"); } &&
17207          { ac_try='test -s "conftest.$ac_objext"'
17208   { (eval echo "$as_me:17208: \"$ac_try\"") >&5
17209   (eval $ac_try) 2>&5
17210   ac_status=$?
17211   echo "$as_me:17211: \$? = $ac_status" >&5
17212   (exit "$ac_status"); }; }; then
17213   cf_cv_c11_noreturn=yes
17214 else
17215   echo "$as_me: failed program was:" >&5
17216 cat "conftest.$ac_ext" >&5
17217 cf_cv_c11_noreturn=no
17218 fi
17219 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17220
17221 fi
17222 echo "$as_me:17222: result: $cf_cv_c11_noreturn" >&5
17223 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17224 else
17225         cf_cv_c11_noreturn=no,
17226 fi
17227
17228 if test "$cf_cv_c11_noreturn" = yes; then
17229
17230 cat >>confdefs.h <<\EOF
17231 #define HAVE_STDNORETURN_H 1
17232 EOF
17233
17234 cat >>confdefs.h <<EOF
17235 #define STDC_NORETURN _Noreturn
17236 EOF
17237
17238         HAVE_STDNORETURN_H=1
17239 else
17240         HAVE_STDNORETURN_H=0
17241 fi
17242
17243 if test "$GCC" = yes || test "$GXX" = yes
17244 then
17245
17246 if test "$GCC" = yes || test "$GXX" = yes
17247 then
17248         case $CFLAGS in
17249         (*-Werror=*)
17250                 cf_temp_flags=
17251                 for cf_temp_scan in $CFLAGS
17252                 do
17253                         case "x$cf_temp_scan" in
17254                         (x-Werror=format*)
17255
17256         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17257         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17258
17259                                 ;;
17260                         (x-Werror=*)
17261
17262         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17263         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17264
17265                                 ;;
17266                         (*)
17267
17268         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17269         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17270
17271                                 ;;
17272                         esac
17273                 done
17274                 if test "x$CFLAGS" != "x$cf_temp_flags"
17275                 then
17276                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
17277
17278 echo "${as_me:-configure}:17278: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17279
17280                         CFLAGS="$cf_temp_flags"
17281                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
17282
17283 echo "${as_me:-configure}:17283: testing ... fixed $CFLAGS ..." 1>&5
17284
17285                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17286
17287 echo "${as_me:-configure}:17287: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17288
17289                 fi
17290                 ;;
17291         esac
17292 fi
17293
17294 if test "$GCC" = yes || test "$GXX" = yes
17295 then
17296         case $CPPFLAGS in
17297         (*-Werror=*)
17298                 cf_temp_flags=
17299                 for cf_temp_scan in $CPPFLAGS
17300                 do
17301                         case "x$cf_temp_scan" in
17302                         (x-Werror=format*)
17303
17304         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17305         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17306
17307                                 ;;
17308                         (x-Werror=*)
17309
17310         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17311         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17312
17313                                 ;;
17314                         (*)
17315
17316         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17317         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17318
17319                                 ;;
17320                         esac
17321                 done
17322                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17323                 then
17324                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
17325
17326 echo "${as_me:-configure}:17326: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17327
17328                         CPPFLAGS="$cf_temp_flags"
17329                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
17330
17331 echo "${as_me:-configure}:17331: testing ... fixed $CPPFLAGS ..." 1>&5
17332
17333                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17334
17335 echo "${as_me:-configure}:17335: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17336
17337                 fi
17338                 ;;
17339         esac
17340 fi
17341
17342 if test "$GCC" = yes || test "$GXX" = yes
17343 then
17344         case $LDFLAGS in
17345         (*-Werror=*)
17346                 cf_temp_flags=
17347                 for cf_temp_scan in $LDFLAGS
17348                 do
17349                         case "x$cf_temp_scan" in
17350                         (x-Werror=format*)
17351
17352         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17353         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17354
17355                                 ;;
17356                         (x-Werror=*)
17357
17358         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17359         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17360
17361                                 ;;
17362                         (*)
17363
17364         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17365         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17366
17367                                 ;;
17368                         esac
17369                 done
17370                 if test "x$LDFLAGS" != "x$cf_temp_flags"
17371                 then
17372                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
17373
17374 echo "${as_me:-configure}:17374: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17375
17376                         LDFLAGS="$cf_temp_flags"
17377                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
17378
17379 echo "${as_me:-configure}:17379: testing ... fixed $LDFLAGS ..." 1>&5
17380
17381                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17382
17383 echo "${as_me:-configure}:17383: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17384
17385                 fi
17386                 ;;
17387         esac
17388 fi
17389
17390 echo "$as_me:17390: checking if you want to turn on gcc warnings" >&5
17391 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17392
17393 # Check whether --enable-warnings or --disable-warnings was given.
17394 if test "${enable_warnings+set}" = set; then
17395   enableval="$enable_warnings"
17396   test "$enableval" != yes && enableval=no
17397         if test "$enableval" != "no" ; then
17398     enable_warnings=yes
17399         else
17400                 enable_warnings=no
17401         fi
17402 else
17403   enableval=no
17404         enable_warnings=no
17405
17406 fi;
17407 echo "$as_me:17407: result: $enable_warnings" >&5
17408 echo "${ECHO_T}$enable_warnings" >&6
17409 if test "$enable_warnings" = "yes"
17410 then
17411
17412 if test "x$have_x" = xyes; then
17413
17414 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17415 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17416 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17417 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17418 for cf_X_CFLAGS in $X_CFLAGS
17419 do
17420         case "x$cf_X_CFLAGS" in
17421         x-[IUD]*)
17422                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17423                 ;;
17424         *)
17425                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17426                 ;;
17427         esac
17428 done
17429
17430 cat >"conftest.$ac_ext" <<_ACEOF
17431 #line 17431 "configure"
17432 #include "confdefs.h"
17433
17434 #include <stdlib.h>
17435 #include <X11/Intrinsic.h>
17436
17437 int
17438 main (void)
17439 {
17440 String foo = malloc(1); free((void*)foo)
17441   ;
17442   return 0;
17443 }
17444 _ACEOF
17445 rm -f "conftest.$ac_objext"
17446 if { (eval echo "$as_me:17446: \"$ac_compile\"") >&5
17447   (eval $ac_compile) 2>&5
17448   ac_status=$?
17449   echo "$as_me:17449: \$? = $ac_status" >&5
17450   (exit "$ac_status"); } &&
17451          { ac_try='test -s "conftest.$ac_objext"'
17452   { (eval echo "$as_me:17452: \"$ac_try\"") >&5
17453   (eval $ac_try) 2>&5
17454   ac_status=$?
17455   echo "$as_me:17455: \$? = $ac_status" >&5
17456   (exit "$ac_status"); }; }; then
17457
17458 echo "$as_me:17458: checking for X11/Xt const-feature" >&5
17459 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17460 if test "${cf_cv_const_x_string+set}" = set; then
17461   echo $ECHO_N "(cached) $ECHO_C" >&6
17462 else
17463
17464         cat >"conftest.$ac_ext" <<_ACEOF
17465 #line 17465 "configure"
17466 #include "confdefs.h"
17467
17468 #undef  _CONST_X_STRING
17469 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17470 #undef  XTSTRINGDEFINES /* X11R5 and later */
17471 #include <stdlib.h>
17472 #include <X11/Intrinsic.h>
17473
17474 int
17475 main (void)
17476 {
17477 String foo = malloc(1); *foo = 0
17478   ;
17479   return 0;
17480 }
17481 _ACEOF
17482 rm -f "conftest.$ac_objext"
17483 if { (eval echo "$as_me:17483: \"$ac_compile\"") >&5
17484   (eval $ac_compile) 2>&5
17485   ac_status=$?
17486   echo "$as_me:17486: \$? = $ac_status" >&5
17487   (exit "$ac_status"); } &&
17488          { ac_try='test -s "conftest.$ac_objext"'
17489   { (eval echo "$as_me:17489: \"$ac_try\"") >&5
17490   (eval $ac_try) 2>&5
17491   ac_status=$?
17492   echo "$as_me:17492: \$? = $ac_status" >&5
17493   (exit "$ac_status"); }; }; then
17494
17495                         cf_cv_const_x_string=no
17496
17497 else
17498   echo "$as_me: failed program was:" >&5
17499 cat "conftest.$ac_ext" >&5
17500
17501                         cf_cv_const_x_string=yes
17502
17503 fi
17504 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17505
17506 fi
17507 echo "$as_me:17507: result: $cf_cv_const_x_string" >&5
17508 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17509
17510 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17511 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17512 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17513
17514 case "$cf_cv_const_x_string" in
17515 (no)
17516
17517         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17518         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17519
17520         ;;
17521 (*)
17522
17523         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17524         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17525
17526         ;;
17527 esac
17528
17529 else
17530   echo "$as_me: failed program was:" >&5
17531 cat "conftest.$ac_ext" >&5
17532 fi
17533 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17534  fi
17535 cat > "conftest.$ac_ext" <<EOF
17536 #line 17536 "${as_me:-configure}"
17537 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17538 EOF
17539 if test "$INTEL_COMPILER" = yes
17540 then
17541 # The "-wdXXX" options suppress warnings:
17542 # remark #1419: external declaration in primary source file
17543 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17544 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17545 # remark #193: zero used for undefined preprocessing identifier
17546 # remark #593: variable "curs_sb_left_arrow" was set but never used
17547 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17548 # remark #869: parameter "tw" was never referenced
17549 # remark #981: operands are evaluated in unspecified order
17550 # warning #279: controlling expression is constant
17551
17552         { echo "$as_me:17552: checking for $CC warning options..." >&5
17553 echo "$as_me: checking for $CC warning options..." >&6;}
17554         cf_save_CFLAGS="$CFLAGS"
17555         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17556         for cf_opt in \
17557                 wd1419 \
17558                 wd1683 \
17559                 wd1684 \
17560                 wd193 \
17561                 wd593 \
17562                 wd279 \
17563                 wd810 \
17564                 wd869 \
17565                 wd981
17566         do
17567                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17568                 if { (eval echo "$as_me:17568: \"$ac_compile\"") >&5
17569   (eval $ac_compile) 2>&5
17570   ac_status=$?
17571   echo "$as_me:17571: \$? = $ac_status" >&5
17572   (exit "$ac_status"); }; then
17573                         test -n "$verbose" && echo "$as_me:17573: result: ... -$cf_opt" >&5
17574 echo "${ECHO_T}... -$cf_opt" >&6
17575                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17576                 fi
17577         done
17578         CFLAGS="$cf_save_CFLAGS"
17579 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17580 then
17581         { echo "$as_me:17581: checking for $CC warning options..." >&5
17582 echo "$as_me: checking for $CC warning options..." >&6;}
17583         cf_save_CFLAGS="$CFLAGS"
17584         cf_warn_CONST=""
17585         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17586         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17587         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17588         for cf_opt in W Wall \
17589                 Wbad-function-cast \
17590                 Wcast-align \
17591                 Wcast-qual \
17592                 Wdeclaration-after-statement \
17593                 Wextra \
17594                 Winline \
17595                 Wmissing-declarations \
17596                 Wmissing-prototypes \
17597                 Wnested-externs \
17598                 Wpointer-arith \
17599                 Wshadow \
17600                 Wstrict-prototypes \
17601                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17602         do
17603                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17604                 if { (eval echo "$as_me:17604: \"$ac_compile\"") >&5
17605   (eval $ac_compile) 2>&5
17606   ac_status=$?
17607   echo "$as_me:17607: \$? = $ac_status" >&5
17608   (exit "$ac_status"); }; then
17609                         test -n "$verbose" && echo "$as_me:17609: result: ... -$cf_opt" >&5
17610 echo "${ECHO_T}... -$cf_opt" >&6
17611                         case "$cf_opt" in
17612                         (Winline)
17613                                 case "$GCC_VERSION" in
17614                                 ([34].*)
17615                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17616
17617 echo "${as_me:-configure}:17617: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17618
17619                                         continue;;
17620                                 esac
17621                                 ;;
17622                         (Wpointer-arith)
17623                                 case "$GCC_VERSION" in
17624                                 ([12].*)
17625                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17626
17627 echo "${as_me:-configure}:17627: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17628
17629                                         continue;;
17630                                 esac
17631                                 ;;
17632                         esac
17633                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17634                 fi
17635         done
17636         CFLAGS="$cf_save_CFLAGS"
17637 fi
17638 rm -rf ./conftest*
17639
17640 fi
17641
17642 if test "$GCC" = yes || test "$GXX" = yes
17643 then
17644 cat > conftest.i <<EOF
17645 #ifndef GCC_PRINTF
17646 #define GCC_PRINTF 0
17647 #endif
17648 #ifndef GCC_SCANF
17649 #define GCC_SCANF 0
17650 #endif
17651 #ifndef GCC_NORETURN
17652 #define GCC_NORETURN /* nothing */
17653 #endif
17654 #ifndef GCC_UNUSED
17655 #define GCC_UNUSED /* nothing */
17656 #endif
17657 EOF
17658 if test "$GCC" = yes
17659 then
17660         { echo "$as_me:17660: checking for $CC __attribute__ directives..." >&5
17661 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17662 cat > "conftest.$ac_ext" <<EOF
17663 #line 17663 "${as_me:-configure}"
17664 #include <stdio.h>
17665 #include "confdefs.h"
17666 #include "conftest.h"
17667 #include "conftest.i"
17668 #if     GCC_PRINTF
17669 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17670 #else
17671 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17672 #endif
17673 #if     GCC_SCANF
17674 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17675 #else
17676 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17677 #endif
17678 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17679 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17680 extern GCC_NORETURN void foo(void);
17681 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17682 EOF
17683         cf_printf_attribute=no
17684         cf_scanf_attribute=no
17685         for cf_attribute in scanf printf unused noreturn
17686         do
17687
17688 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17689
17690                 cf_directive="__attribute__(($cf_attribute))"
17691                 echo "checking for $CC $cf_directive" 1>&5
17692
17693                 case "$cf_attribute" in
17694                 (printf)
17695                         cf_printf_attribute=yes
17696                         cat >conftest.h <<EOF
17697 #define GCC_$cf_ATTRIBUTE 1
17698 EOF
17699                         ;;
17700                 (scanf)
17701                         cf_scanf_attribute=yes
17702                         cat >conftest.h <<EOF
17703 #define GCC_$cf_ATTRIBUTE 1
17704 EOF
17705                         ;;
17706                 (*)
17707                         cat >conftest.h <<EOF
17708 #define GCC_$cf_ATTRIBUTE $cf_directive
17709 EOF
17710                         ;;
17711                 esac
17712
17713                 if { (eval echo "$as_me:17713: \"$ac_compile\"") >&5
17714   (eval $ac_compile) 2>&5
17715   ac_status=$?
17716   echo "$as_me:17716: \$? = $ac_status" >&5
17717   (exit "$ac_status"); }; then
17718                         test -n "$verbose" && echo "$as_me:17718: result: ... $cf_attribute" >&5
17719 echo "${ECHO_T}... $cf_attribute" >&6
17720                         cat conftest.h >>confdefs.h
17721                         case "$cf_attribute" in
17722                         (noreturn)
17723
17724 cat >>confdefs.h <<EOF
17725 #define GCC_NORETURN $cf_directive
17726 EOF
17727
17728                                 ;;
17729                         (printf)
17730                                 cf_value='/* nothing */'
17731                                 if test "$cf_printf_attribute" != no ; then
17732                                         cf_value='__attribute__((format(printf,fmt,var)))'
17733
17734 cat >>confdefs.h <<\EOF
17735 #define GCC_PRINTF 1
17736 EOF
17737
17738                                 fi
17739
17740 cat >>confdefs.h <<EOF
17741 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17742 EOF
17743
17744                                 ;;
17745                         (scanf)
17746                                 cf_value='/* nothing */'
17747                                 if test "$cf_scanf_attribute" != no ; then
17748                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17749
17750 cat >>confdefs.h <<\EOF
17751 #define GCC_SCANF 1
17752 EOF
17753
17754                                 fi
17755
17756 cat >>confdefs.h <<EOF
17757 #define GCC_SCANFLIKE(fmt,var) $cf_value
17758 EOF
17759
17760                                 ;;
17761                         (unused)
17762
17763 cat >>confdefs.h <<EOF
17764 #define GCC_UNUSED $cf_directive
17765 EOF
17766
17767                                 ;;
17768                         esac
17769                 fi
17770         done
17771 else
17772         ${FGREP-fgrep} define conftest.i >>confdefs.h
17773 fi
17774 rm -rf ./conftest*
17775 fi
17776
17777 fi
17778
17779 if test "x$enable_warnings" = "xyes"; then
17780
17781         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17782
17783         if test "x$cf_with_cxx" = xyes ; then
17784
17785 INTEL_CPLUSPLUS=no
17786
17787 if test "$GCC" = yes ; then
17788         case "$host_os" in
17789         (linux*|gnu*)
17790                 echo "$as_me:17790: checking if this is really Intel C++ compiler" >&5
17791 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17792                 cf_save_CFLAGS="$CXXFLAGS"
17793                 CXXFLAGS="$CXXFLAGS -no-gcc"
17794                 cat >"conftest.$ac_ext" <<_ACEOF
17795 #line 17795 "configure"
17796 #include "confdefs.h"
17797
17798 int
17799 main (void)
17800 {
17801
17802 #ifdef __INTEL_COMPILER
17803 #else
17804 #error __INTEL_COMPILER is not defined
17805 #endif
17806
17807   ;
17808   return 0;
17809 }
17810 _ACEOF
17811 rm -f "conftest.$ac_objext"
17812 if { (eval echo "$as_me:17812: \"$ac_compile\"") >&5
17813   (eval $ac_compile) 2>&5
17814   ac_status=$?
17815   echo "$as_me:17815: \$? = $ac_status" >&5
17816   (exit "$ac_status"); } &&
17817          { ac_try='test -s "conftest.$ac_objext"'
17818   { (eval echo "$as_me:17818: \"$ac_try\"") >&5
17819   (eval $ac_try) 2>&5
17820   ac_status=$?
17821   echo "$as_me:17821: \$? = $ac_status" >&5
17822   (exit "$ac_status"); }; }; then
17823   INTEL_CPLUSPLUS=yes
17824 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17825
17826 else
17827   echo "$as_me: failed program was:" >&5
17828 cat "conftest.$ac_ext" >&5
17829 fi
17830 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17831                 CXXFLAGS="$cf_save_CFLAGS"
17832                 echo "$as_me:17832: result: $INTEL_CPLUSPLUS" >&5
17833 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17834                 ;;
17835         esac
17836 fi
17837
17838 CLANG_CPLUSPLUS=no
17839
17840 if test "$GCC" = yes ; then
17841         echo "$as_me:17841: checking if this is really Clang C++ compiler" >&5
17842 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17843         cf_save_CFLAGS="$CXXFLAGS"
17844         cat >"conftest.$ac_ext" <<_ACEOF
17845 #line 17845 "configure"
17846 #include "confdefs.h"
17847
17848 int
17849 main (void)
17850 {
17851
17852 #ifdef __clang__
17853 #else
17854 #error __clang__ is not defined
17855 #endif
17856
17857   ;
17858   return 0;
17859 }
17860 _ACEOF
17861 rm -f "conftest.$ac_objext"
17862 if { (eval echo "$as_me:17862: \"$ac_compile\"") >&5
17863   (eval $ac_compile) 2>&5
17864   ac_status=$?
17865   echo "$as_me:17865: \$? = $ac_status" >&5
17866   (exit "$ac_status"); } &&
17867          { ac_try='test -s "conftest.$ac_objext"'
17868   { (eval echo "$as_me:17868: \"$ac_try\"") >&5
17869   (eval $ac_try) 2>&5
17870   ac_status=$?
17871   echo "$as_me:17871: \$? = $ac_status" >&5
17872   (exit "$ac_status"); }; }; then
17873   CLANG_CPLUSPLUS=yes
17874
17875 else
17876   echo "$as_me: failed program was:" >&5
17877 cat "conftest.$ac_ext" >&5
17878 fi
17879 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17880         CXXFLAGS="$cf_save_CFLAGS"
17881         echo "$as_me:17881: result: $CLANG_CPLUSPLUS" >&5
17882 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17883 fi
17884
17885 CLANG_VERSION=none
17886
17887 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17888         case "$CC" in
17889         (c[1-9][0-9]|*/c[1-9][0-9])
17890                 { echo "$as_me:17890: WARNING: replacing broken compiler alias $CC" >&5
17891 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17892                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17893                 CC=clang
17894                 ;;
17895         esac
17896
17897         echo "$as_me:17897: checking version of $CC" >&5
17898 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17899         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.].*//'`"
17900         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17901         echo "$as_me:17901: result: $CLANG_VERSION" >&5
17902 echo "${ECHO_T}$CLANG_VERSION" >&6
17903
17904         for cf_clang_opt in \
17905                 -Qunused-arguments \
17906                 -Wno-error=implicit-function-declaration
17907         do
17908                 echo "$as_me:17908: checking if option $cf_clang_opt works" >&5
17909 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17910                 cf_save_CFLAGS="$CFLAGS"
17911                 CFLAGS="$CFLAGS $cf_clang_opt"
17912                 cat >"conftest.$ac_ext" <<_ACEOF
17913 #line 17913 "configure"
17914 #include "confdefs.h"
17915
17916                         #include <stdio.h>
17917 int
17918 main (void)
17919 {
17920
17921                         printf("hello!\\n");
17922   ;
17923   return 0;
17924 }
17925 _ACEOF
17926 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17927 if { (eval echo "$as_me:17927: \"$ac_link\"") >&5
17928   (eval $ac_link) 2>&5
17929   ac_status=$?
17930   echo "$as_me:17930: \$? = $ac_status" >&5
17931   (exit "$ac_status"); } &&
17932          { ac_try='test -s "conftest$ac_exeext"'
17933   { (eval echo "$as_me:17933: \"$ac_try\"") >&5
17934   (eval $ac_try) 2>&5
17935   ac_status=$?
17936   echo "$as_me:17936: \$? = $ac_status" >&5
17937   (exit "$ac_status"); }; }; then
17938
17939                         cf_clang_optok=yes
17940 else
17941   echo "$as_me: failed program was:" >&5
17942 cat "conftest.$ac_ext" >&5
17943
17944                         cf_clang_optok=no
17945 fi
17946 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17947                 echo "$as_me:17947: result: $cf_clang_optok" >&5
17948 echo "${ECHO_T}$cf_clang_optok" >&6
17949                 CFLAGS="$cf_save_CFLAGS"
17950                 if test "$cf_clang_optok" = yes; then
17951                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17952
17953 echo "${as_me:-configure}:17953: testing adding option $cf_clang_opt ..." 1>&5
17954
17955         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17956         CFLAGS="${CFLAGS}$cf_clang_opt"
17957
17958                 fi
17959         done
17960 fi
17961
17962 ac_ext=cc
17963 ac_cpp='$CXXCPP $CPPFLAGS'
17964 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17965 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17966 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17967 ac_main_return="return"
17968
17969 cat > conftest.$ac_ext <<EOF
17970 #line 17970 "configure"
17971 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17972 EOF
17973
17974 if test "$INTEL_CPLUSPLUS" = yes
17975 then
17976 # The "-wdXXX" options suppress warnings:
17977 # remark #1419: external declaration in primary source file
17978 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17979 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17980 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17981 # remark #193: zero used for undefined preprocessing identifier
17982 # remark #593: variable "curs_sb_left_arrow" was set but never used
17983 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17984 # remark #869: parameter "tw" was never referenced
17985 # remark #981: operands are evaluated in unspecified order
17986 # warning #269: invalid format string conversion
17987
17988         { echo "$as_me:17988: checking for $CC warning options..." >&5
17989 echo "$as_me: checking for $CC warning options..." >&6;}
17990         cf_save_CXXFLAGS="$CXXFLAGS"
17991         EXTRA_CXXFLAGS="-Wall"
17992         for cf_opt in \
17993                 wd1419 \
17994                 wd1682 \
17995                 wd1683 \
17996                 wd1684 \
17997                 wd193 \
17998                 wd279 \
17999                 wd593 \
18000                 wd810 \
18001                 wd869 \
18002                 wd981
18003         do
18004                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
18005                 if { (eval echo "$as_me:18005: \"$ac_compile\"") >&5
18006   (eval $ac_compile) 2>&5
18007   ac_status=$?
18008   echo "$as_me:18008: \$? = $ac_status" >&5
18009   (exit "$ac_status"); }; then
18010                         test -n "$verbose" && echo "$as_me:18010: result: ... -$cf_opt" >&5
18011 echo "${ECHO_T}... -$cf_opt" >&6
18012                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
18013                 fi
18014         done
18015         CXXFLAGS="$cf_save_CXXFLAGS"
18016
18017 elif test "$GXX" = yes
18018 then
18019         { echo "$as_me:18019: checking for $CXX warning options..." >&5
18020 echo "$as_me: checking for $CXX warning options..." >&6;}
18021         cf_save_CXXFLAGS="$CXXFLAGS"
18022         EXTRA_CXXFLAGS="-W -Wall"
18023         cf_gxx_extra_warnings=""
18024         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
18025         case "$GXX_VERSION" in
18026         ([1-2].*)
18027                 ;;
18028         (*)
18029                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
18030                 ;;
18031         esac
18032         for cf_opt in \
18033                 Wabi \
18034                 fabi-version=0 \
18035                 Wextra \
18036                 Wignored-qualifiers \
18037                 Wlogical-op \
18038                 Woverloaded-virtual \
18039                 Wsign-promo \
18040                 Wsynth \
18041                 Wold-style-cast \
18042                 Wcast-align \
18043                 Wcast-qual \
18044                 Wpointer-arith \
18045                 Wshadow \
18046                 Wundef $cf_gxx_extra_warnings Wno-unused
18047         do
18048                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
18049                 if { (eval echo "$as_me:18049: \"$ac_compile\"") >&5
18050   (eval $ac_compile) 2>&5
18051   ac_status=$?
18052   echo "$as_me:18052: \$? = $ac_status" >&5
18053   (exit "$ac_status"); }; then
18054                         test -n "$verbose" && echo "$as_me:18054: result: ... -$cf_opt" >&5
18055 echo "${ECHO_T}... -$cf_opt" >&6
18056                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
18057                 else
18058                         test -n "$verbose" && echo "$as_me:18058: result: ... no -$cf_opt" >&5
18059 echo "${ECHO_T}... no -$cf_opt" >&6
18060                 fi
18061         done
18062         CXXFLAGS="$cf_save_CXXFLAGS"
18063 fi
18064
18065 rm -rf ./conftest*
18066 ac_ext=c
18067 ac_cpp='$CPP $CPPFLAGS'
18068 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
18069 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
18070 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18071 ac_main_return="return"
18072
18073         fi
18074 fi
18075
18076 echo "$as_me:18076: checking if you want to work around bogus compiler/loader warnings" >&5
18077 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
18078
18079 # Check whether --enable-string-hacks or --disable-string-hacks was given.
18080 if test "${enable_string_hacks+set}" = set; then
18081   enableval="$enable_string_hacks"
18082   enable_string_hacks=$enableval
18083 else
18084   enable_string_hacks=no
18085 fi;
18086 echo "$as_me:18086: result: $enable_string_hacks" >&5
18087 echo "${ECHO_T}$enable_string_hacks" >&6
18088
18089 if test "x$enable_string_hacks" = "xyes"; then
18090
18091 cat >>confdefs.h <<\EOF
18092 #define USE_STRING_HACKS 1
18093 EOF
18094
18095         { echo "$as_me:18095: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
18096 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
18097         echo "$as_me:18097: checking for strlcat" >&5
18098 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
18099 if test "${ac_cv_func_strlcat+set}" = set; then
18100   echo $ECHO_N "(cached) $ECHO_C" >&6
18101 else
18102   cat >"conftest.$ac_ext" <<_ACEOF
18103 #line 18103 "configure"
18104 #include "confdefs.h"
18105 #define strlcat autoconf_temporary
18106 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18107 #undef strlcat
18108
18109 #ifdef __cplusplus
18110 extern "C"
18111 #endif
18112
18113 /* We use char because int might match the return type of a gcc2
18114    builtin and then its argument prototype would still apply.  */
18115 char strlcat (void);
18116
18117 int
18118 main (void)
18119 {
18120
18121 /* The GNU C library defines stubs for functions which it implements
18122     to always fail with ENOSYS.  Some functions are actually named
18123     something starting with __ and the normal name is an alias.  */
18124 #if defined (__stub_strlcat) || defined (__stub___strlcat)
18125 #error found stub for strlcat
18126 #endif
18127
18128         return strlcat ();
18129   ;
18130   return 0;
18131 }
18132 _ACEOF
18133 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18134 if { (eval echo "$as_me:18134: \"$ac_link\"") >&5
18135   (eval $ac_link) 2>&5
18136   ac_status=$?
18137   echo "$as_me:18137: \$? = $ac_status" >&5
18138   (exit "$ac_status"); } &&
18139          { ac_try='test -s "conftest$ac_exeext"'
18140   { (eval echo "$as_me:18140: \"$ac_try\"") >&5
18141   (eval $ac_try) 2>&5
18142   ac_status=$?
18143   echo "$as_me:18143: \$? = $ac_status" >&5
18144   (exit "$ac_status"); }; }; then
18145   ac_cv_func_strlcat=yes
18146 else
18147   echo "$as_me: failed program was:" >&5
18148 cat "conftest.$ac_ext" >&5
18149 ac_cv_func_strlcat=no
18150 fi
18151 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18152 fi
18153 echo "$as_me:18153: result: $ac_cv_func_strlcat" >&5
18154 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18155 if test "$ac_cv_func_strlcat" = yes; then
18156
18157 cat >>confdefs.h <<\EOF
18158 #define HAVE_STRLCAT 1
18159 EOF
18160
18161 else
18162
18163                 echo "$as_me:18163: checking for strlcat in -lbsd" >&5
18164 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18165 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18166   echo $ECHO_N "(cached) $ECHO_C" >&6
18167 else
18168   ac_check_lib_save_LIBS=$LIBS
18169 LIBS="-lbsd  $LIBS"
18170 cat >"conftest.$ac_ext" <<_ACEOF
18171 #line 18171 "configure"
18172 #include "confdefs.h"
18173
18174 /* Override any gcc2 internal prototype to avoid an error.  */
18175 #ifdef __cplusplus
18176 extern "C"
18177 #endif
18178 /* We use char because int might match the return type of a gcc2
18179    builtin and then its argument prototype would still apply.  */
18180 char strlcat (void);
18181 int
18182 main (void)
18183 {
18184 strlcat ();
18185   ;
18186   return 0;
18187 }
18188 _ACEOF
18189 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18190 if { (eval echo "$as_me:18190: \"$ac_link\"") >&5
18191   (eval $ac_link) 2>&5
18192   ac_status=$?
18193   echo "$as_me:18193: \$? = $ac_status" >&5
18194   (exit "$ac_status"); } &&
18195          { ac_try='test -s "conftest$ac_exeext"'
18196   { (eval echo "$as_me:18196: \"$ac_try\"") >&5
18197   (eval $ac_try) 2>&5
18198   ac_status=$?
18199   echo "$as_me:18199: \$? = $ac_status" >&5
18200   (exit "$ac_status"); }; }; then
18201   ac_cv_lib_bsd_strlcat=yes
18202 else
18203   echo "$as_me: failed program was:" >&5
18204 cat "conftest.$ac_ext" >&5
18205 ac_cv_lib_bsd_strlcat=no
18206 fi
18207 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18208 LIBS=$ac_check_lib_save_LIBS
18209 fi
18210 echo "$as_me:18210: result: $ac_cv_lib_bsd_strlcat" >&5
18211 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18212 if test "$ac_cv_lib_bsd_strlcat" = yes; then
18213
18214 cf_add_libs="$LIBS"
18215 # reverse order
18216 cf_add_0lib=
18217 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18218 # filter duplicates
18219 for cf_add_1lib in $cf_add_0lib; do
18220         for cf_add_2lib in $cf_add_libs; do
18221                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18222                         cf_add_1lib=
18223                         break
18224                 fi
18225         done
18226         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18227 done
18228 LIBS="$cf_add_libs"
18229
18230 for ac_header in bsd/string.h
18231 do
18232 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18233 echo "$as_me:18233: checking for $ac_header" >&5
18234 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18235 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18236   echo $ECHO_N "(cached) $ECHO_C" >&6
18237 else
18238   cat >"conftest.$ac_ext" <<_ACEOF
18239 #line 18239 "configure"
18240 #include "confdefs.h"
18241 #include <$ac_header>
18242 _ACEOF
18243 if { (eval echo "$as_me:18243: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18244   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18245   ac_status=$?
18246   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18247   rm -f conftest.er1
18248   cat conftest.err >&5
18249   echo "$as_me:18249: \$? = $ac_status" >&5
18250   (exit "$ac_status"); } >/dev/null; then
18251   if test -s conftest.err; then
18252     ac_cpp_err=$ac_c_preproc_warn_flag
18253   else
18254     ac_cpp_err=
18255   fi
18256 else
18257   ac_cpp_err=yes
18258 fi
18259 if test -z "$ac_cpp_err"; then
18260   eval "$as_ac_Header=yes"
18261 else
18262   echo "$as_me: failed program was:" >&5
18263   cat "conftest.$ac_ext" >&5
18264   eval "$as_ac_Header=no"
18265 fi
18266 rm -f conftest.err "conftest.$ac_ext"
18267 fi
18268 echo "$as_me:18268: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18269 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18270 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18271   cat >>confdefs.h <<EOF
18272 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18273 EOF
18274
18275 fi
18276 done
18277
18278 cat >>confdefs.h <<\EOF
18279 #define HAVE_STRLCAT 1
18280 EOF
18281
18282 fi
18283
18284 fi
18285
18286 for ac_func in strlcpy snprintf
18287 do
18288 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18289 echo "$as_me:18289: checking for $ac_func" >&5
18290 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18291 if eval "test \"\${$as_ac_var+set}\" = set"; then
18292   echo $ECHO_N "(cached) $ECHO_C" >&6
18293 else
18294   cat >"conftest.$ac_ext" <<_ACEOF
18295 #line 18295 "configure"
18296 #include "confdefs.h"
18297 #define $ac_func autoconf_temporary
18298 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18299 #undef $ac_func
18300
18301 #ifdef __cplusplus
18302 extern "C"
18303 #endif
18304
18305 /* We use char because int might match the return type of a gcc2
18306    builtin and then its argument prototype would still apply.  */
18307 char $ac_func (void);
18308
18309 int
18310 main (void)
18311 {
18312
18313 /* The GNU C library defines stubs for functions which it implements
18314     to always fail with ENOSYS.  Some functions are actually named
18315     something starting with __ and the normal name is an alias.  */
18316 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18317 #error found stub for $ac_func
18318 #endif
18319
18320         return $ac_func ();
18321   ;
18322   return 0;
18323 }
18324 _ACEOF
18325 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18326 if { (eval echo "$as_me:18326: \"$ac_link\"") >&5
18327   (eval $ac_link) 2>&5
18328   ac_status=$?
18329   echo "$as_me:18329: \$? = $ac_status" >&5
18330   (exit "$ac_status"); } &&
18331          { ac_try='test -s "conftest$ac_exeext"'
18332   { (eval echo "$as_me:18332: \"$ac_try\"") >&5
18333   (eval $ac_try) 2>&5
18334   ac_status=$?
18335   echo "$as_me:18335: \$? = $ac_status" >&5
18336   (exit "$ac_status"); }; }; then
18337   eval "$as_ac_var=yes"
18338 else
18339   echo "$as_me: failed program was:" >&5
18340 cat "conftest.$ac_ext" >&5
18341 eval "$as_ac_var=no"
18342 fi
18343 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18344 fi
18345 echo "$as_me:18345: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18346 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18347 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18348   cat >>confdefs.h <<EOF
18349 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18350 EOF
18351
18352 fi
18353 done
18354
18355 fi
18356
18357 ###     use option --enable-assertions to turn on generation of assertion code
18358 echo "$as_me:18358: checking if you want to enable runtime assertions" >&5
18359 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18360
18361 # Check whether --enable-assertions or --disable-assertions was given.
18362 if test "${enable_assertions+set}" = set; then
18363   enableval="$enable_assertions"
18364   with_assertions=$enableval
18365 else
18366   with_assertions=no
18367 fi;
18368 echo "$as_me:18368: result: $with_assertions" >&5
18369 echo "${ECHO_T}$with_assertions" >&6
18370 if test -n "$GCC"
18371 then
18372         if test "$with_assertions" = no
18373         then
18374                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18375         else
18376
18377         ADAFLAGS="$ADAFLAGS -gnata"
18378
18379         fi
18380 fi
18381
18382 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
18383
18384 echo "$as_me:18384: checking if you want to use dmalloc for testing" >&5
18385 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18386
18387 # Check whether --with-dmalloc or --without-dmalloc was given.
18388 if test "${with_dmalloc+set}" = set; then
18389   withval="$with_dmalloc"
18390   case "x$withval" in
18391         (x|xno) ;;
18392         (*)
18393                 : "${with_cflags:=-g}"
18394                 : "${enable_leaks:=no}"
18395                 with_dmalloc=yes
18396
18397 cat >>confdefs.h <<EOF
18398 #define USE_DMALLOC 1
18399 EOF
18400
18401                 ;;
18402         esac
18403 else
18404   with_dmalloc=
18405 fi;
18406 echo "$as_me:18406: result: ${with_dmalloc:-no}" >&5
18407 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18408
18409 case ".$with_cflags" in
18410 (.*-g*)
18411         case .$CFLAGS in
18412         (.*-g*)
18413                 ;;
18414         (*)
18415
18416 cf_fix_cppflags=no
18417 cf_new_cflags=
18418 cf_new_cppflags=
18419 cf_new_extra_cppflags=
18420
18421 for cf_add_cflags in -g
18422 do
18423 case "$cf_fix_cppflags" in
18424 (no)
18425         case "$cf_add_cflags" in
18426         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18427                 case "$cf_add_cflags" in
18428                 (-D*)
18429                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18430
18431                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18432                                 && test -z "${cf_tst_cflags}" \
18433                                 && cf_fix_cppflags=yes
18434
18435                         if test "$cf_fix_cppflags" = yes ; then
18436
18437         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18438         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18439
18440                                 continue
18441                         elif test "${cf_tst_cflags}" = "\"'" ; then
18442
18443         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18444         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18445
18446                                 continue
18447                         fi
18448                         ;;
18449                 esac
18450                 case "$CPPFLAGS" in
18451                 (*$cf_add_cflags)
18452                         ;;
18453                 (*)
18454                         case "$cf_add_cflags" in
18455                         (-D*)
18456                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18457
18458 CPPFLAGS=`echo "$CPPFLAGS" | \
18459         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18460                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18461
18462                                 ;;
18463                         esac
18464
18465         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18466         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18467
18468                         ;;
18469                 esac
18470                 ;;
18471         (*)
18472
18473         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18474         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18475
18476                 ;;
18477         esac
18478         ;;
18479 (yes)
18480
18481         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18482         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18483
18484         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18485
18486         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18487                 && test -z "${cf_tst_cflags}" \
18488                 && cf_fix_cppflags=no
18489         ;;
18490 esac
18491 done
18492
18493 if test -n "$cf_new_cflags" ; then
18494
18495         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18496         CFLAGS="${CFLAGS}$cf_new_cflags"
18497
18498 fi
18499
18500 if test -n "$cf_new_cppflags" ; then
18501
18502         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18503         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18504
18505 fi
18506
18507 if test -n "$cf_new_extra_cppflags" ; then
18508
18509         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18510         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18511
18512 fi
18513
18514                 ;;
18515         esac
18516         ;;
18517 esac
18518
18519 if test "$with_dmalloc" = yes ; then
18520         echo "$as_me:18520: checking for dmalloc.h" >&5
18521 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18522 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18523   echo $ECHO_N "(cached) $ECHO_C" >&6
18524 else
18525   cat >"conftest.$ac_ext" <<_ACEOF
18526 #line 18526 "configure"
18527 #include "confdefs.h"
18528 #include <dmalloc.h>
18529 _ACEOF
18530 if { (eval echo "$as_me:18530: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18531   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18532   ac_status=$?
18533   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18534   rm -f conftest.er1
18535   cat conftest.err >&5
18536   echo "$as_me:18536: \$? = $ac_status" >&5
18537   (exit "$ac_status"); } >/dev/null; then
18538   if test -s conftest.err; then
18539     ac_cpp_err=$ac_c_preproc_warn_flag
18540   else
18541     ac_cpp_err=
18542   fi
18543 else
18544   ac_cpp_err=yes
18545 fi
18546 if test -z "$ac_cpp_err"; then
18547   ac_cv_header_dmalloc_h=yes
18548 else
18549   echo "$as_me: failed program was:" >&5
18550   cat "conftest.$ac_ext" >&5
18551   ac_cv_header_dmalloc_h=no
18552 fi
18553 rm -f conftest.err "conftest.$ac_ext"
18554 fi
18555 echo "$as_me:18555: result: $ac_cv_header_dmalloc_h" >&5
18556 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18557 if test "$ac_cv_header_dmalloc_h" = yes; then
18558
18559 echo "$as_me:18559: checking for dmalloc_debug in -ldmalloc" >&5
18560 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18561 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18562   echo $ECHO_N "(cached) $ECHO_C" >&6
18563 else
18564   ac_check_lib_save_LIBS=$LIBS
18565 LIBS="-ldmalloc  $LIBS"
18566 cat >"conftest.$ac_ext" <<_ACEOF
18567 #line 18567 "configure"
18568 #include "confdefs.h"
18569
18570 /* Override any gcc2 internal prototype to avoid an error.  */
18571 #ifdef __cplusplus
18572 extern "C"
18573 #endif
18574 /* We use char because int might match the return type of a gcc2
18575    builtin and then its argument prototype would still apply.  */
18576 char dmalloc_debug (void);
18577 int
18578 main (void)
18579 {
18580 dmalloc_debug ();
18581   ;
18582   return 0;
18583 }
18584 _ACEOF
18585 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18586 if { (eval echo "$as_me:18586: \"$ac_link\"") >&5
18587   (eval $ac_link) 2>&5
18588   ac_status=$?
18589   echo "$as_me:18589: \$? = $ac_status" >&5
18590   (exit "$ac_status"); } &&
18591          { ac_try='test -s "conftest$ac_exeext"'
18592   { (eval echo "$as_me:18592: \"$ac_try\"") >&5
18593   (eval $ac_try) 2>&5
18594   ac_status=$?
18595   echo "$as_me:18595: \$? = $ac_status" >&5
18596   (exit "$ac_status"); }; }; then
18597   ac_cv_lib_dmalloc_dmalloc_debug=yes
18598 else
18599   echo "$as_me: failed program was:" >&5
18600 cat "conftest.$ac_ext" >&5
18601 ac_cv_lib_dmalloc_dmalloc_debug=no
18602 fi
18603 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18604 LIBS=$ac_check_lib_save_LIBS
18605 fi
18606 echo "$as_me:18606: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18607 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18608 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18609   cat >>confdefs.h <<EOF
18610 #define HAVE_LIBDMALLOC 1
18611 EOF
18612
18613   LIBS="-ldmalloc $LIBS"
18614
18615 fi
18616
18617 fi
18618
18619 fi
18620
18621 echo "$as_me:18621: checking if you want to use dbmalloc for testing" >&5
18622 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18623
18624 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18625 if test "${with_dbmalloc+set}" = set; then
18626   withval="$with_dbmalloc"
18627   case "x$withval" in
18628         (x|xno) ;;
18629         (*)
18630                 : "${with_cflags:=-g}"
18631                 : "${enable_leaks:=no}"
18632                 with_dbmalloc=yes
18633
18634 cat >>confdefs.h <<EOF
18635 #define USE_DBMALLOC 1
18636 EOF
18637
18638                 ;;
18639         esac
18640 else
18641   with_dbmalloc=
18642 fi;
18643 echo "$as_me:18643: result: ${with_dbmalloc:-no}" >&5
18644 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18645
18646 case ".$with_cflags" in
18647 (.*-g*)
18648         case .$CFLAGS in
18649         (.*-g*)
18650                 ;;
18651         (*)
18652
18653 cf_fix_cppflags=no
18654 cf_new_cflags=
18655 cf_new_cppflags=
18656 cf_new_extra_cppflags=
18657
18658 for cf_add_cflags in -g
18659 do
18660 case "$cf_fix_cppflags" in
18661 (no)
18662         case "$cf_add_cflags" in
18663         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18664                 case "$cf_add_cflags" in
18665                 (-D*)
18666                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18667
18668                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18669                                 && test -z "${cf_tst_cflags}" \
18670                                 && cf_fix_cppflags=yes
18671
18672                         if test "$cf_fix_cppflags" = yes ; then
18673
18674         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18675         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18676
18677                                 continue
18678                         elif test "${cf_tst_cflags}" = "\"'" ; then
18679
18680         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18681         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18682
18683                                 continue
18684                         fi
18685                         ;;
18686                 esac
18687                 case "$CPPFLAGS" in
18688                 (*$cf_add_cflags)
18689                         ;;
18690                 (*)
18691                         case "$cf_add_cflags" in
18692                         (-D*)
18693                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18694
18695 CPPFLAGS=`echo "$CPPFLAGS" | \
18696         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18697                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18698
18699                                 ;;
18700                         esac
18701
18702         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18703         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18704
18705                         ;;
18706                 esac
18707                 ;;
18708         (*)
18709
18710         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18711         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18712
18713                 ;;
18714         esac
18715         ;;
18716 (yes)
18717
18718         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18719         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18720
18721         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18722
18723         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18724                 && test -z "${cf_tst_cflags}" \
18725                 && cf_fix_cppflags=no
18726         ;;
18727 esac
18728 done
18729
18730 if test -n "$cf_new_cflags" ; then
18731
18732         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18733         CFLAGS="${CFLAGS}$cf_new_cflags"
18734
18735 fi
18736
18737 if test -n "$cf_new_cppflags" ; then
18738
18739         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18740         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18741
18742 fi
18743
18744 if test -n "$cf_new_extra_cppflags" ; then
18745
18746         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18747         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18748
18749 fi
18750
18751                 ;;
18752         esac
18753         ;;
18754 esac
18755
18756 if test "$with_dbmalloc" = yes ; then
18757         echo "$as_me:18757: checking for dbmalloc.h" >&5
18758 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18759 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18760   echo $ECHO_N "(cached) $ECHO_C" >&6
18761 else
18762   cat >"conftest.$ac_ext" <<_ACEOF
18763 #line 18763 "configure"
18764 #include "confdefs.h"
18765 #include <dbmalloc.h>
18766 _ACEOF
18767 if { (eval echo "$as_me:18767: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18768   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18769   ac_status=$?
18770   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18771   rm -f conftest.er1
18772   cat conftest.err >&5
18773   echo "$as_me:18773: \$? = $ac_status" >&5
18774   (exit "$ac_status"); } >/dev/null; then
18775   if test -s conftest.err; then
18776     ac_cpp_err=$ac_c_preproc_warn_flag
18777   else
18778     ac_cpp_err=
18779   fi
18780 else
18781   ac_cpp_err=yes
18782 fi
18783 if test -z "$ac_cpp_err"; then
18784   ac_cv_header_dbmalloc_h=yes
18785 else
18786   echo "$as_me: failed program was:" >&5
18787   cat "conftest.$ac_ext" >&5
18788   ac_cv_header_dbmalloc_h=no
18789 fi
18790 rm -f conftest.err "conftest.$ac_ext"
18791 fi
18792 echo "$as_me:18792: result: $ac_cv_header_dbmalloc_h" >&5
18793 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18794 if test "$ac_cv_header_dbmalloc_h" = yes; then
18795
18796 echo "$as_me:18796: checking for debug_malloc in -ldbmalloc" >&5
18797 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18798 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18799   echo $ECHO_N "(cached) $ECHO_C" >&6
18800 else
18801   ac_check_lib_save_LIBS=$LIBS
18802 LIBS="-ldbmalloc  $LIBS"
18803 cat >"conftest.$ac_ext" <<_ACEOF
18804 #line 18804 "configure"
18805 #include "confdefs.h"
18806
18807 /* Override any gcc2 internal prototype to avoid an error.  */
18808 #ifdef __cplusplus
18809 extern "C"
18810 #endif
18811 /* We use char because int might match the return type of a gcc2
18812    builtin and then its argument prototype would still apply.  */
18813 char debug_malloc (void);
18814 int
18815 main (void)
18816 {
18817 debug_malloc ();
18818   ;
18819   return 0;
18820 }
18821 _ACEOF
18822 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18823 if { (eval echo "$as_me:18823: \"$ac_link\"") >&5
18824   (eval $ac_link) 2>&5
18825   ac_status=$?
18826   echo "$as_me:18826: \$? = $ac_status" >&5
18827   (exit "$ac_status"); } &&
18828          { ac_try='test -s "conftest$ac_exeext"'
18829   { (eval echo "$as_me:18829: \"$ac_try\"") >&5
18830   (eval $ac_try) 2>&5
18831   ac_status=$?
18832   echo "$as_me:18832: \$? = $ac_status" >&5
18833   (exit "$ac_status"); }; }; then
18834   ac_cv_lib_dbmalloc_debug_malloc=yes
18835 else
18836   echo "$as_me: failed program was:" >&5
18837 cat "conftest.$ac_ext" >&5
18838 ac_cv_lib_dbmalloc_debug_malloc=no
18839 fi
18840 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18841 LIBS=$ac_check_lib_save_LIBS
18842 fi
18843 echo "$as_me:18843: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18844 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18845 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18846   cat >>confdefs.h <<EOF
18847 #define HAVE_LIBDBMALLOC 1
18848 EOF
18849
18850   LIBS="-ldbmalloc $LIBS"
18851
18852 fi
18853
18854 fi
18855
18856 fi
18857
18858 echo "$as_me:18858: checking if you want to use valgrind for testing" >&5
18859 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18860
18861 # Check whether --with-valgrind or --without-valgrind was given.
18862 if test "${with_valgrind+set}" = set; then
18863   withval="$with_valgrind"
18864   case "x$withval" in
18865         (x|xno) ;;
18866         (*)
18867                 : "${with_cflags:=-g}"
18868                 : "${enable_leaks:=no}"
18869                 with_valgrind=yes
18870
18871 cat >>confdefs.h <<EOF
18872 #define USE_VALGRIND 1
18873 EOF
18874
18875                 ;;
18876         esac
18877 else
18878   with_valgrind=
18879 fi;
18880 echo "$as_me:18880: result: ${with_valgrind:-no}" >&5
18881 echo "${ECHO_T}${with_valgrind:-no}" >&6
18882
18883 case ".$with_cflags" in
18884 (.*-g*)
18885         case .$CFLAGS in
18886         (.*-g*)
18887                 ;;
18888         (*)
18889
18890 cf_fix_cppflags=no
18891 cf_new_cflags=
18892 cf_new_cppflags=
18893 cf_new_extra_cppflags=
18894
18895 for cf_add_cflags in -g
18896 do
18897 case "$cf_fix_cppflags" in
18898 (no)
18899         case "$cf_add_cflags" in
18900         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18901                 case "$cf_add_cflags" in
18902                 (-D*)
18903                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18904
18905                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18906                                 && test -z "${cf_tst_cflags}" \
18907                                 && cf_fix_cppflags=yes
18908
18909                         if test "$cf_fix_cppflags" = yes ; then
18910
18911         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18912         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18913
18914                                 continue
18915                         elif test "${cf_tst_cflags}" = "\"'" ; then
18916
18917         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18918         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18919
18920                                 continue
18921                         fi
18922                         ;;
18923                 esac
18924                 case "$CPPFLAGS" in
18925                 (*$cf_add_cflags)
18926                         ;;
18927                 (*)
18928                         case "$cf_add_cflags" in
18929                         (-D*)
18930                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18931
18932 CPPFLAGS=`echo "$CPPFLAGS" | \
18933         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18934                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18935
18936                                 ;;
18937                         esac
18938
18939         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18940         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18941
18942                         ;;
18943                 esac
18944                 ;;
18945         (*)
18946
18947         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18948         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18949
18950                 ;;
18951         esac
18952         ;;
18953 (yes)
18954
18955         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18956         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18957
18958         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18959
18960         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18961                 && test -z "${cf_tst_cflags}" \
18962                 && cf_fix_cppflags=no
18963         ;;
18964 esac
18965 done
18966
18967 if test -n "$cf_new_cflags" ; then
18968
18969         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18970         CFLAGS="${CFLAGS}$cf_new_cflags"
18971
18972 fi
18973
18974 if test -n "$cf_new_cppflags" ; then
18975
18976         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18977         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18978
18979 fi
18980
18981 if test -n "$cf_new_extra_cppflags" ; then
18982
18983         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18984         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18985
18986 fi
18987
18988                 ;;
18989         esac
18990         ;;
18991 esac
18992
18993 echo "$as_me:18993: checking if you want to perform memory-leak testing" >&5
18994 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18995
18996 # Check whether --enable-leaks or --disable-leaks was given.
18997 if test "${enable_leaks+set}" = set; then
18998   enableval="$enable_leaks"
18999   enable_leaks=$enableval
19000 else
19001   enable_leaks=yes
19002 fi;
19003 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
19004 echo "$as_me:19004: result: $with_no_leaks" >&5
19005 echo "${ECHO_T}$with_no_leaks" >&6
19006
19007 if test "$enable_leaks" = no ; then
19008
19009 cat >>confdefs.h <<\EOF
19010 #define NO_LEAKS 1
19011 EOF
19012
19013 cat >>confdefs.h <<\EOF
19014 #define YY_NO_LEAKS 1
19015 EOF
19016
19017 fi
19018
19019 cat >>confdefs.h <<\EOF
19020 #define HAVE_NC_ALLOC_H 1
19021 EOF
19022
19023 ###     use option --enable-expanded to generate certain macros as functions
19024
19025 # Check whether --enable-expanded or --disable-expanded was given.
19026 if test "${enable_expanded+set}" = set; then
19027   enableval="$enable_expanded"
19028   test "x$enableval" = xyes &&
19029 cat >>confdefs.h <<\EOF
19030 #define NCURSES_EXPANDED 1
19031 EOF
19032
19033 fi;
19034
19035 ###     use option --disable-macros to suppress macros in favor of functions
19036
19037 # Check whether --enable-macros or --disable-macros was given.
19038 if test "${enable_macros+set}" = set; then
19039   enableval="$enable_macros"
19040   test "$enableval" = no &&
19041 cat >>confdefs.h <<\EOF
19042 #define NCURSES_NOMACROS 1
19043 EOF
19044
19045 fi;
19046
19047 # Normally we only add trace() to the debug-library.  Allow this to be
19048 # extended to all models of the ncurses library:
19049 cf_all_traces=no
19050 case "$CFLAGS $CPPFLAGS" in
19051 (*-DTRACE*)
19052         cf_all_traces=yes
19053         ;;
19054 esac
19055
19056 echo "$as_me:19056: checking whether to add trace feature to all models" >&5
19057 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
19058
19059 # Check whether --with-trace or --without-trace was given.
19060 if test "${with_trace+set}" = set; then
19061   withval="$with_trace"
19062   cf_with_trace=$withval
19063 else
19064   cf_with_trace=$cf_all_traces
19065 fi;
19066 echo "$as_me:19066: result: $cf_with_trace" >&5
19067 echo "${ECHO_T}$cf_with_trace" >&6
19068
19069 if test "x$cf_with_trace" = xyes ; then
19070         LIB_TRACING=all
19071         ADA_TRACE=TRUE
19072
19073 cf_fix_cppflags=no
19074 cf_new_cflags=
19075 cf_new_cppflags=
19076 cf_new_extra_cppflags=
19077
19078 for cf_add_cflags in -DTRACE
19079 do
19080 case "$cf_fix_cppflags" in
19081 (no)
19082         case "$cf_add_cflags" in
19083         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19084                 case "$cf_add_cflags" in
19085                 (-D*)
19086                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19087
19088                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19089                                 && test -z "${cf_tst_cflags}" \
19090                                 && cf_fix_cppflags=yes
19091
19092                         if test "$cf_fix_cppflags" = yes ; then
19093
19094         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19095         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19096
19097                                 continue
19098                         elif test "${cf_tst_cflags}" = "\"'" ; then
19099
19100         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19101         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19102
19103                                 continue
19104                         fi
19105                         ;;
19106                 esac
19107                 case "$CPPFLAGS" in
19108                 (*$cf_add_cflags)
19109                         ;;
19110                 (*)
19111                         case "$cf_add_cflags" in
19112                         (-D*)
19113                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19114
19115 CPPFLAGS=`echo "$CPPFLAGS" | \
19116         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19117                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19118
19119                                 ;;
19120                         esac
19121
19122         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19123         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19124
19125                         ;;
19126                 esac
19127                 ;;
19128         (*)
19129
19130         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19131         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19132
19133                 ;;
19134         esac
19135         ;;
19136 (yes)
19137
19138         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19139         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19140
19141         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19142
19143         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19144                 && test -z "${cf_tst_cflags}" \
19145                 && cf_fix_cppflags=no
19146         ;;
19147 esac
19148 done
19149
19150 if test -n "$cf_new_cflags" ; then
19151
19152         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19153         CFLAGS="${CFLAGS}$cf_new_cflags"
19154
19155 fi
19156
19157 if test -n "$cf_new_cppflags" ; then
19158
19159         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19160         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19161
19162 fi
19163
19164 if test -n "$cf_new_extra_cppflags" ; then
19165
19166         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19167         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19168
19169 fi
19170
19171 cat >>confdefs.h <<\EOF
19172 #define HAVE__TRACEF 1
19173 EOF
19174
19175 else
19176         LIB_TRACING=DEBUG
19177         ADA_TRACE=FALSE
19178 fi
19179
19180 echo "$as_me:19180: checking if we want to use GNAT projects" >&5
19181 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19182
19183 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19184 if test "${enable_gnat_projects+set}" = set; then
19185   enableval="$enable_gnat_projects"
19186   test "$enableval" != no && enableval=yes
19187         if test "$enableval" != "yes" ; then
19188     enable_gnat_projects=no
19189         else
19190                 enable_gnat_projects=yes
19191         fi
19192 else
19193   enableval=yes
19194         enable_gnat_projects=yes
19195
19196 fi;
19197 echo "$as_me:19197: result: $enable_gnat_projects" >&5
19198 echo "${ECHO_T}$enable_gnat_projects" >&6
19199
19200 ###     Checks for libraries.
19201 case "$cf_cv_system_name" in
19202 (*mingw32*|*mingw64*)
19203         # Note: WINVER may be a problem with Windows 10
19204         if test "x$with_exp_win32" = xyes ; then
19205                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19206         else
19207                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19208         fi
19209
19210 echo "$as_me:19210: checking if ssp library is needed" >&5
19211 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19212 if test "${cf_cv_need_libssp+set}" = set; then
19213   echo $ECHO_N "(cached) $ECHO_C" >&6
19214 else
19215
19216 cat >"conftest.$ac_ext" <<_ACEOF
19217 #line 19217 "configure"
19218 #include "confdefs.h"
19219
19220 #include <sys/types.h>
19221 #include <dirent.h>
19222
19223 int
19224 main (void)
19225 {
19226
19227        DIR *dp = opendir(".");
19228
19229   ;
19230   return 0;
19231 }
19232 _ACEOF
19233 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19234 if { (eval echo "$as_me:19234: \"$ac_link\"") >&5
19235   (eval $ac_link) 2>&5
19236   ac_status=$?
19237   echo "$as_me:19237: \$? = $ac_status" >&5
19238   (exit "$ac_status"); } &&
19239          { ac_try='test -s "conftest$ac_exeext"'
19240   { (eval echo "$as_me:19240: \"$ac_try\"") >&5
19241   (eval $ac_try) 2>&5
19242   ac_status=$?
19243   echo "$as_me:19243: \$? = $ac_status" >&5
19244   (exit "$ac_status"); }; }; then
19245   cf_cv_need_libssp=no
19246 else
19247   echo "$as_me: failed program was:" >&5
19248 cat "conftest.$ac_ext" >&5
19249
19250         cf_save_LIBS="$LIBS"
19251         LIBS="$LIBS -lssp"
19252         cat >"conftest.$ac_ext" <<_ACEOF
19253 #line 19253 "configure"
19254 #include "confdefs.h"
19255
19256 #include <sys/types.h>
19257 #include <dirent.h>
19258
19259 int
19260 main (void)
19261 {
19262
19263                    DIR *dp = opendir(".");
19264
19265   ;
19266   return 0;
19267 }
19268 _ACEOF
19269 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19270 if { (eval echo "$as_me:19270: \"$ac_link\"") >&5
19271   (eval $ac_link) 2>&5
19272   ac_status=$?
19273   echo "$as_me:19273: \$? = $ac_status" >&5
19274   (exit "$ac_status"); } &&
19275          { ac_try='test -s "conftest$ac_exeext"'
19276   { (eval echo "$as_me:19276: \"$ac_try\"") >&5
19277   (eval $ac_try) 2>&5
19278   ac_status=$?
19279   echo "$as_me:19279: \$? = $ac_status" >&5
19280   (exit "$ac_status"); }; }; then
19281   cf_cv_need_libssp=yes
19282 else
19283   echo "$as_me: failed program was:" >&5
19284 cat "conftest.$ac_ext" >&5
19285 cf_cv_need_libssp=maybe
19286 fi
19287 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19288         LIBS="$cf_save_LIBS"
19289
19290 fi
19291 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19292 fi
19293 echo "$as_me:19293: result: $cf_cv_need_libssp" >&5
19294 echo "${ECHO_T}$cf_cv_need_libssp" >&6
19295
19296 if test "x$cf_cv_need_libssp" = xyes
19297 then
19298
19299 cf_add_libs="$LIBS"
19300 # reverse order
19301 cf_add_0lib=
19302 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19303 # filter duplicates
19304 for cf_add_1lib in $cf_add_0lib; do
19305         for cf_add_2lib in $cf_add_libs; do
19306                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19307                         cf_add_1lib=
19308                         break
19309                 fi
19310         done
19311         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19312 done
19313 LIBS="$cf_add_libs"
19314
19315 fi
19316
19317         ;;
19318 (*)
19319         ;;
19320 esac
19321
19322 echo "$as_me:19322: checking if -lm needed for math functions" >&5
19323 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19324 if test "${cf_cv_need_libm+set}" = set; then
19325   echo $ECHO_N "(cached) $ECHO_C" >&6
19326 else
19327
19328         cat >"conftest.$ac_ext" <<_ACEOF
19329 #line 19329 "configure"
19330 #include "confdefs.h"
19331
19332                 #include <stdio.h>
19333                 #include <stdlib.h>
19334                 #include <math.h>
19335
19336 int
19337 main (void)
19338 {
19339 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19340   ;
19341   return 0;
19342 }
19343 _ACEOF
19344 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19345 if { (eval echo "$as_me:19345: \"$ac_link\"") >&5
19346   (eval $ac_link) 2>&5
19347   ac_status=$?
19348   echo "$as_me:19348: \$? = $ac_status" >&5
19349   (exit "$ac_status"); } &&
19350          { ac_try='test -s "conftest$ac_exeext"'
19351   { (eval echo "$as_me:19351: \"$ac_try\"") >&5
19352   (eval $ac_try) 2>&5
19353   ac_status=$?
19354   echo "$as_me:19354: \$? = $ac_status" >&5
19355   (exit "$ac_status"); }; }; then
19356   cf_cv_need_libm=no
19357 else
19358   echo "$as_me: failed program was:" >&5
19359 cat "conftest.$ac_ext" >&5
19360 cf_cv_need_libm=yes
19361 fi
19362 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19363 fi
19364 echo "$as_me:19364: result: $cf_cv_need_libm" >&5
19365 echo "${ECHO_T}$cf_cv_need_libm" >&6
19366
19367 if test "$cf_cv_need_libm" = yes
19368 then
19369
19370         cf_save_LIBS="$LIBS"
19371         LIBS="$LIBS -lm"
19372         echo "$as_me:19372: checking if -lm is available for math functions" >&5
19373 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19374 if test "${cf_cv_have_libm+set}" = set; then
19375   echo $ECHO_N "(cached) $ECHO_C" >&6
19376 else
19377
19378         cat >"conftest.$ac_ext" <<_ACEOF
19379 #line 19379 "configure"
19380 #include "confdefs.h"
19381
19382                 #include <stdio.h>
19383                 #include <stdlib.h>
19384                 #include <math.h>
19385
19386 int
19387 main (void)
19388 {
19389 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19390   ;
19391   return 0;
19392 }
19393 _ACEOF
19394 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19395 if { (eval echo "$as_me:19395: \"$ac_link\"") >&5
19396   (eval $ac_link) 2>&5
19397   ac_status=$?
19398   echo "$as_me:19398: \$? = $ac_status" >&5
19399   (exit "$ac_status"); } &&
19400          { ac_try='test -s "conftest$ac_exeext"'
19401   { (eval echo "$as_me:19401: \"$ac_try\"") >&5
19402   (eval $ac_try) 2>&5
19403   ac_status=$?
19404   echo "$as_me:19404: \$? = $ac_status" >&5
19405   (exit "$ac_status"); }; }; then
19406   cf_cv_have_libm=yes
19407 else
19408   echo "$as_me: failed program was:" >&5
19409 cat "conftest.$ac_ext" >&5
19410 cf_cv_have_libm=no
19411 fi
19412 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19413 fi
19414 echo "$as_me:19414: result: $cf_cv_have_libm" >&5
19415 echo "${ECHO_T}$cf_cv_have_libm" >&6
19416         LIBS="$cf_save_LIBS"
19417
19418         if test "$cf_cv_have_libm" = yes
19419         then
19420                 MATH_LIB=-lm
19421         fi
19422 else
19423         cf_cv_have_libm=yes
19424 fi
19425
19426 if test "$cf_cv_have_libm" = yes
19427 then
19428
19429 cat >>confdefs.h <<\EOF
19430 #define HAVE_MATH_FUNCS 1
19431 EOF
19432
19433 fi
19434
19435 ###     Checks for header files.
19436 echo "$as_me:19436: checking whether time.h and sys/time.h may both be included" >&5
19437 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19438 if test "${ac_cv_header_time+set}" = set; then
19439   echo $ECHO_N "(cached) $ECHO_C" >&6
19440 else
19441   cat >"conftest.$ac_ext" <<_ACEOF
19442 #line 19442 "configure"
19443 #include "confdefs.h"
19444 #include <sys/types.h>
19445 #include <sys/time.h>
19446 #include <time.h>
19447
19448 int
19449 main (void)
19450 {
19451 if ((struct tm *) 0)
19452 return 0;
19453   ;
19454   return 0;
19455 }
19456 _ACEOF
19457 rm -f "conftest.$ac_objext"
19458 if { (eval echo "$as_me:19458: \"$ac_compile\"") >&5
19459   (eval $ac_compile) 2>&5
19460   ac_status=$?
19461   echo "$as_me:19461: \$? = $ac_status" >&5
19462   (exit "$ac_status"); } &&
19463          { ac_try='test -s "conftest.$ac_objext"'
19464   { (eval echo "$as_me:19464: \"$ac_try\"") >&5
19465   (eval $ac_try) 2>&5
19466   ac_status=$?
19467   echo "$as_me:19467: \$? = $ac_status" >&5
19468   (exit "$ac_status"); }; }; then
19469   ac_cv_header_time=yes
19470 else
19471   echo "$as_me: failed program was:" >&5
19472 cat "conftest.$ac_ext" >&5
19473 ac_cv_header_time=no
19474 fi
19475 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19476 fi
19477 echo "$as_me:19477: result: $ac_cv_header_time" >&5
19478 echo "${ECHO_T}$ac_cv_header_time" >&6
19479 if test $ac_cv_header_time = yes; then
19480
19481 cat >>confdefs.h <<\EOF
19482 #define TIME_WITH_SYS_TIME 1
19483 EOF
19484
19485 fi
19486
19487 cf_regex_func=no
19488 cf_regex_libs=
19489 case "$host_os" in
19490 (mingw*)
19491         # -lsystre -ltre -lintl -liconv
19492         echo "$as_me:19492: checking for regcomp in -lsystre" >&5
19493 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19494 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19495   echo $ECHO_N "(cached) $ECHO_C" >&6
19496 else
19497   ac_check_lib_save_LIBS=$LIBS
19498 LIBS="-lsystre  $LIBS"
19499 cat >"conftest.$ac_ext" <<_ACEOF
19500 #line 19500 "configure"
19501 #include "confdefs.h"
19502
19503 /* Override any gcc2 internal prototype to avoid an error.  */
19504 #ifdef __cplusplus
19505 extern "C"
19506 #endif
19507 /* We use char because int might match the return type of a gcc2
19508    builtin and then its argument prototype would still apply.  */
19509 char regcomp (void);
19510 int
19511 main (void)
19512 {
19513 regcomp ();
19514   ;
19515   return 0;
19516 }
19517 _ACEOF
19518 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19519 if { (eval echo "$as_me:19519: \"$ac_link\"") >&5
19520   (eval $ac_link) 2>&5
19521   ac_status=$?
19522   echo "$as_me:19522: \$? = $ac_status" >&5
19523   (exit "$ac_status"); } &&
19524          { ac_try='test -s "conftest$ac_exeext"'
19525   { (eval echo "$as_me:19525: \"$ac_try\"") >&5
19526   (eval $ac_try) 2>&5
19527   ac_status=$?
19528   echo "$as_me:19528: \$? = $ac_status" >&5
19529   (exit "$ac_status"); }; }; then
19530   ac_cv_lib_systre_regcomp=yes
19531 else
19532   echo "$as_me: failed program was:" >&5
19533 cat "conftest.$ac_ext" >&5
19534 ac_cv_lib_systre_regcomp=no
19535 fi
19536 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19537 LIBS=$ac_check_lib_save_LIBS
19538 fi
19539 echo "$as_me:19539: result: $ac_cv_lib_systre_regcomp" >&5
19540 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19541 if test "$ac_cv_lib_systre_regcomp" = yes; then
19542
19543                 echo "$as_me:19543: checking for libiconv_open in -liconv" >&5
19544 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19545 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19546   echo $ECHO_N "(cached) $ECHO_C" >&6
19547 else
19548   ac_check_lib_save_LIBS=$LIBS
19549 LIBS="-liconv  $LIBS"
19550 cat >"conftest.$ac_ext" <<_ACEOF
19551 #line 19551 "configure"
19552 #include "confdefs.h"
19553
19554 /* Override any gcc2 internal prototype to avoid an error.  */
19555 #ifdef __cplusplus
19556 extern "C"
19557 #endif
19558 /* We use char because int might match the return type of a gcc2
19559    builtin and then its argument prototype would still apply.  */
19560 char libiconv_open (void);
19561 int
19562 main (void)
19563 {
19564 libiconv_open ();
19565   ;
19566   return 0;
19567 }
19568 _ACEOF
19569 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19570 if { (eval echo "$as_me:19570: \"$ac_link\"") >&5
19571   (eval $ac_link) 2>&5
19572   ac_status=$?
19573   echo "$as_me:19573: \$? = $ac_status" >&5
19574   (exit "$ac_status"); } &&
19575          { ac_try='test -s "conftest$ac_exeext"'
19576   { (eval echo "$as_me:19576: \"$ac_try\"") >&5
19577   (eval $ac_try) 2>&5
19578   ac_status=$?
19579   echo "$as_me:19579: \$? = $ac_status" >&5
19580   (exit "$ac_status"); }; }; then
19581   ac_cv_lib_iconv_libiconv_open=yes
19582 else
19583   echo "$as_me: failed program was:" >&5
19584 cat "conftest.$ac_ext" >&5
19585 ac_cv_lib_iconv_libiconv_open=no
19586 fi
19587 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19588 LIBS=$ac_check_lib_save_LIBS
19589 fi
19590 echo "$as_me:19590: result: $ac_cv_lib_iconv_libiconv_open" >&5
19591 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19592 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19593
19594 cf_add_libs="$LIBS"
19595 # reverse order
19596 cf_add_0lib=
19597 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19598 # filter duplicates
19599 for cf_add_1lib in $cf_add_0lib; do
19600         for cf_add_2lib in $cf_add_libs; do
19601                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19602                         cf_add_1lib=
19603                         break
19604                 fi
19605         done
19606         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19607 done
19608 LIBS="$cf_add_libs"
19609
19610 fi
19611
19612                 echo "$as_me:19612: checking for libintl_gettext in -lintl" >&5
19613 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19614 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19615   echo $ECHO_N "(cached) $ECHO_C" >&6
19616 else
19617   ac_check_lib_save_LIBS=$LIBS
19618 LIBS="-lintl  $LIBS"
19619 cat >"conftest.$ac_ext" <<_ACEOF
19620 #line 19620 "configure"
19621 #include "confdefs.h"
19622
19623 /* Override any gcc2 internal prototype to avoid an error.  */
19624 #ifdef __cplusplus
19625 extern "C"
19626 #endif
19627 /* We use char because int might match the return type of a gcc2
19628    builtin and then its argument prototype would still apply.  */
19629 char libintl_gettext (void);
19630 int
19631 main (void)
19632 {
19633 libintl_gettext ();
19634   ;
19635   return 0;
19636 }
19637 _ACEOF
19638 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19639 if { (eval echo "$as_me:19639: \"$ac_link\"") >&5
19640   (eval $ac_link) 2>&5
19641   ac_status=$?
19642   echo "$as_me:19642: \$? = $ac_status" >&5
19643   (exit "$ac_status"); } &&
19644          { ac_try='test -s "conftest$ac_exeext"'
19645   { (eval echo "$as_me:19645: \"$ac_try\"") >&5
19646   (eval $ac_try) 2>&5
19647   ac_status=$?
19648   echo "$as_me:19648: \$? = $ac_status" >&5
19649   (exit "$ac_status"); }; }; then
19650   ac_cv_lib_intl_libintl_gettext=yes
19651 else
19652   echo "$as_me: failed program was:" >&5
19653 cat "conftest.$ac_ext" >&5
19654 ac_cv_lib_intl_libintl_gettext=no
19655 fi
19656 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19657 LIBS=$ac_check_lib_save_LIBS
19658 fi
19659 echo "$as_me:19659: result: $ac_cv_lib_intl_libintl_gettext" >&5
19660 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19661 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19662
19663 cf_add_libs="$LIBS"
19664 # reverse order
19665 cf_add_0lib=
19666 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19667 # filter duplicates
19668 for cf_add_1lib in $cf_add_0lib; do
19669         for cf_add_2lib in $cf_add_libs; do
19670                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19671                         cf_add_1lib=
19672                         break
19673                 fi
19674         done
19675         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19676 done
19677 LIBS="$cf_add_libs"
19678
19679 fi
19680
19681                 echo "$as_me:19681: checking for tre_regcomp in -ltre" >&5
19682 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19683 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19684   echo $ECHO_N "(cached) $ECHO_C" >&6
19685 else
19686   ac_check_lib_save_LIBS=$LIBS
19687 LIBS="-ltre  $LIBS"
19688 cat >"conftest.$ac_ext" <<_ACEOF
19689 #line 19689 "configure"
19690 #include "confdefs.h"
19691
19692 /* Override any gcc2 internal prototype to avoid an error.  */
19693 #ifdef __cplusplus
19694 extern "C"
19695 #endif
19696 /* We use char because int might match the return type of a gcc2
19697    builtin and then its argument prototype would still apply.  */
19698 char tre_regcomp (void);
19699 int
19700 main (void)
19701 {
19702 tre_regcomp ();
19703   ;
19704   return 0;
19705 }
19706 _ACEOF
19707 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19708 if { (eval echo "$as_me:19708: \"$ac_link\"") >&5
19709   (eval $ac_link) 2>&5
19710   ac_status=$?
19711   echo "$as_me:19711: \$? = $ac_status" >&5
19712   (exit "$ac_status"); } &&
19713          { ac_try='test -s "conftest$ac_exeext"'
19714   { (eval echo "$as_me:19714: \"$ac_try\"") >&5
19715   (eval $ac_try) 2>&5
19716   ac_status=$?
19717   echo "$as_me:19717: \$? = $ac_status" >&5
19718   (exit "$ac_status"); }; }; then
19719   ac_cv_lib_tre_tre_regcomp=yes
19720 else
19721   echo "$as_me: failed program was:" >&5
19722 cat "conftest.$ac_ext" >&5
19723 ac_cv_lib_tre_tre_regcomp=no
19724 fi
19725 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19726 LIBS=$ac_check_lib_save_LIBS
19727 fi
19728 echo "$as_me:19728: result: $ac_cv_lib_tre_tre_regcomp" >&5
19729 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19730 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19731
19732 cf_add_libs="$LIBS"
19733 # reverse order
19734 cf_add_0lib=
19735 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19736 # filter duplicates
19737 for cf_add_1lib in $cf_add_0lib; do
19738         for cf_add_2lib in $cf_add_libs; do
19739                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19740                         cf_add_1lib=
19741                         break
19742                 fi
19743         done
19744         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19745 done
19746 LIBS="$cf_add_libs"
19747
19748 fi
19749
19750 cf_add_libs="$LIBS"
19751 # reverse order
19752 cf_add_0lib=
19753 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19754 # filter duplicates
19755 for cf_add_1lib in $cf_add_0lib; do
19756         for cf_add_2lib in $cf_add_libs; do
19757                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19758                         cf_add_1lib=
19759                         break
19760                 fi
19761         done
19762         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19763 done
19764 LIBS="$cf_add_libs"
19765
19766                 cf_regex_func=regcomp
19767
19768 else
19769
19770                 echo "$as_me:19770: checking for regcomp in -lgnurx" >&5
19771 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19772 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19773   echo $ECHO_N "(cached) $ECHO_C" >&6
19774 else
19775   ac_check_lib_save_LIBS=$LIBS
19776 LIBS="-lgnurx  $LIBS"
19777 cat >"conftest.$ac_ext" <<_ACEOF
19778 #line 19778 "configure"
19779 #include "confdefs.h"
19780
19781 /* Override any gcc2 internal prototype to avoid an error.  */
19782 #ifdef __cplusplus
19783 extern "C"
19784 #endif
19785 /* We use char because int might match the return type of a gcc2
19786    builtin and then its argument prototype would still apply.  */
19787 char regcomp (void);
19788 int
19789 main (void)
19790 {
19791 regcomp ();
19792   ;
19793   return 0;
19794 }
19795 _ACEOF
19796 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19797 if { (eval echo "$as_me:19797: \"$ac_link\"") >&5
19798   (eval $ac_link) 2>&5
19799   ac_status=$?
19800   echo "$as_me:19800: \$? = $ac_status" >&5
19801   (exit "$ac_status"); } &&
19802          { ac_try='test -s "conftest$ac_exeext"'
19803   { (eval echo "$as_me:19803: \"$ac_try\"") >&5
19804   (eval $ac_try) 2>&5
19805   ac_status=$?
19806   echo "$as_me:19806: \$? = $ac_status" >&5
19807   (exit "$ac_status"); }; }; then
19808   ac_cv_lib_gnurx_regcomp=yes
19809 else
19810   echo "$as_me: failed program was:" >&5
19811 cat "conftest.$ac_ext" >&5
19812 ac_cv_lib_gnurx_regcomp=no
19813 fi
19814 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19815 LIBS=$ac_check_lib_save_LIBS
19816 fi
19817 echo "$as_me:19817: result: $ac_cv_lib_gnurx_regcomp" >&5
19818 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19819 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19820
19821 cf_add_libs="$LIBS"
19822 # reverse order
19823 cf_add_0lib=
19824 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19825 # filter duplicates
19826 for cf_add_1lib in $cf_add_0lib; do
19827         for cf_add_2lib in $cf_add_libs; do
19828                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19829                         cf_add_1lib=
19830                         break
19831                 fi
19832         done
19833         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19834 done
19835 LIBS="$cf_add_libs"
19836
19837                         cf_regex_func=regcomp
19838 fi
19839
19840 fi
19841
19842         ;;
19843 (*)
19844         cf_regex_libs="regex re"
19845         echo "$as_me:19845: checking for regcomp" >&5
19846 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19847 if test "${ac_cv_func_regcomp+set}" = set; then
19848   echo $ECHO_N "(cached) $ECHO_C" >&6
19849 else
19850   cat >"conftest.$ac_ext" <<_ACEOF
19851 #line 19851 "configure"
19852 #include "confdefs.h"
19853 #define regcomp autoconf_temporary
19854 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19855 #undef regcomp
19856
19857 #ifdef __cplusplus
19858 extern "C"
19859 #endif
19860
19861 /* We use char because int might match the return type of a gcc2
19862    builtin and then its argument prototype would still apply.  */
19863 char regcomp (void);
19864
19865 int
19866 main (void)
19867 {
19868
19869 /* The GNU C library defines stubs for functions which it implements
19870     to always fail with ENOSYS.  Some functions are actually named
19871     something starting with __ and the normal name is an alias.  */
19872 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19873 #error found stub for regcomp
19874 #endif
19875
19876         return regcomp ();
19877   ;
19878   return 0;
19879 }
19880 _ACEOF
19881 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19882 if { (eval echo "$as_me:19882: \"$ac_link\"") >&5
19883   (eval $ac_link) 2>&5
19884   ac_status=$?
19885   echo "$as_me:19885: \$? = $ac_status" >&5
19886   (exit "$ac_status"); } &&
19887          { ac_try='test -s "conftest$ac_exeext"'
19888   { (eval echo "$as_me:19888: \"$ac_try\"") >&5
19889   (eval $ac_try) 2>&5
19890   ac_status=$?
19891   echo "$as_me:19891: \$? = $ac_status" >&5
19892   (exit "$ac_status"); }; }; then
19893   ac_cv_func_regcomp=yes
19894 else
19895   echo "$as_me: failed program was:" >&5
19896 cat "conftest.$ac_ext" >&5
19897 ac_cv_func_regcomp=no
19898 fi
19899 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19900 fi
19901 echo "$as_me:19901: result: $ac_cv_func_regcomp" >&5
19902 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19903 if test "$ac_cv_func_regcomp" = yes; then
19904   cf_regex_func=regcomp
19905 else
19906
19907                 for cf_regex_lib in $cf_regex_libs
19908                 do
19909                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19910 echo "$as_me:19910: checking for regcomp in -l$cf_regex_lib" >&5
19911 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19912 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19913   echo $ECHO_N "(cached) $ECHO_C" >&6
19914 else
19915   ac_check_lib_save_LIBS=$LIBS
19916 LIBS="-l$cf_regex_lib  $LIBS"
19917 cat >"conftest.$ac_ext" <<_ACEOF
19918 #line 19918 "configure"
19919 #include "confdefs.h"
19920
19921 /* Override any gcc2 internal prototype to avoid an error.  */
19922 #ifdef __cplusplus
19923 extern "C"
19924 #endif
19925 /* We use char because int might match the return type of a gcc2
19926    builtin and then its argument prototype would still apply.  */
19927 char regcomp (void);
19928 int
19929 main (void)
19930 {
19931 regcomp ();
19932   ;
19933   return 0;
19934 }
19935 _ACEOF
19936 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19937 if { (eval echo "$as_me:19937: \"$ac_link\"") >&5
19938   (eval $ac_link) 2>&5
19939   ac_status=$?
19940   echo "$as_me:19940: \$? = $ac_status" >&5
19941   (exit "$ac_status"); } &&
19942          { ac_try='test -s "conftest$ac_exeext"'
19943   { (eval echo "$as_me:19943: \"$ac_try\"") >&5
19944   (eval $ac_try) 2>&5
19945   ac_status=$?
19946   echo "$as_me:19946: \$? = $ac_status" >&5
19947   (exit "$ac_status"); }; }; then
19948   eval "$as_ac_Lib=yes"
19949 else
19950   echo "$as_me: failed program was:" >&5
19951 cat "conftest.$ac_ext" >&5
19952 eval "$as_ac_Lib=no"
19953 fi
19954 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19955 LIBS=$ac_check_lib_save_LIBS
19956 fi
19957 echo "$as_me:19957: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19958 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19959 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19960
19961 cf_add_libs="$LIBS"
19962 # reverse order
19963 cf_add_0lib=
19964 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19965 # filter duplicates
19966 for cf_add_1lib in $cf_add_0lib; do
19967         for cf_add_2lib in $cf_add_libs; do
19968                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19969                         cf_add_1lib=
19970                         break
19971                 fi
19972         done
19973         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19974 done
19975 LIBS="$cf_add_libs"
19976
19977                                         cf_regex_func=regcomp
19978                                         break
19979 fi
19980
19981                 done
19982
19983 fi
19984
19985         ;;
19986 esac
19987
19988 if test "$cf_regex_func" = no ; then
19989         echo "$as_me:19989: checking for compile" >&5
19990 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19991 if test "${ac_cv_func_compile+set}" = set; then
19992   echo $ECHO_N "(cached) $ECHO_C" >&6
19993 else
19994   cat >"conftest.$ac_ext" <<_ACEOF
19995 #line 19995 "configure"
19996 #include "confdefs.h"
19997 #define compile autoconf_temporary
19998 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19999 #undef compile
20000
20001 #ifdef __cplusplus
20002 extern "C"
20003 #endif
20004
20005 /* We use char because int might match the return type of a gcc2
20006    builtin and then its argument prototype would still apply.  */
20007 char compile (void);
20008
20009 int
20010 main (void)
20011 {
20012
20013 /* The GNU C library defines stubs for functions which it implements
20014     to always fail with ENOSYS.  Some functions are actually named
20015     something starting with __ and the normal name is an alias.  */
20016 #if defined (__stub_compile) || defined (__stub___compile)
20017 #error found stub for compile
20018 #endif
20019
20020         return compile ();
20021   ;
20022   return 0;
20023 }
20024 _ACEOF
20025 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20026 if { (eval echo "$as_me:20026: \"$ac_link\"") >&5
20027   (eval $ac_link) 2>&5
20028   ac_status=$?
20029   echo "$as_me:20029: \$? = $ac_status" >&5
20030   (exit "$ac_status"); } &&
20031          { ac_try='test -s "conftest$ac_exeext"'
20032   { (eval echo "$as_me:20032: \"$ac_try\"") >&5
20033   (eval $ac_try) 2>&5
20034   ac_status=$?
20035   echo "$as_me:20035: \$? = $ac_status" >&5
20036   (exit "$ac_status"); }; }; then
20037   ac_cv_func_compile=yes
20038 else
20039   echo "$as_me: failed program was:" >&5
20040 cat "conftest.$ac_ext" >&5
20041 ac_cv_func_compile=no
20042 fi
20043 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20044 fi
20045 echo "$as_me:20045: result: $ac_cv_func_compile" >&5
20046 echo "${ECHO_T}$ac_cv_func_compile" >&6
20047 if test "$ac_cv_func_compile" = yes; then
20048   cf_regex_func=compile
20049 else
20050
20051                 echo "$as_me:20051: checking for compile in -lgen" >&5
20052 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
20053 if test "${ac_cv_lib_gen_compile+set}" = set; then
20054   echo $ECHO_N "(cached) $ECHO_C" >&6
20055 else
20056   ac_check_lib_save_LIBS=$LIBS
20057 LIBS="-lgen  $LIBS"
20058 cat >"conftest.$ac_ext" <<_ACEOF
20059 #line 20059 "configure"
20060 #include "confdefs.h"
20061
20062 /* Override any gcc2 internal prototype to avoid an error.  */
20063 #ifdef __cplusplus
20064 extern "C"
20065 #endif
20066 /* We use char because int might match the return type of a gcc2
20067    builtin and then its argument prototype would still apply.  */
20068 char compile (void);
20069 int
20070 main (void)
20071 {
20072 compile ();
20073   ;
20074   return 0;
20075 }
20076 _ACEOF
20077 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20078 if { (eval echo "$as_me:20078: \"$ac_link\"") >&5
20079   (eval $ac_link) 2>&5
20080   ac_status=$?
20081   echo "$as_me:20081: \$? = $ac_status" >&5
20082   (exit "$ac_status"); } &&
20083          { ac_try='test -s "conftest$ac_exeext"'
20084   { (eval echo "$as_me:20084: \"$ac_try\"") >&5
20085   (eval $ac_try) 2>&5
20086   ac_status=$?
20087   echo "$as_me:20087: \$? = $ac_status" >&5
20088   (exit "$ac_status"); }; }; then
20089   ac_cv_lib_gen_compile=yes
20090 else
20091   echo "$as_me: failed program was:" >&5
20092 cat "conftest.$ac_ext" >&5
20093 ac_cv_lib_gen_compile=no
20094 fi
20095 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20096 LIBS=$ac_check_lib_save_LIBS
20097 fi
20098 echo "$as_me:20098: result: $ac_cv_lib_gen_compile" >&5
20099 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20100 if test "$ac_cv_lib_gen_compile" = yes; then
20101
20102 cf_add_libs="$LIBS"
20103 # reverse order
20104 cf_add_0lib=
20105 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20106 # filter duplicates
20107 for cf_add_1lib in $cf_add_0lib; do
20108         for cf_add_2lib in $cf_add_libs; do
20109                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20110                         cf_add_1lib=
20111                         break
20112                 fi
20113         done
20114         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20115 done
20116 LIBS="$cf_add_libs"
20117
20118                                 cf_regex_func=compile
20119 fi
20120
20121 fi
20122
20123 fi
20124
20125 if test "$cf_regex_func" = no ; then
20126         { echo "$as_me:20126: WARNING: cannot find regular expression library" >&5
20127 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20128 fi
20129
20130 echo "$as_me:20130: checking for regular-expression headers" >&5
20131 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20132 if test "${cf_cv_regex_hdrs+set}" = set; then
20133   echo $ECHO_N "(cached) $ECHO_C" >&6
20134 else
20135
20136 cf_cv_regex_hdrs=no
20137 case "$cf_regex_func" in
20138 (compile)
20139         for cf_regex_hdr in regexp.h regexpr.h
20140         do
20141                 cat >"conftest.$ac_ext" <<_ACEOF
20142 #line 20142 "configure"
20143 #include "confdefs.h"
20144 #include <$cf_regex_hdr>
20145 int
20146 main (void)
20147 {
20148
20149                         char *p = compile("", "", "", 0);
20150                         int x = step("", "");
20151                         (void)p;
20152                         (void)x;
20153
20154   ;
20155   return 0;
20156 }
20157 _ACEOF
20158 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20159 if { (eval echo "$as_me:20159: \"$ac_link\"") >&5
20160   (eval $ac_link) 2>&5
20161   ac_status=$?
20162   echo "$as_me:20162: \$? = $ac_status" >&5
20163   (exit "$ac_status"); } &&
20164          { ac_try='test -s "conftest$ac_exeext"'
20165   { (eval echo "$as_me:20165: \"$ac_try\"") >&5
20166   (eval $ac_try) 2>&5
20167   ac_status=$?
20168   echo "$as_me:20168: \$? = $ac_status" >&5
20169   (exit "$ac_status"); }; }; then
20170
20171                         cf_cv_regex_hdrs=$cf_regex_hdr
20172                         break
20173
20174 else
20175   echo "$as_me: failed program was:" >&5
20176 cat "conftest.$ac_ext" >&5
20177 fi
20178 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20179         done
20180         ;;
20181 (*)
20182         for cf_regex_hdr in regex.h
20183         do
20184                 cat >"conftest.$ac_ext" <<_ACEOF
20185 #line 20185 "configure"
20186 #include "confdefs.h"
20187 #include <sys/types.h>
20188 #include <$cf_regex_hdr>
20189 int
20190 main (void)
20191 {
20192
20193                         regex_t *p = 0;
20194                         int x = regcomp(p, "", 0);
20195                         int y = regexec(p, "", 0, 0, 0);
20196                         (void)x;
20197                         (void)y;
20198                         regfree(p);
20199
20200   ;
20201   return 0;
20202 }
20203 _ACEOF
20204 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20205 if { (eval echo "$as_me:20205: \"$ac_link\"") >&5
20206   (eval $ac_link) 2>&5
20207   ac_status=$?
20208   echo "$as_me:20208: \$? = $ac_status" >&5
20209   (exit "$ac_status"); } &&
20210          { ac_try='test -s "conftest$ac_exeext"'
20211   { (eval echo "$as_me:20211: \"$ac_try\"") >&5
20212   (eval $ac_try) 2>&5
20213   ac_status=$?
20214   echo "$as_me:20214: \$? = $ac_status" >&5
20215   (exit "$ac_status"); }; }; then
20216
20217                         cf_cv_regex_hdrs=$cf_regex_hdr
20218                         break
20219
20220 else
20221   echo "$as_me: failed program was:" >&5
20222 cat "conftest.$ac_ext" >&5
20223 fi
20224 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20225         done
20226         ;;
20227 esac
20228
20229 fi
20230 echo "$as_me:20230: result: $cf_cv_regex_hdrs" >&5
20231 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20232
20233 case "$cf_cv_regex_hdrs" in
20234         (no)            { echo "$as_me:20234: WARNING: no regular expression header found" >&5
20235 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20236         (regex.h)
20237 cat >>confdefs.h <<\EOF
20238 #define HAVE_REGEX_H_FUNCS 1
20239 EOF
20240  ;;
20241         (regexp.h)
20242 cat >>confdefs.h <<\EOF
20243 #define HAVE_REGEXP_H_FUNCS 1
20244 EOF
20245  ;;
20246         (regexpr.h)
20247 cat >>confdefs.h <<\EOF
20248 #define HAVE_REGEXPR_H_FUNCS 1
20249 EOF
20250  ;;
20251 esac
20252
20253 for ac_header in \
20254 fcntl.h \
20255 getopt.h \
20256 limits.h \
20257 locale.h \
20258 math.h \
20259 poll.h \
20260 sys/auxv.h \
20261 sys/ioctl.h \
20262 sys/param.h \
20263 sys/poll.h \
20264 sys/select.h \
20265 sys/time.h \
20266 sys/times.h \
20267 unistd.h \
20268 wctype.h \
20269
20270 do
20271 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20272 echo "$as_me:20272: checking for $ac_header" >&5
20273 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20274 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20275   echo $ECHO_N "(cached) $ECHO_C" >&6
20276 else
20277   cat >"conftest.$ac_ext" <<_ACEOF
20278 #line 20278 "configure"
20279 #include "confdefs.h"
20280 #include <$ac_header>
20281 _ACEOF
20282 if { (eval echo "$as_me:20282: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20283   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20284   ac_status=$?
20285   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20286   rm -f conftest.er1
20287   cat conftest.err >&5
20288   echo "$as_me:20288: \$? = $ac_status" >&5
20289   (exit "$ac_status"); } >/dev/null; then
20290   if test -s conftest.err; then
20291     ac_cpp_err=$ac_c_preproc_warn_flag
20292   else
20293     ac_cpp_err=
20294   fi
20295 else
20296   ac_cpp_err=yes
20297 fi
20298 if test -z "$ac_cpp_err"; then
20299   eval "$as_ac_Header=yes"
20300 else
20301   echo "$as_me: failed program was:" >&5
20302   cat "conftest.$ac_ext" >&5
20303   eval "$as_ac_Header=no"
20304 fi
20305 rm -f conftest.err "conftest.$ac_ext"
20306 fi
20307 echo "$as_me:20307: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20308 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20309 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20310   cat >>confdefs.h <<EOF
20311 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20312 EOF
20313
20314 fi
20315 done
20316
20317 for ac_header in unistd.h getopt.h
20318 do
20319 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20320 echo "$as_me:20320: checking for $ac_header" >&5
20321 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20322 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20323   echo $ECHO_N "(cached) $ECHO_C" >&6
20324 else
20325   cat >"conftest.$ac_ext" <<_ACEOF
20326 #line 20326 "configure"
20327 #include "confdefs.h"
20328 #include <$ac_header>
20329 _ACEOF
20330 if { (eval echo "$as_me:20330: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20331   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20332   ac_status=$?
20333   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20334   rm -f conftest.er1
20335   cat conftest.err >&5
20336   echo "$as_me:20336: \$? = $ac_status" >&5
20337   (exit "$ac_status"); } >/dev/null; then
20338   if test -s conftest.err; then
20339     ac_cpp_err=$ac_c_preproc_warn_flag
20340   else
20341     ac_cpp_err=
20342   fi
20343 else
20344   ac_cpp_err=yes
20345 fi
20346 if test -z "$ac_cpp_err"; then
20347   eval "$as_ac_Header=yes"
20348 else
20349   echo "$as_me: failed program was:" >&5
20350   cat "conftest.$ac_ext" >&5
20351   eval "$as_ac_Header=no"
20352 fi
20353 rm -f conftest.err "conftest.$ac_ext"
20354 fi
20355 echo "$as_me:20355: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20356 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20357 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20358   cat >>confdefs.h <<EOF
20359 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20360 EOF
20361
20362 fi
20363 done
20364
20365 echo "$as_me:20365: checking for header declaring getopt variables" >&5
20366 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20367 if test "${cf_cv_getopt_header+set}" = set; then
20368   echo $ECHO_N "(cached) $ECHO_C" >&6
20369 else
20370
20371 cf_cv_getopt_header=none
20372 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20373 do
20374 cat >"conftest.$ac_ext" <<_ACEOF
20375 #line 20375 "configure"
20376 #include "confdefs.h"
20377
20378 #include <$cf_header>
20379 int
20380 main (void)
20381 {
20382 int x = optind; char *y = optarg; (void)x; (void)y
20383   ;
20384   return 0;
20385 }
20386 _ACEOF
20387 rm -f "conftest.$ac_objext"
20388 if { (eval echo "$as_me:20388: \"$ac_compile\"") >&5
20389   (eval $ac_compile) 2>&5
20390   ac_status=$?
20391   echo "$as_me:20391: \$? = $ac_status" >&5
20392   (exit "$ac_status"); } &&
20393          { ac_try='test -s "conftest.$ac_objext"'
20394   { (eval echo "$as_me:20394: \"$ac_try\"") >&5
20395   (eval $ac_try) 2>&5
20396   ac_status=$?
20397   echo "$as_me:20397: \$? = $ac_status" >&5
20398   (exit "$ac_status"); }; }; then
20399   cf_cv_getopt_header=$cf_header
20400  break
20401 else
20402   echo "$as_me: failed program was:" >&5
20403 cat "conftest.$ac_ext" >&5
20404 fi
20405 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20406 done
20407
20408 fi
20409 echo "$as_me:20409: result: $cf_cv_getopt_header" >&5
20410 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20411 if test "$cf_cv_getopt_header" != none ; then
20412
20413 cat >>confdefs.h <<\EOF
20414 #define HAVE_GETOPT_HEADER 1
20415 EOF
20416
20417 fi
20418 if test "$cf_cv_getopt_header" = getopt.h ; then
20419
20420 cat >>confdefs.h <<\EOF
20421 #define NEED_GETOPT_H 1
20422 EOF
20423
20424 fi
20425
20426 echo "$as_me:20426: checking if external environ is declared" >&5
20427 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20428 if test "${cf_cv_dcl_environ+set}" = set; then
20429   echo $ECHO_N "(cached) $ECHO_C" >&6
20430 else
20431
20432     cat >"conftest.$ac_ext" <<_ACEOF
20433 #line 20433 "configure"
20434 #include "confdefs.h"
20435
20436 $ac_includes_default
20437 int
20438 main (void)
20439 {
20440 void* x = (void*) environ; (void)x
20441   ;
20442   return 0;
20443 }
20444 _ACEOF
20445 rm -f "conftest.$ac_objext"
20446 if { (eval echo "$as_me:20446: \"$ac_compile\"") >&5
20447   (eval $ac_compile) 2>&5
20448   ac_status=$?
20449   echo "$as_me:20449: \$? = $ac_status" >&5
20450   (exit "$ac_status"); } &&
20451          { ac_try='test -s "conftest.$ac_objext"'
20452   { (eval echo "$as_me:20452: \"$ac_try\"") >&5
20453   (eval $ac_try) 2>&5
20454   ac_status=$?
20455   echo "$as_me:20455: \$? = $ac_status" >&5
20456   (exit "$ac_status"); }; }; then
20457   cf_cv_dcl_environ=yes
20458 else
20459   echo "$as_me: failed program was:" >&5
20460 cat "conftest.$ac_ext" >&5
20461 cf_cv_dcl_environ=no
20462 fi
20463 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20464
20465 fi
20466 echo "$as_me:20466: result: $cf_cv_dcl_environ" >&5
20467 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20468
20469 if test "$cf_cv_dcl_environ" = no ; then
20470
20471 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20472
20473     cat >>confdefs.h <<EOF
20474 #define $cf_result 1
20475 EOF
20476
20477 fi
20478
20479 # It's possible (for near-UNIX clones) that the data doesn't exist
20480
20481 echo "$as_me:20481: checking if external environ exists" >&5
20482 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20483 if test "${cf_cv_have_environ+set}" = set; then
20484   echo $ECHO_N "(cached) $ECHO_C" >&6
20485 else
20486
20487         cat >"conftest.$ac_ext" <<_ACEOF
20488 #line 20488 "configure"
20489 #include "confdefs.h"
20490
20491 #undef environ
20492 extern int environ;
20493
20494 int
20495 main (void)
20496 {
20497 environ = 2
20498   ;
20499   return 0;
20500 }
20501 _ACEOF
20502 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20503 if { (eval echo "$as_me:20503: \"$ac_link\"") >&5
20504   (eval $ac_link) 2>&5
20505   ac_status=$?
20506   echo "$as_me:20506: \$? = $ac_status" >&5
20507   (exit "$ac_status"); } &&
20508          { ac_try='test -s "conftest$ac_exeext"'
20509   { (eval echo "$as_me:20509: \"$ac_try\"") >&5
20510   (eval $ac_try) 2>&5
20511   ac_status=$?
20512   echo "$as_me:20512: \$? = $ac_status" >&5
20513   (exit "$ac_status"); }; }; then
20514   cf_cv_have_environ=yes
20515 else
20516   echo "$as_me: failed program was:" >&5
20517 cat "conftest.$ac_ext" >&5
20518 cf_cv_have_environ=no
20519 fi
20520 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20521
20522 fi
20523 echo "$as_me:20523: result: $cf_cv_have_environ" >&5
20524 echo "${ECHO_T}$cf_cv_have_environ" >&6
20525
20526 if test "$cf_cv_have_environ" = yes ; then
20527
20528 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20529
20530         cat >>confdefs.h <<EOF
20531 #define $cf_result 1
20532 EOF
20533
20534 fi
20535
20536 echo "$as_me:20536: checking for getenv" >&5
20537 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20538 if test "${ac_cv_func_getenv+set}" = set; then
20539   echo $ECHO_N "(cached) $ECHO_C" >&6
20540 else
20541   cat >"conftest.$ac_ext" <<_ACEOF
20542 #line 20542 "configure"
20543 #include "confdefs.h"
20544 #define getenv autoconf_temporary
20545 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20546 #undef getenv
20547
20548 #ifdef __cplusplus
20549 extern "C"
20550 #endif
20551
20552 /* We use char because int might match the return type of a gcc2
20553    builtin and then its argument prototype would still apply.  */
20554 char getenv (void);
20555
20556 int
20557 main (void)
20558 {
20559
20560 /* The GNU C library defines stubs for functions which it implements
20561     to always fail with ENOSYS.  Some functions are actually named
20562     something starting with __ and the normal name is an alias.  */
20563 #if defined (__stub_getenv) || defined (__stub___getenv)
20564 #error found stub for getenv
20565 #endif
20566
20567         return getenv ();
20568   ;
20569   return 0;
20570 }
20571 _ACEOF
20572 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20573 if { (eval echo "$as_me:20573: \"$ac_link\"") >&5
20574   (eval $ac_link) 2>&5
20575   ac_status=$?
20576   echo "$as_me:20576: \$? = $ac_status" >&5
20577   (exit "$ac_status"); } &&
20578          { ac_try='test -s "conftest$ac_exeext"'
20579   { (eval echo "$as_me:20579: \"$ac_try\"") >&5
20580   (eval $ac_try) 2>&5
20581   ac_status=$?
20582   echo "$as_me:20582: \$? = $ac_status" >&5
20583   (exit "$ac_status"); }; }; then
20584   ac_cv_func_getenv=yes
20585 else
20586   echo "$as_me: failed program was:" >&5
20587 cat "conftest.$ac_ext" >&5
20588 ac_cv_func_getenv=no
20589 fi
20590 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20591 fi
20592 echo "$as_me:20592: result: $ac_cv_func_getenv" >&5
20593 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20594
20595 for ac_func in putenv setenv strdup
20596 do
20597 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20598 echo "$as_me:20598: checking for $ac_func" >&5
20599 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20600 if eval "test \"\${$as_ac_var+set}\" = set"; then
20601   echo $ECHO_N "(cached) $ECHO_C" >&6
20602 else
20603   cat >"conftest.$ac_ext" <<_ACEOF
20604 #line 20604 "configure"
20605 #include "confdefs.h"
20606 #define $ac_func autoconf_temporary
20607 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20608 #undef $ac_func
20609
20610 #ifdef __cplusplus
20611 extern "C"
20612 #endif
20613
20614 /* We use char because int might match the return type of a gcc2
20615    builtin and then its argument prototype would still apply.  */
20616 char $ac_func (void);
20617
20618 int
20619 main (void)
20620 {
20621
20622 /* The GNU C library defines stubs for functions which it implements
20623     to always fail with ENOSYS.  Some functions are actually named
20624     something starting with __ and the normal name is an alias.  */
20625 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20626 #error found stub for $ac_func
20627 #endif
20628
20629         return $ac_func ();
20630   ;
20631   return 0;
20632 }
20633 _ACEOF
20634 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20635 if { (eval echo "$as_me:20635: \"$ac_link\"") >&5
20636   (eval $ac_link) 2>&5
20637   ac_status=$?
20638   echo "$as_me:20638: \$? = $ac_status" >&5
20639   (exit "$ac_status"); } &&
20640          { ac_try='test -s "conftest$ac_exeext"'
20641   { (eval echo "$as_me:20641: \"$ac_try\"") >&5
20642   (eval $ac_try) 2>&5
20643   ac_status=$?
20644   echo "$as_me:20644: \$? = $ac_status" >&5
20645   (exit "$ac_status"); }; }; then
20646   eval "$as_ac_var=yes"
20647 else
20648   echo "$as_me: failed program was:" >&5
20649 cat "conftest.$ac_ext" >&5
20650 eval "$as_ac_var=no"
20651 fi
20652 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20653 fi
20654 echo "$as_me:20654: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20655 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20656 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20657   cat >>confdefs.h <<EOF
20658 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20659 EOF
20660
20661 fi
20662 done
20663
20664 echo "$as_me:20664: checking if getenv returns consistent values" >&5
20665 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20666 if test "${cf_cv_consistent_getenv+set}" = set; then
20667   echo $ECHO_N "(cached) $ECHO_C" >&6
20668 else
20669
20670 if test "$cross_compiling" = yes; then
20671   cf_cv_consistent_getenv=unknown
20672 else
20673   cat >"conftest.$ac_ext" <<_ACEOF
20674 #line 20674 "configure"
20675 #include "confdefs.h"
20676
20677 $ac_includes_default
20678
20679 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20680 extern char **environ;  /* POSIX, but some systems are not... */
20681 #endif
20682
20683 #if defined(HAVE_STRDUP)
20684 #define str_alloc(s) strdup(s)
20685 #else
20686 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20687 #endif
20688
20689 static void set_value(const char *name, const char *value)
20690 {
20691 #if defined(HAVE_SETENV)
20692         setenv(name, value, 1);
20693 #elif defined(HAVE_PUTENV)
20694         char buffer[1024];
20695         sprintf(buffer, "%s=%s", name, value);
20696         putenv(str_alloc(buffer));
20697 #else
20698 #error neither putenv/setenv found
20699 #endif
20700 }
20701 int main(void)
20702 {
20703         int pass;
20704         size_t numenv, limit, j;
20705         char **mynames;
20706         char **myvalues;
20707         char **mypointer;
20708         char *equals;
20709         for (numenv = 0; environ[numenv]; ++numenv) ;
20710         limit = numenv + 10;
20711         mynames = (char **) calloc(limit + 1, sizeof(char *));
20712         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20713         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20714 #if defined(HAVE_ENVIRON)
20715         for (j = 0; environ[j]; ++j) {
20716                 mynames[j] = str_alloc(environ[j]);
20717                 equals = strchr(mynames[j], '=');
20718                 if (equals != 0) {
20719                         *equals++ = '\\0';
20720                         myvalues[j] = str_alloc(equals);
20721                 } else {
20722                         myvalues[j] = str_alloc("");
20723                 }
20724         }
20725 #endif
20726         for (j = numenv; j < limit; ++j) {
20727                 char name[80];
20728                 char value[80];
20729                 size_t found;
20730                 size_t k = 0;
20731                 do {
20732                         size_t jk;
20733                         found = 0;
20734                         sprintf(name, "TERM%lu", (unsigned long) k);
20735                         for (jk = 0; jk < j; ++jk) {
20736                                 if (!strcmp(name, mynames[jk])) {
20737                                         found = 1;
20738                                         ++k;
20739                                         break;
20740                                 }
20741                         }
20742                 } while (found);
20743                 sprintf(value, "%lu:%p", (unsigned long) k, (void*)&mynames[j]);
20744                 set_value(name, value);
20745                 mynames[j] = str_alloc(name);
20746                 myvalues[j] = str_alloc(value);
20747         }
20748         for (pass = 0; pass < 3; ++pass) {
20749                 for (j = 0; j < limit; ++j) {
20750                         char *value = getenv(mynames[j]);
20751                         if (pass) {
20752                                 if (value == 0) {
20753                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20754                                         ${cf_cv_main_return:-return}(1);
20755                                 } else if (value != mypointer[j]) {
20756                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20757                                         ${cf_cv_main_return:-return}(1);
20758                                 } else if (strcmp(value, myvalues[j])) {
20759                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20760                                         ${cf_cv_main_return:-return}(1);
20761                                 }
20762                         } else {
20763                                 size_t k;
20764                                 mypointer[j] = value;
20765                                 for (k = 0; k < j; ++k) {
20766                                         if (mypointer[j] == mypointer[k]) {
20767                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20768                                                 ${cf_cv_main_return:-return}(1);
20769                                         }
20770                                 }
20771                         }
20772                 }
20773         }
20774         ${cf_cv_main_return:-return}(0);
20775 }
20776
20777 _ACEOF
20778 rm -f "conftest$ac_exeext"
20779 if { (eval echo "$as_me:20779: \"$ac_link\"") >&5
20780   (eval $ac_link) 2>&5
20781   ac_status=$?
20782   echo "$as_me:20782: \$? = $ac_status" >&5
20783   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20784   { (eval echo "$as_me:20784: \"$ac_try\"") >&5
20785   (eval $ac_try) 2>&5
20786   ac_status=$?
20787   echo "$as_me:20787: \$? = $ac_status" >&5
20788   (exit "$ac_status"); }; }; then
20789   cf_cv_consistent_getenv=yes
20790 else
20791   echo "$as_me: program exited with status $ac_status" >&5
20792 echo "$as_me: failed program was:" >&5
20793 cat "conftest.$ac_ext" >&5
20794 cf_cv_consistent_getenv=no
20795 fi
20796 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20797 fi
20798
20799 fi
20800 echo "$as_me:20800: result: $cf_cv_consistent_getenv" >&5
20801 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20802
20803 if test "x$cf_cv_consistent_getenv" = xno
20804 then
20805
20806 cat >>confdefs.h <<\EOF
20807 #define HAVE_CONSISTENT_GETENV 1
20808 EOF
20809
20810 fi
20811
20812 if test "x$cf_cv_consistent_getenv" = xno && \
20813         test "x$cf_with_trace" = xyes
20814 then
20815         { echo "$as_me:20815: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20816 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20817 fi
20818
20819 echo "$as_me:20819: checking if sys/time.h works with sys/select.h" >&5
20820 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20821 if test "${cf_cv_sys_time_select+set}" = set; then
20822   echo $ECHO_N "(cached) $ECHO_C" >&6
20823 else
20824
20825 cat >"conftest.$ac_ext" <<_ACEOF
20826 #line 20826 "configure"
20827 #include "confdefs.h"
20828
20829 #include <sys/types.h>
20830 #ifdef HAVE_SYS_TIME_H
20831 #include <sys/time.h>
20832 #endif
20833 #ifdef HAVE_SYS_SELECT_H
20834 #include <sys/select.h>
20835 #endif
20836
20837 int
20838 main (void)
20839 {
20840
20841   ;
20842   return 0;
20843 }
20844 _ACEOF
20845 rm -f "conftest.$ac_objext"
20846 if { (eval echo "$as_me:20846: \"$ac_compile\"") >&5
20847   (eval $ac_compile) 2>&5
20848   ac_status=$?
20849   echo "$as_me:20849: \$? = $ac_status" >&5
20850   (exit "$ac_status"); } &&
20851          { ac_try='test -s "conftest.$ac_objext"'
20852   { (eval echo "$as_me:20852: \"$ac_try\"") >&5
20853   (eval $ac_try) 2>&5
20854   ac_status=$?
20855   echo "$as_me:20855: \$? = $ac_status" >&5
20856   (exit "$ac_status"); }; }; then
20857   cf_cv_sys_time_select=yes
20858 else
20859   echo "$as_me: failed program was:" >&5
20860 cat "conftest.$ac_ext" >&5
20861 cf_cv_sys_time_select=no
20862 fi
20863 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20864
20865 fi
20866
20867 echo "$as_me:20867: result: $cf_cv_sys_time_select" >&5
20868 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20869 test "$cf_cv_sys_time_select" = yes &&
20870 cat >>confdefs.h <<\EOF
20871 #define HAVE_SYS_TIME_SELECT 1
20872 EOF
20873
20874 ###     checks for compiler characteristics
20875 ac_ext=c
20876 ac_cpp='$CPP $CPPFLAGS'
20877 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20878 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20879 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20880 ac_main_return="return"
20881
20882 echo "$as_me:20882: checking for an ANSI C-conforming const" >&5
20883 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20884 if test "${ac_cv_c_const+set}" = set; then
20885   echo $ECHO_N "(cached) $ECHO_C" >&6
20886 else
20887   cat >"conftest.$ac_ext" <<_ACEOF
20888 #line 20888 "configure"
20889 #include "confdefs.h"
20890
20891 int
20892 main (void)
20893 {
20894 /* FIXME: Include the comments suggested by Paul. */
20895 #ifndef __cplusplus
20896   /* Ultrix mips cc rejects this.  */
20897   typedef int charset[2];
20898   const charset x; (void)x;
20899   /* SunOS 4.1.1 cc rejects this.  */
20900   char const *const *ccp;
20901   char **p;
20902   /* NEC SVR4.0.2 mips cc rejects this.  */
20903   struct point {int x, y;};
20904   static struct point const zero = {0,0}; (void)zero;
20905   /* AIX XL C 1.02.0.0 rejects this.
20906      It does not let you subtract one const X* pointer from another in
20907      an arm of an if-expression whose if-part is not a constant
20908      expression */
20909   const char *g = "string";
20910   ccp = &g + (g ? g-g : 0);
20911   /* HPUX 7.0 cc rejects these. */
20912   ++ccp;
20913   p = (char**) ccp;
20914   ccp = (char const *const *) p;
20915   { /* SCO 3.2v4 cc rejects this.  */
20916     char *t;
20917     char const *s = 0 ? (char *) 0 : (char const *) 0;
20918
20919     *t++ = 0;
20920         (void)s;
20921   }
20922   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20923     int x[] = {25, 17};
20924     const int *foo = &x[0];
20925     ++foo;
20926         (void)foo;
20927   }
20928   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20929     typedef const int *iptr;
20930     iptr p = 0;
20931     ++p;
20932         (void)p;
20933   }
20934   { /* AIX XL C 1.02.0.0 rejects this saying
20935        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20936     struct s { int j; const int *ap[3]; };
20937     struct s *b; b->j = 5;
20938   }
20939   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20940     const int foo = 10;
20941         (void)foo;
20942   }
20943 #endif
20944
20945   ;
20946   return 0;
20947 }
20948 _ACEOF
20949 rm -f "conftest.$ac_objext"
20950 if { (eval echo "$as_me:20950: \"$ac_compile\"") >&5
20951   (eval $ac_compile) 2>&5
20952   ac_status=$?
20953   echo "$as_me:20953: \$? = $ac_status" >&5
20954   (exit "$ac_status"); } &&
20955          { ac_try='test -s "conftest.$ac_objext"'
20956   { (eval echo "$as_me:20956: \"$ac_try\"") >&5
20957   (eval $ac_try) 2>&5
20958   ac_status=$?
20959   echo "$as_me:20959: \$? = $ac_status" >&5
20960   (exit "$ac_status"); }; }; then
20961   ac_cv_c_const=yes
20962 else
20963   echo "$as_me: failed program was:" >&5
20964 cat "conftest.$ac_ext" >&5
20965 ac_cv_c_const=no
20966 fi
20967 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20968 fi
20969 echo "$as_me:20969: result: $ac_cv_c_const" >&5
20970 echo "${ECHO_T}$ac_cv_c_const" >&6
20971 if test $ac_cv_c_const = no; then
20972
20973 cat >>confdefs.h <<\EOF
20974 #define const
20975 EOF
20976
20977 fi
20978
20979 echo "$as_me:20979: checking for inline" >&5
20980 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20981 if test "${ac_cv_c_inline+set}" = set; then
20982   echo $ECHO_N "(cached) $ECHO_C" >&6
20983 else
20984   ac_cv_c_inline=no
20985 for ac_kw in inline __inline__ __inline; do
20986   cat >"conftest.$ac_ext" <<_ACEOF
20987 #line 20987 "configure"
20988 #include "confdefs.h"
20989 #ifndef __cplusplus
20990 static $ac_kw int static_foo (void) {return 0; }
20991 $ac_kw int foo (void) {return 0; }
20992 #endif
20993
20994 _ACEOF
20995 rm -f "conftest.$ac_objext"
20996 if { (eval echo "$as_me:20996: \"$ac_compile\"") >&5
20997   (eval $ac_compile) 2>&5
20998   ac_status=$?
20999   echo "$as_me:20999: \$? = $ac_status" >&5
21000   (exit "$ac_status"); } &&
21001          { ac_try='test -s "conftest.$ac_objext"'
21002   { (eval echo "$as_me:21002: \"$ac_try\"") >&5
21003   (eval $ac_try) 2>&5
21004   ac_status=$?
21005   echo "$as_me:21005: \$? = $ac_status" >&5
21006   (exit "$ac_status"); }; }; then
21007   ac_cv_c_inline=$ac_kw; break
21008 else
21009   echo "$as_me: failed program was:" >&5
21010 cat "conftest.$ac_ext" >&5
21011 fi
21012 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21013 done
21014
21015 fi
21016 echo "$as_me:21016: result: $ac_cv_c_inline" >&5
21017 echo "${ECHO_T}$ac_cv_c_inline" >&6
21018 case $ac_cv_c_inline in
21019   inline | yes) ;;
21020   no)
21021 cat >>confdefs.h <<\EOF
21022 #define inline
21023 EOF
21024  ;;
21025   *)  cat >>confdefs.h <<EOF
21026 #define inline $ac_cv_c_inline
21027 EOF
21028  ;;
21029 esac
21030
21031 NCURSES_INLINE=
21032 if test "$ac_cv_c_inline" != no ; then
21033         NCURSES_INLINE=inline
21034         if test "$INTEL_COMPILER" = yes
21035         then
21036                 :
21037         elif test "$CLANG_COMPILER" = yes
21038         then
21039                 :
21040         elif test "$GCC" = yes
21041         then
21042                 echo "$as_me:21042: checking if $CC supports options to tune inlining" >&5
21043 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
21044 if test "${cf_cv_gcc_inline+set}" = set; then
21045   echo $ECHO_N "(cached) $ECHO_C" >&6
21046 else
21047
21048                 cf_save_CFLAGS=$CFLAGS
21049                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
21050                 cat >"conftest.$ac_ext" <<_ACEOF
21051 #line 21051 "configure"
21052 #include "confdefs.h"
21053 inline int foo(void) { return 1; }
21054 int
21055 main (void)
21056 {
21057 ${cf_cv_main_return:-return} foo()
21058   ;
21059   return 0;
21060 }
21061 _ACEOF
21062 rm -f "conftest.$ac_objext"
21063 if { (eval echo "$as_me:21063: \"$ac_compile\"") >&5
21064   (eval $ac_compile) 2>&5
21065   ac_status=$?
21066   echo "$as_me:21066: \$? = $ac_status" >&5
21067   (exit "$ac_status"); } &&
21068          { ac_try='test -s "conftest.$ac_objext"'
21069   { (eval echo "$as_me:21069: \"$ac_try\"") >&5
21070   (eval $ac_try) 2>&5
21071   ac_status=$?
21072   echo "$as_me:21072: \$? = $ac_status" >&5
21073   (exit "$ac_status"); }; }; then
21074   cf_cv_gcc_inline=yes
21075 else
21076   echo "$as_me: failed program was:" >&5
21077 cat "conftest.$ac_ext" >&5
21078 cf_cv_gcc_inline=no
21079 fi
21080 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21081                 CFLAGS=$cf_save_CFLAGS
21082
21083 fi
21084 echo "$as_me:21084: result: $cf_cv_gcc_inline" >&5
21085 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
21086                 if test "$cf_cv_gcc_inline" = yes ; then
21087
21088 cf_fix_cppflags=no
21089 cf_new_cflags=
21090 cf_new_cppflags=
21091 cf_new_extra_cppflags=
21092
21093 for cf_add_cflags in --param max-inline-insns-single=1200
21094 do
21095 case "$cf_fix_cppflags" in
21096 (no)
21097         case "$cf_add_cflags" in
21098         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21099                 case "$cf_add_cflags" in
21100                 (-D*)
21101                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21102
21103                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21104                                 && test -z "${cf_tst_cflags}" \
21105                                 && cf_fix_cppflags=yes
21106
21107                         if test "$cf_fix_cppflags" = yes ; then
21108
21109         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21110         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21111
21112                                 continue
21113                         elif test "${cf_tst_cflags}" = "\"'" ; then
21114
21115         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21116         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21117
21118                                 continue
21119                         fi
21120                         ;;
21121                 esac
21122                 case "$CPPFLAGS" in
21123                 (*$cf_add_cflags)
21124                         ;;
21125                 (*)
21126                         case "$cf_add_cflags" in
21127                         (-D*)
21128                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21129
21130 CPPFLAGS=`echo "$CPPFLAGS" | \
21131         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21132                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21133
21134                                 ;;
21135                         esac
21136
21137         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21138         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21139
21140                         ;;
21141                 esac
21142                 ;;
21143         (*)
21144
21145         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21146         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21147
21148                 ;;
21149         esac
21150         ;;
21151 (yes)
21152
21153         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21154         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21155
21156         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21157
21158         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21159                 && test -z "${cf_tst_cflags}" \
21160                 && cf_fix_cppflags=no
21161         ;;
21162 esac
21163 done
21164
21165 if test -n "$cf_new_cflags" ; then
21166
21167         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21168         CFLAGS="${CFLAGS}$cf_new_cflags"
21169
21170 fi
21171
21172 if test -n "$cf_new_cppflags" ; then
21173
21174         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21175         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21176
21177 fi
21178
21179 if test -n "$cf_new_extra_cppflags" ; then
21180
21181         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21182         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21183
21184 fi
21185
21186                 fi
21187         fi
21188 fi
21189
21190 echo "$as_me:21190: checking for signal global datatype" >&5
21191 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21192 if test "${cf_cv_sig_atomic_t+set}" = set; then
21193   echo $ECHO_N "(cached) $ECHO_C" >&6
21194 else
21195
21196         for cf_type in \
21197                 "volatile sig_atomic_t" \
21198                 "sig_atomic_t" \
21199                 "int"
21200         do
21201         cat >"conftest.$ac_ext" <<_ACEOF
21202 #line 21202 "configure"
21203 #include "confdefs.h"
21204
21205 #include <sys/types.h>
21206 #include <signal.h>
21207 #include <stdio.h>
21208
21209 extern $cf_type x;
21210 $cf_type x;
21211 static void handler(int sig)
21212 {
21213         (void)sig;
21214         x = 5;
21215 }
21216 int
21217 main (void)
21218 {
21219 signal(SIGINT, handler);
21220                  x = 1
21221   ;
21222   return 0;
21223 }
21224 _ACEOF
21225 rm -f "conftest.$ac_objext"
21226 if { (eval echo "$as_me:21226: \"$ac_compile\"") >&5
21227   (eval $ac_compile) 2>&5
21228   ac_status=$?
21229   echo "$as_me:21229: \$? = $ac_status" >&5
21230   (exit "$ac_status"); } &&
21231          { ac_try='test -s "conftest.$ac_objext"'
21232   { (eval echo "$as_me:21232: \"$ac_try\"") >&5
21233   (eval $ac_try) 2>&5
21234   ac_status=$?
21235   echo "$as_me:21235: \$? = $ac_status" >&5
21236   (exit "$ac_status"); }; }; then
21237   cf_cv_sig_atomic_t=$cf_type
21238 else
21239   echo "$as_me: failed program was:" >&5
21240 cat "conftest.$ac_ext" >&5
21241 cf_cv_sig_atomic_t=no
21242 fi
21243 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21244                 test "$cf_cv_sig_atomic_t" != no && break
21245         done
21246
21247 fi
21248
21249 echo "$as_me:21249: result: $cf_cv_sig_atomic_t" >&5
21250 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21251 test "$cf_cv_sig_atomic_t" != no &&
21252 cat >>confdefs.h <<EOF
21253 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21254 EOF
21255
21256 if test "$NCURSES_CHTYPE" = auto ; then
21257
21258 echo "$as_me:21258: checking for type of chtype" >&5
21259 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21260 if test "${cf_cv_typeof_chtype+set}" = set; then
21261   echo $ECHO_N "(cached) $ECHO_C" >&6
21262 else
21263
21264                 if test "$cross_compiling" = yes; then
21265   cf_cv_typeof_chtype=long
21266 else
21267   cat >"conftest.$ac_ext" <<_ACEOF
21268 #line 21268 "configure"
21269 #include "confdefs.h"
21270
21271 $ac_includes_default
21272 #define WANT_BITS 31
21273 int main(void)
21274 {
21275         FILE *fp = fopen("cf_test.out", "w");
21276         if (fp != 0) {
21277                 char *result = "long";
21278                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21279                         int n;
21280                         unsigned int x, y;
21281                         for (n = 0; n < WANT_BITS; n++) {
21282                                 x = (1 << n);
21283                                 y = (x >> n);
21284                                 if (y != 1 || x == 0) {
21285                                         x = 0;
21286                                         break;
21287                                 }
21288                         }
21289                         /*
21290                          * If x is nonzero, an int is big enough for the bits
21291                          * that we want.
21292                          */
21293                         result = (x != 0) ? "int" : "long";
21294                 }
21295                 fputs(result, fp);
21296                 fclose(fp);
21297         }
21298         ${cf_cv_main_return:-return}(0);
21299 }
21300
21301 _ACEOF
21302 rm -f "conftest$ac_exeext"
21303 if { (eval echo "$as_me:21303: \"$ac_link\"") >&5
21304   (eval $ac_link) 2>&5
21305   ac_status=$?
21306   echo "$as_me:21306: \$? = $ac_status" >&5
21307   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21308   { (eval echo "$as_me:21308: \"$ac_try\"") >&5
21309   (eval $ac_try) 2>&5
21310   ac_status=$?
21311   echo "$as_me:21311: \$? = $ac_status" >&5
21312   (exit "$ac_status"); }; }; then
21313   cf_cv_typeof_chtype=`cat cf_test.out`
21314 else
21315   echo "$as_me: program exited with status $ac_status" >&5
21316 echo "$as_me: failed program was:" >&5
21317 cat "conftest.$ac_ext" >&5
21318 cf_cv_typeof_chtype=long
21319 fi
21320 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21321 fi
21322                 rm -f cf_test.out
21323
21324 fi
21325
21326 echo "$as_me:21326: result: $cf_cv_typeof_chtype" >&5
21327 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21328
21329 cat >>confdefs.h <<EOF
21330 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21331 EOF
21332
21333 else
21334         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21335 fi
21336 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21337
21338 echo "$as_me:21338: checking if unsigned literals are legal" >&5
21339 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21340 if test "${cf_cv_unsigned_literals+set}" = set; then
21341   echo $ECHO_N "(cached) $ECHO_C" >&6
21342 else
21343
21344         cat >"conftest.$ac_ext" <<_ACEOF
21345 #line 21345 "configure"
21346 #include "confdefs.h"
21347
21348 int
21349 main (void)
21350 {
21351 long x = 1L + 1UL + 1U + 1; (void)x
21352   ;
21353   return 0;
21354 }
21355 _ACEOF
21356 rm -f "conftest.$ac_objext"
21357 if { (eval echo "$as_me:21357: \"$ac_compile\"") >&5
21358   (eval $ac_compile) 2>&5
21359   ac_status=$?
21360   echo "$as_me:21360: \$? = $ac_status" >&5
21361   (exit "$ac_status"); } &&
21362          { ac_try='test -s "conftest.$ac_objext"'
21363   { (eval echo "$as_me:21363: \"$ac_try\"") >&5
21364   (eval $ac_try) 2>&5
21365   ac_status=$?
21366   echo "$as_me:21366: \$? = $ac_status" >&5
21367   (exit "$ac_status"); }; }; then
21368   cf_cv_unsigned_literals=yes
21369 else
21370   echo "$as_me: failed program was:" >&5
21371 cat "conftest.$ac_ext" >&5
21372 cf_cv_unsigned_literals=no
21373 fi
21374 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21375
21376 fi
21377
21378 echo "$as_me:21378: result: $cf_cv_unsigned_literals" >&5
21379 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21380
21381 cf_cv_1UL="1"
21382 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21383 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21384
21385 if test "$NCURSES_MMASK_T" = auto ; then
21386         cf_cv_typeof_mmask_t=long
21387 else
21388         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21389 fi
21390 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21391
21392 ###     Checks for external-data
21393
21394 echo "$as_me:21394: checking if external errno is declared" >&5
21395 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21396 if test "${cf_cv_dcl_errno+set}" = set; then
21397   echo $ECHO_N "(cached) $ECHO_C" >&6
21398 else
21399
21400         cat >"conftest.$ac_ext" <<_ACEOF
21401 #line 21401 "configure"
21402 #include "confdefs.h"
21403
21404 $ac_includes_default
21405 #include <errno.h>
21406 int
21407 main (void)
21408 {
21409 int x = (int) errno; (void)x
21410   ;
21411   return 0;
21412 }
21413 _ACEOF
21414 rm -f "conftest.$ac_objext"
21415 if { (eval echo "$as_me:21415: \"$ac_compile\"") >&5
21416   (eval $ac_compile) 2>&5
21417   ac_status=$?
21418   echo "$as_me:21418: \$? = $ac_status" >&5
21419   (exit "$ac_status"); } &&
21420          { ac_try='test -s "conftest.$ac_objext"'
21421   { (eval echo "$as_me:21421: \"$ac_try\"") >&5
21422   (eval $ac_try) 2>&5
21423   ac_status=$?
21424   echo "$as_me:21424: \$? = $ac_status" >&5
21425   (exit "$ac_status"); }; }; then
21426   cf_cv_dcl_errno=yes
21427 else
21428   echo "$as_me: failed program was:" >&5
21429 cat "conftest.$ac_ext" >&5
21430 cf_cv_dcl_errno=no
21431 fi
21432 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21433
21434 fi
21435 echo "$as_me:21435: result: $cf_cv_dcl_errno" >&5
21436 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21437
21438 if test "$cf_cv_dcl_errno" = no ; then
21439
21440 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21441
21442         cat >>confdefs.h <<EOF
21443 #define $cf_result 1
21444 EOF
21445
21446 fi
21447
21448 # It's possible (for near-UNIX clones) that the data doesn't exist
21449
21450 echo "$as_me:21450: checking if external errno exists" >&5
21451 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21452 if test "${cf_cv_have_errno+set}" = set; then
21453   echo $ECHO_N "(cached) $ECHO_C" >&6
21454 else
21455
21456         cat >"conftest.$ac_ext" <<_ACEOF
21457 #line 21457 "configure"
21458 #include "confdefs.h"
21459
21460 #undef errno
21461 extern int errno;
21462
21463 int
21464 main (void)
21465 {
21466 errno = 2
21467   ;
21468   return 0;
21469 }
21470 _ACEOF
21471 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21472 if { (eval echo "$as_me:21472: \"$ac_link\"") >&5
21473   (eval $ac_link) 2>&5
21474   ac_status=$?
21475   echo "$as_me:21475: \$? = $ac_status" >&5
21476   (exit "$ac_status"); } &&
21477          { ac_try='test -s "conftest$ac_exeext"'
21478   { (eval echo "$as_me:21478: \"$ac_try\"") >&5
21479   (eval $ac_try) 2>&5
21480   ac_status=$?
21481   echo "$as_me:21481: \$? = $ac_status" >&5
21482   (exit "$ac_status"); }; }; then
21483   cf_cv_have_errno=yes
21484 else
21485   echo "$as_me: failed program was:" >&5
21486 cat "conftest.$ac_ext" >&5
21487 cf_cv_have_errno=no
21488 fi
21489 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21490
21491 fi
21492 echo "$as_me:21492: result: $cf_cv_have_errno" >&5
21493 echo "${ECHO_T}$cf_cv_have_errno" >&6
21494
21495 if test "$cf_cv_have_errno" = yes ; then
21496
21497 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21498
21499         cat >>confdefs.h <<EOF
21500 #define $cf_result 1
21501 EOF
21502
21503 fi
21504
21505 echo "$as_me:21505: checking if data-only library module links" >&5
21506 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21507 if test "${cf_cv_link_dataonly+set}" = set; then
21508   echo $ECHO_N "(cached) $ECHO_C" >&6
21509 else
21510
21511         rm -f conftest.a
21512         cat >conftest.$ac_ext <<EOF
21513 #line 21513 "configure"
21514 int     testdata[3] = { 123, 456, 789 };
21515 EOF
21516         if { (eval echo "$as_me:21516: \"$ac_compile\"") >&5
21517   (eval $ac_compile) 2>&5
21518   ac_status=$?
21519   echo "$as_me:21519: \$? = $ac_status" >&5
21520   (exit "$ac_status"); } ; then
21521                 mv conftest.o data.o && \
21522                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21523         fi
21524         rm -f conftest.$ac_ext data.o
21525         cat >conftest.$ac_ext <<EOF
21526 #line 21526 "configure"
21527 extern int testfunc(void);
21528 #if defined(NeXT)
21529 int     testfunc(void)
21530 {
21531         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21532 }
21533 #else
21534 extern int testdata[3];
21535 int     testfunc(void)
21536 {
21537         return testdata[0] == 123
21538            &&  testdata[1] == 456
21539            &&  testdata[2] == 789;
21540 }
21541 #endif
21542 EOF
21543         if { (eval echo "$as_me:21543: \"$ac_compile\"") >&5
21544   (eval $ac_compile) 2>&5
21545   ac_status=$?
21546   echo "$as_me:21546: \$? = $ac_status" >&5
21547   (exit "$ac_status"); }; then
21548                 mv conftest.o func.o && \
21549                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21550         fi
21551         rm -f conftest.$ac_ext func.o
21552         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21553         cf_saveLIBS="$LIBS"
21554         LIBS="conftest.a $LIBS"
21555         if test "$cross_compiling" = yes; then
21556   cf_cv_link_dataonly=unknown
21557 else
21558   cat >"conftest.$ac_ext" <<_ACEOF
21559 #line 21559 "configure"
21560 #include "confdefs.h"
21561
21562         extern int testfunc(void);
21563         int main(void)
21564         {
21565                 ${cf_cv_main_return:-return} (!testfunc());
21566         }
21567
21568 _ACEOF
21569 rm -f "conftest$ac_exeext"
21570 if { (eval echo "$as_me:21570: \"$ac_link\"") >&5
21571   (eval $ac_link) 2>&5
21572   ac_status=$?
21573   echo "$as_me:21573: \$? = $ac_status" >&5
21574   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21575   { (eval echo "$as_me:21575: \"$ac_try\"") >&5
21576   (eval $ac_try) 2>&5
21577   ac_status=$?
21578   echo "$as_me:21578: \$? = $ac_status" >&5
21579   (exit "$ac_status"); }; }; then
21580   cf_cv_link_dataonly=yes
21581 else
21582   echo "$as_me: program exited with status $ac_status" >&5
21583 echo "$as_me: failed program was:" >&5
21584 cat "conftest.$ac_ext" >&5
21585 cf_cv_link_dataonly=no
21586 fi
21587 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21588 fi
21589         LIBS="$cf_saveLIBS"
21590
21591 fi
21592
21593 echo "$as_me:21593: result: $cf_cv_link_dataonly" >&5
21594 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21595
21596 if test "$cf_cv_link_dataonly" = no ; then
21597
21598 cat >>confdefs.h <<\EOF
21599 #define BROKEN_LINKER 1
21600 EOF
21601
21602         BROKEN_LINKER=1
21603 fi
21604
21605 ###     Checks for library functions.
21606
21607 echo "$as_me:21607: checking for clock_gettime" >&5
21608 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
21609 if test "${cf_cv_func_clock_gettime+set}" = set; then
21610   echo $ECHO_N "(cached) $ECHO_C" >&6
21611 else
21612
21613                 cat >"conftest.$ac_ext" <<_ACEOF
21614 #line 21614 "configure"
21615 #include "confdefs.h"
21616 #include <time.h>
21617 int
21618 main (void)
21619 {
21620 struct timespec ts;
21621                 int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts
21622   ;
21623   return 0;
21624 }
21625 _ACEOF
21626 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21627 if { (eval echo "$as_me:21627: \"$ac_link\"") >&5
21628   (eval $ac_link) 2>&5
21629   ac_status=$?
21630   echo "$as_me:21630: \$? = $ac_status" >&5
21631   (exit "$ac_status"); } &&
21632          { ac_try='test -s "conftest$ac_exeext"'
21633   { (eval echo "$as_me:21633: \"$ac_try\"") >&5
21634   (eval $ac_try) 2>&5
21635   ac_status=$?
21636   echo "$as_me:21636: \$? = $ac_status" >&5
21637   (exit "$ac_status"); }; }; then
21638   cf_cv_func_clock_gettime=yes
21639 else
21640   echo "$as_me: failed program was:" >&5
21641 cat "conftest.$ac_ext" >&5
21642 cf_cv_func_clock_gettime=no
21643 fi
21644 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21645
21646 fi
21647 echo "$as_me:21647: result: $cf_cv_func_clock_gettime" >&5
21648 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
21649
21650 if test "$cf_cv_func_clock_gettime" = yes
21651 then
21652
21653 cat >>confdefs.h <<\EOF
21654 #define HAVE_CLOCK_GETTIME 1
21655 EOF
21656
21657 else
21658 echo "$as_me:21658: checking for gettimeofday" >&5
21659 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
21660 if test "${ac_cv_func_gettimeofday+set}" = set; then
21661   echo $ECHO_N "(cached) $ECHO_C" >&6
21662 else
21663   cat >"conftest.$ac_ext" <<_ACEOF
21664 #line 21664 "configure"
21665 #include "confdefs.h"
21666 #define gettimeofday autoconf_temporary
21667 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21668 #undef gettimeofday
21669
21670 #ifdef __cplusplus
21671 extern "C"
21672 #endif
21673
21674 /* We use char because int might match the return type of a gcc2
21675    builtin and then its argument prototype would still apply.  */
21676 char gettimeofday (void);
21677
21678 int
21679 main (void)
21680 {
21681
21682 /* The GNU C library defines stubs for functions which it implements
21683     to always fail with ENOSYS.  Some functions are actually named
21684     something starting with __ and the normal name is an alias.  */
21685 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
21686 #error found stub for gettimeofday
21687 #endif
21688
21689         return gettimeofday ();
21690   ;
21691   return 0;
21692 }
21693 _ACEOF
21694 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21695 if { (eval echo "$as_me:21695: \"$ac_link\"") >&5
21696   (eval $ac_link) 2>&5
21697   ac_status=$?
21698   echo "$as_me:21698: \$? = $ac_status" >&5
21699   (exit "$ac_status"); } &&
21700          { ac_try='test -s "conftest$ac_exeext"'
21701   { (eval echo "$as_me:21701: \"$ac_try\"") >&5
21702   (eval $ac_try) 2>&5
21703   ac_status=$?
21704   echo "$as_me:21704: \$? = $ac_status" >&5
21705   (exit "$ac_status"); }; }; then
21706   ac_cv_func_gettimeofday=yes
21707 else
21708   echo "$as_me: failed program was:" >&5
21709 cat "conftest.$ac_ext" >&5
21710 ac_cv_func_gettimeofday=no
21711 fi
21712 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21713 fi
21714 echo "$as_me:21714: result: $ac_cv_func_gettimeofday" >&5
21715 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
21716 if test "$ac_cv_func_gettimeofday" = yes; then
21717
21718 cat >>confdefs.h <<\EOF
21719 #define HAVE_GETTIMEOFDAY 1
21720 EOF
21721
21722 else
21723
21724 echo "$as_me:21724: checking for gettimeofday in -lbsd" >&5
21725 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
21726 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
21727   echo $ECHO_N "(cached) $ECHO_C" >&6
21728 else
21729   ac_check_lib_save_LIBS=$LIBS
21730 LIBS="-lbsd  $LIBS"
21731 cat >"conftest.$ac_ext" <<_ACEOF
21732 #line 21732 "configure"
21733 #include "confdefs.h"
21734
21735 /* Override any gcc2 internal prototype to avoid an error.  */
21736 #ifdef __cplusplus
21737 extern "C"
21738 #endif
21739 /* We use char because int might match the return type of a gcc2
21740    builtin and then its argument prototype would still apply.  */
21741 char gettimeofday (void);
21742 int
21743 main (void)
21744 {
21745 gettimeofday ();
21746   ;
21747   return 0;
21748 }
21749 _ACEOF
21750 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21751 if { (eval echo "$as_me:21751: \"$ac_link\"") >&5
21752   (eval $ac_link) 2>&5
21753   ac_status=$?
21754   echo "$as_me:21754: \$? = $ac_status" >&5
21755   (exit "$ac_status"); } &&
21756          { ac_try='test -s "conftest$ac_exeext"'
21757   { (eval echo "$as_me:21757: \"$ac_try\"") >&5
21758   (eval $ac_try) 2>&5
21759   ac_status=$?
21760   echo "$as_me:21760: \$? = $ac_status" >&5
21761   (exit "$ac_status"); }; }; then
21762   ac_cv_lib_bsd_gettimeofday=yes
21763 else
21764   echo "$as_me: failed program was:" >&5
21765 cat "conftest.$ac_ext" >&5
21766 ac_cv_lib_bsd_gettimeofday=no
21767 fi
21768 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21769 LIBS=$ac_check_lib_save_LIBS
21770 fi
21771 echo "$as_me:21771: result: $ac_cv_lib_bsd_gettimeofday" >&5
21772 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
21773 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
21774
21775 cat >>confdefs.h <<\EOF
21776 #define HAVE_GETTIMEOFDAY 1
21777 EOF
21778
21779 cf_add_libs="$LIBS"
21780 # reverse order
21781 cf_add_0lib=
21782 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21783 # filter duplicates
21784 for cf_add_1lib in $cf_add_0lib; do
21785         for cf_add_2lib in $cf_add_libs; do
21786                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21787                         cf_add_1lib=
21788                         break
21789                 fi
21790         done
21791         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21792 done
21793 LIBS="$cf_add_libs"
21794
21795 fi
21796
21797 fi
21798 fi
21799
21800 for ac_func in \
21801 fpathconf \
21802 getcwd \
21803 getauxval \
21804 getegid \
21805 geteuid \
21806 getopt \
21807 getuid \
21808 issetugid \
21809 localeconv \
21810 poll \
21811 remove \
21812 select \
21813 setbuf \
21814 setbuffer \
21815 setfsuid \
21816 setvbuf \
21817 sigaction \
21818 sigvec \
21819 snprintf \
21820 strdup \
21821 strstr \
21822 sysconf \
21823 tcgetpgrp \
21824 times \
21825 tsearch \
21826 vsnprintf \
21827
21828 do
21829 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21830 echo "$as_me:21830: checking for $ac_func" >&5
21831 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21832 if eval "test \"\${$as_ac_var+set}\" = set"; then
21833   echo $ECHO_N "(cached) $ECHO_C" >&6
21834 else
21835   cat >"conftest.$ac_ext" <<_ACEOF
21836 #line 21836 "configure"
21837 #include "confdefs.h"
21838 #define $ac_func autoconf_temporary
21839 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21840 #undef $ac_func
21841
21842 #ifdef __cplusplus
21843 extern "C"
21844 #endif
21845
21846 /* We use char because int might match the return type of a gcc2
21847    builtin and then its argument prototype would still apply.  */
21848 char $ac_func (void);
21849
21850 int
21851 main (void)
21852 {
21853
21854 /* The GNU C library defines stubs for functions which it implements
21855     to always fail with ENOSYS.  Some functions are actually named
21856     something starting with __ and the normal name is an alias.  */
21857 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21858 #error found stub for $ac_func
21859 #endif
21860
21861         return $ac_func ();
21862   ;
21863   return 0;
21864 }
21865 _ACEOF
21866 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21867 if { (eval echo "$as_me:21867: \"$ac_link\"") >&5
21868   (eval $ac_link) 2>&5
21869   ac_status=$?
21870   echo "$as_me:21870: \$? = $ac_status" >&5
21871   (exit "$ac_status"); } &&
21872          { ac_try='test -s "conftest$ac_exeext"'
21873   { (eval echo "$as_me:21873: \"$ac_try\"") >&5
21874   (eval $ac_try) 2>&5
21875   ac_status=$?
21876   echo "$as_me:21876: \$? = $ac_status" >&5
21877   (exit "$ac_status"); }; }; then
21878   eval "$as_ac_var=yes"
21879 else
21880   echo "$as_me: failed program was:" >&5
21881 cat "conftest.$ac_ext" >&5
21882 eval "$as_ac_var=no"
21883 fi
21884 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21885 fi
21886 echo "$as_me:21886: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21887 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21888 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21889   cat >>confdefs.h <<EOF
21890 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21891 EOF
21892
21893 fi
21894 done
21895
21896 echo "$as_me:21896: checking if _PATH_TTYS is defined in ttyent.h" >&5
21897 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21898 if test "${cf_cv_PATH_TTYS+set}" = set; then
21899   echo $ECHO_N "(cached) $ECHO_C" >&6
21900 else
21901
21902 cat >"conftest.$ac_ext" <<_ACEOF
21903 #line 21903 "configure"
21904 #include "confdefs.h"
21905
21906 #include <stdio.h>
21907 #include <ttyent.h>
21908 int
21909 main (void)
21910 {
21911
21912 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21913   ;
21914   return 0;
21915 }
21916 _ACEOF
21917 rm -f "conftest.$ac_objext"
21918 if { (eval echo "$as_me:21918: \"$ac_compile\"") >&5
21919   (eval $ac_compile) 2>&5
21920   ac_status=$?
21921   echo "$as_me:21921: \$? = $ac_status" >&5
21922   (exit "$ac_status"); } &&
21923          { ac_try='test -s "conftest.$ac_objext"'
21924   { (eval echo "$as_me:21924: \"$ac_try\"") >&5
21925   (eval $ac_try) 2>&5
21926   ac_status=$?
21927   echo "$as_me:21927: \$? = $ac_status" >&5
21928   (exit "$ac_status"); }; }; then
21929   cf_cv_PATH_TTYS=yes
21930 else
21931   echo "$as_me: failed program was:" >&5
21932 cat "conftest.$ac_ext" >&5
21933 cf_cv_PATH_TTYS=no
21934 fi
21935 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21936 fi
21937 echo "$as_me:21937: result: $cf_cv_PATH_TTYS" >&5
21938 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21939
21940 if test $cf_cv_PATH_TTYS = no
21941 then
21942         for cf_ttys in /etc/ttytype /etc/ttys
21943         do
21944                 if test -f $cf_ttys
21945                 then
21946                         cf_cv_PATH_TTYS=maybe
21947
21948 cat >>confdefs.h <<\EOF
21949 #define _PATH_TTYS $cf_ttys
21950 EOF
21951
21952                         break
21953                 fi
21954         done
21955 fi
21956
21957 if test $cf_cv_PATH_TTYS != no
21958 then
21959         echo "$as_me:21959: checking if _PATH_TTYS file exists" >&5
21960 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21961 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21962   echo $ECHO_N "(cached) $ECHO_C" >&6
21963 else
21964
21965                 if test "$cross_compiling" = yes; then
21966   cf_cv_have_PATH_TTYS=unknown
21967 else
21968   cat >"conftest.$ac_ext" <<_ACEOF
21969 #line 21969 "configure"
21970 #include "confdefs.h"
21971
21972 $ac_includes_default
21973
21974 #include <ttyent.h>
21975
21976 int main(void) {
21977         FILE *fp = fopen(_PATH_TTYS, "r");
21978         ${cf_cv_main_return:-return} (fp == 0);
21979 }
21980 _ACEOF
21981 rm -f "conftest$ac_exeext"
21982 if { (eval echo "$as_me:21982: \"$ac_link\"") >&5
21983   (eval $ac_link) 2>&5
21984   ac_status=$?
21985   echo "$as_me:21985: \$? = $ac_status" >&5
21986   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21987   { (eval echo "$as_me:21987: \"$ac_try\"") >&5
21988   (eval $ac_try) 2>&5
21989   ac_status=$?
21990   echo "$as_me:21990: \$? = $ac_status" >&5
21991   (exit "$ac_status"); }; }; then
21992   cf_cv_have_PATH_TTYS=yes
21993 else
21994   echo "$as_me: program exited with status $ac_status" >&5
21995 echo "$as_me: failed program was:" >&5
21996 cat "conftest.$ac_ext" >&5
21997 cf_cv_have_PATH_TTYS=no
21998 fi
21999 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22000 fi
22001 fi
22002 echo "$as_me:22002: result: $cf_cv_have_PATH_TTYS" >&5
22003 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
22004         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
22005 fi
22006
22007 if test $cf_cv_PATH_TTYS != no
22008 then
22009
22010 cat >>confdefs.h <<\EOF
22011 #define HAVE_PATH_TTYS 1
22012 EOF
22013
22014         echo "$as_me:22014: checking for getttynam" >&5
22015 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
22016 if test "${cf_cv_func_getttynam+set}" = set; then
22017   echo $ECHO_N "(cached) $ECHO_C" >&6
22018 else
22019
22020                 cat >"conftest.$ac_ext" <<_ACEOF
22021 #line 22021 "configure"
22022 #include "confdefs.h"
22023 #include <ttyent.h>
22024 int
22025 main (void)
22026 {
22027 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
22028   ;
22029   return 0;
22030 }
22031 _ACEOF
22032 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22033 if { (eval echo "$as_me:22033: \"$ac_link\"") >&5
22034   (eval $ac_link) 2>&5
22035   ac_status=$?
22036   echo "$as_me:22036: \$? = $ac_status" >&5
22037   (exit "$ac_status"); } &&
22038          { ac_try='test -s "conftest$ac_exeext"'
22039   { (eval echo "$as_me:22039: \"$ac_try\"") >&5
22040   (eval $ac_try) 2>&5
22041   ac_status=$?
22042   echo "$as_me:22042: \$? = $ac_status" >&5
22043   (exit "$ac_status"); }; }; then
22044   cf_cv_func_getttynam=yes
22045 else
22046   echo "$as_me: failed program was:" >&5
22047 cat "conftest.$ac_ext" >&5
22048 cf_cv_func_getttynam=no
22049 fi
22050 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22051 fi
22052 echo "$as_me:22052: result: $cf_cv_func_getttynam" >&5
22053 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
22054         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
22055 #define HAVE_GETTTYNAM 1
22056 EOF
22057
22058 fi
22059
22060 if test "x$ac_cv_func_getopt" = xno && \
22061    test "x$cf_with_progs$cf_with_tests" != xnono; then
22062         { { echo "$as_me:22062: error: getopt is required for building programs" >&5
22063 echo "$as_me: error: getopt is required for building programs" >&2;}
22064    { (exit 1); exit 1; }; }
22065 fi
22066
22067 if test "x$with_safe_sprintf" = xyes
22068 then
22069         if test "x$ac_cv_func_vsnprintf" = xyes
22070         then
22071                 { echo "$as_me:22071: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
22072 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
22073         else
22074
22075 cat >>confdefs.h <<\EOF
22076 #define USE_SAFE_SPRINTF 1
22077 EOF
22078
22079         fi
22080 fi
22081
22082 if test "x$with_getcap" = "xyes" ; then
22083
22084 echo "$as_me:22084: checking for terminal-capability database functions" >&5
22085 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
22086 if test "${cf_cv_cgetent+set}" = set; then
22087   echo $ECHO_N "(cached) $ECHO_C" >&6
22088 else
22089
22090 cat >"conftest.$ac_ext" <<_ACEOF
22091 #line 22091 "configure"
22092 #include "confdefs.h"
22093
22094 $ac_includes_default
22095 int
22096 main (void)
22097 {
22098
22099         char temp[128];
22100         char *buf = temp;
22101         char *db_array = temp;
22102         cgetent(&buf, &db_array, "vt100");
22103         cgetcap(buf, "tc", '=');
22104         cgetmatch(buf, "tc");
22105
22106   ;
22107   return 0;
22108 }
22109 _ACEOF
22110 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22111 if { (eval echo "$as_me:22111: \"$ac_link\"") >&5
22112   (eval $ac_link) 2>&5
22113   ac_status=$?
22114   echo "$as_me:22114: \$? = $ac_status" >&5
22115   (exit "$ac_status"); } &&
22116          { ac_try='test -s "conftest$ac_exeext"'
22117   { (eval echo "$as_me:22117: \"$ac_try\"") >&5
22118   (eval $ac_try) 2>&5
22119   ac_status=$?
22120   echo "$as_me:22120: \$? = $ac_status" >&5
22121   (exit "$ac_status"); }; }; then
22122   cf_cv_cgetent=yes
22123 else
22124   echo "$as_me: failed program was:" >&5
22125 cat "conftest.$ac_ext" >&5
22126 cf_cv_cgetent=no
22127 fi
22128 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22129
22130 fi
22131 echo "$as_me:22131: result: $cf_cv_cgetent" >&5
22132 echo "${ECHO_T}$cf_cv_cgetent" >&6
22133
22134 if test "$cf_cv_cgetent" = yes
22135 then
22136
22137 cat >>confdefs.h <<\EOF
22138 #define HAVE_BSD_CGETENT 1
22139 EOF
22140
22141 echo "$as_me:22141: checking if cgetent uses const parameter" >&5
22142 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
22143 if test "${cf_cv_cgetent_const+set}" = set; then
22144   echo $ECHO_N "(cached) $ECHO_C" >&6
22145 else
22146
22147 cat >"conftest.$ac_ext" <<_ACEOF
22148 #line 22148 "configure"
22149 #include "confdefs.h"
22150
22151 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
22152 $ac_includes_default
22153 int
22154 main (void)
22155 {
22156
22157         char temp[128];
22158         char *buf = temp;
22159 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
22160         const char *db_array = temp;
22161         cgetent(&buf, &db_array, "vt100");
22162 #endif
22163         cgetcap(buf, "tc", '=');
22164         cgetmatch(buf, "tc");
22165
22166   ;
22167   return 0;
22168 }
22169 _ACEOF
22170 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22171 if { (eval echo "$as_me:22171: \"$ac_link\"") >&5
22172   (eval $ac_link) 2>&5
22173   ac_status=$?
22174   echo "$as_me:22174: \$? = $ac_status" >&5
22175   (exit "$ac_status"); } &&
22176          { ac_try='test -s "conftest$ac_exeext"'
22177   { (eval echo "$as_me:22177: \"$ac_try\"") >&5
22178   (eval $ac_try) 2>&5
22179   ac_status=$?
22180   echo "$as_me:22180: \$? = $ac_status" >&5
22181   (exit "$ac_status"); }; }; then
22182   cf_cv_cgetent_const=yes
22183 else
22184   echo "$as_me: failed program was:" >&5
22185 cat "conftest.$ac_ext" >&5
22186 cf_cv_cgetent_const=no
22187 fi
22188 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22189
22190 fi
22191 echo "$as_me:22191: result: $cf_cv_cgetent_const" >&5
22192 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22193         if test "$cf_cv_cgetent_const" = yes
22194         then
22195
22196 cat >>confdefs.h <<EOF
22197 #define CGETENT_CONST const
22198 EOF
22199
22200         fi
22201 fi
22202
22203 fi
22204
22205 echo "$as_me:22205: checking for isascii" >&5
22206 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22207 if test "${cf_cv_have_isascii+set}" = set; then
22208   echo $ECHO_N "(cached) $ECHO_C" >&6
22209 else
22210
22211         cat >"conftest.$ac_ext" <<_ACEOF
22212 #line 22212 "configure"
22213 #include "confdefs.h"
22214 #include <ctype.h>
22215 int
22216 main (void)
22217 {
22218 int x = isascii(' '); (void)x
22219   ;
22220   return 0;
22221 }
22222 _ACEOF
22223 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22224 if { (eval echo "$as_me:22224: \"$ac_link\"") >&5
22225   (eval $ac_link) 2>&5
22226   ac_status=$?
22227   echo "$as_me:22227: \$? = $ac_status" >&5
22228   (exit "$ac_status"); } &&
22229          { ac_try='test -s "conftest$ac_exeext"'
22230   { (eval echo "$as_me:22230: \"$ac_try\"") >&5
22231   (eval $ac_try) 2>&5
22232   ac_status=$?
22233   echo "$as_me:22233: \$? = $ac_status" >&5
22234   (exit "$ac_status"); }; }; then
22235   cf_cv_have_isascii=yes
22236 else
22237   echo "$as_me: failed program was:" >&5
22238 cat "conftest.$ac_ext" >&5
22239 cf_cv_have_isascii=no
22240 fi
22241 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22242
22243 fi
22244 echo "$as_me:22244: result: $cf_cv_have_isascii" >&5
22245 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22246 test "$cf_cv_have_isascii" = yes &&
22247 cat >>confdefs.h <<\EOF
22248 #define HAVE_ISASCII 1
22249 EOF
22250
22251 if test "$ac_cv_func_sigaction" = yes; then
22252 echo "$as_me:22252: checking whether sigaction needs _POSIX_SOURCE" >&5
22253 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22254 cat >"conftest.$ac_ext" <<_ACEOF
22255 #line 22255 "configure"
22256 #include "confdefs.h"
22257
22258 #include <sys/types.h>
22259 #include <signal.h>
22260 int
22261 main (void)
22262 {
22263 struct sigaction act; (void)act
22264   ;
22265   return 0;
22266 }
22267 _ACEOF
22268 rm -f "conftest.$ac_objext"
22269 if { (eval echo "$as_me:22269: \"$ac_compile\"") >&5
22270   (eval $ac_compile) 2>&5
22271   ac_status=$?
22272   echo "$as_me:22272: \$? = $ac_status" >&5
22273   (exit "$ac_status"); } &&
22274          { ac_try='test -s "conftest.$ac_objext"'
22275   { (eval echo "$as_me:22275: \"$ac_try\"") >&5
22276   (eval $ac_try) 2>&5
22277   ac_status=$?
22278   echo "$as_me:22278: \$? = $ac_status" >&5
22279   (exit "$ac_status"); }; }; then
22280   sigact_bad=no
22281 else
22282   echo "$as_me: failed program was:" >&5
22283 cat "conftest.$ac_ext" >&5
22284
22285 cat >"conftest.$ac_ext" <<_ACEOF
22286 #line 22286 "configure"
22287 #include "confdefs.h"
22288
22289 #define _POSIX_SOURCE
22290 #include <sys/types.h>
22291 #include <signal.h>
22292 int
22293 main (void)
22294 {
22295 struct sigaction act; (void)act
22296   ;
22297   return 0;
22298 }
22299 _ACEOF
22300 rm -f "conftest.$ac_objext"
22301 if { (eval echo "$as_me:22301: \"$ac_compile\"") >&5
22302   (eval $ac_compile) 2>&5
22303   ac_status=$?
22304   echo "$as_me:22304: \$? = $ac_status" >&5
22305   (exit "$ac_status"); } &&
22306          { ac_try='test -s "conftest.$ac_objext"'
22307   { (eval echo "$as_me:22307: \"$ac_try\"") >&5
22308   (eval $ac_try) 2>&5
22309   ac_status=$?
22310   echo "$as_me:22310: \$? = $ac_status" >&5
22311   (exit "$ac_status"); }; }; then
22312   sigact_bad=yes
22313
22314 cat >>confdefs.h <<\EOF
22315 #define _POSIX_SOURCE 1
22316 EOF
22317
22318 else
22319   echo "$as_me: failed program was:" >&5
22320 cat "conftest.$ac_ext" >&5
22321 sigact_bad=unknown
22322 fi
22323 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22324 fi
22325 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22326 echo "$as_me:22326: result: $sigact_bad" >&5
22327 echo "${ECHO_T}$sigact_bad" >&6
22328 fi
22329
22330 echo "$as_me:22330: checking if nanosleep really works" >&5
22331 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22332 if test "${cf_cv_func_nanosleep+set}" = set; then
22333   echo $ECHO_N "(cached) $ECHO_C" >&6
22334 else
22335
22336 if test "$cross_compiling" = yes; then
22337   cf_cv_func_nanosleep=unknown
22338 else
22339   cat >"conftest.$ac_ext" <<_ACEOF
22340 #line 22340 "configure"
22341 #include "confdefs.h"
22342
22343 $ac_includes_default
22344
22345 #include <errno.h>
22346 #include <time.h>
22347
22348 #ifdef HAVE_SYS_TIME_H
22349 #include <sys/time.h>
22350 #endif
22351
22352 int main(void) {
22353         struct timespec ts1, ts2;
22354         int code;
22355         ts1.tv_sec  = 0;
22356         ts1.tv_nsec = 750000000;
22357         ts2.tv_sec  = 0;
22358         ts2.tv_nsec = 0;
22359         errno = 0;
22360         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22361         ${cf_cv_main_return:-return}(code != 0);
22362 }
22363
22364 _ACEOF
22365 rm -f "conftest$ac_exeext"
22366 if { (eval echo "$as_me:22366: \"$ac_link\"") >&5
22367   (eval $ac_link) 2>&5
22368   ac_status=$?
22369   echo "$as_me:22369: \$? = $ac_status" >&5
22370   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22371   { (eval echo "$as_me:22371: \"$ac_try\"") >&5
22372   (eval $ac_try) 2>&5
22373   ac_status=$?
22374   echo "$as_me:22374: \$? = $ac_status" >&5
22375   (exit "$ac_status"); }; }; then
22376   cf_cv_func_nanosleep=yes
22377 else
22378   echo "$as_me: program exited with status $ac_status" >&5
22379 echo "$as_me: failed program was:" >&5
22380 cat "conftest.$ac_ext" >&5
22381 cf_cv_func_nanosleep=no
22382 fi
22383 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22384 fi
22385 fi
22386 echo "$as_me:22386: result: $cf_cv_func_nanosleep" >&5
22387 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22388
22389 test "$cf_cv_func_nanosleep" = "yes" &&
22390 cat >>confdefs.h <<\EOF
22391 #define HAVE_NANOSLEEP 1
22392 EOF
22393
22394 for ac_header in \
22395 termio.h \
22396 termios.h \
22397 unistd.h \
22398 sys/ioctl.h \
22399 sys/termio.h \
22400
22401 do
22402 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22403 echo "$as_me:22403: checking for $ac_header" >&5
22404 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22405 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22406   echo $ECHO_N "(cached) $ECHO_C" >&6
22407 else
22408   cat >"conftest.$ac_ext" <<_ACEOF
22409 #line 22409 "configure"
22410 #include "confdefs.h"
22411 #include <$ac_header>
22412 _ACEOF
22413 if { (eval echo "$as_me:22413: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22414   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22415   ac_status=$?
22416   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22417   rm -f conftest.er1
22418   cat conftest.err >&5
22419   echo "$as_me:22419: \$? = $ac_status" >&5
22420   (exit "$ac_status"); } >/dev/null; then
22421   if test -s conftest.err; then
22422     ac_cpp_err=$ac_c_preproc_warn_flag
22423   else
22424     ac_cpp_err=
22425   fi
22426 else
22427   ac_cpp_err=yes
22428 fi
22429 if test -z "$ac_cpp_err"; then
22430   eval "$as_ac_Header=yes"
22431 else
22432   echo "$as_me: failed program was:" >&5
22433   cat "conftest.$ac_ext" >&5
22434   eval "$as_ac_Header=no"
22435 fi
22436 rm -f conftest.err "conftest.$ac_ext"
22437 fi
22438 echo "$as_me:22438: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22439 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22440 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22441   cat >>confdefs.h <<EOF
22442 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22443 EOF
22444
22445 fi
22446 done
22447
22448 if test "$ac_cv_header_termios_h" = yes ; then
22449         case "$CFLAGS $CPPFLAGS" in
22450         (*-D_POSIX_SOURCE*)
22451                 termios_bad=dunno ;;
22452         (*)     termios_bad=maybe ;;
22453         esac
22454         if test "$termios_bad" = maybe ; then
22455         echo "$as_me:22455: checking whether termios.h needs _POSIX_SOURCE" >&5
22456 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22457         cat >"conftest.$ac_ext" <<_ACEOF
22458 #line 22458 "configure"
22459 #include "confdefs.h"
22460 #include <termios.h>
22461 int
22462 main (void)
22463 {
22464 struct termios foo; int x = (int)(foo.c_iflag = 1); (void)x
22465   ;
22466   return 0;
22467 }
22468 _ACEOF
22469 rm -f "conftest.$ac_objext"
22470 if { (eval echo "$as_me:22470: \"$ac_compile\"") >&5
22471   (eval $ac_compile) 2>&5
22472   ac_status=$?
22473   echo "$as_me:22473: \$? = $ac_status" >&5
22474   (exit "$ac_status"); } &&
22475          { ac_try='test -s "conftest.$ac_objext"'
22476   { (eval echo "$as_me:22476: \"$ac_try\"") >&5
22477   (eval $ac_try) 2>&5
22478   ac_status=$?
22479   echo "$as_me:22479: \$? = $ac_status" >&5
22480   (exit "$ac_status"); }; }; then
22481   termios_bad=no
22482 else
22483   echo "$as_me: failed program was:" >&5
22484 cat "conftest.$ac_ext" >&5
22485
22486                 cat >"conftest.$ac_ext" <<_ACEOF
22487 #line 22487 "configure"
22488 #include "confdefs.h"
22489
22490 #define _POSIX_SOURCE
22491 #include <termios.h>
22492 int
22493 main (void)
22494 {
22495 struct termios foo; int x = (int)(foo.c_iflag = 2); (void)x
22496   ;
22497   return 0;
22498 }
22499 _ACEOF
22500 rm -f "conftest.$ac_objext"
22501 if { (eval echo "$as_me:22501: \"$ac_compile\"") >&5
22502   (eval $ac_compile) 2>&5
22503   ac_status=$?
22504   echo "$as_me:22504: \$? = $ac_status" >&5
22505   (exit "$ac_status"); } &&
22506          { ac_try='test -s "conftest.$ac_objext"'
22507   { (eval echo "$as_me:22507: \"$ac_try\"") >&5
22508   (eval $ac_try) 2>&5
22509   ac_status=$?
22510   echo "$as_me:22510: \$? = $ac_status" >&5
22511   (exit "$ac_status"); }; }; then
22512   termios_bad=unknown
22513 else
22514   echo "$as_me: failed program was:" >&5
22515 cat "conftest.$ac_ext" >&5
22516 termios_bad=yes
22517 cat >>confdefs.h <<\EOF
22518 #define _POSIX_SOURCE 1
22519 EOF
22520
22521 fi
22522 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22523
22524 fi
22525 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22526         echo "$as_me:22526: result: $termios_bad" >&5
22527 echo "${ECHO_T}$termios_bad" >&6
22528         fi
22529 fi
22530
22531 echo "$as_me:22531: checking for tcgetattr" >&5
22532 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22533 if test "${cf_cv_have_tcgetattr+set}" = set; then
22534   echo $ECHO_N "(cached) $ECHO_C" >&6
22535 else
22536
22537 cat >"conftest.$ac_ext" <<_ACEOF
22538 #line 22538 "configure"
22539 #include "confdefs.h"
22540
22541 #include <sys/types.h>
22542 #ifdef HAVE_UNISTD_H
22543 #include <unistd.h>
22544 #endif
22545 #ifdef HAVE_TERMIOS_H
22546 #include <termios.h>
22547 #define TTY struct termios
22548 #else
22549 #ifdef HAVE_TERMIO_H
22550 #include <termio.h>
22551 #define TTY struct termio
22552 #endif
22553 #endif
22554
22555 int
22556 main (void)
22557 {
22558
22559 TTY foo;
22560 tcgetattr(1, &foo);
22561   ;
22562   return 0;
22563 }
22564 _ACEOF
22565 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22566 if { (eval echo "$as_me:22566: \"$ac_link\"") >&5
22567   (eval $ac_link) 2>&5
22568   ac_status=$?
22569   echo "$as_me:22569: \$? = $ac_status" >&5
22570   (exit "$ac_status"); } &&
22571          { ac_try='test -s "conftest$ac_exeext"'
22572   { (eval echo "$as_me:22572: \"$ac_try\"") >&5
22573   (eval $ac_try) 2>&5
22574   ac_status=$?
22575   echo "$as_me:22575: \$? = $ac_status" >&5
22576   (exit "$ac_status"); }; }; then
22577   cf_cv_have_tcgetattr=yes
22578 else
22579   echo "$as_me: failed program was:" >&5
22580 cat "conftest.$ac_ext" >&5
22581 cf_cv_have_tcgetattr=no
22582 fi
22583 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22584 fi
22585 echo "$as_me:22585: result: $cf_cv_have_tcgetattr" >&5
22586 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22587 test "$cf_cv_have_tcgetattr" = yes &&
22588 cat >>confdefs.h <<\EOF
22589 #define HAVE_TCGETATTR 1
22590 EOF
22591
22592 echo "$as_me:22592: checking for vsscanf function or workaround" >&5
22593 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22594 if test "${cf_cv_func_vsscanf+set}" = set; then
22595   echo $ECHO_N "(cached) $ECHO_C" >&6
22596 else
22597
22598 cat >"conftest.$ac_ext" <<_ACEOF
22599 #line 22599 "configure"
22600 #include "confdefs.h"
22601
22602 #include <stdarg.h>
22603 #include <stdio.h>
22604
22605 static void
22606 myfunc(const char *str, const char *fmt, ...)
22607 {
22608         va_list ap;
22609         va_start(ap, fmt);
22610         vsscanf(str, fmt, ap);
22611         va_end(ap);
22612 }
22613
22614 int
22615 main (void)
22616 {
22617
22618         myfunc("55", "%d");
22619
22620   ;
22621   return 0;
22622 }
22623 _ACEOF
22624 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22625 if { (eval echo "$as_me:22625: \"$ac_link\"") >&5
22626   (eval $ac_link) 2>&5
22627   ac_status=$?
22628   echo "$as_me:22628: \$? = $ac_status" >&5
22629   (exit "$ac_status"); } &&
22630          { ac_try='test -s "conftest$ac_exeext"'
22631   { (eval echo "$as_me:22631: \"$ac_try\"") >&5
22632   (eval $ac_try) 2>&5
22633   ac_status=$?
22634   echo "$as_me:22634: \$? = $ac_status" >&5
22635   (exit "$ac_status"); }; }; then
22636   cf_cv_func_vsscanf=vsscanf
22637 else
22638   echo "$as_me: failed program was:" >&5
22639 cat "conftest.$ac_ext" >&5
22640
22641 cat >"conftest.$ac_ext" <<_ACEOF
22642 #line 22642 "configure"
22643 #include "confdefs.h"
22644
22645 #include <stdarg.h>
22646 #include <stdio.h>
22647 int
22648 main (void)
22649 {
22650
22651         FILE strbuf;
22652         char *str = "from";
22653
22654         strbuf._flag = _IOREAD;
22655         strbuf._ptr = strbuf._base = (unsigned char *) str;
22656         strbuf._cnt = strlen(str);
22657         strbuf._file = _NFILE;
22658         return (vfscanf(&strbuf, "%d", ap))
22659   ;
22660   return 0;
22661 }
22662 _ACEOF
22663 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22664 if { (eval echo "$as_me:22664: \"$ac_link\"") >&5
22665   (eval $ac_link) 2>&5
22666   ac_status=$?
22667   echo "$as_me:22667: \$? = $ac_status" >&5
22668   (exit "$ac_status"); } &&
22669          { ac_try='test -s "conftest$ac_exeext"'
22670   { (eval echo "$as_me:22670: \"$ac_try\"") >&5
22671   (eval $ac_try) 2>&5
22672   ac_status=$?
22673   echo "$as_me:22673: \$? = $ac_status" >&5
22674   (exit "$ac_status"); }; }; then
22675   cf_cv_func_vsscanf=vfscanf
22676 else
22677   echo "$as_me: failed program was:" >&5
22678 cat "conftest.$ac_ext" >&5
22679
22680 cat >"conftest.$ac_ext" <<_ACEOF
22681 #line 22681 "configure"
22682 #include "confdefs.h"
22683
22684 #include <stdarg.h>
22685 #include <stdio.h>
22686 int
22687 main (void)
22688 {
22689
22690         FILE strbuf;
22691         char *str = "from";
22692
22693         strbuf._flag = _IOREAD;
22694         strbuf._ptr = strbuf._base = (unsigned char *) str;
22695         strbuf._cnt = strlen(str);
22696         strbuf._file = _NFILE;
22697         return (_doscan(&strbuf, "%d", ap))
22698   ;
22699   return 0;
22700 }
22701 _ACEOF
22702 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22703 if { (eval echo "$as_me:22703: \"$ac_link\"") >&5
22704   (eval $ac_link) 2>&5
22705   ac_status=$?
22706   echo "$as_me:22706: \$? = $ac_status" >&5
22707   (exit "$ac_status"); } &&
22708          { ac_try='test -s "conftest$ac_exeext"'
22709   { (eval echo "$as_me:22709: \"$ac_try\"") >&5
22710   (eval $ac_try) 2>&5
22711   ac_status=$?
22712   echo "$as_me:22712: \$? = $ac_status" >&5
22713   (exit "$ac_status"); }; }; then
22714   cf_cv_func_vsscanf=_doscan
22715 else
22716   echo "$as_me: failed program was:" >&5
22717 cat "conftest.$ac_ext" >&5
22718
22719 cf_cv_func_vsscanf=no
22720 fi
22721 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22722 fi
22723 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22724 fi
22725 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22726 fi
22727 echo "$as_me:22727: result: $cf_cv_func_vsscanf" >&5
22728 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22729
22730 case "$cf_cv_func_vsscanf" in
22731 (vsscanf)
22732 cat >>confdefs.h <<\EOF
22733 #define HAVE_VSSCANF 1
22734 EOF
22735 ;;
22736 (vfscanf)
22737 cat >>confdefs.h <<\EOF
22738 #define HAVE_VFSCANF 1
22739 EOF
22740 ;;
22741 (_doscan)
22742 cat >>confdefs.h <<\EOF
22743 #define HAVE__DOSCAN 1
22744 EOF
22745 ;;
22746 esac
22747
22748 for ac_header in \
22749 unistd.h \
22750
22751 do
22752 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22753 echo "$as_me:22753: checking for $ac_header" >&5
22754 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22755 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22756   echo $ECHO_N "(cached) $ECHO_C" >&6
22757 else
22758   cat >"conftest.$ac_ext" <<_ACEOF
22759 #line 22759 "configure"
22760 #include "confdefs.h"
22761 #include <$ac_header>
22762 _ACEOF
22763 if { (eval echo "$as_me:22763: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22764   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22765   ac_status=$?
22766   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22767   rm -f conftest.er1
22768   cat conftest.err >&5
22769   echo "$as_me:22769: \$? = $ac_status" >&5
22770   (exit "$ac_status"); } >/dev/null; then
22771   if test -s conftest.err; then
22772     ac_cpp_err=$ac_c_preproc_warn_flag
22773   else
22774     ac_cpp_err=
22775   fi
22776 else
22777   ac_cpp_err=yes
22778 fi
22779 if test -z "$ac_cpp_err"; then
22780   eval "$as_ac_Header=yes"
22781 else
22782   echo "$as_me: failed program was:" >&5
22783   cat "conftest.$ac_ext" >&5
22784   eval "$as_ac_Header=no"
22785 fi
22786 rm -f conftest.err "conftest.$ac_ext"
22787 fi
22788 echo "$as_me:22788: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22789 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22790 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22791   cat >>confdefs.h <<EOF
22792 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22793 EOF
22794
22795 fi
22796 done
22797
22798 echo "$as_me:22798: checking for working mkstemp" >&5
22799 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22800 if test "${cf_cv_func_mkstemp+set}" = set; then
22801   echo $ECHO_N "(cached) $ECHO_C" >&6
22802 else
22803
22804 rm -rf ./conftest*
22805 if test "$cross_compiling" = yes; then
22806   cf_cv_func_mkstemp=maybe
22807 else
22808   cat >"conftest.$ac_ext" <<_ACEOF
22809 #line 22809 "configure"
22810 #include "confdefs.h"
22811
22812 $ac_includes_default
22813
22814 int main(void)
22815 {
22816         static char tmpl[] = "conftestXXXXXX";
22817         char name[2][80];
22818         int n;
22819         int result = 0;
22820         int fd;
22821         struct stat sb;
22822
22823         umask(077);
22824         for (n = 0; n < 2; ++n) {
22825                 strcpy(name[n], tmpl);
22826                 if ((fd = mkstemp(name[n])) >= 0) {
22827                         if (!strcmp(name[n], tmpl)
22828                          || stat(name[n], &sb) != 0
22829                          || (sb.st_mode & S_IFMT) != S_IFREG
22830                          || (sb.st_mode & 077) != 0) {
22831                                 result = 1;
22832                         }
22833                         close(fd);
22834                 }
22835         }
22836         if (result == 0
22837          && !strcmp(name[0], name[1]))
22838                 result = 1;
22839         ${cf_cv_main_return:-return}(result);
22840 }
22841
22842 _ACEOF
22843 rm -f "conftest$ac_exeext"
22844 if { (eval echo "$as_me:22844: \"$ac_link\"") >&5
22845   (eval $ac_link) 2>&5
22846   ac_status=$?
22847   echo "$as_me:22847: \$? = $ac_status" >&5
22848   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22849   { (eval echo "$as_me:22849: \"$ac_try\"") >&5
22850   (eval $ac_try) 2>&5
22851   ac_status=$?
22852   echo "$as_me:22852: \$? = $ac_status" >&5
22853   (exit "$ac_status"); }; }; then
22854   cf_cv_func_mkstemp=yes
22855
22856 else
22857   echo "$as_me: program exited with status $ac_status" >&5
22858 echo "$as_me: failed program was:" >&5
22859 cat "conftest.$ac_ext" >&5
22860 cf_cv_func_mkstemp=no
22861
22862 fi
22863 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22864 fi
22865
22866 fi
22867 echo "$as_me:22867: result: $cf_cv_func_mkstemp" >&5
22868 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22869 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22870         echo "$as_me:22870: checking for mkstemp" >&5
22871 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22872 if test "${ac_cv_func_mkstemp+set}" = set; then
22873   echo $ECHO_N "(cached) $ECHO_C" >&6
22874 else
22875   cat >"conftest.$ac_ext" <<_ACEOF
22876 #line 22876 "configure"
22877 #include "confdefs.h"
22878 #define mkstemp autoconf_temporary
22879 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22880 #undef mkstemp
22881
22882 #ifdef __cplusplus
22883 extern "C"
22884 #endif
22885
22886 /* We use char because int might match the return type of a gcc2
22887    builtin and then its argument prototype would still apply.  */
22888 char mkstemp (void);
22889
22890 int
22891 main (void)
22892 {
22893
22894 /* The GNU C library defines stubs for functions which it implements
22895     to always fail with ENOSYS.  Some functions are actually named
22896     something starting with __ and the normal name is an alias.  */
22897 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22898 #error found stub for mkstemp
22899 #endif
22900
22901         return mkstemp ();
22902   ;
22903   return 0;
22904 }
22905 _ACEOF
22906 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22907 if { (eval echo "$as_me:22907: \"$ac_link\"") >&5
22908   (eval $ac_link) 2>&5
22909   ac_status=$?
22910   echo "$as_me:22910: \$? = $ac_status" >&5
22911   (exit "$ac_status"); } &&
22912          { ac_try='test -s "conftest$ac_exeext"'
22913   { (eval echo "$as_me:22913: \"$ac_try\"") >&5
22914   (eval $ac_try) 2>&5
22915   ac_status=$?
22916   echo "$as_me:22916: \$? = $ac_status" >&5
22917   (exit "$ac_status"); }; }; then
22918   ac_cv_func_mkstemp=yes
22919 else
22920   echo "$as_me: failed program was:" >&5
22921 cat "conftest.$ac_ext" >&5
22922 ac_cv_func_mkstemp=no
22923 fi
22924 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22925 fi
22926 echo "$as_me:22926: result: $ac_cv_func_mkstemp" >&5
22927 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22928
22929 fi
22930 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22931
22932 cat >>confdefs.h <<\EOF
22933 #define HAVE_MKSTEMP 1
22934 EOF
22935
22936 fi
22937
22938 # setup for prototype of fallback for vsscanf()
22939
22940 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22941         HAVE_VSSCANF=1
22942 else
22943         HAVE_VSSCANF=0
22944 fi
22945
22946 if test "x$cross_compiling" = xyes ; then
22947         { echo "$as_me:22947: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22948 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22949 else
22950         echo "$as_me:22950: checking whether setvbuf arguments are reversed" >&5
22951 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22952 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22953   echo $ECHO_N "(cached) $ECHO_C" >&6
22954 else
22955   if test "$cross_compiling" = yes; then
22956   { { echo "$as_me:22956: error: cannot run test program while cross compiling" >&5
22957 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22958    { (exit 1); exit 1; }; }
22959 else
22960   cat >"conftest.$ac_ext" <<_ACEOF
22961 #line 22961 "configure"
22962 #include "confdefs.h"
22963 #include <stdio.h>
22964 /* If setvbuf has the reversed format, exit 0. */
22965 int
22966 main (void)
22967 {
22968   /* This call has the arguments reversed.
22969      A reversed system may check and see that the address of main
22970      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22971   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22972     $ac_main_return(1);
22973   putc('\r', stdout);
22974   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22975 }
22976 _ACEOF
22977 rm -f "conftest$ac_exeext"
22978 if { (eval echo "$as_me:22978: \"$ac_link\"") >&5
22979   (eval $ac_link) 2>&5
22980   ac_status=$?
22981   echo "$as_me:22981: \$? = $ac_status" >&5
22982   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22983   { (eval echo "$as_me:22983: \"$ac_try\"") >&5
22984   (eval $ac_try) 2>&5
22985   ac_status=$?
22986   echo "$as_me:22986: \$? = $ac_status" >&5
22987   (exit "$ac_status"); }; }; then
22988   ac_cv_func_setvbuf_reversed=yes
22989 else
22990   echo "$as_me: program exited with status $ac_status" >&5
22991 echo "$as_me: failed program was:" >&5
22992 cat "conftest.$ac_ext" >&5
22993 ac_cv_func_setvbuf_reversed=no
22994 fi
22995 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22996 fi
22997 rm -f core ./core.* ./*.core
22998 fi
22999 echo "$as_me:22999: result: $ac_cv_func_setvbuf_reversed" >&5
23000 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
23001 if test $ac_cv_func_setvbuf_reversed = yes; then
23002
23003 cat >>confdefs.h <<\EOF
23004 #define SETVBUF_REVERSED 1
23005 EOF
23006
23007 fi
23008
23009 fi
23010 echo "$as_me:23010: checking for intptr_t" >&5
23011 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
23012 if test "${ac_cv_type_intptr_t+set}" = set; then
23013   echo $ECHO_N "(cached) $ECHO_C" >&6
23014 else
23015   cat >"conftest.$ac_ext" <<_ACEOF
23016 #line 23016 "configure"
23017 #include "confdefs.h"
23018 $ac_includes_default
23019 int
23020 main (void)
23021 {
23022 if ((intptr_t *) 0)
23023   return 0;
23024 if (sizeof (intptr_t))
23025   return 0;
23026   ;
23027   return 0;
23028 }
23029 _ACEOF
23030 rm -f "conftest.$ac_objext"
23031 if { (eval echo "$as_me:23031: \"$ac_compile\"") >&5
23032   (eval $ac_compile) 2>&5
23033   ac_status=$?
23034   echo "$as_me:23034: \$? = $ac_status" >&5
23035   (exit "$ac_status"); } &&
23036          { ac_try='test -s "conftest.$ac_objext"'
23037   { (eval echo "$as_me:23037: \"$ac_try\"") >&5
23038   (eval $ac_try) 2>&5
23039   ac_status=$?
23040   echo "$as_me:23040: \$? = $ac_status" >&5
23041   (exit "$ac_status"); }; }; then
23042   ac_cv_type_intptr_t=yes
23043 else
23044   echo "$as_me: failed program was:" >&5
23045 cat "conftest.$ac_ext" >&5
23046 ac_cv_type_intptr_t=no
23047 fi
23048 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23049 fi
23050 echo "$as_me:23050: result: $ac_cv_type_intptr_t" >&5
23051 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
23052 if test "$ac_cv_type_intptr_t" = yes; then
23053   :
23054 else
23055
23056 cat >>confdefs.h <<EOF
23057 #define intptr_t long
23058 EOF
23059
23060 fi
23061
23062 echo "$as_me:23062: checking for ssize_t" >&5
23063 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
23064 if test "${ac_cv_type_ssize_t+set}" = set; then
23065   echo $ECHO_N "(cached) $ECHO_C" >&6
23066 else
23067   cat >"conftest.$ac_ext" <<_ACEOF
23068 #line 23068 "configure"
23069 #include "confdefs.h"
23070 $ac_includes_default
23071 int
23072 main (void)
23073 {
23074 if ((ssize_t *) 0)
23075   return 0;
23076 if (sizeof (ssize_t))
23077   return 0;
23078   ;
23079   return 0;
23080 }
23081 _ACEOF
23082 rm -f "conftest.$ac_objext"
23083 if { (eval echo "$as_me:23083: \"$ac_compile\"") >&5
23084   (eval $ac_compile) 2>&5
23085   ac_status=$?
23086   echo "$as_me:23086: \$? = $ac_status" >&5
23087   (exit "$ac_status"); } &&
23088          { ac_try='test -s "conftest.$ac_objext"'
23089   { (eval echo "$as_me:23089: \"$ac_try\"") >&5
23090   (eval $ac_try) 2>&5
23091   ac_status=$?
23092   echo "$as_me:23092: \$? = $ac_status" >&5
23093   (exit "$ac_status"); }; }; then
23094   ac_cv_type_ssize_t=yes
23095 else
23096   echo "$as_me: failed program was:" >&5
23097 cat "conftest.$ac_ext" >&5
23098 ac_cv_type_ssize_t=no
23099 fi
23100 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23101 fi
23102 echo "$as_me:23102: result: $ac_cv_type_ssize_t" >&5
23103 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
23104 if test "$ac_cv_type_ssize_t" = yes; then
23105   :
23106 else
23107
23108 cat >>confdefs.h <<EOF
23109 #define ssize_t int
23110 EOF
23111
23112 fi
23113
23114 echo "$as_me:23114: checking for type sigaction_t" >&5
23115 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
23116 if test "${cf_cv_type_sigaction+set}" = set; then
23117   echo $ECHO_N "(cached) $ECHO_C" >&6
23118 else
23119
23120         cat >"conftest.$ac_ext" <<_ACEOF
23121 #line 23121 "configure"
23122 #include "confdefs.h"
23123
23124 #include <signal.h>
23125 int
23126 main (void)
23127 {
23128 sigaction_t x; (void)x
23129   ;
23130   return 0;
23131 }
23132 _ACEOF
23133 rm -f "conftest.$ac_objext"
23134 if { (eval echo "$as_me:23134: \"$ac_compile\"") >&5
23135   (eval $ac_compile) 2>&5
23136   ac_status=$?
23137   echo "$as_me:23137: \$? = $ac_status" >&5
23138   (exit "$ac_status"); } &&
23139          { ac_try='test -s "conftest.$ac_objext"'
23140   { (eval echo "$as_me:23140: \"$ac_try\"") >&5
23141   (eval $ac_try) 2>&5
23142   ac_status=$?
23143   echo "$as_me:23143: \$? = $ac_status" >&5
23144   (exit "$ac_status"); }; }; then
23145   cf_cv_type_sigaction=yes
23146 else
23147   echo "$as_me: failed program was:" >&5
23148 cat "conftest.$ac_ext" >&5
23149 cf_cv_type_sigaction=no
23150 fi
23151 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23152 fi
23153
23154 echo "$as_me:23154: result: $cf_cv_type_sigaction" >&5
23155 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
23156 test "$cf_cv_type_sigaction" = yes &&
23157 cat >>confdefs.h <<\EOF
23158 #define HAVE_TYPE_SIGACTION 1
23159 EOF
23160
23161 echo "$as_me:23161: checking declaration of size-change" >&5
23162 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
23163 if test "${cf_cv_sizechange+set}" = set; then
23164   echo $ECHO_N "(cached) $ECHO_C" >&6
23165 else
23166
23167         cf_cv_sizechange=unknown
23168         cf_save_CPPFLAGS="$CPPFLAGS"
23169
23170 for cf_opts in "" "NEED_PTEM_H"
23171 do
23172
23173         CPPFLAGS="$cf_save_CPPFLAGS"
23174         if test -n "$cf_opts"
23175         then
23176
23177         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23178         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23179
23180         fi
23181         cat >"conftest.$ac_ext" <<_ACEOF
23182 #line 23182 "configure"
23183 #include "confdefs.h"
23184 #include <sys/types.h>
23185 #ifdef HAVE_TERMIOS_H
23186 #include <termios.h>
23187 #else
23188 #ifdef HAVE_TERMIO_H
23189 #include <termio.h>
23190 #endif
23191 #endif
23192
23193 #ifdef NEED_PTEM_H
23194 /* This is a workaround for SCO:  they neglected to define struct winsize in
23195  * termios.h -- it is only in termio.h and ptem.h
23196  */
23197 #include <sys/stream.h>
23198 #include <sys/ptem.h>
23199 #endif
23200
23201 #ifdef HAVE_SYS_IOCTL_H
23202 #include <sys/ioctl.h>
23203 #endif
23204
23205 int
23206 main (void)
23207 {
23208
23209 #ifdef TIOCGSIZE
23210         struct ttysize win;     /* SunOS 3.0... */
23211         int y = win.ts_lines = 2;
23212         int x = win.ts_cols = 1;
23213         (void)y;
23214         (void)x;
23215 #else
23216 #ifdef TIOCGWINSZ
23217         struct winsize win;     /* everything else */
23218         int y = win.ws_row = 2;
23219         int x = win.ws_col = 1;
23220         (void)y;
23221         (void)x;
23222 #else
23223         no TIOCGSIZE or TIOCGWINSZ
23224 #endif /* TIOCGWINSZ */
23225 #endif /* TIOCGSIZE */
23226
23227   ;
23228   return 0;
23229 }
23230 _ACEOF
23231 rm -f "conftest.$ac_objext"
23232 if { (eval echo "$as_me:23232: \"$ac_compile\"") >&5
23233   (eval $ac_compile) 2>&5
23234   ac_status=$?
23235   echo "$as_me:23235: \$? = $ac_status" >&5
23236   (exit "$ac_status"); } &&
23237          { ac_try='test -s "conftest.$ac_objext"'
23238   { (eval echo "$as_me:23238: \"$ac_try\"") >&5
23239   (eval $ac_try) 2>&5
23240   ac_status=$?
23241   echo "$as_me:23241: \$? = $ac_status" >&5
23242   (exit "$ac_status"); }; }; then
23243   cf_cv_sizechange=yes
23244 else
23245   echo "$as_me: failed program was:" >&5
23246 cat "conftest.$ac_ext" >&5
23247 cf_cv_sizechange=no
23248 fi
23249 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23250
23251         CPPFLAGS="$cf_save_CPPFLAGS"
23252         if test "$cf_cv_sizechange" = yes ; then
23253                 echo "size-change succeeded ($cf_opts)" >&5
23254                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23255                 break
23256         fi
23257 done
23258
23259 fi
23260 echo "$as_me:23260: result: $cf_cv_sizechange" >&5
23261 echo "${ECHO_T}$cf_cv_sizechange" >&6
23262 if test "$cf_cv_sizechange" != no ; then
23263
23264 cat >>confdefs.h <<\EOF
23265 #define HAVE_SIZECHANGE 1
23266 EOF
23267
23268         case "$cf_cv_sizechange" in
23269         (NEED*)
23270                 cat >>confdefs.h <<EOF
23271 #define $cf_cv_sizechange  1
23272 EOF
23273
23274                 ;;
23275         esac
23276 fi
23277
23278 echo "$as_me:23278: checking for memmove" >&5
23279 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23280 if test "${ac_cv_func_memmove+set}" = set; then
23281   echo $ECHO_N "(cached) $ECHO_C" >&6
23282 else
23283   cat >"conftest.$ac_ext" <<_ACEOF
23284 #line 23284 "configure"
23285 #include "confdefs.h"
23286 #define memmove autoconf_temporary
23287 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23288 #undef memmove
23289
23290 #ifdef __cplusplus
23291 extern "C"
23292 #endif
23293
23294 /* We use char because int might match the return type of a gcc2
23295    builtin and then its argument prototype would still apply.  */
23296 char memmove (void);
23297
23298 int
23299 main (void)
23300 {
23301
23302 /* The GNU C library defines stubs for functions which it implements
23303     to always fail with ENOSYS.  Some functions are actually named
23304     something starting with __ and the normal name is an alias.  */
23305 #if defined (__stub_memmove) || defined (__stub___memmove)
23306 #error found stub for memmove
23307 #endif
23308
23309         return memmove ();
23310   ;
23311   return 0;
23312 }
23313 _ACEOF
23314 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23315 if { (eval echo "$as_me:23315: \"$ac_link\"") >&5
23316   (eval $ac_link) 2>&5
23317   ac_status=$?
23318   echo "$as_me:23318: \$? = $ac_status" >&5
23319   (exit "$ac_status"); } &&
23320          { ac_try='test -s "conftest$ac_exeext"'
23321   { (eval echo "$as_me:23321: \"$ac_try\"") >&5
23322   (eval $ac_try) 2>&5
23323   ac_status=$?
23324   echo "$as_me:23324: \$? = $ac_status" >&5
23325   (exit "$ac_status"); }; }; then
23326   ac_cv_func_memmove=yes
23327 else
23328   echo "$as_me: failed program was:" >&5
23329 cat "conftest.$ac_ext" >&5
23330 ac_cv_func_memmove=no
23331 fi
23332 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23333 fi
23334 echo "$as_me:23334: result: $ac_cv_func_memmove" >&5
23335 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23336 if test "$ac_cv_func_memmove" = yes; then
23337   :
23338 else
23339
23340 echo "$as_me:23340: checking for bcopy" >&5
23341 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23342 if test "${ac_cv_func_bcopy+set}" = set; then
23343   echo $ECHO_N "(cached) $ECHO_C" >&6
23344 else
23345   cat >"conftest.$ac_ext" <<_ACEOF
23346 #line 23346 "configure"
23347 #include "confdefs.h"
23348 #define bcopy autoconf_temporary
23349 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23350 #undef bcopy
23351
23352 #ifdef __cplusplus
23353 extern "C"
23354 #endif
23355
23356 /* We use char because int might match the return type of a gcc2
23357    builtin and then its argument prototype would still apply.  */
23358 char bcopy (void);
23359
23360 int
23361 main (void)
23362 {
23363
23364 /* The GNU C library defines stubs for functions which it implements
23365     to always fail with ENOSYS.  Some functions are actually named
23366     something starting with __ and the normal name is an alias.  */
23367 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23368 #error found stub for bcopy
23369 #endif
23370
23371         return bcopy ();
23372   ;
23373   return 0;
23374 }
23375 _ACEOF
23376 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23377 if { (eval echo "$as_me:23377: \"$ac_link\"") >&5
23378   (eval $ac_link) 2>&5
23379   ac_status=$?
23380   echo "$as_me:23380: \$? = $ac_status" >&5
23381   (exit "$ac_status"); } &&
23382          { ac_try='test -s "conftest$ac_exeext"'
23383   { (eval echo "$as_me:23383: \"$ac_try\"") >&5
23384   (eval $ac_try) 2>&5
23385   ac_status=$?
23386   echo "$as_me:23386: \$? = $ac_status" >&5
23387   (exit "$ac_status"); }; }; then
23388   ac_cv_func_bcopy=yes
23389 else
23390   echo "$as_me: failed program was:" >&5
23391 cat "conftest.$ac_ext" >&5
23392 ac_cv_func_bcopy=no
23393 fi
23394 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23395 fi
23396 echo "$as_me:23396: result: $ac_cv_func_bcopy" >&5
23397 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23398 if test "$ac_cv_func_bcopy" = yes; then
23399
23400         echo "$as_me:23400: checking if bcopy does overlapping moves" >&5
23401 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23402 if test "${cf_cv_good_bcopy+set}" = set; then
23403   echo $ECHO_N "(cached) $ECHO_C" >&6
23404 else
23405
23406                 if test "$cross_compiling" = yes; then
23407   cf_cv_good_bcopy=unknown
23408 else
23409   cat >"conftest.$ac_ext" <<_ACEOF
23410 #line 23410 "configure"
23411 #include "confdefs.h"
23412
23413 $ac_includes_default
23414
23415 int main(void) {
23416         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23417         char temp[40];
23418         bcopy(data, temp, sizeof(data));
23419         bcopy(temp+10, temp, 15);
23420         bcopy(temp+5, temp+15, 10);
23421         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23422 }
23423
23424 _ACEOF
23425 rm -f "conftest$ac_exeext"
23426 if { (eval echo "$as_me:23426: \"$ac_link\"") >&5
23427   (eval $ac_link) 2>&5
23428   ac_status=$?
23429   echo "$as_me:23429: \$? = $ac_status" >&5
23430   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23431   { (eval echo "$as_me:23431: \"$ac_try\"") >&5
23432   (eval $ac_try) 2>&5
23433   ac_status=$?
23434   echo "$as_me:23434: \$? = $ac_status" >&5
23435   (exit "$ac_status"); }; }; then
23436   cf_cv_good_bcopy=yes
23437 else
23438   echo "$as_me: program exited with status $ac_status" >&5
23439 echo "$as_me: failed program was:" >&5
23440 cat "conftest.$ac_ext" >&5
23441 cf_cv_good_bcopy=no
23442 fi
23443 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23444 fi
23445
23446 fi
23447 echo "$as_me:23447: result: $cf_cv_good_bcopy" >&5
23448 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23449
23450 else
23451   cf_cv_good_bcopy=no
23452 fi
23453
23454         if test "$cf_cv_good_bcopy" = yes ; then
23455
23456 cat >>confdefs.h <<\EOF
23457 #define USE_OK_BCOPY 1
23458 EOF
23459
23460         else
23461
23462 cat >>confdefs.h <<\EOF
23463 #define USE_MY_MEMMOVE 1
23464 EOF
23465
23466         fi
23467
23468 fi
23469
23470 tty >/dev/null 2>&1 || {
23471 for ac_func in posix_openpt
23472 do
23473 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23474 echo "$as_me:23474: checking for $ac_func" >&5
23475 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23476 if eval "test \"\${$as_ac_var+set}\" = set"; then
23477   echo $ECHO_N "(cached) $ECHO_C" >&6
23478 else
23479   cat >"conftest.$ac_ext" <<_ACEOF
23480 #line 23480 "configure"
23481 #include "confdefs.h"
23482 #define $ac_func autoconf_temporary
23483 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23484 #undef $ac_func
23485
23486 #ifdef __cplusplus
23487 extern "C"
23488 #endif
23489
23490 /* We use char because int might match the return type of a gcc2
23491    builtin and then its argument prototype would still apply.  */
23492 char $ac_func (void);
23493
23494 int
23495 main (void)
23496 {
23497
23498 /* The GNU C library defines stubs for functions which it implements
23499     to always fail with ENOSYS.  Some functions are actually named
23500     something starting with __ and the normal name is an alias.  */
23501 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23502 #error found stub for $ac_func
23503 #endif
23504
23505         return $ac_func ();
23506   ;
23507   return 0;
23508 }
23509 _ACEOF
23510 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23511 if { (eval echo "$as_me:23511: \"$ac_link\"") >&5
23512   (eval $ac_link) 2>&5
23513   ac_status=$?
23514   echo "$as_me:23514: \$? = $ac_status" >&5
23515   (exit "$ac_status"); } &&
23516          { ac_try='test -s "conftest$ac_exeext"'
23517   { (eval echo "$as_me:23517: \"$ac_try\"") >&5
23518   (eval $ac_try) 2>&5
23519   ac_status=$?
23520   echo "$as_me:23520: \$? = $ac_status" >&5
23521   (exit "$ac_status"); }; }; then
23522   eval "$as_ac_var=yes"
23523 else
23524   echo "$as_me: failed program was:" >&5
23525 cat "conftest.$ac_ext" >&5
23526 eval "$as_ac_var=no"
23527 fi
23528 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23529 fi
23530 echo "$as_me:23530: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23531 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23532 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23533   cat >>confdefs.h <<EOF
23534 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23535 EOF
23536
23537 fi
23538 done
23539  }
23540 echo "$as_me:23540: checking if poll really works" >&5
23541 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23542 if test "${cf_cv_working_poll+set}" = set; then
23543   echo $ECHO_N "(cached) $ECHO_C" >&6
23544 else
23545
23546 if test "$cross_compiling" = yes; then
23547   cf_cv_working_poll=unknown
23548 else
23549   cat >"conftest.$ac_ext" <<_ACEOF
23550 #line 23550 "configure"
23551 #include "confdefs.h"
23552
23553 $ac_includes_default
23554
23555 #include <fcntl.h>
23556
23557 #ifdef HAVE_POLL_H
23558 #include <poll.h>
23559 #else
23560 #include <sys/poll.h>
23561 #endif
23562
23563 int main(void) {
23564         struct pollfd myfds;
23565         int ret;
23566
23567         /* check for Darwin bug with respect to "devices" */
23568         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23569         if (myfds.fd < 0)
23570                 myfds.fd = 0;
23571         myfds.events = POLLIN;
23572         myfds.revents = 0;
23573
23574         ret = poll(&myfds, 1, 100);
23575
23576         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23577                 ret = -1;
23578         } else {
23579                 int fd = 0;
23580                 if (!isatty(fd)) {
23581                         fd = open("/dev/tty", 2);       /* O_RDWR */
23582                 }
23583 #ifdef HAVE_POSIX_OPENPT
23584                 if (fd < 0) {
23585                         fd = posix_openpt(O_RDWR);
23586                 }
23587 #endif
23588
23589                 if (fd >= 0) {
23590                         /* also check with standard input */
23591                         myfds.fd = fd;
23592                         myfds.events = POLLIN;
23593                         myfds.revents = 0;
23594                         ret = poll(&myfds, 1, 100);
23595                 } else {
23596                         ret = -1;
23597                 }
23598         }
23599         ${cf_cv_main_return:-return}(ret < 0);
23600 }
23601 _ACEOF
23602 rm -f "conftest$ac_exeext"
23603 if { (eval echo "$as_me:23603: \"$ac_link\"") >&5
23604   (eval $ac_link) 2>&5
23605   ac_status=$?
23606   echo "$as_me:23606: \$? = $ac_status" >&5
23607   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23608   { (eval echo "$as_me:23608: \"$ac_try\"") >&5
23609   (eval $ac_try) 2>&5
23610   ac_status=$?
23611   echo "$as_me:23611: \$? = $ac_status" >&5
23612   (exit "$ac_status"); }; }; then
23613   cf_cv_working_poll=yes
23614 else
23615   echo "$as_me: program exited with status $ac_status" >&5
23616 echo "$as_me: failed program was:" >&5
23617 cat "conftest.$ac_ext" >&5
23618 cf_cv_working_poll=no
23619 fi
23620 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23621 fi
23622 fi
23623 echo "$as_me:23623: result: $cf_cv_working_poll" >&5
23624 echo "${ECHO_T}$cf_cv_working_poll" >&6
23625 test "$cf_cv_working_poll" = "yes" &&
23626 cat >>confdefs.h <<\EOF
23627 #define HAVE_WORKING_POLL 1
23628 EOF
23629
23630 echo "$as_me:23630: checking if MB_LEN_MAX is usable" >&5
23631 echo $ECHO_N "checking if MB_LEN_MAX is usable... $ECHO_C" >&6
23632 if test "${cf_cv_mb_len_max+set}" = set; then
23633   echo $ECHO_N "(cached) $ECHO_C" >&6
23634 else
23635
23636 cat >"conftest.$ac_ext" <<_ACEOF
23637 #line 23637 "configure"
23638 #include "confdefs.h"
23639
23640 $ac_includes_default
23641 #include <limits.h>
23642 int
23643 main (void)
23644 {
23645
23646 #if defined(MB_LEN_MAX) && MB_LEN_MAX >= 6
23647         ${cf_cv_main_return:-return}(0);
23648 #else
23649 #error MB_LEN_MAX is not usable
23650 #endif
23651
23652   ;
23653   return 0;
23654 }
23655 _ACEOF
23656 rm -f "conftest.$ac_objext"
23657 if { (eval echo "$as_me:23657: \"$ac_compile\"") >&5
23658   (eval $ac_compile) 2>&5
23659   ac_status=$?
23660   echo "$as_me:23660: \$? = $ac_status" >&5
23661   (exit "$ac_status"); } &&
23662          { ac_try='test -s "conftest.$ac_objext"'
23663   { (eval echo "$as_me:23663: \"$ac_try\"") >&5
23664   (eval $ac_try) 2>&5
23665   ac_status=$?
23666   echo "$as_me:23666: \$? = $ac_status" >&5
23667   (exit "$ac_status"); }; }; then
23668   cf_cv_mb_len_max=yes
23669 else
23670   echo "$as_me: failed program was:" >&5
23671 cat "conftest.$ac_ext" >&5
23672 cf_cv_mb_len_max=no
23673 fi
23674 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23675 fi
23676 echo "$as_me:23676: result: $cf_cv_mb_len_max" >&5
23677 echo "${ECHO_T}$cf_cv_mb_len_max" >&6
23678 if test "$cf_cv_mb_len_max" = yes
23679 then
23680
23681 cat >>confdefs.h <<\EOF
23682 #define HAVE_CONSISTENT_MB_LEN_MAX 1
23683 EOF
23684
23685 else
23686         { echo "$as_me:23686: WARNING: MB_LEN_MAX is missing/inconsistent in system headers" >&5
23687 echo "$as_me: WARNING: MB_LEN_MAX is missing/inconsistent in system headers" >&2;}
23688 fi
23689
23690 echo "$as_me:23690: checking for va_copy" >&5
23691 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23692 if test "${cf_cv_have_va_copy+set}" = set; then
23693   echo $ECHO_N "(cached) $ECHO_C" >&6
23694 else
23695
23696 cat >"conftest.$ac_ext" <<_ACEOF
23697 #line 23697 "configure"
23698 #include "confdefs.h"
23699
23700 #include <stdarg.h>
23701
23702 int
23703 main (void)
23704 {
23705
23706         static va_list dst;
23707         static va_list src;
23708         va_copy(dst, src)
23709   ;
23710   return 0;
23711 }
23712 _ACEOF
23713 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23714 if { (eval echo "$as_me:23714: \"$ac_link\"") >&5
23715   (eval $ac_link) 2>&5
23716   ac_status=$?
23717   echo "$as_me:23717: \$? = $ac_status" >&5
23718   (exit "$ac_status"); } &&
23719          { ac_try='test -s "conftest$ac_exeext"'
23720   { (eval echo "$as_me:23720: \"$ac_try\"") >&5
23721   (eval $ac_try) 2>&5
23722   ac_status=$?
23723   echo "$as_me:23723: \$? = $ac_status" >&5
23724   (exit "$ac_status"); }; }; then
23725   cf_cv_have_va_copy=yes
23726 else
23727   echo "$as_me: failed program was:" >&5
23728 cat "conftest.$ac_ext" >&5
23729 cf_cv_have_va_copy=no
23730 fi
23731 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23732 fi
23733 echo "$as_me:23733: result: $cf_cv_have_va_copy" >&5
23734 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23735
23736 if test "$cf_cv_have_va_copy" = yes;
23737 then
23738
23739 cat >>confdefs.h <<\EOF
23740 #define HAVE_VA_COPY 1
23741 EOF
23742
23743 else # !cf_cv_have_va_copy
23744
23745 echo "$as_me:23745: checking for __va_copy" >&5
23746 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23747 if test "${cf_cv_have___va_copy+set}" = set; then
23748   echo $ECHO_N "(cached) $ECHO_C" >&6
23749 else
23750
23751 cat >"conftest.$ac_ext" <<_ACEOF
23752 #line 23752 "configure"
23753 #include "confdefs.h"
23754
23755 #include <stdarg.h>
23756
23757 int
23758 main (void)
23759 {
23760
23761         static va_list dst;
23762         static va_list src;
23763         __va_copy(dst, src)
23764   ;
23765   return 0;
23766 }
23767 _ACEOF
23768 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23769 if { (eval echo "$as_me:23769: \"$ac_link\"") >&5
23770   (eval $ac_link) 2>&5
23771   ac_status=$?
23772   echo "$as_me:23772: \$? = $ac_status" >&5
23773   (exit "$ac_status"); } &&
23774          { ac_try='test -s "conftest$ac_exeext"'
23775   { (eval echo "$as_me:23775: \"$ac_try\"") >&5
23776   (eval $ac_try) 2>&5
23777   ac_status=$?
23778   echo "$as_me:23778: \$? = $ac_status" >&5
23779   (exit "$ac_status"); }; }; then
23780   cf_cv_have___va_copy=yes
23781 else
23782   echo "$as_me: failed program was:" >&5
23783 cat "conftest.$ac_ext" >&5
23784 cf_cv_have___va_copy=no
23785 fi
23786 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23787 fi
23788 echo "$as_me:23788: result: $cf_cv_have___va_copy" >&5
23789 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23790
23791 if test "$cf_cv_have___va_copy" = yes
23792 then
23793
23794 cat >>confdefs.h <<\EOF
23795 #define HAVE___VA_COPY 1
23796 EOF
23797
23798 else # !cf_cv_have___va_copy
23799
23800 echo "$as_me:23800: checking for __builtin_va_copy" >&5
23801 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23802 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23803   echo $ECHO_N "(cached) $ECHO_C" >&6
23804 else
23805
23806 cat >"conftest.$ac_ext" <<_ACEOF
23807 #line 23807 "configure"
23808 #include "confdefs.h"
23809
23810 #include <stdarg.h>
23811
23812 int
23813 main (void)
23814 {
23815
23816         static va_list dst;
23817         static va_list src;
23818         __builtin_va_copy(dst, src)
23819   ;
23820   return 0;
23821 }
23822 _ACEOF
23823 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23824 if { (eval echo "$as_me:23824: \"$ac_link\"") >&5
23825   (eval $ac_link) 2>&5
23826   ac_status=$?
23827   echo "$as_me:23827: \$? = $ac_status" >&5
23828   (exit "$ac_status"); } &&
23829          { ac_try='test -s "conftest$ac_exeext"'
23830   { (eval echo "$as_me:23830: \"$ac_try\"") >&5
23831   (eval $ac_try) 2>&5
23832   ac_status=$?
23833   echo "$as_me:23833: \$? = $ac_status" >&5
23834   (exit "$ac_status"); }; }; then
23835   cf_cv_have___builtin_va_copy=yes
23836 else
23837   echo "$as_me: failed program was:" >&5
23838 cat "conftest.$ac_ext" >&5
23839 cf_cv_have___builtin_va_copy=no
23840 fi
23841 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23842 fi
23843 echo "$as_me:23843: result: $cf_cv_have___builtin_va_copy" >&5
23844 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23845
23846 test "$cf_cv_have___builtin_va_copy" = yes &&
23847
23848 cat >>confdefs.h <<\EOF
23849 #define HAVE___BUILTIN_VA_COPY 1
23850 EOF
23851
23852 fi # cf_cv_have___va_copy
23853
23854 fi # cf_cv_have_va_copy
23855
23856 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23857 (*yes*)
23858         ;;
23859
23860 (*)
23861         echo "$as_me:23861: checking if we can simply copy va_list" >&5
23862 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23863 if test "${cf_cv_pointer_va_list+set}" = set; then
23864   echo $ECHO_N "(cached) $ECHO_C" >&6
23865 else
23866
23867 cat >"conftest.$ac_ext" <<_ACEOF
23868 #line 23868 "configure"
23869 #include "confdefs.h"
23870
23871 #include <stdarg.h>
23872
23873 int
23874 main (void)
23875 {
23876
23877         va_list dst;
23878         va_list src;
23879         dst = src
23880   ;
23881   return 0;
23882 }
23883 _ACEOF
23884 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23885 if { (eval echo "$as_me:23885: \"$ac_link\"") >&5
23886   (eval $ac_link) 2>&5
23887   ac_status=$?
23888   echo "$as_me:23888: \$? = $ac_status" >&5
23889   (exit "$ac_status"); } &&
23890          { ac_try='test -s "conftest$ac_exeext"'
23891   { (eval echo "$as_me:23891: \"$ac_try\"") >&5
23892   (eval $ac_try) 2>&5
23893   ac_status=$?
23894   echo "$as_me:23894: \$? = $ac_status" >&5
23895   (exit "$ac_status"); }; }; then
23896   cf_cv_pointer_va_list=yes
23897 else
23898   echo "$as_me: failed program was:" >&5
23899 cat "conftest.$ac_ext" >&5
23900 cf_cv_pointer_va_list=no
23901 fi
23902 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23903 fi
23904 echo "$as_me:23904: result: $cf_cv_pointer_va_list" >&5
23905 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23906
23907         if test "$cf_cv_pointer_va_list" = no
23908         then
23909                 echo "$as_me:23909: checking if we can copy va_list indirectly" >&5
23910 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23911 if test "${cf_cv_array_va_list+set}" = set; then
23912   echo $ECHO_N "(cached) $ECHO_C" >&6
23913 else
23914
23915 cat >"conftest.$ac_ext" <<_ACEOF
23916 #line 23916 "configure"
23917 #include "confdefs.h"
23918
23919 #include <stdarg.h>
23920
23921 int
23922 main (void)
23923 {
23924
23925         va_list dst;
23926         va_list src;
23927         *dst = *src
23928   ;
23929   return 0;
23930 }
23931 _ACEOF
23932 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23933 if { (eval echo "$as_me:23933: \"$ac_link\"") >&5
23934   (eval $ac_link) 2>&5
23935   ac_status=$?
23936   echo "$as_me:23936: \$? = $ac_status" >&5
23937   (exit "$ac_status"); } &&
23938          { ac_try='test -s "conftest$ac_exeext"'
23939   { (eval echo "$as_me:23939: \"$ac_try\"") >&5
23940   (eval $ac_try) 2>&5
23941   ac_status=$?
23942   echo "$as_me:23942: \$? = $ac_status" >&5
23943   (exit "$ac_status"); }; }; then
23944   cf_cv_array_va_list=yes
23945 else
23946   echo "$as_me: failed program was:" >&5
23947 cat "conftest.$ac_ext" >&5
23948 cf_cv_array_va_list=no
23949 fi
23950 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23951 fi
23952 echo "$as_me:23952: result: $cf_cv_array_va_list" >&5
23953 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23954                 test "$cf_cv_array_va_list" = yes &&
23955 cat >>confdefs.h <<\EOF
23956 #define ARRAY_VA_LIST 1
23957 EOF
23958
23959         fi
23960         ;;
23961 esac
23962
23963 echo "$as_me:23963: checking for pid_t" >&5
23964 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23965 if test "${ac_cv_type_pid_t+set}" = set; then
23966   echo $ECHO_N "(cached) $ECHO_C" >&6
23967 else
23968   cat >"conftest.$ac_ext" <<_ACEOF
23969 #line 23969 "configure"
23970 #include "confdefs.h"
23971 $ac_includes_default
23972 int
23973 main (void)
23974 {
23975 if ((pid_t *) 0)
23976   return 0;
23977 if (sizeof (pid_t))
23978   return 0;
23979   ;
23980   return 0;
23981 }
23982 _ACEOF
23983 rm -f "conftest.$ac_objext"
23984 if { (eval echo "$as_me:23984: \"$ac_compile\"") >&5
23985   (eval $ac_compile) 2>&5
23986   ac_status=$?
23987   echo "$as_me:23987: \$? = $ac_status" >&5
23988   (exit "$ac_status"); } &&
23989          { ac_try='test -s "conftest.$ac_objext"'
23990   { (eval echo "$as_me:23990: \"$ac_try\"") >&5
23991   (eval $ac_try) 2>&5
23992   ac_status=$?
23993   echo "$as_me:23993: \$? = $ac_status" >&5
23994   (exit "$ac_status"); }; }; then
23995   ac_cv_type_pid_t=yes
23996 else
23997   echo "$as_me: failed program was:" >&5
23998 cat "conftest.$ac_ext" >&5
23999 ac_cv_type_pid_t=no
24000 fi
24001 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24002 fi
24003 echo "$as_me:24003: result: $ac_cv_type_pid_t" >&5
24004 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
24005 if test "$ac_cv_type_pid_t" = yes; then
24006   :
24007 else
24008
24009 cat >>confdefs.h <<EOF
24010 #define pid_t int
24011 EOF
24012
24013 fi
24014
24015 for ac_header in unistd.h vfork.h
24016 do
24017 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24018 echo "$as_me:24018: checking for $ac_header" >&5
24019 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24020 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24021   echo $ECHO_N "(cached) $ECHO_C" >&6
24022 else
24023   cat >"conftest.$ac_ext" <<_ACEOF
24024 #line 24024 "configure"
24025 #include "confdefs.h"
24026 #include <$ac_header>
24027 _ACEOF
24028 if { (eval echo "$as_me:24028: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24029   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24030   ac_status=$?
24031   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24032   rm -f conftest.er1
24033   cat conftest.err >&5
24034   echo "$as_me:24034: \$? = $ac_status" >&5
24035   (exit "$ac_status"); } >/dev/null; then
24036   if test -s conftest.err; then
24037     ac_cpp_err=$ac_c_preproc_warn_flag
24038   else
24039     ac_cpp_err=
24040   fi
24041 else
24042   ac_cpp_err=yes
24043 fi
24044 if test -z "$ac_cpp_err"; then
24045   eval "$as_ac_Header=yes"
24046 else
24047   echo "$as_me: failed program was:" >&5
24048   cat "conftest.$ac_ext" >&5
24049   eval "$as_ac_Header=no"
24050 fi
24051 rm -f conftest.err "conftest.$ac_ext"
24052 fi
24053 echo "$as_me:24053: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24054 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24055 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24056   cat >>confdefs.h <<EOF
24057 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24058 EOF
24059
24060 fi
24061 done
24062
24063 for ac_func in fork vfork
24064 do
24065 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24066 echo "$as_me:24066: checking for $ac_func" >&5
24067 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24068 if eval "test \"\${$as_ac_var+set}\" = set"; then
24069   echo $ECHO_N "(cached) $ECHO_C" >&6
24070 else
24071   cat >"conftest.$ac_ext" <<_ACEOF
24072 #line 24072 "configure"
24073 #include "confdefs.h"
24074 #define $ac_func autoconf_temporary
24075 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
24076 #undef $ac_func
24077
24078 #ifdef __cplusplus
24079 extern "C"
24080 #endif
24081
24082 /* We use char because int might match the return type of a gcc2
24083    builtin and then its argument prototype would still apply.  */
24084 char $ac_func (void);
24085
24086 int
24087 main (void)
24088 {
24089
24090 /* The GNU C library defines stubs for functions which it implements
24091     to always fail with ENOSYS.  Some functions are actually named
24092     something starting with __ and the normal name is an alias.  */
24093 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24094 #error found stub for $ac_func
24095 #endif
24096
24097         return $ac_func ();
24098   ;
24099   return 0;
24100 }
24101 _ACEOF
24102 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24103 if { (eval echo "$as_me:24103: \"$ac_link\"") >&5
24104   (eval $ac_link) 2>&5
24105   ac_status=$?
24106   echo "$as_me:24106: \$? = $ac_status" >&5
24107   (exit "$ac_status"); } &&
24108          { ac_try='test -s "conftest$ac_exeext"'
24109   { (eval echo "$as_me:24109: \"$ac_try\"") >&5
24110   (eval $ac_try) 2>&5
24111   ac_status=$?
24112   echo "$as_me:24112: \$? = $ac_status" >&5
24113   (exit "$ac_status"); }; }; then
24114   eval "$as_ac_var=yes"
24115 else
24116   echo "$as_me: failed program was:" >&5
24117 cat "conftest.$ac_ext" >&5
24118 eval "$as_ac_var=no"
24119 fi
24120 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24121 fi
24122 echo "$as_me:24122: result: `eval echo '${'"$as_ac_var"'}'`" >&5
24123 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
24124 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
24125   cat >>confdefs.h <<EOF
24126 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24127 EOF
24128
24129 fi
24130 done
24131
24132 ac_cv_func_fork_works=$ac_cv_func_fork
24133 if test "x$ac_cv_func_fork" = xyes; then
24134   echo "$as_me:24134: checking for working fork" >&5
24135 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
24136 if test "${ac_cv_func_fork_works+set}" = set; then
24137   echo $ECHO_N "(cached) $ECHO_C" >&6
24138 else
24139   if test "$cross_compiling" = yes; then
24140   ac_cv_func_fork_works=cross
24141 else
24142   cat >"conftest.$ac_ext" <<_ACEOF
24143 /* By Rüdiger Kuhlmann. */
24144       #include <sys/types.h>
24145       #if HAVE_UNISTD_H
24146       # include <unistd.h>
24147       #endif
24148       /* Some systems only have a dummy stub for fork() */
24149       int main (void)
24150       {
24151         if (fork() < 0)
24152           $ac_main_return (1);
24153         $ac_main_return (0);
24154       }
24155 _ACEOF
24156 rm -f "conftest$ac_exeext"
24157 if { (eval echo "$as_me:24157: \"$ac_link\"") >&5
24158   (eval $ac_link) 2>&5
24159   ac_status=$?
24160   echo "$as_me:24160: \$? = $ac_status" >&5
24161   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24162   { (eval echo "$as_me:24162: \"$ac_try\"") >&5
24163   (eval $ac_try) 2>&5
24164   ac_status=$?
24165   echo "$as_me:24165: \$? = $ac_status" >&5
24166   (exit "$ac_status"); }; }; then
24167   ac_cv_func_fork_works=yes
24168 else
24169   echo "$as_me: program exited with status $ac_status" >&5
24170 echo "$as_me: failed program was:" >&5
24171 cat "conftest.$ac_ext" >&5
24172 ac_cv_func_fork_works=no
24173 fi
24174 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24175 fi
24176 fi
24177 echo "$as_me:24177: result: $ac_cv_func_fork_works" >&5
24178 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
24179
24180 fi
24181 if test "x$ac_cv_func_fork_works" = xcross; then
24182   case $host in
24183     *-*-amigaos* | *-*-msdosdjgpp*)
24184       # Override, as these systems have only a dummy fork() stub
24185       ac_cv_func_fork_works=no
24186       ;;
24187     *)
24188       ac_cv_func_fork_works=yes
24189       ;;
24190   esac
24191   { echo "$as_me:24191: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
24192 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
24193 fi
24194 ac_cv_func_vfork_works=$ac_cv_func_vfork
24195 if test "x$ac_cv_func_vfork" = xyes; then
24196   echo "$as_me:24196: checking for working vfork" >&5
24197 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
24198 if test "${ac_cv_func_vfork_works+set}" = set; then
24199   echo $ECHO_N "(cached) $ECHO_C" >&6
24200 else
24201   if test "$cross_compiling" = yes; then
24202   ac_cv_func_vfork_works=cross
24203 else
24204   cat >"conftest.$ac_ext" <<_ACEOF
24205 #line 24205 "configure"
24206 #include "confdefs.h"
24207 /* Thanks to Paul Eggert for this test.  */
24208 #include <stdio.h>
24209 #include <sys/types.h>
24210 #include <sys/stat.h>
24211 #if HAVE_UNISTD_H
24212 # include <unistd.h>
24213 #endif
24214 #if HAVE_VFORK_H
24215 # include <vfork.h>
24216 #endif
24217 /* On some sparc systems, changes by the child to local and incoming
24218    argument registers are propagated back to the parent.  The compiler
24219    is told about this with #include <vfork.h>, but some compilers
24220    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
24221    static variable whose address is put into a register that is
24222    clobbered by the vfork.  */
24223 static
24224 sparc_address_test (int arg)
24225 {
24226   static pid_t child;
24227   if (!child) {
24228     child = vfork ();
24229     if (child < 0) {
24230       perror ("vfork");
24231       _exit(2);
24232     }
24233     if (!child) {
24234       arg = getpid();
24235       write(-1, "", 0);
24236       _exit (arg);
24237     }
24238   }
24239 }
24240
24241 int
24242 main (void)
24243 {
24244   pid_t parent = getpid ();
24245   pid_t child;
24246
24247   sparc_address_test ();
24248
24249   child = vfork ();
24250
24251   if (child == 0) {
24252     /* Here is another test for sparc vfork register problems.  This
24253        test uses lots of local variables, at least as many local
24254        variables as main has allocated so far including compiler
24255        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24256        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24257        reuse the register of parent for one of the local variables,
24258        since it will think that parent can't possibly be used any more
24259        in this routine.  Assigning to the local variable will thus
24260        munge parent in the parent process.  */
24261     pid_t
24262       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24263       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24264     /* Convince the compiler that p..p7 are live; otherwise, it might
24265        use the same hardware register for all 8 local variables.  */
24266     if (p != p1 || p != p2 || p != p3 || p != p4
24267         || p != p5 || p != p6 || p != p7)
24268       _exit(1);
24269
24270     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24271        from child file descriptors.  If the child closes a descriptor
24272        before it execs or exits, this munges the parent's descriptor
24273        as well.  Test for this by closing stdout in the child.  */
24274     _exit(close(fileno(stdout)) != 0);
24275   } else {
24276     int status;
24277     struct stat st;
24278
24279     while (wait(&status) != child)
24280       ;
24281     $ac_main_return(
24282          /* Was there some problem with vforking?  */
24283          child < 0
24284
24285          /* Did the child fail?  (This shouldn't happen.)  */
24286          || status
24287
24288          /* Did the vfork/compiler bug occur?  */
24289          || parent != getpid()
24290
24291          /* Did the file descriptor bug occur?  */
24292          || fstat(fileno(stdout), &st) != 0
24293          );
24294   }
24295 }
24296 _ACEOF
24297 rm -f "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"); } && { ac_try='"./conftest$ac_exeext"'
24303   { (eval echo "$as_me:24303: \"$ac_try\"") >&5
24304   (eval $ac_try) 2>&5
24305   ac_status=$?
24306   echo "$as_me:24306: \$? = $ac_status" >&5
24307   (exit "$ac_status"); }; }; then
24308   ac_cv_func_vfork_works=yes
24309 else
24310   echo "$as_me: program exited with status $ac_status" >&5
24311 echo "$as_me: failed program was:" >&5
24312 cat "conftest.$ac_ext" >&5
24313 ac_cv_func_vfork_works=no
24314 fi
24315 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24316 fi
24317 fi
24318 echo "$as_me:24318: result: $ac_cv_func_vfork_works" >&5
24319 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24320
24321 fi;
24322 if test "x$ac_cv_func_fork_works" = xcross; then
24323   ac_cv_func_vfork_works=ac_cv_func_vfork
24324   { echo "$as_me:24324: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24325 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24326 fi
24327
24328 if test "x$ac_cv_func_vfork_works" = xyes; then
24329
24330 cat >>confdefs.h <<\EOF
24331 #define HAVE_WORKING_VFORK 1
24332 EOF
24333
24334 else
24335
24336 cat >>confdefs.h <<\EOF
24337 #define vfork fork
24338 EOF
24339
24340 fi
24341 if test "x$ac_cv_func_fork_works" = xyes; then
24342
24343 cat >>confdefs.h <<\EOF
24344 #define HAVE_WORKING_FORK 1
24345 EOF
24346
24347 fi
24348
24349 echo "$as_me:24349: checking if fopen accepts explicit binary mode" >&5
24350 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24351 if test "${cf_cv_fopen_bin_r+set}" = set; then
24352   echo $ECHO_N "(cached) $ECHO_C" >&6
24353 else
24354
24355         if test "$cross_compiling" = yes; then
24356   cf_cv_fopen_bin_r=unknown
24357 else
24358   cat >"conftest.$ac_ext" <<_ACEOF
24359 #line 24359 "configure"
24360 #include "confdefs.h"
24361
24362 $ac_includes_default
24363
24364 int main(void)
24365 {
24366         FILE *fp = fopen("conftest.tmp", "wb");
24367         int rc = 0;
24368         if (fp != 0) {
24369                 int p, q;
24370                 for (p = 0; p < 256; ++p) {
24371                         fputc(p, fp);
24372                 }
24373                 fclose(fp);
24374                 fp = fopen("conftest.tmp", "rb");
24375                 if (fp != 0) {
24376                         for (p = 0; p < 256; ++p) {
24377                                 q = fgetc(fp);
24378                                 if (q != p) {
24379                                         rc = 1;
24380                                         break;
24381                                 }
24382                         }
24383                 } else {
24384                         rc = 1;
24385                 }
24386         } else {
24387                 rc = 1;
24388         }
24389         ${cf_cv_main_return:-return} (rc);
24390 }
24391
24392 _ACEOF
24393 rm -f "conftest$ac_exeext"
24394 if { (eval echo "$as_me:24394: \"$ac_link\"") >&5
24395   (eval $ac_link) 2>&5
24396   ac_status=$?
24397   echo "$as_me:24397: \$? = $ac_status" >&5
24398   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24399   { (eval echo "$as_me:24399: \"$ac_try\"") >&5
24400   (eval $ac_try) 2>&5
24401   ac_status=$?
24402   echo "$as_me:24402: \$? = $ac_status" >&5
24403   (exit "$ac_status"); }; }; then
24404   cf_cv_fopen_bin_r=yes
24405 else
24406   echo "$as_me: program exited with status $ac_status" >&5
24407 echo "$as_me: failed program was:" >&5
24408 cat "conftest.$ac_ext" >&5
24409 cf_cv_fopen_bin_r=no
24410 fi
24411 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24412 fi
24413
24414 fi
24415 echo "$as_me:24415: result: $cf_cv_fopen_bin_r" >&5
24416 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24417 test "x$cf_cv_fopen_bin_r" != xno &&
24418 cat >>confdefs.h <<\EOF
24419 #define USE_FOPEN_BIN_R 1
24420 EOF
24421
24422 # special check for test/ditto.c
24423
24424 echo "$as_me:24424: checking for openpty in -lutil" >&5
24425 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24426 if test "${ac_cv_lib_util_openpty+set}" = set; then
24427   echo $ECHO_N "(cached) $ECHO_C" >&6
24428 else
24429   ac_check_lib_save_LIBS=$LIBS
24430 LIBS="-lutil  $LIBS"
24431 cat >"conftest.$ac_ext" <<_ACEOF
24432 #line 24432 "configure"
24433 #include "confdefs.h"
24434
24435 /* Override any gcc2 internal prototype to avoid an error.  */
24436 #ifdef __cplusplus
24437 extern "C"
24438 #endif
24439 /* We use char because int might match the return type of a gcc2
24440    builtin and then its argument prototype would still apply.  */
24441 char openpty (void);
24442 int
24443 main (void)
24444 {
24445 openpty ();
24446   ;
24447   return 0;
24448 }
24449 _ACEOF
24450 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24451 if { (eval echo "$as_me:24451: \"$ac_link\"") >&5
24452   (eval $ac_link) 2>&5
24453   ac_status=$?
24454   echo "$as_me:24454: \$? = $ac_status" >&5
24455   (exit "$ac_status"); } &&
24456          { ac_try='test -s "conftest$ac_exeext"'
24457   { (eval echo "$as_me:24457: \"$ac_try\"") >&5
24458   (eval $ac_try) 2>&5
24459   ac_status=$?
24460   echo "$as_me:24460: \$? = $ac_status" >&5
24461   (exit "$ac_status"); }; }; then
24462   ac_cv_lib_util_openpty=yes
24463 else
24464   echo "$as_me: failed program was:" >&5
24465 cat "conftest.$ac_ext" >&5
24466 ac_cv_lib_util_openpty=no
24467 fi
24468 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24469 LIBS=$ac_check_lib_save_LIBS
24470 fi
24471 echo "$as_me:24471: result: $ac_cv_lib_util_openpty" >&5
24472 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24473 if test "$ac_cv_lib_util_openpty" = yes; then
24474   cf_cv_lib_util=yes
24475 else
24476   cf_cv_lib_util=no
24477 fi
24478
24479 echo "$as_me:24479: checking for openpty header" >&5
24480 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24481 if test "${cf_cv_func_openpty+set}" = set; then
24482   echo $ECHO_N "(cached) $ECHO_C" >&6
24483 else
24484
24485         cf_save_LIBS="$LIBS"
24486         test "$cf_cv_lib_util" = yes && {
24487 cf_add_libs="$LIBS"
24488 # reverse order
24489 cf_add_0lib=
24490 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24491 # filter duplicates
24492 for cf_add_1lib in $cf_add_0lib; do
24493         for cf_add_2lib in $cf_add_libs; do
24494                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24495                         cf_add_1lib=
24496                         break
24497                 fi
24498         done
24499         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24500 done
24501 LIBS="$cf_add_libs"
24502  }
24503         for cf_header in pty.h libutil.h util.h
24504         do
24505         cat >"conftest.$ac_ext" <<_ACEOF
24506 #line 24506 "configure"
24507 #include "confdefs.h"
24508
24509 #include <$cf_header>
24510
24511 int
24512 main (void)
24513 {
24514
24515         int x = openpty((int *)0, (int *)0, (char *)0,
24516                                    (struct termios *)0, (struct winsize *)0);
24517         (void)x;
24518
24519   ;
24520   return 0;
24521 }
24522 _ACEOF
24523 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24524 if { (eval echo "$as_me:24524: \"$ac_link\"") >&5
24525   (eval $ac_link) 2>&5
24526   ac_status=$?
24527   echo "$as_me:24527: \$? = $ac_status" >&5
24528   (exit "$ac_status"); } &&
24529          { ac_try='test -s "conftest$ac_exeext"'
24530   { (eval echo "$as_me:24530: \"$ac_try\"") >&5
24531   (eval $ac_try) 2>&5
24532   ac_status=$?
24533   echo "$as_me:24533: \$? = $ac_status" >&5
24534   (exit "$ac_status"); }; }; then
24535
24536                 cf_cv_func_openpty=$cf_header
24537                 break
24538
24539 else
24540   echo "$as_me: failed program was:" >&5
24541 cat "conftest.$ac_ext" >&5
24542
24543                 cf_cv_func_openpty=no
24544
24545 fi
24546 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24547         done
24548         LIBS="$cf_save_LIBS"
24549
24550 fi
24551 echo "$as_me:24551: result: $cf_cv_func_openpty" >&5
24552 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24553
24554 if test "$cf_cv_func_openpty" != no ; then
24555
24556 cat >>confdefs.h <<EOF
24557 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24558 EOF
24559
24560 cat >>confdefs.h <<\EOF
24561 #define USE_XTERM_PTY 1
24562 EOF
24563
24564         if test "x$cf_cv_lib_util" = xyes ; then
24565
24566 cf_add_libs="$TEST_LIBS"
24567 # reverse order
24568 cf_add_0lib=
24569 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24570 # filter duplicates
24571 for cf_add_1lib in $cf_add_0lib; do
24572         for cf_add_2lib in $cf_add_libs; do
24573                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24574                         cf_add_1lib=
24575                         break
24576                 fi
24577         done
24578         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24579 done
24580 TEST_LIBS="$cf_add_libs"
24581
24582         fi
24583 fi
24584
24585 if test "$with_hashed_db" != no ; then
24586
24587 cat >>confdefs.h <<\EOF
24588 #define USE_HASHED_DB 1
24589 EOF
24590
24591 case $with_hashed_db in
24592 (yes|*able*)
24593         ;;
24594 (*)
24595         if test -d "$with_hashed_db" ; then
24596
24597 if test -n "$with_hashed_db/include" ; then
24598   for cf_add_incdir in $with_hashed_db/include
24599   do
24600         while test "$cf_add_incdir" != /usr/include
24601         do
24602           if test -d "$cf_add_incdir"
24603           then
24604                 cf_have_incdir=no
24605                 if test -n "$CFLAGS$CPPFLAGS" ; then
24606                   # a loop is needed to ensure we can add subdirs of existing dirs
24607                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24608                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24609                           cf_have_incdir=yes; break
24610                         fi
24611                   done
24612                 fi
24613
24614                 if test "$cf_have_incdir" = no ; then
24615                   if test "$cf_add_incdir" = /usr/local/include ; then
24616                         if test "$GCC" = yes
24617                         then
24618                           cf_save_CPPFLAGS=$CPPFLAGS
24619
24620         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24621         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24622
24623                           cat >"conftest.$ac_ext" <<_ACEOF
24624 #line 24624 "configure"
24625 #include "confdefs.h"
24626 #include <stdio.h>
24627 int
24628 main (void)
24629 {
24630 printf("Hello")
24631   ;
24632   return 0;
24633 }
24634 _ACEOF
24635 rm -f "conftest.$ac_objext"
24636 if { (eval echo "$as_me:24636: \"$ac_compile\"") >&5
24637   (eval $ac_compile) 2>&5
24638   ac_status=$?
24639   echo "$as_me:24639: \$? = $ac_status" >&5
24640   (exit "$ac_status"); } &&
24641          { ac_try='test -s "conftest.$ac_objext"'
24642   { (eval echo "$as_me:24642: \"$ac_try\"") >&5
24643   (eval $ac_try) 2>&5
24644   ac_status=$?
24645   echo "$as_me:24645: \$? = $ac_status" >&5
24646   (exit "$ac_status"); }; }; then
24647   :
24648 else
24649   echo "$as_me: failed program was:" >&5
24650 cat "conftest.$ac_ext" >&5
24651 cf_have_incdir=yes
24652 fi
24653 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24654                           CPPFLAGS=$cf_save_CPPFLAGS
24655                         fi
24656                   fi
24657                 fi
24658
24659                 if test "$cf_have_incdir" = no ; then
24660                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24661
24662 echo "${as_me:-configure}:24662: testing adding $cf_add_incdir to include-path ..." 1>&5
24663
24664                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24665
24666                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24667                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24668                   cf_add_incdir="$cf_top_incdir"
24669                 else
24670                   break
24671                 fi
24672           else
24673                 break
24674           fi
24675         done
24676   done
24677 fi
24678
24679 if test -n "$with_hashed_db/lib" ; then
24680         for cf_add_libdir in $with_hashed_db/lib
24681         do
24682                 if test "$cf_add_libdir" = /usr/lib ; then
24683                         :
24684                 elif test -d "$cf_add_libdir"
24685                 then
24686                         cf_have_libdir=no
24687                         if test -n "$LDFLAGS$LIBS" ; then
24688                                 # a loop is needed to ensure we can add subdirs of existing dirs
24689                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24690                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24691                                                 cf_have_libdir=yes; break
24692                                         fi
24693                                 done
24694                         fi
24695                         if test "$cf_have_libdir" = no ; then
24696                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24697
24698 echo "${as_me:-configure}:24698: testing adding $cf_add_libdir to library-path ..." 1>&5
24699
24700                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24701                         fi
24702                 fi
24703         done
24704 fi
24705
24706         else
24707                 case "$with_hashed_db" in
24708                 (./*|../*|/*)
24709                         { echo "$as_me:24709: WARNING: no such directory $with_hashed_db" >&5
24710 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24711                         ;;
24712                 (*)
24713
24714 cf_search=
24715
24716 test "x$prefix" != "xNONE" && \
24717 test -d "$prefix" && \
24718  {
24719         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24720         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24721         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24722         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24723         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24724         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24725 }
24726
24727 for cf_subdir_prefix in \
24728         /usr \
24729         /usr/local \
24730         /usr/pkg \
24731         /opt \
24732         /opt/local \
24733         $HOME
24734 do
24735
24736 test "x$cf_subdir_prefix" != "x$prefix" && \
24737 test -d "$cf_subdir_prefix" && \
24738 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24739         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24740         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24741         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24742         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24743         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24744         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"
24745 }
24746
24747 done
24748
24749         for cf_item in $cf_search
24750         do
24751                 case "$cf_item" in
24752                 (*/$with_hashed_db)
24753
24754 if test -n "$cf_item" ; then
24755   for cf_add_incdir in $cf_item
24756   do
24757         while test "$cf_add_incdir" != /usr/include
24758         do
24759           if test -d "$cf_add_incdir"
24760           then
24761                 cf_have_incdir=no
24762                 if test -n "$CFLAGS$CPPFLAGS" ; then
24763                   # a loop is needed to ensure we can add subdirs of existing dirs
24764                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24765                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24766                           cf_have_incdir=yes; break
24767                         fi
24768                   done
24769                 fi
24770
24771                 if test "$cf_have_incdir" = no ; then
24772                   if test "$cf_add_incdir" = /usr/local/include ; then
24773                         if test "$GCC" = yes
24774                         then
24775                           cf_save_CPPFLAGS=$CPPFLAGS
24776
24777         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24778         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24779
24780                           cat >"conftest.$ac_ext" <<_ACEOF
24781 #line 24781 "configure"
24782 #include "confdefs.h"
24783 #include <stdio.h>
24784 int
24785 main (void)
24786 {
24787 printf("Hello")
24788   ;
24789   return 0;
24790 }
24791 _ACEOF
24792 rm -f "conftest.$ac_objext"
24793 if { (eval echo "$as_me:24793: \"$ac_compile\"") >&5
24794   (eval $ac_compile) 2>&5
24795   ac_status=$?
24796   echo "$as_me:24796: \$? = $ac_status" >&5
24797   (exit "$ac_status"); } &&
24798          { ac_try='test -s "conftest.$ac_objext"'
24799   { (eval echo "$as_me:24799: \"$ac_try\"") >&5
24800   (eval $ac_try) 2>&5
24801   ac_status=$?
24802   echo "$as_me:24802: \$? = $ac_status" >&5
24803   (exit "$ac_status"); }; }; then
24804   :
24805 else
24806   echo "$as_me: failed program was:" >&5
24807 cat "conftest.$ac_ext" >&5
24808 cf_have_incdir=yes
24809 fi
24810 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24811                           CPPFLAGS=$cf_save_CPPFLAGS
24812                         fi
24813                   fi
24814                 fi
24815
24816                 if test "$cf_have_incdir" = no ; then
24817                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24818
24819 echo "${as_me:-configure}:24819: testing adding $cf_add_incdir to include-path ..." 1>&5
24820
24821                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24822
24823                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24824                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24825                   cf_add_incdir="$cf_top_incdir"
24826                 else
24827                   break
24828                 fi
24829           else
24830                 break
24831           fi
24832         done
24833   done
24834 fi
24835
24836                         ;;
24837                 esac
24838         done
24839
24840 cf_search=
24841
24842 test "x$prefix" != "xNONE" && \
24843 test -d "$prefix" && \
24844  {
24845         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24846         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24847         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24848         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24849         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24850         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24851 }
24852
24853 for cf_subdir_prefix in \
24854         /usr \
24855         /usr/local \
24856         /usr/pkg \
24857         /opt \
24858         /opt/local \
24859         $HOME
24860 do
24861
24862 test "x$cf_subdir_prefix" != "x$prefix" && \
24863 test -d "$cf_subdir_prefix" && \
24864 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24865         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24866         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24867         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24868         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24869         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24870         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"
24871 }
24872
24873 done
24874
24875         for cf_item in $cf_search
24876         do
24877                 case "$cf_item" in
24878                 (*/$with_hashed_db)
24879
24880 if test -n "$cf_item" ; then
24881         for cf_add_libdir in $cf_item
24882         do
24883                 if test "$cf_add_libdir" = /usr/lib ; then
24884                         :
24885                 elif test -d "$cf_add_libdir"
24886                 then
24887                         cf_have_libdir=no
24888                         if test -n "$LDFLAGS$LIBS" ; then
24889                                 # a loop is needed to ensure we can add subdirs of existing dirs
24890                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24891                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24892                                                 cf_have_libdir=yes; break
24893                                         fi
24894                                 done
24895                         fi
24896                         if test "$cf_have_libdir" = no ; then
24897                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24898
24899 echo "${as_me:-configure}:24899: testing adding $cf_add_libdir to library-path ..." 1>&5
24900
24901                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24902                         fi
24903                 fi
24904         done
24905 fi
24906
24907                         ;;
24908                 esac
24909         done
24910
24911                         ;;
24912                 esac
24913         fi
24914 esac
24915
24916 echo "$as_me:24916: checking for db.h" >&5
24917 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24918 if test "${ac_cv_header_db_h+set}" = set; then
24919   echo $ECHO_N "(cached) $ECHO_C" >&6
24920 else
24921   cat >"conftest.$ac_ext" <<_ACEOF
24922 #line 24922 "configure"
24923 #include "confdefs.h"
24924 #include <db.h>
24925 _ACEOF
24926 if { (eval echo "$as_me:24926: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24927   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24928   ac_status=$?
24929   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24930   rm -f conftest.er1
24931   cat conftest.err >&5
24932   echo "$as_me:24932: \$? = $ac_status" >&5
24933   (exit "$ac_status"); } >/dev/null; then
24934   if test -s conftest.err; then
24935     ac_cpp_err=$ac_c_preproc_warn_flag
24936   else
24937     ac_cpp_err=
24938   fi
24939 else
24940   ac_cpp_err=yes
24941 fi
24942 if test -z "$ac_cpp_err"; then
24943   ac_cv_header_db_h=yes
24944 else
24945   echo "$as_me: failed program was:" >&5
24946   cat "conftest.$ac_ext" >&5
24947   ac_cv_header_db_h=no
24948 fi
24949 rm -f conftest.err "conftest.$ac_ext"
24950 fi
24951 echo "$as_me:24951: result: $ac_cv_header_db_h" >&5
24952 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24953 if test "$ac_cv_header_db_h" = yes; then
24954
24955 echo "$as_me:24955: checking for version of db" >&5
24956 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24957 if test "${cf_cv_hashed_db_version+set}" = set; then
24958   echo $ECHO_N "(cached) $ECHO_C" >&6
24959 else
24960
24961 cf_cv_hashed_db_version=unknown
24962
24963 for cf_db_version in 1 2 3 4 5 6
24964 do
24965
24966 echo "${as_me:-configure}:24966: testing checking for db version $cf_db_version ..." 1>&5
24967
24968         cat >"conftest.$ac_ext" <<_ACEOF
24969 #line 24969 "configure"
24970 #include "confdefs.h"
24971
24972 $ac_includes_default
24973 #include <db.h>
24974
24975 #ifdef DB_VERSION_MAJOR
24976         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24977 #if $cf_db_version == DB_VERSION_MAJOR
24978         /* ok */
24979 #else
24980         #error $cf_db_version is not DB_VERSION_MAJOR
24981 #endif
24982 #else
24983 #if $cf_db_version == 1
24984         /* ok: assuming this is DB 1.8.5 */
24985 #else
24986         #error $cf_db_version is not 1
24987 #endif
24988 #endif
24989
24990 int
24991 main (void)
24992 {
24993 DBT *foo = 0
24994   ;
24995   return 0;
24996 }
24997 _ACEOF
24998 rm -f "conftest.$ac_objext"
24999 if { (eval echo "$as_me:24999: \"$ac_compile\"") >&5
25000   (eval $ac_compile) 2>&5
25001   ac_status=$?
25002   echo "$as_me:25002: \$? = $ac_status" >&5
25003   (exit "$ac_status"); } &&
25004          { ac_try='test -s "conftest.$ac_objext"'
25005   { (eval echo "$as_me:25005: \"$ac_try\"") >&5
25006   (eval $ac_try) 2>&5
25007   ac_status=$?
25008   echo "$as_me:25008: \$? = $ac_status" >&5
25009   (exit "$ac_status"); }; }; then
25010
25011         cf_cv_hashed_db_version=$cf_db_version
25012         break
25013
25014 else
25015   echo "$as_me: failed program was:" >&5
25016 cat "conftest.$ac_ext" >&5
25017 fi
25018 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25019 done
25020
25021 fi
25022 echo "$as_me:25022: result: $cf_cv_hashed_db_version" >&5
25023 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
25024
25025 if test "$cf_cv_hashed_db_version" = unknown ; then
25026         { { echo "$as_me:25026: error: Cannot determine version of db" >&5
25027 echo "$as_me: error: Cannot determine version of db" >&2;}
25028    { (exit 1); exit 1; }; }
25029 else
25030
25031 echo "$as_me:25031: checking for db libraries" >&5
25032 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
25033 if test "${cf_cv_hashed_db_libs+set}" = set; then
25034   echo $ECHO_N "(cached) $ECHO_C" >&6
25035 else
25036
25037 cf_cv_hashed_db_libs=unknown
25038 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
25039 do
25040         cf_save_libs="$LIBS"
25041         if test -n "$cf_db_libs"; then
25042
25043 cf_add_libs="$LIBS"
25044 # reverse order
25045 cf_add_0lib=
25046 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25047 # filter duplicates
25048 for cf_add_1lib in $cf_add_0lib; do
25049         for cf_add_2lib in $cf_add_libs; do
25050                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25051                         cf_add_1lib=
25052                         break
25053                 fi
25054         done
25055         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25056 done
25057 LIBS="$cf_add_libs"
25058
25059         fi
25060
25061 echo "${as_me:-configure}:25061: testing checking for library $cf_db_libs ..." 1>&5
25062
25063         cat >"conftest.$ac_ext" <<_ACEOF
25064 #line 25064 "configure"
25065 #include "confdefs.h"
25066
25067 $ac_includes_default
25068 #include <db.h>
25069
25070 int
25071 main (void)
25072 {
25073
25074         char *path = "/tmp/foo";
25075 #ifdef DB_VERSION_MAJOR
25076 #if DB_VERSION_MAJOR >= 4
25077         DB *result = 0;
25078         db_create(&result, NULL, 0);
25079         result->open(result,
25080                 NULL,
25081                 path,
25082                 path,
25083                 DB_HASH,
25084                 DB_CREATE,
25085                 0644);
25086 #elif DB_VERSION_MAJOR >= 3
25087         DB *result = 0;
25088         db_create(&result, NULL, 0);
25089         result->open(result,
25090                 path,
25091                 path,
25092                 DB_HASH,
25093                 DB_CREATE,
25094                 0644);
25095 #elif DB_VERSION_MAJOR >= 2
25096         DB *result = 0;
25097         db_open(path,
25098                 DB_HASH,
25099                 DB_CREATE,
25100                 0644,
25101                 (DB_ENV *) 0,
25102                 (DB_INFO *) 0,
25103                 &result);
25104 #endif /* DB_VERSION_MAJOR */
25105 #else
25106         DB *result = dbopen(path,
25107                      2,
25108                      0644,
25109                      DB_HASH,
25110                      0);
25111 #endif
25112         ${cf_cv_main_return:-return}(result != 0)
25113
25114   ;
25115   return 0;
25116 }
25117 _ACEOF
25118 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25119 if { (eval echo "$as_me:25119: \"$ac_link\"") >&5
25120   (eval $ac_link) 2>&5
25121   ac_status=$?
25122   echo "$as_me:25122: \$? = $ac_status" >&5
25123   (exit "$ac_status"); } &&
25124          { ac_try='test -s "conftest$ac_exeext"'
25125   { (eval echo "$as_me:25125: \"$ac_try\"") >&5
25126   (eval $ac_try) 2>&5
25127   ac_status=$?
25128   echo "$as_me:25128: \$? = $ac_status" >&5
25129   (exit "$ac_status"); }; }; then
25130
25131         if test -n "$cf_db_libs" ; then
25132                 cf_cv_hashed_db_libs=$cf_db_libs
25133         else
25134                 cf_cv_hashed_db_libs=default
25135         fi
25136         LIBS="$cf_save_libs"
25137         break
25138
25139 else
25140   echo "$as_me: failed program was:" >&5
25141 cat "conftest.$ac_ext" >&5
25142 fi
25143 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25144         LIBS="$cf_save_libs"
25145 done
25146
25147 fi
25148 echo "$as_me:25148: result: $cf_cv_hashed_db_libs" >&5
25149 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
25150
25151         if test "$cf_cv_hashed_db_libs" = unknown ; then
25152                 { { echo "$as_me:25152: error: Cannot determine library for db" >&5
25153 echo "$as_me: error: Cannot determine library for db" >&2;}
25154    { (exit 1); exit 1; }; }
25155         elif test "$cf_cv_hashed_db_libs" != default ; then
25156
25157 cf_add_libs="$LIBS"
25158 # reverse order
25159 cf_add_0lib=
25160 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25161 # filter duplicates
25162 for cf_add_1lib in $cf_add_0lib; do
25163         for cf_add_2lib in $cf_add_libs; do
25164                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25165                         cf_add_1lib=
25166                         break
25167                 fi
25168         done
25169         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25170 done
25171 LIBS="$cf_add_libs"
25172
25173         fi
25174 fi
25175
25176 else
25177
25178         { { echo "$as_me:25178: error: Cannot find db.h" >&5
25179 echo "$as_me: error: Cannot find db.h" >&2;}
25180    { (exit 1); exit 1; }; }
25181
25182 fi
25183
25184 fi
25185
25186 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
25187         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25188         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25189 fi
25190
25191 # Just in case, check if the C compiler has a bool type.
25192
25193 echo "$as_me:25193: checking if we should include stdbool.h" >&5
25194 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25195
25196 if test "${cf_cv_header_stdbool_h+set}" = set; then
25197   echo $ECHO_N "(cached) $ECHO_C" >&6
25198 else
25199
25200         cat >"conftest.$ac_ext" <<_ACEOF
25201 #line 25201 "configure"
25202 #include "confdefs.h"
25203
25204 int
25205 main (void)
25206 {
25207 bool foo = false; (void)foo
25208   ;
25209   return 0;
25210 }
25211 _ACEOF
25212 rm -f "conftest.$ac_objext"
25213 if { (eval echo "$as_me:25213: \"$ac_compile\"") >&5
25214   (eval $ac_compile) 2>&5
25215   ac_status=$?
25216   echo "$as_me:25216: \$? = $ac_status" >&5
25217   (exit "$ac_status"); } &&
25218          { ac_try='test -s "conftest.$ac_objext"'
25219   { (eval echo "$as_me:25219: \"$ac_try\"") >&5
25220   (eval $ac_try) 2>&5
25221   ac_status=$?
25222   echo "$as_me:25222: \$? = $ac_status" >&5
25223   (exit "$ac_status"); }; }; then
25224   cf_cv_header_stdbool_h=0
25225 else
25226   echo "$as_me: failed program was:" >&5
25227 cat "conftest.$ac_ext" >&5
25228 cat >"conftest.$ac_ext" <<_ACEOF
25229 #line 25229 "configure"
25230 #include "confdefs.h"
25231
25232 #ifndef __BEOS__
25233 #include <stdbool.h>
25234 #endif
25235
25236 int
25237 main (void)
25238 {
25239 bool foo = false; (void)foo
25240   ;
25241   return 0;
25242 }
25243 _ACEOF
25244 rm -f "conftest.$ac_objext"
25245 if { (eval echo "$as_me:25245: \"$ac_compile\"") >&5
25246   (eval $ac_compile) 2>&5
25247   ac_status=$?
25248   echo "$as_me:25248: \$? = $ac_status" >&5
25249   (exit "$ac_status"); } &&
25250          { ac_try='test -s "conftest.$ac_objext"'
25251   { (eval echo "$as_me:25251: \"$ac_try\"") >&5
25252   (eval $ac_try) 2>&5
25253   ac_status=$?
25254   echo "$as_me:25254: \$? = $ac_status" >&5
25255   (exit "$ac_status"); }; }; then
25256   cf_cv_header_stdbool_h=1
25257 else
25258   echo "$as_me: failed program was:" >&5
25259 cat "conftest.$ac_ext" >&5
25260 cf_cv_header_stdbool_h=0
25261 fi
25262 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25263 fi
25264 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25265 fi
25266
25267 if test "$cf_cv_header_stdbool_h" = 1
25268 then    echo "$as_me:25268: result: yes" >&5
25269 echo "${ECHO_T}yes" >&6
25270 else    echo "$as_me:25270: result: no" >&5
25271 echo "${ECHO_T}no" >&6
25272 fi
25273
25274 echo "$as_me:25274: checking for builtin bool type" >&5
25275 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25276
25277 if test "${cf_cv_cc_bool_type+set}" = set; then
25278   echo $ECHO_N "(cached) $ECHO_C" >&6
25279 else
25280
25281         cat >"conftest.$ac_ext" <<_ACEOF
25282 #line 25282 "configure"
25283 #include "confdefs.h"
25284
25285 #include <stdio.h>
25286 #include <sys/types.h>
25287
25288 int
25289 main (void)
25290 {
25291 bool x = false; (void)x
25292   ;
25293   return 0;
25294 }
25295 _ACEOF
25296 rm -f "conftest.$ac_objext"
25297 if { (eval echo "$as_me:25297: \"$ac_compile\"") >&5
25298   (eval $ac_compile) 2>&5
25299   ac_status=$?
25300   echo "$as_me:25300: \$? = $ac_status" >&5
25301   (exit "$ac_status"); } &&
25302          { ac_try='test -s "conftest.$ac_objext"'
25303   { (eval echo "$as_me:25303: \"$ac_try\"") >&5
25304   (eval $ac_try) 2>&5
25305   ac_status=$?
25306   echo "$as_me:25306: \$? = $ac_status" >&5
25307   (exit "$ac_status"); }; }; then
25308   cf_cv_cc_bool_type=1
25309 else
25310   echo "$as_me: failed program was:" >&5
25311 cat "conftest.$ac_ext" >&5
25312 cf_cv_cc_bool_type=0
25313 fi
25314 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25315
25316 fi
25317
25318 if test "$cf_cv_cc_bool_type" = 1
25319 then    echo "$as_me:25319: result: yes" >&5
25320 echo "${ECHO_T}yes" >&6
25321 else    echo "$as_me:25321: result: no" >&5
25322 echo "${ECHO_T}no" >&6
25323 fi
25324
25325 # Check for C++ compiler characteristics (and ensure that it's there!)
25326 if test -n "$CXX" ; then
25327         ac_ext=cc
25328 ac_cpp='$CXXCPP $CPPFLAGS'
25329 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25330 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25331 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25332 ac_main_return="return"
25333
25334 if test -n "$GXX" ; then
25335
25336         cf_save="$LIBS"
25337         LIBS="$LIBS $CXXLIBS"
25338         echo "$as_me:25338: checking if we already have C++ library" >&5
25339 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25340         cat >"conftest.$ac_ext" <<_ACEOF
25341 #line 25341 "configure"
25342 #include "confdefs.h"
25343
25344                         #include <iostream>
25345 int
25346 main (void)
25347 {
25348
25349                         std::cout << "Hello World!" << std::endl;
25350   ;
25351   return 0;
25352 }
25353 _ACEOF
25354 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25355 if { (eval echo "$as_me:25355: \"$ac_link\"") >&5
25356   (eval $ac_link) 2>&5
25357   ac_status=$?
25358   echo "$as_me:25358: \$? = $ac_status" >&5
25359   (exit "$ac_status"); } &&
25360          { ac_try='test -s "conftest$ac_exeext"'
25361   { (eval echo "$as_me:25361: \"$ac_try\"") >&5
25362   (eval $ac_try) 2>&5
25363   ac_status=$?
25364   echo "$as_me:25364: \$? = $ac_status" >&5
25365   (exit "$ac_status"); }; }; then
25366   cf_have_libstdcpp=yes
25367 else
25368   echo "$as_me: failed program was:" >&5
25369 cat "conftest.$ac_ext" >&5
25370 cf_have_libstdcpp=no
25371 fi
25372 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25373         echo "$as_me:25373: result: $cf_have_libstdcpp" >&5
25374 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25375         LIBS="$cf_save"
25376
25377         if test "$cf_have_libstdcpp" != yes
25378         then
25379                 case "$cf_cv_system_name" in
25380                 (os2*)
25381                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25382                                 cf_stdcpp_libname=stdcpp
25383                         else
25384                                 cf_stdcpp_libname=stdc++
25385                         fi
25386                         ;;
25387                 (*)
25388                         cf_stdcpp_libname=stdc++
25389                         ;;
25390                 esac
25391
25392                 echo "$as_me:25392: checking for library $cf_stdcpp_libname" >&5
25393 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25394 if test "${cf_cv_libstdcpp+set}" = set; then
25395   echo $ECHO_N "(cached) $ECHO_C" >&6
25396 else
25397
25398                         cf_save="$LIBS"
25399                         LIBS="$LIBS $CXXLIBS"
25400
25401 cf_add_libs="$LIBS"
25402 # reverse order
25403 cf_add_0lib=
25404 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25405 # filter duplicates
25406 for cf_add_1lib in $cf_add_0lib; do
25407         for cf_add_2lib in $cf_add_libs; do
25408                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25409                         cf_add_1lib=
25410                         break
25411                 fi
25412         done
25413         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25414 done
25415 LIBS="$cf_add_libs"
25416
25417                 cat >"conftest.$ac_ext" <<_ACEOF
25418 #line 25418 "configure"
25419 #include "confdefs.h"
25420
25421                                 #include <iostream>
25422 int
25423 main (void)
25424 {
25425
25426                                 std::cout << "Hello World!" << std::endl;
25427   ;
25428   return 0;
25429 }
25430 _ACEOF
25431 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25432 if { (eval echo "$as_me:25432: \"$ac_link\"") >&5
25433   (eval $ac_link) 2>&5
25434   ac_status=$?
25435   echo "$as_me:25435: \$? = $ac_status" >&5
25436   (exit "$ac_status"); } &&
25437          { ac_try='test -s "conftest$ac_exeext"'
25438   { (eval echo "$as_me:25438: \"$ac_try\"") >&5
25439   (eval $ac_try) 2>&5
25440   ac_status=$?
25441   echo "$as_me:25441: \$? = $ac_status" >&5
25442   (exit "$ac_status"); }; }; then
25443   cf_cv_libstdcpp=yes
25444 else
25445   echo "$as_me: failed program was:" >&5
25446 cat "conftest.$ac_ext" >&5
25447 cf_cv_libstdcpp=no
25448 fi
25449 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25450                         LIBS="$cf_save"
25451
25452 fi
25453 echo "$as_me:25453: result: $cf_cv_libstdcpp" >&5
25454 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25455                 test "$cf_cv_libstdcpp" = yes && {
25456 cf_add_libs="$CXXLIBS"
25457 # reverse order
25458 cf_add_0lib=
25459 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25460 # filter duplicates
25461 for cf_add_1lib in $cf_add_0lib; do
25462         for cf_add_2lib in $cf_add_libs; do
25463                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25464                         cf_add_1lib=
25465                         break
25466                 fi
25467         done
25468         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25469 done
25470 CXXLIBS="$cf_add_libs"
25471  }
25472         fi
25473 fi
25474
25475         echo "$as_me:25475: checking whether $CXX understands -c and -o together" >&5
25476 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25477 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25478   echo $ECHO_N "(cached) $ECHO_C" >&6
25479 else
25480
25481 cat > conftest.$ac_ext <<CF_EOF
25482 int main(void)
25483 {
25484         ${cf_cv_main_return:-return}(0);
25485 }
25486 CF_EOF
25487 # We do the test twice because some compilers refuse to overwrite an
25488 # existing .o file with -o, though they will create one.
25489 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25490 if { (eval echo "$as_me:25490: \"$ac_try\"") >&5
25491   (eval $ac_try) 2>&5
25492   ac_status=$?
25493   echo "$as_me:25493: \$? = $ac_status" >&5
25494   (exit "$ac_status"); } &&
25495   test -f conftest2.$ac_objext && { (eval echo "$as_me:25495: \"$ac_try\"") >&5
25496   (eval $ac_try) 2>&5
25497   ac_status=$?
25498   echo "$as_me:25498: \$? = $ac_status" >&5
25499   (exit "$ac_status"); };
25500 then
25501   eval cf_cv_prog_CXX_c_o=yes
25502 else
25503   eval cf_cv_prog_CXX_c_o=no
25504 fi
25505 rm -rf ./conftest*
25506
25507 fi
25508 if test "$cf_cv_prog_CXX_c_o" = yes; then
25509   echo "$as_me:25509: result: yes" >&5
25510 echo "${ECHO_T}yes" >&6
25511 else
25512   echo "$as_me:25512: result: no" >&5
25513 echo "${ECHO_T}no" >&6
25514 fi
25515
25516         case "$GXX_VERSION" in
25517         (1.*|2.[0-6]*|[1-9][0-9].*)
25518                 cf_cxx_library=yes
25519                 ;;
25520         (*-2.7*|2.7*)
25521
25522 cf_cxx_library=unknown
25523 case "$cf_cv_system_name" in
25524 (os2*)
25525         cf_gpp_libname=gpp
25526         ;;
25527 (*)
25528         cf_gpp_libname=g++
25529         ;;
25530 esac
25531 if test "$GXX" = yes; then
25532         echo "$as_me:25532: checking for lib$cf_gpp_libname" >&5
25533 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25534         cf_save="$LIBS"
25535
25536 cf_add_libs="$LIBS"
25537 # reverse order
25538 cf_add_0lib=
25539 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25540 # filter duplicates
25541 for cf_add_1lib in $cf_add_0lib; do
25542         for cf_add_2lib in $cf_add_libs; do
25543                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25544                         cf_add_1lib=
25545                         break
25546                 fi
25547         done
25548         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25549 done
25550 LIBS="$cf_add_libs"
25551
25552         cat >"conftest.$ac_ext" <<_ACEOF
25553 #line 25553 "configure"
25554 #include "confdefs.h"
25555
25556 #include <$cf_gpp_libname/builtin.h>
25557
25558 int
25559 main (void)
25560 {
25561 two_arg_error_handler_t foo2 = lib_error_handler
25562   ;
25563   return 0;
25564 }
25565 _ACEOF
25566 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25567 if { (eval echo "$as_me:25567: \"$ac_link\"") >&5
25568   (eval $ac_link) 2>&5
25569   ac_status=$?
25570   echo "$as_me:25570: \$? = $ac_status" >&5
25571   (exit "$ac_status"); } &&
25572          { ac_try='test -s "conftest$ac_exeext"'
25573   { (eval echo "$as_me:25573: \"$ac_try\"") >&5
25574   (eval $ac_try) 2>&5
25575   ac_status=$?
25576   echo "$as_me:25576: \$? = $ac_status" >&5
25577   (exit "$ac_status"); }; }; then
25578   cf_cxx_library=yes
25579
25580 cf_add_libs="$CXXLIBS"
25581 # reverse order
25582 cf_add_0lib=
25583 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25584 # filter duplicates
25585 for cf_add_1lib in $cf_add_0lib; do
25586         for cf_add_2lib in $cf_add_libs; do
25587                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25588                         cf_add_1lib=
25589                         break
25590                 fi
25591         done
25592         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25593 done
25594 CXXLIBS="$cf_add_libs"
25595
25596          if test "$cf_gpp_libname" = cpp ; then
25597
25598 cat >>confdefs.h <<\EOF
25599 #define HAVE_GPP_BUILTIN_H 1
25600 EOF
25601
25602          else
25603
25604 cat >>confdefs.h <<\EOF
25605 #define HAVE_GXX_BUILTIN_H 1
25606 EOF
25607
25608          fi
25609 else
25610   echo "$as_me: failed program was:" >&5
25611 cat "conftest.$ac_ext" >&5
25612 cat >"conftest.$ac_ext" <<_ACEOF
25613 #line 25613 "configure"
25614 #include "confdefs.h"
25615
25616 #include <builtin.h>
25617
25618 int
25619 main (void)
25620 {
25621 two_arg_error_handler_t foo2 = lib_error_handler
25622   ;
25623   return 0;
25624 }
25625 _ACEOF
25626 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25627 if { (eval echo "$as_me:25627: \"$ac_link\"") >&5
25628   (eval $ac_link) 2>&5
25629   ac_status=$?
25630   echo "$as_me:25630: \$? = $ac_status" >&5
25631   (exit "$ac_status"); } &&
25632          { ac_try='test -s "conftest$ac_exeext"'
25633   { (eval echo "$as_me:25633: \"$ac_try\"") >&5
25634   (eval $ac_try) 2>&5
25635   ac_status=$?
25636   echo "$as_me:25636: \$? = $ac_status" >&5
25637   (exit "$ac_status"); }; }; then
25638   cf_cxx_library=yes
25639
25640 cf_add_libs="$CXXLIBS"
25641 # reverse order
25642 cf_add_0lib=
25643 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25644 # filter duplicates
25645 for cf_add_1lib in $cf_add_0lib; do
25646         for cf_add_2lib in $cf_add_libs; do
25647                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25648                         cf_add_1lib=
25649                         break
25650                 fi
25651         done
25652         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25653 done
25654 CXXLIBS="$cf_add_libs"
25655
25656 cat >>confdefs.h <<\EOF
25657 #define HAVE_BUILTIN_H 1
25658 EOF
25659
25660 else
25661   echo "$as_me: failed program was:" >&5
25662 cat "conftest.$ac_ext" >&5
25663 cf_cxx_library=no
25664 fi
25665 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25666 fi
25667 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25668         LIBS="$cf_save"
25669         echo "$as_me:25669: result: $cf_cxx_library" >&5
25670 echo "${ECHO_T}$cf_cxx_library" >&6
25671 fi
25672
25673                 ;;
25674         (*)
25675                 cf_cxx_library=no
25676                 ;;
25677         esac
25678
25679         ac_ext=cc
25680 ac_cpp='$CXXCPP $CPPFLAGS'
25681 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25682 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25683 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25684 ac_main_return="return"
25685 echo "$as_me:25685: checking how to run the C++ preprocessor" >&5
25686 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25687 if test -z "$CXXCPP"; then
25688   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25689   echo $ECHO_N "(cached) $ECHO_C" >&6
25690 else
25691       # Double quotes because CXXCPP needs to be expanded
25692     for CXXCPP in "$CXX -E" "/lib/cpp"
25693     do
25694       ac_preproc_ok=false
25695 for ac_cxx_preproc_warn_flag in '' yes
25696 do
25697   # Use a header file that comes with gcc, so configuring glibc
25698   # with a fresh cross-compiler works.
25699   # On the NeXT, cc -E runs the code through the compiler's parser,
25700   # not just through cpp. "Syntax error" is here to catch this case.
25701   cat >"conftest.$ac_ext" <<_ACEOF
25702 #line 25702 "configure"
25703 #include "confdefs.h"
25704 #include <assert.h>
25705                      Syntax error
25706 _ACEOF
25707 if { (eval echo "$as_me:25707: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25708   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25709   ac_status=$?
25710   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25711   rm -f conftest.er1
25712   cat conftest.err >&5
25713   echo "$as_me:25713: \$? = $ac_status" >&5
25714   (exit "$ac_status"); } >/dev/null; then
25715   if test -s conftest.err; then
25716     ac_cpp_err=$ac_cxx_preproc_warn_flag
25717   else
25718     ac_cpp_err=
25719   fi
25720 else
25721   ac_cpp_err=yes
25722 fi
25723 if test -z "$ac_cpp_err"; then
25724   :
25725 else
25726   echo "$as_me: failed program was:" >&5
25727   cat "conftest.$ac_ext" >&5
25728   # Broken: fails on valid input.
25729 continue
25730 fi
25731 rm -f conftest.err "conftest.$ac_ext"
25732
25733   # OK, works on sane cases.  Now check whether non-existent headers
25734   # can be detected and how.
25735   cat >"conftest.$ac_ext" <<_ACEOF
25736 #line 25736 "configure"
25737 #include "confdefs.h"
25738 #include <ac_nonexistent.h>
25739 _ACEOF
25740 if { (eval echo "$as_me:25740: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25741   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25742   ac_status=$?
25743   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25744   rm -f conftest.er1
25745   cat conftest.err >&5
25746   echo "$as_me:25746: \$? = $ac_status" >&5
25747   (exit "$ac_status"); } >/dev/null; then
25748   if test -s conftest.err; then
25749     ac_cpp_err=$ac_cxx_preproc_warn_flag
25750   else
25751     ac_cpp_err=
25752   fi
25753 else
25754   ac_cpp_err=yes
25755 fi
25756 if test -z "$ac_cpp_err"; then
25757   # Broken: success on invalid input.
25758 continue
25759 else
25760   echo "$as_me: failed program was:" >&5
25761   cat "conftest.$ac_ext" >&5
25762   # Passes both tests.
25763 ac_preproc_ok=:
25764 break
25765 fi
25766 rm -f conftest.err "conftest.$ac_ext"
25767
25768 done
25769 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25770 rm -f conftest.err "conftest.$ac_ext"
25771 if $ac_preproc_ok; then
25772   break
25773 fi
25774
25775     done
25776     ac_cv_prog_CXXCPP=$CXXCPP
25777
25778 fi
25779   CXXCPP=$ac_cv_prog_CXXCPP
25780 else
25781   ac_cv_prog_CXXCPP=$CXXCPP
25782 fi
25783 echo "$as_me:25783: result: $CXXCPP" >&5
25784 echo "${ECHO_T}$CXXCPP" >&6
25785 ac_preproc_ok=false
25786 for ac_cxx_preproc_warn_flag in '' yes
25787 do
25788   # Use a header file that comes with gcc, so configuring glibc
25789   # with a fresh cross-compiler works.
25790   # On the NeXT, cc -E runs the code through the compiler's parser,
25791   # not just through cpp. "Syntax error" is here to catch this case.
25792   cat >"conftest.$ac_ext" <<_ACEOF
25793 #line 25793 "configure"
25794 #include "confdefs.h"
25795 #include <assert.h>
25796                      Syntax error
25797 _ACEOF
25798 if { (eval echo "$as_me:25798: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25799   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25800   ac_status=$?
25801   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25802   rm -f conftest.er1
25803   cat conftest.err >&5
25804   echo "$as_me:25804: \$? = $ac_status" >&5
25805   (exit "$ac_status"); } >/dev/null; then
25806   if test -s conftest.err; then
25807     ac_cpp_err=$ac_cxx_preproc_warn_flag
25808   else
25809     ac_cpp_err=
25810   fi
25811 else
25812   ac_cpp_err=yes
25813 fi
25814 if test -z "$ac_cpp_err"; then
25815   :
25816 else
25817   echo "$as_me: failed program was:" >&5
25818   cat "conftest.$ac_ext" >&5
25819   # Broken: fails on valid input.
25820 continue
25821 fi
25822 rm -f conftest.err "conftest.$ac_ext"
25823
25824   # OK, works on sane cases.  Now check whether non-existent headers
25825   # can be detected and how.
25826   cat >"conftest.$ac_ext" <<_ACEOF
25827 #line 25827 "configure"
25828 #include "confdefs.h"
25829 #include <ac_nonexistent.h>
25830 _ACEOF
25831 if { (eval echo "$as_me:25831: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25832   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25833   ac_status=$?
25834   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25835   rm -f conftest.er1
25836   cat conftest.err >&5
25837   echo "$as_me:25837: \$? = $ac_status" >&5
25838   (exit "$ac_status"); } >/dev/null; then
25839   if test -s conftest.err; then
25840     ac_cpp_err=$ac_cxx_preproc_warn_flag
25841   else
25842     ac_cpp_err=
25843   fi
25844 else
25845   ac_cpp_err=yes
25846 fi
25847 if test -z "$ac_cpp_err"; then
25848   # Broken: success on invalid input.
25849 continue
25850 else
25851   echo "$as_me: failed program was:" >&5
25852   cat "conftest.$ac_ext" >&5
25853   # Passes both tests.
25854 ac_preproc_ok=:
25855 break
25856 fi
25857 rm -f conftest.err "conftest.$ac_ext"
25858
25859 done
25860 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25861 rm -f conftest.err "conftest.$ac_ext"
25862 if $ac_preproc_ok; then
25863   :
25864 else
25865   { { echo "$as_me:25865: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25866 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25867    { (exit 1); exit 1; }; }
25868 fi
25869
25870 ac_ext=cc
25871 ac_cpp='$CXXCPP $CPPFLAGS'
25872 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25873 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25874 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25875 ac_main_return="return"
25876
25877 for ac_header in typeinfo
25878 do
25879 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25880 echo "$as_me:25880: checking for $ac_header" >&5
25881 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25882 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25883   echo $ECHO_N "(cached) $ECHO_C" >&6
25884 else
25885   cat >"conftest.$ac_ext" <<_ACEOF
25886 #line 25886 "configure"
25887 #include "confdefs.h"
25888 #include <$ac_header>
25889 _ACEOF
25890 if { (eval echo "$as_me:25890: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25891   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25892   ac_status=$?
25893   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25894   rm -f conftest.er1
25895   cat conftest.err >&5
25896   echo "$as_me:25896: \$? = $ac_status" >&5
25897   (exit "$ac_status"); } >/dev/null; then
25898   if test -s conftest.err; then
25899     ac_cpp_err=$ac_cxx_preproc_warn_flag
25900   else
25901     ac_cpp_err=
25902   fi
25903 else
25904   ac_cpp_err=yes
25905 fi
25906 if test -z "$ac_cpp_err"; then
25907   eval "$as_ac_Header=yes"
25908 else
25909   echo "$as_me: failed program was:" >&5
25910   cat "conftest.$ac_ext" >&5
25911   eval "$as_ac_Header=no"
25912 fi
25913 rm -f conftest.err "conftest.$ac_ext"
25914 fi
25915 echo "$as_me:25915: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25916 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25917 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25918   cat >>confdefs.h <<EOF
25919 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25920 EOF
25921
25922 fi
25923 done
25924
25925 for ac_header in iostream
25926 do
25927 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25928 echo "$as_me:25928: checking for $ac_header" >&5
25929 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25930 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25931   echo $ECHO_N "(cached) $ECHO_C" >&6
25932 else
25933   cat >"conftest.$ac_ext" <<_ACEOF
25934 #line 25934 "configure"
25935 #include "confdefs.h"
25936 #include <$ac_header>
25937 _ACEOF
25938 if { (eval echo "$as_me:25938: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25939   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25940   ac_status=$?
25941   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25942   rm -f conftest.er1
25943   cat conftest.err >&5
25944   echo "$as_me:25944: \$? = $ac_status" >&5
25945   (exit "$ac_status"); } >/dev/null; then
25946   if test -s conftest.err; then
25947     ac_cpp_err=$ac_cxx_preproc_warn_flag
25948   else
25949     ac_cpp_err=
25950   fi
25951 else
25952   ac_cpp_err=yes
25953 fi
25954 if test -z "$ac_cpp_err"; then
25955   eval "$as_ac_Header=yes"
25956 else
25957   echo "$as_me: failed program was:" >&5
25958   cat "conftest.$ac_ext" >&5
25959   eval "$as_ac_Header=no"
25960 fi
25961 rm -f conftest.err "conftest.$ac_ext"
25962 fi
25963 echo "$as_me:25963: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25964 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25965 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25966   cat >>confdefs.h <<EOF
25967 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25968 EOF
25969
25970 fi
25971 done
25972
25973 if test x"$ac_cv_header_iostream" = xyes ; then
25974         echo "$as_me:25974: checking if iostream uses std-namespace" >&5
25975 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25976         cat >"conftest.$ac_ext" <<_ACEOF
25977 #line 25977 "configure"
25978 #include "confdefs.h"
25979
25980 #include <iostream>
25981 using std::endl;
25982 using std::cerr;
25983 int
25984 main (void)
25985 {
25986
25987 cerr << "testing" << endl;
25988
25989   ;
25990   return 0;
25991 }
25992 _ACEOF
25993 rm -f "conftest.$ac_objext"
25994 if { (eval echo "$as_me:25994: \"$ac_compile\"") >&5
25995   (eval $ac_compile) 2>&5
25996   ac_status=$?
25997   echo "$as_me:25997: \$? = $ac_status" >&5
25998   (exit "$ac_status"); } &&
25999          { ac_try='test -s "conftest.$ac_objext"'
26000   { (eval echo "$as_me:26000: \"$ac_try\"") >&5
26001   (eval $ac_try) 2>&5
26002   ac_status=$?
26003   echo "$as_me:26003: \$? = $ac_status" >&5
26004   (exit "$ac_status"); }; }; then
26005   cf_iostream_namespace=yes
26006 else
26007   echo "$as_me: failed program was:" >&5
26008 cat "conftest.$ac_ext" >&5
26009 cf_iostream_namespace=no
26010 fi
26011 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26012         echo "$as_me:26012: result: $cf_iostream_namespace" >&5
26013 echo "${ECHO_T}$cf_iostream_namespace" >&6
26014         if test "$cf_iostream_namespace" = yes ; then
26015
26016 cat >>confdefs.h <<\EOF
26017 #define IOSTREAM_NAMESPACE 1
26018 EOF
26019
26020         fi
26021 fi
26022
26023 echo "$as_me:26023: checking if we should include stdbool.h" >&5
26024 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
26025
26026 if test "${cf_cv_header_stdbool_h+set}" = set; then
26027   echo $ECHO_N "(cached) $ECHO_C" >&6
26028 else
26029
26030         cat >"conftest.$ac_ext" <<_ACEOF
26031 #line 26031 "configure"
26032 #include "confdefs.h"
26033
26034 int
26035 main (void)
26036 {
26037 bool foo = false; (void)foo
26038   ;
26039   return 0;
26040 }
26041 _ACEOF
26042 rm -f "conftest.$ac_objext"
26043 if { (eval echo "$as_me:26043: \"$ac_compile\"") >&5
26044   (eval $ac_compile) 2>&5
26045   ac_status=$?
26046   echo "$as_me:26046: \$? = $ac_status" >&5
26047   (exit "$ac_status"); } &&
26048          { ac_try='test -s "conftest.$ac_objext"'
26049   { (eval echo "$as_me:26049: \"$ac_try\"") >&5
26050   (eval $ac_try) 2>&5
26051   ac_status=$?
26052   echo "$as_me:26052: \$? = $ac_status" >&5
26053   (exit "$ac_status"); }; }; then
26054   cf_cv_header_stdbool_h=0
26055 else
26056   echo "$as_me: failed program was:" >&5
26057 cat "conftest.$ac_ext" >&5
26058 cat >"conftest.$ac_ext" <<_ACEOF
26059 #line 26059 "configure"
26060 #include "confdefs.h"
26061
26062 #ifndef __BEOS__
26063 #include <stdbool.h>
26064 #endif
26065
26066 int
26067 main (void)
26068 {
26069 bool foo = false; (void)foo
26070   ;
26071   return 0;
26072 }
26073 _ACEOF
26074 rm -f "conftest.$ac_objext"
26075 if { (eval echo "$as_me:26075: \"$ac_compile\"") >&5
26076   (eval $ac_compile) 2>&5
26077   ac_status=$?
26078   echo "$as_me:26078: \$? = $ac_status" >&5
26079   (exit "$ac_status"); } &&
26080          { ac_try='test -s "conftest.$ac_objext"'
26081   { (eval echo "$as_me:26081: \"$ac_try\"") >&5
26082   (eval $ac_try) 2>&5
26083   ac_status=$?
26084   echo "$as_me:26084: \$? = $ac_status" >&5
26085   (exit "$ac_status"); }; }; then
26086   cf_cv_header_stdbool_h=1
26087 else
26088   echo "$as_me: failed program was:" >&5
26089 cat "conftest.$ac_ext" >&5
26090 cf_cv_header_stdbool_h=0
26091 fi
26092 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26093 fi
26094 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26095 fi
26096
26097 if test "$cf_cv_header_stdbool_h" = 1
26098 then    echo "$as_me:26098: result: yes" >&5
26099 echo "${ECHO_T}yes" >&6
26100 else    echo "$as_me:26100: result: no" >&5
26101 echo "${ECHO_T}no" >&6
26102 fi
26103
26104 echo "$as_me:26104: checking for builtin bool type" >&5
26105 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
26106
26107 if test "${cf_cv_builtin_bool+set}" = set; then
26108   echo $ECHO_N "(cached) $ECHO_C" >&6
26109 else
26110
26111         cat >"conftest.$ac_ext" <<_ACEOF
26112 #line 26112 "configure"
26113 #include "confdefs.h"
26114
26115 #include <stdio.h>
26116 #include <sys/types.h>
26117
26118 int
26119 main (void)
26120 {
26121 bool x = false; (void)x
26122   ;
26123   return 0;
26124 }
26125 _ACEOF
26126 rm -f "conftest.$ac_objext"
26127 if { (eval echo "$as_me:26127: \"$ac_compile\"") >&5
26128   (eval $ac_compile) 2>&5
26129   ac_status=$?
26130   echo "$as_me:26130: \$? = $ac_status" >&5
26131   (exit "$ac_status"); } &&
26132          { ac_try='test -s "conftest.$ac_objext"'
26133   { (eval echo "$as_me:26133: \"$ac_try\"") >&5
26134   (eval $ac_try) 2>&5
26135   ac_status=$?
26136   echo "$as_me:26136: \$? = $ac_status" >&5
26137   (exit "$ac_status"); }; }; then
26138   cf_cv_builtin_bool=1
26139 else
26140   echo "$as_me: failed program was:" >&5
26141 cat "conftest.$ac_ext" >&5
26142 cf_cv_builtin_bool=0
26143 fi
26144 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26145
26146 fi
26147
26148 if test "$cf_cv_builtin_bool" = 1
26149 then    echo "$as_me:26149: result: yes" >&5
26150 echo "${ECHO_T}yes" >&6
26151 else    echo "$as_me:26151: result: no" >&5
26152 echo "${ECHO_T}no" >&6
26153 fi
26154
26155 echo "$as_me:26155: checking for bool" >&5
26156 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26157 if test "${ac_cv_type_bool+set}" = set; then
26158   echo $ECHO_N "(cached) $ECHO_C" >&6
26159 else
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 if ((bool *) 0)
26188   return 0;
26189 if (sizeof (bool))
26190   return 0;
26191   ;
26192   return 0;
26193 }
26194 _ACEOF
26195 rm -f "conftest.$ac_objext"
26196 if { (eval echo "$as_me:26196: \"$ac_compile\"") >&5
26197   (eval $ac_compile) 2>&5
26198   ac_status=$?
26199   echo "$as_me:26199: \$? = $ac_status" >&5
26200   (exit "$ac_status"); } &&
26201          { ac_try='test -s "conftest.$ac_objext"'
26202   { (eval echo "$as_me:26202: \"$ac_try\"") >&5
26203   (eval $ac_try) 2>&5
26204   ac_status=$?
26205   echo "$as_me:26205: \$? = $ac_status" >&5
26206   (exit "$ac_status"); }; }; then
26207   ac_cv_type_bool=yes
26208 else
26209   echo "$as_me: failed program was:" >&5
26210 cat "conftest.$ac_ext" >&5
26211 ac_cv_type_bool=no
26212 fi
26213 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26214 fi
26215 echo "$as_me:26215: result: $ac_cv_type_bool" >&5
26216 echo "${ECHO_T}$ac_cv_type_bool" >&6
26217
26218 echo "$as_me:26218: checking size of bool" >&5
26219 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26220 if test "${ac_cv_sizeof_bool+set}" = set; then
26221   echo $ECHO_N "(cached) $ECHO_C" >&6
26222 else
26223   if test "$ac_cv_type_bool" = yes; then
26224   if test "$cross_compiling" = yes; then
26225   # Depending upon the size, compute the lo and hi bounds.
26226 cat >"conftest.$ac_ext" <<_ACEOF
26227 #line 26227 "configure"
26228 #include "confdefs.h"
26229
26230 $ac_includes_default
26231
26232 #if defined(__cplusplus)
26233
26234 #ifdef HAVE_GXX_BUILTIN_H
26235 #include <g++/builtin.h>
26236 #elif HAVE_GPP_BUILTIN_H
26237 #include <gpp/builtin.h>
26238 #elif HAVE_BUILTIN_H
26239 #include <builtin.h>
26240 #endif
26241
26242 #else
26243
26244 #if $cf_cv_header_stdbool_h
26245 #include <stdbool.h>
26246 #endif
26247
26248 #endif
26249
26250 int
26251 main (void)
26252 {
26253 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26254   ;
26255   return 0;
26256 }
26257 _ACEOF
26258 rm -f "conftest.$ac_objext"
26259 if { (eval echo "$as_me:26259: \"$ac_compile\"") >&5
26260   (eval $ac_compile) 2>&5
26261   ac_status=$?
26262   echo "$as_me:26262: \$? = $ac_status" >&5
26263   (exit "$ac_status"); } &&
26264          { ac_try='test -s "conftest.$ac_objext"'
26265   { (eval echo "$as_me:26265: \"$ac_try\"") >&5
26266   (eval $ac_try) 2>&5
26267   ac_status=$?
26268   echo "$as_me:26268: \$? = $ac_status" >&5
26269   (exit "$ac_status"); }; }; then
26270   ac_lo=0 ac_mid=0
26271   while :; do
26272     cat >"conftest.$ac_ext" <<_ACEOF
26273 #line 26273 "configure"
26274 #include "confdefs.h"
26275
26276 $ac_includes_default
26277
26278 #if defined(__cplusplus)
26279
26280 #ifdef HAVE_GXX_BUILTIN_H
26281 #include <g++/builtin.h>
26282 #elif HAVE_GPP_BUILTIN_H
26283 #include <gpp/builtin.h>
26284 #elif HAVE_BUILTIN_H
26285 #include <builtin.h>
26286 #endif
26287
26288 #else
26289
26290 #if $cf_cv_header_stdbool_h
26291 #include <stdbool.h>
26292 #endif
26293
26294 #endif
26295
26296 int
26297 main (void)
26298 {
26299 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26300   ;
26301   return 0;
26302 }
26303 _ACEOF
26304 rm -f "conftest.$ac_objext"
26305 if { (eval echo "$as_me:26305: \"$ac_compile\"") >&5
26306   (eval $ac_compile) 2>&5
26307   ac_status=$?
26308   echo "$as_me:26308: \$? = $ac_status" >&5
26309   (exit "$ac_status"); } &&
26310          { ac_try='test -s "conftest.$ac_objext"'
26311   { (eval echo "$as_me:26311: \"$ac_try\"") >&5
26312   (eval $ac_try) 2>&5
26313   ac_status=$?
26314   echo "$as_me:26314: \$? = $ac_status" >&5
26315   (exit "$ac_status"); }; }; then
26316   ac_hi=$ac_mid; break
26317 else
26318   echo "$as_me: failed program was:" >&5
26319 cat "conftest.$ac_ext" >&5
26320 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26321 fi
26322 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26323   done
26324 else
26325   echo "$as_me: failed program was:" >&5
26326 cat "conftest.$ac_ext" >&5
26327 ac_hi=-1 ac_mid=-1
26328   while :; do
26329     cat >"conftest.$ac_ext" <<_ACEOF
26330 #line 26330 "configure"
26331 #include "confdefs.h"
26332
26333 $ac_includes_default
26334
26335 #if defined(__cplusplus)
26336
26337 #ifdef HAVE_GXX_BUILTIN_H
26338 #include <g++/builtin.h>
26339 #elif HAVE_GPP_BUILTIN_H
26340 #include <gpp/builtin.h>
26341 #elif HAVE_BUILTIN_H
26342 #include <builtin.h>
26343 #endif
26344
26345 #else
26346
26347 #if $cf_cv_header_stdbool_h
26348 #include <stdbool.h>
26349 #endif
26350
26351 #endif
26352
26353 int
26354 main (void)
26355 {
26356 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26357   ;
26358   return 0;
26359 }
26360 _ACEOF
26361 rm -f "conftest.$ac_objext"
26362 if { (eval echo "$as_me:26362: \"$ac_compile\"") >&5
26363   (eval $ac_compile) 2>&5
26364   ac_status=$?
26365   echo "$as_me:26365: \$? = $ac_status" >&5
26366   (exit "$ac_status"); } &&
26367          { ac_try='test -s "conftest.$ac_objext"'
26368   { (eval echo "$as_me:26368: \"$ac_try\"") >&5
26369   (eval $ac_try) 2>&5
26370   ac_status=$?
26371   echo "$as_me:26371: \$? = $ac_status" >&5
26372   (exit "$ac_status"); }; }; then
26373   ac_lo=$ac_mid; break
26374 else
26375   echo "$as_me: failed program was:" >&5
26376 cat "conftest.$ac_ext" >&5
26377 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26378 fi
26379 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26380   done
26381 fi
26382 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26383 # Binary search between lo and hi bounds.
26384 while test "x$ac_lo" != "x$ac_hi"; do
26385   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26386   cat >"conftest.$ac_ext" <<_ACEOF
26387 #line 26387 "configure"
26388 #include "confdefs.h"
26389
26390 $ac_includes_default
26391
26392 #if defined(__cplusplus)
26393
26394 #ifdef HAVE_GXX_BUILTIN_H
26395 #include <g++/builtin.h>
26396 #elif HAVE_GPP_BUILTIN_H
26397 #include <gpp/builtin.h>
26398 #elif HAVE_BUILTIN_H
26399 #include <builtin.h>
26400 #endif
26401
26402 #else
26403
26404 #if $cf_cv_header_stdbool_h
26405 #include <stdbool.h>
26406 #endif
26407
26408 #endif
26409
26410 int
26411 main (void)
26412 {
26413 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26414   ;
26415   return 0;
26416 }
26417 _ACEOF
26418 rm -f "conftest.$ac_objext"
26419 if { (eval echo "$as_me:26419: \"$ac_compile\"") >&5
26420   (eval $ac_compile) 2>&5
26421   ac_status=$?
26422   echo "$as_me:26422: \$? = $ac_status" >&5
26423   (exit "$ac_status"); } &&
26424          { ac_try='test -s "conftest.$ac_objext"'
26425   { (eval echo "$as_me:26425: \"$ac_try\"") >&5
26426   (eval $ac_try) 2>&5
26427   ac_status=$?
26428   echo "$as_me:26428: \$? = $ac_status" >&5
26429   (exit "$ac_status"); }; }; then
26430   ac_hi=$ac_mid
26431 else
26432   echo "$as_me: failed program was:" >&5
26433 cat "conftest.$ac_ext" >&5
26434 ac_lo=`expr "$ac_mid" + 1`
26435 fi
26436 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26437 done
26438 ac_cv_sizeof_bool=$ac_lo
26439 else
26440   if test "$cross_compiling" = yes; then
26441   { { echo "$as_me:26441: error: cannot run test program while cross compiling" >&5
26442 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26443    { (exit 1); exit 1; }; }
26444 else
26445   cat >"conftest.$ac_ext" <<_ACEOF
26446 #line 26446 "configure"
26447 #include "confdefs.h"
26448
26449 $ac_includes_default
26450
26451 #if defined(__cplusplus)
26452
26453 #ifdef HAVE_GXX_BUILTIN_H
26454 #include <g++/builtin.h>
26455 #elif HAVE_GPP_BUILTIN_H
26456 #include <gpp/builtin.h>
26457 #elif HAVE_BUILTIN_H
26458 #include <builtin.h>
26459 #endif
26460
26461 #else
26462
26463 #if $cf_cv_header_stdbool_h
26464 #include <stdbool.h>
26465 #endif
26466
26467 #endif
26468
26469 int
26470 main (void)
26471 {
26472 FILE *f = fopen ("conftest.val", "w");
26473 if (!f)
26474   $ac_main_return (1);
26475 fprintf (f, "%ld", (long)(sizeof (bool)));
26476 fclose (f);
26477   ;
26478   return 0;
26479 }
26480 _ACEOF
26481 rm -f "conftest$ac_exeext"
26482 if { (eval echo "$as_me:26482: \"$ac_link\"") >&5
26483   (eval $ac_link) 2>&5
26484   ac_status=$?
26485   echo "$as_me:26485: \$? = $ac_status" >&5
26486   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26487   { (eval echo "$as_me:26487: \"$ac_try\"") >&5
26488   (eval $ac_try) 2>&5
26489   ac_status=$?
26490   echo "$as_me:26490: \$? = $ac_status" >&5
26491   (exit "$ac_status"); }; }; then
26492   ac_cv_sizeof_bool=`cat conftest.val`
26493 else
26494   echo "$as_me: program exited with status $ac_status" >&5
26495 echo "$as_me: failed program was:" >&5
26496 cat "conftest.$ac_ext" >&5
26497 fi
26498 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26499 fi
26500 fi
26501 rm -f conftest.val
26502 else
26503   ac_cv_sizeof_bool=0
26504 fi
26505 fi
26506 echo "$as_me:26506: result: $ac_cv_sizeof_bool" >&5
26507 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26508 cat >>confdefs.h <<EOF
26509 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26510 EOF
26511
26512 echo "$as_me:26512: checking for type of bool" >&5
26513 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26514 if test "${cf_cv_type_of_bool+set}" = set; then
26515   echo $ECHO_N "(cached) $ECHO_C" >&6
26516 else
26517
26518         rm -f cf_test.out
26519         if test "$cross_compiling" = yes; then
26520
26521                 case x$ac_cv_sizeof_bool in
26522                 (x1) cf_cv_type_of_bool="unsigned char";;
26523                 (x2) cf_cv_type_of_bool="unsigned short";;
26524                 (x4) cf_cv_type_of_bool="unsigned int";;
26525                 (x8) cf_cv_type_of_bool="unsigned long";;
26526                 (*)  cf_cv_type_of_bool=unknown;;
26527                 esac
26528
26529 else
26530   cat >"conftest.$ac_ext" <<_ACEOF
26531 #line 26531 "configure"
26532 #include "confdefs.h"
26533
26534 $ac_includes_default
26535
26536 #if defined(__cplusplus)
26537
26538 #ifdef HAVE_GXX_BUILTIN_H
26539 #include <g++/builtin.h>
26540 #elif HAVE_GPP_BUILTIN_H
26541 #include <gpp/builtin.h>
26542 #elif HAVE_BUILTIN_H
26543 #include <builtin.h>
26544 #endif
26545
26546 #else
26547
26548 #if $cf_cv_header_stdbool_h
26549 #include <stdbool.h>
26550 #endif
26551
26552 #endif
26553
26554 int main(void)
26555 {
26556         FILE *fp = fopen("cf_test.out", "w");
26557         if (fp != 0) {
26558                 bool x = true;
26559                 if ((bool)(-x) >= 0)
26560                         fputs("unsigned ", fp);
26561                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26562                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26563                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26564                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26565                 fclose(fp);
26566         }
26567         ${cf_cv_main_return:-return}(0);
26568 }
26569
26570 _ACEOF
26571 rm -f "conftest$ac_exeext"
26572 if { (eval echo "$as_me:26572: \"$ac_link\"") >&5
26573   (eval $ac_link) 2>&5
26574   ac_status=$?
26575   echo "$as_me:26575: \$? = $ac_status" >&5
26576   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26577   { (eval echo "$as_me:26577: \"$ac_try\"") >&5
26578   (eval $ac_try) 2>&5
26579   ac_status=$?
26580   echo "$as_me:26580: \$? = $ac_status" >&5
26581   (exit "$ac_status"); }; }; then
26582   cf_cv_type_of_bool=`cat cf_test.out`
26583                  if test -z "$cf_cv_type_of_bool"; then
26584                    cf_cv_type_of_bool=unknown
26585                  fi
26586 else
26587   echo "$as_me: program exited with status $ac_status" >&5
26588 echo "$as_me: failed program was:" >&5
26589 cat "conftest.$ac_ext" >&5
26590 cf_cv_type_of_bool=unknown
26591 fi
26592 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26593 fi
26594         rm -f cf_test.out
26595
26596 fi
26597 echo "$as_me:26597: result: $cf_cv_type_of_bool" >&5
26598 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26599
26600 if test "$cf_cv_type_of_bool" = unknown ; then
26601         case .$NCURSES_BOOL in
26602         (.auto|.) NCURSES_BOOL=unsigned;;
26603         esac
26604         { echo "$as_me:26604: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26605 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26606         cf_cv_type_of_bool=$NCURSES_BOOL
26607 fi
26608
26609 echo "$as_me:26609: checking for special defines needed for etip.h" >&5
26610 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26611 cf_save_CXXFLAGS="$CXXFLAGS"
26612 cf_result="none"
26613
26614 # etip.h includes ncurses.h which includes ncurses_dll.h
26615 # But ncurses_dll.h is generated - fix here.
26616 test -d include || mkdir include
26617 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
26618
26619 for cf_math in "" MATH_H
26620 do
26621 for cf_excp in "" MATH_EXCEPTION
26622 do
26623         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26624         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26625         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26626 cat >"conftest.$ac_ext" <<_ACEOF
26627 #line 26627 "configure"
26628 #include "confdefs.h"
26629
26630 #include <etip.h.in>
26631
26632 int
26633 main (void)
26634 {
26635
26636   ;
26637   return 0;
26638 }
26639 _ACEOF
26640 rm -f "conftest.$ac_objext"
26641 if { (eval echo "$as_me:26641: \"$ac_compile\"") >&5
26642   (eval $ac_compile) 2>&5
26643   ac_status=$?
26644   echo "$as_me:26644: \$? = $ac_status" >&5
26645   (exit "$ac_status"); } &&
26646          { ac_try='test -s "conftest.$ac_objext"'
26647   { (eval echo "$as_me:26647: \"$ac_try\"") >&5
26648   (eval $ac_try) 2>&5
26649   ac_status=$?
26650   echo "$as_me:26650: \$? = $ac_status" >&5
26651   (exit "$ac_status"); }; }; then
26652
26653         test -n "$cf_math" && cat >>confdefs.h <<EOF
26654 #define ETIP_NEEDS_${cf_math} 1
26655 EOF
26656
26657         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26658 #define ETIP_NEEDS_${cf_excp} 1
26659 EOF
26660
26661         cf_result="$cf_math $cf_excp"
26662         break 2
26663
26664 else
26665   echo "$as_me: failed program was:" >&5
26666 cat "conftest.$ac_ext" >&5
26667 fi
26668 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26669 done
26670 done
26671 echo "$as_me:26671: result: ${cf_result:-(none)}" >&5
26672 echo "${ECHO_T}${cf_result:-(none)}" >&6
26673 CXXFLAGS="$cf_save_CXXFLAGS"
26674
26675 if test -n "$CXX"; then
26676 echo "$as_me:26676: checking if $CXX accepts override keyword" >&5
26677 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26678 if test "${cf_cv_cpp_override+set}" = set; then
26679   echo $ECHO_N "(cached) $ECHO_C" >&6
26680 else
26681
26682         ac_ext=cc
26683 ac_cpp='$CXXCPP $CPPFLAGS'
26684 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26685 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26686 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26687 ac_main_return="return"
26688
26689         if test "$cross_compiling" = yes; then
26690   cf_cv_cpp_override=unknown
26691 else
26692   cat >"conftest.$ac_ext" <<_ACEOF
26693 #line 26693 "configure"
26694 #include "confdefs.h"
26695
26696 class base
26697 {
26698 public:
26699         virtual int foo(float x) = 0;
26700 };
26701
26702 class derived: public base
26703 {
26704 public:
26705         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26706 };
26707
26708 int main(void) { }
26709
26710 _ACEOF
26711 rm -f "conftest$ac_exeext"
26712 if { (eval echo "$as_me:26712: \"$ac_link\"") >&5
26713   (eval $ac_link) 2>&5
26714   ac_status=$?
26715   echo "$as_me:26715: \$? = $ac_status" >&5
26716   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26717   { (eval echo "$as_me:26717: \"$ac_try\"") >&5
26718   (eval $ac_try) 2>&5
26719   ac_status=$?
26720   echo "$as_me:26720: \$? = $ac_status" >&5
26721   (exit "$ac_status"); }; }; then
26722   cf_cv_cpp_override=yes
26723 else
26724   echo "$as_me: program exited with status $ac_status" >&5
26725 echo "$as_me: failed program was:" >&5
26726 cat "conftest.$ac_ext" >&5
26727 cf_cv_cpp_override=no
26728 fi
26729 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26730 fi
26731         ac_ext=cc
26732 ac_cpp='$CXXCPP $CPPFLAGS'
26733 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26734 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26735 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26736 ac_main_return="return"
26737
26738 fi
26739 echo "$as_me:26739: result: $cf_cv_cpp_override" >&5
26740 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26741 fi
26742 test "$cf_cv_cpp_override" = yes &&
26743 cat >>confdefs.h <<\EOF
26744 #define CPP_HAS_OVERRIDE 1
26745 EOF
26746
26747 if test -n "$CXX"; then
26748 echo "$as_me:26748: checking if $CXX accepts parameter initialization" >&5
26749 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26750 if test "${cf_cv_cpp_param_init+set}" = set; then
26751   echo $ECHO_N "(cached) $ECHO_C" >&6
26752 else
26753
26754         ac_ext=cc
26755 ac_cpp='$CXXCPP $CPPFLAGS'
26756 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26757 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26758 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26759 ac_main_return="return"
26760
26761         if test "$cross_compiling" = yes; then
26762   cf_cv_cpp_param_init=unknown
26763 else
26764   cat >"conftest.$ac_ext" <<_ACEOF
26765 #line 26765 "configure"
26766 #include "confdefs.h"
26767
26768 class TEST {
26769 private:
26770         int value;
26771 public:
26772         TEST(int x = 1);
26773         ~TEST();
26774 };
26775
26776 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26777 {
26778         value = x;
26779 }
26780 int main(void) { }
26781
26782 _ACEOF
26783 rm -f "conftest$ac_exeext"
26784 if { (eval echo "$as_me:26784: \"$ac_link\"") >&5
26785   (eval $ac_link) 2>&5
26786   ac_status=$?
26787   echo "$as_me:26787: \$? = $ac_status" >&5
26788   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26789   { (eval echo "$as_me:26789: \"$ac_try\"") >&5
26790   (eval $ac_try) 2>&5
26791   ac_status=$?
26792   echo "$as_me:26792: \$? = $ac_status" >&5
26793   (exit "$ac_status"); }; }; then
26794   cf_cv_cpp_param_init=yes
26795 else
26796   echo "$as_me: program exited with status $ac_status" >&5
26797 echo "$as_me: failed program was:" >&5
26798 cat "conftest.$ac_ext" >&5
26799 cf_cv_cpp_param_init=no
26800 fi
26801 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26802 fi
26803         ac_ext=cc
26804 ac_cpp='$CXXCPP $CPPFLAGS'
26805 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26806 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26807 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26808 ac_main_return="return"
26809
26810 fi
26811 echo "$as_me:26811: result: $cf_cv_cpp_param_init" >&5
26812 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26813 fi
26814 test "$cf_cv_cpp_param_init" = yes &&
26815 cat >>confdefs.h <<\EOF
26816 #define CPP_HAS_PARAM_INIT 1
26817 EOF
26818
26819 if test -n "$CXX"; then
26820
26821 echo "$as_me:26821: checking if $CXX accepts static_cast" >&5
26822 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26823 if test "${cf_cv_cpp_static_cast+set}" = set; then
26824   echo $ECHO_N "(cached) $ECHO_C" >&6
26825 else
26826
26827         ac_ext=cc
26828 ac_cpp='$CXXCPP $CPPFLAGS'
26829 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26830 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26831 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26832 ac_main_return="return"
26833
26834         cat >"conftest.$ac_ext" <<_ACEOF
26835 #line 26835 "configure"
26836 #include "confdefs.h"
26837
26838 class NCursesPanel
26839 {
26840 public:
26841   NCursesPanel(int nlines,
26842                int ncols,
26843                int begin_y = 0,
26844                int begin_x = 0)
26845   {
26846   }
26847   NCursesPanel();
26848   ~NCursesPanel();
26849 };
26850
26851 template<class T> class NCursesUserPanel : public NCursesPanel
26852 {
26853 public:
26854   NCursesUserPanel (int nlines,
26855                     int ncols,
26856                     int begin_y = 0,
26857                     int begin_x = 0,
26858                     const T* p_UserData = static_cast<T*>(0))
26859     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26860   {
26861   };
26862   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26863   {
26864   };
26865
26866   virtual ~NCursesUserPanel() {};
26867 };
26868
26869 int
26870 main (void)
26871 {
26872
26873         const char* p_UserData = static_cast<char*>(0)
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   cf_cv_cpp_static_cast=yes
26891 else
26892   echo "$as_me: failed program was:" >&5
26893 cat "conftest.$ac_ext" >&5
26894 cf_cv_cpp_static_cast=no
26895 fi
26896 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26897
26898         ac_ext=cc
26899 ac_cpp='$CXXCPP $CPPFLAGS'
26900 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26901 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26902 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26903 ac_main_return="return"
26904
26905 fi
26906 echo "$as_me:26906: result: $cf_cv_cpp_static_cast" >&5
26907 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26908
26909 fi
26910
26911 test "$cf_cv_cpp_static_cast" = yes &&
26912 cat >>confdefs.h <<\EOF
26913 #define CPP_HAS_STATIC_CAST 1
26914 EOF
26915
26916         CXX_AR='$(AR)'
26917         CXX_ARFLAGS='$(ARFLAGS)'
26918         case "$cf_cv_system_name" in
26919         (irix*)
26920             if test "$GXX" != yes ; then
26921                 CXX_AR='$(CXX)'
26922                 CXX_ARFLAGS='-ar -o'
26923             fi
26924             ;;
26925         (sco3.2v5*)
26926             CXXLDFLAGS="-u main"
26927             ;;
26928         (solaris2*)
26929             if test "$GXX" != yes ; then
26930                 CXX_AR='$(CXX)'
26931                 CXX_ARFLAGS='-xar -o'
26932             fi
26933             ;;
26934         esac
26935
26936 else
26937         cf_cxx_library=no
26938         cf_cv_builtin_bool=1
26939
26940         # Just because we are not configuring against C++ right now does not
26941         # mean that a user will not want to use C++.  Some distributors disable
26942         # the C++ portion of this configuration as a shortcut (or just to avoid
26943         # compiling the demo in the c++ directory).  So we need a reasonable
26944         # default for the 'bool' type.
26945         #
26946         # Caveat: since the storage of the bool type is not standardized, it
26947         # may change.
26948
26949         if test "$NCURSES_BOOL" != auto ; then
26950                 cf_cv_type_of_bool=$NCURSES_BOOL
26951                 cf_cv_header_stdbool_h=0
26952         else
26953                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26954
26955 echo "$as_me:26955: checking for bool" >&5
26956 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26957 if test "${ac_cv_type_bool+set}" = set; then
26958   echo $ECHO_N "(cached) $ECHO_C" >&6
26959 else
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 if ((bool *) 0)
26988   return 0;
26989 if (sizeof (bool))
26990   return 0;
26991   ;
26992   return 0;
26993 }
26994 _ACEOF
26995 rm -f "conftest.$ac_objext"
26996 if { (eval echo "$as_me:26996: \"$ac_compile\"") >&5
26997   (eval $ac_compile) 2>&5
26998   ac_status=$?
26999   echo "$as_me:26999: \$? = $ac_status" >&5
27000   (exit "$ac_status"); } &&
27001          { ac_try='test -s "conftest.$ac_objext"'
27002   { (eval echo "$as_me:27002: \"$ac_try\"") >&5
27003   (eval $ac_try) 2>&5
27004   ac_status=$?
27005   echo "$as_me:27005: \$? = $ac_status" >&5
27006   (exit "$ac_status"); }; }; then
27007   ac_cv_type_bool=yes
27008 else
27009   echo "$as_me: failed program was:" >&5
27010 cat "conftest.$ac_ext" >&5
27011 ac_cv_type_bool=no
27012 fi
27013 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27014 fi
27015 echo "$as_me:27015: result: $ac_cv_type_bool" >&5
27016 echo "${ECHO_T}$ac_cv_type_bool" >&6
27017
27018 echo "$as_me:27018: checking size of bool" >&5
27019 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
27020 if test "${ac_cv_sizeof_bool+set}" = set; then
27021   echo $ECHO_N "(cached) $ECHO_C" >&6
27022 else
27023   if test "$ac_cv_type_bool" = yes; then
27024   if test "$cross_compiling" = yes; then
27025   # Depending upon the size, compute the lo and hi bounds.
27026 cat >"conftest.$ac_ext" <<_ACEOF
27027 #line 27027 "configure"
27028 #include "confdefs.h"
27029
27030 $ac_includes_default
27031
27032 #if defined(__cplusplus)
27033
27034 #ifdef HAVE_GXX_BUILTIN_H
27035 #include <g++/builtin.h>
27036 #elif HAVE_GPP_BUILTIN_H
27037 #include <gpp/builtin.h>
27038 #elif HAVE_BUILTIN_H
27039 #include <builtin.h>
27040 #endif
27041
27042 #else
27043
27044 #if $cf_cv_header_stdbool_h
27045 #include <stdbool.h>
27046 #endif
27047
27048 #endif
27049
27050 int
27051 main (void)
27052 {
27053 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
27054   ;
27055   return 0;
27056 }
27057 _ACEOF
27058 rm -f "conftest.$ac_objext"
27059 if { (eval echo "$as_me:27059: \"$ac_compile\"") >&5
27060   (eval $ac_compile) 2>&5
27061   ac_status=$?
27062   echo "$as_me:27062: \$? = $ac_status" >&5
27063   (exit "$ac_status"); } &&
27064          { ac_try='test -s "conftest.$ac_objext"'
27065   { (eval echo "$as_me:27065: \"$ac_try\"") >&5
27066   (eval $ac_try) 2>&5
27067   ac_status=$?
27068   echo "$as_me:27068: \$? = $ac_status" >&5
27069   (exit "$ac_status"); }; }; then
27070   ac_lo=0 ac_mid=0
27071   while :; do
27072     cat >"conftest.$ac_ext" <<_ACEOF
27073 #line 27073 "configure"
27074 #include "confdefs.h"
27075
27076 $ac_includes_default
27077
27078 #if defined(__cplusplus)
27079
27080 #ifdef HAVE_GXX_BUILTIN_H
27081 #include <g++/builtin.h>
27082 #elif HAVE_GPP_BUILTIN_H
27083 #include <gpp/builtin.h>
27084 #elif HAVE_BUILTIN_H
27085 #include <builtin.h>
27086 #endif
27087
27088 #else
27089
27090 #if $cf_cv_header_stdbool_h
27091 #include <stdbool.h>
27092 #endif
27093
27094 #endif
27095
27096 int
27097 main (void)
27098 {
27099 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27100   ;
27101   return 0;
27102 }
27103 _ACEOF
27104 rm -f "conftest.$ac_objext"
27105 if { (eval echo "$as_me:27105: \"$ac_compile\"") >&5
27106   (eval $ac_compile) 2>&5
27107   ac_status=$?
27108   echo "$as_me:27108: \$? = $ac_status" >&5
27109   (exit "$ac_status"); } &&
27110          { ac_try='test -s "conftest.$ac_objext"'
27111   { (eval echo "$as_me:27111: \"$ac_try\"") >&5
27112   (eval $ac_try) 2>&5
27113   ac_status=$?
27114   echo "$as_me:27114: \$? = $ac_status" >&5
27115   (exit "$ac_status"); }; }; then
27116   ac_hi=$ac_mid; break
27117 else
27118   echo "$as_me: failed program was:" >&5
27119 cat "conftest.$ac_ext" >&5
27120 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27121 fi
27122 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27123   done
27124 else
27125   echo "$as_me: failed program was:" >&5
27126 cat "conftest.$ac_ext" >&5
27127 ac_hi=-1 ac_mid=-1
27128   while :; do
27129     cat >"conftest.$ac_ext" <<_ACEOF
27130 #line 27130 "configure"
27131 #include "confdefs.h"
27132
27133 $ac_includes_default
27134
27135 #if defined(__cplusplus)
27136
27137 #ifdef HAVE_GXX_BUILTIN_H
27138 #include <g++/builtin.h>
27139 #elif HAVE_GPP_BUILTIN_H
27140 #include <gpp/builtin.h>
27141 #elif HAVE_BUILTIN_H
27142 #include <builtin.h>
27143 #endif
27144
27145 #else
27146
27147 #if $cf_cv_header_stdbool_h
27148 #include <stdbool.h>
27149 #endif
27150
27151 #endif
27152
27153 int
27154 main (void)
27155 {
27156 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
27157   ;
27158   return 0;
27159 }
27160 _ACEOF
27161 rm -f "conftest.$ac_objext"
27162 if { (eval echo "$as_me:27162: \"$ac_compile\"") >&5
27163   (eval $ac_compile) 2>&5
27164   ac_status=$?
27165   echo "$as_me:27165: \$? = $ac_status" >&5
27166   (exit "$ac_status"); } &&
27167          { ac_try='test -s "conftest.$ac_objext"'
27168   { (eval echo "$as_me:27168: \"$ac_try\"") >&5
27169   (eval $ac_try) 2>&5
27170   ac_status=$?
27171   echo "$as_me:27171: \$? = $ac_status" >&5
27172   (exit "$ac_status"); }; }; then
27173   ac_lo=$ac_mid; break
27174 else
27175   echo "$as_me: failed program was:" >&5
27176 cat "conftest.$ac_ext" >&5
27177 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27178 fi
27179 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27180   done
27181 fi
27182 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27183 # Binary search between lo and hi bounds.
27184 while test "x$ac_lo" != "x$ac_hi"; do
27185   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27186   cat >"conftest.$ac_ext" <<_ACEOF
27187 #line 27187 "configure"
27188 #include "confdefs.h"
27189
27190 $ac_includes_default
27191
27192 #if defined(__cplusplus)
27193
27194 #ifdef HAVE_GXX_BUILTIN_H
27195 #include <g++/builtin.h>
27196 #elif HAVE_GPP_BUILTIN_H
27197 #include <gpp/builtin.h>
27198 #elif HAVE_BUILTIN_H
27199 #include <builtin.h>
27200 #endif
27201
27202 #else
27203
27204 #if $cf_cv_header_stdbool_h
27205 #include <stdbool.h>
27206 #endif
27207
27208 #endif
27209
27210 int
27211 main (void)
27212 {
27213 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27214   ;
27215   return 0;
27216 }
27217 _ACEOF
27218 rm -f "conftest.$ac_objext"
27219 if { (eval echo "$as_me:27219: \"$ac_compile\"") >&5
27220   (eval $ac_compile) 2>&5
27221   ac_status=$?
27222   echo "$as_me:27222: \$? = $ac_status" >&5
27223   (exit "$ac_status"); } &&
27224          { ac_try='test -s "conftest.$ac_objext"'
27225   { (eval echo "$as_me:27225: \"$ac_try\"") >&5
27226   (eval $ac_try) 2>&5
27227   ac_status=$?
27228   echo "$as_me:27228: \$? = $ac_status" >&5
27229   (exit "$ac_status"); }; }; then
27230   ac_hi=$ac_mid
27231 else
27232   echo "$as_me: failed program was:" >&5
27233 cat "conftest.$ac_ext" >&5
27234 ac_lo=`expr "$ac_mid" + 1`
27235 fi
27236 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27237 done
27238 ac_cv_sizeof_bool=$ac_lo
27239 else
27240   if test "$cross_compiling" = yes; then
27241   { { echo "$as_me:27241: error: cannot run test program while cross compiling" >&5
27242 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27243    { (exit 1); exit 1; }; }
27244 else
27245   cat >"conftest.$ac_ext" <<_ACEOF
27246 #line 27246 "configure"
27247 #include "confdefs.h"
27248
27249 $ac_includes_default
27250
27251 #if defined(__cplusplus)
27252
27253 #ifdef HAVE_GXX_BUILTIN_H
27254 #include <g++/builtin.h>
27255 #elif HAVE_GPP_BUILTIN_H
27256 #include <gpp/builtin.h>
27257 #elif HAVE_BUILTIN_H
27258 #include <builtin.h>
27259 #endif
27260
27261 #else
27262
27263 #if $cf_cv_header_stdbool_h
27264 #include <stdbool.h>
27265 #endif
27266
27267 #endif
27268
27269 int
27270 main (void)
27271 {
27272 FILE *f = fopen ("conftest.val", "w");
27273 if (!f)
27274   $ac_main_return (1);
27275 fprintf (f, "%ld", (long)(sizeof (bool)));
27276 fclose (f);
27277   ;
27278   return 0;
27279 }
27280 _ACEOF
27281 rm -f "conftest$ac_exeext"
27282 if { (eval echo "$as_me:27282: \"$ac_link\"") >&5
27283   (eval $ac_link) 2>&5
27284   ac_status=$?
27285   echo "$as_me:27285: \$? = $ac_status" >&5
27286   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27287   { (eval echo "$as_me:27287: \"$ac_try\"") >&5
27288   (eval $ac_try) 2>&5
27289   ac_status=$?
27290   echo "$as_me:27290: \$? = $ac_status" >&5
27291   (exit "$ac_status"); }; }; then
27292   ac_cv_sizeof_bool=`cat conftest.val`
27293 else
27294   echo "$as_me: program exited with status $ac_status" >&5
27295 echo "$as_me: failed program was:" >&5
27296 cat "conftest.$ac_ext" >&5
27297 fi
27298 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27299 fi
27300 fi
27301 rm -f conftest.val
27302 else
27303   ac_cv_sizeof_bool=0
27304 fi
27305 fi
27306 echo "$as_me:27306: result: $ac_cv_sizeof_bool" >&5
27307 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27308 cat >>confdefs.h <<EOF
27309 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27310 EOF
27311
27312 echo "$as_me:27312: checking for type of bool" >&5
27313 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27314 if test "${cf_cv_type_of_bool+set}" = set; then
27315   echo $ECHO_N "(cached) $ECHO_C" >&6
27316 else
27317
27318         rm -f cf_test.out
27319         if test "$cross_compiling" = yes; then
27320
27321                 case x$ac_cv_sizeof_bool in
27322                 (x1) cf_cv_type_of_bool="unsigned char";;
27323                 (x2) cf_cv_type_of_bool="unsigned short";;
27324                 (x4) cf_cv_type_of_bool="unsigned int";;
27325                 (x8) cf_cv_type_of_bool="unsigned long";;
27326                 (*)  cf_cv_type_of_bool=unknown;;
27327                 esac
27328
27329 else
27330   cat >"conftest.$ac_ext" <<_ACEOF
27331 #line 27331 "configure"
27332 #include "confdefs.h"
27333
27334 $ac_includes_default
27335
27336 #if defined(__cplusplus)
27337
27338 #ifdef HAVE_GXX_BUILTIN_H
27339 #include <g++/builtin.h>
27340 #elif HAVE_GPP_BUILTIN_H
27341 #include <gpp/builtin.h>
27342 #elif HAVE_BUILTIN_H
27343 #include <builtin.h>
27344 #endif
27345
27346 #else
27347
27348 #if $cf_cv_header_stdbool_h
27349 #include <stdbool.h>
27350 #endif
27351
27352 #endif
27353
27354 int main(void)
27355 {
27356         FILE *fp = fopen("cf_test.out", "w");
27357         if (fp != 0) {
27358                 bool x = true;
27359                 if ((bool)(-x) >= 0)
27360                         fputs("unsigned ", fp);
27361                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27362                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27363                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27364                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27365                 fclose(fp);
27366         }
27367         ${cf_cv_main_return:-return}(0);
27368 }
27369
27370 _ACEOF
27371 rm -f "conftest$ac_exeext"
27372 if { (eval echo "$as_me:27372: \"$ac_link\"") >&5
27373   (eval $ac_link) 2>&5
27374   ac_status=$?
27375   echo "$as_me:27375: \$? = $ac_status" >&5
27376   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27377   { (eval echo "$as_me:27377: \"$ac_try\"") >&5
27378   (eval $ac_try) 2>&5
27379   ac_status=$?
27380   echo "$as_me:27380: \$? = $ac_status" >&5
27381   (exit "$ac_status"); }; }; then
27382   cf_cv_type_of_bool=`cat cf_test.out`
27383                  if test -z "$cf_cv_type_of_bool"; then
27384                    cf_cv_type_of_bool=unknown
27385                  fi
27386 else
27387   echo "$as_me: program exited with status $ac_status" >&5
27388 echo "$as_me: failed program was:" >&5
27389 cat "conftest.$ac_ext" >&5
27390 cf_cv_type_of_bool=unknown
27391 fi
27392 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27393 fi
27394         rm -f cf_test.out
27395
27396 fi
27397 echo "$as_me:27397: result: $cf_cv_type_of_bool" >&5
27398 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27399
27400 if test "$cf_cv_type_of_bool" = unknown ; then
27401         case .$NCURSES_BOOL in
27402         (.auto|.) NCURSES_BOOL=unsigned;;
27403         esac
27404         { echo "$as_me:27404: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27405 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27406         cf_cv_type_of_bool=$NCURSES_BOOL
27407 fi
27408
27409                 else
27410                         echo "$as_me:27410: checking for fallback type of bool" >&5
27411 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27412                         case "$host_cpu" in
27413                         (i?86)  cf_cv_type_of_bool=char ;;
27414                         (*)     cf_cv_type_of_bool=int  ;;
27415                         esac
27416                         echo "$as_me:27416: result: $cf_cv_type_of_bool" >&5
27417 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27418                 fi
27419         fi
27420 fi
27421
27422 # If the C compiler did not declare bool, and we did not determine that the C++
27423 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27424 # ncurses library use the same type as C++ bool.  Note that this allows one to
27425 # specify the type of bool in a configure-script option and postpone
27426 # integration with the C++ compiler provided that the types are compatible.
27427 USE_CXX_BOOL=1
27428 if test "$cf_cv_cc_bool_type" = 1
27429 then
27430         # oops: C has a bool.  Unlikely, but C++ could differ.
27431         USE_CXX_BOOL=0
27432 elif test "$cf_cv_builtin_bool" = 0
27433 then
27434         # C++ has no bool
27435         USE_CXX_BOOL=0
27436 else
27437         # this is the normal case
27438         USE_CXX_BOOL='defined(__cplusplus)'
27439 fi
27440
27441 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27442
27443         if test "$cf_with_ada" != "no" ; then
27444                 if test "$with_libtool" != "no"; then
27445                         { echo "$as_me:27445: WARNING: libtool does not support Ada - disabling feature" >&5
27446 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27447                         cf_with_ada=no
27448                 fi
27449         fi
27450
27451         if test "$cf_with_ada" != "no" ; then
27452
27453 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27454 do
27455
27456 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27457
27458         unset ac_cv_path_cf_TEMP_gnat
27459         unset cf_TEMP_gnat
27460         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27461 set dummy $cf_prog_gnat; ac_word=$2
27462 echo "$as_me:27462: checking for $ac_word" >&5
27463 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27464 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27465   echo $ECHO_N "(cached) $ECHO_C" >&6
27466 else
27467   case $cf_TEMP_gnat in
27468   [\\/]* | ?:[\\/]*)
27469   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27470   ;;
27471   *)
27472   ac_save_IFS=$IFS; IFS=$ac_path_separator
27473 ac_dummy="$PATH"
27474 for ac_dir in $ac_dummy; do
27475   IFS=$ac_save_IFS
27476   test -z "$ac_dir" && ac_dir=.
27477   if $as_executable_p "$ac_dir/$ac_word"; then
27478    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27479    echo "$as_me:27479: found $ac_dir/$ac_word" >&5
27480    break
27481 fi
27482 done
27483
27484   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27485   ;;
27486 esac
27487 fi
27488 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27489
27490 if test -n "$cf_TEMP_gnat"; then
27491   echo "$as_me:27491: result: $cf_TEMP_gnat" >&5
27492 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27493 else
27494   echo "$as_me:27494: result: no" >&5
27495 echo "${ECHO_T}no" >&6
27496 fi
27497
27498         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27499
27500         if test "x$cf_TEMP_gnat" != xno; then
27501                 unset cf_cv_gnat_version
27502                 unset cf_TEMP_gnat
27503
27504 echo "$as_me:27504: checking for $cf_prog_gnat version" >&5
27505 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27506 if test "${cf_cv_gnat_version+set}" = set; then
27507   echo $ECHO_N "(cached) $ECHO_C" >&6
27508 else
27509
27510 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27511         grep '[0-9].[0-9][0-9]*' |\
27512         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27513
27514 fi
27515 echo "$as_me:27515: result: $cf_cv_gnat_version" >&5
27516 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27517 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27518 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27519
27520         fi
27521         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27522
27523         unset cf_TEMP_gnat
27524         unset cf_cv_gnat_version
27525         unset ac_cv_path_cf_TEMP_gnat
27526 done
27527
27528 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27529         cf_ada_make=
27530         cf_cv_prog_gnat_correct=no
27531 else
27532         cf_ada_make=gnatmake
27533         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27534                 # gprconfig is newer than gnatmake; we can continue...
27535                 cf_ada_config="##"
27536         else
27537                 rm -rf ./conftest* ./*~conftest*
27538                 if mkdir conftest.src
27539                 then
27540                         cf_ada_config=""
27541                         cd conftest.src
27542                         for cf_gprconfig in Ada C
27543                         do
27544                                 echo "$as_me:27544: checking for gprconfig name for $cf_gprconfig" >&5
27545 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27546                                 if test "$cf_gprconfig" = C
27547                                 then
27548                                         for cf_gprconfig_param in \
27549                                                 "$cf_gprconfig,,,,GNATGCC" \
27550                                                 "$cf_gprconfig,,,,GCC" \
27551                                                 "$cf_gprconfig"
27552                                         do
27553                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27554                                                 test -n "$cf_gprconfig_value" && break
27555                                         done
27556                                 else
27557                                         cf_gprconfig_param=$cf_gprconfig
27558                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27559                                 fi
27560                                 if test -n "$cf_gprconfig_value"
27561                                 then
27562                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27563                                         echo "$as_me:27563: result: $cf_gprconfig_value" >&5
27564 echo "${ECHO_T}$cf_gprconfig_value" >&6
27565                                 else
27566                                         echo "$as_me:27566: result: missing" >&5
27567 echo "${ECHO_T}missing" >&6
27568                                         cf_ada_config="#"
27569                                         break
27570                                 fi
27571                         done
27572                         cd ..
27573                         rm -rf ./conftest* ./*~conftest*
27574                 fi
27575         fi
27576         if test "x$cf_ada_config" != "x#"
27577         then
27578
27579 echo "$as_me:27579: checking for gnat version" >&5
27580 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27581 if test "${cf_cv_gnat_version+set}" = set; then
27582   echo $ECHO_N "(cached) $ECHO_C" >&6
27583 else
27584
27585 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27586         grep '[0-9].[0-9][0-9]*' |\
27587         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27588
27589 fi
27590 echo "$as_me:27590: result: $cf_cv_gnat_version" >&5
27591 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27592 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27593
27594 case "$cf_cv_gnat_version" in
27595 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27596         cf_cv_prog_gnat_correct=yes
27597         ;;
27598 (*)
27599         { echo "$as_me:27599: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27600 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27601         cf_cv_prog_gnat_correct=no
27602         ;;
27603 esac
27604
27605                 # Extract the first word of "m4", so it can be a program name with args.
27606 set dummy m4; ac_word=$2
27607 echo "$as_me:27607: checking for $ac_word" >&5
27608 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27609 if test "${ac_cv_prog_M4_exists+set}" = set; then
27610   echo $ECHO_N "(cached) $ECHO_C" >&6
27611 else
27612   if test -n "$M4_exists"; then
27613   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27614 else
27615   ac_save_IFS=$IFS; IFS=$ac_path_separator
27616 ac_dummy="$PATH"
27617 for ac_dir in $ac_dummy; do
27618   IFS=$ac_save_IFS
27619   test -z "$ac_dir" && ac_dir=.
27620   $as_executable_p "$ac_dir/$ac_word" || continue
27621 ac_cv_prog_M4_exists="yes"
27622 echo "$as_me:27622: found $ac_dir/$ac_word" >&5
27623 break
27624 done
27625
27626   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27627 fi
27628 fi
27629 M4_exists=$ac_cv_prog_M4_exists
27630 if test -n "$M4_exists"; then
27631   echo "$as_me:27631: result: $M4_exists" >&5
27632 echo "${ECHO_T}$M4_exists" >&6
27633 else
27634   echo "$as_me:27634: result: no" >&5
27635 echo "${ECHO_T}no" >&6
27636 fi
27637
27638                 if test "$ac_cv_prog_M4_exists" = no; then
27639                         cf_cv_prog_gnat_correct=no
27640                         { echo "$as_me:27640: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27641 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27642                 fi
27643                 if test "$cf_cv_prog_gnat_correct" = yes; then
27644                         echo "$as_me:27644: checking if GNAT works" >&5
27645 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27646
27647 rm -rf ./conftest* ./*~conftest*
27648 cat >>conftest.ads <<CF_EOF
27649 procedure conftest;
27650 CF_EOF
27651 cat >>conftest.adb <<CF_EOF
27652 with Text_IO;
27653 with GNAT.OS_Lib;
27654 procedure conftest is
27655 begin
27656    Text_IO.Put ("Hello World");
27657    Text_IO.New_Line;
27658    GNAT.OS_Lib.OS_Exit (0);
27659 end conftest;
27660 CF_EOF
27661 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27662    if ( ./conftest 1>&5 2>&1 ) ; then
27663       cf_cv_prog_gnat_correct=yes
27664    else
27665       cf_cv_prog_gnat_correct=no
27666    fi
27667 else
27668    cf_cv_prog_gnat_correct=no
27669 fi
27670 rm -rf ./conftest* ./*~conftest*
27671
27672                         echo "$as_me:27672: result: $cf_cv_prog_gnat_correct" >&5
27673 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27674                 fi
27675         else
27676                 cf_cv_prog_gnat_correct=no
27677         fi
27678 fi
27679
27680                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27681
27682         ADAFLAGS="$ADAFLAGS -gnatpn"
27683
27684         echo "$as_me:27684: checking optimization options for ADAFLAGS" >&5
27685 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27686         case "$CFLAGS" in
27687         (*-g*)
27688
27689         ADAFLAGS="$ADAFLAGS -g"
27690
27691                 ;;
27692         esac
27693         case "$CFLAGS" in
27694         (*-O*)
27695                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27696
27697         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27698
27699                 ;;
27700         esac
27701         echo "$as_me:27701: result: $ADAFLAGS" >&5
27702 echo "${ECHO_T}$ADAFLAGS" >&6
27703
27704 echo "$as_me:27704: checking if GNATPREP supports -T option" >&5
27705 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27706 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27707   echo $ECHO_N "(cached) $ECHO_C" >&6
27708 else
27709
27710 cf_cv_gnatprep_opt_t=no
27711 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27712
27713 fi
27714 echo "$as_me:27714: result: $cf_cv_gnatprep_opt_t" >&5
27715 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27716 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27717
27718 echo "$as_me:27718: checking if GNAT supports generics" >&5
27719 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27720 case "$cf_cv_gnat_version" in
27721 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27722         cf_gnat_generics=yes
27723         ;;
27724 (*)
27725         cf_gnat_generics=no
27726         ;;
27727 esac
27728 echo "$as_me:27728: result: $cf_gnat_generics" >&5
27729 echo "${ECHO_T}$cf_gnat_generics" >&6
27730
27731 if test "$cf_gnat_generics" = yes
27732 then
27733         cf_compile_generics=generics
27734         cf_generic_objects="\${GENOBJS}"
27735 else
27736         cf_compile_generics=
27737         cf_generic_objects=
27738 fi
27739
27740 echo "$as_me:27740: checking if GNAT supports SIGINT" >&5
27741 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27742 if test "${cf_cv_gnat_sigint+set}" = set; then
27743   echo $ECHO_N "(cached) $ECHO_C" >&6
27744 else
27745
27746 rm -rf ./conftest* ./*~conftest*
27747 cat >>conftest.ads <<CF_EOF
27748 with Ada.Interrupts.Names;
27749
27750 package ConfTest is
27751
27752    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27753    pragma Unreserve_All_Interrupts;
27754    pragma Warnings (On);
27755
27756    protected Process is
27757       procedure Stop;
27758       function Continue return Boolean;
27759       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27760    private
27761       Done : Boolean := False;
27762    end Process;
27763
27764 end ConfTest;
27765 CF_EOF
27766 cat >>conftest.adb <<CF_EOF
27767 package body ConfTest is
27768    protected body Process is
27769       procedure Stop is
27770       begin
27771          Done := True;
27772       end Stop;
27773       function Continue return Boolean is
27774       begin
27775          return not Done;
27776       end Continue;
27777    end Process;
27778 end ConfTest;
27779 CF_EOF
27780 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27781       cf_cv_gnat_sigint=yes
27782 else
27783    cf_cv_gnat_sigint=no
27784 fi
27785 rm -rf ./conftest* ./*~conftest*
27786
27787 fi
27788 echo "$as_me:27788: result: $cf_cv_gnat_sigint" >&5
27789 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27790
27791 if test "$cf_cv_gnat_sigint" = yes ; then
27792         USE_GNAT_SIGINT=""
27793 else
27794         USE_GNAT_SIGINT="#"
27795 fi
27796
27797 cf_gnat_libraries=no
27798 cf_gnat_projects=no
27799
27800 if test "$enable_gnat_projects" != no ; then
27801 echo "$as_me:27801: checking if GNAT supports project files" >&5
27802 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27803 case "$cf_cv_gnat_version" in
27804 (3.[0-9]*)
27805         ;;
27806 (*)
27807         case "$cf_cv_system_name" in
27808         (cygwin*|msys*)
27809                 ;;
27810         (*)
27811                 rm -rf ./conftest* ./*~conftest*
27812                 if mkdir conftest.src conftest.bin conftest.lib
27813                 then
27814                         cd conftest.src
27815                         rm -rf ./conftest* ./*~conftest*
27816                         cat >>library.gpr <<CF_EOF
27817 project Library is
27818   Kind := External ("LIB_KIND");
27819   for Library_Name use "ConfTest";
27820   for Object_Dir use ".";
27821   for Library_ALI_Dir use External("LIBRARY_DIR");
27822   for Library_Version use External ("SONAME");
27823   for Library_Kind use Kind;
27824   for Library_Dir use External("BUILD_DIR");
27825   Source_Dir := External ("SOURCE_DIR");
27826   for Source_Dirs use (Source_Dir);
27827 end Library;
27828 CF_EOF
27829                         cat >>confpackage.ads <<CF_EOF
27830 package ConfPackage is
27831    procedure conftest;
27832 end ConfPackage;
27833 CF_EOF
27834                         cat >>confpackage.adb <<CF_EOF
27835 with Text_IO;
27836 package body ConfPackage is
27837    procedure conftest is
27838    begin
27839       Text_IO.Put ("Hello World");
27840       Text_IO.New_Line;
27841    end conftest;
27842 end ConfPackage;
27843 CF_EOF
27844                         if ( "$cf_ada_make" $ADAFLAGS \
27845                                         -Plibrary.gpr \
27846                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27847                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27848                                         -XSOURCE_DIR="`pwd`" \
27849                                         -XSONAME=libConfTest.so.1 \
27850                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27851                                 cf_gnat_projects=yes
27852                         fi
27853                         cd ..
27854                 fi
27855                 if test -f conftest.lib/confpackage.ali
27856                 then
27857                         cf_gnat_libraries=yes
27858                 fi
27859                 rm -rf ./conftest* ./*~conftest*
27860                 ;;
27861         esac
27862         ;;
27863 esac
27864 echo "$as_me:27864: result: $cf_gnat_projects" >&5
27865 echo "${ECHO_T}$cf_gnat_projects" >&6
27866 fi # enable_gnat_projects
27867
27868 if test "$cf_gnat_projects" = yes
27869 then
27870         echo "$as_me:27870: checking if GNAT supports libraries" >&5
27871 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27872         echo "$as_me:27872: result: $cf_gnat_libraries" >&5
27873 echo "${ECHO_T}$cf_gnat_libraries" >&6
27874 fi
27875
27876 USE_OLD_MAKERULES=""
27877 USE_GNAT_PROJECTS="#"
27878 USE_GNAT_MAKE_GPR="#"
27879 USE_GNAT_GPRBUILD="#"
27880
27881 if test "$cf_gnat_projects" = yes
27882 then
27883         USE_OLD_MAKERULES="#"
27884         USE_GNAT_PROJECTS=""
27885         if test "$cf_cv_VERSION_GPRBUILD" != no
27886         then
27887                 USE_GNAT_GPRBUILD=""
27888         elif test "$cf_cv_VERSION_GNATMAKE" != no
27889         then
27890                 USE_GNAT_MAKE_GPR=""
27891         else
27892                 { echo "$as_me:27892: WARNING: use old makefile rules since tools are missing" >&5
27893 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27894         fi
27895 fi
27896
27897 if test "$cf_gnat_libraries" = yes
27898 then
27899         USE_GNAT_LIBRARIES=""
27900 else
27901         USE_GNAT_LIBRARIES="#"
27902 fi
27903
27904 echo "$as_me:27904: checking for Ada95 compiler" >&5
27905 echo $ECHO_N "checking for Ada95 compiler... $ECHO_C" >&6
27906
27907 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27908 if test "${with_ada_compiler+set}" = set; then
27909   withval="$with_ada_compiler"
27910   cf_ada_compiler=$withval
27911 else
27912   cf_ada_compiler=gnatmake
27913 fi;
27914
27915 echo "$as_me:27915: result: $cf_ada_compiler" >&5
27916 echo "${ECHO_T}$cf_ada_compiler" >&6
27917
27918                         cf_ada_package=terminal_interface
27919
27920 echo "$as_me:27920: checking for Ada95 include directory" >&5
27921 echo $ECHO_N "checking for Ada95 include directory... $ECHO_C" >&6
27922
27923 # Check whether --with-ada-include or --without-ada-include was given.
27924 if test "${with_ada_include+set}" = set; then
27925   withval="$with_ada_include"
27926
27927 else
27928   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27929 fi; if test -n "$prefix/share/ada/adainclude" ; then
27930
27931 if test "x$prefix" != xNONE; then
27932         cf_path_syntax="$prefix"
27933 else
27934         cf_path_syntax="$ac_default_prefix"
27935 fi
27936
27937 case ".$withval" in
27938 (.\$\(*\)*|.\'*\'*)
27939         ;;
27940 (..|./*|.\\*)
27941         ;;
27942 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27943         ;;
27944 (.\$\{*prefix\}*|.\$\{*dir\}*)
27945         eval withval="$withval"
27946         case ".$withval" in
27947         (.NONE/*)
27948                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27949                 ;;
27950         esac
27951         ;;
27952 (.no|.NONE/*)
27953         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27954         ;;
27955 (*)
27956         { { echo "$as_me:27956: error: expected a pathname, not \"$withval\"" >&5
27957 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27958    { (exit 1); exit 1; }; }
27959         ;;
27960 esac
27961
27962 fi
27963 eval ADA_INCLUDE="$withval"
27964
27965 echo "$as_me:27965: result: $ADA_INCLUDE" >&5
27966 echo "${ECHO_T}$ADA_INCLUDE" >&6
27967
27968 echo "$as_me:27968: checking for Ada95 object directory" >&5
27969 echo $ECHO_N "checking for Ada95 object directory... $ECHO_C" >&6
27970
27971 # Check whether --with-ada-objects or --without-ada-objects was given.
27972 if test "${with_ada_objects+set}" = set; then
27973   withval="$with_ada_objects"
27974
27975 else
27976   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27977 fi; if test -n "$prefix/lib/ada/adalib" ; then
27978
27979 if test "x$prefix" != xNONE; then
27980         cf_path_syntax="$prefix"
27981 else
27982         cf_path_syntax="$ac_default_prefix"
27983 fi
27984
27985 case ".$withval" in
27986 (.\$\(*\)*|.\'*\'*)
27987         ;;
27988 (..|./*|.\\*)
27989         ;;
27990 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27991         ;;
27992 (.\$\{*prefix\}*|.\$\{*dir\}*)
27993         eval withval="$withval"
27994         case ".$withval" in
27995         (.NONE/*)
27996                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27997                 ;;
27998         esac
27999         ;;
28000 (.no|.NONE/*)
28001         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
28002         ;;
28003 (*)
28004         { { echo "$as_me:28004: error: expected a pathname, not \"$withval\"" >&5
28005 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
28006    { (exit 1); exit 1; }; }
28007         ;;
28008 esac
28009
28010 fi
28011 eval ADA_OBJECTS="$withval"
28012
28013 echo "$as_me:28013: result: $ADA_OBJECTS" >&5
28014 echo "${ECHO_T}$ADA_OBJECTS" >&6
28015
28016 echo "$as_me:28016: checking whether to build an Ada95 shared library" >&5
28017 echo $ECHO_N "checking whether to build an Ada95 shared library... $ECHO_C" >&6
28018
28019 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
28020 if test "${with_ada_sharedlib+set}" = set; then
28021   withval="$with_ada_sharedlib"
28022   with_ada_sharedlib=$withval
28023 else
28024   with_ada_sharedlib=no
28025 fi;
28026 cf_ada_sharedlib_warn=no
28027
28028 if test "x$with_ada_sharedlib" != xno
28029 then
28030         if test "x$cf_gnat_projects" != xyes
28031         then
28032                 with_ada_sharedlib=no
28033                 cf_ada_sharedlib_warn=yes
28034         fi
28035 fi
28036
28037 echo "$as_me:28037: result: $with_ada_sharedlib" >&5
28038 echo "${ECHO_T}$with_ada_sharedlib" >&6
28039 if test "x$cf_ada_sharedlib_warn" != xno
28040 then
28041         { echo "$as_me:28041: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&5
28042 echo "$as_me: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&2;}
28043 fi
28044
28045 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
28046 MAKE_ADA_SHAREDLIB="#"
28047
28048 if test "x$with_ada_sharedlib" != xno
28049 then
28050         MAKE_ADA_SHAREDLIB=
28051         if test "x$with_ada_sharedlib" != xyes
28052         then
28053                 ADA_SHAREDLIB="$with_ada_sharedlib"
28054         fi
28055 fi
28056
28057                         # allow the Ada binding to be renamed
28058
28059 echo "$as_me:28059: checking for Ada95 curses library name" >&5
28060 echo $ECHO_N "checking for Ada95 curses library name... $ECHO_C" >&6
28061
28062 # Check whether --with-ada-libname or --without-ada-libname was given.
28063 if test "${with_ada_libname+set}" = set; then
28064   withval="$with_ada_libname"
28065   ADA_LIBNAME=$withval
28066 else
28067   ADA_LIBNAME=AdaCurses
28068 fi;
28069 case "x$ADA_LIBNAME" in
28070 (x|xyes|xno)
28071         ADA_LIBNAME=AdaCurses
28072         ;;
28073 esac
28074
28075 echo "$as_me:28075: result: $ADA_LIBNAME" >&5
28076 echo "${ECHO_T}$ADA_LIBNAME" >&6
28077
28078                 fi
28079         fi
28080 else
28081         cf_with_ada=no
28082 fi
28083
28084 # do this "late" to avoid conflict with header-checks
28085 if test "x$with_widec" = xyes ; then
28086         echo "$as_me:28086: checking for wchar_t" >&5
28087 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
28088 if test "${ac_cv_type_wchar_t+set}" = set; then
28089   echo $ECHO_N "(cached) $ECHO_C" >&6
28090 else
28091   cat >"conftest.$ac_ext" <<_ACEOF
28092 #line 28092 "configure"
28093 #include "confdefs.h"
28094 $ac_includes_default
28095 int
28096 main (void)
28097 {
28098 if ((wchar_t *) 0)
28099   return 0;
28100 if (sizeof (wchar_t))
28101   return 0;
28102   ;
28103   return 0;
28104 }
28105 _ACEOF
28106 rm -f "conftest.$ac_objext"
28107 if { (eval echo "$as_me:28107: \"$ac_compile\"") >&5
28108   (eval $ac_compile) 2>&5
28109   ac_status=$?
28110   echo "$as_me:28110: \$? = $ac_status" >&5
28111   (exit "$ac_status"); } &&
28112          { ac_try='test -s "conftest.$ac_objext"'
28113   { (eval echo "$as_me:28113: \"$ac_try\"") >&5
28114   (eval $ac_try) 2>&5
28115   ac_status=$?
28116   echo "$as_me:28116: \$? = $ac_status" >&5
28117   (exit "$ac_status"); }; }; then
28118   ac_cv_type_wchar_t=yes
28119 else
28120   echo "$as_me: failed program was:" >&5
28121 cat "conftest.$ac_ext" >&5
28122 ac_cv_type_wchar_t=no
28123 fi
28124 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28125 fi
28126 echo "$as_me:28126: result: $ac_cv_type_wchar_t" >&5
28127 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
28128
28129 echo "$as_me:28129: checking size of wchar_t" >&5
28130 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
28131 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
28132   echo $ECHO_N "(cached) $ECHO_C" >&6
28133 else
28134   if test "$ac_cv_type_wchar_t" = yes; then
28135   if test "$cross_compiling" = yes; then
28136   # Depending upon the size, compute the lo and hi bounds.
28137 cat >"conftest.$ac_ext" <<_ACEOF
28138 #line 28138 "configure"
28139 #include "confdefs.h"
28140 $ac_includes_default
28141 int
28142 main (void)
28143 {
28144 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
28145   ;
28146   return 0;
28147 }
28148 _ACEOF
28149 rm -f "conftest.$ac_objext"
28150 if { (eval echo "$as_me:28150: \"$ac_compile\"") >&5
28151   (eval $ac_compile) 2>&5
28152   ac_status=$?
28153   echo "$as_me:28153: \$? = $ac_status" >&5
28154   (exit "$ac_status"); } &&
28155          { ac_try='test -s "conftest.$ac_objext"'
28156   { (eval echo "$as_me:28156: \"$ac_try\"") >&5
28157   (eval $ac_try) 2>&5
28158   ac_status=$?
28159   echo "$as_me:28159: \$? = $ac_status" >&5
28160   (exit "$ac_status"); }; }; then
28161   ac_lo=0 ac_mid=0
28162   while :; do
28163     cat >"conftest.$ac_ext" <<_ACEOF
28164 #line 28164 "configure"
28165 #include "confdefs.h"
28166 $ac_includes_default
28167 int
28168 main (void)
28169 {
28170 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28171   ;
28172   return 0;
28173 }
28174 _ACEOF
28175 rm -f "conftest.$ac_objext"
28176 if { (eval echo "$as_me:28176: \"$ac_compile\"") >&5
28177   (eval $ac_compile) 2>&5
28178   ac_status=$?
28179   echo "$as_me:28179: \$? = $ac_status" >&5
28180   (exit "$ac_status"); } &&
28181          { ac_try='test -s "conftest.$ac_objext"'
28182   { (eval echo "$as_me:28182: \"$ac_try\"") >&5
28183   (eval $ac_try) 2>&5
28184   ac_status=$?
28185   echo "$as_me:28185: \$? = $ac_status" >&5
28186   (exit "$ac_status"); }; }; then
28187   ac_hi=$ac_mid; break
28188 else
28189   echo "$as_me: failed program was:" >&5
28190 cat "conftest.$ac_ext" >&5
28191 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
28192 fi
28193 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28194   done
28195 else
28196   echo "$as_me: failed program was:" >&5
28197 cat "conftest.$ac_ext" >&5
28198 ac_hi=-1 ac_mid=-1
28199   while :; do
28200     cat >"conftest.$ac_ext" <<_ACEOF
28201 #line 28201 "configure"
28202 #include "confdefs.h"
28203 $ac_includes_default
28204 int
28205 main (void)
28206 {
28207 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
28208   ;
28209   return 0;
28210 }
28211 _ACEOF
28212 rm -f "conftest.$ac_objext"
28213 if { (eval echo "$as_me:28213: \"$ac_compile\"") >&5
28214   (eval $ac_compile) 2>&5
28215   ac_status=$?
28216   echo "$as_me:28216: \$? = $ac_status" >&5
28217   (exit "$ac_status"); } &&
28218          { ac_try='test -s "conftest.$ac_objext"'
28219   { (eval echo "$as_me:28219: \"$ac_try\"") >&5
28220   (eval $ac_try) 2>&5
28221   ac_status=$?
28222   echo "$as_me:28222: \$? = $ac_status" >&5
28223   (exit "$ac_status"); }; }; then
28224   ac_lo=$ac_mid; break
28225 else
28226   echo "$as_me: failed program was:" >&5
28227 cat "conftest.$ac_ext" >&5
28228 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
28229 fi
28230 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28231   done
28232 fi
28233 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28234 # Binary search between lo and hi bounds.
28235 while test "x$ac_lo" != "x$ac_hi"; do
28236   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28237   cat >"conftest.$ac_ext" <<_ACEOF
28238 #line 28238 "configure"
28239 #include "confdefs.h"
28240 $ac_includes_default
28241 int
28242 main (void)
28243 {
28244 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28245   ;
28246   return 0;
28247 }
28248 _ACEOF
28249 rm -f "conftest.$ac_objext"
28250 if { (eval echo "$as_me:28250: \"$ac_compile\"") >&5
28251   (eval $ac_compile) 2>&5
28252   ac_status=$?
28253   echo "$as_me:28253: \$? = $ac_status" >&5
28254   (exit "$ac_status"); } &&
28255          { ac_try='test -s "conftest.$ac_objext"'
28256   { (eval echo "$as_me:28256: \"$ac_try\"") >&5
28257   (eval $ac_try) 2>&5
28258   ac_status=$?
28259   echo "$as_me:28259: \$? = $ac_status" >&5
28260   (exit "$ac_status"); }; }; then
28261   ac_hi=$ac_mid
28262 else
28263   echo "$as_me: failed program was:" >&5
28264 cat "conftest.$ac_ext" >&5
28265 ac_lo=`expr "$ac_mid" + 1`
28266 fi
28267 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28268 done
28269 ac_cv_sizeof_wchar_t=$ac_lo
28270 else
28271   if test "$cross_compiling" = yes; then
28272   { { echo "$as_me:28272: error: cannot run test program while cross compiling" >&5
28273 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28274    { (exit 1); exit 1; }; }
28275 else
28276   cat >"conftest.$ac_ext" <<_ACEOF
28277 #line 28277 "configure"
28278 #include "confdefs.h"
28279 $ac_includes_default
28280 int
28281 main (void)
28282 {
28283 FILE *f = fopen ("conftest.val", "w");
28284 if (!f)
28285   $ac_main_return (1);
28286 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28287 fclose (f);
28288   ;
28289   return 0;
28290 }
28291 _ACEOF
28292 rm -f "conftest$ac_exeext"
28293 if { (eval echo "$as_me:28293: \"$ac_link\"") >&5
28294   (eval $ac_link) 2>&5
28295   ac_status=$?
28296   echo "$as_me:28296: \$? = $ac_status" >&5
28297   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28298   { (eval echo "$as_me:28298: \"$ac_try\"") >&5
28299   (eval $ac_try) 2>&5
28300   ac_status=$?
28301   echo "$as_me:28301: \$? = $ac_status" >&5
28302   (exit "$ac_status"); }; }; then
28303   ac_cv_sizeof_wchar_t=`cat conftest.val`
28304 else
28305   echo "$as_me: program exited with status $ac_status" >&5
28306 echo "$as_me: failed program was:" >&5
28307 cat "conftest.$ac_ext" >&5
28308 fi
28309 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28310 fi
28311 fi
28312 rm -f conftest.val
28313 else
28314   ac_cv_sizeof_wchar_t=0
28315 fi
28316 fi
28317 echo "$as_me:28317: result: $ac_cv_sizeof_wchar_t" >&5
28318 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28319 cat >>confdefs.h <<EOF
28320 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28321 EOF
28322
28323         # cross-compiling to mingw can run into the problem that attempting to
28324         # link with the regex library fails, causing the test to not set this to
28325         # a number.  "recent" autoconf does not address this problem either -TD
28326         if test -z "$ac_cv_sizeof_wchar_t"
28327         then
28328                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28329
28330 echo "${as_me:-configure}:28330: testing test failed (assume 2) ..." 1>&5
28331
28332                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28333                 mv confdefs.tmp confdefs.h
28334                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28335         fi
28336 fi
28337
28338 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28339 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28340 ###
28341 ### ticlib modules may be a separate library, otherwise contained in termlib.
28342 ### termlib modules may be a separate library, otherwise contained in ncurses.
28343 ###
28344 ### The of "+" or " " between the tokens controls the way the script
28345 ### chooses to split module lists into libraries.
28346 ###
28347 ### (see CF_LIB_RULES).
28348 echo "$as_me:28348: checking for library subsets" >&5
28349 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28350 LIB_SUBSETS=
28351
28352 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28353         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28354         if test "$with_ticlib" != no ; then
28355                 LIB_SUBSETS="${LIB_SUBSETS} "
28356         else
28357                 LIB_SUBSETS="${LIB_SUBSETS}+"
28358         fi
28359 fi
28360
28361 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28362 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28363
28364 if test "$with_termlib" != no ; then
28365         LIB_SUBSETS="${LIB_SUBSETS} "
28366 else
28367         LIB_SUBSETS="${LIB_SUBSETS}+"
28368 fi
28369
28370 LIB_SUBSETS="${LIB_SUBSETS}base"
28371
28372 # Most term-driver calls are to tinfo, but some like init_pair are to the
28373 # base library (so it resides in base).
28374 if test "$with_term_driver" != no ; then
28375         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28376         case "$cf_cv_system_name" in
28377         (*mingw32*|*mingw64*)
28378                 if test "x$with_exp_win32" = xyes ; then
28379                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28380                 else
28381                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28382                 fi
28383                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28384                 ;;
28385         (*)
28386                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28387                 ;;
28388         esac
28389 elif test "x$with_exp_win32" = xyes ; then
28390         case "$cf_cv_system_name" in
28391         (*mingw32*|*mingw64*)
28392                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28393                 ;;
28394         (*)
28395                 ;;
28396         esac
28397 fi
28398
28399 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28400 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28401
28402 echo "$as_me:28402: result: $LIB_SUBSETS" >&5
28403 echo "${ECHO_T}$LIB_SUBSETS" >&6
28404
28405 ### Construct the list of include-directories to be generated
28406
28407 if test "$srcdir" != "."; then
28408         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28409 fi
28410 CPPFLAGS="-I../include $CPPFLAGS"
28411 if test "$srcdir" != "."; then
28412         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28413 fi
28414 CPPFLAGS="-I. $CPPFLAGS"
28415
28416 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28417 if test "$srcdir" != "."; then
28418         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28419 fi
28420 if test "$GCC" != yes; then
28421         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28422 elif test "$includedir" != "/usr/include"; then
28423         if test "$includedir" = '${prefix}/include' ; then
28424                 if test x$prefix != x/usr ; then
28425                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28426                 fi
28427         else
28428                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28429         fi
28430 fi
28431
28432 ### Build up pieces for makefile rules
28433 echo "$as_me:28433: checking default library suffix" >&5
28434 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28435
28436         case $DFT_LWR_MODEL in
28437         (libtool) DFT_ARG_SUFFIX=''   ;;
28438         (normal)  DFT_ARG_SUFFIX=''   ;;
28439         (debug)   DFT_ARG_SUFFIX='_g' ;;
28440         (profile) DFT_ARG_SUFFIX='_p' ;;
28441         (shared)  DFT_ARG_SUFFIX=''   ;;
28442         esac
28443         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28444 echo "$as_me:28444: result: $DFT_ARG_SUFFIX" >&5
28445 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28446
28447 echo "$as_me:28447: checking default library-dependency suffix" >&5
28448 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28449
28450         case X$DFT_LWR_MODEL in
28451         (Xlibtool)
28452                 DFT_LIB_SUFFIX='.la'
28453                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28454                 ;;
28455         (Xdebug)
28456                 case "$cf_cv_system_name" in
28457                 (*-msvc*)
28458                         DFT_LIB_SUFFIX='_g.lib'
28459                         ;;
28460                 (*)
28461                         DFT_LIB_SUFFIX='_g.a'
28462                         ;;
28463                 esac
28464                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28465                 ;;
28466         (Xprofile)
28467                 case "$cf_cv_system_name" in
28468                 (*-msvc*)
28469                         DFT_LIB_SUFFIX='_p.lib'
28470                         ;;
28471                 (*)
28472                         DFT_LIB_SUFFIX='_p.a'
28473                         ;;
28474                 esac
28475                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28476                 ;;
28477         (Xshared)
28478                 case "$cf_cv_system_name" in
28479                 (aix[5-7]*)
28480                         DFT_LIB_SUFFIX='.so'
28481                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28482                         ;;
28483                 (*-msvc*)
28484                         DFT_LIB_SUFFIX='.dll'
28485                         DFT_DEP_SUFFIX='.dll.lib'
28486                         ;;
28487                 (cygwin*|msys*|mingw*)
28488                         DFT_LIB_SUFFIX='.dll'
28489                         DFT_DEP_SUFFIX='.dll.a'
28490                         ;;
28491                 (darwin*)
28492                         DFT_LIB_SUFFIX='.dylib'
28493                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28494                         ;;
28495                 (hpux*)
28496                         case "$target" in
28497                         (ia64*)
28498                                 DFT_LIB_SUFFIX='.so'
28499                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28500                                 ;;
28501                         (*)
28502                                 DFT_LIB_SUFFIX='.sl'
28503                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28504                                 ;;
28505                         esac
28506                         ;;
28507                 (*)
28508                         DFT_LIB_SUFFIX='.so'
28509                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28510                         ;;
28511                 esac
28512                 ;;
28513         (*)
28514                 case "$target" in
28515                 (*-msvc*)
28516                         DFT_LIB_SUFFIX='.lib'
28517                         ;;
28518                 (*)
28519                         DFT_LIB_SUFFIX='.a'
28520                         ;;
28521                 esac
28522                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28523                 ;;
28524         esac
28525         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28526         then
28527                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28528                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28529         fi
28530 echo "$as_me:28530: result: $DFT_DEP_SUFFIX" >&5
28531 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28532
28533 echo "$as_me:28533: checking default object directory" >&5
28534 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28535
28536         case $DFT_LWR_MODEL in
28537         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28538         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28539         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28540         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28541         (shared)
28542                 case "$cf_cv_system_name" in
28543                 (cygwin|msys)
28544                         DFT_OBJ_SUBDIR='objects' ;;
28545                 (*)
28546                         DFT_OBJ_SUBDIR='obj_s' ;;
28547                 esac
28548         esac
28549 echo "$as_me:28549: result: $DFT_OBJ_SUBDIR" >&5
28550 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28551
28552 if test "x$cf_with_cxx" = xyes ; then
28553 echo "$as_me:28553: checking c++ library-dependency suffix" >&5
28554 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28555 if test "$with_libtool" != "no"; then
28556         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28557         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28558 elif test "$with_shared_cxx" != "no"; then
28559         # also for g++ users...
28560         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28561 else
28562         # we normally make a static library because C/C++ library rules differ
28563
28564         case Xnormal in
28565         (Xlibtool)
28566                 CXX_LIB_SUFFIX='.la'
28567                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28568                 ;;
28569         (Xdebug)
28570                 case "$cf_cv_system_name" in
28571                 (*-msvc*)
28572                         CXX_LIB_SUFFIX='_g.lib'
28573                         ;;
28574                 (*)
28575                         CXX_LIB_SUFFIX='_g.a'
28576                         ;;
28577                 esac
28578                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28579                 ;;
28580         (Xprofile)
28581                 case "$cf_cv_system_name" in
28582                 (*-msvc*)
28583                         CXX_LIB_SUFFIX='_p.lib'
28584                         ;;
28585                 (*)
28586                         CXX_LIB_SUFFIX='_p.a'
28587                         ;;
28588                 esac
28589                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28590                 ;;
28591         (Xshared)
28592                 case "$cf_cv_system_name" in
28593                 (aix[5-7]*)
28594                         CXX_LIB_SUFFIX='.so'
28595                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28596                         ;;
28597                 (*-msvc*)
28598                         CXX_LIB_SUFFIX='.dll'
28599                         CXX_DEP_SUFFIX='.dll.lib'
28600                         ;;
28601                 (cygwin*|msys*|mingw*)
28602                         CXX_LIB_SUFFIX='.dll'
28603                         CXX_DEP_SUFFIX='.dll.a'
28604                         ;;
28605                 (darwin*)
28606                         CXX_LIB_SUFFIX='.dylib'
28607                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28608                         ;;
28609                 (hpux*)
28610                         case "$target" in
28611                         (ia64*)
28612                                 CXX_LIB_SUFFIX='.so'
28613                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28614                                 ;;
28615                         (*)
28616                                 CXX_LIB_SUFFIX='.sl'
28617                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28618                                 ;;
28619                         esac
28620                         ;;
28621                 (*)
28622                         CXX_LIB_SUFFIX='.so'
28623                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28624                         ;;
28625                 esac
28626                 ;;
28627         (*)
28628                 case "$target" in
28629                 (*-msvc*)
28630                         CXX_LIB_SUFFIX='.lib'
28631                         ;;
28632                 (*)
28633                         CXX_LIB_SUFFIX='.a'
28634                         ;;
28635                 esac
28636                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28637                 ;;
28638         esac
28639         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28640         then
28641                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28642                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28643         fi
28644
28645 fi
28646 echo "$as_me:28646: result: $CXX_LIB_SUFFIX" >&5
28647 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28648
28649 fi
28650
28651 # do not want -ldl in build except as needed for -lncurses dependency
28652 if test "x$with_dlsym" = xyes ; then
28653 if test "$DFT_LWR_MODEL" = shared || \
28654    test "$DFT_LWR_MODEL" = libtool ; then
28655
28656 # remove dl library from $LIBS
28657 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28658
28659 fi
28660 fi
28661 ### Set up low-level terminfo dependencies for makefiles.
28662
28663 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28664 # do not need libdl
28665 TICS_LIST=
28666 if test "x$with_dlsym" = xyes ; then
28667
28668 # remove dl library from $SHLIB_LIST
28669 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28670
28671 fi
28672
28673 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28674 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28675 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28676 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28677 then
28678         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28679 fi
28680
28681 if test "$with_ticlib" != no ; then
28682
28683         if test "x$with_ticlib" != xyes ; then
28684                 TICS_NAME=$with_ticlib
28685                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28686                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28687                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28688                 TICS_LIB_SUFFIX="${with_ticlib}"
28689         else
28690                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28691                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28692                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28693                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28694         fi
28695         TICS_LDFLAGS="-L${LIB_DIR}"
28696         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28697 else
28698         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28699         TICS_LDFLAGS="-L${LIB_DIR}"
28700         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28701 fi
28702
28703 if test "$with_termlib" != no ; then
28704
28705         if test "x$with_termlib" != xyes ; then
28706                 TINFO_NAME=$with_termlib
28707                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28708                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28709                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28710                 TINFO_LIB_SUFFIX="${with_termlib}"
28711         else
28712                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28713                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28714                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28715                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28716         fi
28717
28718         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28719         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28720         if test "$DFT_LWR_MODEL" = "libtool"; then
28721                 TEST_ARGS="${TEST_DEPS}"
28722                 TEST_ARG2="${TEST_DEP2}"
28723                 TINFO_LDFLAGS="-L${LIB_DIR}"
28724                 TINFO_LIBS="$TEST_ARGS"
28725                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28726                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28727         else
28728                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28729                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28730                 if test "x$with_term_driver" != xno ; then
28731                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28732                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28733                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28734                 else
28735                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28736                         TINFO_LIBS="$TEST_ARGS"
28737                 fi
28738                 TINFO_LDFLAGS="-L${LIB_DIR}"
28739                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28740         fi
28741 else
28742         # the next lines are needed for linking libtic over libncurses
28743         TINFO_NAME=${LIB_NAME}
28744         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28745         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28746         if test "x$with_tic_depends" = xyes ; then
28747                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28748         else
28749                 TICS_LIST="$SHLIB_LIST"
28750         fi
28751
28752         TINFO_LDFLAGS="-L${LIB_DIR}"
28753         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28754 fi
28755
28756 if test "$DFT_LWR_MODEL" = shared ; then
28757         case "$cf_cv_system_name" in
28758         (cygwin*|msys*)
28759                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28760                 TINFO_SUFFIX=.dll
28761                 ;;
28762         esac
28763 fi
28764
28765 if test "x$with_dlsym" = xyes ; then
28766
28767 # remove dl library from $TICS_LIST
28768 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28769
28770 fi
28771
28772 if test "$DFT_LWR_MODEL" = "libtool"; then
28773         OBJEXT=lo
28774 fi
28775
28776 # needed for Ada95
28777 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28778
28779 case "$DFT_LWR_MODEL" in
28780 (normal|debug|profile)
28781
28782 if test "$GCC" = yes ; then
28783         case "$cf_cv_system_name" in
28784         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28785                 LDFLAGS_STATIC=
28786                 LDFLAGS_SHARED=
28787                 ;;
28788         (*)     # normally, except when broken
28789                 LDFLAGS_STATIC=-static
28790                 LDFLAGS_SHARED=-dynamic
28791                 ;;
28792         esac
28793 else
28794         case "$cf_cv_system_name" in
28795         (aix[4-7]*)     # from ld manpage
28796                 LDFLAGS_STATIC=-bstatic
28797                 LDFLAGS_SHARED=-bdynamic
28798                 ;;
28799         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28800                 # We could also use just "archive" and "shared".
28801                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28802                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28803                 ;;
28804         (irix*)         # from ld manpage IRIX64
28805                 LDFLAGS_STATIC=-Bstatic
28806                 LDFLAGS_SHARED=-Bdynamic
28807                 ;;
28808         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28809                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28810                 LDFLAGS_STATIC=-noso
28811                 LDFLAGS_SHARED=-so_archive
28812                 ;;
28813         (solaris2*)
28814                 LDFLAGS_STATIC=-Bstatic
28815                 LDFLAGS_SHARED=-Bdynamic
28816                 ;;
28817         esac
28818 fi
28819
28820 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28821 then
28822         echo "$as_me:28822: checking if linker supports switching between static/dynamic" >&5
28823 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28824
28825         rm -f libconftest.a
28826         cat >conftest.$ac_ext <<EOF
28827 #line 28827 "configure"
28828 #include <stdio.h>
28829 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28830 EOF
28831         if { (eval echo "$as_me:28831: \"$ac_compile\"") >&5
28832   (eval $ac_compile) 2>&5
28833   ac_status=$?
28834   echo "$as_me:28834: \$? = $ac_status" >&5
28835   (exit "$ac_status"); } ; then
28836                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28837                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28838         fi
28839         rm -f conftest.*
28840
28841         cf_save_LIBS="$LIBS"
28842
28843         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28844         cat >"conftest.$ac_ext" <<_ACEOF
28845 #line 28845 "configure"
28846 #include "confdefs.h"
28847
28848 #line 28848 "configure"
28849 #include <stdio.h>
28850 int cf_ldflags_static(FILE *fp);
28851
28852 int
28853 main (void)
28854 {
28855
28856         return cf_ldflags_static(stdin);
28857
28858   ;
28859   return 0;
28860 }
28861 _ACEOF
28862 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28863 if { (eval echo "$as_me:28863: \"$ac_link\"") >&5
28864   (eval $ac_link) 2>&5
28865   ac_status=$?
28866   echo "$as_me:28866: \$? = $ac_status" >&5
28867   (exit "$ac_status"); } &&
28868          { ac_try='test -s "conftest$ac_exeext"'
28869   { (eval echo "$as_me:28869: \"$ac_try\"") >&5
28870   (eval $ac_try) 2>&5
28871   ac_status=$?
28872   echo "$as_me:28872: \$? = $ac_status" >&5
28873   (exit "$ac_status"); }; }; then
28874
28875         # some linkers simply ignore the -dynamic
28876         case x`file "conftest$ac_exeext" 2>/dev/null` in
28877         (*static*)
28878                 cf_ldflags_static=no
28879                 ;;
28880         (*)
28881                 cf_ldflags_static=yes
28882                 ;;
28883         esac
28884
28885 else
28886   echo "$as_me: failed program was:" >&5
28887 cat "conftest.$ac_ext" >&5
28888 cf_ldflags_static=no
28889 fi
28890 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28891
28892         rm -f libconftest.*
28893         LIBS="$cf_save_LIBS"
28894
28895         echo "$as_me:28895: result: $cf_ldflags_static" >&5
28896 echo "${ECHO_T}$cf_ldflags_static" >&6
28897
28898         if test "$cf_ldflags_static" != yes
28899         then
28900                 LDFLAGS_STATIC=
28901                 LDFLAGS_SHARED=
28902         fi
28903 else
28904         LDFLAGS_STATIC=
28905         LDFLAGS_SHARED=
28906 fi
28907
28908         ;;
28909 esac
28910
28911 echo "$as_me:28911: checking where we will install curses.h" >&5
28912 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28913
28914 includesubdir=
28915 if test "$with_overwrite" = no && \
28916  { test "x$includedir" = 'x${prefix}/include' || \
28917    test "x$includedir" = "x${prefix}/include"; }
28918 then
28919         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28920 fi
28921 echo "$as_me:28921: result: ${includedir}${includesubdir}" >&5
28922 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28923
28924 ### Resolve a conflict between normal and wide-curses by forcing applications
28925 ### that will need libutf8 to add it to their configure script.
28926 if test "$with_overwrite" != no ; then
28927 if test "$NCURSES_LIBUTF8" = 1 ; then
28928         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28929         { echo "$as_me:28929: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28930 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28931 fi
28932 fi
28933 WITH_OVERWRITE=$with_overwrite
28934
28935 ### At least on MinGW a shared library build without libtool
28936 ### requires adding the additional libs to the link list.
28937 case "$cf_cv_system_name" in
28938 (*mingw32*|*mingw64*)
28939         if test "$DFT_LWR_MODEL" != "libtool"; then
28940            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28941         fi
28942         ;;
28943 *)      ;;
28944 esac
28945
28946 ### predefined stuff for the test programs
28947
28948 cat >>confdefs.h <<\EOF
28949 #define HAVE_SLK_COLOR 1
28950 EOF
28951
28952 # pkgsrc uses these
28953
28954 echo "$as_me:28954: checking for desired basename for form library" >&5
28955 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28956
28957 # Check whether --with-form-libname or --without-form-libname was given.
28958 if test "${with_form_libname+set}" = set; then
28959   withval="$with_form_libname"
28960   with_lib_basename=$withval
28961 else
28962   with_lib_basename=form
28963 fi;
28964 FORM_NAME="$with_lib_basename"
28965
28966 case "x$FORM_NAME" in
28967 (x|xno|xnone|xyes)
28968         FORM_NAME=form
28969         ;;
28970 (*)
28971         ;;
28972 esac
28973
28974 echo "$as_me:28974: result: $FORM_NAME" >&5
28975 echo "${ECHO_T}$FORM_NAME" >&6
28976
28977 echo "$as_me:28977: checking for desired basename for menu library" >&5
28978 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28979
28980 # Check whether --with-menu-libname or --without-menu-libname was given.
28981 if test "${with_menu_libname+set}" = set; then
28982   withval="$with_menu_libname"
28983   with_lib_basename=$withval
28984 else
28985   with_lib_basename=menu
28986 fi;
28987 MENU_NAME="$with_lib_basename"
28988
28989 case "x$MENU_NAME" in
28990 (x|xno|xnone|xyes)
28991         MENU_NAME=menu
28992         ;;
28993 (*)
28994         ;;
28995 esac
28996
28997 echo "$as_me:28997: result: $MENU_NAME" >&5
28998 echo "${ECHO_T}$MENU_NAME" >&6
28999
29000 echo "$as_me:29000: checking for desired basename for panel library" >&5
29001 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
29002
29003 # Check whether --with-panel-libname or --without-panel-libname was given.
29004 if test "${with_panel_libname+set}" = set; then
29005   withval="$with_panel_libname"
29006   with_lib_basename=$withval
29007 else
29008   with_lib_basename=panel
29009 fi;
29010 PANEL_NAME="$with_lib_basename"
29011
29012 case "x$PANEL_NAME" in
29013 (x|xno|xnone|xyes)
29014         PANEL_NAME=panel
29015         ;;
29016 (*)
29017         ;;
29018 esac
29019
29020 echo "$as_me:29020: result: $PANEL_NAME" >&5
29021 echo "${ECHO_T}$PANEL_NAME" >&6
29022
29023 echo "$as_me:29023: checking for desired basename for cxx library" >&5
29024 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
29025
29026 # Check whether --with-cxx-libname or --without-cxx-libname was given.
29027 if test "${with_cxx_libname+set}" = set; then
29028   withval="$with_cxx_libname"
29029   with_lib_basename=$withval
29030 else
29031   with_lib_basename=ncurses++
29032 fi;
29033 CXX_NAME="$with_lib_basename"
29034
29035 case "x$CXX_NAME" in
29036 (x|xno|xnone|xyes)
29037         CXX_NAME=ncurses++
29038         ;;
29039 (*)
29040         ;;
29041 esac
29042
29043 echo "$as_me:29043: result: $CXX_NAME" >&5
29044 echo "${ECHO_T}$CXX_NAME" >&6
29045
29046 ### Construct the list of subdirectories for which we'll customize makefiles
29047 ### with the appropriate compile-rules.
29048
29049 echo "$as_me:29049: checking for src modules" >&5
29050 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
29051
29052 # dependencies and linker-arguments for test-programs
29053 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
29054 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
29055 if test "$DFT_LWR_MODEL" = "libtool"; then
29056         TEST_ARGS="${TEST_DEPS}"
29057         TEST_ARG2="${TEST_DEP2}"
29058 else
29059         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
29060         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
29061 fi
29062
29063 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
29064 cf_cv_src_modules=
29065 for cf_dir in $modules_to_build
29066 do
29067         if test -f "$srcdir/$cf_dir/modules" ; then
29068
29069                 if test -z "$cf_cv_src_modules"; then
29070                         cf_cv_src_modules=$cf_dir
29071                 else
29072                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
29073                 fi
29074
29075                 # Make the ncurses_cfg.h file record the library interface files as
29076                 # well.  These are header files that are the same name as their
29077                 # directory.  Ncurses is the only library that does not follow
29078                 # that pattern.
29079                 if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
29080
29081 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29082
29083                         cat >>confdefs.h <<EOF
29084 #define HAVE_${cf_have_include}_H 1
29085 EOF
29086
29087                         cat >>confdefs.h <<EOF
29088 #define HAVE_LIB${cf_have_include} 1
29089 EOF
29090
29091 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29092
29093 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
29094
29095                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
29096                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
29097                         if test "$DFT_LWR_MODEL" = "libtool"; then
29098                                 TEST_ARGS="${TEST_DEPS}"
29099                                 TEST_ARG2="${TEST_DEP2}"
29100                         else
29101                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
29102                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
29103                         fi
29104                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
29105                 fi
29106         fi
29107 done
29108 echo "$as_me:29108: result: $cf_cv_src_modules" >&5
29109 echo "${ECHO_T}$cf_cv_src_modules" >&6
29110
29111 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
29112 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
29113
29114 SRC_SUBDIRS=
29115 if test "x$cf_with_manpages" != xno ; then
29116         SRC_SUBDIRS="$SRC_SUBDIRS man"
29117 fi
29118 SRC_SUBDIRS="$SRC_SUBDIRS include"
29119 for cf_dir in $cf_cv_src_modules
29120 do
29121         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
29122 done
29123 if test "x$cf_with_tests" != "xno" ; then
29124         SRC_SUBDIRS="$SRC_SUBDIRS test"
29125 fi
29126 # always make this, to install the ncurses-config script
29127 SRC_SUBDIRS="$SRC_SUBDIRS misc"
29128 if test "$cf_with_cxx_binding" != no; then
29129         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
29130         SRC_SUBDIRS="$SRC_SUBDIRS c++"
29131 fi
29132
29133 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
29134 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
29135
29136 ADA_SUBDIRS=
29137 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
29138         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
29139         ADA_SUBDIRS="gen src"
29140         if test "x$cf_with_tests" != "xno" ; then
29141                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
29142         fi
29143 fi
29144
29145 SUB_MAKEFILES=
29146 for cf_dir in $SRC_SUBDIRS
29147 do
29148         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
29149 done
29150
29151 if test -n "$ADA_SUBDIRS"; then
29152         for cf_dir in $ADA_SUBDIRS
29153         do
29154                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
29155         done
29156
29157 fi
29158
29159 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
29160    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
29161    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
29162    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
29163 fi
29164
29165 DIRS_TO_MAKE="lib"
29166 for cf_item in $cf_list_models
29167 do
29168
29169         case $cf_item in
29170         (libtool) cf_subdir='obj_lo'  ;;
29171         (normal)  cf_subdir='objects' ;;
29172         (debug)   cf_subdir='obj_g' ;;
29173         (profile) cf_subdir='obj_p' ;;
29174         (shared)
29175                 case "$cf_cv_system_name" in
29176                 (cygwin|msys)
29177                         cf_subdir='objects' ;;
29178                 (*)
29179                         cf_subdir='obj_s' ;;
29180                 esac
29181         esac
29182
29183         for cf_item2 in $DIRS_TO_MAKE
29184         do
29185                 test "$cf_item2" = "$cf_subdir" && break
29186         done
29187         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
29188 done
29189 for cf_dir in $DIRS_TO_MAKE
29190 do
29191         test ! -d "$cf_dir" && mkdir "$cf_dir"
29192 done
29193
29194 # symbols that differ when compiling Ada95 by itself.
29195 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
29196
29197 # values to use as strings
29198
29199 cat >>confdefs.h <<EOF
29200 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
29201 EOF
29202
29203 cat >>confdefs.h <<EOF
29204 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
29205 EOF
29206
29207 ### Define substitutions for header files to avoid name-pollution
29208
29209 if test "x$cf_cv_have_tcgetattr" = xyes ; then
29210         HAVE_TCGETATTR=1
29211 else
29212         HAVE_TCGETATTR=0
29213 fi
29214
29215 if test "x$ac_cv_header_stdint_h" = xyes ; then
29216         HAVE_STDINT_H=1
29217 else
29218         HAVE_STDINT_H=0
29219 fi
29220
29221 if test "x$ac_cv_header_termio_h" = xyes ; then
29222         HAVE_TERMIO_H=1
29223 else
29224         HAVE_TERMIO_H=0
29225 fi
29226
29227 if test "x$ac_cv_header_termios_h" = xyes ; then
29228         HAVE_TERMIOS_H=1
29229 else
29230         HAVE_TERMIOS_H=0
29231 fi
29232
29233 ################################################################################
29234 test "x$use_database" = xyes && \
29235 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29236
29237 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
29238 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29239
29240 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
29241 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29242 fi
29243
29244 if test "x$cf_with_tests" != xno ; then
29245         MAKE_TESTS=
29246 else
29247         MAKE_TESTS="#"
29248 fi
29249
29250 ADAHTML_DIR=../../doc/html/ada
29251
29252 # workaround for OS/2 (20151017)
29253 case "$cf_cv_system_name" in
29254 (os2*)
29255         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29256         ;;
29257 (*)
29258         LIBTOOL_OPTS_CXX=
29259         ;;
29260 esac
29261
29262 # workaround for g++ versus Solaris (20131116)
29263 case "$cf_cv_system_name" in
29264 (solaris2*)
29265         case "x$CPPFLAGS" in
29266         (*-D_XOPEN_SOURCE_EXTENDED*)
29267                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29268
29269 echo "${as_me:-configure}:29269: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29270
29271                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29272                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29273                 ;;
29274         esac
29275         ;;
29276 esac
29277
29278 # Help to automatically enable the extended curses features when using either
29279 # the *-config or the ".pc" files by adding defines.
29280 echo "$as_me:29280: checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script" >&5
29281 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script... $ECHO_C" >&6
29282 PKG_CFLAGS=
29283 for cf_loop1 in $CPPFLAGS_after_XOPEN
29284 do
29285         cf_found=no
29286         for cf_loop2 in $CPPFLAGS_before_XOPEN
29287         do
29288                 if test "x$cf_loop1" = "x$cf_loop2"
29289                 then
29290                         cf_found=yes
29291                         break
29292                 fi
29293         done
29294         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29295 done
29296 echo "$as_me:29296: result: $PKG_CFLAGS" >&5
29297 echo "${ECHO_T}$PKG_CFLAGS" >&6
29298
29299 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29300 case "x$NCURSES_OSPEED" in
29301 (*short*)
29302         cf_compatible=1
29303         ;;
29304 (*)
29305         cf_compatible=0
29306         ;;
29307 esac
29308
29309 cat >>confdefs.h <<EOF
29310 #define NCURSES_OSPEED_COMPAT $cf_compatible
29311 EOF
29312
29313 case "x$cf_cv_typeof_chtype" in
29314 (xshort|xint|xlong)
29315         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29316         ;;
29317 esac
29318
29319 case "x$cf_cv_typeof_mmask_t" in
29320 (xshort|xint|xlong)
29321         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29322         ;;
29323 esac
29324
29325 # substitute into misc/Makefile to suppress
29326 # (un)install.data from the
29327 # (un)install rules.
29328 if test "x$cf_with_db_install" = "xno"; then
29329         MISC_INSTALL_DATA=
29330         MISC_UNINSTALL_DATA=
29331 else
29332         MISC_INSTALL_DATA=install.data
29333         MISC_UNINSTALL_DATA=uninstall.data
29334 fi
29335
29336 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29337         MAKE_DATABASE="#"
29338 else
29339         MAKE_DATABASE="$MAKE_TERMINFO"
29340 fi
29341
29342 if test -n "$PACKAGE"
29343 then
29344         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29345         export PACKAGE
29346         echo "package: $PACKAGE"
29347 fi
29348
29349 UNALTERED_SYMS=
29350 cf_filter_syms=no
29351
29352 if test -n "$RESULTING_SYMS"
29353 then
29354         cf_filter_syms=$cf_dft_filter_syms
29355         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_default" 1>&6
29356
29357 echo "${as_me:-configure}:29357: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29358
29359 fi
29360
29361 if test "x$WILDCARD_SYMS" = xno
29362 then
29363         cf_filter_syms=yes
29364 fi
29365
29366 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29367
29368 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29369 if test "$cf_filter_syms" = yes
29370 then
29371         RESULTING_SYMS=resulting.map
29372 fi
29373
29374 if test "x$cross_compiling" = xyes ; then
29375         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29376         CHECK_BUILD="#"
29377 else
29378         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29379         CHECK_BUILD=
29380 fi
29381
29382 # This is used for the *-config script and *.pc data files.
29383
29384 echo "$as_me:29384: checking for linker search path" >&5
29385 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29386 if test "${cf_cv_ld_searchpath+set}" = set; then
29387   echo $ECHO_N "(cached) $ECHO_C" >&6
29388 else
29389
29390 if test "$cross_compiling" != yes ; then
29391
29392 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29393 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29394
29395 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29396 # update the cache, which makes it run faster.
29397 test -z "$cf_pathlist" && \
29398         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29399
29400 test -z "$cf_pathlist" &&
29401         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29402
29403 # This works with OpenBSD 6.5, which lists only filenames
29404 test -z "$cf_pathlist" &&
29405         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29406
29407 if test -z "$cf_pathlist"
29408 then
29409         # dyld default path with MacOS
29410         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29411         then
29412                 # do this to bypass check
29413                 cf_cv_ld_searchpath='$HOME/lib'
29414                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29415         fi
29416 fi
29417
29418 if test -z "$cf_pathlist"
29419 then
29420         # Solaris is "SunOS"
29421         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29422         then
29423                 case x`(isainfo -b)` in
29424                 (x64)
29425                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29426                         ;;
29427                 (x32)
29428                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29429                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29430                         ;;
29431                 (*)
29432                         { echo "$as_me:29432: WARNING: problem with Solaris architecture" >&5
29433 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29434                         ;;
29435                 esac
29436         fi
29437 fi
29438
29439 if test -z "$cf_pathlist"
29440 then
29441         # HP-UX
29442         if test x"`uname -s`" = xHP-UX
29443         then
29444                 case x`getconf LONG_BIT` in
29445                 (x64)
29446                         cf_pathlist="/usr/lib/hpux64"
29447                         ;;
29448                 (x*)
29449                         cf_pathlist="/usr/lib/hpux32"
29450                         ;;
29451                 esac
29452         fi
29453 fi
29454
29455 fi
29456
29457 # If nothing else, assume it is conventional
29458 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29459
29460 # Finally, check that this is only directories
29461 for cf_path in $0 $cf_pathlist
29462 do
29463         if test -d "$cf_path"; then
29464                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29465                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29466         fi
29467 done
29468
29469 # Ensure that it is nonempty
29470 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29471
29472 fi
29473 echo "$as_me:29473: result: $cf_cv_ld_searchpath" >&5
29474 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29475
29476 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29477
29478 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"
29479 ac_config_commands="$ac_config_commands default"
29480 cat >confcache <<\_ACEOF
29481 # This file is a shell script that caches the results of configure
29482 # tests run on this system so they can be shared between configure
29483 # scripts and configure runs, see configure's option --config-cache.
29484 # It is not useful on other systems.  If it contains results you don't
29485 # want to keep, you may remove or edit it.
29486 #
29487 # config.status only pays attention to the cache file if you give it
29488 # the --recheck option to rerun configure.
29489 #
29490 # `ac_cv_env_foo' variables (set or unset) will be overridden when
29491 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29492 # following values.
29493
29494 _ACEOF
29495
29496 # The following way of writing the cache mishandles newlines in values,
29497 # but we know of no workaround that is simple, portable, and efficient.
29498 # So, don't put newlines in cache variables' values.
29499 # Ultrix sh set writes to stderr and can't be redirected directly,
29500 # and sets the high bit in the cache file unless we assign to the vars.
29501 {
29502   (set) 2>&1 |
29503     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29504     *ac_space=\ *)
29505       # `set' does not quote correctly, so add quotes (double-quote
29506       # substitution turns \\\\ into \\, and sed turns \\ into \).
29507       sed -n \
29508         "s/'/'\\\\''/g;
29509           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29510       ;;
29511     *)
29512       # `set' quotes correctly as required by POSIX, so do not add quotes.
29513       sed -n \
29514         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29515       ;;
29516     esac;
29517 } |
29518   sed '
29519      t clear
29520      : clear
29521      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29522      t end
29523      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29524      : end' >>confcache
29525 if cmp -s $cache_file confcache; then :; else
29526   if test -w $cache_file; then
29527     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29528     cat confcache >$cache_file
29529   else
29530     echo "not updating unwritable cache $cache_file"
29531   fi
29532 fi
29533 rm -f confcache
29534
29535 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29536 # Let make expand exec_prefix.
29537 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29538
29539 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29540 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29541 # trailing colons and then remove the whole line if VPATH becomes empty
29542 # (actually we leave an empty line to preserve line numbers).
29543 if test "x$srcdir" = x.; then
29544   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29545 s/:*\$(srcdir):*/:/;
29546 s/:*\${srcdir}:*/:/;
29547 s/:*@srcdir@:*/:/;
29548 s/^\([^=]*=[    ]*\):*/\1/;
29549 s/:*$//;
29550 s/^[^=]*=[      ]*$//;
29551 }'
29552 fi
29553
29554 DEFS=-DHAVE_CONFIG_H
29555
29556 : "${CONFIG_STATUS=./config.status}"
29557 ac_clean_files_save=$ac_clean_files
29558 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29559 { echo "$as_me:29559: creating $CONFIG_STATUS" >&5
29560 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29561 cat >"$CONFIG_STATUS" <<_ACEOF
29562 #! $SHELL
29563 # Generated automatically by configure.
29564 # Run this file to recreate the current configuration.
29565 # Compiler output produced by configure, useful for debugging
29566 # configure, is in config.log if it exists.
29567
29568 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29569
29570 debug=false
29571 SHELL=\${CONFIG_SHELL-$SHELL}
29572 ac_cs_invocation="\$0 \$@"
29573
29574 CLICOLOR_FORCE= GREP_OPTIONS=
29575 unset CLICOLOR_FORCE GREP_OPTIONS
29576 _ACEOF
29577
29578 cat >>"$CONFIG_STATUS" <<\_ACEOF
29579 # Be Bourne compatible
29580 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29581   emulate sh
29582   NULLCMD=:
29583 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29584   set -o posix
29585 fi
29586
29587 # Name of the executable.
29588 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29589
29590 if expr a : '\(a\)' >/dev/null 2>&1; then
29591   as_expr="expr"
29592 else
29593   as_expr="false"
29594 fi
29595
29596 rm -f conf$$ conf$$.exe conf$$.file
29597 echo >conf$$.file
29598 if ln -s conf$$.file conf$$ 2>/dev/null; then
29599   # We could just check for DJGPP; but this test a) works b) is more generic
29600   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29601   if test -f conf$$.exe; then
29602     # Don't use ln at all; we don't have any links
29603     as_ln_s='cp -p'
29604   else
29605     as_ln_s='ln -s'
29606   fi
29607 elif ln conf$$.file conf$$ 2>/dev/null; then
29608   as_ln_s='ln'
29609 else
29610   as_ln_s='cp -p'
29611 fi
29612 rm -f conf$$ conf$$.exe conf$$.file
29613
29614 as_executable_p="test -f"
29615
29616 # Support unset when possible.
29617 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29618   as_unset="unset"
29619 else
29620   as_unset="false"
29621 fi
29622
29623 # NLS nuisances.
29624 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29625 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29626 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29627 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29628 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29629 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29630 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29631 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29632
29633 # IFS
29634 # We need space, tab and new line, in precisely that order.
29635 as_nl='
29636 '
29637 IFS="   $as_nl"
29638
29639 # CDPATH.
29640 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29641
29642 exec 6>&1
29643
29644 _ACEOF
29645
29646 # Files that config.status was made for.
29647 if test -n "$ac_config_files"; then
29648   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29649 fi
29650
29651 if test -n "$ac_config_headers"; then
29652   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29653 fi
29654
29655 if test -n "$ac_config_links"; then
29656   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29657 fi
29658
29659 if test -n "$ac_config_commands"; then
29660   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29661 fi
29662
29663 cat >>"$CONFIG_STATUS" <<\EOF
29664
29665 ac_cs_usage="\
29666 \`$as_me' instantiates files from templates according to the
29667 current configuration.
29668
29669 Usage: $0 [OPTIONS] [FILE]...
29670
29671   -h, --help       print this help, then exit
29672   -V, --version    print version number, then exit
29673   -d, --debug      don't remove temporary files
29674       --recheck    update $as_me by reconfiguring in the same conditions
29675   --file=FILE[:TEMPLATE]
29676                    instantiate the configuration file FILE
29677   --header=FILE[:TEMPLATE]
29678                    instantiate the configuration header FILE
29679
29680 Configuration files:
29681 $config_files
29682
29683 Configuration headers:
29684 $config_headers
29685
29686 Configuration commands:
29687 $config_commands
29688
29689 Report bugs to <dickey@invisible-island.net>."
29690 EOF
29691
29692 cat >>"$CONFIG_STATUS" <<EOF
29693 ac_cs_version="\\
29694 config.status
29695 configured by $0, generated by GNU Autoconf 2.52.20231210,
29696   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29697
29698 Copyright 2003-2022,2023        Thomas E. Dickey
29699 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29700 Free Software Foundation, Inc.
29701 This config.status script is free software; the Free Software Foundation
29702 gives unlimited permission to copy, distribute and modify it."
29703 srcdir="$srcdir"
29704 INSTALL="$INSTALL"
29705 EOF
29706
29707 cat >>"$CONFIG_STATUS" <<\EOF
29708 # If no file are specified by the user, then we need to provide default
29709 # value.  By we need to know if files were specified by the user.
29710 ac_need_defaults=:
29711 while test $# != 0
29712 do
29713   case $1 in
29714   --*=*)
29715     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29716     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29717     shift
29718     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29719     shift
29720     ;;
29721   -*);;
29722   *) # This is not an option, so the user has probably given explicit
29723      # arguments.
29724      ac_need_defaults=false;;
29725   esac
29726
29727   case $1 in
29728   # Handling of the options.
29729 EOF
29730 cat >>"$CONFIG_STATUS" <<EOF
29731   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29732     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29733     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29734 EOF
29735 cat >>"$CONFIG_STATUS" <<\EOF
29736   --version | --vers* | -V )
29737     echo "$ac_cs_version"; exit 0 ;;
29738   --he | --h)
29739     # Conflict between --help and --header
29740     { { echo "$as_me:29740: error: ambiguous option: $1
29741 Try \`$0 --help' for more information." >&5
29742 echo "$as_me: error: ambiguous option: $1
29743 Try \`$0 --help' for more information." >&2;}
29744    { (exit 1); exit 1; }; };;
29745   --help | --hel | -h )
29746     echo "$ac_cs_usage"; exit 0 ;;
29747   --debug | --d* | -d )
29748     debug=: ;;
29749   --file | --fil | --fi | --f )
29750     shift
29751     CONFIG_FILES="$CONFIG_FILES $1"
29752     ac_need_defaults=false;;
29753   --header | --heade | --head | --hea )
29754     shift
29755     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29756     ac_need_defaults=false;;
29757
29758   # This is an error.
29759   -*) { { echo "$as_me:29759: error: unrecognized option: $1
29760 Try \`$0 --help' for more information." >&5
29761 echo "$as_me: error: unrecognized option: $1
29762 Try \`$0 --help' for more information." >&2;}
29763    { (exit 1); exit 1; }; } ;;
29764
29765   *) ac_config_targets="$ac_config_targets $1" ;;
29766
29767   esac
29768   shift
29769 done
29770
29771 exec 5>>config.log
29772 cat >&5 << _ACEOF
29773
29774 ## ----------------------- ##
29775 ## Running config.status.  ##
29776 ## ----------------------- ##
29777
29778 This file was extended by $as_me 2.52.20231210, executed with
29779   CONFIG_FILES    = $CONFIG_FILES
29780   CONFIG_HEADERS  = $CONFIG_HEADERS
29781   CONFIG_LINKS    = $CONFIG_LINKS
29782   CONFIG_COMMANDS = $CONFIG_COMMANDS
29783   > "$ac_cs_invocation"
29784 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29785
29786 _ACEOF
29787 EOF
29788
29789 cat >>"$CONFIG_STATUS" <<EOF
29790 #
29791 # INIT-COMMANDS section.
29792 #
29793
29794 ### Special initialization commands, used to pass information from the
29795 ### configuration-run into config.status
29796
29797 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29798 AWK="$AWK"
29799 CXX_NAME="$CXX_NAME"
29800 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29801 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29802 ECHO_LD="$ECHO_LD"
29803 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29804 FORM_NAME="$FORM_NAME"
29805 LDCONFIG="$LDCONFIG"
29806 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29807 LIB_NAME="$LIB_NAME"
29808 LIB_PREFIX="$LIB_PREFIX"
29809 LIB_SUBSETS="$LIB_SUBSETS"
29810 LIB_SUFFIX="$LIB_SUFFIX"
29811 LIB_TRACING="$LIB_TRACING"
29812 LN_S="$LN_S"
29813 MAKE_TERMINFO="$MAKE_TERMINFO"
29814 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29815 MENU_NAME="$MENU_NAME"
29816 NCURSES_MAJOR="$NCURSES_MAJOR"
29817 NCURSES_MINOR="$NCURSES_MINOR"
29818 NCURSES_OSPEED="$NCURSES_OSPEED"
29819 NCURSES_PATCH="$NCURSES_PATCH"
29820 PANEL_NAME="$PANEL_NAME"
29821 SRC_SUBDIRS="$SRC_SUBDIRS"
29822 TERMINFO="$TERMINFO"
29823 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29824 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29825 TICS_NAME="$TICS_NAME"
29826 TICS_SUFFIX="$TICS_SUFFIX"
29827 TIC_PATH="$TIC_PATH"
29828 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29829 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29830 TINFO_NAME="$TINFO_NAME"
29831 TINFO_SUFFIX="$TINFO_SUFFIX"
29832 UNALTERED_SYMS="$UNALTERED_SYMS"
29833 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29834 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29835 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29836 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29837 WILDCARD_SYMS="$WILDCARD_SYMS"
29838 WITH_CURSES_H="$with_curses_h"
29839 WITH_ECHO="${enable_echo:=yes}"
29840 WITH_OVERWRITE="$with_overwrite"
29841 cf_LIST_MODELS="$cf_list_models"
29842 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29843 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29844 cf_cv_abi_default="$cf_cv_abi_default"
29845 cf_cv_abi_version="$cf_cv_abi_version"
29846 cf_cv_do_relink="$cf_cv_do_relink"
29847 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29848 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29849 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29850 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29851 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29852 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29853 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29854 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29855 cf_cv_rel_version="$cf_cv_rel_version"
29856 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29857 cf_cv_shared_soname='$cf_cv_shared_soname'
29858 cf_cv_shlib_version="$cf_cv_shlib_version"
29859 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29860 cf_cv_system_name="$cf_cv_system_name"
29861 cf_cv_term_driver="$with_term_driver"
29862 cf_with_ada="$cf_with_ada"
29863 cf_with_cxx_binding="$cf_with_cxx_binding"
29864 cf_with_db_install="$cf_with_db_install"
29865 cf_with_manpages="$cf_with_manpages"
29866 cf_with_tests="$cf_with_tests"
29867 host="$host"
29868 target="$target"
29869 verbose="$verbose"
29870 with_shared_cxx="$with_shared_cxx"
29871
29872 EOF
29873
29874 cat >>"$CONFIG_STATUS" <<\EOF
29875 for ac_config_target in $ac_config_targets
29876 do
29877   case "$ac_config_target" in
29878   # Handling of arguments.
29879   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29880   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29881   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29882   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29883   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29884   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
29885   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29886   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29887   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29888   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29889   *) { { echo "$as_me:29889: error: invalid argument: $ac_config_target" >&5
29890 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29891    { (exit 1); exit 1; }; };;
29892   esac
29893 done
29894
29895 # If the user did not use the arguments to specify the items to instantiate,
29896 # then the envvar interface is used.  Set only those that are not.
29897 # We use the long form for the default assignment because of an extremely
29898 # bizarre bug on SunOS 4.1.3.
29899 if "$ac_need_defaults"; then
29900   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29901   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29902   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29903 fi
29904
29905 # Create a temporary directory, and hook for its removal unless debugging.
29906 $debug ||
29907 {
29908   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29909   trap '{ (exit 1); exit 1; }' 1 2 13 15
29910 }
29911
29912 # Create a (secure) tmp directory for tmp files.
29913 : "${TMPDIR=/tmp}"
29914 {
29915   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29916   test -n "$tmp" && test -d "$tmp"
29917 }  ||
29918 {
29919   tmp=$TMPDIR/cs$$-$RANDOM
29920   (umask 077 && mkdir "$tmp")
29921 } ||
29922 {
29923    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29924    { (exit 1); exit 1; }
29925 }
29926
29927 EOF
29928
29929 cat >>"$CONFIG_STATUS" <<EOF
29930
29931 #
29932 # CONFIG_FILES section.
29933 #
29934
29935 # No need to generate the scripts if there are no CONFIG_FILES.
29936 # This happens for instance when ./config.status config.h
29937 if test -n "\$CONFIG_FILES"; then
29938   # Protect against being on the right side of a sed subst in config.status.
29939   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29940    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
29941 s,@SHELL@,$SHELL,;t t
29942 s,@exec_prefix@,$exec_prefix,;t t
29943 s,@prefix@,$prefix,;t t
29944 s,@program_transform_name@,$program_transform_name,;t t
29945 s,@bindir@,$bindir,;t t
29946 s,@sbindir@,$sbindir,;t t
29947 s,@libexecdir@,$libexecdir,;t t
29948 s,@datarootdir@,$datarootdir,;t t
29949 s,@datadir@,$datadir,;t t
29950 s,@sysconfdir@,$sysconfdir,;t t
29951 s,@sharedstatedir@,$sharedstatedir,;t t
29952 s,@localstatedir@,$localstatedir,;t t
29953 s,@runstatedir@,$runstatedir,;t t
29954 s,@libdir@,$libdir,;t t
29955 s,@includedir@,$includedir,;t t
29956 s,@oldincludedir@,$oldincludedir,;t t
29957 s,@infodir@,$infodir,;t t
29958 s,@mandir@,$mandir,;t t
29959 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29960 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29961 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29962 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29963 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29964 s,@build_alias@,$build_alias,;t t
29965 s,@host_alias@,$host_alias,;t t
29966 s,@target_alias@,$target_alias,;t t
29967 s,@ECHO_C@,$ECHO_C,;t t
29968 s,@ECHO_N@,$ECHO_N,;t t
29969 s,@ECHO_T@,$ECHO_T,;t t
29970 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29971 s,@DEFS@,$DEFS,;t t
29972 s,@LIBS@,$LIBS,;t t
29973 s,@top_builddir@,$top_builddir,;t t
29974 s,@GREP@,$GREP,;t t
29975 s,@EGREP@,$EGREP,;t t
29976 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29977 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29978 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29979 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29980 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29981 s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
29982 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29983 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29984 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29985 s,@VERSION@,$VERSION,;t t
29986 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29987 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29988 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29989 s,@PACKAGE@,$PACKAGE,;t t
29990 s,@build@,$build,;t t
29991 s,@build_cpu@,$build_cpu,;t t
29992 s,@build_vendor@,$build_vendor,;t t
29993 s,@build_os@,$build_os,;t t
29994 s,@host@,$host,;t t
29995 s,@host_cpu@,$host_cpu,;t t
29996 s,@host_vendor@,$host_vendor,;t t
29997 s,@host_os@,$host_os,;t t
29998 s,@target@,$target,;t t
29999 s,@target_cpu@,$target_cpu,;t t
30000 s,@target_vendor@,$target_vendor,;t t
30001 s,@target_os@,$target_os,;t t
30002 s,@FGREP@,$FGREP,;t t
30003 s,@CC@,$CC,;t t
30004 s,@CFLAGS@,$CFLAGS,;t t
30005 s,@LDFLAGS@,$LDFLAGS,;t t
30006 s,@CPPFLAGS@,$CPPFLAGS,;t t
30007 s,@ac_ct_CC@,$ac_ct_CC,;t t
30008 s,@EXEEXT@,$EXEEXT,;t t
30009 s,@OBJEXT@,$OBJEXT,;t t
30010 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
30011 s,@CPP@,$CPP,;t t
30012 s,@LDCONFIG@,$LDCONFIG,;t t
30013 s,@CXX@,$CXX,;t t
30014 s,@CXXFLAGS@,$CXXFLAGS,;t t
30015 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
30016 s,@AWK@,$AWK,;t t
30017 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
30018 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
30019 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
30020 s,@LINT@,$LINT,;t t
30021 s,@LINT_OPTS@,$LINT_OPTS,;t t
30022 s,@LINT_LIBS@,$LINT_LIBS,;t t
30023 s,@LN_S@,$LN_S,;t t
30024 s,@cf_config_suffix@,$cf_config_suffix,;t t
30025 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
30026 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
30027 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
30028 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
30029 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
30030 s,@SET_MAKE@,$SET_MAKE,;t t
30031 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
30032 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
30033 s,@CTAGS@,$CTAGS,;t t
30034 s,@ETAGS@,$ETAGS,;t t
30035 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
30036 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
30037 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
30038 s,@RANLIB@,$RANLIB,;t t
30039 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
30040 s,@LD@,$LD,;t t
30041 s,@ac_ct_LD@,$ac_ct_LD,;t t
30042 s,@AR@,$AR,;t t
30043 s,@ac_ct_AR@,$ac_ct_AR,;t t
30044 s,@NM@,$NM,;t t
30045 s,@ac_ct_NM@,$ac_ct_NM,;t t
30046 s,@ARFLAGS@,$ARFLAGS,;t t
30047 s,@DESTDIR@,$DESTDIR,;t t
30048 s,@BUILD_CC@,$BUILD_CC,;t t
30049 s,@BUILD_CPP@,$BUILD_CPP,;t t
30050 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
30051 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
30052 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
30053 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
30054 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
30055 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
30056 s,@cf_list_models@,$cf_list_models,;t t
30057 s,@ABI_VERSION@,$ABI_VERSION,;t t
30058 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
30059 s,@LIBTOOL@,$LIBTOOL,;t t
30060 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
30061 s,@LT_UNDEF@,$LT_UNDEF,;t t
30062 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
30063 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
30064 s,@LIB_CREATE@,$LIB_CREATE,;t t
30065 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
30066 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
30067 s,@LIB_PREP@,$LIB_PREP,;t t
30068 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
30069 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
30070 s,@LIB_LINK@,$LIB_LINK,;t t
30071 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
30072 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
30073 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
30074 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
30075 s,@TICS_NAME@,$TICS_NAME,;t t
30076 s,@TINFO_NAME@,$TINFO_NAME,;t t
30077 s,@LIB_NAME@,$LIB_NAME,;t t
30078 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
30079 s,@CC_G_OPT@,$CC_G_OPT,;t t
30080 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
30081 s,@LD_MODEL@,$LD_MODEL,;t t
30082 s,@shlibdir@,$shlibdir,;t t
30083 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
30084 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
30085 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
30086 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
30087 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
30088 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
30089 s,@LINK_PROGS@,$LINK_PROGS,;t t
30090 s,@LINK_TESTS@,$LINK_TESTS,;t t
30091 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
30092 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
30093 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
30094 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
30095 s,@RPATH_LIST@,$RPATH_LIST,;t t
30096 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
30097 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
30098 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
30099 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
30100 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
30101 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
30102 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
30103 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
30104 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
30105 s,@TIC@,$TIC,;t t
30106 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
30107 s,@INFOCMP@,$INFOCMP,;t t
30108 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
30109 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
30110 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
30111 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
30112 s,@XTERM_KBS@,$XTERM_KBS,;t t
30113 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
30114 s,@TERMINFO@,$TERMINFO,;t t
30115 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
30116 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
30117 s,@TERMPATH@,$TERMPATH,;t t
30118 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
30119 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
30120 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
30121 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
30122 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
30123 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
30124 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
30125 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
30126 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
30127 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
30128 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
30129 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
30130 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
30131 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
30132 s,@RGB_PATH@,$RGB_PATH,;t t
30133 s,@no_x11_rgb@,$no_x11_rgb,;t t
30134 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
30135 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
30136 s,@NCURSES_CHTYPE@,$NCURSES_CHTYPE,;t t
30137 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
30138 s,@NCURSES_MMASK_T@,$NCURSES_MMASK_T,;t t
30139 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
30140 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
30141 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
30142 s,@cf_manpage_format@,$cf_manpage_format,;t t
30143 s,@cf_manpage_inboth@,$cf_manpage_inboth,;t t
30144 s,@cf_manpage_so_strip@,$cf_manpage_so_strip,;t t
30145 s,@cf_manpage_compress@,$cf_manpage_compress,;t t
30146 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
30147 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
30148 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
30149 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
30150 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
30151 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
30152 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
30153 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
30154 s,@cf_cv_enable_sigwinch@,$cf_cv_enable_sigwinch,;t t
30155 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
30156 s,@PTHREAD@,$PTHREAD,;t t
30157 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
30158 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
30159 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
30160 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
30161 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
30162 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
30163 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
30164 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
30165 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
30166 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
30167 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
30168 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
30169 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
30170 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
30171 s,@ECHO_LT@,$ECHO_LT,;t t
30172 s,@ECHO_LD@,$ECHO_LD,;t t
30173 s,@RULE_CC@,$RULE_CC,;t t
30174 s,@SHOW_CC@,$SHOW_CC,;t t
30175 s,@ECHO_CC@,$ECHO_CC,;t t
30176 s,@ECHO_LINK@,$ECHO_LINK,;t t
30177 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
30178 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
30179 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
30180 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
30181 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
30182 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
30183 s,@ADAFLAGS@,$ADAFLAGS,;t t
30184 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
30185 s,@ADA_TRACE@,$ADA_TRACE,;t t
30186 s,@MATH_LIB@,$MATH_LIB,;t t
30187 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
30188 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
30189 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
30190 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
30191 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
30192 s,@TEST_LIBS@,$TEST_LIBS,;t t
30193 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
30194 s,@CXXCPP@,$CXXCPP,;t t
30195 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
30196 s,@CXX_AR@,$CXX_AR,;t t
30197 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
30198 s,@CXXLIBS@,$CXXLIBS,;t t
30199 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
30200 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
30201 s,@M4_exists@,$M4_exists,;t t
30202 s,@cf_ada_make@,$cf_ada_make,;t t
30203 s,@cf_ada_config@,$cf_ada_config,;t t
30204 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
30205 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
30206 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
30207 s,@cf_compile_generics@,$cf_compile_generics,;t t
30208 s,@cf_generic_objects@,$cf_generic_objects,;t t
30209 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
30210 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
30211 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
30212 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
30213 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
30214 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
30215 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
30216 s,@cf_ada_package@,$cf_ada_package,;t t
30217 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
30218 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
30219 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
30220 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
30221 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
30222 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
30223 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
30224 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
30225 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
30226 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
30227 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
30228 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
30229 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
30230 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
30231 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
30232 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
30233 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
30234 s,@TICS_LIBS@,$TICS_LIBS,;t t
30235 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
30236 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
30237 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
30238 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30239 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30240 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
30241 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30242 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
30243 s,@includesubdir@,$includesubdir,;t t
30244 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30245 s,@TICS_LIST@,$TICS_LIST,;t t
30246 s,@TINFO_LIST@,$TINFO_LIST,;t t
30247 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30248 s,@FORM_NAME@,$FORM_NAME,;t t
30249 s,@MENU_NAME@,$MENU_NAME,;t t
30250 s,@PANEL_NAME@,$PANEL_NAME,;t t
30251 s,@CXX_NAME@,$CXX_NAME,;t t
30252 s,@TEST_ARGS@,$TEST_ARGS,;t t
30253 s,@TEST_DEPS@,$TEST_DEPS,;t t
30254 s,@TEST_ARG2@,$TEST_ARG2,;t t
30255 s,@TEST_DEP2@,$TEST_DEP2,;t t
30256 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30257 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30258 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30259 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30260 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30261 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30262 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30263 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30264 s,@cross_compiling@,$cross_compiling,;t t
30265 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30266 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30267 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30268 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30269 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30270 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30271 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30272 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30273 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30274 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30275 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30276 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30277 CEOF
30278
30279 EOF
30280
30281   cat >>"$CONFIG_STATUS" <<\EOF
30282   # Split the substitutions into bite-sized pieces for seds with
30283   # small command number limits, like on Digital OSF/1 and HP-UX.
30284   ac_max_sed_lines=48
30285   ac_sed_frag=1 # Number of current file.
30286   ac_beg=1 # First line for current file.
30287   ac_end=$ac_max_sed_lines # Line after last line for current file.
30288   ac_more_lines=:
30289   ac_sed_cmds=
30290   while "$ac_more_lines"; do
30291     if test "$ac_beg" -gt 1; then
30292       sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30293     else
30294       sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30295     fi
30296     if test ! -s "$tmp"/subs.frag; then
30297       ac_more_lines=false
30298     else
30299       # The purpose of the label and of the branching condition is to
30300       # speed up the sed processing (if there are no `@' at all, there
30301       # is no need to browse any of the substitutions).
30302       # These are the two extra sed commands mentioned above.
30303       (echo ':t
30304   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30305       # It is possible to make a multiline substitution using escaped newlines.
30306       # Ensure that we do not split the substitution between script fragments.
30307       ac_BEG=$ac_end
30308       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30309       sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30310       if test -s "$tmp"/subs.next; then
30311         grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30312         if test ! -s "$tmp"/subs.edit; then
30313           grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30314           if test ! -s "$tmp"/subs.edit; then
30315             if test "$ac_beg" -gt 1; then
30316               ac_end=`expr "$ac_end" - 1`
30317               continue
30318             fi
30319           fi
30320         fi
30321       fi
30322
30323       if test -z "$ac_sed_cmds"; then
30324         ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30325       else
30326         ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30327       fi
30328       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30329       ac_beg=$ac_end
30330       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30331     fi
30332   done
30333   if test -z "$ac_sed_cmds"; then
30334     ac_sed_cmds="cat"
30335   fi
30336 fi # test -n "$CONFIG_FILES"
30337
30338 EOF
30339 cat >>"$CONFIG_STATUS" <<\EOF
30340 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30341   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30342   case "$ac_file" in
30343   - | *:- | *:-:* ) # input from stdin
30344         cat >"$tmp"/stdin
30345         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30346         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30347   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30348         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30349   * )   ac_file_in=$ac_file.in ;;
30350   esac
30351
30352   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30353   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30354          X"$ac_file" : 'X\(//\)[^/]' \| \
30355          X"$ac_file" : 'X\(//\)$' \| \
30356          X"$ac_file" : 'X\(/\)' \| \
30357          .     : '\(.\)' 2>/dev/null ||
30358 echo X"$ac_file" |
30359     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30360           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30361           /^X\(\/\/\)$/{ s//\1/; q; }
30362           /^X\(\/\).*/{ s//\1/; q; }
30363           s/.*/./; q'`
30364   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30365     { case "$ac_dir" in
30366   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30367   *)                      as_incr_dir=.;;
30368 esac
30369 as_dummy="$ac_dir"
30370 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30371   case $as_mkdir_dir in
30372     # Skip DOS drivespec
30373     ?:) as_incr_dir=$as_mkdir_dir ;;
30374     *)
30375       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30376       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30377     ;;
30378   esac
30379 done; }
30380
30381     ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30382     # A "../" for each directory in $ac_dir_suffix.
30383     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30384   else
30385     ac_dir_suffix= ac_dots=
30386   fi
30387
30388   case "$srcdir" in
30389   .)  ac_srcdir=.
30390       if test -z "$ac_dots"; then
30391          ac_top_srcdir=.
30392       else
30393          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30394       fi ;;
30395   [\\/]* | ?:[\\/]* )
30396       ac_srcdir="$srcdir$ac_dir_suffix";
30397       ac_top_srcdir="$srcdir" ;;
30398   *) # Relative path.
30399     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30400     ac_top_srcdir="$ac_dots$srcdir" ;;
30401   esac
30402
30403   case $INSTALL in
30404   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30405   *) ac_INSTALL=$ac_dots$INSTALL ;;
30406   esac
30407
30408   if test x"$ac_file" != x-; then
30409     { echo "$as_me:30409: creating $ac_file" >&5
30410 echo "$as_me: creating $ac_file" >&6;}
30411     rm -f "$ac_file"
30412   fi
30413   # Let's still pretend it is `configure' which instantiates (i.e., don't
30414   # use $as_me), people would be surprised to read:
30415   #    /* config.h.  Generated automatically by config.status.  */
30416   configure_input="Generated automatically from `echo $ac_file_in |
30417                                                  sed 's,.*/,,'` by configure."
30418
30419   # First look for the input files in the build tree, otherwise in the
30420   # src tree.
30421   ac_file_inputs=`IFS=:
30422     for f in $ac_file_in; do
30423       case $f in
30424       -) echo "$tmp"/stdin ;;
30425       [\\/$]*)
30426          # Absolute (can't be DOS-style, as IFS=:)
30427          test -f "$f" || { { echo "$as_me:30427: error: cannot find input file: $f" >&5
30428 echo "$as_me: error: cannot find input file: $f" >&2;}
30429    { (exit 1); exit 1; }; }
30430          echo "$f";;
30431       *) # Relative
30432          if test -f "$f"; then
30433            # Build tree
30434            echo "$f"
30435          elif test -f "$srcdir/$f"; then
30436            # Source tree
30437            echo "$srcdir/$f"
30438          else
30439            # /dev/null tree
30440            { { echo "$as_me:30440: error: cannot find input file: $f" >&5
30441 echo "$as_me: error: cannot find input file: $f" >&2;}
30442    { (exit 1); exit 1; }; }
30443          fi;;
30444       esac
30445     done` || { (exit 1); exit 1; }
30446 EOF
30447 cat >>"$CONFIG_STATUS" <<\EOF
30448   ac_warn_datarootdir=no
30449   if test x"$ac_file" != x-; then
30450     for ac_item in $ac_file_inputs
30451     do
30452       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30453       if test -n "$ac_seen"; then
30454         ac_used=`grep '@datarootdir@' "$ac_item"`
30455         if test -z "$ac_used"; then
30456           { echo "$as_me:30456: WARNING: datarootdir was used implicitly but not set:
30457 $ac_seen" >&5
30458 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30459 $ac_seen" >&2;}
30460           ac_warn_datarootdir=yes
30461         fi
30462       fi
30463       ac_seen=`grep '${datarootdir}' "$ac_item"`
30464       if test -n "$ac_seen"; then
30465         { echo "$as_me:30465: WARNING: datarootdir was used explicitly but not set:
30466 $ac_seen" >&5
30467 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30468 $ac_seen" >&2;}
30469         ac_warn_datarootdir=yes
30470       fi
30471     done
30472   fi
30473
30474 if test "x$ac_warn_datarootdir" = xyes; then
30475   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30476 fi
30477
30478 EOF
30479 cat >>"$CONFIG_STATUS" <<EOF
30480   sed "$ac_vpsub
30481 $extrasub
30482 EOF
30483 cat >>"$CONFIG_STATUS" <<\EOF
30484 :t
30485 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30486 s,@configure_input@,$configure_input,;t t
30487 s,@srcdir@,$ac_srcdir,;t t
30488 s,@top_srcdir@,$ac_top_srcdir,;t t
30489 s,@INSTALL@,$ac_INSTALL,;t t
30490 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30491   rm -f "$tmp"/stdin
30492 EOF
30493 test -n "${FGREP}" || FGREP="grep -F"
30494 test -n "${EGREP}" || EGREP="grep -E"
30495 cat >>"$CONFIG_STATUS" <<EOF
30496   test -n "\${FGREP}" || FGREP="$FGREP"
30497   test -n "\${EGREP}" || EGREP="$EGREP"
30498 EOF
30499 cat >>"$CONFIG_STATUS" <<\EOF
30500   if test x"$ac_file" != x-; then
30501     cp "$tmp/out" "$ac_file"
30502
30503     for ac_name in prefix exec_prefix datarootdir
30504     do
30505         ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
30506         if test -n "$ac_seen"; then
30507             ac_init=`$EGREP '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30508             if test -z "$ac_init"; then
30509               ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30510               { echo "$as_me:30510: WARNING: Variable $ac_name is used but was not set:
30511 $ac_seen" >&5
30512 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30513 $ac_seen" >&2;}
30514             fi
30515         fi
30516     done
30517     $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30518     $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30519     if test -s "$tmp"/out; then
30520       ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30521       { echo "$as_me:30521: WARNING: Some variables may not be substituted:
30522 $ac_seen" >&5
30523 echo "$as_me: WARNING: Some variables may not be substituted:
30524 $ac_seen" >&2;}
30525     fi
30526   else
30527     cat "$tmp"/out
30528   fi
30529   rm -f "$tmp"/out
30530
30531 done
30532 EOF
30533 cat >>"$CONFIG_STATUS" <<\EOF
30534
30535 #
30536 # CONFIG_HEADER section.
30537 #
30538
30539 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30540 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30541 #
30542 # ac_d sets the value in "#define NAME VALUE" lines.
30543 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30544 ac_dB='[        ].*$,\1#\2'
30545 ac_dC=' '
30546 ac_dD=',;t'
30547 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30548 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30549 ac_iB='\([      ]\),\1#\2define\3'
30550 ac_iC=' '
30551 ac_iD='\4,;t'
30552 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30553 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30554 ac_uB='$,\1#\2define\3'
30555 ac_uC=' '
30556 ac_uD=',;t'
30557
30558 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30559   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30560   case "$ac_file" in
30561   - | *:- | *:-:* ) # input from stdin
30562         cat >"$tmp"/stdin
30563         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30564         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30565   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30566         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30567   * )   ac_file_in=$ac_file.in ;;
30568   esac
30569
30570   test x"$ac_file" != x- && { echo "$as_me:30570: creating $ac_file" >&5
30571 echo "$as_me: creating $ac_file" >&6;}
30572
30573   # First look for the input files in the build tree, otherwise in the
30574   # src tree.
30575   ac_file_inputs=`IFS=:
30576     for f in $ac_file_in; do
30577       case $f in
30578       -) echo "$tmp"/stdin ;;
30579       [\\/$]*)
30580          # Absolute (can't be DOS-style, as IFS=:)
30581          test -f "$f" || { { echo "$as_me:30581: error: cannot find input file: $f" >&5
30582 echo "$as_me: error: cannot find input file: $f" >&2;}
30583    { (exit 1); exit 1; }; }
30584          echo $f;;
30585       *) # Relative
30586          if test -f "$f"; then
30587            # Build tree
30588            echo $f
30589          elif test -f "$srcdir/$f"; then
30590            # Source tree
30591            echo "$srcdir/$f"
30592          else
30593            # /dev/null tree
30594            { { echo "$as_me:30594: error: cannot find input file: $f" >&5
30595 echo "$as_me: error: cannot find input file: $f" >&2;}
30596    { (exit 1); exit 1; }; }
30597          fi;;
30598       esac
30599     done` || { (exit 1); exit 1; }
30600   # Remove the trailing spaces.
30601   sed 's/[      ]*$//' $ac_file_inputs >"$tmp"/in
30602
30603 EOF
30604
30605 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30606 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30607 # be either 'cat' or 'sort'.
30608 cat confdefs.h | uniq >conftest.vals
30609
30610 # Break up conftest.vals because some shells have a limit on
30611 # the size of here documents, and old seds have small limits too.
30612
30613 rm -f conftest.tail
30614 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30615 while grep . conftest.vals >/dev/null
30616 do
30617   # Write chunks of a limited-size here document to conftest.frag.
30618   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30619   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30620   echo 'CEOF' >> "$CONFIG_STATUS"
30621   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30622   rm -f conftest.vals
30623   mv conftest.tail conftest.vals
30624 done
30625 rm -f conftest.vals
30626
30627 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30628 # marker @DEFS@.
30629 echo '  cat >> conftest.edit <<CEOF
30630 /@DEFS@/r conftest.frag
30631 /@DEFS@/d
30632 CEOF
30633 sed -f conftest.edit "$tmp"/in > "$tmp"/out
30634 rm -f "$tmp"/in
30635 mv "$tmp"/out "$tmp"/in
30636 rm -f conftest.edit conftest.frag
30637 ' >> "$CONFIG_STATUS"
30638
30639 cat >>"$CONFIG_STATUS" <<\EOF
30640   # Let's still pretend it is `configure' which instantiates (i.e., don't
30641   # use $as_me), people would be surprised to read:
30642   #    /* config.h.  Generated automatically by config.status.  */
30643   if test x"$ac_file" = x-; then
30644     echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
30645   else
30646     echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
30647   fi
30648   cat "$tmp"/in >>"$tmp"/config.h
30649   rm -f "$tmp"/in
30650   if test x"$ac_file" != x-; then
30651     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30652       { echo "$as_me:30652: $ac_file is unchanged" >&5
30653 echo "$as_me: $ac_file is unchanged" >&6;}
30654     else
30655       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30656          X"$ac_file" : 'X\(//\)[^/]' \| \
30657          X"$ac_file" : 'X\(//\)$' \| \
30658          X"$ac_file" : 'X\(/\)' \| \
30659          .     : '\(.\)' 2>/dev/null ||
30660 echo X"$ac_file" |
30661     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30662           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30663           /^X\(\/\/\)$/{ s//\1/; q; }
30664           /^X\(\/\).*/{ s//\1/; q; }
30665           s/.*/./; q'`
30666       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30667         { case "$ac_dir" in
30668   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30669   *)                      as_incr_dir=.;;
30670 esac
30671 as_dummy="$ac_dir"
30672 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30673   case $as_mkdir_dir in
30674     # Skip DOS drivespec
30675     ?:) as_incr_dir=$as_mkdir_dir ;;
30676     *)
30677       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30678       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30679     ;;
30680   esac
30681 done; }
30682
30683       fi
30684       rm -f "$ac_file"
30685       mv "$tmp/config.h" "$ac_file"
30686     fi
30687   else
30688     cat "$tmp"/config.h
30689     rm -f "$tmp"/config.h
30690   fi
30691 done
30692 EOF
30693 cat >>"$CONFIG_STATUS" <<\EOF
30694 #
30695 # CONFIG_COMMANDS section.
30696 #
30697 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30698   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30699   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30700
30701   case "$ac_dest" in
30702     default )
30703 if test "x$cf_with_tests" != xno ; then
30704
30705 for cf_dir in test
30706 do
30707         if test ! -d "$srcdir/$cf_dir" ; then
30708                 continue
30709         elif test -f "$srcdir/$cf_dir/programs" ; then
30710                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30711         fi
30712 done
30713
30714 fi
30715
30716 cf_prefix=$LIB_PREFIX
30717
30718 case "$cf_cv_shlib_version" in
30719 (cygdll|msysdll|mingw|msvcdll)
30720         TINFO_NAME=$TINFO_ARG_SUFFIX
30721         TINFO_SUFFIX=.dll
30722         ;;
30723 esac
30724
30725 if test -n "$TINFO_SUFFIX" ; then
30726         case "$TINFO_SUFFIX" in
30727         (tw*)
30728                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30729                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30730                 ;;
30731         (t*)
30732                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30733                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30734                 ;;
30735         (w*)
30736                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30737                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30738                 ;;
30739         esac
30740 fi
30741
30742 for cf_dir in $SRC_SUBDIRS
30743 do
30744         if test ! -d "$srcdir/$cf_dir" ; then
30745                 continue
30746         elif test -f "$srcdir/$cf_dir/modules" ; then
30747
30748                 SHARED_LIB=
30749                 Libs_To_Make=
30750                 cf_awk_program=
30751                 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
30752                 then
30753                         cf_awk_program="$cf_awk_program\
30754 /deprecated in ABI${cf_cv_abi_default}/ { next; }\
30755 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
30756 "
30757                 fi
30758
30759                 if test "x$WILDCARD_SYMS" = xno
30760                 then
30761                         cf_awk_program="$cf_awk_program\
30762 /[      ]_\\*;/ { skip=1; next; }\
30763 "
30764                 fi
30765
30766                 if test "x$cf_awk_program" != "x"
30767                 then
30768                         cat >>$cf_dir/Makefile <<CF_EOF
30769
30770 # Generated by CF_LIB_RULES
30771 resulting.map: $UNALTERED_SYMS
30772         $AWK 'BEGIN { skip = 1; last=""; } \
30773 $cf_awk_program \
30774 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30775  skip = 0; last = \$\$0; } \
30776 END { print last; }' < "$UNALTERED_SYMS" >\$@
30777
30778 distclean::
30779         rm -f resulting.map
30780 CF_EOF
30781                 fi
30782
30783                 for cf_item in $cf_LIST_MODELS
30784                 do
30785
30786         case X$cf_item in
30787         (Xlibtool)
30788                 cf_suffix='.la'
30789                 cf_depsuf=$cf_suffix
30790                 ;;
30791         (Xdebug)
30792                 case "$cf_cv_system_name" in
30793                 (*-msvc*)
30794                         cf_suffix='_g.lib'
30795                         ;;
30796                 (*)
30797                         cf_suffix='_g.a'
30798                         ;;
30799                 esac
30800                 cf_depsuf=$cf_suffix
30801                 ;;
30802         (Xprofile)
30803                 case "$cf_cv_system_name" in
30804                 (*-msvc*)
30805                         cf_suffix='_p.lib'
30806                         ;;
30807                 (*)
30808                         cf_suffix='_p.a'
30809                         ;;
30810                 esac
30811                 cf_depsuf=$cf_suffix
30812                 ;;
30813         (Xshared)
30814                 case "$cf_cv_system_name" in
30815                 (aix[5-7]*)
30816                         cf_suffix='.so'
30817                         cf_depsuf=$cf_suffix
30818                         ;;
30819                 (*-msvc*)
30820                         cf_suffix='.dll'
30821                         cf_depsuf='.dll.lib'
30822                         ;;
30823                 (cygwin*|msys*|mingw*)
30824                         cf_suffix='.dll'
30825                         cf_depsuf='.dll.a'
30826                         ;;
30827                 (darwin*)
30828                         cf_suffix='.dylib'
30829                         cf_depsuf=$cf_suffix
30830                         ;;
30831                 (hpux*)
30832                         case "$target" in
30833                         (ia64*)
30834                                 cf_suffix='.so'
30835                                 cf_depsuf=$cf_suffix
30836                                 ;;
30837                         (*)
30838                                 cf_suffix='.sl'
30839                                 cf_depsuf=$cf_suffix
30840                                 ;;
30841                         esac
30842                         ;;
30843                 (*)
30844                         cf_suffix='.so'
30845                         cf_depsuf=$cf_suffix
30846                         ;;
30847                 esac
30848                 ;;
30849         (*)
30850                 case "$target" in
30851                 (*-msvc*)
30852                         cf_suffix='.lib'
30853                         ;;
30854                 (*)
30855                         cf_suffix='.a'
30856                         ;;
30857                 esac
30858                 cf_depsuf=$cf_suffix
30859                 ;;
30860         esac
30861         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30862         then
30863                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30864                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30865         fi
30866
30867                         if test "$cf_dir" = "c++"
30868                         then
30869
30870 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30871
30872 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30873
30874                         else
30875
30876 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30877
30878 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30879
30880                         fi
30881                         test -z "$cf_libname" && cf_libname="$cf_dir"
30882                         if test "$cf_item" = shared ; then
30883                                 if test -n "${LIB_SUFFIX}"
30884                                 then
30885                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30886                                 else
30887                                         cf_shared_suffix="$cf_suffix"
30888                                 fi
30889                                 if test "$cf_cv_do_symlinks" = yes ; then
30890                                         cf_version_name=
30891
30892                                         case "$cf_cv_shlib_version" in
30893                                         (rel)
30894                                                 cf_version_name=REL_VERSION
30895                                                 ;;
30896                                         (abi)
30897                                                 cf_version_name=ABI_VERSION
30898                                                 ;;
30899                                         esac
30900
30901                                         if test -n "$cf_version_name"
30902                                         then
30903                                                 case "$cf_cv_system_name" in
30904                                                 (darwin*)
30905                                                         # "w", etc?
30906                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30907                                                         ;;
30908                                                 (*)
30909                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30910                                                         ;;
30911                                                 esac
30912                                         fi
30913                                         if test -n "${USE_LIB_SUFFIX}"
30914                                         then
30915                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30916                                         else
30917                                                 cf_shared_suffix="$cf_suffix"
30918                                         fi
30919                                 fi
30920                                 # cygwin needs import library, and has unique naming convention
30921                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30922                                 # use 'cyg' prefix for shared lib.
30923                                 case "$cf_cv_shlib_version" in
30924                                 (cygdll)
30925                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30926                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30927                                         ;;
30928                                 (msysdll)
30929                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30930                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30931                                         ;;
30932                                 (mingw)
30933                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30934                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30935                                         ;;
30936                                 (msvcdll)
30937                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30938                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30939                                         ;;
30940                                 (*)
30941                                         cf_add_lib=
30942                                         ;;
30943                                 esac
30944                                 if test -n "$cf_add_lib"
30945                                 then
30946                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30947                                         continue
30948                                 fi
30949                         fi
30950                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30951                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30952                 done
30953
30954                 if test "$cf_dir" = ncurses ; then
30955                         cf_subsets="$LIB_SUBSETS"
30956                         cf_r_parts="$cf_subsets"
30957                         cf_liblist="$Libs_To_Make"
30958
30959                         while test -n "$cf_r_parts"
30960                         do
30961                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30962                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30963                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30964                                         cf_add_lib=
30965                                         case "$cf_l_parts" in
30966                                         (*termlib*)
30967                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30968                                                 ;;
30969                                         (*ticlib*)
30970                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30971                                                 ;;
30972                                         (*)
30973                                                 break
30974                                                 ;;
30975                                         esac
30976                                         if test -n "$cf_add_lib"; then
30977                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30978                                         fi
30979                                 else
30980                                         break
30981                                 fi
30982                         done
30983                 else
30984                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30985                 fi
30986
30987                 if test "$cf_dir" = c++; then
30988                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30989                                 cf_list=
30990                                 for cf_item in $Libs_To_Make
30991                                 do
30992                                         case "$cf_item" in
30993                                         (*.a)
30994                                                 ;;
30995                                         (*)
30996                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30997                                                 ;;
30998                                         esac
30999                                         for cf_test in $cf_list
31000                                         do
31001                                                 if test "$cf_test" = "$cf_item"
31002                                                 then
31003                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
31004                                                         cf_item=
31005                                                         break
31006                                                 fi
31007                                         done
31008                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
31009                                 done
31010                                 Libs_To_Make="$cf_list"
31011                         fi
31012                 fi
31013
31014                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
31015                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
31016                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
31017                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
31018
31019                 $AWK -f "$srcdir/mk-0th.awk" \
31020                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
31021                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31022
31023                 for cf_subset in $cf_subsets
31024                 do
31025                         cf_subdirs=
31026                         for cf_item in $cf_LIST_MODELS
31027                         do
31028
31029                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
31030
31031 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31032
31033                         CXX_MODEL=$cf_ITEM
31034                         if test "$CXX_MODEL" = SHARED; then
31035                                 case "$cf_cv_shlib_version" in
31036                                 (cygdll|msysdll|mingw|msvcdll)
31037                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
31038
31039 echo "${as_me:-configure}:31039: testing overriding CXX_MODEL to SHARED ..." 1>&5
31040
31041                                         with_shared_cxx=yes
31042                                         ;;
31043                                 (*)
31044                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
31045                                         ;;
31046                                 esac
31047                         fi
31048
31049         case X$cf_item in
31050         (Xlibtool)
31051                 cf_suffix='.la'
31052                 cf_depsuf=$cf_suffix
31053                 ;;
31054         (Xdebug)
31055                 case "$cf_cv_system_name" in
31056                 (*-msvc*)
31057                         cf_suffix='_g.lib'
31058                         ;;
31059                 (*)
31060                         cf_suffix='_g.a'
31061                         ;;
31062                 esac
31063                 cf_depsuf=$cf_suffix
31064                 ;;
31065         (Xprofile)
31066                 case "$cf_cv_system_name" in
31067                 (*-msvc*)
31068                         cf_suffix='_p.lib'
31069                         ;;
31070                 (*)
31071                         cf_suffix='_p.a'
31072                         ;;
31073                 esac
31074                 cf_depsuf=$cf_suffix
31075                 ;;
31076         (Xshared)
31077                 case "$cf_cv_system_name" in
31078                 (aix[5-7]*)
31079                         cf_suffix='.so'
31080                         cf_depsuf=$cf_suffix
31081                         ;;
31082                 (*-msvc*)
31083                         cf_suffix='.dll'
31084                         cf_depsuf='.dll.lib'
31085                         ;;
31086                 (cygwin*|msys*|mingw*)
31087                         cf_suffix='.dll'
31088                         cf_depsuf='.dll.a'
31089                         ;;
31090                 (darwin*)
31091                         cf_suffix='.dylib'
31092                         cf_depsuf=$cf_suffix
31093                         ;;
31094                 (hpux*)
31095                         case "$target" in
31096                         (ia64*)
31097                                 cf_suffix='.so'
31098                                 cf_depsuf=$cf_suffix
31099                                 ;;
31100                         (*)
31101                                 cf_suffix='.sl'
31102                                 cf_depsuf=$cf_suffix
31103                                 ;;
31104                         esac
31105                         ;;
31106                 (*)
31107                         cf_suffix='.so'
31108                         cf_depsuf=$cf_suffix
31109                         ;;
31110                 esac
31111                 ;;
31112         (*)
31113                 case "$target" in
31114                 (*-msvc*)
31115                         cf_suffix='.lib'
31116                         ;;
31117                 (*)
31118                         cf_suffix='.a'
31119                         ;;
31120                 esac
31121                 cf_depsuf=$cf_suffix
31122                 ;;
31123         esac
31124         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
31125         then
31126                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
31127                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
31128         fi
31129
31130         case $cf_item in
31131         (libtool) cf_subdir='obj_lo'  ;;
31132         (normal)  cf_subdir='objects' ;;
31133         (debug)   cf_subdir='obj_g' ;;
31134         (profile) cf_subdir='obj_p' ;;
31135         (shared)
31136                 case "$cf_cv_system_name" in
31137                 (cygwin|msys)
31138                         cf_subdir='objects' ;;
31139                 (*)
31140                         cf_subdir='obj_s' ;;
31141                 esac
31142         esac
31143
31144                         # Test for case where we build libtinfo with a different name.
31145                         cf_libname=$cf_dir
31146                         if test "$cf_dir" = ncurses ; then
31147                                 case "$cf_subset" in
31148                                 (*base*)
31149                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
31150                                         ;;
31151                                 (*termlib*)
31152                                         cf_libname=$TINFO_LIB_SUFFIX
31153                                         ;;
31154                                 (ticlib*)
31155                                         cf_libname=$TICS_LIB_SUFFIX
31156                                         ;;
31157                                 esac
31158                         elif test "$cf_dir" = c++ ; then
31159
31160 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31161
31162 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31163
31164                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31165                         else
31166
31167 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31168
31169 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31170
31171                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31172                         fi
31173                         if test -n "${USE_ARG_SUFFIX}" ; then
31174                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
31175                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
31176                         fi
31177
31178                         # These dependencies really are for development, not
31179                         # builds, but they are useful in porting, too.
31180                         cf_depend="../include/ncurses_cfg.h"
31181                         if test "$srcdir" = "."; then
31182                                 cf_reldir="."
31183                         else
31184                                 cf_reldir="\${srcdir}"
31185                         fi
31186
31187                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
31188                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
31189                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
31190                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
31191                         fi
31192
31193                         cf_dir_suffix=
31194                         old_cf_suffix="$cf_suffix"
31195                         if test "$cf_cv_shlib_version_infix" = yes ; then
31196                         if test -n "$USE_LIB_SUFFIX" ; then
31197                                 case "$USE_LIB_SUFFIX" in
31198                                 (tw*)
31199                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
31200                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
31201                                         cf_dir_suffix=tw$EXTRA_SUFFIX
31202                                         ;;
31203                                 (t*)
31204                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
31205                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
31206                                         cf_dir_suffix=t$EXTRA_SUFFIX
31207                                         ;;
31208                                 (w*)
31209                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
31210                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
31211                                         cf_dir_suffix=w$EXTRA_SUFFIX
31212                                         ;;
31213                                 (*)
31214                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
31215                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
31216                                         cf_dir_suffix=$EXTRA_SUFFIX
31217                                         ;;
31218                                 esac
31219                         fi
31220                         fi
31221
31222                         $AWK -f "$srcdir/mk-1st.awk" \
31223                                 name=${cf_libname}${cf_dir_suffix} \
31224                                 traces=$LIB_TRACING \
31225                                 MODEL=$cf_ITEM \
31226                                 CXX_MODEL=$CXX_MODEL \
31227                                 LIB_SUFFIX=$LIB_SUFFIX \
31228                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
31229                                 make_phony="${cf_cv_make_PHONY:-no}" \
31230                                 model=$cf_subdir \
31231                                 prefix=$cf_prefix \
31232                                 suffix=$cf_suffix \
31233                                 subset=$cf_subset \
31234                                 driver=$cf_cv_term_driver \
31235                                 SymLink="$LN_S" \
31236                                 TermlibRoot=$TINFO_NAME \
31237                                 TermlibSuffix=$TINFO_SUFFIX \
31238                                 ShlibVer=$cf_cv_shlib_version \
31239                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
31240                                 ReLink=${cf_cv_do_relink:-no} \
31241                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
31242                                 DoLinks=$cf_cv_do_symlinks \
31243                                 rmSoLocs=$cf_cv_rm_so_locs \
31244                                 ldconfig="$LDCONFIG" \
31245                                 overwrite=$WITH_OVERWRITE \
31246                                 depend="$cf_depend" \
31247                                 host="$host" \
31248                                 libtool_version="$LIBTOOL_VERSION" \
31249                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31250
31251                         cf_suffix="$old_cf_suffix"
31252
31253                         for cf_subdir2 in $cf_subdirs lib
31254                         do
31255                                 test "$cf_subdir" = "$cf_subdir2" && break
31256                         done
31257                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31258                         $AWK -f "$srcdir/mk-2nd.awk" \
31259                                 name=$cf_dir \
31260                                 traces=$LIB_TRACING \
31261                                 MODEL=$cf_ITEM \
31262                                 model=$cf_subdir \
31263                                 subset=$cf_subset \
31264                                 srcdir=$srcdir \
31265                                 echo=$WITH_ECHO \
31266                                 crenames=$cf_cv_prog_CC_c_o \
31267                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31268                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31269                         cf_subdirs="$cf_subdirs $cf_subdir"
31270                         done
31271                 done
31272         fi
31273
31274         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31275 done
31276
31277 echo >> Makefile
31278 echo '# generated by CF_LIB_RULES' >> Makefile
31279
31280 if test "x$cf_cv_make_PHONY" = xyes ; then
31281         cat >> Makefile <<-CF_EOF
31282
31283         .PHONY :        libs
31284         .PHONY :        lintlib
31285         .PHONY :        install.includes
31286         .PHONY :        uninstall.includes
31287         .PHONY :        install.libs
31288         .PHONY :        uninstall.libs
31289 CF_EOF
31290 fi
31291
31292 for cf_dir in $SRC_SUBDIRS
31293 do
31294         if test ! -d "$srcdir/$cf_dir" ; then
31295                 continue
31296         fi
31297
31298         if test -f "$cf_dir/Makefile" ; then
31299                 case "$cf_dir" in
31300                 (Ada95)
31301                         echo 'libs \' >> Makefile
31302                         echo 'install.libs \' >> Makefile
31303                         echo 'uninstall.libs ::' >> Makefile
31304                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31305                         ;;
31306                 esac
31307         fi
31308
31309         if test -f "$srcdir/$cf_dir/modules" ; then
31310
31311                 if test "x$cf_cv_make_PHONY" = xyes ; then
31312                         cat >> Makefile <<-CF_EOF
31313
31314                         .PHONY :        install.$cf_dir
31315                         .PHONY :        uninstall.$cf_dir
31316 CF_EOF
31317                 fi
31318
31319                 echo >> Makefile
31320                 if test -f "$srcdir/$cf_dir/headers" ; then
31321 cat >> Makefile <<CF_EOF
31322 install.includes \\
31323 uninstall.includes \\
31324 CF_EOF
31325                 fi
31326
31327 cat >> Makefile <<CF_EOF
31328 lint \\
31329 libs \\
31330 lintlib \\
31331 install.libs \\
31332 uninstall.libs \\
31333 install.$cf_dir \\
31334 uninstall.$cf_dir ::
31335         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31336 CF_EOF
31337         elif test -f "$srcdir/$cf_dir/headers" ; then
31338 cat >> Makefile <<CF_EOF
31339
31340 libs \\
31341 install.libs \\
31342 uninstall.libs \\
31343 install.includes \\
31344 uninstall.includes ::
31345         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31346 CF_EOF
31347 fi
31348 done
31349
31350 if test "x$cf_cv_make_PHONY" = xyes ; then
31351         cat >> Makefile <<-CF_EOF
31352
31353         .PHONY :        install.data
31354         .PHONY :        uninstall.data
31355 CF_EOF
31356 fi
31357
31358 if test "x$cf_with_db_install" = xyes; then
31359 cat >> Makefile <<CF_EOF
31360
31361 install.libs uninstall.libs \\
31362 install.data uninstall.data ::
31363 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31364 CF_EOF
31365 else
31366 cat >> Makefile <<CF_EOF
31367
31368 install.libs uninstall.libs ::
31369         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31370 CF_EOF
31371 fi
31372
31373 if test "x$cf_with_manpages" = xyes; then
31374
31375 if test "x$cf_cv_make_PHONY" = xyes ; then
31376         cat >> Makefile <<-CF_EOF
31377
31378         .PHONY :        install.man
31379         .PHONY :        uninstall.man
31380 CF_EOF
31381 fi
31382
31383 cat >> Makefile <<CF_EOF
31384
31385 install.man \\
31386 uninstall.man ::
31387         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31388 CF_EOF
31389 fi
31390
31391 cat >> Makefile <<CF_EOF
31392
31393 distclean ::
31394         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31395         rm -f headers.sh headers.sed mk_shared_lib.sh
31396         rm -f edit_man.* man_alias.* *.tmp
31397         rm -rf \${DIRS_TO_MAKE}
31398 CF_EOF
31399
31400 rm -f headers.sed headers.sh
31401
31402 echo creating headers.sh
31403 cat >headers.sh <<CF_EOF
31404 #! $SHELL
31405 # This shell script is generated by the 'configure' script.  It is invoked in a
31406 # subdirectory of the build tree.  It generates a sed-script in the parent
31407 # directory that is used to adjust includes for header files that reside in a
31408 # subdirectory of /usr/include, etc.
31409 PRG=""
31410 while test \$# != 3
31411 do
31412 PRG="\$PRG \$1"; shift
31413 done
31414 DST=\$1
31415 REF=\$2
31416 SRC=\$3
31417 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31418 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31419 echo installing \$SRC in \$DST
31420 CF_EOF
31421
31422 if test "$WITH_CURSES_H" = yes; then
31423         cat >>headers.sh <<CF_EOF
31424 case \$DST in
31425 (/*/include/*)
31426         END=\`basename \$DST\`
31427         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31428         do
31429                 NAME=\`basename \$i\`
31430                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31431         done
31432         ;;
31433 (*)
31434         echo "" >> \$TMPSED
31435         ;;
31436 esac
31437 CF_EOF
31438
31439 else
31440         cat >>headers.sh <<CF_EOF
31441 case \$DST in
31442 (/*/include/*)
31443         END=\`basename \$DST\`
31444         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31445         do
31446                 NAME=\`basename \$i\`
31447                 if test "\$NAME" = "curses.h"
31448                 then
31449                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31450                         NAME=ncurses.h
31451                 fi
31452                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31453         done
31454         ;;
31455 (*)
31456         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31457         ;;
31458 esac
31459 CF_EOF
31460 fi
31461 cat >>headers.sh <<CF_EOF
31462 rm -f \$TMPSRC
31463 sed -f \$TMPSED \$SRC > \$TMPSRC
31464 NAME=\`basename \$SRC\`
31465 CF_EOF
31466 if test "$WITH_CURSES_H" != yes; then
31467         cat >>headers.sh <<CF_EOF
31468 test "\$NAME" = "curses.h" && NAME=ncurses.h
31469 CF_EOF
31470 fi
31471 cat >>headers.sh <<CF_EOF
31472 # Just in case someone gzip'd manpages, remove the conflicting copy.
31473 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31474
31475 eval \$PRG \$TMPSRC \$DST/\$NAME
31476 rm -f \$TMPSRC \$TMPSED
31477 CF_EOF
31478
31479 chmod 0755 headers.sh
31480
31481 for cf_dir in $SRC_SUBDIRS
31482 do
31483         if test ! -d "$srcdir/$cf_dir" ; then
31484                 continue
31485         fi
31486
31487         if test -f "$srcdir/$cf_dir/headers" ; then
31488                 $AWK -f "$srcdir/mk-hdr.awk" \
31489                         subset="$LIB_SUBSETS" \
31490                         compat="$WITH_CURSES_H" \
31491                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31492         fi
31493
31494         if test -f "$srcdir/$cf_dir/modules" ; then
31495                 if test "$cf_dir" != "c++" ; then
31496                         if test "x$cf_cv_make_PHONY" = xyes ; then
31497                                 cat >> $cf_dir/Makefile <<-CF_EOF
31498
31499                                 .PHONY :        depend
31500 CF_EOF
31501                         fi
31502
31503                         cat >>$cf_dir/Makefile <<"CF_EOF"
31504 depend : ${AUTO_SRC}
31505         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31506
31507 # DO NOT DELETE THIS LINE -- make depend depends on it.
31508 CF_EOF
31509                 fi
31510         fi
31511 done
31512
31513 if test "$MANPAGE_RENAMES" != no ; then
31514         # Construct a sed-script to perform renaming within man-pages
31515         test -n "$verbose" && echo "creating edit_man.sed"
31516         test ! -d man && mkdir man
31517         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31518 fi
31519
31520 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31521 if test -z "$USE_OLD_MAKERULES" ; then
31522         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31523 fi
31524 fi
31525  ;;
31526   esac
31527 done
31528 EOF
31529
31530 cat >>"$CONFIG_STATUS" <<\EOF
31531
31532 { (exit 0); exit 0; }
31533 EOF
31534 chmod +x "$CONFIG_STATUS"
31535 ac_clean_files=$ac_clean_files_save
31536
31537 # configure is writing to config.log, and then calls config.status.
31538 # config.status does its own redirection, appending to config.log.
31539 # Unfortunately, on DOS this fails, as config.log is still kept open
31540 # by configure, so config.status won't be able to write to it; its
31541 # output is simply discarded.  So we exec the FD to /dev/null,
31542 # effectively closing config.log, so it can be properly (re)opened and
31543 # appended to by config.status.  When coming back to configure, we
31544 # need to make the FD available again.
31545 if test "$no_create" != yes; then
31546   ac_cs_success=:
31547   exec 5>/dev/null
31548   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31549   exec 5>>config.log
31550   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31551   # would make configure fail if this is the last instruction.
31552   "$ac_cs_success" || { (exit 1); exit 1; }
31553 fi
31554 ${MAKE:-make} preinstall