]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.3 - patch 20211115
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.737 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210509.
5 #
6 # Copyright 2003-2020,2021      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   --without-ada           suppress check for Ada compiler, don't build demo
720   --without-cxx           do not adjust ncurses bool to match C++
721   --without-cxx-binding   do not build C++ binding and demo
722   --disable-db-install    suppress install of terminal database
723   --without-manpages      suppress install of manpages
724   --without-progs         suppress build/install with programs (e.g., tic)
725   --without-tack          suppress build/install with tack program
726   --without-tests         suppress build/install with test-programs
727   --without-curses-h      install curses.h as ncurses.h only
728   --with-config-suffix=X  suffixes ncursesXX-config file
729   --with-pkg-config{=path} enable/disable use of pkg-config
730   --with-pkg-config-libdir=XXX use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix        suffixes pc-files
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix   prefixes actual install-location ($DESTDIR)
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version=X  Specify rel or abi version for shared libs
756   --with-libtool-opts=XXX specify additional libtool options
757   --with-export-syms=XXX  limit exported symbols using libtool
758   --with-versioned-syms=X markup versioned symbols using ld
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix=X   append extra suffix to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict root use of ncurses environment variables
787   --disable-root-access   restrict file-access when running setuid
788   --enable-symlinks       make tic use symbolic links not hard links
789   --enable-broken_linker  compile with broken-linker support code
790   --enable-bsdpad         recognize BSD-style prefix padding
791   --enable-widec          compile with wide-char/UTF-8 code
792   --disable-lp64          allow chtype to be long (ignore _LP64)
793   --disable-largefile     omit support for large files
794   --disable-tparm-varargs compile tparm() without varargs interface
795   --disable-tic-depends   link tic library without explicit dependency on ncurses library
796   --enable-wattr-macros   enable wattr* macros
797   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
798   --with-bool=TYPE        override fallback type of bool variable
799   --with-caps=alt         compile with alternate Caps file
800   --with-chtype=TYPE      override type of chtype
801   --with-ospeed=TYPE      override type of ospeed variable
802   --with-mmask-t=TYPE     override type of mmask_t
803   --with-ccharw-max=XXX   override size CCHARW_MAX
804   --enable-signed-char    compile using signed Boolean's in term.h
805   --with-tparm-arg=TYPE   override parameter type of tparm
806   --with-rcs-ids          compile-in RCS identifiers
807 Options to Specify How Manpages are Installed:
808   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
809                           optionally formatted/catonly, e.g., gzip,formatted
810   --with-manpage-renames  specify manpage-renaming
811   --with-manpage-aliases  specify manpage-aliases using .so
812   --with-manpage-symlinks specify manpage-aliases using symlinks
813   --with-manpage-tbl      specify manpage processing with tbl
814 Extensions:
815   --disable-ext-funcs     disable function-extensions
816   --enable-sp-funcs       enable SCREEN-extensions
817   --enable-term-driver    enable terminal-driver
818   --enable-const          compile with extra/non-standard const
819   --enable-ext-colors     compile for 256-color support
820   --enable-ext-mouse      compile for extended mouse-encoding
821   --enable-ext-putwin     compile with extended putwin/screendump
822   --enable-no-padding     compile with $NCURSES_NO_PADDING code
823   --enable-sigwinch       compile with SIGWINCH handler
824   --enable-tcap-names     compile with user-definable terminal capabilities
825 Reentrant Code:
826   --with-pthread          use POSIX thread library
827   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
828   --enable-weak-symbols   enable weak-symbols for pthreads
829   --enable-reentrant      compile with reentrant code
830   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
831   --enable-opaque-form    make form-library structures "opaque"
832   --enable-opaque-menu    make menu-library structures "opaque"
833   --enable-opaque-panel   make panel-library structures "opaque"
834   --with-wrap-prefix=XXX  override prefix used for public variables
835 Development Code:
836   --without-develop       disable development options
837   --enable-hard-tabs      compile with hard-tabs code
838   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
839 Experimental Code:
840   --disable-assumed-color do not assume anything about default-colors
841   --disable-hashmap       compile without hashmap scrolling-optimization
842   --enable-colorfgbg      compile-in experimental $COLORFGBG code
843   --enable-fvisibility    compile with -fvisibility=hidden
844   --enable-interop        compile-in interop bindings
845   --enable-safe-sprintf   compile with experimental safe-sprintf code
846   --disable-scroll-hints  compile without scroll-hints code
847   --enable-wgetch-events  compile with wgetch-events code
848   --enable-exp-win32      compile with experimental-Windows driver
849 Testing/development Options:
850   --disable-echo          do not display "compiling" commands
851   --disable-stripping     do not strip (debug info) installed executables
852   --enable-warnings       test: turn on gcc compiler warnings
853   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
854   --enable-string-hacks   work around bogus compiler/loader warnings
855   --enable-assertions     test: turn on generation of assertion code
856   --with-dmalloc          test: use Gray Watson's dmalloc library
857   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
858   --with-valgrind         test: use valgrind
859   --disable-leaks         test: free permanent memory, analyze leaks
860   --enable-expanded       test: generate functions for certain macros
861   --disable-macros        test: use functions rather than macros
862   --with-trace            test: add trace() function to all models of ncurses
863   --disable-gnat-projects test: disable GNAT projects even if usable
864 Ada Binding Options:
865   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
866   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
867   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
868   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
869   --with-ada-libname=XXX  override default Ada library-name
870   --with-form-libname=XXX override form basename of library
871   --with-menu-libname=XXX override menu basename of library
872   --with-panel-libname=XXX override panel basename of library
873   --with-cxx-libname=XXX override ncurses++ basename of library
874
875 Some influential environment variables:
876   CC          C compiler command
877   CFLAGS      C compiler flags
878   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
879               nonstandard directory <lib dir>
880   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
881               headers in a nonstandard directory <include dir>
882   CPP         C preprocessor
883   CXX         C++ compiler command
884   CXXFLAGS    C++ compiler flags
885   CXXCPP      C++ preprocessor
886
887 Use these variables to override the choices made by `configure' or to help
888 it to find libraries and programs with nonstandard names/locations.
889
890 EOF
891 fi
892
893 if test "$ac_init_help" = "recursive"; then
894   # If there are subdirs, report their specific --help.
895   ac_popdir=`pwd`
896   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
897     cd "$ac_subdir"
898     # A "../" for each directory in /$ac_subdir.
899     ac_dots=`echo "$ac_subdir" |
900              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
901
902     case "$srcdir" in
903     .) # No --srcdir option.  We are building in place.
904       ac_sub_srcdir="$srcdir" ;;
905     [\\/]* | ?:[\\/]* ) # Absolute path.
906       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
907     *) # Relative path.
908       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
909     esac
910
911     # Check for guested configure; otherwise get Cygnus style configure.
912     if test -f "$ac_sub_srcdir/configure.gnu"; then
913       echo
914       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
915     elif test -f "$ac_sub_srcdir/configure"; then
916       echo
917       $SHELL "$ac_sub_srcdir/configure" --help=recursive
918     elif test -f "$ac_sub_srcdir/configure.ac" ||
919            test -f "$ac_sub_srcdir/configure.in"; then
920       echo
921       "$ac_configure" --help
922     else
923       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
924     fi
925     cd "$ac_popdir"
926   done
927 fi
928
929 test -n "$ac_init_help" && exit 0
930 if "$ac_init_version"; then
931   cat <<\EOF
932
933 Copyright 2003-2020,2021        Thomas E. Dickey
934 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
935 Free Software Foundation, Inc.
936 This configure script is free software; the Free Software Foundation
937 gives unlimited permission to copy, distribute and modify it.
938 EOF
939   exit 0
940 fi
941 exec 5>config.log
942 cat >&5 <<EOF
943 This file contains any messages produced by compilers while
944 running configure, to aid debugging if configure makes a mistake.
945
946 It was created by $as_me, which was
947 generated by GNU Autoconf 2.52.20210509.  Invocation command line was
948
949   $ $0 $@
950
951 EOF
952 {
953 cat <<_ASUNAME
954 ## ---------- ##
955 ## Platform.  ##
956 ## ---------- ##
957
958 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
959 uname -m = `(uname -m) 2>/dev/null || echo unknown`
960 uname -r = `(uname -r) 2>/dev/null || echo unknown`
961 uname -s = `(uname -s) 2>/dev/null || echo unknown`
962 uname -v = `(uname -v) 2>/dev/null || echo unknown`
963
964 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
965 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
966
967 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
968 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
969 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
970 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
971 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
972 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
973 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
974
975 PATH = $PATH
976
977 _ASUNAME
978 } >&5
979
980 cat >&5 <<EOF
981 ## ------------ ##
982 ## Core tests.  ##
983 ## ------------ ##
984
985 EOF
986
987 # Keep a trace of the command line.
988 # Strip out --no-create and --no-recursion so they do not pile up.
989 # Also quote any args containing shell meta-characters.
990 ac_configure_args=
991 ac_sep=
992 for ac_arg
993 do
994   case "$ac_arg" in
995   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
996   | --no-cr | --no-c) ;;
997   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
998   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
999   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1000     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1001     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1002     ac_sep=" " ;;
1003   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1004      ac_sep=" " ;;
1005   esac
1006   # Get rid of the leading space.
1007 done
1008
1009 # When interrupted or exit'd, cleanup temporary files, and complete
1010 # config.log.  We remove comments because anyway the quotes in there
1011 # would cause problems or look ugly.
1012 trap 'exit_status=$?
1013   # Save into config.log some information that might help in debugging.
1014   echo >&5
1015   echo "## ----------------- ##" >&5
1016   echo "## Cache variables.  ##" >&5
1017   echo "## ----------------- ##" >&5
1018   echo >&5
1019   # The following way of writing the cache mishandles newlines in values,
1020 {
1021   (set) 2>&1 |
1022     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1023     *ac_space=\ *)
1024       sed -n \
1025         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1026           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1027       ;;
1028     *)
1029       sed -n \
1030         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1031       ;;
1032     esac;
1033 } >&5
1034   sed "/^$/d" confdefs.h >conftest.log
1035   if test -s conftest.log; then
1036     echo >&5
1037     echo "## ------------ ##" >&5
1038     echo "## confdefs.h.  ##" >&5
1039     echo "## ------------ ##" >&5
1040     echo >&5
1041     cat conftest.log >&5
1042   fi
1043   (echo; echo) >&5
1044   test "$ac_signal" != 0 &&
1045     echo "$as_me: caught signal $ac_signal" >&5
1046   echo "$as_me: exit $exit_status" >&5
1047   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1048     exit $exit_status
1049      ' 0
1050 for ac_signal in 1 2 13 15; do
1051   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1052 done
1053 ac_signal=0
1054
1055 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1056 rm -rf conftest* confdefs.h
1057 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1058 echo >confdefs.h
1059
1060 # Let the site file select an alternate cache file if it wants to.
1061 # Prefer explicitly selected file to automatically selected ones.
1062 if test -z "$CONFIG_SITE"; then
1063   if test "x$prefix" != xNONE; then
1064     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1065   else
1066     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1067   fi
1068 fi
1069 for ac_site_file in $CONFIG_SITE; do
1070   if test -r "$ac_site_file"; then
1071     { echo "$as_me:1071: loading site script $ac_site_file" >&5
1072 echo "$as_me: loading site script $ac_site_file" >&6;}
1073     cat "$ac_site_file" >&5
1074     . "$ac_site_file"
1075   fi
1076 done
1077
1078 if test -r "$cache_file"; then
1079   # Some versions of bash will fail to source /dev/null (special
1080   # files actually), so we avoid doing that.
1081   if test -f "$cache_file"; then
1082     { echo "$as_me:1082: loading cache $cache_file" >&5
1083 echo "$as_me: loading cache $cache_file" >&6;}
1084     case $cache_file in
1085       [\\/]* | ?:[\\/]* ) . $cache_file;;
1086       *)                      . ./$cache_file;;
1087     esac
1088   fi
1089 else
1090   { echo "$as_me:1090: creating cache $cache_file" >&5
1091 echo "$as_me: creating cache $cache_file" >&6;}
1092   >$cache_file
1093 fi
1094
1095 # Check that the precious variables saved in the cache have kept the same
1096 # value.
1097 ac_cache_corrupted=false
1098 for ac_var in `(set) 2>&1 |
1099                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1100   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1101   eval ac_new_set=\$ac_env_${ac_var}_set
1102   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1103   eval ac_new_val="\$ac_env_${ac_var}_value"
1104   case "$ac_old_set,$ac_new_set" in
1105     set,)
1106       { echo "$as_me:1106: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1107 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1108       ac_cache_corrupted=: ;;
1109     ,set)
1110       { echo "$as_me:1110: error: \`$ac_var' was not set in the previous run" >&5
1111 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1112       ac_cache_corrupted=: ;;
1113     ,);;
1114     *)
1115       if test "x$ac_old_val" != "x$ac_new_val"; then
1116         { echo "$as_me:1116: error: \`$ac_var' has changed since the previous run:" >&5
1117 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1118         { echo "$as_me:1118:   former value:  $ac_old_val" >&5
1119 echo "$as_me:   former value:  $ac_old_val" >&2;}
1120         { echo "$as_me:1120:   current value: $ac_new_val" >&5
1121 echo "$as_me:   current value: $ac_new_val" >&2;}
1122         ac_cache_corrupted=:
1123       fi;;
1124   esac
1125   # Pass precious variables to config.status.  It doesn't matter if
1126   # we pass some twice (in addition to the command line arguments).
1127   if test "$ac_new_set" = set; then
1128     case "$ac_new_val" in
1129     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1130       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1131       ac_configure_args="$ac_configure_args '$ac_arg'"
1132       ;;
1133     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1134        ;;
1135     esac
1136   fi
1137 done
1138 if "$ac_cache_corrupted"; then
1139   { echo "$as_me:1139: error: changes in the environment can compromise the build" >&5
1140 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1141   { { echo "$as_me:1141: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1142 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1143    { (exit 1); exit 1; }; }
1144 fi
1145
1146 ac_ext=c
1147 ac_cpp='$CPP $CPPFLAGS'
1148 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1149 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1150 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1151 ac_main_return="return"
1152
1153 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1154   *c*,-n*) ECHO_N=
1155            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1156            ECHO_T='     '
1157            ;;
1158   *c*,*  ) ECHO_N=-n
1159            ECHO_C=
1160            ECHO_T=
1161            ;;
1162   *)       ECHO_N=
1163            ECHO_C='\c'
1164            ECHO_T=
1165            ;;
1166 esac
1167 echo "#! $SHELL" >conftest.sh
1168 echo  "exit 0"   >>conftest.sh
1169 chmod +x conftest.sh
1170 if { (echo "$as_me:1170: PATH=\".;.\"; conftest.sh") >&5
1171   (PATH=".;."; conftest.sh) 2>&5
1172   ac_status=$?
1173   echo "$as_me:1173: \$? = $ac_status" >&5
1174   (exit "$ac_status"); }; then
1175   ac_path_separator=';'
1176 else
1177   ac_path_separator=:
1178 fi
1179 PATH_SEPARATOR="$ac_path_separator"
1180 rm -f conftest.sh
1181
1182 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1183
1184 top_builddir=`pwd`
1185
1186 for ac_prog in ggrep grep
1187 do
1188   # Extract the first word of "$ac_prog", so it can be a program name with args.
1189 set dummy $ac_prog; ac_word=$2
1190 echo "$as_me:1190: checking for $ac_word" >&5
1191 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1192 if test "${ac_cv_prog_GREP+set}" = set; then
1193   echo $ECHO_N "(cached) $ECHO_C" >&6
1194 else
1195   if test -n "$GREP"; then
1196   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1197 else
1198   ac_save_IFS=$IFS; IFS=$ac_path_separator
1199 ac_dummy="$PATH"
1200 for ac_dir in $ac_dummy; do
1201   IFS=$ac_save_IFS
1202   test -z "$ac_dir" && ac_dir=.
1203   $as_executable_p "$ac_dir/$ac_word" || continue
1204 ac_cv_prog_GREP="$ac_prog"
1205 echo "$as_me:1205: found $ac_dir/$ac_word" >&5
1206 break
1207 done
1208
1209 fi
1210 fi
1211 GREP=$ac_cv_prog_GREP
1212 if test -n "$GREP"; then
1213   echo "$as_me:1213: result: $GREP" >&5
1214 echo "${ECHO_T}$GREP" >&6
1215 else
1216   echo "$as_me:1216: result: no" >&5
1217 echo "${ECHO_T}no" >&6
1218 fi
1219
1220   test -n "$GREP" && break
1221 done
1222 test -n "$GREP" || GREP=": "
1223
1224 echo "$as_me:1224: checking for egrep" >&5
1225 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1226 if test "${ac_cv_path_EGREP+set}" = set; then
1227   echo $ECHO_N "(cached) $ECHO_C" >&6
1228 else
1229   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1230    then ac_cv_path_EGREP="$GREP -E"
1231    else
1232      for ac_prog in gegrep egrep
1233 do
1234   # Extract the first word of "$ac_prog", so it can be a program name with args.
1235 set dummy $ac_prog; ac_word=$2
1236 echo "$as_me:1236: checking for $ac_word" >&5
1237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1238 if test "${ac_cv_path_EGREP+set}" = set; then
1239   echo $ECHO_N "(cached) $ECHO_C" >&6
1240 else
1241   case $EGREP in
1242   [\\/]* | ?:[\\/]*)
1243   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1244   ;;
1245   *)
1246   ac_save_IFS=$IFS; IFS=$ac_path_separator
1247 ac_dummy="$PATH"
1248 for ac_dir in $ac_dummy; do
1249   IFS=$ac_save_IFS
1250   test -z "$ac_dir" && ac_dir=.
1251   if $as_executable_p "$ac_dir/$ac_word"; then
1252    ac_cv_path_EGREP="$ac_dir/$ac_word"
1253    echo "$as_me:1253: found $ac_dir/$ac_word" >&5
1254    break
1255 fi
1256 done
1257
1258   ;;
1259 esac
1260 fi
1261 EGREP=$ac_cv_path_EGREP
1262
1263 if test -n "$EGREP"; then
1264   echo "$as_me:1264: result: $EGREP" >&5
1265 echo "${ECHO_T}$EGREP" >&6
1266 else
1267   echo "$as_me:1267: result: no" >&5
1268 echo "${ECHO_T}no" >&6
1269 fi
1270
1271   test -n "$EGREP" && break
1272 done
1273 test -n "$EGREP" || EGREP=": "
1274
1275      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1275: error: cannot find workable egrep" >&5
1276 echo "$as_me: error: cannot find workable egrep" >&2;}
1277    { (exit 1); exit 1; }; }
1278    fi
1279 fi
1280 echo "$as_me:1280: result: $ac_cv_path_EGREP" >&5
1281 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1282  EGREP="$ac_cv_path_EGREP"
1283
1284 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1285 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1286 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1287 cf_cv_abi_version=${NCURSES_MAJOR}
1288 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1289 cf_cv_timestamp=`date`
1290 echo "$as_me:1290: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1291 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1292
1293 if test -f "$srcdir/VERSION" ; then
1294         echo "$as_me:1294: checking for package version" >&5
1295 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1296
1297         # if there are not enough fields, cut returns the last one...
1298         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1299         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1300         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1301
1302         # this is how CF_BUNDLED_INTL uses $VERSION:
1303         VERSION="$cf_field1"
1304
1305         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1306         test -z "$VERSION_MAJOR" && { { echo "$as_me:1306: error: missing major-version" >&5
1307 echo "$as_me: error: missing major-version" >&2;}
1308    { (exit 1); exit 1; }; }
1309
1310         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1311         test -z "$VERSION_MINOR" && { { echo "$as_me:1311: error: missing minor-version" >&5
1312 echo "$as_me: error: missing minor-version" >&2;}
1313    { (exit 1); exit 1; }; }
1314
1315         echo "$as_me:1315: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1316 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1317
1318         echo "$as_me:1318: checking for package patch date" >&5
1319 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1320         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1321         case .$VERSION_PATCH in
1322         (.)
1323                 { { echo "$as_me:1323: error: missing patch-date $VERSION_PATCH" >&5
1324 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1325    { (exit 1); exit 1; }; }
1326                 ;;
1327         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1328                 ;;
1329         (*)
1330                 { { echo "$as_me:1330: error: illegal patch-date $VERSION_PATCH" >&5
1331 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1332    { (exit 1); exit 1; }; }
1333                 ;;
1334         esac
1335         echo "$as_me:1335: result: $VERSION_PATCH" >&5
1336 echo "${ECHO_T}$VERSION_PATCH" >&6
1337 else
1338         { { echo "$as_me:1338: error: did not find $srcdir/VERSION" >&5
1339 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1340    { (exit 1); exit 1; }; }
1341 fi
1342
1343 # show the actual data that we have for versions:
1344 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1345
1346 echo "${as_me:-configure}:1346: testing ABI VERSION $VERSION ..." 1>&5
1347
1348 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1349
1350 echo "${as_me:-configure}:1350: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1351
1352 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1353
1354 echo "${as_me:-configure}:1354: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1355
1356 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1357
1358 echo "${as_me:-configure}:1358: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1359
1360         cf_PACKAGE=NCURSES
1361         PACKAGE=ncurses
1362
1363 cat >>confdefs.h <<EOF
1364 #define PACKAGE "$PACKAGE"
1365 EOF
1366
1367 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1368
1369         cat >>confdefs.h <<EOF
1370 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1371 EOF
1372
1373         cat >>confdefs.h <<EOF
1374 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1375 EOF
1376
1377 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1378
1379 # Check whether --with-rel-version or --without-rel-version was given.
1380 if test "${with_rel_version+set}" = set; then
1381   withval="$with_rel_version"
1382   { echo "$as_me:1382: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1383 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1384  cf_cv_rel_version=$withval
1385 fi;
1386
1387  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1388  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1389
1390 if test -n "$NCURSES_MAJOR" ; then
1391   case $NCURSES_MAJOR in
1392   ([0-9]*)
1393         ;;
1394   (*)
1395         { { echo "$as_me:1395: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1396 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1397    { (exit 1); exit 1; }; }
1398         ;;
1399   esac
1400 else
1401   { { echo "$as_me:1401: error: Release major-version value is empty" >&5
1402 echo "$as_me: error: Release major-version value is empty" >&2;}
1403    { (exit 1); exit 1; }; }
1404 fi
1405
1406 if test -n "$NCURSES_MINOR" ; then
1407   case $NCURSES_MINOR in
1408   ([0-9]*)
1409         ;;
1410   (*)
1411         { { echo "$as_me:1411: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1412 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1413    { (exit 1); exit 1; }; }
1414         ;;
1415   esac
1416 else
1417   { { echo "$as_me:1417: error: Release minor-version value is empty" >&5
1418 echo "$as_me: error: Release minor-version value is empty" >&2;}
1419    { (exit 1); exit 1; }; }
1420 fi
1421
1422 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1423
1424 # Check whether --with-abi-version or --without-abi-version was given.
1425 if test "${with_abi_version+set}" = set; then
1426   withval="$with_abi_version"
1427
1428         if test "x$cf_cv_abi_version" != "x$withval"
1429         then
1430                 { echo "$as_me:1430: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1431 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1432                 case "$cf_cv_rel_version" in
1433                 (5.*)
1434                         cf_cv_rel_version=$withval.0
1435                         ;;
1436                 (6.*)
1437                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1438                         ;;
1439                 esac
1440         fi
1441         cf_cv_abi_version=$withval
1442 fi;
1443
1444 if test -n "$cf_cv_abi_version" ; then
1445   case $cf_cv_abi_version in
1446   ([0-9]*)
1447         ;;
1448   (*)
1449         { { echo "$as_me:1449: error: ABI version is not a number: $cf_cv_abi_version" >&5
1450 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1451    { (exit 1); exit 1; }; }
1452         ;;
1453   esac
1454 else
1455   { { echo "$as_me:1455: error: ABI version value is empty" >&5
1456 echo "$as_me: error: ABI version value is empty" >&2;}
1457    { (exit 1); exit 1; }; }
1458 fi
1459
1460 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1461 then
1462         case "$cf_cv_rel_version" in
1463         (5.*)
1464                 cf_cv_rel_version=$with_abi_version.0
1465                 ;;
1466         esac
1467 fi
1468
1469 ac_aux_dir=
1470 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1471   if test -f "$ac_dir/install-sh"; then
1472     ac_aux_dir=$ac_dir
1473     ac_install_sh="$ac_aux_dir/install-sh -c"
1474     break
1475   elif test -f "$ac_dir/install.sh"; then
1476     ac_aux_dir=$ac_dir
1477     ac_install_sh="$ac_aux_dir/install.sh -c"
1478     break
1479   elif test -f "$ac_dir/shtool"; then
1480     ac_aux_dir=$ac_dir
1481     ac_install_sh="$ac_aux_dir/shtool install -c"
1482     break
1483   fi
1484 done
1485 if test -z "$ac_aux_dir"; then
1486   { { echo "$as_me:1486: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1487 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1488    { (exit 1); exit 1; }; }
1489 fi
1490 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1491 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1492 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1493
1494 # Make sure we can run config.sub.
1495 $ac_config_sub sun4 >/dev/null 2>&1 ||
1496   { { echo "$as_me:1496: error: cannot run $ac_config_sub" >&5
1497 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1498    { (exit 1); exit 1; }; }
1499
1500 echo "$as_me:1500: checking build system type" >&5
1501 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1502 if test "${ac_cv_build+set}" = set; then
1503   echo $ECHO_N "(cached) $ECHO_C" >&6
1504 else
1505   ac_cv_build_alias=$build_alias
1506 test -z "$ac_cv_build_alias" &&
1507   ac_cv_build_alias=`$ac_config_guess`
1508 test -z "$ac_cv_build_alias" &&
1509   { { echo "$as_me:1509: error: cannot guess build type; you must specify one" >&5
1510 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1511    { (exit 1); exit 1; }; }
1512 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1513   { { echo "$as_me:1513: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1514 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1515    { (exit 1); exit 1; }; }
1516
1517 fi
1518 echo "$as_me:1518: result: $ac_cv_build" >&5
1519 echo "${ECHO_T}$ac_cv_build" >&6
1520 build=$ac_cv_build
1521 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1522 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1523 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1524
1525 echo "$as_me:1525: checking host system type" >&5
1526 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1527 if test "${ac_cv_host+set}" = set; then
1528   echo $ECHO_N "(cached) $ECHO_C" >&6
1529 else
1530   ac_cv_host_alias=$host_alias
1531 test -z "$ac_cv_host_alias" &&
1532   ac_cv_host_alias=$ac_cv_build_alias
1533 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1534   { { echo "$as_me:1534: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1535 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1536    { (exit 1); exit 1; }; }
1537
1538 fi
1539 echo "$as_me:1539: result: $ac_cv_host" >&5
1540 echo "${ECHO_T}$ac_cv_host" >&6
1541 host=$ac_cv_host
1542 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1543 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1544 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1545
1546 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1547         echo "$as_me:1547: checking target system type" >&5
1548 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1549 if test "${ac_cv_target+set}" = set; then
1550   echo $ECHO_N "(cached) $ECHO_C" >&6
1551 else
1552   ac_cv_target_alias=$target_alias
1553 test "x$ac_cv_target_alias" = "x" &&
1554   ac_cv_target_alias=$ac_cv_host_alias
1555 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1556   { { echo "$as_me:1556: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1557 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1558    { (exit 1); exit 1; }; }
1559
1560 fi
1561 echo "$as_me:1561: result: $ac_cv_target" >&5
1562 echo "${ECHO_T}$ac_cv_target" >&6
1563 target=$ac_cv_target
1564 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1565 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1566 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1567
1568 # The aliases save the names the user supplied, while $host etc.
1569 # will get canonicalized.
1570 test -n "$target_alias" &&
1571   test "$program_prefix$program_suffix$program_transform_name" = \
1572     NONENONEs,x,x, &&
1573   program_prefix=${target_alias}-
1574         system_name="$host_os"
1575 else
1576         system_name="`(uname -s -r) 2>/dev/null`"
1577         if test -z "$system_name" ; then
1578                 system_name="`(hostname) 2>/dev/null`"
1579         fi
1580 fi
1581 test -n "$system_name" &&
1582 cat >>confdefs.h <<EOF
1583 #define SYSTEM_NAME "$system_name"
1584 EOF
1585
1586 if test "${cf_cv_system_name+set}" = set; then
1587   echo $ECHO_N "(cached) $ECHO_C" >&6
1588 else
1589   cf_cv_system_name="$system_name"
1590 fi
1591
1592 test -z "$system_name" && system_name="$cf_cv_system_name"
1593 test -n "$cf_cv_system_name" && echo "$as_me:1593: result: Configuring for $cf_cv_system_name" >&5
1594 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1595
1596 if test ".$system_name" != ".$cf_cv_system_name" ; then
1597         echo "$as_me:1597: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1598 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1599         { { echo "$as_me:1599: error: \"Please remove config.cache and try again.\"" >&5
1600 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1601    { (exit 1); exit 1; }; }
1602 fi
1603
1604 # Check whether --with-system-type or --without-system-type was given.
1605 if test "${with_system_type+set}" = set; then
1606   withval="$with_system_type"
1607   { echo "$as_me:1607: WARNING: overriding system type to $withval" >&5
1608 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1609         cf_cv_system_name=$withval
1610         host_os=$withval
1611
1612 fi;
1613
1614 ###     Save the given $CFLAGS to allow user-override.
1615 cf_user_CFLAGS="$CFLAGS"
1616
1617 ###     Default install-location
1618 echo "$as_me:1618: checking for fgrep" >&5
1619 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1620 if test "${ac_cv_path_FGREP+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1624    then ac_cv_path_FGREP="$GREP -F"
1625    else
1626      for ac_prog in gfgrep fgrep
1627 do
1628   # Extract the first word of "$ac_prog", so it can be a program name with args.
1629 set dummy $ac_prog; ac_word=$2
1630 echo "$as_me:1630: checking for $ac_word" >&5
1631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1632 if test "${ac_cv_path_FGREP+set}" = set; then
1633   echo $ECHO_N "(cached) $ECHO_C" >&6
1634 else
1635   case $FGREP in
1636   [\\/]* | ?:[\\/]*)
1637   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1638   ;;
1639   *)
1640   ac_save_IFS=$IFS; IFS=$ac_path_separator
1641 ac_dummy="$PATH"
1642 for ac_dir in $ac_dummy; do
1643   IFS=$ac_save_IFS
1644   test -z "$ac_dir" && ac_dir=.
1645   if $as_executable_p "$ac_dir/$ac_word"; then
1646    ac_cv_path_FGREP="$ac_dir/$ac_word"
1647    echo "$as_me:1647: found $ac_dir/$ac_word" >&5
1648    break
1649 fi
1650 done
1651
1652   ;;
1653 esac
1654 fi
1655 FGREP=$ac_cv_path_FGREP
1656
1657 if test -n "$FGREP"; then
1658   echo "$as_me:1658: result: $FGREP" >&5
1659 echo "${ECHO_T}$FGREP" >&6
1660 else
1661   echo "$as_me:1661: result: no" >&5
1662 echo "${ECHO_T}no" >&6
1663 fi
1664
1665   test -n "$FGREP" && break
1666 done
1667 test -n "$FGREP" || FGREP=": "
1668
1669      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1669: error: cannot find workable fgrep" >&5
1670 echo "$as_me: error: cannot find workable fgrep" >&2;}
1671    { (exit 1); exit 1; }; }
1672    fi
1673 fi
1674 echo "$as_me:1674: result: $ac_cv_path_FGREP" >&5
1675 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1676  FGREP="$ac_cv_path_FGREP"
1677
1678 echo "$as_me:1678: checking for prefix" >&5
1679 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1680 if test "x$prefix" = "xNONE" ; then
1681         case "$cf_cv_system_name" in
1682                 # non-vendor systems don't have a conflict
1683         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1684                 prefix=/usr
1685                 ;;
1686         (*)     prefix=$ac_default_prefix
1687                 ;;
1688         esac
1689 fi
1690 echo "$as_me:1690: result: $prefix" >&5
1691 echo "${ECHO_T}$prefix" >&6
1692
1693 if test "x$prefix" = "xNONE" ; then
1694 echo "$as_me:1694: checking for default include-directory" >&5
1695 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1696 test -n "$verbose" && echo 1>&6
1697 for cf_symbol in \
1698         "$includedir" \
1699         "$includedir/ncurses" \
1700         "$prefix/include" \
1701         "$prefix/include/ncurses" \
1702         /usr/local/include \
1703         /usr/local/include/ncurses \
1704         /usr/include \
1705         /usr/include/ncurses
1706 do
1707         cf_dir=`eval echo "$cf_symbol"`
1708         if test -f "$cf_dir/curses.h" ; then
1709         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1710                 includedir="$cf_symbol"
1711                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1712                 break
1713         fi
1714         fi
1715         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1716 done
1717 echo "$as_me:1717: result: $includedir" >&5
1718 echo "${ECHO_T}$includedir" >&6
1719 fi
1720
1721 ### Defaults for ncurses ABI
1722
1723 case x$cf_cv_abi_version in
1724 (x[6789])
1725         cf_dft_ext_colors=yes
1726         cf_dft_ext_const=yes
1727         cf_dft_ext_mouse=yes
1728         cf_dft_ext_putwin=yes
1729         cf_dft_ext_spfuncs=yes
1730         cf_dft_filter_syms=yes
1731         cf_dft_chtype=uint32_t
1732         cf_dft_mmask_t=uint32_t
1733         cf_dft_interop=yes
1734         cf_dft_tparm_arg=intptr_t
1735         cf_dft_with_lp64=yes
1736         ;;
1737 (*)
1738         cf_dft_ext_colors=no
1739         cf_dft_ext_const=no
1740         cf_dft_ext_mouse=no
1741         cf_dft_ext_putwin=no
1742         cf_dft_ext_spfuncs=no
1743         cf_dft_filter_syms=no
1744         cf_dft_chtype=auto
1745         cf_dft_mmask_t=auto
1746         cf_dft_interop=no
1747         cf_dft_tparm_arg=long
1748         cf_dft_with_lp64=no
1749         ;;
1750 esac
1751
1752 ###     Checks for programs.
1753
1754 # Check whether --with-ada or --without-ada was given.
1755 if test "${with_ada+set}" = set; then
1756   withval="$with_ada"
1757   cf_with_ada=$withval
1758 else
1759   cf_with_ada=yes
1760 fi;
1761
1762 if test "x$cf_with_ada" = xyes
1763 then
1764         cf_prog_cc="gnatgcc gcc cc"
1765 else
1766         cf_prog_cc="gcc cc"
1767 fi
1768
1769 ac_ext=c
1770 ac_cpp='$CPP $CPPFLAGS'
1771 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1772 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1773 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1774 ac_main_return="return"
1775 if test -n "$ac_tool_prefix"; then
1776   for ac_prog in $cf_prog_cc
1777   do
1778     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1779 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1780 echo "$as_me:1780: checking for $ac_word" >&5
1781 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1782 if test "${ac_cv_prog_CC+set}" = set; then
1783   echo $ECHO_N "(cached) $ECHO_C" >&6
1784 else
1785   if test -n "$CC"; then
1786   ac_cv_prog_CC="$CC" # Let the user override the test.
1787 else
1788   ac_save_IFS=$IFS; IFS=$ac_path_separator
1789 ac_dummy="$PATH"
1790 for ac_dir in $ac_dummy; do
1791   IFS=$ac_save_IFS
1792   test -z "$ac_dir" && ac_dir=.
1793   $as_executable_p "$ac_dir/$ac_word" || continue
1794 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1795 echo "$as_me:1795: found $ac_dir/$ac_word" >&5
1796 break
1797 done
1798
1799 fi
1800 fi
1801 CC=$ac_cv_prog_CC
1802 if test -n "$CC"; then
1803   echo "$as_me:1803: result: $CC" >&5
1804 echo "${ECHO_T}$CC" >&6
1805 else
1806   echo "$as_me:1806: result: no" >&5
1807 echo "${ECHO_T}no" >&6
1808 fi
1809
1810     test -n "$CC" && break
1811   done
1812 fi
1813 if test -z "$CC"; then
1814   ac_ct_CC=$CC
1815   for ac_prog in $cf_prog_cc
1816 do
1817   # Extract the first word of "$ac_prog", so it can be a program name with args.
1818 set dummy $ac_prog; ac_word=$2
1819 echo "$as_me:1819: checking for $ac_word" >&5
1820 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1821 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1822   echo $ECHO_N "(cached) $ECHO_C" >&6
1823 else
1824   if test -n "$ac_ct_CC"; then
1825   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1826 else
1827   ac_save_IFS=$IFS; IFS=$ac_path_separator
1828 ac_dummy="$PATH"
1829 for ac_dir in $ac_dummy; do
1830   IFS=$ac_save_IFS
1831   test -z "$ac_dir" && ac_dir=.
1832   $as_executable_p "$ac_dir/$ac_word" || continue
1833 ac_cv_prog_ac_ct_CC="$ac_prog"
1834 echo "$as_me:1834: found $ac_dir/$ac_word" >&5
1835 break
1836 done
1837
1838 fi
1839 fi
1840 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1841 if test -n "$ac_ct_CC"; then
1842   echo "$as_me:1842: result: $ac_ct_CC" >&5
1843 echo "${ECHO_T}$ac_ct_CC" >&6
1844 else
1845   echo "$as_me:1845: result: no" >&5
1846 echo "${ECHO_T}no" >&6
1847 fi
1848
1849   test -n "$ac_ct_CC" && break
1850 done
1851
1852   CC=$ac_ct_CC
1853 fi
1854
1855 test -z "$CC" && { { echo "$as_me:1855: error: no acceptable cc found in \$PATH" >&5
1856 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1857    { (exit 1); exit 1; }; }
1858
1859 # Provide some information about the compiler.
1860 echo "$as_me:1860:" \
1861      "checking for C compiler version" >&5
1862 ac_compiler=`set X $ac_compile; echo "$2"`
1863 { (eval echo "$as_me:1863: \"$ac_compiler --version </dev/null >&5\"") >&5
1864   (eval $ac_compiler --version </dev/null >&5) 2>&5
1865   ac_status=$?
1866   echo "$as_me:1866: \$? = $ac_status" >&5
1867   (exit "$ac_status"); }
1868 { (eval echo "$as_me:1868: \"$ac_compiler -v </dev/null >&5\"") >&5
1869   (eval $ac_compiler -v </dev/null >&5) 2>&5
1870   ac_status=$?
1871   echo "$as_me:1871: \$? = $ac_status" >&5
1872   (exit "$ac_status"); }
1873 { (eval echo "$as_me:1873: \"$ac_compiler -V </dev/null >&5\"") >&5
1874   (eval $ac_compiler -V </dev/null >&5) 2>&5
1875   ac_status=$?
1876   echo "$as_me:1876: \$? = $ac_status" >&5
1877   (exit "$ac_status"); }
1878
1879 cat >"conftest.$ac_ext" <<_ACEOF
1880 #line 1880 "configure"
1881 #include "confdefs.h"
1882
1883 int
1884 main (void)
1885 {
1886
1887   ;
1888   return 0;
1889 }
1890 _ACEOF
1891 ac_clean_files_save=$ac_clean_files
1892 ac_clean_files="$ac_clean_files a.out a.exe"
1893 # Try to create an executable without -o first, disregard a.out.
1894 # It will help us diagnose broken compilers, and finding out an intuition
1895 # of exeext.
1896 echo "$as_me:1896: checking for C compiler default output" >&5
1897 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1898 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1899 if { (eval echo "$as_me:1899: \"$ac_link_default\"") >&5
1900   (eval $ac_link_default) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit "$ac_status"); }; then
1904   # Find the output, starting from the most likely.  This scheme is
1905 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1906 # resort.
1907 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1908                 ls a.out conftest 2>/dev/null;
1909                 ls a.* conftest.* 2>/dev/null`; do
1910   case $ac_file in
1911     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1912     a.out ) # We found the default executable, but exeext='' is most
1913             # certainly right.
1914             break;;
1915     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1916           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1917           export ac_cv_exeext
1918           break;;
1919     * ) break;;
1920   esac
1921 done
1922 else
1923   echo "$as_me: failed program was:" >&5
1924 cat "conftest.$ac_ext" >&5
1925 { { echo "$as_me:1925: error: C compiler cannot create executables" >&5
1926 echo "$as_me: error: C compiler cannot create executables" >&2;}
1927    { (exit 77); exit 77; }; }
1928 fi
1929
1930 ac_exeext=$ac_cv_exeext
1931 echo "$as_me:1931: result: $ac_file" >&5
1932 echo "${ECHO_T}$ac_file" >&6
1933
1934 # Check the compiler produces executables we can run.  If not, either
1935 # the compiler is broken, or we cross compile.
1936 echo "$as_me:1936: checking whether the C compiler works" >&5
1937 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1938 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1939 # If not cross compiling, check that we can run a simple program.
1940 if test "$cross_compiling" != yes; then
1941   if { ac_try='./$ac_file'
1942   { (eval echo "$as_me:1942: \"$ac_try\"") >&5
1943   (eval $ac_try) 2>&5
1944   ac_status=$?
1945   echo "$as_me:1945: \$? = $ac_status" >&5
1946   (exit "$ac_status"); }; }; then
1947     cross_compiling=no
1948   else
1949     if test "$cross_compiling" = maybe; then
1950         cross_compiling=yes
1951     else
1952         { { echo "$as_me:1952: error: cannot run C compiled programs.
1953 If you meant to cross compile, use \`--host'." >&5
1954 echo "$as_me: error: cannot run C compiled programs.
1955 If you meant to cross compile, use \`--host'." >&2;}
1956    { (exit 1); exit 1; }; }
1957     fi
1958   fi
1959 fi
1960 echo "$as_me:1960: result: yes" >&5
1961 echo "${ECHO_T}yes" >&6
1962
1963 rm -f a.out a.exe "conftest$ac_cv_exeext"
1964 ac_clean_files=$ac_clean_files_save
1965 # Check the compiler produces executables we can run.  If not, either
1966 # the compiler is broken, or we cross compile.
1967 echo "$as_me:1967: checking whether we are cross compiling" >&5
1968 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1969 echo "$as_me:1969: result: $cross_compiling" >&5
1970 echo "${ECHO_T}$cross_compiling" >&6
1971
1972 echo "$as_me:1972: checking for executable suffix" >&5
1973 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1974 if { (eval echo "$as_me:1974: \"$ac_link\"") >&5
1975   (eval $ac_link) 2>&5
1976   ac_status=$?
1977   echo "$as_me:1977: \$? = $ac_status" >&5
1978   (exit "$ac_status"); }; then
1979   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1980 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1981 # work properly (i.e., refer to `conftest.exe'), while it won't with
1982 # `rm'.
1983 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1984   case $ac_file in
1985     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1986     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1987           export ac_cv_exeext
1988           break;;
1989     * ) break;;
1990   esac
1991 done
1992 else
1993   { { echo "$as_me:1993: error: cannot compute EXEEXT: cannot compile and link" >&5
1994 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1995    { (exit 1); exit 1; }; }
1996 fi
1997
1998 rm -f "conftest$ac_cv_exeext"
1999 echo "$as_me:1999: result: $ac_cv_exeext" >&5
2000 echo "${ECHO_T}$ac_cv_exeext" >&6
2001
2002 rm -f "conftest.$ac_ext"
2003 EXEEXT=$ac_cv_exeext
2004 ac_exeext=$EXEEXT
2005 echo "$as_me:2005: checking for object suffix" >&5
2006 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2007 if test "${ac_cv_objext+set}" = set; then
2008   echo $ECHO_N "(cached) $ECHO_C" >&6
2009 else
2010   cat >"conftest.$ac_ext" <<_ACEOF
2011 #line 2011 "configure"
2012 #include "confdefs.h"
2013
2014 int
2015 main (void)
2016 {
2017
2018   ;
2019   return 0;
2020 }
2021 _ACEOF
2022 rm -f conftest.o conftest.obj
2023 if { (eval echo "$as_me:2023: \"$ac_compile\"") >&5
2024   (eval $ac_compile) 2>&5
2025   ac_status=$?
2026   echo "$as_me:2026: \$? = $ac_status" >&5
2027   (exit "$ac_status"); }; then
2028   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2029   case $ac_file in
2030     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2031     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2032        break;;
2033   esac
2034 done
2035 else
2036   echo "$as_me: failed program was:" >&5
2037 cat "conftest.$ac_ext" >&5
2038 { { echo "$as_me:2038: error: cannot compute OBJEXT: cannot compile" >&5
2039 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2040    { (exit 1); exit 1; }; }
2041 fi
2042
2043 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2044 fi
2045 echo "$as_me:2045: result: $ac_cv_objext" >&5
2046 echo "${ECHO_T}$ac_cv_objext" >&6
2047 OBJEXT=$ac_cv_objext
2048 ac_objext=$OBJEXT
2049 echo "$as_me:2049: checking whether we are using the GNU C compiler" >&5
2050 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2051 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2052   echo $ECHO_N "(cached) $ECHO_C" >&6
2053 else
2054   cat >"conftest.$ac_ext" <<_ACEOF
2055 #line 2055 "configure"
2056 #include "confdefs.h"
2057
2058 int
2059 main (void)
2060 {
2061 #ifndef __GNUC__
2062        choke me
2063 #endif
2064
2065   ;
2066   return 0;
2067 }
2068 _ACEOF
2069 rm -f "conftest.$ac_objext"
2070 if { (eval echo "$as_me:2070: \"$ac_compile\"") >&5
2071   (eval $ac_compile) 2>&5
2072   ac_status=$?
2073   echo "$as_me:2073: \$? = $ac_status" >&5
2074   (exit "$ac_status"); } &&
2075          { ac_try='test -s "conftest.$ac_objext"'
2076   { (eval echo "$as_me:2076: \"$ac_try\"") >&5
2077   (eval $ac_try) 2>&5
2078   ac_status=$?
2079   echo "$as_me:2079: \$? = $ac_status" >&5
2080   (exit "$ac_status"); }; }; then
2081   ac_compiler_gnu=yes
2082 else
2083   echo "$as_me: failed program was:" >&5
2084 cat "conftest.$ac_ext" >&5
2085 ac_compiler_gnu=no
2086 fi
2087 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2088 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2089
2090 fi
2091 echo "$as_me:2091: result: $ac_cv_c_compiler_gnu" >&5
2092 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2093 GCC=`test $ac_compiler_gnu = yes && echo yes`
2094 ac_test_CFLAGS=${CFLAGS+set}
2095 ac_save_CFLAGS=$CFLAGS
2096 CFLAGS="-g"
2097 echo "$as_me:2097: checking whether $CC accepts -g" >&5
2098 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2099 if test "${ac_cv_prog_cc_g+set}" = set; then
2100   echo $ECHO_N "(cached) $ECHO_C" >&6
2101 else
2102   cat >"conftest.$ac_ext" <<_ACEOF
2103 #line 2103 "configure"
2104 #include "confdefs.h"
2105
2106 int
2107 main (void)
2108 {
2109
2110   ;
2111   return 0;
2112 }
2113 _ACEOF
2114 rm -f "conftest.$ac_objext"
2115 if { (eval echo "$as_me:2115: \"$ac_compile\"") >&5
2116   (eval $ac_compile) 2>&5
2117   ac_status=$?
2118   echo "$as_me:2118: \$? = $ac_status" >&5
2119   (exit "$ac_status"); } &&
2120          { ac_try='test -s "conftest.$ac_objext"'
2121   { (eval echo "$as_me:2121: \"$ac_try\"") >&5
2122   (eval $ac_try) 2>&5
2123   ac_status=$?
2124   echo "$as_me:2124: \$? = $ac_status" >&5
2125   (exit "$ac_status"); }; }; then
2126   ac_cv_prog_cc_g=yes
2127 else
2128   echo "$as_me: failed program was:" >&5
2129 cat "conftest.$ac_ext" >&5
2130 ac_cv_prog_cc_g=no
2131 fi
2132 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2133 fi
2134 echo "$as_me:2134: result: $ac_cv_prog_cc_g" >&5
2135 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2136 if test "$ac_test_CFLAGS" = set; then
2137   CFLAGS=$ac_save_CFLAGS
2138 elif test $ac_cv_prog_cc_g = yes; then
2139   if test "$GCC" = yes; then
2140     CFLAGS="-g -O2"
2141   else
2142     CFLAGS="-g"
2143   fi
2144 else
2145   if test "$GCC" = yes; then
2146     CFLAGS="-O2"
2147   else
2148     CFLAGS=
2149   fi
2150 fi
2151 # Some people use a C++ compiler to compile C.  Since we use `exit',
2152 # in C++ we need to declare it.  In case someone uses the same compiler
2153 # for both compiling C and C++ we need to have the C++ compiler decide
2154 # the declaration of exit, since it's the most demanding environment.
2155 cat >"conftest.$ac_ext" <<_ACEOF
2156 #ifndef __cplusplus
2157   choke me
2158 #endif
2159 _ACEOF
2160 rm -f "conftest.$ac_objext"
2161 if { (eval echo "$as_me:2161: \"$ac_compile\"") >&5
2162   (eval $ac_compile) 2>&5
2163   ac_status=$?
2164   echo "$as_me:2164: \$? = $ac_status" >&5
2165   (exit "$ac_status"); } &&
2166          { ac_try='test -s "conftest.$ac_objext"'
2167   { (eval echo "$as_me:2167: \"$ac_try\"") >&5
2168   (eval $ac_try) 2>&5
2169   ac_status=$?
2170   echo "$as_me:2170: \$? = $ac_status" >&5
2171   (exit "$ac_status"); }; }; then
2172   for ac_declaration in \
2173    ''\
2174    '#include <stdlib.h>' \
2175    'extern "C" void std::exit (int) throw (); using std::exit;' \
2176    'extern "C" void std::exit (int); using std::exit;' \
2177    'extern "C" void exit (int) throw ();' \
2178    'extern "C" void exit (int);' \
2179    'void exit (int);'
2180 do
2181   cat >"conftest.$ac_ext" <<_ACEOF
2182 #line 2182 "configure"
2183 #include "confdefs.h"
2184 #include <stdlib.h>
2185 $ac_declaration
2186 int
2187 main (void)
2188 {
2189 exit (42);
2190   ;
2191   return 0;
2192 }
2193 _ACEOF
2194 rm -f "conftest.$ac_objext"
2195 if { (eval echo "$as_me:2195: \"$ac_compile\"") >&5
2196   (eval $ac_compile) 2>&5
2197   ac_status=$?
2198   echo "$as_me:2198: \$? = $ac_status" >&5
2199   (exit "$ac_status"); } &&
2200          { ac_try='test -s "conftest.$ac_objext"'
2201   { (eval echo "$as_me:2201: \"$ac_try\"") >&5
2202   (eval $ac_try) 2>&5
2203   ac_status=$?
2204   echo "$as_me:2204: \$? = $ac_status" >&5
2205   (exit "$ac_status"); }; }; then
2206   :
2207 else
2208   echo "$as_me: failed program was:" >&5
2209 cat "conftest.$ac_ext" >&5
2210 continue
2211 fi
2212 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2213   cat >"conftest.$ac_ext" <<_ACEOF
2214 #line 2214 "configure"
2215 #include "confdefs.h"
2216 $ac_declaration
2217 int
2218 main (void)
2219 {
2220 exit (42);
2221   ;
2222   return 0;
2223 }
2224 _ACEOF
2225 rm -f "conftest.$ac_objext"
2226 if { (eval echo "$as_me:2226: \"$ac_compile\"") >&5
2227   (eval $ac_compile) 2>&5
2228   ac_status=$?
2229   echo "$as_me:2229: \$? = $ac_status" >&5
2230   (exit "$ac_status"); } &&
2231          { ac_try='test -s "conftest.$ac_objext"'
2232   { (eval echo "$as_me:2232: \"$ac_try\"") >&5
2233   (eval $ac_try) 2>&5
2234   ac_status=$?
2235   echo "$as_me:2235: \$? = $ac_status" >&5
2236   (exit "$ac_status"); }; }; then
2237   break
2238 else
2239   echo "$as_me: failed program was:" >&5
2240 cat "conftest.$ac_ext" >&5
2241 fi
2242 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2243 done
2244 rm -rf conftest*
2245 if test -n "$ac_declaration"; then
2246   echo '#ifdef __cplusplus' >>confdefs.h
2247   echo "$ac_declaration"    >>confdefs.h
2248   echo '#endif'             >>confdefs.h
2249 fi
2250
2251 else
2252   echo "$as_me: failed program was:" >&5
2253 cat "conftest.$ac_ext" >&5
2254 fi
2255 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2256 ac_ext=c
2257 ac_cpp='$CPP $CPPFLAGS'
2258 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2259 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2260 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2261 ac_main_return="return"
2262
2263 GCC_VERSION=none
2264 if test "$GCC" = yes ; then
2265         echo "$as_me:2265: checking version of $CC" >&5
2266 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2267         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2268         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2269         echo "$as_me:2269: result: $GCC_VERSION" >&5
2270 echo "${ECHO_T}$GCC_VERSION" >&6
2271 fi
2272
2273 INTEL_COMPILER=no
2274
2275 if test "$GCC" = yes ; then
2276         case "$host_os" in
2277         (linux*|gnu*)
2278                 echo "$as_me:2278: checking if this is really Intel C compiler" >&5
2279 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2280                 cf_save_CFLAGS="$CFLAGS"
2281                 CFLAGS="$CFLAGS -no-gcc"
2282                 cat >"conftest.$ac_ext" <<_ACEOF
2283 #line 2283 "configure"
2284 #include "confdefs.h"
2285
2286 int
2287 main (void)
2288 {
2289
2290 #ifdef __INTEL_COMPILER
2291 #else
2292 make an error
2293 #endif
2294
2295   ;
2296   return 0;
2297 }
2298 _ACEOF
2299 rm -f "conftest.$ac_objext"
2300 if { (eval echo "$as_me:2300: \"$ac_compile\"") >&5
2301   (eval $ac_compile) 2>&5
2302   ac_status=$?
2303   echo "$as_me:2303: \$? = $ac_status" >&5
2304   (exit "$ac_status"); } &&
2305          { ac_try='test -s "conftest.$ac_objext"'
2306   { (eval echo "$as_me:2306: \"$ac_try\"") >&5
2307   (eval $ac_try) 2>&5
2308   ac_status=$?
2309   echo "$as_me:2309: \$? = $ac_status" >&5
2310   (exit "$ac_status"); }; }; then
2311   INTEL_COMPILER=yes
2312 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2313
2314 else
2315   echo "$as_me: failed program was:" >&5
2316 cat "conftest.$ac_ext" >&5
2317 fi
2318 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2319                 CFLAGS="$cf_save_CFLAGS"
2320                 echo "$as_me:2320: result: $INTEL_COMPILER" >&5
2321 echo "${ECHO_T}$INTEL_COMPILER" >&6
2322                 ;;
2323         esac
2324 fi
2325
2326 CLANG_COMPILER=no
2327
2328 if test "$GCC" = yes ; then
2329         echo "$as_me:2329: checking if this is really Clang C compiler" >&5
2330 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2331         cf_save_CFLAGS="$CFLAGS"
2332         cat >"conftest.$ac_ext" <<_ACEOF
2333 #line 2333 "configure"
2334 #include "confdefs.h"
2335
2336 int
2337 main (void)
2338 {
2339
2340 #ifdef __clang__
2341 #else
2342 make an error
2343 #endif
2344
2345   ;
2346   return 0;
2347 }
2348 _ACEOF
2349 rm -f "conftest.$ac_objext"
2350 if { (eval echo "$as_me:2350: \"$ac_compile\"") >&5
2351   (eval $ac_compile) 2>&5
2352   ac_status=$?
2353   echo "$as_me:2353: \$? = $ac_status" >&5
2354   (exit "$ac_status"); } &&
2355          { ac_try='test -s "conftest.$ac_objext"'
2356   { (eval echo "$as_me:2356: \"$ac_try\"") >&5
2357   (eval $ac_try) 2>&5
2358   ac_status=$?
2359   echo "$as_me:2359: \$? = $ac_status" >&5
2360   (exit "$ac_status"); }; }; then
2361   CLANG_COMPILER=yes
2362
2363 else
2364   echo "$as_me: failed program was:" >&5
2365 cat "conftest.$ac_ext" >&5
2366 fi
2367 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2368         CFLAGS="$cf_save_CFLAGS"
2369         echo "$as_me:2369: result: $CLANG_COMPILER" >&5
2370 echo "${ECHO_T}$CLANG_COMPILER" >&6
2371 fi
2372
2373 CLANG_VERSION=none
2374
2375 if test "x$CLANG_COMPILER" = "xyes" ; then
2376         case "$CC" in
2377         (c[1-9][0-9]|*/c[1-9][0-9])
2378                 { echo "$as_me:2378: WARNING: replacing broken compiler alias $CC" >&5
2379 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2380                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2381                 CC=clang
2382                 ;;
2383         esac
2384
2385         echo "$as_me:2385: checking version of $CC" >&5
2386 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2387         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.].*//'`"
2388         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2389         echo "$as_me:2389: result: $CLANG_VERSION" >&5
2390 echo "${ECHO_T}$CLANG_VERSION" >&6
2391
2392         for cf_clang_opt in \
2393                 -Qunused-arguments \
2394                 -Wno-error=implicit-function-declaration
2395         do
2396                 echo "$as_me:2396: checking if option $cf_clang_opt works" >&5
2397 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2398                 cf_save_CFLAGS="$CFLAGS"
2399                 CFLAGS="$CFLAGS $cf_clang_opt"
2400                 cat >"conftest.$ac_ext" <<_ACEOF
2401 #line 2401 "configure"
2402 #include "confdefs.h"
2403
2404                         #include <stdio.h>
2405 int
2406 main (void)
2407 {
2408
2409                         printf("hello!\\n");
2410   ;
2411   return 0;
2412 }
2413 _ACEOF
2414 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2415 if { (eval echo "$as_me:2415: \"$ac_link\"") >&5
2416   (eval $ac_link) 2>&5
2417   ac_status=$?
2418   echo "$as_me:2418: \$? = $ac_status" >&5
2419   (exit "$ac_status"); } &&
2420          { ac_try='test -s "conftest$ac_exeext"'
2421   { (eval echo "$as_me:2421: \"$ac_try\"") >&5
2422   (eval $ac_try) 2>&5
2423   ac_status=$?
2424   echo "$as_me:2424: \$? = $ac_status" >&5
2425   (exit "$ac_status"); }; }; then
2426
2427                         cf_clang_optok=yes
2428 else
2429   echo "$as_me: failed program was:" >&5
2430 cat "conftest.$ac_ext" >&5
2431
2432                         cf_clang_optok=no
2433 fi
2434 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2435                 echo "$as_me:2435: result: $cf_clang_optok" >&5
2436 echo "${ECHO_T}$cf_clang_optok" >&6
2437                 CFLAGS="$cf_save_CFLAGS"
2438                 if test "$cf_clang_optok" = yes; then
2439                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2440
2441 echo "${as_me:-configure}:2441: testing adding option $cf_clang_opt ..." 1>&5
2442
2443         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2444         CFLAGS="${CFLAGS}$cf_clang_opt"
2445
2446                 fi
2447         done
2448 fi
2449
2450 echo "$as_me:2450: checking for $CC option to accept ANSI C" >&5
2451 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2452 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2453   echo $ECHO_N "(cached) $ECHO_C" >&6
2454 else
2455   ac_cv_prog_cc_stdc=no
2456 ac_save_CC=$CC
2457 cat >"conftest.$ac_ext" <<_ACEOF
2458 #line 2458 "configure"
2459 #include "confdefs.h"
2460 #include <stdarg.h>
2461 #include <stdio.h>
2462 #include <sys/types.h>
2463 #include <sys/stat.h>
2464 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2465 struct buf { int x; };
2466 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2467 static char *e (p, i)
2468      char **p;
2469      int i;
2470 {
2471   return p[i];
2472 }
2473 static char *f (char * (*g) (char **, int), char **p, ...)
2474 {
2475   char *s;
2476   va_list v;
2477   va_start (v,p);
2478   s = g (p, va_arg (v,int));
2479   va_end (v);
2480   return s;
2481 }
2482 int test (int i, double x);
2483 struct s1 {int (*f) (int a);};
2484 struct s2 {int (*f) (double a);};
2485 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2486 int argc;
2487 char **argv;
2488 int
2489 main (void)
2490 {
2491 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2492   ;
2493   return 0;
2494 }
2495 _ACEOF
2496 # Don't try gcc -ansi; that turns off useful extensions and
2497 # breaks some systems' header files.
2498 # AIX                   -qlanglvl=ansi
2499 # Ultrix and OSF/1      -std1
2500 # HP-UX 10.20 and later -Ae
2501 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2502 # SVR4                  -Xc -D__EXTENSIONS__
2503 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2504 do
2505   CC="$ac_save_CC $ac_arg"
2506   rm -f "conftest.$ac_objext"
2507 if { (eval echo "$as_me:2507: \"$ac_compile\"") >&5
2508   (eval $ac_compile) 2>&5
2509   ac_status=$?
2510   echo "$as_me:2510: \$? = $ac_status" >&5
2511   (exit "$ac_status"); } &&
2512          { ac_try='test -s "conftest.$ac_objext"'
2513   { (eval echo "$as_me:2513: \"$ac_try\"") >&5
2514   (eval $ac_try) 2>&5
2515   ac_status=$?
2516   echo "$as_me:2516: \$? = $ac_status" >&5
2517   (exit "$ac_status"); }; }; then
2518   ac_cv_prog_cc_stdc=$ac_arg
2519 break
2520 else
2521   echo "$as_me: failed program was:" >&5
2522 cat "conftest.$ac_ext" >&5
2523 fi
2524 rm -f "conftest.$ac_objext"
2525 done
2526 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2527 CC=$ac_save_CC
2528
2529 fi
2530
2531 case "x$ac_cv_prog_cc_stdc" in
2532   x|xno)
2533     echo "$as_me:2533: result: none needed" >&5
2534 echo "${ECHO_T}none needed" >&6 ;;
2535   *)
2536     echo "$as_me:2536: result: $ac_cv_prog_cc_stdc" >&5
2537 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2538     CC="$CC $ac_cv_prog_cc_stdc" ;;
2539 esac
2540
2541 # This should have been defined by AC_PROG_CC
2542 : "${CC:=cc}"
2543
2544 echo "$as_me:2544: checking \$CFLAGS variable" >&5
2545 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2546 case "x$CFLAGS" in
2547 (*-[IUD]*)
2548         echo "$as_me:2548: result: broken" >&5
2549 echo "${ECHO_T}broken" >&6
2550         { echo "$as_me:2550: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2551 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2552         cf_flags="$CFLAGS"
2553         CFLAGS=
2554         for cf_arg in $cf_flags
2555         do
2556
2557 cf_fix_cppflags=no
2558 cf_new_cflags=
2559 cf_new_cppflags=
2560 cf_new_extra_cppflags=
2561
2562 for cf_add_cflags in $cf_arg
2563 do
2564 case "$cf_fix_cppflags" in
2565 (no)
2566         case "$cf_add_cflags" in
2567         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2568                 case "$cf_add_cflags" in
2569                 (-D*)
2570                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2571
2572                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2573                                 && test -z "${cf_tst_cflags}" \
2574                                 && cf_fix_cppflags=yes
2575
2576                         if test "$cf_fix_cppflags" = yes ; then
2577
2578         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2579         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2580
2581                                 continue
2582                         elif test "${cf_tst_cflags}" = "\"'" ; then
2583
2584         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2585         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2586
2587                                 continue
2588                         fi
2589                         ;;
2590                 esac
2591                 case "$CPPFLAGS" in
2592                 (*$cf_add_cflags)
2593                         ;;
2594                 (*)
2595                         case "$cf_add_cflags" in
2596                         (-D*)
2597                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2598
2599 CPPFLAGS=`echo "$CPPFLAGS" | \
2600         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2601                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2602
2603                                 ;;
2604                         esac
2605
2606         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2607         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2608
2609                         ;;
2610                 esac
2611                 ;;
2612         (*)
2613
2614         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2615         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2616
2617                 ;;
2618         esac
2619         ;;
2620 (yes)
2621
2622         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2623         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2624
2625         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2626
2627         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2628                 && test -z "${cf_tst_cflags}" \
2629                 && cf_fix_cppflags=no
2630         ;;
2631 esac
2632 done
2633
2634 if test -n "$cf_new_cflags" ; then
2635
2636         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2637         CFLAGS="${CFLAGS}$cf_new_cflags"
2638
2639 fi
2640
2641 if test -n "$cf_new_cppflags" ; then
2642
2643         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2644         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2645
2646 fi
2647
2648 if test -n "$cf_new_extra_cppflags" ; then
2649
2650         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2651         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2652
2653 fi
2654
2655         done
2656         ;;
2657 (*)
2658         echo "$as_me:2658: result: ok" >&5
2659 echo "${ECHO_T}ok" >&6
2660         ;;
2661 esac
2662
2663 echo "$as_me:2663: checking \$CC variable" >&5
2664 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2665 case "$CC" in
2666 (*[\ \  ]-*)
2667         echo "$as_me:2667: result: broken" >&5
2668 echo "${ECHO_T}broken" >&6
2669         { echo "$as_me:2669: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2670 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2671         # humor him...
2672         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2673         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2674         CC="$cf_prog"
2675         for cf_arg in $cf_flags
2676         do
2677                 case "x$cf_arg" in
2678                 (x-[IUDfgOW]*)
2679
2680 cf_fix_cppflags=no
2681 cf_new_cflags=
2682 cf_new_cppflags=
2683 cf_new_extra_cppflags=
2684
2685 for cf_add_cflags in $cf_arg
2686 do
2687 case "$cf_fix_cppflags" in
2688 (no)
2689         case "$cf_add_cflags" in
2690         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2691                 case "$cf_add_cflags" in
2692                 (-D*)
2693                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2694
2695                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2696                                 && test -z "${cf_tst_cflags}" \
2697                                 && cf_fix_cppflags=yes
2698
2699                         if test "$cf_fix_cppflags" = yes ; then
2700
2701         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2702         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2703
2704                                 continue
2705                         elif test "${cf_tst_cflags}" = "\"'" ; then
2706
2707         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2708         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2709
2710                                 continue
2711                         fi
2712                         ;;
2713                 esac
2714                 case "$CPPFLAGS" in
2715                 (*$cf_add_cflags)
2716                         ;;
2717                 (*)
2718                         case "$cf_add_cflags" in
2719                         (-D*)
2720                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2721
2722 CPPFLAGS=`echo "$CPPFLAGS" | \
2723         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2724                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2725
2726                                 ;;
2727                         esac
2728
2729         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2730         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2731
2732                         ;;
2733                 esac
2734                 ;;
2735         (*)
2736
2737         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2738         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2739
2740                 ;;
2741         esac
2742         ;;
2743 (yes)
2744
2745         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2746         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2747
2748         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2749
2750         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2751                 && test -z "${cf_tst_cflags}" \
2752                 && cf_fix_cppflags=no
2753         ;;
2754 esac
2755 done
2756
2757 if test -n "$cf_new_cflags" ; then
2758
2759         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2760         CFLAGS="${CFLAGS}$cf_new_cflags"
2761
2762 fi
2763
2764 if test -n "$cf_new_cppflags" ; then
2765
2766         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2767         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2768
2769 fi
2770
2771 if test -n "$cf_new_extra_cppflags" ; then
2772
2773         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2774         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2775
2776 fi
2777
2778                         ;;
2779                 (*)
2780                         CC="$CC $cf_arg"
2781                         ;;
2782                 esac
2783         done
2784         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2785
2786 echo "${as_me:-configure}:2786: testing resulting CC: '$CC' ..." 1>&5
2787
2788         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2789
2790 echo "${as_me:-configure}:2790: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2791
2792         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2793
2794 echo "${as_me:-configure}:2794: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2795
2796         ;;
2797 (*)
2798         echo "$as_me:2798: result: ok" >&5
2799 echo "${ECHO_T}ok" >&6
2800         ;;
2801 esac
2802
2803 ac_ext=c
2804 ac_cpp='$CPP $CPPFLAGS'
2805 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2806 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2807 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2808 ac_main_return="return"
2809 echo "$as_me:2809: checking how to run the C preprocessor" >&5
2810 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2811 # On Suns, sometimes $CPP names a directory.
2812 if test -n "$CPP" && test -d "$CPP"; then
2813   CPP=
2814 fi
2815 if test -z "$CPP"; then
2816   if test "${ac_cv_prog_CPP+set}" = set; then
2817   echo $ECHO_N "(cached) $ECHO_C" >&6
2818 else
2819       # Double quotes because CPP needs to be expanded
2820     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2821     do
2822       ac_preproc_ok=false
2823 for ac_c_preproc_warn_flag in '' yes
2824 do
2825   # Use a header file that comes with gcc, so configuring glibc
2826   # with a fresh cross-compiler works.
2827   # On the NeXT, cc -E runs the code through the compiler's parser,
2828   # not just through cpp. "Syntax error" is here to catch this case.
2829   cat >"conftest.$ac_ext" <<_ACEOF
2830 #line 2830 "configure"
2831 #include "confdefs.h"
2832 #include <assert.h>
2833                      Syntax error
2834 _ACEOF
2835 if { (eval echo "$as_me:2835: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2836   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2837   ac_status=$?
2838   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2839   rm -f conftest.er1
2840   cat conftest.err >&5
2841   echo "$as_me:2841: \$? = $ac_status" >&5
2842   (exit "$ac_status"); } >/dev/null; then
2843   if test -s conftest.err; then
2844     ac_cpp_err=$ac_c_preproc_warn_flag
2845   else
2846     ac_cpp_err=
2847   fi
2848 else
2849   ac_cpp_err=yes
2850 fi
2851 if test -z "$ac_cpp_err"; then
2852   :
2853 else
2854   echo "$as_me: failed program was:" >&5
2855   cat "conftest.$ac_ext" >&5
2856   # Broken: fails on valid input.
2857 continue
2858 fi
2859 rm -f conftest.err "conftest.$ac_ext"
2860
2861   # OK, works on sane cases.  Now check whether non-existent headers
2862   # can be detected and how.
2863   cat >"conftest.$ac_ext" <<_ACEOF
2864 #line 2864 "configure"
2865 #include "confdefs.h"
2866 #include <ac_nonexistent.h>
2867 _ACEOF
2868 if { (eval echo "$as_me:2868: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2869   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2870   ac_status=$?
2871   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2872   rm -f conftest.er1
2873   cat conftest.err >&5
2874   echo "$as_me:2874: \$? = $ac_status" >&5
2875   (exit "$ac_status"); } >/dev/null; then
2876   if test -s conftest.err; then
2877     ac_cpp_err=$ac_c_preproc_warn_flag
2878   else
2879     ac_cpp_err=
2880   fi
2881 else
2882   ac_cpp_err=yes
2883 fi
2884 if test -z "$ac_cpp_err"; then
2885   # Broken: success on invalid input.
2886 continue
2887 else
2888   echo "$as_me: failed program was:" >&5
2889   cat "conftest.$ac_ext" >&5
2890   # Passes both tests.
2891 ac_preproc_ok=:
2892 break
2893 fi
2894 rm -f conftest.err "conftest.$ac_ext"
2895
2896 done
2897 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2898 rm -f conftest.err "conftest.$ac_ext"
2899 if $ac_preproc_ok; then
2900   break
2901 fi
2902
2903     done
2904     ac_cv_prog_CPP=$CPP
2905
2906 fi
2907   CPP=$ac_cv_prog_CPP
2908 else
2909   ac_cv_prog_CPP=$CPP
2910 fi
2911 echo "$as_me:2911: result: $CPP" >&5
2912 echo "${ECHO_T}$CPP" >&6
2913 ac_preproc_ok=false
2914 for ac_c_preproc_warn_flag in '' yes
2915 do
2916   # Use a header file that comes with gcc, so configuring glibc
2917   # with a fresh cross-compiler works.
2918   # On the NeXT, cc -E runs the code through the compiler's parser,
2919   # not just through cpp. "Syntax error" is here to catch this case.
2920   cat >"conftest.$ac_ext" <<_ACEOF
2921 #line 2921 "configure"
2922 #include "confdefs.h"
2923 #include <assert.h>
2924                      Syntax error
2925 _ACEOF
2926 if { (eval echo "$as_me:2926: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2927   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2928   ac_status=$?
2929   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2930   rm -f conftest.er1
2931   cat conftest.err >&5
2932   echo "$as_me:2932: \$? = $ac_status" >&5
2933   (exit "$ac_status"); } >/dev/null; then
2934   if test -s conftest.err; then
2935     ac_cpp_err=$ac_c_preproc_warn_flag
2936   else
2937     ac_cpp_err=
2938   fi
2939 else
2940   ac_cpp_err=yes
2941 fi
2942 if test -z "$ac_cpp_err"; then
2943   :
2944 else
2945   echo "$as_me: failed program was:" >&5
2946   cat "conftest.$ac_ext" >&5
2947   # Broken: fails on valid input.
2948 continue
2949 fi
2950 rm -f conftest.err "conftest.$ac_ext"
2951
2952   # OK, works on sane cases.  Now check whether non-existent headers
2953   # can be detected and how.
2954   cat >"conftest.$ac_ext" <<_ACEOF
2955 #line 2955 "configure"
2956 #include "confdefs.h"
2957 #include <ac_nonexistent.h>
2958 _ACEOF
2959 if { (eval echo "$as_me:2959: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2960   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2961   ac_status=$?
2962   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2963   rm -f conftest.er1
2964   cat conftest.err >&5
2965   echo "$as_me:2965: \$? = $ac_status" >&5
2966   (exit "$ac_status"); } >/dev/null; then
2967   if test -s conftest.err; then
2968     ac_cpp_err=$ac_c_preproc_warn_flag
2969   else
2970     ac_cpp_err=
2971   fi
2972 else
2973   ac_cpp_err=yes
2974 fi
2975 if test -z "$ac_cpp_err"; then
2976   # Broken: success on invalid input.
2977 continue
2978 else
2979   echo "$as_me: failed program was:" >&5
2980   cat "conftest.$ac_ext" >&5
2981   # Passes both tests.
2982 ac_preproc_ok=:
2983 break
2984 fi
2985 rm -f conftest.err "conftest.$ac_ext"
2986
2987 done
2988 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2989 rm -f conftest.err "conftest.$ac_ext"
2990 if $ac_preproc_ok; then
2991   :
2992 else
2993   { { echo "$as_me:2993: error: C preprocessor \"$CPP\" fails sanity check" >&5
2994 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2995    { (exit 1); exit 1; }; }
2996 fi
2997
2998 ac_ext=c
2999 ac_cpp='$CPP $CPPFLAGS'
3000 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3001 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3002 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3003 ac_main_return="return"
3004
3005 if test $ac_cv_c_compiler_gnu = yes; then
3006     echo "$as_me:3006: checking whether $CC needs -traditional" >&5
3007 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3008 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3009   echo $ECHO_N "(cached) $ECHO_C" >&6
3010 else
3011     ac_pattern="Autoconf.*'x'"
3012   cat >"conftest.$ac_ext" <<_ACEOF
3013 #line 3013 "configure"
3014 #include "confdefs.h"
3015 #include <sgtty.h>
3016 int Autoconf = TIOCGETP;
3017 _ACEOF
3018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3019   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3020   ac_cv_prog_gcc_traditional=yes
3021 else
3022   ac_cv_prog_gcc_traditional=no
3023 fi
3024 rm -rf conftest*
3025
3026   if test $ac_cv_prog_gcc_traditional = no; then
3027     cat >"conftest.$ac_ext" <<_ACEOF
3028 #line 3028 "configure"
3029 #include "confdefs.h"
3030 #include <termio.h>
3031 int Autoconf = TCGETA;
3032 _ACEOF
3033 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3034   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3035   ac_cv_prog_gcc_traditional=yes
3036 fi
3037 rm -rf conftest*
3038
3039   fi
3040 fi
3041 echo "$as_me:3041: result: $ac_cv_prog_gcc_traditional" >&5
3042 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3043   if test $ac_cv_prog_gcc_traditional = yes; then
3044     CC="$CC -traditional"
3045   fi
3046 fi
3047
3048 echo "$as_me:3048: checking whether $CC understands -c and -o together" >&5
3049 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3050 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3051   echo $ECHO_N "(cached) $ECHO_C" >&6
3052 else
3053
3054 cat > conftest.$ac_ext <<CF_EOF
3055 int main(void)
3056 {
3057         ${cf_cv_main_return:-return}(0);
3058 }
3059 CF_EOF
3060 # We do the test twice because some compilers refuse to overwrite an
3061 # existing .o file with -o, though they will create one.
3062 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3063 if { (eval echo "$as_me:3063: \"$ac_try\"") >&5
3064   (eval $ac_try) 2>&5
3065   ac_status=$?
3066   echo "$as_me:3066: \$? = $ac_status" >&5
3067   (exit "$ac_status"); } &&
3068   test -f conftest2.$ac_objext && { (eval echo "$as_me:3068: \"$ac_try\"") >&5
3069   (eval $ac_try) 2>&5
3070   ac_status=$?
3071   echo "$as_me:3071: \$? = $ac_status" >&5
3072   (exit "$ac_status"); };
3073 then
3074   eval cf_cv_prog_CC_c_o=yes
3075 else
3076   eval cf_cv_prog_CC_c_o=no
3077 fi
3078 rm -rf ./conftest*
3079
3080 fi
3081 if test "$cf_cv_prog_CC_c_o" = yes; then
3082   echo "$as_me:3082: result: yes" >&5
3083 echo "${ECHO_T}yes" >&6
3084 else
3085   echo "$as_me:3085: result: no" >&5
3086 echo "${ECHO_T}no" >&6
3087 fi
3088
3089 if test "$cross_compiling" = yes ; then
3090         LDCONFIG=:
3091 else
3092         case "$cf_cv_system_name" in
3093         (dragonfly*|mirbsd*|freebsd*)
3094                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3095                 ;;
3096         (*) LDPATH=$PATH:/sbin:/usr/sbin
3097                 # Extract the first word of "ldconfig", so it can be a program name with args.
3098 set dummy ldconfig; ac_word=$2
3099 echo "$as_me:3099: checking for $ac_word" >&5
3100 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3101 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3102   echo $ECHO_N "(cached) $ECHO_C" >&6
3103 else
3104   case $LDCONFIG in
3105   [\\/]* | ?:[\\/]*)
3106   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3107   ;;
3108   *)
3109   ac_save_IFS=$IFS; IFS=$ac_path_separator
3110 ac_dummy="$LDPATH"
3111 for ac_dir in $ac_dummy; do
3112   IFS=$ac_save_IFS
3113   test -z "$ac_dir" && ac_dir=.
3114   if $as_executable_p "$ac_dir/$ac_word"; then
3115    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3116    echo "$as_me:3116: found $ac_dir/$ac_word" >&5
3117    break
3118 fi
3119 done
3120
3121   ;;
3122 esac
3123 fi
3124 LDCONFIG=$ac_cv_path_LDCONFIG
3125
3126 if test -n "$LDCONFIG"; then
3127   echo "$as_me:3127: result: $LDCONFIG" >&5
3128 echo "${ECHO_T}$LDCONFIG" >&6
3129 else
3130   echo "$as_me:3130: result: no" >&5
3131 echo "${ECHO_T}no" >&6
3132 fi
3133
3134                 ;;
3135         esac
3136 fi
3137
3138 echo "$as_me:3138: checking if you want to ensure bool is consistent with C++" >&5
3139 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3140
3141 # Check whether --with-cxx or --without-cxx was given.
3142 if test "${with_cxx+set}" = set; then
3143   withval="$with_cxx"
3144   cf_with_cxx=$withval
3145 else
3146   cf_with_cxx=yes
3147 fi;
3148 echo "$as_me:3148: result: $cf_with_cxx" >&5
3149 echo "${ECHO_T}$cf_with_cxx" >&6
3150 if test "X$cf_with_cxx" = Xno ; then
3151         CXX=""
3152         GXX=""
3153 else
3154         # with autoconf 2.13, we can change the error to a warning:
3155                 ac_ext=cc
3156 ac_cpp='$CXXCPP $CPPFLAGS'
3157 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3158 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3159 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3160 ac_main_return="return"
3161 if test -n "$ac_tool_prefix"; then
3162   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3163   do
3164     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3165 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3166 echo "$as_me:3166: checking for $ac_word" >&5
3167 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3168 if test "${ac_cv_prog_CXX+set}" = set; then
3169   echo $ECHO_N "(cached) $ECHO_C" >&6
3170 else
3171   if test -n "$CXX"; then
3172   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3173 else
3174   ac_save_IFS=$IFS; IFS=$ac_path_separator
3175 ac_dummy="$PATH"
3176 for ac_dir in $ac_dummy; do
3177   IFS=$ac_save_IFS
3178   test -z "$ac_dir" && ac_dir=.
3179   $as_executable_p "$ac_dir/$ac_word" || continue
3180 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3181 echo "$as_me:3181: found $ac_dir/$ac_word" >&5
3182 break
3183 done
3184
3185 fi
3186 fi
3187 CXX=$ac_cv_prog_CXX
3188 if test -n "$CXX"; then
3189   echo "$as_me:3189: result: $CXX" >&5
3190 echo "${ECHO_T}$CXX" >&6
3191 else
3192   echo "$as_me:3192: result: no" >&5
3193 echo "${ECHO_T}no" >&6
3194 fi
3195
3196     test -n "$CXX" && break
3197   done
3198 fi
3199 if test -z "$CXX"; then
3200   ac_ct_CXX=$CXX
3201   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3202 do
3203   # Extract the first word of "$ac_prog", so it can be a program name with args.
3204 set dummy $ac_prog; ac_word=$2
3205 echo "$as_me:3205: checking for $ac_word" >&5
3206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3207 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3208   echo $ECHO_N "(cached) $ECHO_C" >&6
3209 else
3210   if test -n "$ac_ct_CXX"; then
3211   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3212 else
3213   ac_save_IFS=$IFS; IFS=$ac_path_separator
3214 ac_dummy="$PATH"
3215 for ac_dir in $ac_dummy; do
3216   IFS=$ac_save_IFS
3217   test -z "$ac_dir" && ac_dir=.
3218   $as_executable_p "$ac_dir/$ac_word" || continue
3219 ac_cv_prog_ac_ct_CXX="$ac_prog"
3220 echo "$as_me:3220: found $ac_dir/$ac_word" >&5
3221 break
3222 done
3223
3224 fi
3225 fi
3226 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3227 if test -n "$ac_ct_CXX"; then
3228   echo "$as_me:3228: result: $ac_ct_CXX" >&5
3229 echo "${ECHO_T}$ac_ct_CXX" >&6
3230 else
3231   echo "$as_me:3231: result: no" >&5
3232 echo "${ECHO_T}no" >&6
3233 fi
3234
3235   test -n "$ac_ct_CXX" && break
3236 done
3237 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3238
3239   CXX=$ac_ct_CXX
3240 fi
3241
3242 # Provide some information about the compiler.
3243 echo "$as_me:3243:" \
3244      "checking for C++ compiler version" >&5
3245 ac_compiler=`set X $ac_compile; echo $2`
3246 { (eval echo "$as_me:3246: \"$ac_compiler --version </dev/null >&5\"") >&5
3247   (eval $ac_compiler --version </dev/null >&5) 2>&5
3248   ac_status=$?
3249   echo "$as_me:3249: \$? = $ac_status" >&5
3250   (exit "$ac_status"); }
3251 { (eval echo "$as_me:3251: \"$ac_compiler -v </dev/null >&5\"") >&5
3252   (eval $ac_compiler -v </dev/null >&5) 2>&5
3253   ac_status=$?
3254   echo "$as_me:3254: \$? = $ac_status" >&5
3255   (exit "$ac_status"); }
3256 { (eval echo "$as_me:3256: \"$ac_compiler -V </dev/null >&5\"") >&5
3257   (eval $ac_compiler -V </dev/null >&5) 2>&5
3258   ac_status=$?
3259   echo "$as_me:3259: \$? = $ac_status" >&5
3260   (exit "$ac_status"); }
3261
3262 echo "$as_me:3262: checking whether we are using the GNU C++ compiler" >&5
3263 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3264 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3265   echo $ECHO_N "(cached) $ECHO_C" >&6
3266 else
3267   cat >"conftest.$ac_ext" <<_ACEOF
3268 #line 3268 "configure"
3269 #include "confdefs.h"
3270
3271 int
3272 main (void)
3273 {
3274 #ifndef __GNUC__
3275        choke me
3276 #endif
3277
3278   ;
3279   return 0;
3280 }
3281 _ACEOF
3282 rm -f "conftest.$ac_objext"
3283 if { (eval echo "$as_me:3283: \"$ac_compile\"") >&5
3284   (eval $ac_compile) 2>&5
3285   ac_status=$?
3286   echo "$as_me:3286: \$? = $ac_status" >&5
3287   (exit "$ac_status"); } &&
3288          { ac_try='test -s "conftest.$ac_objext"'
3289   { (eval echo "$as_me:3289: \"$ac_try\"") >&5
3290   (eval $ac_try) 2>&5
3291   ac_status=$?
3292   echo "$as_me:3292: \$? = $ac_status" >&5
3293   (exit "$ac_status"); }; }; then
3294   ac_compiler_gnu=yes
3295 else
3296   echo "$as_me: failed program was:" >&5
3297 cat "conftest.$ac_ext" >&5
3298 ac_compiler_gnu=no
3299 fi
3300 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3301 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3302
3303 fi
3304 echo "$as_me:3304: result: $ac_cv_cxx_compiler_gnu" >&5
3305 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3306 GXX=`test $ac_compiler_gnu = yes && echo yes`
3307 ac_test_CXXFLAGS=${CXXFLAGS+set}
3308 ac_save_CXXFLAGS=$CXXFLAGS
3309 CXXFLAGS="-g"
3310 echo "$as_me:3310: checking whether $CXX accepts -g" >&5
3311 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3312 if test "${ac_cv_prog_cxx_g+set}" = set; then
3313   echo $ECHO_N "(cached) $ECHO_C" >&6
3314 else
3315   cat >"conftest.$ac_ext" <<_ACEOF
3316 #line 3316 "configure"
3317 #include "confdefs.h"
3318
3319 int
3320 main (void)
3321 {
3322
3323   ;
3324   return 0;
3325 }
3326 _ACEOF
3327 rm -f "conftest.$ac_objext"
3328 if { (eval echo "$as_me:3328: \"$ac_compile\"") >&5
3329   (eval $ac_compile) 2>&5
3330   ac_status=$?
3331   echo "$as_me:3331: \$? = $ac_status" >&5
3332   (exit "$ac_status"); } &&
3333          { ac_try='test -s "conftest.$ac_objext"'
3334   { (eval echo "$as_me:3334: \"$ac_try\"") >&5
3335   (eval $ac_try) 2>&5
3336   ac_status=$?
3337   echo "$as_me:3337: \$? = $ac_status" >&5
3338   (exit "$ac_status"); }; }; then
3339   ac_cv_prog_cxx_g=yes
3340 else
3341   echo "$as_me: failed program was:" >&5
3342 cat "conftest.$ac_ext" >&5
3343 ac_cv_prog_cxx_g=no
3344 fi
3345 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3346 fi
3347 echo "$as_me:3347: result: $ac_cv_prog_cxx_g" >&5
3348 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3349 if test "$ac_test_CXXFLAGS" = set; then
3350   CXXFLAGS=$ac_save_CXXFLAGS
3351 elif test $ac_cv_prog_cxx_g = yes; then
3352   if test "$GXX" = yes; then
3353     CXXFLAGS="-g -O2"
3354   else
3355     CXXFLAGS="-g"
3356   fi
3357 else
3358   if test "$GXX" = yes; then
3359     CXXFLAGS="-O2"
3360   else
3361     CXXFLAGS=
3362   fi
3363 fi
3364 for ac_declaration in \
3365    ''\
3366    '#include <stdlib.h>' \
3367    'extern "C" void std::exit (int) throw (); using std::exit;' \
3368    'extern "C" void std::exit (int); using std::exit;' \
3369    'extern "C" void exit (int) throw ();' \
3370    'extern "C" void exit (int);' \
3371    'void exit (int);'
3372 do
3373   cat >"conftest.$ac_ext" <<_ACEOF
3374 #line 3374 "configure"
3375 #include "confdefs.h"
3376 #include <stdlib.h>
3377 $ac_declaration
3378 int
3379 main (void)
3380 {
3381 exit (42);
3382   ;
3383   return 0;
3384 }
3385 _ACEOF
3386 rm -f "conftest.$ac_objext"
3387 if { (eval echo "$as_me:3387: \"$ac_compile\"") >&5
3388   (eval $ac_compile) 2>&5
3389   ac_status=$?
3390   echo "$as_me:3390: \$? = $ac_status" >&5
3391   (exit "$ac_status"); } &&
3392          { ac_try='test -s "conftest.$ac_objext"'
3393   { (eval echo "$as_me:3393: \"$ac_try\"") >&5
3394   (eval $ac_try) 2>&5
3395   ac_status=$?
3396   echo "$as_me:3396: \$? = $ac_status" >&5
3397   (exit "$ac_status"); }; }; then
3398   :
3399 else
3400   echo "$as_me: failed program was:" >&5
3401 cat "conftest.$ac_ext" >&5
3402 continue
3403 fi
3404 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3405   cat >"conftest.$ac_ext" <<_ACEOF
3406 #line 3406 "configure"
3407 #include "confdefs.h"
3408 $ac_declaration
3409 int
3410 main (void)
3411 {
3412 exit (42);
3413   ;
3414   return 0;
3415 }
3416 _ACEOF
3417 rm -f "conftest.$ac_objext"
3418 if { (eval echo "$as_me:3418: \"$ac_compile\"") >&5
3419   (eval $ac_compile) 2>&5
3420   ac_status=$?
3421   echo "$as_me:3421: \$? = $ac_status" >&5
3422   (exit "$ac_status"); } &&
3423          { ac_try='test -s "conftest.$ac_objext"'
3424   { (eval echo "$as_me:3424: \"$ac_try\"") >&5
3425   (eval $ac_try) 2>&5
3426   ac_status=$?
3427   echo "$as_me:3427: \$? = $ac_status" >&5
3428   (exit "$ac_status"); }; }; then
3429   break
3430 else
3431   echo "$as_me: failed program was:" >&5
3432 cat "conftest.$ac_ext" >&5
3433 fi
3434 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3435 done
3436 rm -rf conftest*
3437 if test -n "$ac_declaration"; then
3438   echo '#ifdef __cplusplus' >>confdefs.h
3439   echo "$ac_declaration"    >>confdefs.h
3440   echo '#endif'             >>confdefs.h
3441 fi
3442
3443 ac_ext=c
3444 ac_cpp='$CPP $CPPFLAGS'
3445 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3446 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3447 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3448 ac_main_return="return"
3449
3450         ac_ext=cc
3451 ac_cpp='$CXXCPP $CPPFLAGS'
3452 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3453 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3454 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3455 ac_main_return="return"
3456
3457         if test "x$cf_with_cxx" != xno
3458         then
3459                 # Several of the C++ configurations do not work, particularly when
3460                 # cross-compiling (20140913 -TD)
3461                 echo "$as_me:3461: checking if $CXX works" >&5
3462 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3463
3464                 save_CPPFLAGS="$CPPFLAGS"
3465                 eval cf_includedir=${includedir}
3466                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3467
3468 cat >"conftest.$ac_ext" <<_ACEOF
3469 #line 3469 "configure"
3470 #include "confdefs.h"
3471
3472 #include <stdlib.h>
3473 #include <stdio.h>
3474
3475 int
3476 main (void)
3477 {
3478
3479                 printf("Hello world!\n")
3480
3481   ;
3482   return 0;
3483 }
3484 _ACEOF
3485 rm -f "conftest.$ac_objext"
3486 if { (eval echo "$as_me:3486: \"$ac_compile\"") >&5
3487   (eval $ac_compile) 2>&5
3488   ac_status=$?
3489   echo "$as_me:3489: \$? = $ac_status" >&5
3490   (exit "$ac_status"); } &&
3491          { ac_try='test -s "conftest.$ac_objext"'
3492   { (eval echo "$as_me:3492: \"$ac_try\"") >&5
3493   (eval $ac_try) 2>&5
3494   ac_status=$?
3495   echo "$as_me:3495: \$? = $ac_status" >&5
3496   (exit "$ac_status"); }; }; then
3497   cf_cxx_works=yes
3498 else
3499   echo "$as_me: failed program was:" >&5
3500 cat "conftest.$ac_ext" >&5
3501 cf_cxx_works=no
3502 fi
3503 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3504                 CPPFLAGS="$save_CPPFLAGS"
3505
3506                 echo "$as_me:3506: result: $cf_cxx_works" >&5
3507 echo "${ECHO_T}$cf_cxx_works" >&6
3508                 if test "x$cf_cxx_works" = xno
3509                 then
3510                         { echo "$as_me:3510: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3511 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3512                         cf_with_cxx=no; CXX=""; GXX="";
3513                 fi
3514         fi
3515         ac_ext=c
3516 ac_cpp='$CPP $CPPFLAGS'
3517 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3518 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3519 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3520 ac_main_return="return"
3521
3522         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3523         if test "$CXX" = "g++" ; then
3524                 # Extract the first word of "g++", so it can be a program name with args.
3525 set dummy g++; ac_word=$2
3526 echo "$as_me:3526: checking for $ac_word" >&5
3527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3528 if test "${ac_cv_path_CXX+set}" = set; then
3529   echo $ECHO_N "(cached) $ECHO_C" >&6
3530 else
3531   case $CXX in
3532   [\\/]* | ?:[\\/]*)
3533   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3534   ;;
3535   *)
3536   ac_save_IFS=$IFS; IFS=$ac_path_separator
3537 ac_dummy="$PATH"
3538 for ac_dir in $ac_dummy; do
3539   IFS=$ac_save_IFS
3540   test -z "$ac_dir" && ac_dir=.
3541   if $as_executable_p "$ac_dir/$ac_word"; then
3542    ac_cv_path_CXX="$ac_dir/$ac_word"
3543    echo "$as_me:3543: found $ac_dir/$ac_word" >&5
3544    break
3545 fi
3546 done
3547
3548   ;;
3549 esac
3550 fi
3551 CXX=$ac_cv_path_CXX
3552
3553 if test -n "$CXX"; then
3554   echo "$as_me:3554: result: $CXX" >&5
3555 echo "${ECHO_T}$CXX" >&6
3556 else
3557   echo "$as_me:3557: result: no" >&5
3558 echo "${ECHO_T}no" >&6
3559 fi
3560
3561         fi
3562         case "x$CXX" in
3563         (x|xg++)
3564                 { echo "$as_me:3564: WARNING: You don't have any C++ compiler, too bad" >&5
3565 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3566                 cf_with_cxx=no; CXX=""; GXX="";
3567                 ;;
3568         esac
3569 fi
3570
3571 GXX_VERSION=none
3572 if test "$GXX" = yes; then
3573         echo "$as_me:3573: checking version of ${CXX:-g++}" >&5
3574 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3575         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3576         if test -z "$GXX_VERSION"
3577         then
3578                 GXX_VERSION=unknown
3579                 GXX=no
3580         fi
3581         echo "$as_me:3581: result: $GXX_VERSION" >&5
3582 echo "${ECHO_T}$GXX_VERSION" >&6
3583 fi
3584
3585 case "$GXX_VERSION" in
3586 ([1-9][0-9].*)
3587         ;;
3588 (1.*|2.[0-6]*)
3589         { echo "$as_me:3589: WARNING: templates do not work" >&5
3590 echo "$as_me: WARNING: templates do not work" >&2;}
3591         ;;
3592 esac
3593
3594 echo "$as_me:3594: checking if you want to build C++ binding and demo" >&5
3595 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3596
3597 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3598 if test "${with_cxx_binding+set}" = set; then
3599   withval="$with_cxx_binding"
3600   cf_with_cxx_binding=$withval
3601 else
3602   cf_with_cxx_binding=$cf_with_cxx
3603 fi;
3604 echo "$as_me:3604: result: $cf_with_cxx_binding" >&5
3605 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3606
3607 echo "$as_me:3607: checking if you want to build with Ada" >&5
3608 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3609 echo "$as_me:3609: result: $cf_with_ada" >&5
3610 echo "${ECHO_T}$cf_with_ada" >&6
3611
3612 echo "$as_me:3612: checking if you want to install terminal database" >&5
3613 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3614
3615 # Check whether --enable-db-install or --disable-db-install was given.
3616 if test "${enable_db_install+set}" = set; then
3617   enableval="$enable_db_install"
3618   cf_with_db_install=$enableval
3619 else
3620   cf_with_db_install=yes
3621 fi;
3622 echo "$as_me:3622: result: $cf_with_db_install" >&5
3623 echo "${ECHO_T}$cf_with_db_install" >&6
3624
3625 echo "$as_me:3625: checking if you want to install manpages" >&5
3626 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3627
3628 # Check whether --with-manpages or --without-manpages was given.
3629 if test "${with_manpages+set}" = set; then
3630   withval="$with_manpages"
3631   cf_with_manpages=$withval
3632 else
3633   cf_with_manpages=yes
3634 fi;
3635 echo "$as_me:3635: result: $cf_with_manpages" >&5
3636 echo "${ECHO_T}$cf_with_manpages" >&6
3637
3638 echo "$as_me:3638: checking if you want to build programs such as tic" >&5
3639 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3640
3641 # Check whether --with-progs or --without-progs was given.
3642 if test "${with_progs+set}" = set; then
3643   withval="$with_progs"
3644   cf_with_progs=$withval
3645 else
3646   cf_with_progs=yes
3647 fi;
3648 echo "$as_me:3648: result: $cf_with_progs" >&5
3649 echo "${ECHO_T}$cf_with_progs" >&6
3650
3651 if test -f "$srcdir/tack/tack.h" ; then
3652         if test "x$cross_compiling" = xyes ; then
3653                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3654
3655 echo "${as_me:-configure}:3655: testing ignoring tack because we are cross-compiling ..." 1>&5
3656
3657                 cf_with_tack=no
3658         else
3659                 echo "$as_me:3659: checking if you want to build the tack program" >&5
3660 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3661
3662 # Check whether --with-tack or --without-tack was given.
3663 if test "${with_tack+set}" = set; then
3664   withval="$with_tack"
3665   cf_with_tack=$withval
3666 else
3667   cf_with_tack=$cf_with_progs
3668 fi;
3669                 echo "$as_me:3669: result: $cf_with_tack" >&5
3670 echo "${ECHO_T}$cf_with_tack" >&6
3671         fi
3672 else
3673         cf_with_tack=no
3674 fi
3675
3676 echo "$as_me:3676: checking if you want to build test-programs" >&5
3677 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3678
3679 # Check whether --with-tests or --without-tests was given.
3680 if test "${with_tests+set}" = set; then
3681   withval="$with_tests"
3682   cf_with_tests=$withval
3683 else
3684   cf_with_tests=yes
3685 fi;
3686 echo "$as_me:3686: result: $cf_with_tests" >&5
3687 echo "${ECHO_T}$cf_with_tests" >&6
3688
3689 echo "$as_me:3689: checking if you wish to install curses.h" >&5
3690 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3691
3692 # Check whether --with-curses-h or --without-curses-h was given.
3693 if test "${with_curses_h+set}" = set; then
3694   withval="$with_curses_h"
3695   with_curses_h=$withval
3696 else
3697   with_curses_h=yes
3698 fi;
3699 echo "$as_me:3699: result: $with_curses_h" >&5
3700 echo "${ECHO_T}$with_curses_h" >&6
3701
3702 modules_to_build="ncurses"
3703 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3704 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3705 modules_to_build="$modules_to_build panel menu form"
3706
3707 test "$program_prefix" != NONE &&
3708   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3709 # Use a double $ so make ignores it.
3710 test "$program_suffix" != NONE &&
3711   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3712 # Double any \ or $.  echo might interpret backslashes.
3713 # By default was `s,x,x', remove it if useless.
3714 cat <<\_ACEOF >conftest.sed
3715 s/[\\$]/&&/g;s/;s,x,x,$//
3716 _ACEOF
3717 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3718 rm conftest.sed
3719
3720 for ac_prog in mawk gawk nawk awk
3721 do
3722   # Extract the first word of "$ac_prog", so it can be a program name with args.
3723 set dummy $ac_prog; ac_word=$2
3724 echo "$as_me:3724: checking for $ac_word" >&5
3725 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3726 if test "${ac_cv_prog_AWK+set}" = set; then
3727   echo $ECHO_N "(cached) $ECHO_C" >&6
3728 else
3729   if test -n "$AWK"; then
3730   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3731 else
3732   ac_save_IFS=$IFS; IFS=$ac_path_separator
3733 ac_dummy="$PATH"
3734 for ac_dir in $ac_dummy; do
3735   IFS=$ac_save_IFS
3736   test -z "$ac_dir" && ac_dir=.
3737   $as_executable_p "$ac_dir/$ac_word" || continue
3738 ac_cv_prog_AWK="$ac_prog"
3739 echo "$as_me:3739: found $ac_dir/$ac_word" >&5
3740 break
3741 done
3742
3743 fi
3744 fi
3745 AWK=$ac_cv_prog_AWK
3746 if test -n "$AWK"; then
3747   echo "$as_me:3747: result: $AWK" >&5
3748 echo "${ECHO_T}$AWK" >&6
3749 else
3750   echo "$as_me:3750: result: no" >&5
3751 echo "${ECHO_T}no" >&6
3752 fi
3753
3754   test -n "$AWK" && break
3755 done
3756
3757 test -z "$AWK" && { { echo "$as_me:3757: error: No awk program found" >&5
3758 echo "$as_me: error: No awk program found" >&2;}
3759    { (exit 1); exit 1; }; }
3760
3761 # Find a good install program.  We prefer a C program (faster),
3762 # so one script is as good as another.  But avoid the broken or
3763 # incompatible versions:
3764 # SysV /etc/install, /usr/sbin/install
3765 # SunOS /usr/etc/install
3766 # IRIX /sbin/install
3767 # AIX /bin/install
3768 # AmigaOS /C/install, which installs bootblocks on floppy discs
3769 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3770 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3771 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3772 # ./install, which can be erroneously created by make from ./install.sh.
3773 echo "$as_me:3773: checking for a BSD compatible install" >&5
3774 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3775 if test -z "$INSTALL"; then
3776 if test "${ac_cv_path_install+set}" = set; then
3777   echo $ECHO_N "(cached) $ECHO_C" >&6
3778 else
3779     ac_save_IFS=$IFS; IFS=$ac_path_separator
3780   for ac_dir in $PATH; do
3781     IFS=$ac_save_IFS
3782     # Account for people who put trailing slashes in PATH elements.
3783     case $ac_dir/ in
3784     / | ./ | .// | /cC/* \
3785     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3786     | /usr/ucb/* ) ;;
3787     *)
3788       # OSF1 and SCO ODT 3.0 have their own names for install.
3789       # Don't use installbsd from OSF since it installs stuff as root
3790       # by default.
3791       for ac_prog in ginstall scoinst install; do
3792         if $as_executable_p "$ac_dir/$ac_prog"; then
3793           if test $ac_prog = install &&
3794             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3795             # AIX install.  It has an incompatible calling convention.
3796             :
3797           elif test $ac_prog = install &&
3798             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3799             # program-specific install script used by HP pwplus--don't use.
3800             :
3801           else
3802             ac_cv_path_install="$ac_dir/$ac_prog -c"
3803             break 2
3804           fi
3805         fi
3806       done
3807       ;;
3808     esac
3809   done
3810
3811 fi
3812   if test "${ac_cv_path_install+set}" = set; then
3813     INSTALL=$ac_cv_path_install
3814   else
3815     # As a last resort, use the slow shell script.  We don't cache a
3816     # path for INSTALL within a source directory, because that will
3817     # break other packages using the cache if that directory is
3818     # removed, or if the path is relative.
3819     INSTALL=$ac_install_sh
3820   fi
3821 fi
3822 echo "$as_me:3822: result: $INSTALL" >&5
3823 echo "${ECHO_T}$INSTALL" >&6
3824
3825 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3826 # It thinks the first close brace ends the variable substitution.
3827 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3828
3829 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3830
3831 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3832
3833 case $INSTALL in
3834 (/*)
3835         ;;
3836 (*)
3837         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3838         test -z "$cf_dir" && cf_dir=.
3839         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3840         ;;
3841 esac
3842
3843 for ac_prog in lint cppcheck splint
3844 do
3845   # Extract the first word of "$ac_prog", so it can be a program name with args.
3846 set dummy $ac_prog; ac_word=$2
3847 echo "$as_me:3847: checking for $ac_word" >&5
3848 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3849 if test "${ac_cv_prog_LINT+set}" = set; then
3850   echo $ECHO_N "(cached) $ECHO_C" >&6
3851 else
3852   if test -n "$LINT"; then
3853   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3854 else
3855   ac_save_IFS=$IFS; IFS=$ac_path_separator
3856 ac_dummy="$PATH"
3857 for ac_dir in $ac_dummy; do
3858   IFS=$ac_save_IFS
3859   test -z "$ac_dir" && ac_dir=.
3860   $as_executable_p "$ac_dir/$ac_word" || continue
3861 ac_cv_prog_LINT="$ac_prog"
3862 echo "$as_me:3862: found $ac_dir/$ac_word" >&5
3863 break
3864 done
3865
3866 fi
3867 fi
3868 LINT=$ac_cv_prog_LINT
3869 if test -n "$LINT"; then
3870   echo "$as_me:3870: result: $LINT" >&5
3871 echo "${ECHO_T}$LINT" >&6
3872 else
3873   echo "$as_me:3873: result: no" >&5
3874 echo "${ECHO_T}no" >&6
3875 fi
3876
3877   test -n "$LINT" && break
3878 done
3879
3880 case "x$LINT" in
3881 (xcppcheck|x*/cppcheck)
3882         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3883         ;;
3884 esac
3885
3886 echo "$as_me:3886: checking whether ln -s works" >&5
3887 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3888 LN_S=$as_ln_s
3889 if test "$LN_S" = "ln -s"; then
3890   echo "$as_me:3890: result: yes" >&5
3891 echo "${ECHO_T}yes" >&6
3892 else
3893   echo "$as_me:3893: result: no, using $LN_S" >&5
3894 echo "${ECHO_T}no, using $LN_S" >&6
3895 fi
3896
3897 echo "$as_me:3897: checking if $LN_S -f options work" >&5
3898 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3899
3900 rm -f conf$$.src conf$$dst
3901 echo >conf$$.dst
3902 echo first >conf$$.src
3903 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3904         cf_prog_ln_sf=yes
3905 else
3906         cf_prog_ln_sf=no
3907 fi
3908 rm -f conf$$.dst conf$$src
3909 echo "$as_me:3909: result: $cf_prog_ln_sf" >&5
3910 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3911
3912 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3913
3914 echo "$as_me:3914: checking for long file names" >&5
3915 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3916 if test "${ac_cv_sys_long_file_names+set}" = set; then
3917   echo $ECHO_N "(cached) $ECHO_C" >&6
3918 else
3919   ac_cv_sys_long_file_names=yes
3920 # Test for long file names in all the places we know might matter:
3921 #      .                the current directory, where building will happen
3922 #      $prefix/lib      where we will be installing things
3923 #      $exec_prefix/lib likewise
3924 # eval it to expand exec_prefix.
3925 #      $TMPDIR          if set, where it might want to write temporary files
3926 # if $TMPDIR is not set:
3927 #      /tmp             where it might want to write temporary files
3928 #      /var/tmp         likewise
3929 #      /usr/tmp         likewise
3930 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3931   ac_tmpdirs=$TMPDIR
3932 else
3933   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3934 fi
3935 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3936   test -d "$ac_dir" || continue
3937   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3938   ac_xdir=$ac_dir/cf$$
3939   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3940   ac_tf1=$ac_xdir/conftest9012345
3941   ac_tf2=$ac_xdir/conftest9012346
3942   (echo 1 >"$ac_tf1") 2>/dev/null
3943   (echo 2 >"$ac_tf2") 2>/dev/null
3944   ac_val=`cat "$ac_tf1" 2>/dev/null`
3945   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3946     ac_cv_sys_long_file_names=no
3947     rm -rf "$ac_xdir" 2>/dev/null
3948     break
3949   fi
3950   rm -rf "$ac_xdir" 2>/dev/null
3951 done
3952 fi
3953 echo "$as_me:3953: result: $ac_cv_sys_long_file_names" >&5
3954 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3955 if test "$ac_cv_sys_long_file_names" = yes; then
3956
3957 cat >>confdefs.h <<\EOF
3958 #define HAVE_LONG_FILE_NAMES 1
3959 EOF
3960
3961 fi
3962
3963 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3964 # of package conflict.
3965 cf_config_suffix=
3966
3967 # Check whether --with-config-suffix or --without-config-suffix was given.
3968 if test "${with_config_suffix+set}" = set; then
3969   withval="$with_config_suffix"
3970   case "x$withval" in
3971         (xyes|xno)
3972                 { echo "$as_me:3972: WARNING: expected a value for config-suffix option" >&5
3973 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3974                 ;;
3975         (*)     cf_config_suffix="$withval"
3976                 ;;
3977         esac
3978 fi;
3979
3980 # If we find pkg-config, check if we should install the ".pc" files.
3981
3982 echo "$as_me:3982: checking if you want to use pkg-config" >&5
3983 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3984
3985 # Check whether --with-pkg-config or --without-pkg-config was given.
3986 if test "${with_pkg_config+set}" = set; then
3987   withval="$with_pkg_config"
3988   cf_pkg_config=$withval
3989 else
3990   cf_pkg_config=yes
3991 fi;
3992 echo "$as_me:3992: result: $cf_pkg_config" >&5
3993 echo "${ECHO_T}$cf_pkg_config" >&6
3994
3995 case "$cf_pkg_config" in
3996 (no)
3997         PKG_CONFIG=none
3998         ;;
3999 (yes)
4000
4001 if test -n "$ac_tool_prefix"; then
4002   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4003 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4004 echo "$as_me:4004: checking for $ac_word" >&5
4005 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4006 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4007   echo $ECHO_N "(cached) $ECHO_C" >&6
4008 else
4009   case $PKG_CONFIG in
4010   [\\/]* | ?:[\\/]*)
4011   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4012   ;;
4013   *)
4014   ac_save_IFS=$IFS; IFS=$ac_path_separator
4015 ac_dummy="$PATH"
4016 for ac_dir in $ac_dummy; do
4017   IFS=$ac_save_IFS
4018   test -z "$ac_dir" && ac_dir=.
4019   if $as_executable_p "$ac_dir/$ac_word"; then
4020    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4021    echo "$as_me:4021: found $ac_dir/$ac_word" >&5
4022    break
4023 fi
4024 done
4025
4026   ;;
4027 esac
4028 fi
4029 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4030
4031 if test -n "$PKG_CONFIG"; then
4032   echo "$as_me:4032: result: $PKG_CONFIG" >&5
4033 echo "${ECHO_T}$PKG_CONFIG" >&6
4034 else
4035   echo "$as_me:4035: result: no" >&5
4036 echo "${ECHO_T}no" >&6
4037 fi
4038
4039 fi
4040 if test -z "$ac_cv_path_PKG_CONFIG"; then
4041   ac_pt_PKG_CONFIG=$PKG_CONFIG
4042   # Extract the first word of "pkg-config", so it can be a program name with args.
4043 set dummy pkg-config; ac_word=$2
4044 echo "$as_me:4044: checking for $ac_word" >&5
4045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4046 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4047   echo $ECHO_N "(cached) $ECHO_C" >&6
4048 else
4049   case $ac_pt_PKG_CONFIG in
4050   [\\/]* | ?:[\\/]*)
4051   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4052   ;;
4053   *)
4054   ac_save_IFS=$IFS; IFS=$ac_path_separator
4055 ac_dummy="$PATH"
4056 for ac_dir in $ac_dummy; do
4057   IFS=$ac_save_IFS
4058   test -z "$ac_dir" && ac_dir=.
4059   if $as_executable_p "$ac_dir/$ac_word"; then
4060    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4061    echo "$as_me:4061: found $ac_dir/$ac_word" >&5
4062    break
4063 fi
4064 done
4065
4066   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4067   ;;
4068 esac
4069 fi
4070 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4071
4072 if test -n "$ac_pt_PKG_CONFIG"; then
4073   echo "$as_me:4073: result: $ac_pt_PKG_CONFIG" >&5
4074 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4075 else
4076   echo "$as_me:4076: result: no" >&5
4077 echo "${ECHO_T}no" >&6
4078 fi
4079
4080   PKG_CONFIG=$ac_pt_PKG_CONFIG
4081 else
4082   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4083 fi
4084
4085         ;;
4086 (*)
4087         PKG_CONFIG=$withval
4088         ;;
4089 esac
4090
4091 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4092 if test "$PKG_CONFIG" != none ; then
4093
4094 if test "x$prefix" != xNONE; then
4095         cf_path_syntax="$prefix"
4096 else
4097         cf_path_syntax="$ac_default_prefix"
4098 fi
4099
4100 case ".$PKG_CONFIG" in
4101 (.\$\(*\)*|.\'*\'*)
4102         ;;
4103 (..|./*|.\\*)
4104         ;;
4105 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4106         ;;
4107 (.\$\{*prefix\}*|.\$\{*dir\}*)
4108         eval PKG_CONFIG="$PKG_CONFIG"
4109         case ".$PKG_CONFIG" in
4110         (.NONE/*)
4111                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4112                 ;;
4113         esac
4114         ;;
4115 (.no|.NONE/*)
4116         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4117         ;;
4118 (*)
4119         { { echo "$as_me:4119: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4120 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4121    { (exit 1); exit 1; }; }
4122         ;;
4123 esac
4124
4125 elif test "x$cf_pkg_config" != xno ; then
4126         { echo "$as_me:4126: WARNING: pkg-config is not installed" >&5
4127 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4128 fi
4129
4130 case "$PKG_CONFIG" in
4131 (no|none|yes)
4132         echo "$as_me:4132: checking for pkg-config library directory" >&5
4133 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4134         ;;
4135 (*)
4136         echo "$as_me:4136: checking for $PKG_CONFIG library directory" >&5
4137 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4138         ;;
4139 esac
4140
4141 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,'`
4142
4143 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4144 if test "${with_pkg_config_libdir+set}" = set; then
4145   withval="$with_pkg_config_libdir"
4146   cf_search_path=$withval
4147 else
4148   test "x$PKG_CONFIG" != xnone && cf_search_path=yes
4149 fi;
4150
4151 case x$cf_search_path in
4152 (x/*)
4153         ;;
4154 (xyes)
4155         cf_search_path=
4156         test -n "$verbose" && echo "    auto..." 1>&6
4157
4158 echo "${as_me:-configure}:4158: testing auto... ..." 1>&5
4159
4160         # Look for the library directory using the same prefix as the executable
4161         echo "$as_me:4161: checking for search-list" >&5
4162 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4163         if test "x$PKG_CONFIG" != xnone
4164         then
4165                 # works for pkg-config since version 0.24 (2009)
4166                 # works for pkgconf since version 0.8.3 (2012)
4167                 for cf_pkg_program in \
4168                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4169                         pkg-config \
4170                         pkgconf
4171                 do
4172                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4173                         test -n "$cf_search_path" && break
4174                 done
4175
4176                 # works for pkg-config since import in 2005 of original 2001 HP code.
4177                 test -z "$cf_search_path" && \
4178                 cf_search_path=`
4179                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4180 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4181         sub(\"^[^']*'\",\"\"); \
4182         sub(\"'.*\",\"\"); \
4183         printf \" %s\", \\$0; } \
4184 { next; } \
4185 "`
4186         fi
4187
4188         echo "$as_me:4188: result: $cf_search_path" >&5
4189 echo "${ECHO_T}$cf_search_path" >&6
4190
4191         ;;
4192 (*)
4193         ;;
4194 esac
4195
4196 echo "$as_me:4196: checking for first directory" >&5
4197 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4198 cf_pkg_config_path=none
4199 for cf_config in $cf_search_path
4200 do
4201         if test -d "$cf_config"
4202         then
4203                 cf_pkg_config_path=$cf_config
4204                 break
4205         fi
4206 done
4207 echo "$as_me:4207: result: $cf_pkg_config_path" >&5
4208 echo "${ECHO_T}$cf_pkg_config_path" >&6
4209
4210 if test "x$cf_pkg_config_path" != xnone ; then
4211         # limit this to the first directory found
4212         PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4213 fi
4214
4215 if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4216 then
4217         echo "$as_me:4217: checking for workaround" >&5
4218 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4219         if test "$prefix" = "NONE" ; then
4220                 cf_prefix="$ac_default_prefix"
4221         else
4222                 cf_prefix="$prefix"
4223         fi
4224         eval cf_libdir=$libdir
4225         cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4226         cf_backup=
4227         for cf_config in $cf_search_path
4228         do
4229                 case $cf_config in
4230                 $cf_libdir/pkgconfig)
4231                         PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4232                         break
4233                         ;;
4234                 *)
4235                         test -z "$cf_backup" && cf_backup=$cf_config
4236                         ;;
4237                 esac
4238         done
4239         test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4240         echo "$as_me:4240: result: $PKG_CONFIG_LIBDIR" >&5
4241 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4242 fi
4243
4244 if test "x$PKG_CONFIG" != xnone
4245 then
4246         echo "$as_me:4246: checking if we should install .pc files for $PKG_CONFIG" >&5
4247 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4248 else
4249         echo "$as_me:4249: checking if we should install .pc files" >&5
4250 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4251 fi
4252
4253 # Check whether --enable-pc-files or --disable-pc-files was given.
4254 if test "${enable_pc_files+set}" = set; then
4255   enableval="$enable_pc_files"
4256   enable_pc_files=$enableval
4257 else
4258   enable_pc_files=no
4259 fi;
4260 echo "$as_me:4260: result: $enable_pc_files" >&5
4261 echo "${ECHO_T}$enable_pc_files" >&6
4262
4263 if test "x$enable_pc_files" != xno
4264 then
4265         MAKE_PC_FILES=
4266         case "x$PKG_CONFIG_LIBDIR" in
4267         (xno|xnone|xyes|x)
4268                 { echo "$as_me:4268: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4269 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4270                 ;;
4271         (*)
4272
4273 if test "x$prefix" != xNONE; then
4274         cf_path_syntax="$prefix"
4275 else
4276         cf_path_syntax="$ac_default_prefix"
4277 fi
4278
4279 case ".$PKG_CONFIG_LIBDIR" in
4280 (.\$\(*\)*|.\'*\'*)
4281         ;;
4282 (..|./*|.\\*)
4283         ;;
4284 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4285         ;;
4286 (.\$\{*prefix\}*|.\$\{*dir\}*)
4287         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4288         case ".$PKG_CONFIG_LIBDIR" in
4289         (.NONE/*)
4290                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4291                 ;;
4292         esac
4293         ;;
4294 (.no|.NONE/*)
4295         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4296         ;;
4297 (*)
4298         { { echo "$as_me:4298: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4299 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4300    { (exit 1); exit 1; }; }
4301         ;;
4302 esac
4303
4304                 ;;
4305         esac
4306 else
4307         MAKE_PC_FILES="#"
4308 fi
4309
4310 if test -z "$MAKE_PC_FILES"
4311 then
4312         echo "$as_me:4312: checking for suffix to add to pc-files" >&5
4313 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4314
4315 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4316 if test "${with_pc_suffix+set}" = set; then
4317   withval="$with_pc_suffix"
4318   case "x$withval" in
4319         (xyes|xno)
4320                 PC_MODULE_SUFFIX=
4321                 ;;
4322         (*)     PC_MODULE_SUFFIX="$withval"
4323                 ;;
4324         esac
4325 fi;
4326         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4327         echo "$as_me:4327: result: $PC_MODULE_SUFFIX" >&5
4328 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4329         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4330
4331 fi
4332
4333 echo "$as_me:4333: checking if we should assume mixed-case filenames" >&5
4334 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4335
4336 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4337 if test "${enable_mixed_case+set}" = set; then
4338   enableval="$enable_mixed_case"
4339   enable_mixedcase=$enableval
4340 else
4341   enable_mixedcase=auto
4342 fi;
4343 echo "$as_me:4343: result: $enable_mixedcase" >&5
4344 echo "${ECHO_T}$enable_mixedcase" >&6
4345 if test "$enable_mixedcase" = "auto" ; then
4346
4347 echo "$as_me:4347: checking if filesystem supports mixed-case filenames" >&5
4348 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4349 if test "${cf_cv_mixedcase+set}" = set; then
4350   echo $ECHO_N "(cached) $ECHO_C" >&6
4351 else
4352
4353 if test "$cross_compiling" = yes ; then
4354         case "$target_alias" in
4355         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4356                 cf_cv_mixedcase=no
4357                 ;;
4358         (*)
4359                 cf_cv_mixedcase=yes
4360                 ;;
4361         esac
4362 else
4363         rm -f conftest CONFTEST
4364         echo test >conftest
4365         if test -f CONFTEST ; then
4366                 cf_cv_mixedcase=no
4367         else
4368                 cf_cv_mixedcase=yes
4369         fi
4370         rm -f conftest CONFTEST
4371 fi
4372
4373 fi
4374 echo "$as_me:4374: result: $cf_cv_mixedcase" >&5
4375 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4376 test "$cf_cv_mixedcase" = yes &&
4377 cat >>confdefs.h <<\EOF
4378 #define MIXEDCASE_FILENAMES 1
4379 EOF
4380
4381 else
4382         cf_cv_mixedcase=$enable_mixedcase
4383         if test "x$enable_mixedcase" = "xyes" ; then
4384
4385 cat >>confdefs.h <<\EOF
4386 #define MIXEDCASE_FILENAMES 1
4387 EOF
4388
4389         fi
4390 fi
4391
4392 # do this after mixed-case option (tags/TAGS is not as important as tic).
4393 echo "$as_me:4393: checking whether ${MAKE-make} sets \${MAKE}" >&5
4394 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4395 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4396 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4397   echo $ECHO_N "(cached) $ECHO_C" >&6
4398 else
4399   cat >conftest.make <<\EOF
4400 all:
4401         @echo 'ac_maketemp="${MAKE}"'
4402 EOF
4403 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4404 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4405 if test -n "$ac_maketemp"; then
4406   eval ac_cv_prog_make_${ac_make}_set=yes
4407 else
4408   eval ac_cv_prog_make_${ac_make}_set=no
4409 fi
4410 rm -f conftest.make
4411 fi
4412 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4413   echo "$as_me:4413: result: yes" >&5
4414 echo "${ECHO_T}yes" >&6
4415   SET_MAKE=
4416 else
4417   echo "$as_me:4417: result: no" >&5
4418 echo "${ECHO_T}no" >&6
4419   SET_MAKE="MAKE=${MAKE-make}"
4420 fi
4421
4422 echo "$as_me:4422: checking for \".PHONY\" make-support" >&5
4423 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4424 if test "${cf_cv_make_PHONY+set}" = set; then
4425   echo $ECHO_N "(cached) $ECHO_C" >&6
4426 else
4427
4428         rm -rf conftest*
4429         (
4430                 mkdir conftest || exit 1
4431                 cd conftest
4432                 cat >makefile <<'CF_EOF'
4433 .PHONY: always
4434 DATA=0
4435 always: always.out
4436         @echo "** making $@ $(DATA)"
4437 once: once.out
4438         @echo "** making $@ $(DATA)"
4439 always.out:
4440         @echo "** making $@ $(DATA)"
4441         echo $(DATA) > $@
4442 once.out:
4443         @echo "** making $@ $(DATA)"
4444         echo $(DATA) > $@
4445 CF_EOF
4446                 for cf_data in 1 2 3
4447                 do
4448                         ${MAKE:-make} always DATA=$cf_data
4449                         ${MAKE:-make} once   DATA=$cf_data
4450                         ${MAKE:-make} -t always once
4451                         if test -f always ; then
4452                                 echo "no (case 1)" > ../conftest.tmp
4453                         elif test ! -f always.out ; then
4454                                 echo "no (case 2)" > ../conftest.tmp
4455                         elif test ! -f once.out ; then
4456                                 echo "no (case 3)" > ../conftest.tmp
4457                         elif ! cmp -s always.out once.out ; then
4458                                 echo "no (case 4)" > ../conftest.tmp
4459                                 diff always.out once.out
4460                         else
4461                                 cf_check="`cat always.out`"
4462                                 if test "x$cf_check" != "x$cf_data" ; then
4463                                         echo "no (case 5)" > ../conftest.tmp
4464                                 else
4465                                         echo yes > ../conftest.tmp
4466                                         rm -f ./*.out
4467                                         continue
4468                                 fi
4469                         fi
4470                         break
4471                 done
4472         ) >&5 2>&1
4473         cf_cv_make_PHONY="`cat conftest.tmp`"
4474         rm -rf conftest*
4475
4476 fi
4477 echo "$as_me:4477: result: $cf_cv_make_PHONY" >&5
4478 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4479 MAKE_NO_PHONY="#"
4480 MAKE_PHONY="#"
4481 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4482 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4483
4484 for ac_prog in exctags ctags
4485 do
4486   # Extract the first word of "$ac_prog", so it can be a program name with args.
4487 set dummy $ac_prog; ac_word=$2
4488 echo "$as_me:4488: checking for $ac_word" >&5
4489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4490 if test "${ac_cv_prog_CTAGS+set}" = set; then
4491   echo $ECHO_N "(cached) $ECHO_C" >&6
4492 else
4493   if test -n "$CTAGS"; then
4494   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4495 else
4496   ac_save_IFS=$IFS; IFS=$ac_path_separator
4497 ac_dummy="$PATH"
4498 for ac_dir in $ac_dummy; do
4499   IFS=$ac_save_IFS
4500   test -z "$ac_dir" && ac_dir=.
4501   $as_executable_p "$ac_dir/$ac_word" || continue
4502 ac_cv_prog_CTAGS="$ac_prog"
4503 echo "$as_me:4503: found $ac_dir/$ac_word" >&5
4504 break
4505 done
4506
4507 fi
4508 fi
4509 CTAGS=$ac_cv_prog_CTAGS
4510 if test -n "$CTAGS"; then
4511   echo "$as_me:4511: result: $CTAGS" >&5
4512 echo "${ECHO_T}$CTAGS" >&6
4513 else
4514   echo "$as_me:4514: result: no" >&5
4515 echo "${ECHO_T}no" >&6
4516 fi
4517
4518   test -n "$CTAGS" && break
4519 done
4520
4521 for ac_prog in exetags etags
4522 do
4523   # Extract the first word of "$ac_prog", so it can be a program name with args.
4524 set dummy $ac_prog; ac_word=$2
4525 echo "$as_me:4525: checking for $ac_word" >&5
4526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4527 if test "${ac_cv_prog_ETAGS+set}" = set; then
4528   echo $ECHO_N "(cached) $ECHO_C" >&6
4529 else
4530   if test -n "$ETAGS"; then
4531   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4532 else
4533   ac_save_IFS=$IFS; IFS=$ac_path_separator
4534 ac_dummy="$PATH"
4535 for ac_dir in $ac_dummy; do
4536   IFS=$ac_save_IFS
4537   test -z "$ac_dir" && ac_dir=.
4538   $as_executable_p "$ac_dir/$ac_word" || continue
4539 ac_cv_prog_ETAGS="$ac_prog"
4540 echo "$as_me:4540: found $ac_dir/$ac_word" >&5
4541 break
4542 done
4543
4544 fi
4545 fi
4546 ETAGS=$ac_cv_prog_ETAGS
4547 if test -n "$ETAGS"; then
4548   echo "$as_me:4548: result: $ETAGS" >&5
4549 echo "${ECHO_T}$ETAGS" >&6
4550 else
4551   echo "$as_me:4551: result: no" >&5
4552 echo "${ECHO_T}no" >&6
4553 fi
4554
4555   test -n "$ETAGS" && break
4556 done
4557
4558 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4559 set dummy ${CTAGS:-ctags}; ac_word=$2
4560 echo "$as_me:4560: checking for $ac_word" >&5
4561 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4562 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4563   echo $ECHO_N "(cached) $ECHO_C" >&6
4564 else
4565   if test -n "$MAKE_LOWER_TAGS"; then
4566   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4567 else
4568   ac_save_IFS=$IFS; IFS=$ac_path_separator
4569 ac_dummy="$PATH"
4570 for ac_dir in $ac_dummy; do
4571   IFS=$ac_save_IFS
4572   test -z "$ac_dir" && ac_dir=.
4573   $as_executable_p "$ac_dir/$ac_word" || continue
4574 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4575 echo "$as_me:4575: found $ac_dir/$ac_word" >&5
4576 break
4577 done
4578
4579   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4580 fi
4581 fi
4582 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4583 if test -n "$MAKE_LOWER_TAGS"; then
4584   echo "$as_me:4584: result: $MAKE_LOWER_TAGS" >&5
4585 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4586 else
4587   echo "$as_me:4587: result: no" >&5
4588 echo "${ECHO_T}no" >&6
4589 fi
4590
4591 if test "$cf_cv_mixedcase" = yes ; then
4592         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4593 set dummy ${ETAGS:-etags}; ac_word=$2
4594 echo "$as_me:4594: checking for $ac_word" >&5
4595 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4596 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4597   echo $ECHO_N "(cached) $ECHO_C" >&6
4598 else
4599   if test -n "$MAKE_UPPER_TAGS"; then
4600   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4601 else
4602   ac_save_IFS=$IFS; IFS=$ac_path_separator
4603 ac_dummy="$PATH"
4604 for ac_dir in $ac_dummy; do
4605   IFS=$ac_save_IFS
4606   test -z "$ac_dir" && ac_dir=.
4607   $as_executable_p "$ac_dir/$ac_word" || continue
4608 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4609 echo "$as_me:4609: found $ac_dir/$ac_word" >&5
4610 break
4611 done
4612
4613   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4614 fi
4615 fi
4616 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4617 if test -n "$MAKE_UPPER_TAGS"; then
4618   echo "$as_me:4618: result: $MAKE_UPPER_TAGS" >&5
4619 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4620 else
4621   echo "$as_me:4621: result: no" >&5
4622 echo "${ECHO_T}no" >&6
4623 fi
4624
4625 else
4626         MAKE_UPPER_TAGS=no
4627 fi
4628
4629 if test "$MAKE_UPPER_TAGS" = yes ; then
4630         MAKE_UPPER_TAGS=
4631 else
4632         MAKE_UPPER_TAGS="#"
4633 fi
4634
4635 if test "$MAKE_LOWER_TAGS" = yes ; then
4636         MAKE_LOWER_TAGS=
4637 else
4638         MAKE_LOWER_TAGS="#"
4639 fi
4640
4641 echo "$as_me:4641: checking for makeflags variable" >&5
4642 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4643 if test "${cf_cv_makeflags+set}" = set; then
4644   echo $ECHO_N "(cached) $ECHO_C" >&6
4645 else
4646
4647         cf_cv_makeflags=''
4648         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4649         do
4650                 cat >cf_makeflags.tmp <<CF_EOF
4651 SHELL = $SHELL
4652 all :
4653         @ echo '.$cf_option'
4654 CF_EOF
4655                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4656                 case "$cf_result" in
4657                 (.*k|.*kw)
4658                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4659                         case "$cf_result" in
4660                         (.*CC=*)        cf_cv_makeflags=
4661                                 ;;
4662                         (*)     cf_cv_makeflags=$cf_option
4663                                 ;;
4664                         esac
4665                         break
4666                         ;;
4667                 (.-)
4668                         ;;
4669                 (*)
4670
4671 echo "${as_me:-configure}:4671: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4672
4673                         ;;
4674                 esac
4675         done
4676         rm -f cf_makeflags.tmp
4677
4678 fi
4679 echo "$as_me:4679: result: $cf_cv_makeflags" >&5
4680 echo "${ECHO_T}$cf_cv_makeflags" >&6
4681
4682 if test -n "$ac_tool_prefix"; then
4683   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4684 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4685 echo "$as_me:4685: checking for $ac_word" >&5
4686 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4687 if test "${ac_cv_prog_RANLIB+set}" = set; then
4688   echo $ECHO_N "(cached) $ECHO_C" >&6
4689 else
4690   if test -n "$RANLIB"; then
4691   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4692 else
4693   ac_save_IFS=$IFS; IFS=$ac_path_separator
4694 ac_dummy="$PATH"
4695 for ac_dir in $ac_dummy; do
4696   IFS=$ac_save_IFS
4697   test -z "$ac_dir" && ac_dir=.
4698   $as_executable_p "$ac_dir/$ac_word" || continue
4699 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4700 echo "$as_me:4700: found $ac_dir/$ac_word" >&5
4701 break
4702 done
4703
4704 fi
4705 fi
4706 RANLIB=$ac_cv_prog_RANLIB
4707 if test -n "$RANLIB"; then
4708   echo "$as_me:4708: result: $RANLIB" >&5
4709 echo "${ECHO_T}$RANLIB" >&6
4710 else
4711   echo "$as_me:4711: result: no" >&5
4712 echo "${ECHO_T}no" >&6
4713 fi
4714
4715 fi
4716 if test -z "$ac_cv_prog_RANLIB"; then
4717   ac_ct_RANLIB=$RANLIB
4718   # Extract the first word of "ranlib", so it can be a program name with args.
4719 set dummy ranlib; ac_word=$2
4720 echo "$as_me:4720: checking for $ac_word" >&5
4721 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4722 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4723   echo $ECHO_N "(cached) $ECHO_C" >&6
4724 else
4725   if test -n "$ac_ct_RANLIB"; then
4726   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4727 else
4728   ac_save_IFS=$IFS; IFS=$ac_path_separator
4729 ac_dummy="$PATH"
4730 for ac_dir in $ac_dummy; do
4731   IFS=$ac_save_IFS
4732   test -z "$ac_dir" && ac_dir=.
4733   $as_executable_p "$ac_dir/$ac_word" || continue
4734 ac_cv_prog_ac_ct_RANLIB="ranlib"
4735 echo "$as_me:4735: found $ac_dir/$ac_word" >&5
4736 break
4737 done
4738
4739   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4740 fi
4741 fi
4742 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4743 if test -n "$ac_ct_RANLIB"; then
4744   echo "$as_me:4744: result: $ac_ct_RANLIB" >&5
4745 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4746 else
4747   echo "$as_me:4747: result: no" >&5
4748 echo "${ECHO_T}no" >&6
4749 fi
4750
4751   RANLIB=$ac_ct_RANLIB
4752 else
4753   RANLIB="$ac_cv_prog_RANLIB"
4754 fi
4755
4756 if test -n "$ac_tool_prefix"; then
4757   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4758 set dummy ${ac_tool_prefix}ld; ac_word=$2
4759 echo "$as_me:4759: checking for $ac_word" >&5
4760 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4761 if test "${ac_cv_prog_LD+set}" = set; then
4762   echo $ECHO_N "(cached) $ECHO_C" >&6
4763 else
4764   if test -n "$LD"; then
4765   ac_cv_prog_LD="$LD" # Let the user override the test.
4766 else
4767   ac_save_IFS=$IFS; IFS=$ac_path_separator
4768 ac_dummy="$PATH"
4769 for ac_dir in $ac_dummy; do
4770   IFS=$ac_save_IFS
4771   test -z "$ac_dir" && ac_dir=.
4772   $as_executable_p "$ac_dir/$ac_word" || continue
4773 ac_cv_prog_LD="${ac_tool_prefix}ld"
4774 echo "$as_me:4774: found $ac_dir/$ac_word" >&5
4775 break
4776 done
4777
4778 fi
4779 fi
4780 LD=$ac_cv_prog_LD
4781 if test -n "$LD"; then
4782   echo "$as_me:4782: result: $LD" >&5
4783 echo "${ECHO_T}$LD" >&6
4784 else
4785   echo "$as_me:4785: result: no" >&5
4786 echo "${ECHO_T}no" >&6
4787 fi
4788
4789 fi
4790 if test -z "$ac_cv_prog_LD"; then
4791   ac_ct_LD=$LD
4792   # Extract the first word of "ld", so it can be a program name with args.
4793 set dummy ld; ac_word=$2
4794 echo "$as_me:4794: checking for $ac_word" >&5
4795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4796 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4797   echo $ECHO_N "(cached) $ECHO_C" >&6
4798 else
4799   if test -n "$ac_ct_LD"; then
4800   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4801 else
4802   ac_save_IFS=$IFS; IFS=$ac_path_separator
4803 ac_dummy="$PATH"
4804 for ac_dir in $ac_dummy; do
4805   IFS=$ac_save_IFS
4806   test -z "$ac_dir" && ac_dir=.
4807   $as_executable_p "$ac_dir/$ac_word" || continue
4808 ac_cv_prog_ac_ct_LD="ld"
4809 echo "$as_me:4809: found $ac_dir/$ac_word" >&5
4810 break
4811 done
4812
4813   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4814 fi
4815 fi
4816 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4817 if test -n "$ac_ct_LD"; then
4818   echo "$as_me:4818: result: $ac_ct_LD" >&5
4819 echo "${ECHO_T}$ac_ct_LD" >&6
4820 else
4821   echo "$as_me:4821: result: no" >&5
4822 echo "${ECHO_T}no" >&6
4823 fi
4824
4825   LD=$ac_ct_LD
4826 else
4827   LD="$ac_cv_prog_LD"
4828 fi
4829
4830 if test -n "$ac_tool_prefix"; then
4831   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4832 set dummy ${ac_tool_prefix}ar; ac_word=$2
4833 echo "$as_me:4833: checking for $ac_word" >&5
4834 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4835 if test "${ac_cv_prog_AR+set}" = set; then
4836   echo $ECHO_N "(cached) $ECHO_C" >&6
4837 else
4838   if test -n "$AR"; then
4839   ac_cv_prog_AR="$AR" # Let the user override the test.
4840 else
4841   ac_save_IFS=$IFS; IFS=$ac_path_separator
4842 ac_dummy="$PATH"
4843 for ac_dir in $ac_dummy; do
4844   IFS=$ac_save_IFS
4845   test -z "$ac_dir" && ac_dir=.
4846   $as_executable_p "$ac_dir/$ac_word" || continue
4847 ac_cv_prog_AR="${ac_tool_prefix}ar"
4848 echo "$as_me:4848: found $ac_dir/$ac_word" >&5
4849 break
4850 done
4851
4852 fi
4853 fi
4854 AR=$ac_cv_prog_AR
4855 if test -n "$AR"; then
4856   echo "$as_me:4856: result: $AR" >&5
4857 echo "${ECHO_T}$AR" >&6
4858 else
4859   echo "$as_me:4859: result: no" >&5
4860 echo "${ECHO_T}no" >&6
4861 fi
4862
4863 fi
4864 if test -z "$ac_cv_prog_AR"; then
4865   ac_ct_AR=$AR
4866   # Extract the first word of "ar", so it can be a program name with args.
4867 set dummy ar; ac_word=$2
4868 echo "$as_me:4868: checking for $ac_word" >&5
4869 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4870 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4871   echo $ECHO_N "(cached) $ECHO_C" >&6
4872 else
4873   if test -n "$ac_ct_AR"; then
4874   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4875 else
4876   ac_save_IFS=$IFS; IFS=$ac_path_separator
4877 ac_dummy="$PATH"
4878 for ac_dir in $ac_dummy; do
4879   IFS=$ac_save_IFS
4880   test -z "$ac_dir" && ac_dir=.
4881   $as_executable_p "$ac_dir/$ac_word" || continue
4882 ac_cv_prog_ac_ct_AR="ar"
4883 echo "$as_me:4883: found $ac_dir/$ac_word" >&5
4884 break
4885 done
4886
4887   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4888 fi
4889 fi
4890 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4891 if test -n "$ac_ct_AR"; then
4892   echo "$as_me:4892: result: $ac_ct_AR" >&5
4893 echo "${ECHO_T}$ac_ct_AR" >&6
4894 else
4895   echo "$as_me:4895: result: no" >&5
4896 echo "${ECHO_T}no" >&6
4897 fi
4898
4899   AR=$ac_ct_AR
4900 else
4901   AR="$ac_cv_prog_AR"
4902 fi
4903
4904 if test -n "$ac_tool_prefix"; then
4905   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4906 set dummy ${ac_tool_prefix}nm; ac_word=$2
4907 echo "$as_me:4907: checking for $ac_word" >&5
4908 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4909 if test "${ac_cv_prog_NM+set}" = set; then
4910   echo $ECHO_N "(cached) $ECHO_C" >&6
4911 else
4912   if test -n "$NM"; then
4913   ac_cv_prog_NM="$NM" # Let the user override the test.
4914 else
4915   ac_save_IFS=$IFS; IFS=$ac_path_separator
4916 ac_dummy="$PATH"
4917 for ac_dir in $ac_dummy; do
4918   IFS=$ac_save_IFS
4919   test -z "$ac_dir" && ac_dir=.
4920   $as_executable_p "$ac_dir/$ac_word" || continue
4921 ac_cv_prog_NM="${ac_tool_prefix}nm"
4922 echo "$as_me:4922: found $ac_dir/$ac_word" >&5
4923 break
4924 done
4925
4926 fi
4927 fi
4928 NM=$ac_cv_prog_NM
4929 if test -n "$NM"; then
4930   echo "$as_me:4930: result: $NM" >&5
4931 echo "${ECHO_T}$NM" >&6
4932 else
4933   echo "$as_me:4933: result: no" >&5
4934 echo "${ECHO_T}no" >&6
4935 fi
4936
4937 fi
4938 if test -z "$ac_cv_prog_NM"; then
4939   ac_ct_NM=$NM
4940   # Extract the first word of "nm", so it can be a program name with args.
4941 set dummy nm; ac_word=$2
4942 echo "$as_me:4942: checking for $ac_word" >&5
4943 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4944 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4945   echo $ECHO_N "(cached) $ECHO_C" >&6
4946 else
4947   if test -n "$ac_ct_NM"; then
4948   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4949 else
4950   ac_save_IFS=$IFS; IFS=$ac_path_separator
4951 ac_dummy="$PATH"
4952 for ac_dir in $ac_dummy; do
4953   IFS=$ac_save_IFS
4954   test -z "$ac_dir" && ac_dir=.
4955   $as_executable_p "$ac_dir/$ac_word" || continue
4956 ac_cv_prog_ac_ct_NM="nm"
4957 echo "$as_me:4957: found $ac_dir/$ac_word" >&5
4958 break
4959 done
4960
4961   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4962 fi
4963 fi
4964 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4965 if test -n "$ac_ct_NM"; then
4966   echo "$as_me:4966: result: $ac_ct_NM" >&5
4967 echo "${ECHO_T}$ac_ct_NM" >&6
4968 else
4969   echo "$as_me:4969: result: no" >&5
4970 echo "${ECHO_T}no" >&6
4971 fi
4972
4973   NM=$ac_ct_NM
4974 else
4975   NM="$ac_cv_prog_NM"
4976 fi
4977
4978 if test -n "$ac_tool_prefix"; then
4979   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4980 set dummy ${ac_tool_prefix}ar; ac_word=$2
4981 echo "$as_me:4981: checking for $ac_word" >&5
4982 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4983 if test "${ac_cv_prog_AR+set}" = set; then
4984   echo $ECHO_N "(cached) $ECHO_C" >&6
4985 else
4986   if test -n "$AR"; then
4987   ac_cv_prog_AR="$AR" # Let the user override the test.
4988 else
4989   ac_save_IFS=$IFS; IFS=$ac_path_separator
4990 ac_dummy="$PATH"
4991 for ac_dir in $ac_dummy; do
4992   IFS=$ac_save_IFS
4993   test -z "$ac_dir" && ac_dir=.
4994   $as_executable_p "$ac_dir/$ac_word" || continue
4995 ac_cv_prog_AR="${ac_tool_prefix}ar"
4996 echo "$as_me:4996: found $ac_dir/$ac_word" >&5
4997 break
4998 done
4999
5000 fi
5001 fi
5002 AR=$ac_cv_prog_AR
5003 if test -n "$AR"; then
5004   echo "$as_me:5004: result: $AR" >&5
5005 echo "${ECHO_T}$AR" >&6
5006 else
5007   echo "$as_me:5007: result: no" >&5
5008 echo "${ECHO_T}no" >&6
5009 fi
5010
5011 fi
5012 if test -z "$ac_cv_prog_AR"; then
5013   ac_ct_AR=$AR
5014   # Extract the first word of "ar", so it can be a program name with args.
5015 set dummy ar; ac_word=$2
5016 echo "$as_me:5016: checking for $ac_word" >&5
5017 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5018 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5019   echo $ECHO_N "(cached) $ECHO_C" >&6
5020 else
5021   if test -n "$ac_ct_AR"; then
5022   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5023 else
5024   ac_save_IFS=$IFS; IFS=$ac_path_separator
5025 ac_dummy="$PATH"
5026 for ac_dir in $ac_dummy; do
5027   IFS=$ac_save_IFS
5028   test -z "$ac_dir" && ac_dir=.
5029   $as_executable_p "$ac_dir/$ac_word" || continue
5030 ac_cv_prog_ac_ct_AR="ar"
5031 echo "$as_me:5031: found $ac_dir/$ac_word" >&5
5032 break
5033 done
5034
5035   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5036 fi
5037 fi
5038 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5039 if test -n "$ac_ct_AR"; then
5040   echo "$as_me:5040: result: $ac_ct_AR" >&5
5041 echo "${ECHO_T}$ac_ct_AR" >&6
5042 else
5043   echo "$as_me:5043: result: no" >&5
5044 echo "${ECHO_T}no" >&6
5045 fi
5046
5047   AR=$ac_ct_AR
5048 else
5049   AR="$ac_cv_prog_AR"
5050 fi
5051
5052 echo "$as_me:5052: checking for options to update archives" >&5
5053 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5054 if test "${cf_cv_ar_flags+set}" = set; then
5055   echo $ECHO_N "(cached) $ECHO_C" >&6
5056 else
5057
5058         case "$cf_cv_system_name" in
5059         (*-msvc*)
5060                 cf_cv_ar_flags=''
5061                 cat >mk_static_lib.sh <<-EOF
5062                 #!$SHELL
5063                 MSVC_BIN="$AR"
5064                 out="\$1"
5065                 shift
5066                 exec \$MSVC_BIN -out:"\$out" \$@
5067                 EOF
5068                 chmod +x mk_static_lib.sh
5069                 AR=`pwd`/mk_static_lib.sh
5070                 ;;
5071         (*)
5072                 cf_cv_ar_flags=unknown
5073                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5074                 do
5075
5076                         # check if $ARFLAGS already contains this choice
5077                         if test "x$ARFLAGS" != "x" ; then
5078                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5079                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5080                                         cf_cv_ar_flags=
5081                                         break
5082                                 fi
5083                         fi
5084
5085                         rm -f "conftest.$ac_cv_objext"
5086                         rm -f conftest.a
5087
5088                         cat >"conftest.$ac_ext" <<EOF
5089 #line 5089 "configure"
5090 int     testdata[3] = { 123, 456, 789 };
5091 EOF
5092                         if { (eval echo "$as_me:5092: \"$ac_compile\"") >&5
5093   (eval $ac_compile) 2>&5
5094   ac_status=$?
5095   echo "$as_me:5095: \$? = $ac_status" >&5
5096   (exit "$ac_status"); } ; then
5097                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5098                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5099                                 if test -f conftest.a ; then
5100                                         cf_cv_ar_flags="$cf_ar_flags"
5101                                         break
5102                                 fi
5103                         else
5104                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5105
5106 echo "${as_me:-configure}:5106: testing cannot compile test-program ..." 1>&5
5107
5108                                 break
5109                         fi
5110                 done
5111                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5112                 ;;
5113         esac
5114
5115 fi
5116 echo "$as_me:5116: result: $cf_cv_ar_flags" >&5
5117 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5118
5119 if test -n "$ARFLAGS" ; then
5120         if test -n "$cf_cv_ar_flags" ; then
5121                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5122         fi
5123 else
5124         ARFLAGS=$cf_cv_ar_flags
5125 fi
5126
5127 echo "$as_me:5127: checking if you have specified an install-prefix" >&5
5128 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5129
5130 # Check whether --with-install-prefix or --without-install-prefix was given.
5131 if test "${with_install_prefix+set}" = set; then
5132   withval="$with_install_prefix"
5133   case "x$withval" in
5134         (xyes|xno)
5135                 ;;
5136         (*)     DESTDIR="$withval"
5137                 ;;
5138         esac
5139 fi;
5140 echo "$as_me:5140: result: $DESTDIR" >&5
5141 echo "${ECHO_T}$DESTDIR" >&6
5142
5143 ###############################################################################
5144
5145 # If we're cross-compiling, allow the user to override the tools and their
5146 # options.  The configure script is oriented toward identifying the host
5147 # compiler, etc., but we need a build compiler to generate parts of the source.
5148
5149 case "$cf_cv_system_name" in
5150 (*-msvc*)
5151         LDFLAGS="$LDFLAGS user32.lib"
5152         export LDFLAGS
5153         ;;
5154 esac
5155
5156 if test "$cross_compiling" = yes ; then
5157
5158         # defaults that we might want to override
5159         : ${BUILD_CFLAGS:=''}
5160         : ${BUILD_CPPFLAGS:=''}
5161         : ${BUILD_LDFLAGS:=''}
5162         : ${BUILD_LIBS:=''}
5163         : ${BUILD_EXEEXT:='$x'}
5164         : ${BUILD_OBJEXT:='o'}
5165
5166 # Check whether --with-build-cc or --without-build-cc was given.
5167 if test "${with_build_cc+set}" = set; then
5168   withval="$with_build_cc"
5169   BUILD_CC="$withval"
5170 else
5171   for ac_prog in gcc clang c99 c89 cc cl
5172 do
5173   # Extract the first word of "$ac_prog", so it can be a program name with args.
5174 set dummy $ac_prog; ac_word=$2
5175 echo "$as_me:5175: checking for $ac_word" >&5
5176 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5177 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5178   echo $ECHO_N "(cached) $ECHO_C" >&6
5179 else
5180   if test -n "$BUILD_CC"; then
5181   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5182 else
5183   ac_save_IFS=$IFS; IFS=$ac_path_separator
5184 ac_dummy="$PATH"
5185 for ac_dir in $ac_dummy; do
5186   IFS=$ac_save_IFS
5187   test -z "$ac_dir" && ac_dir=.
5188   $as_executable_p "$ac_dir/$ac_word" || continue
5189 ac_cv_prog_BUILD_CC="$ac_prog"
5190 echo "$as_me:5190: found $ac_dir/$ac_word" >&5
5191 break
5192 done
5193
5194 fi
5195 fi
5196 BUILD_CC=$ac_cv_prog_BUILD_CC
5197 if test -n "$BUILD_CC"; then
5198   echo "$as_me:5198: result: $BUILD_CC" >&5
5199 echo "${ECHO_T}$BUILD_CC" >&6
5200 else
5201   echo "$as_me:5201: result: no" >&5
5202 echo "${ECHO_T}no" >&6
5203 fi
5204
5205   test -n "$BUILD_CC" && break
5206 done
5207 test -n "$BUILD_CC" || BUILD_CC="none"
5208
5209 fi;
5210         echo "$as_me:5210: checking for native build C compiler" >&5
5211 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5212         echo "$as_me:5212: result: $BUILD_CC" >&5
5213 echo "${ECHO_T}$BUILD_CC" >&6
5214
5215         echo "$as_me:5215: checking for native build C preprocessor" >&5
5216 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5217
5218 # Check whether --with-build-cpp or --without-build-cpp was given.
5219 if test "${with_build_cpp+set}" = set; then
5220   withval="$with_build_cpp"
5221   BUILD_CPP="$withval"
5222 else
5223   BUILD_CPP='${BUILD_CC} -E'
5224 fi;
5225         echo "$as_me:5225: result: $BUILD_CPP" >&5
5226 echo "${ECHO_T}$BUILD_CPP" >&6
5227
5228         echo "$as_me:5228: checking for native build C flags" >&5
5229 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5230
5231 # Check whether --with-build-cflags or --without-build-cflags was given.
5232 if test "${with_build_cflags+set}" = set; then
5233   withval="$with_build_cflags"
5234   BUILD_CFLAGS="$withval"
5235 fi;
5236         echo "$as_me:5236: result: $BUILD_CFLAGS" >&5
5237 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5238
5239         echo "$as_me:5239: checking for native build C preprocessor-flags" >&5
5240 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5241
5242 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5243 if test "${with_build_cppflags+set}" = set; then
5244   withval="$with_build_cppflags"
5245   BUILD_CPPFLAGS="$withval"
5246 fi;
5247         echo "$as_me:5247: result: $BUILD_CPPFLAGS" >&5
5248 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5249
5250         echo "$as_me:5250: checking for native build linker-flags" >&5
5251 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5252
5253 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5254 if test "${with_build_ldflags+set}" = set; then
5255   withval="$with_build_ldflags"
5256   BUILD_LDFLAGS="$withval"
5257 fi;
5258         echo "$as_me:5258: result: $BUILD_LDFLAGS" >&5
5259 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5260
5261         echo "$as_me:5261: checking for native build linker-libraries" >&5
5262 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5263
5264 # Check whether --with-build-libs or --without-build-libs was given.
5265 if test "${with_build_libs+set}" = set; then
5266   withval="$with_build_libs"
5267   BUILD_LIBS="$withval"
5268 fi;
5269         echo "$as_me:5269: result: $BUILD_LIBS" >&5
5270 echo "${ECHO_T}$BUILD_LIBS" >&6
5271
5272         # this assumes we're on Unix.
5273         BUILD_EXEEXT=
5274         BUILD_OBJEXT=o
5275
5276         : ${BUILD_CC:='${CC}'}
5277
5278         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5279                 { { echo "$as_me:5279: error: Cross-build requires two compilers.
5280 Use --with-build-cc to specify the native compiler." >&5
5281 echo "$as_me: error: Cross-build requires two compilers.
5282 Use --with-build-cc to specify the native compiler." >&2;}
5283    { (exit 1); exit 1; }; }
5284         fi
5285
5286 else
5287         : ${BUILD_CC:='${CC}'}
5288         : ${BUILD_CPP:='${CPP}'}
5289         : ${BUILD_CFLAGS:='${CFLAGS}'}
5290         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5291         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5292         : ${BUILD_LIBS:='${LIBS}'}
5293         : ${BUILD_EXEEXT:='$x'}
5294         : ${BUILD_OBJEXT:='o'}
5295 fi
5296
5297 ###############################################################################
5298
5299 ### Options to allow the user to specify the set of libraries which are used.
5300 ### Use "--without-normal --with-shared" to allow the default model to be
5301 ### shared, for example.
5302 cf_list_models=""
5303
5304 echo "$as_me:5304: checking if libtool -version-number should be used" >&5
5305 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5306
5307 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5308 if test "${enable_libtool_version+set}" = set; then
5309   enableval="$enable_libtool_version"
5310   test "$enableval" != no && enableval=yes
5311         if test "$enableval" != "yes" ; then
5312     cf_libtool_version=no
5313         else
5314                 cf_libtool_version=yes
5315         fi
5316 else
5317   enableval=yes
5318         cf_libtool_version=yes
5319
5320 fi;
5321 echo "$as_me:5321: result: $cf_libtool_version" >&5
5322 echo "${ECHO_T}$cf_libtool_version" >&6
5323
5324 if test "$cf_libtool_version" = yes ; then
5325         LIBTOOL_VERSION="-version-number"
5326 else
5327         LIBTOOL_VERSION="-version-info"
5328         case "x$VERSION" in
5329         (x)
5330                 { echo "$as_me:5330: WARNING: VERSION was not set" >&5
5331 echo "$as_me: WARNING: VERSION was not set" >&2;}
5332                 ;;
5333         (x*.*.*)
5334                 ABI_VERSION="$VERSION"
5335                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5336
5337 echo "${as_me:-configure}:5337: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5338
5339                 ;;
5340         (x*:*:*)
5341                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5342                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5343
5344 echo "${as_me:-configure}:5344: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5345
5346                 ;;
5347         (*)
5348                 { echo "$as_me:5348: WARNING: unexpected VERSION value: $VERSION" >&5
5349 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5350                 ;;
5351         esac
5352 fi
5353
5354 LIBTOOL=
5355
5356 # common library maintenance symbols that are convenient for libtool scripts:
5357 LIB_CREATE='${AR} -cr'
5358 LIB_OBJECT='${OBJECTS}'
5359 LIB_SUFFIX=.a
5360 LIB_PREP="$RANLIB"
5361
5362 # symbols used to prop libtool up to enable it to determine what it should be
5363 # doing:
5364 LIB_CLEAN=
5365 LIB_COMPILE=
5366 LIB_LINK='${CC}'
5367 LIB_INSTALL=
5368 LIB_UNINSTALL=
5369
5370 echo "$as_me:5370: checking if you want to build libraries with libtool" >&5
5371 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5372
5373 # Check whether --with-libtool or --without-libtool was given.
5374 if test "${with_libtool+set}" = set; then
5375   withval="$with_libtool"
5376   with_libtool=$withval
5377 else
5378   with_libtool=no
5379 fi;
5380 echo "$as_me:5380: result: $with_libtool" >&5
5381 echo "${ECHO_T}$with_libtool" >&6
5382 if test "$with_libtool" != "no"; then
5383
5384         if test "$with_libtool" != "yes" ; then
5385
5386 if test "x$prefix" != xNONE; then
5387         cf_path_syntax="$prefix"
5388 else
5389         cf_path_syntax="$ac_default_prefix"
5390 fi
5391
5392 case ".$with_libtool" in
5393 (.\$\(*\)*|.\'*\'*)
5394         ;;
5395 (..|./*|.\\*)
5396         ;;
5397 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5398         ;;
5399 (.\$\{*prefix\}*|.\$\{*dir\}*)
5400         eval with_libtool="$with_libtool"
5401         case ".$with_libtool" in
5402         (.NONE/*)
5403                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5404                 ;;
5405         esac
5406         ;;
5407 (.no|.NONE/*)
5408         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5409         ;;
5410 (*)
5411         { { echo "$as_me:5411: error: expected a pathname, not \"$with_libtool\"" >&5
5412 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5413    { (exit 1); exit 1; }; }
5414         ;;
5415 esac
5416
5417                 LIBTOOL=$with_libtool
5418         else
5419                 if test -n "$ac_tool_prefix"; then
5420   for ac_prog in libtool glibtool
5421   do
5422     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5423 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5424 echo "$as_me:5424: checking for $ac_word" >&5
5425 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5426 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5427   echo $ECHO_N "(cached) $ECHO_C" >&6
5428 else
5429   if test -n "$LIBTOOL"; then
5430   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5431 else
5432   ac_save_IFS=$IFS; IFS=$ac_path_separator
5433 ac_dummy="$PATH"
5434 for ac_dir in $ac_dummy; do
5435   IFS=$ac_save_IFS
5436   test -z "$ac_dir" && ac_dir=.
5437   $as_executable_p "$ac_dir/$ac_word" || continue
5438 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5439 echo "$as_me:5439: found $ac_dir/$ac_word" >&5
5440 break
5441 done
5442
5443 fi
5444 fi
5445 LIBTOOL=$ac_cv_prog_LIBTOOL
5446 if test -n "$LIBTOOL"; then
5447   echo "$as_me:5447: result: $LIBTOOL" >&5
5448 echo "${ECHO_T}$LIBTOOL" >&6
5449 else
5450   echo "$as_me:5450: result: no" >&5
5451 echo "${ECHO_T}no" >&6
5452 fi
5453
5454     test -n "$LIBTOOL" && break
5455   done
5456 fi
5457 if test -z "$LIBTOOL"; then
5458   ac_ct_LIBTOOL=$LIBTOOL
5459   for ac_prog in libtool glibtool
5460 do
5461   # Extract the first word of "$ac_prog", so it can be a program name with args.
5462 set dummy $ac_prog; ac_word=$2
5463 echo "$as_me:5463: checking for $ac_word" >&5
5464 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5465 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5466   echo $ECHO_N "(cached) $ECHO_C" >&6
5467 else
5468   if test -n "$ac_ct_LIBTOOL"; then
5469   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5470 else
5471   ac_save_IFS=$IFS; IFS=$ac_path_separator
5472 ac_dummy="$PATH"
5473 for ac_dir in $ac_dummy; do
5474   IFS=$ac_save_IFS
5475   test -z "$ac_dir" && ac_dir=.
5476   $as_executable_p "$ac_dir/$ac_word" || continue
5477 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5478 echo "$as_me:5478: found $ac_dir/$ac_word" >&5
5479 break
5480 done
5481
5482 fi
5483 fi
5484 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5485 if test -n "$ac_ct_LIBTOOL"; then
5486   echo "$as_me:5486: result: $ac_ct_LIBTOOL" >&5
5487 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5488 else
5489   echo "$as_me:5489: result: no" >&5
5490 echo "${ECHO_T}no" >&6
5491 fi
5492
5493   test -n "$ac_ct_LIBTOOL" && break
5494 done
5495 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5496
5497   LIBTOOL=$ac_ct_LIBTOOL
5498 fi
5499
5500 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5501 then
5502         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.].*//'`
5503 else
5504         cf_cv_libtool_version=
5505 fi
5506 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5507
5508                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5509                 then
5510
5511 unset ac_cv_prog_ac_ct_LIBTOOL
5512 unset ac_ct_LIBTOOL
5513 unset LIBTOOL
5514
5515                         if test -n "$ac_tool_prefix"; then
5516   for ac_prog in glibtool
5517   do
5518     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5519 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5520 echo "$as_me:5520: checking for $ac_word" >&5
5521 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5522 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5523   echo $ECHO_N "(cached) $ECHO_C" >&6
5524 else
5525   if test -n "$LIBTOOL"; then
5526   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5527 else
5528   ac_save_IFS=$IFS; IFS=$ac_path_separator
5529 ac_dummy="$PATH"
5530 for ac_dir in $ac_dummy; do
5531   IFS=$ac_save_IFS
5532   test -z "$ac_dir" && ac_dir=.
5533   $as_executable_p "$ac_dir/$ac_word" || continue
5534 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5535 echo "$as_me:5535: found $ac_dir/$ac_word" >&5
5536 break
5537 done
5538
5539 fi
5540 fi
5541 LIBTOOL=$ac_cv_prog_LIBTOOL
5542 if test -n "$LIBTOOL"; then
5543   echo "$as_me:5543: result: $LIBTOOL" >&5
5544 echo "${ECHO_T}$LIBTOOL" >&6
5545 else
5546   echo "$as_me:5546: result: no" >&5
5547 echo "${ECHO_T}no" >&6
5548 fi
5549
5550     test -n "$LIBTOOL" && break
5551   done
5552 fi
5553 if test -z "$LIBTOOL"; then
5554   ac_ct_LIBTOOL=$LIBTOOL
5555   for ac_prog in glibtool
5556 do
5557   # Extract the first word of "$ac_prog", so it can be a program name with args.
5558 set dummy $ac_prog; ac_word=$2
5559 echo "$as_me:5559: checking for $ac_word" >&5
5560 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5561 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5562   echo $ECHO_N "(cached) $ECHO_C" >&6
5563 else
5564   if test -n "$ac_ct_LIBTOOL"; then
5565   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5566 else
5567   ac_save_IFS=$IFS; IFS=$ac_path_separator
5568 ac_dummy="$PATH"
5569 for ac_dir in $ac_dummy; do
5570   IFS=$ac_save_IFS
5571   test -z "$ac_dir" && ac_dir=.
5572   $as_executable_p "$ac_dir/$ac_word" || continue
5573 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5574 echo "$as_me:5574: found $ac_dir/$ac_word" >&5
5575 break
5576 done
5577
5578 fi
5579 fi
5580 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5581 if test -n "$ac_ct_LIBTOOL"; then
5582   echo "$as_me:5582: result: $ac_ct_LIBTOOL" >&5
5583 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5584 else
5585   echo "$as_me:5585: result: no" >&5
5586 echo "${ECHO_T}no" >&6
5587 fi
5588
5589   test -n "$ac_ct_LIBTOOL" && break
5590 done
5591 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5592
5593   LIBTOOL=$ac_ct_LIBTOOL
5594 fi
5595
5596 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5597 then
5598         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.].*//'`
5599 else
5600         cf_cv_libtool_version=
5601 fi
5602 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5603
5604                 fi
5605         fi
5606         if test -z "$LIBTOOL" ; then
5607                 { { echo "$as_me:5607: error: Cannot find libtool" >&5
5608 echo "$as_me: error: Cannot find libtool" >&2;}
5609    { (exit 1); exit 1; }; }
5610         fi
5611         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5612         LIB_OBJECT='${OBJECTS:.o=.lo}'
5613         LIB_SUFFIX=.la
5614         LIB_CLEAN='${LIBTOOL} --mode=clean'
5615         LIB_COMPILE='${LIBTOOL} --mode=compile'
5616         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5617         LIB_INSTALL='${LIBTOOL} --mode=install'
5618         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5619         LIB_PREP=:
5620
5621 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5622 then
5623         echo "$as_me:5623: checking version of $LIBTOOL" >&5
5624 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5625
5626 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5627 then
5628         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.].*//'`
5629 else
5630         cf_cv_libtool_version=
5631 fi
5632 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5633
5634         echo "$as_me:5634: result: $cf_cv_libtool_version" >&5
5635 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5636         if test -n "$cf_cv_libtool_version"
5637         then
5638                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5639                 case "x$cf_check_libtool_version" in
5640                 (*...GNU-libtool...*)
5641                         ;;
5642                 (*)
5643                         { { echo "$as_me:5643: error: This is not GNU libtool" >&5
5644 echo "$as_me: error: This is not GNU libtool" >&2;}
5645    { (exit 1); exit 1; }; }
5646                         ;;
5647                 esac
5648         else
5649                 { { echo "$as_me:5649: error: No version found for $LIBTOOL" >&5
5650 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5651    { (exit 1); exit 1; }; }
5652         fi
5653 else
5654         { { echo "$as_me:5654: error: GNU libtool has not been found" >&5
5655 echo "$as_me: error: GNU libtool has not been found" >&2;}
5656    { (exit 1); exit 1; }; }
5657 fi
5658
5659         # special hack to add -no-undefined (which libtool should do for itself)
5660         LT_UNDEF=
5661         case "$cf_cv_system_name" in
5662         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5663                 LT_UNDEF=-no-undefined
5664                 ;;
5665         esac
5666
5667         # special hack to add --tag option for C++ compiler
5668         case "$cf_cv_libtool_version" in
5669         (1.[5-9]*|[2-9].[0-9.a-z]*)
5670                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5671                 LIBTOOL="$LIBTOOL --tag=CC"
5672                 ;;
5673         (*)
5674                 LIBTOOL_CXX="$LIBTOOL"
5675                 ;;
5676         esac
5677 else
5678         LIBTOOL=""
5679         LIBTOOL_CXX=""
5680 fi
5681
5682 test -z "$LIBTOOL" && ECHO_LT=
5683
5684 if test "$with_libtool" != "no" ; then
5685
5686 cf_list_models="$cf_list_models libtool"
5687
5688 else
5689
5690 echo "$as_me:5690: checking if you want to build shared libraries" >&5
5691 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5692
5693 # Check whether --with-shared or --without-shared was given.
5694 if test "${with_shared+set}" = set; then
5695   withval="$with_shared"
5696   with_shared=$withval
5697 else
5698   with_shared=no
5699 fi;
5700 echo "$as_me:5700: result: $with_shared" >&5
5701 echo "${ECHO_T}$with_shared" >&6
5702 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5703
5704 echo "$as_me:5704: checking if you want to build static libraries" >&5
5705 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5706
5707 # Check whether --with-normal or --without-normal was given.
5708 if test "${with_normal+set}" = set; then
5709   withval="$with_normal"
5710   with_normal=$withval
5711 else
5712   with_normal=yes
5713 fi;
5714 echo "$as_me:5714: result: $with_normal" >&5
5715 echo "${ECHO_T}$with_normal" >&6
5716 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5717
5718 echo "$as_me:5718: checking if you want to build debug libraries" >&5
5719 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5720
5721 # Check whether --with-debug or --without-debug was given.
5722 if test "${with_debug+set}" = set; then
5723   withval="$with_debug"
5724   with_debug=$withval
5725 else
5726   with_debug=yes
5727 fi;
5728 echo "$as_me:5728: result: $with_debug" >&5
5729 echo "${ECHO_T}$with_debug" >&6
5730 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5731
5732 echo "$as_me:5732: checking if you want to build profiling libraries" >&5
5733 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5734
5735 # Check whether --with-profile or --without-profile was given.
5736 if test "${with_profile+set}" = set; then
5737   withval="$with_profile"
5738   with_profile=$withval
5739 else
5740   with_profile=no
5741 fi;
5742 echo "$as_me:5742: result: $with_profile" >&5
5743 echo "${ECHO_T}$with_profile" >&6
5744 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5745
5746 fi
5747
5748 if test "X$cf_with_cxx_binding" != Xno; then
5749 if test "x$with_shared" = "xyes"; then
5750 echo "$as_me:5750: checking if you want to build C++ shared libraries" >&5
5751 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5752
5753 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5754 if test "${with_cxx_shared+set}" = set; then
5755   withval="$with_cxx_shared"
5756   with_shared_cxx=$withval
5757 else
5758   with_shared_cxx=no
5759 fi;
5760 echo "$as_me:5760: result: $with_shared_cxx" >&5
5761 echo "${ECHO_T}$with_shared_cxx" >&6
5762 fi
5763 fi
5764
5765 ###############################################################################
5766
5767 echo "$as_me:5767: checking for specified models" >&5
5768 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5769 test -z "$cf_list_models" && cf_list_models=normal
5770 test "$with_libtool" != "no" && cf_list_models=libtool
5771 echo "$as_me:5771: result: $cf_list_models" >&5
5772 echo "${ECHO_T}$cf_list_models" >&6
5773
5774 ### Use the first model as the default, and save its suffix for use in building
5775 ### up test-applications.
5776 echo "$as_me:5776: checking for default model" >&5
5777 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5778 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5779 echo "$as_me:5779: result: $DFT_LWR_MODEL" >&5
5780 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5781
5782 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5783
5784 TICS_NAME=tic
5785
5786 TINFO_NAME=tinfo
5787
5788 LIB_NAME=ncurses
5789
5790 LIB_DIR=../lib
5791 LIB_2ND=../../lib
5792
5793 echo "$as_me:5793: checking if you want to have a library-prefix" >&5
5794 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5795
5796 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5797 if test "${with_lib_prefix+set}" = set; then
5798   withval="$with_lib_prefix"
5799   with_lib_prefix=$withval
5800 else
5801   with_lib_prefix=auto
5802 fi;
5803 echo "$as_me:5803: result: $with_lib_prefix" >&5
5804 echo "${ECHO_T}$with_lib_prefix" >&6
5805
5806 if test "$with_lib_prefix" = auto
5807 then
5808
5809         case "$cf_cv_system_name" in
5810         (OS/2*|os2*)
5811                 if test "$DFT_LWR_MODEL" = libtool; then
5812                         LIB_PREFIX='lib'
5813                 else
5814                         LIB_PREFIX=''
5815                 fi
5816                 ;;
5817         (*-msvc*)
5818                 LIB_PREFIX=''
5819                 ;;
5820         (*)     LIB_PREFIX='lib'
5821                 ;;
5822         esac
5823 cf_prefix=$LIB_PREFIX
5824
5825 elif test "$with_lib_prefix" = no
5826 then
5827         LIB_PREFIX=
5828 else
5829         LIB_PREFIX=$with_lib_prefix
5830 fi
5831
5832 LIB_SUFFIX=
5833
5834         echo "$as_me:5834: checking for PATH separator" >&5
5835 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5836         case "$cf_cv_system_name" in
5837         (os2*)  PATH_SEPARATOR=';'  ;;
5838         (*)     ${PATH_SEPARATOR:=':'}  ;;
5839         esac
5840
5841         echo "$as_me:5841: result: $PATH_SEPARATOR" >&5
5842 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5843
5844 ###############################################################################
5845
5846 echo "$as_me:5846: checking if you want to build a separate terminfo library" >&5
5847 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5848
5849 # Check whether --with-termlib or --without-termlib was given.
5850 if test "${with_termlib+set}" = set; then
5851   withval="$with_termlib"
5852   with_termlib=$withval
5853 else
5854   with_termlib=no
5855 fi;
5856 echo "$as_me:5856: result: $with_termlib" >&5
5857 echo "${ECHO_T}$with_termlib" >&6
5858
5859 echo "$as_me:5859: checking if you want to build a separate tic library" >&5
5860 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5861
5862 # Check whether --with-ticlib or --without-ticlib was given.
5863 if test "${with_ticlib+set}" = set; then
5864   withval="$with_ticlib"
5865   with_ticlib=$withval
5866 else
5867   with_ticlib=no
5868 fi;
5869 echo "$as_me:5869: result: $with_ticlib" >&5
5870 echo "${ECHO_T}$with_ticlib" >&6
5871
5872 if test X"$CC_G_OPT" = X"" ; then
5873         CC_G_OPT='-g'
5874         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5875 fi
5876
5877 if test X"$CXX_G_OPT" = X"" ; then
5878         CXX_G_OPT='-g'
5879         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5880 fi
5881
5882 echo "$as_me:5882: checking for default loader flags" >&5
5883 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5884 case "$DFT_LWR_MODEL" in
5885 (libtool) LD_MODEL=''   ;;
5886 (normal)  LD_MODEL=''   ;;
5887 (debug)   LD_MODEL=$CC_G_OPT ;;
5888 (profile) LD_MODEL='-pg';;
5889 (shared)  LD_MODEL=''   ;;
5890 esac
5891 echo "$as_me:5891: result: $LD_MODEL" >&5
5892 echo "${ECHO_T}$LD_MODEL" >&6
5893
5894 case "$DFT_LWR_MODEL" in
5895 (shared)
5896
5897 echo "$as_me:5897: checking if rpath option should be used" >&5
5898 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5899
5900 # Check whether --enable-rpath or --disable-rpath was given.
5901 if test "${enable_rpath+set}" = set; then
5902   enableval="$enable_rpath"
5903   cf_cv_enable_rpath=$enableval
5904 else
5905   cf_cv_enable_rpath=no
5906 fi;
5907 echo "$as_me:5907: result: $cf_cv_enable_rpath" >&5
5908 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5909
5910 echo "$as_me:5910: checking if shared libraries should be relinked during install" >&5
5911 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5912
5913 # Check whether --enable-relink or --disable-relink was given.
5914 if test "${enable_relink+set}" = set; then
5915   enableval="$enable_relink"
5916   cf_cv_do_relink=$enableval
5917 else
5918   cf_cv_do_relink=yes
5919 fi;
5920 echo "$as_me:5920: result: $cf_cv_do_relink" >&5
5921 echo "${ECHO_T}$cf_cv_do_relink" >&6
5922         ;;
5923 esac
5924
5925 # we will build libraries one-level down.
5926 rel_builddir=..
5927
5928 LD_RPATH_OPT=
5929 if test "x$cf_cv_enable_rpath" != xno
5930 then
5931         echo "$as_me:5931: checking for an rpath option" >&5
5932 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5933         case "$cf_cv_system_name" in
5934         (irix*)
5935                 if test "$GCC" = yes; then
5936                         LD_RPATH_OPT="-Wl,-rpath,"
5937                 else
5938                         LD_RPATH_OPT="-rpath "
5939                 fi
5940                 ;;
5941         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5942                 LD_RPATH_OPT="-Wl,-rpath,"
5943                 ;;
5944         (openbsd[2-9].*|mirbsd*)
5945                 LD_RPATH_OPT="-Wl,-rpath,"
5946                 ;;
5947         (dragonfly*)
5948                 LD_RPATH_OPT="-rpath "
5949                 ;;
5950         (netbsd*)
5951                 LD_RPATH_OPT="-Wl,-rpath,"
5952                 ;;
5953         (osf*|mls+*)
5954                 LD_RPATH_OPT="-rpath "
5955                 ;;
5956         (solaris2*)
5957                 LD_RPATH_OPT="-R"
5958                 ;;
5959         (*)
5960                 ;;
5961         esac
5962         echo "$as_me:5962: result: $LD_RPATH_OPT" >&5
5963 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5964
5965         case "x$LD_RPATH_OPT" in
5966         (x-R*)
5967                 echo "$as_me:5967: checking if we need a space after rpath option" >&5
5968 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5969                 cf_save_LIBS="$LIBS"
5970
5971 cf_add_libs="$LIBS"
5972 # reverse order
5973 cf_add_0lib=
5974 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5975 # filter duplicates
5976 for cf_add_1lib in $cf_add_0lib; do
5977         for cf_add_2lib in $cf_add_libs; do
5978                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5979                         cf_add_1lib=
5980                         break
5981                 fi
5982         done
5983         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5984 done
5985 LIBS="$cf_add_libs"
5986
5987                 cat >"conftest.$ac_ext" <<_ACEOF
5988 #line 5988 "configure"
5989 #include "confdefs.h"
5990
5991 int
5992 main (void)
5993 {
5994
5995   ;
5996   return 0;
5997 }
5998 _ACEOF
5999 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6000 if { (eval echo "$as_me:6000: \"$ac_link\"") >&5
6001   (eval $ac_link) 2>&5
6002   ac_status=$?
6003   echo "$as_me:6003: \$? = $ac_status" >&5
6004   (exit "$ac_status"); } &&
6005          { ac_try='test -s "conftest$ac_exeext"'
6006   { (eval echo "$as_me:6006: \"$ac_try\"") >&5
6007   (eval $ac_try) 2>&5
6008   ac_status=$?
6009   echo "$as_me:6009: \$? = $ac_status" >&5
6010   (exit "$ac_status"); }; }; then
6011   cf_rpath_space=no
6012 else
6013   echo "$as_me: failed program was:" >&5
6014 cat "conftest.$ac_ext" >&5
6015 cf_rpath_space=yes
6016 fi
6017 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6018                 LIBS="$cf_save_LIBS"
6019                 echo "$as_me:6019: result: $cf_rpath_space" >&5
6020 echo "${ECHO_T}$cf_rpath_space" >&6
6021                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6022                 ;;
6023         esac
6024 fi
6025
6026         RM_SHARED_OPTS=
6027         LOCAL_LDFLAGS=
6028         LOCAL_LDFLAGS2=
6029         LD_SHARED_OPTS=
6030         INSTALL_LIB="-m 644"
6031         : ${rel_builddir:=.}
6032
6033         shlibdir=$libdir
6034
6035         MAKE_DLLS="#"
6036
6037         cf_cv_do_symlinks=no
6038         cf_ld_rpath_opt=
6039         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6040
6041         echo "$as_me:6041: checking if release/abi version should be used for shared libs" >&5
6042 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6043
6044 # Check whether --with-shlib-version or --without-shlib-version was given.
6045 if test "${with_shlib_version+set}" = set; then
6046   withval="$with_shlib_version"
6047   test -z "$withval" && withval=auto
6048         case "$withval" in
6049         (yes)
6050                 cf_cv_shlib_version=auto
6051                 ;;
6052         (rel|abi|auto)
6053                 cf_cv_shlib_version=$withval
6054                 ;;
6055         (*)
6056                 echo "$as_me:6056: result: $withval" >&5
6057 echo "${ECHO_T}$withval" >&6
6058                 { { echo "$as_me:6058: error: option value must be one of: rel, abi, or auto" >&5
6059 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6060    { (exit 1); exit 1; }; }
6061                 ;;
6062         esac
6063
6064 else
6065   cf_cv_shlib_version=auto
6066 fi;
6067         echo "$as_me:6067: result: $cf_cv_shlib_version" >&5
6068 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6069
6070         cf_cv_rm_so_locs=no
6071         cf_try_cflags=
6072
6073         # Some less-capable ports of gcc support only -fpic
6074         CC_SHARED_OPTS=
6075
6076         cf_try_fPIC=no
6077         if test "$GCC" = yes
6078         then
6079                 cf_try_fPIC=yes
6080         else
6081                 case "$cf_cv_system_name" in
6082                 (*linux*)       # e.g., PGI compiler
6083                         cf_try_fPIC=yes
6084                         ;;
6085                 esac
6086         fi
6087
6088         if test "$cf_try_fPIC" = yes
6089         then
6090                 echo "$as_me:6090: checking which $CC option to use" >&5
6091 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6092                 cf_save_CFLAGS="$CFLAGS"
6093                 for CC_SHARED_OPTS in -fPIC -fpic ''
6094                 do
6095                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6096                         cat >"conftest.$ac_ext" <<_ACEOF
6097 #line 6097 "configure"
6098 #include "confdefs.h"
6099 #include <stdio.h>
6100 int
6101 main (void)
6102 {
6103 int x = 1
6104   ;
6105   return 0;
6106 }
6107 _ACEOF
6108 rm -f "conftest.$ac_objext"
6109 if { (eval echo "$as_me:6109: \"$ac_compile\"") >&5
6110   (eval $ac_compile) 2>&5
6111   ac_status=$?
6112   echo "$as_me:6112: \$? = $ac_status" >&5
6113   (exit "$ac_status"); } &&
6114          { ac_try='test -s "conftest.$ac_objext"'
6115   { (eval echo "$as_me:6115: \"$ac_try\"") >&5
6116   (eval $ac_try) 2>&5
6117   ac_status=$?
6118   echo "$as_me:6118: \$? = $ac_status" >&5
6119   (exit "$ac_status"); }; }; then
6120   break
6121 else
6122   echo "$as_me: failed program was:" >&5
6123 cat "conftest.$ac_ext" >&5
6124 fi
6125 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6126                 done
6127                 echo "$as_me:6127: result: $CC_SHARED_OPTS" >&5
6128 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6129                 CFLAGS="$cf_save_CFLAGS"
6130         fi
6131
6132         cf_cv_shlib_version_infix=no
6133
6134         case "$cf_cv_system_name" in
6135         (aix4.3-9*|aix[5-7]*)
6136                 if test "$GCC" = yes; then
6137                         CC_SHARED_OPTS='-Wl,-brtl'
6138                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6139                 else
6140                         CC_SHARED_OPTS='-brtl'
6141                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6142                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6143                 fi
6144                 ;;
6145         (beos*)
6146                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6147                 ;;
6148         (cygwin*)
6149                 CC_SHARED_OPTS=
6150                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6151                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6152                 cf_cv_shlib_version=cygdll
6153                 cf_cv_shlib_version_infix=cygdll
6154                 shlibdir=$bindir
6155                 MAKE_DLLS=
6156                 cat >mk_shared_lib.sh <<-CF_EOF
6157                 #!$SHELL
6158                 SHARED_LIB=\$1
6159                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6160                 shift
6161                 cat <<-EOF
6162                 Linking shared library
6163                 ** SHARED_LIB \$SHARED_LIB
6164                 ** IMPORT_LIB \$IMPORT_LIB
6165 EOF
6166                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6167 CF_EOF
6168                 chmod +x mk_shared_lib.sh
6169                 ;;
6170         (msys*)
6171                 CC_SHARED_OPTS=
6172                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6173                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6174                 cf_cv_shlib_version=msysdll
6175                 cf_cv_shlib_version_infix=msysdll
6176                 shlibdir=$bindir
6177                 MAKE_DLLS=
6178                 cat >mk_shared_lib.sh <<-CF_EOF
6179                 #!$SHELL
6180                 SHARED_LIB=\$1
6181                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6182                 shift
6183                 cat <<-EOF
6184                 Linking shared library
6185                 ** SHARED_LIB \$SHARED_LIB
6186                 ** IMPORT_LIB \$IMPORT_LIB
6187 EOF
6188                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6189 CF_EOF
6190                 chmod +x mk_shared_lib.sh
6191                 ;;
6192         (darwin*)
6193                 cf_try_cflags="no-cpp-precomp"
6194                 CC_SHARED_OPTS="-dynamic"
6195                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6196                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6197                 cf_cv_shlib_version_infix=yes
6198                 echo "$as_me:6198: checking if ld -search_paths_first works" >&5
6199 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6200 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6201   echo $ECHO_N "(cached) $ECHO_C" >&6
6202 else
6203
6204                         cf_save_LDFLAGS=$LDFLAGS
6205                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6206                         cat >"conftest.$ac_ext" <<_ACEOF
6207 #line 6207 "configure"
6208 #include "confdefs.h"
6209
6210 int
6211 main (void)
6212 {
6213 int i;
6214   ;
6215   return 0;
6216 }
6217 _ACEOF
6218 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6219 if { (eval echo "$as_me:6219: \"$ac_link\"") >&5
6220   (eval $ac_link) 2>&5
6221   ac_status=$?
6222   echo "$as_me:6222: \$? = $ac_status" >&5
6223   (exit "$ac_status"); } &&
6224          { ac_try='test -s "conftest$ac_exeext"'
6225   { (eval echo "$as_me:6225: \"$ac_try\"") >&5
6226   (eval $ac_try) 2>&5
6227   ac_status=$?
6228   echo "$as_me:6228: \$? = $ac_status" >&5
6229   (exit "$ac_status"); }; }; then
6230   cf_cv_ldflags_search_paths_first=yes
6231 else
6232   echo "$as_me: failed program was:" >&5
6233 cat "conftest.$ac_ext" >&5
6234 cf_cv_ldflags_search_paths_first=no
6235 fi
6236 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6237                                 LDFLAGS=$cf_save_LDFLAGS
6238 fi
6239 echo "$as_me:6239: result: $cf_cv_ldflags_search_paths_first" >&5
6240 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6241                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6242                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6243                 fi
6244                 ;;
6245         (haiku*)
6246
6247         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6248         if test "$cf_cv_shlib_version" = rel; then
6249                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6250         else
6251                 cf_cv_shared_soname='`basename $@`'
6252         fi
6253
6254                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6255                 ;;
6256         (hpux[7-8]*)
6257                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6258                 if test "$GCC" != yes; then
6259                         CC_SHARED_OPTS='+Z'
6260                 fi
6261                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6262                 INSTALL_LIB="-m 555"
6263                 ;;
6264         (hpux*)
6265                 # (tested with gcc 2.7.2 -- I don't have c89)
6266                 if test "$GCC" = yes; then
6267                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6268                 else
6269                         CC_SHARED_OPTS='+Z'
6270                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6271                 fi
6272                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6273                 # HP-UX shared libraries must be executable, and should be
6274                 # readonly to exploit a quirk in the memory manager.
6275                 INSTALL_LIB="-m 555"
6276                 ;;
6277         (interix*)
6278                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6279                 if test "$cf_cv_shlib_version" = rel; then
6280                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6281                 else
6282                         cf_shared_soname='`basename $@`'
6283                 fi
6284                 CC_SHARED_OPTS=
6285                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6286                 ;;
6287         (irix*)
6288                 if test "$cf_cv_enable_rpath" = yes ; then
6289                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6290                 fi
6291                 # tested with IRIX 5.2 and 'cc'.
6292                 if test "$GCC" != yes; then
6293                         CC_SHARED_OPTS='-KPIC'
6294                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6295                 else
6296                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6297                 fi
6298                 cf_cv_rm_so_locs=yes
6299                 ;;
6300         (linux*|gnu*|k*bsd*-gnu)
6301                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6302                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6303                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6304                 fi
6305                 if test "$cf_cv_enable_rpath" = yes ; then
6306                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6307                 fi
6308
6309         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6310         if test "$cf_cv_shlib_version" = rel; then
6311                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6312         else
6313                 cf_cv_shared_soname='`basename $@`'
6314         fi
6315
6316                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6317                 ;;
6318         (mingw*msvc*)
6319                 cf_cv_shlib_version=msvcdll
6320                 cf_cv_shlib_version_infix=msvcdll
6321                 shlibdir=$bindir
6322                 MAKE_DLLS=
6323                 if test "$DFT_LWR_MODEL" = "shared" ; then
6324                         LOCAL_LDFLAGS="-link -dll"
6325                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6326                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6327                 fi
6328                 CC_SHARED_OPTS=
6329                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6330                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6331                 cat >mk_shared_lib.sh <<-CF_EOF
6332                 #!$SHELL
6333                 SHARED_LIB=\$1
6334                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6335                 shift
6336                 my_ld=\$1
6337                 shift
6338                 cat <<-EOF
6339                 Linking shared library
6340                 ** SHARED LIB \$SHARED_LIB
6341                 ** IMPORT_LIB \$IMPORT_LIB
6342 EOF
6343                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6344                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6345                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6346 CF_EOF
6347                 chmod +x mk_shared_lib.sh
6348                 cat >mk_prog.sh <<-CF_EOF
6349                 #!$SHELL
6350                 shift
6351                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6352                 LD="$LD"
6353                 clopts=()
6354                 ldopts=("/subsystem:console")
6355                 libs=()
6356                 isdll=0
6357                 while test \$# -gt 0; do
6358                         case "\$1" in
6359                                 -link)
6360                                         # ignore -link argument
6361                                         ;;
6362                                 -M[TD] | -M[TD]d)
6363                                         # ignore runtime-library option
6364                                         ;;
6365                                 -dll)
6366                                         isdll=1
6367                                         ;;
6368                                 -W* | -w*)
6369                                         # ignore warnings
6370                                         ;;
6371                                 -D*)
6372                                         clopts+=("\$1")
6373                                         ;;
6374                                 -I*)
6375                                         clopts+=("\$1")
6376                                         ;;
6377                                 -l*)
6378                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6379                                         ;;
6380                                 -L*)
6381                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6382                                         ;;
6383                                 *.obj | *.o)
6384                                         ldopts+=("\$1")
6385                                         ;;
6386                                 -Wl,*)
6387                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6388                                                 ldopts+=("\${linkarg}")
6389                                         done
6390                                         ;;
6391                                 *.lib)
6392                                         ldopts+=("\$1")
6393                                         ;;
6394                                 -o)
6395                                         shift
6396                                         ldopts+=("-out:\$1")
6397                                         ;;
6398                                 *)
6399                                         clopts+=("\$1")
6400                                         ldopts+=("\$1")
6401                                         ;;
6402                         esac
6403                         shift
6404                 done
6405                 if [ "\$isdll" -ne 0 ]; then
6406                         for lib in \${libs[*]}; do
6407                                 ldopts+=("\$lib.dll.lib")
6408                         done
6409                 else
6410                         for lib in \${libs[*]}; do
6411                                 ldopts+=("\$lib.lib")
6412                         done
6413                 fi
6414                 cat <<-EOF
6415                 Creating program
6416                 ** ld options:   "\${ldopts[@]}"
6417 EOF
6418                 exec \$LD \${ldopts[@]}
6419 CF_EOF
6420                 chmod +x mk_prog.sh
6421                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6422                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6423                 ;;
6424         (mingw*)
6425                 cf_cv_shlib_version=mingw
6426                 cf_cv_shlib_version_infix=mingw
6427                 shlibdir=$bindir
6428                 MAKE_DLLS=
6429                 if test "$DFT_LWR_MODEL" = "shared" ; then
6430                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6431                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6432                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6433                 fi
6434                 CC_SHARED_OPTS=
6435                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6436                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6437                 cat >mk_shared_lib.sh <<-CF_EOF
6438                 #!$SHELL
6439                 SHARED_LIB=\$1
6440                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6441                 shift
6442                 cat <<-EOF
6443                 Linking shared library
6444                 ** SHARED_LIB \$SHARED_LIB
6445                 ** IMPORT_LIB \$IMPORT_LIB
6446 EOF
6447                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6448 CF_EOF
6449                 chmod +x mk_shared_lib.sh
6450                 ;;
6451         (openbsd[2-9].*|mirbsd*)
6452                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6453                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6454                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6455                 fi
6456                 if test "$cf_cv_enable_rpath" = yes ; then
6457                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6458                 fi
6459                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6460
6461         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6462         if test "$cf_cv_shlib_version" = rel; then
6463                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6464         else
6465                 cf_cv_shared_soname='`basename $@`'
6466         fi
6467
6468                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6469                 ;;
6470         (nskJ*)
6471                 CC_SHARED_OPTS=
6472                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6473                 ;;
6474         (nskL*)
6475                 CC_SHARED_OPTS=
6476                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6477                 ;;
6478         (nto-qnx*|openbsd*|freebsd[12].*)
6479                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6480                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6481                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6482                 ;;
6483         (dragonfly*|freebsd*)
6484                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6485                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6486                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6487                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6488                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6489                 fi
6490
6491         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6492         if test "$cf_cv_shlib_version" = rel; then
6493                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6494         else
6495                 cf_cv_shared_soname='`basename $@`'
6496         fi
6497
6498                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6499                 ;;
6500         (netbsd*)
6501                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6502                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6503                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6504                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6505                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6506                         if test "$cf_cv_shlib_version" = auto; then
6507                         if test -f /usr/libexec/ld.elf_so; then
6508                                 cf_cv_shlib_version=abi
6509                         else
6510                                 cf_cv_shlib_version=rel
6511                         fi
6512                         fi
6513
6514         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6515         if test "$cf_cv_shlib_version" = rel; then
6516                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6517         else
6518                 cf_cv_shared_soname='`basename $@`'
6519         fi
6520
6521                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6522                 else
6523                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6524                 fi
6525                 ;;
6526         (osf*|mls+*)
6527                 # tested with OSF/1 V3.2 and 'cc'
6528                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6529                 # link with shared libs).
6530                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6531                 case "$host_os" in
6532                 (osf4*)
6533                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6534                         ;;
6535                 esac
6536                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6537                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6538                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6539                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6540                 fi
6541                 cf_cv_rm_so_locs=yes
6542                 ;;
6543         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6544                 # tested with osr5.0.5
6545                 if test "$GCC" != yes; then
6546                         CC_SHARED_OPTS='-belf -KPIC'
6547                 fi
6548                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6549                 if test "$cf_cv_enable_rpath" = yes ; then
6550                         # only way is to set LD_RUN_PATH but no switch for it
6551                         RUN_PATH=$libdir
6552                 fi
6553                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6554                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6555                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6556                 ;;
6557         (sunos4*)
6558                 # tested with SunOS 4.1.1 and gcc 2.7.0
6559                 if test "$GCC" != yes; then
6560                         CC_SHARED_OPTS='-KPIC'
6561                 fi
6562                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6563                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6564                 ;;
6565         (solaris2*)
6566                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6567                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6568                 if test "$DFT_LWR_MODEL" = "shared" ; then
6569                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6570                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6571                 fi
6572                 if test "$cf_cv_enable_rpath" = yes ; then
6573                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6574                 fi
6575
6576         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6577         if test "$cf_cv_shlib_version" = rel; then
6578                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6579         else
6580                 cf_cv_shared_soname='`basename $@`'
6581         fi
6582
6583                 if test "$GCC" != yes; then
6584                         cf_save_CFLAGS="$CFLAGS"
6585                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6586                         do
6587                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6588                                 cat >"conftest.$ac_ext" <<_ACEOF
6589 #line 6589 "configure"
6590 #include "confdefs.h"
6591 #include <stdio.h>
6592 int
6593 main (void)
6594 {
6595 printf("Hello\\n");
6596   ;
6597   return 0;
6598 }
6599 _ACEOF
6600 rm -f "conftest.$ac_objext"
6601 if { (eval echo "$as_me:6601: \"$ac_compile\"") >&5
6602   (eval $ac_compile) 2>&5
6603   ac_status=$?
6604   echo "$as_me:6604: \$? = $ac_status" >&5
6605   (exit "$ac_status"); } &&
6606          { ac_try='test -s "conftest.$ac_objext"'
6607   { (eval echo "$as_me:6607: \"$ac_try\"") >&5
6608   (eval $ac_try) 2>&5
6609   ac_status=$?
6610   echo "$as_me:6610: \$? = $ac_status" >&5
6611   (exit "$ac_status"); }; }; then
6612   break
6613 else
6614   echo "$as_me: failed program was:" >&5
6615 cat "conftest.$ac_ext" >&5
6616 fi
6617 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6618                         done
6619                         CFLAGS="$cf_save_CFLAGS"
6620                         CC_SHARED_OPTS=$cf_shared_opts
6621                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6622                 else
6623                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6624                 fi
6625                 ;;
6626         (sysv5uw7*|unix_sv*)
6627                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6628                 if test "$GCC" != yes; then
6629                         CC_SHARED_OPTS='-KPIC'
6630                 fi
6631                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6632                 ;;
6633         (*)
6634                 CC_SHARED_OPTS='unknown'
6635                 MK_SHARED_LIB='echo unknown'
6636                 ;;
6637         esac
6638
6639         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6640         case "$cf_cv_shlib_version" in
6641         (rel|abi)
6642                 case "$MK_SHARED_LIB" in
6643                 (*'-o $@')
6644                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6645                         ;;
6646                 (*)
6647                         { echo "$as_me:6647: WARNING: ignored --with-shlib-version" >&5
6648 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6649                         ;;
6650                 esac
6651                 ;;
6652         esac
6653
6654         if test -n "$cf_try_cflags"
6655         then
6656 cat > conftest.$ac_ext <<EOF
6657 #line 6657 "${as_me:-configure}"
6658 #include <stdio.h>
6659 int main(int argc, char *argv[])
6660 {
6661         printf("hello\\n");
6662         return (argv[argc-1] == 0) ;
6663 }
6664 EOF
6665                 cf_save_CFLAGS="$CFLAGS"
6666                 for cf_opt in $cf_try_cflags
6667                 do
6668                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6669                         echo "$as_me:6669: checking if CFLAGS option -$cf_opt works" >&5
6670 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6671                         if { (eval echo "$as_me:6671: \"$ac_compile\"") >&5
6672   (eval $ac_compile) 2>&5
6673   ac_status=$?
6674   echo "$as_me:6674: \$? = $ac_status" >&5
6675   (exit "$ac_status"); }; then
6676                                 echo "$as_me:6676: result: yes" >&5
6677 echo "${ECHO_T}yes" >&6
6678                                 cf_save_CFLAGS="$CFLAGS"
6679                         else
6680                                 echo "$as_me:6680: result: no" >&5
6681 echo "${ECHO_T}no" >&6
6682                         fi
6683                 done
6684                 CFLAGS="$cf_save_CFLAGS"
6685         fi
6686
6687         # RPATH_LIST is a colon-separated list of directories
6688         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6689         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6690
6691         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6692
6693         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6694
6695 echo "${as_me:-configure}:6695: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6696
6697         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6698
6699 echo "${as_me:-configure}:6699: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6700
6701 for model in $cf_list_models ; do
6702         case "$model" in
6703         (libtool)
6704
6705 echo "$as_me:6705: checking for additional libtool options" >&5
6706 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6707
6708 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6709 if test "${with_libtool_opts+set}" = set; then
6710   withval="$with_libtool_opts"
6711   with_libtool_opts=$withval
6712 else
6713   with_libtool_opts=no
6714 fi;
6715 echo "$as_me:6715: result: $with_libtool_opts" >&5
6716 echo "${ECHO_T}$with_libtool_opts" >&6
6717
6718 case .$with_libtool_opts in
6719 (.yes|.no|.)
6720         ;;
6721 (*)
6722         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6723         ;;
6724 esac
6725
6726 echo "$as_me:6726: checking if exported-symbols file should be used" >&5
6727 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6728
6729 # Check whether --with-export-syms or --without-export-syms was given.
6730 if test "${with_export_syms+set}" = set; then
6731   withval="$with_export_syms"
6732   with_export_syms=$withval
6733 else
6734   with_export_syms=no
6735 fi;
6736 if test "x$with_export_syms" = xyes
6737 then
6738         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6739
6740 fi
6741 echo "$as_me:6741: result: $with_export_syms" >&5
6742 echo "${ECHO_T}$with_export_syms" >&6
6743 if test "x$with_export_syms" != xno
6744 then
6745         EXPORT_SYMS="-export-symbols $with_export_syms"
6746
6747 fi
6748
6749                 ;;
6750         (shared)
6751                 if test "$CC_SHARED_OPTS" = "unknown"; then
6752                         { { echo "$as_me:6752: error: Shared libraries are not supported in this version" >&5
6753 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6754    { (exit 1); exit 1; }; }
6755                 fi
6756                 # workaround for inept transition to PIE vs PIC...
6757                 echo "$as_me:6757: checking if current CFLAGS link properly" >&5
6758 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6759                 cat >"conftest.$ac_ext" <<_ACEOF
6760 #line 6760 "configure"
6761 #include "confdefs.h"
6762 #include <stdio.h>
6763 int
6764 main (void)
6765 {
6766 printf("Hello work\\n");
6767   ;
6768   return 0;
6769 }
6770 _ACEOF
6771 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6772 if { (eval echo "$as_me:6772: \"$ac_link\"") >&5
6773   (eval $ac_link) 2>&5
6774   ac_status=$?
6775   echo "$as_me:6775: \$? = $ac_status" >&5
6776   (exit "$ac_status"); } &&
6777          { ac_try='test -s "conftest$ac_exeext"'
6778   { (eval echo "$as_me:6778: \"$ac_try\"") >&5
6779   (eval $ac_try) 2>&5
6780   ac_status=$?
6781   echo "$as_me:6781: \$? = $ac_status" >&5
6782   (exit "$ac_status"); }; }; then
6783   cf_cflags_work=yes
6784 else
6785   echo "$as_me: failed program was:" >&5
6786 cat "conftest.$ac_ext" >&5
6787 cf_cflags_work=no
6788 fi
6789 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6790                 echo "$as_me:6790: result: $cf_cflags_work" >&5
6791 echo "${ECHO_T}$cf_cflags_work" >&6
6792                 if test "$cf_cflags_work" = no
6793                 then
6794                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6795
6796 echo "${as_me:-configure}:6796: testing try to work around by appending shared-options ..." 1>&5
6797
6798                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6799                 fi
6800
6801 echo "$as_me:6801: checking if versioned-symbols file should be used" >&5
6802 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6803
6804 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6805 if test "${with_versioned_syms+set}" = set; then
6806   withval="$with_versioned_syms"
6807   with_versioned_syms=$withval
6808 else
6809   with_versioned_syms=no
6810 fi;
6811 case "x$with_versioned_syms" in
6812 (xyes)
6813         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6814
6815         ;;
6816 (xno)
6817         ;;
6818 (x/*)
6819         test -f "$with_versioned_syms" || { { echo "$as_me:6819: error: expected a filename: $with_versioned_syms" >&5
6820 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6821    { (exit 1); exit 1; }; }
6822         ;;
6823 (*)
6824         test -f "$with_versioned_syms" || { { echo "$as_me:6824: error: expected a filename: $with_versioned_syms" >&5
6825 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6826    { (exit 1); exit 1; }; }
6827         with_versioned_syms=`pwd`/"$with_versioned_syms"
6828         ;;
6829 esac
6830 echo "$as_me:6830: result: $with_versioned_syms" >&5
6831 echo "${ECHO_T}$with_versioned_syms" >&6
6832
6833 RESULTING_SYMS=
6834 VERSIONED_SYMS=
6835 WILDCARD_SYMS=
6836
6837 if test "x$with_versioned_syms" != xno
6838 then
6839         RESULTING_SYMS=$with_versioned_syms
6840         case "x$MK_SHARED_LIB" in
6841         (*-Wl,*)
6842                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6843                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6844                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6845
6846 echo "${as_me:-configure}:6846: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6847
6848                 ;;
6849         (*-dy\ *)
6850                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6851                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6852                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6853
6854 echo "${as_me:-configure}:6854: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6855
6856                 ;;
6857         (*)
6858                 { echo "$as_me:6858: WARNING: this system does not support versioned-symbols" >&5
6859 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6860                 ;;
6861         esac
6862
6863         # Linux ld can selectively override scope, e.g., of symbols beginning with
6864         # "_" by first declaring some as global, and then using a wildcard to
6865         # declare the others as local.  Some other loaders cannot do this.  Check
6866         # by constructing a (very) simple shared library and inspecting its
6867         # symbols.
6868         if test "x$VERSIONED_SYMS" != "x"
6869         then
6870                 echo "$as_me:6870: checking if wildcards can be used to selectively omit symbols" >&5
6871 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6872                 WILDCARD_SYMS=no
6873
6874                 # make sources
6875                 rm -f conftest.*
6876
6877                 cat >conftest.ver <<EOF
6878 module_1.0 {
6879 global:
6880         globalf1;
6881 local:
6882         localf1;
6883 };
6884 module_2.0 {
6885 global:
6886         globalf2;
6887 local:
6888         localf2;
6889         _*;
6890 } module_1.0;
6891 submodule_1.0 {
6892 global:
6893         subglobalf1;
6894         _ismissing;
6895 local:
6896         sublocalf1;
6897 };
6898 submodule_2.0 {
6899 global:
6900         subglobalf2;
6901 local:
6902         sublocalf2;
6903         _*;
6904 } submodule_1.0;
6905 EOF
6906                 cat >conftest.$ac_ext <<EOF
6907 #line 6907 "configure"
6908 int     _ismissing(void) { return 1; }
6909 int     _localf1(void) { return 1; }
6910 int     _localf2(void) { return 2; }
6911 int     globalf1(void) { return 1; }
6912 int     globalf2(void) { return 2; }
6913 int     _sublocalf1(void) { return 1; }
6914 int     _sublocalf2(void) { return 2; }
6915 int     subglobalf1(void) { return 1; }
6916 int     subglobalf2(void) { return 2; }
6917 EOF
6918                 cat >conftest.mk <<EOF
6919 CC=${CC}
6920 CFLAGS=${CFLAGS}
6921 CPPFLAGS=${CPPFLAGS}
6922 LDFLAGS=${LDFLAGS}
6923 LIBS=${LIBS}
6924 VERSIONED_SYMS=${VERSIONED_SYMS}
6925 RESULTING_SYMS=conftest.ver
6926 MK_SHARED_LIB=${MK_SHARED_LIB}
6927 conftest.so: conftest.$ac_cv_objext
6928                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6929 EOF
6930
6931                 # compile source, make library
6932                 if make -f conftest.mk 2>&5 >/dev/null
6933                 then
6934                         # test for missing symbol in either Data or Text section
6935                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6936                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6937                 fi
6938                 echo "$as_me:6938: result: $WILDCARD_SYMS" >&5
6939 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6940                 rm -f conftest.*
6941         fi
6942 fi
6943
6944                 ;;
6945         esac
6946 done
6947
6948 ### Checks for special libraries, must be done up-front.
6949 SHLIB_LIST=""
6950
6951 echo "$as_me:6951: checking if you want to link with the GPM mouse library" >&5
6952 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6953
6954 # Check whether --with-gpm or --without-gpm was given.
6955 if test "${with_gpm+set}" = set; then
6956   withval="$with_gpm"
6957   with_gpm=$withval
6958 else
6959   with_gpm=maybe
6960 fi;
6961 echo "$as_me:6961: result: $with_gpm" >&5
6962 echo "${ECHO_T}$with_gpm" >&6
6963
6964 if test "$with_gpm" != no ; then
6965         echo "$as_me:6965: checking for gpm.h" >&5
6966 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6967 if test "${ac_cv_header_gpm_h+set}" = set; then
6968   echo $ECHO_N "(cached) $ECHO_C" >&6
6969 else
6970   cat >"conftest.$ac_ext" <<_ACEOF
6971 #line 6971 "configure"
6972 #include "confdefs.h"
6973 #include <gpm.h>
6974 _ACEOF
6975 if { (eval echo "$as_me:6975: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6976   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6977   ac_status=$?
6978   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6979   rm -f conftest.er1
6980   cat conftest.err >&5
6981   echo "$as_me:6981: \$? = $ac_status" >&5
6982   (exit "$ac_status"); } >/dev/null; then
6983   if test -s conftest.err; then
6984     ac_cpp_err=$ac_c_preproc_warn_flag
6985   else
6986     ac_cpp_err=
6987   fi
6988 else
6989   ac_cpp_err=yes
6990 fi
6991 if test -z "$ac_cpp_err"; then
6992   ac_cv_header_gpm_h=yes
6993 else
6994   echo "$as_me: failed program was:" >&5
6995   cat "conftest.$ac_ext" >&5
6996   ac_cv_header_gpm_h=no
6997 fi
6998 rm -f conftest.err "conftest.$ac_ext"
6999 fi
7000 echo "$as_me:7000: result: $ac_cv_header_gpm_h" >&5
7001 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7002 if test "$ac_cv_header_gpm_h" = yes; then
7003
7004 cat >>confdefs.h <<\EOF
7005 #define HAVE_GPM_H 1
7006 EOF
7007
7008                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7009                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7010
7011 echo "${as_me:-configure}:7011: testing assuming we really have GPM library ..." 1>&5
7012
7013 cat >>confdefs.h <<\EOF
7014 #define HAVE_LIBGPM 1
7015 EOF
7016
7017                         with_gpm=yes
7018                 else
7019                         echo "$as_me:7019: checking for Gpm_Open in -lgpm" >&5
7020 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7021 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7022   echo $ECHO_N "(cached) $ECHO_C" >&6
7023 else
7024   ac_check_lib_save_LIBS=$LIBS
7025 LIBS="-lgpm  $LIBS"
7026 cat >"conftest.$ac_ext" <<_ACEOF
7027 #line 7027 "configure"
7028 #include "confdefs.h"
7029
7030 /* Override any gcc2 internal prototype to avoid an error.  */
7031 #ifdef __cplusplus
7032 extern "C"
7033 #endif
7034 /* We use char because int might match the return type of a gcc2
7035    builtin and then its argument prototype would still apply.  */
7036 char Gpm_Open ();
7037 int
7038 main (void)
7039 {
7040 Gpm_Open ();
7041   ;
7042   return 0;
7043 }
7044 _ACEOF
7045 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7046 if { (eval echo "$as_me:7046: \"$ac_link\"") >&5
7047   (eval $ac_link) 2>&5
7048   ac_status=$?
7049   echo "$as_me:7049: \$? = $ac_status" >&5
7050   (exit "$ac_status"); } &&
7051          { ac_try='test -s "conftest$ac_exeext"'
7052   { (eval echo "$as_me:7052: \"$ac_try\"") >&5
7053   (eval $ac_try) 2>&5
7054   ac_status=$?
7055   echo "$as_me:7055: \$? = $ac_status" >&5
7056   (exit "$ac_status"); }; }; then
7057   ac_cv_lib_gpm_Gpm_Open=yes
7058 else
7059   echo "$as_me: failed program was:" >&5
7060 cat "conftest.$ac_ext" >&5
7061 ac_cv_lib_gpm_Gpm_Open=no
7062 fi
7063 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7064 LIBS=$ac_check_lib_save_LIBS
7065 fi
7066 echo "$as_me:7066: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7067 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7068 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7069   with_gpm=yes
7070 else
7071
7072                                 if test "$with_gpm" = maybe; then
7073                                         { echo "$as_me:7073: WARNING: Cannot link with GPM library" >&5
7074 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7075                                         with_gpm=no
7076                                 else
7077                                         { { echo "$as_me:7077: error: Cannot link with GPM library" >&5
7078 echo "$as_me: error: Cannot link with GPM library" >&2;}
7079    { (exit 1); exit 1; }; }
7080                                 fi
7081
7082 fi
7083
7084                 fi
7085
7086 else
7087
7088                 test "$with_gpm" != maybe && { echo "$as_me:7088: WARNING: Cannot find GPM header" >&5
7089 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7090                 with_gpm=no
7091
7092 fi
7093
7094 fi
7095
7096 if test "$with_gpm" != no ; then
7097         echo "$as_me:7097: checking if you want to load GPM dynamically" >&5
7098 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7099
7100 # Check whether --with-dlsym or --without-dlsym was given.
7101 if test "${with_dlsym+set}" = set; then
7102   withval="$with_dlsym"
7103   with_dlsym=$withval
7104 else
7105   with_dlsym=yes
7106 fi;
7107         echo "$as_me:7107: result: $with_dlsym" >&5
7108 echo "${ECHO_T}$with_dlsym" >&6
7109         if test "x$with_dlsym" = xyes ; then
7110
7111 cf_have_dlsym=no
7112 echo "$as_me:7112: checking for dlsym" >&5
7113 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7114 if test "${ac_cv_func_dlsym+set}" = set; then
7115   echo $ECHO_N "(cached) $ECHO_C" >&6
7116 else
7117   cat >"conftest.$ac_ext" <<_ACEOF
7118 #line 7118 "configure"
7119 #include "confdefs.h"
7120 #define dlsym autoconf_temporary
7121 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7122 #undef dlsym
7123
7124 #ifdef __cplusplus
7125 extern "C"
7126 #endif
7127
7128 /* We use char because int might match the return type of a gcc2
7129    builtin and then its argument prototype would still apply.  */
7130 char dlsym (void);
7131
7132 int
7133 main (void)
7134 {
7135
7136 /* The GNU C library defines stubs for functions which it implements
7137     to always fail with ENOSYS.  Some functions are actually named
7138     something starting with __ and the normal name is an alias.  */
7139 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7140 #error found stub for dlsym
7141 #endif
7142
7143         return dlsym ();
7144   ;
7145   return 0;
7146 }
7147 _ACEOF
7148 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7149 if { (eval echo "$as_me:7149: \"$ac_link\"") >&5
7150   (eval $ac_link) 2>&5
7151   ac_status=$?
7152   echo "$as_me:7152: \$? = $ac_status" >&5
7153   (exit "$ac_status"); } &&
7154          { ac_try='test -s "conftest$ac_exeext"'
7155   { (eval echo "$as_me:7155: \"$ac_try\"") >&5
7156   (eval $ac_try) 2>&5
7157   ac_status=$?
7158   echo "$as_me:7158: \$? = $ac_status" >&5
7159   (exit "$ac_status"); }; }; then
7160   ac_cv_func_dlsym=yes
7161 else
7162   echo "$as_me: failed program was:" >&5
7163 cat "conftest.$ac_ext" >&5
7164 ac_cv_func_dlsym=no
7165 fi
7166 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7167 fi
7168 echo "$as_me:7168: result: $ac_cv_func_dlsym" >&5
7169 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7170 if test "$ac_cv_func_dlsym" = yes; then
7171   cf_have_dlsym=yes
7172 else
7173
7174 cf_have_libdl=no
7175 echo "$as_me:7175: checking for dlsym in -ldl" >&5
7176 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7177 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7178   echo $ECHO_N "(cached) $ECHO_C" >&6
7179 else
7180   ac_check_lib_save_LIBS=$LIBS
7181 LIBS="-ldl  $LIBS"
7182 cat >"conftest.$ac_ext" <<_ACEOF
7183 #line 7183 "configure"
7184 #include "confdefs.h"
7185
7186 /* Override any gcc2 internal prototype to avoid an error.  */
7187 #ifdef __cplusplus
7188 extern "C"
7189 #endif
7190 /* We use char because int might match the return type of a gcc2
7191    builtin and then its argument prototype would still apply.  */
7192 char dlsym ();
7193 int
7194 main (void)
7195 {
7196 dlsym ();
7197   ;
7198   return 0;
7199 }
7200 _ACEOF
7201 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7202 if { (eval echo "$as_me:7202: \"$ac_link\"") >&5
7203   (eval $ac_link) 2>&5
7204   ac_status=$?
7205   echo "$as_me:7205: \$? = $ac_status" >&5
7206   (exit "$ac_status"); } &&
7207          { ac_try='test -s "conftest$ac_exeext"'
7208   { (eval echo "$as_me:7208: \"$ac_try\"") >&5
7209   (eval $ac_try) 2>&5
7210   ac_status=$?
7211   echo "$as_me:7211: \$? = $ac_status" >&5
7212   (exit "$ac_status"); }; }; then
7213   ac_cv_lib_dl_dlsym=yes
7214 else
7215   echo "$as_me: failed program was:" >&5
7216 cat "conftest.$ac_ext" >&5
7217 ac_cv_lib_dl_dlsym=no
7218 fi
7219 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7220 LIBS=$ac_check_lib_save_LIBS
7221 fi
7222 echo "$as_me:7222: result: $ac_cv_lib_dl_dlsym" >&5
7223 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7224 if test "$ac_cv_lib_dl_dlsym" = yes; then
7225
7226         cf_have_dlsym=yes
7227         cf_have_libdl=yes
7228 fi
7229
7230 fi
7231
7232 if test "$cf_have_dlsym" = yes ; then
7233         test "$cf_have_libdl" = yes && {
7234 cf_add_libs="$LIBS"
7235 # reverse order
7236 cf_add_0lib=
7237 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7238 # filter duplicates
7239 for cf_add_1lib in $cf_add_0lib; do
7240         for cf_add_2lib in $cf_add_libs; do
7241                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7242                         cf_add_1lib=
7243                         break
7244                 fi
7245         done
7246         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7247 done
7248 LIBS="$cf_add_libs"
7249  }
7250
7251         echo "$as_me:7251: checking whether able to link to dl*() functions" >&5
7252 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7253         cat >"conftest.$ac_ext" <<_ACEOF
7254 #line 7254 "configure"
7255 #include "confdefs.h"
7256 #include <dlfcn.h>
7257 int
7258 main (void)
7259 {
7260
7261                 void *obj;
7262                 if ((obj = dlopen("filename", 0)) != 0) {
7263                         if (dlsym(obj, "symbolname") == 0) {
7264                         dlclose(obj);
7265                         }
7266                 }
7267   ;
7268   return 0;
7269 }
7270 _ACEOF
7271 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7272 if { (eval echo "$as_me:7272: \"$ac_link\"") >&5
7273   (eval $ac_link) 2>&5
7274   ac_status=$?
7275   echo "$as_me:7275: \$? = $ac_status" >&5
7276   (exit "$ac_status"); } &&
7277          { ac_try='test -s "conftest$ac_exeext"'
7278   { (eval echo "$as_me:7278: \"$ac_try\"") >&5
7279   (eval $ac_try) 2>&5
7280   ac_status=$?
7281   echo "$as_me:7281: \$? = $ac_status" >&5
7282   (exit "$ac_status"); }; }; then
7283
7284 cat >>confdefs.h <<\EOF
7285 #define HAVE_LIBDL 1
7286 EOF
7287
7288 else
7289   echo "$as_me: failed program was:" >&5
7290 cat "conftest.$ac_ext" >&5
7291
7292                 { { echo "$as_me:7292: error: Cannot link test program for libdl" >&5
7293 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7294    { (exit 1); exit 1; }; }
7295 fi
7296 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7297         echo "$as_me:7297: result: ok" >&5
7298 echo "${ECHO_T}ok" >&6
7299 else
7300         { { echo "$as_me:7300: error: Cannot find dlsym function" >&5
7301 echo "$as_me: error: Cannot find dlsym function" >&2;}
7302    { (exit 1); exit 1; }; }
7303 fi
7304
7305                 if test "x$with_gpm" != xyes ; then
7306                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7307
7308 echo "${as_me:-configure}:7308: testing assuming soname for gpm is $with_gpm ..." 1>&5
7309
7310                         cf_cv_gpm_soname="$with_gpm"
7311                 else
7312
7313 echo "$as_me:7313: checking for soname of gpm library" >&5
7314 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7315 if test "${cf_cv_gpm_soname+set}" = set; then
7316   echo $ECHO_N "(cached) $ECHO_C" >&6
7317 else
7318
7319 cf_cv_gpm_soname=unknown
7320 if test "$cross_compiling" != yes ; then
7321 cat >conftest.$ac_ext <<CF_EOF
7322 #include <gpm.h>
7323 int main(void)
7324 {
7325 if (Gpm_Open(0,0)) Gpm_Close();
7326         ${cf_cv_main_return:-return}(0);
7327 }
7328 CF_EOF
7329 cf_save_LIBS="$LIBS"
7330
7331 cf_add_libs="$LIBS"
7332 # reverse order
7333 cf_add_0lib=
7334 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7335 # filter duplicates
7336 for cf_add_1lib in $cf_add_0lib; do
7337         for cf_add_2lib in $cf_add_libs; do
7338                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7339                         cf_add_1lib=
7340                         break
7341                 fi
7342         done
7343         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7344 done
7345 LIBS="$cf_add_libs"
7346
7347         if { (eval echo "$as_me:7347: \"$ac_compile\"") >&5
7348   (eval $ac_compile) 2>&5
7349   ac_status=$?
7350   echo "$as_me:7350: \$? = $ac_status" >&5
7351   (exit "$ac_status"); } ; then
7352                 if { (eval echo "$as_me:7352: \"$ac_link\"") >&5
7353   (eval $ac_link) 2>&5
7354   ac_status=$?
7355   echo "$as_me:7355: \$? = $ac_status" >&5
7356   (exit "$ac_status"); } ; then
7357                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7358                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7359                 fi
7360         fi
7361 rm -rf ./conftest*
7362 LIBS="$cf_save_LIBS"
7363 fi
7364
7365 fi
7366 echo "$as_me:7366: result: $cf_cv_gpm_soname" >&5
7367 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7368
7369                 fi
7370                 test "$cf_cv_gpm_soname" != "unknown" &&
7371 cat >>confdefs.h <<EOF
7372 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7373 EOF
7374
7375                 SHLIB_LIST="-ldl $SHLIB_LIST"
7376
7377 cf_add_libs="$PRIVATE_LIBS"
7378 # reverse order
7379 cf_add_0lib=
7380 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7381 # filter duplicates
7382 for cf_add_1lib in $cf_add_0lib; do
7383         for cf_add_2lib in $cf_add_libs; do
7384                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7385                         cf_add_1lib=
7386                         break
7387                 fi
7388         done
7389         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7390 done
7391 PRIVATE_LIBS="$cf_add_libs"
7392
7393         else
7394                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7395
7396 cf_add_libs="$TEST_LIBS"
7397 # reverse order
7398 cf_add_0lib=
7399 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7400 # filter duplicates
7401 for cf_add_1lib in $cf_add_0lib; do
7402         for cf_add_2lib in $cf_add_libs; do
7403                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7404                         cf_add_1lib=
7405                         break
7406                 fi
7407         done
7408         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7409 done
7410 TEST_LIBS="$cf_add_libs"
7411
7412 cf_add_libs="$PRIVATE_LIBS"
7413 # reverse order
7414 cf_add_0lib=
7415 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7416 # filter duplicates
7417 for cf_add_1lib in $cf_add_0lib; do
7418         for cf_add_2lib in $cf_add_libs; do
7419                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7420                         cf_add_1lib=
7421                         break
7422                 fi
7423         done
7424         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7425 done
7426 PRIVATE_LIBS="$cf_add_libs"
7427
7428         fi
7429
7430 cat >>confdefs.h <<\EOF
7431 #define HAVE_LIBGPM 1
7432 EOF
7433
7434 echo "$as_me:7434: checking for Gpm_Wgetch in -lgpm" >&5
7435 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7436 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7437   echo $ECHO_N "(cached) $ECHO_C" >&6
7438 else
7439   ac_check_lib_save_LIBS=$LIBS
7440 LIBS="-lgpm  $LIBS"
7441 cat >"conftest.$ac_ext" <<_ACEOF
7442 #line 7442 "configure"
7443 #include "confdefs.h"
7444
7445 /* Override any gcc2 internal prototype to avoid an error.  */
7446 #ifdef __cplusplus
7447 extern "C"
7448 #endif
7449 /* We use char because int might match the return type of a gcc2
7450    builtin and then its argument prototype would still apply.  */
7451 char Gpm_Wgetch ();
7452 int
7453 main (void)
7454 {
7455 Gpm_Wgetch ();
7456   ;
7457   return 0;
7458 }
7459 _ACEOF
7460 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7461 if { (eval echo "$as_me:7461: \"$ac_link\"") >&5
7462   (eval $ac_link) 2>&5
7463   ac_status=$?
7464   echo "$as_me:7464: \$? = $ac_status" >&5
7465   (exit "$ac_status"); } &&
7466          { ac_try='test -s "conftest$ac_exeext"'
7467   { (eval echo "$as_me:7467: \"$ac_try\"") >&5
7468   (eval $ac_try) 2>&5
7469   ac_status=$?
7470   echo "$as_me:7470: \$? = $ac_status" >&5
7471   (exit "$ac_status"); }; }; then
7472   ac_cv_lib_gpm_Gpm_Wgetch=yes
7473 else
7474   echo "$as_me: failed program was:" >&5
7475 cat "conftest.$ac_ext" >&5
7476 ac_cv_lib_gpm_Gpm_Wgetch=no
7477 fi
7478 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7479 LIBS=$ac_check_lib_save_LIBS
7480 fi
7481 echo "$as_me:7481: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7482 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7483 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7484
7485 echo "$as_me:7485: checking if GPM is weakly bound to curses library" >&5
7486 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7487 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7488   echo $ECHO_N "(cached) $ECHO_C" >&6
7489 else
7490
7491 cf_cv_check_gpm_wgetch=unknown
7492 if test "$cross_compiling" != yes ; then
7493
7494 cat >conftest.$ac_ext <<CF_EOF
7495 #include <gpm.h>
7496 int main(void)
7497 {
7498         Gpm_Wgetch();
7499         ${cf_cv_main_return:-return}(0);
7500 }
7501 CF_EOF
7502
7503         cf_save_LIBS="$LIBS"
7504         # This only works if we can look at the symbol table.  If a shared
7505         # library is stripped for install, we cannot use that.  So we're forced
7506         # to rely on the static library, noting that some packagers may not
7507         # include it.
7508         LIBS="-static -lgpm -dynamic $LIBS"
7509         if { (eval echo "$as_me:7509: \"$ac_compile\"") >&5
7510   (eval $ac_compile) 2>&5
7511   ac_status=$?
7512   echo "$as_me:7512: \$? = $ac_status" >&5
7513   (exit "$ac_status"); } ; then
7514                 if { (eval echo "$as_me:7514: \"$ac_link\"") >&5
7515   (eval $ac_link) 2>&5
7516   ac_status=$?
7517   echo "$as_me:7517: \$? = $ac_status" >&5
7518   (exit "$ac_status"); } ; then
7519                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7520                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7521                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7522                 fi
7523         fi
7524         rm -rf ./conftest*
7525         LIBS="$cf_save_LIBS"
7526 fi
7527
7528 fi
7529 echo "$as_me:7529: result: $cf_cv_check_gpm_wgetch" >&5
7530 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7531
7532 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7533         { echo "$as_me:7533: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7534 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7535 fi
7536
7537 fi
7538
7539 fi
7540
7541 echo "$as_me:7541: checking if you want to use PCRE2 for regular-expressions" >&5
7542 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7543
7544 # Check whether --with-pcre2 or --without-pcre2 was given.
7545 if test "${with_pcre2+set}" = set; then
7546   withval="$with_pcre2"
7547
7548 fi;
7549 test -z "$with_pcre2" && with_pcre2=no
7550 echo "$as_me:7550: result: $with_pcre2" >&5
7551 echo "${ECHO_T}$with_pcre2" >&6
7552
7553 if test "x$with_pcre2" != xno ; then
7554         cf_with_pcre2_ok=no
7555         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7556         do
7557
7558 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7559         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7560
7561 echo "${as_me:-configure}:7561: testing found package $cf_with_pcre2 ..." 1>&5
7562
7563         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7564         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7565         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7566
7567 echo "${as_me:-configure}:7567: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7568
7569         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7570
7571 echo "${as_me:-configure}:7571: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7572
7573 cf_fix_cppflags=no
7574 cf_new_cflags=
7575 cf_new_cppflags=
7576 cf_new_extra_cppflags=
7577
7578 for cf_add_cflags in $cf_pkgconfig_incs
7579 do
7580 case "$cf_fix_cppflags" in
7581 (no)
7582         case "$cf_add_cflags" in
7583         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7584                 case "$cf_add_cflags" in
7585                 (-D*)
7586                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7587
7588                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7589                                 && test -z "${cf_tst_cflags}" \
7590                                 && cf_fix_cppflags=yes
7591
7592                         if test "$cf_fix_cppflags" = yes ; then
7593
7594         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7595         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7596
7597                                 continue
7598                         elif test "${cf_tst_cflags}" = "\"'" ; then
7599
7600         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7601         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7602
7603                                 continue
7604                         fi
7605                         ;;
7606                 esac
7607                 case "$CPPFLAGS" in
7608                 (*$cf_add_cflags)
7609                         ;;
7610                 (*)
7611                         case "$cf_add_cflags" in
7612                         (-D*)
7613                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7614
7615 CPPFLAGS=`echo "$CPPFLAGS" | \
7616         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7617                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7618
7619                                 ;;
7620                         esac
7621
7622         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7623         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7624
7625                         ;;
7626                 esac
7627                 ;;
7628         (*)
7629
7630         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7631         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7632
7633                 ;;
7634         esac
7635         ;;
7636 (yes)
7637
7638         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7639         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7640
7641         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7642
7643         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7644                 && test -z "${cf_tst_cflags}" \
7645                 && cf_fix_cppflags=no
7646         ;;
7647 esac
7648 done
7649
7650 if test -n "$cf_new_cflags" ; then
7651
7652         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7653         CFLAGS="${CFLAGS}$cf_new_cflags"
7654
7655 fi
7656
7657 if test -n "$cf_new_cppflags" ; then
7658
7659         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7660         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7661
7662 fi
7663
7664 if test -n "$cf_new_extra_cppflags" ; then
7665
7666         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7667         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7668
7669 fi
7670
7671 cf_add_libs="$LIBS"
7672 # reverse order
7673 cf_add_0lib=
7674 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7675 # filter duplicates
7676 for cf_add_1lib in $cf_add_0lib; do
7677         for cf_add_2lib in $cf_add_libs; do
7678                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7679                         cf_add_1lib=
7680                         break
7681                 fi
7682         done
7683         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7684 done
7685 LIBS="$cf_add_libs"
7686
7687         cf_with_pcre2_ok=yes; break
7688 else
7689         cf_pkgconfig_incs=
7690         cf_pkgconfig_libs=
7691         :
7692 fi
7693
7694         done
7695         cf_with_pcre2_ok=yes || { { echo "$as_me:7695: error: Cannot find PCRE2 library" >&5
7696 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7697    { (exit 1); exit 1; }; }
7698
7699 cat >>confdefs.h <<\EOF
7700 #define HAVE_LIB_PCRE2 1
7701 EOF
7702
7703         # if pkgconfig gave no results, look for the libraries directly
7704         case "$LIBS" in
7705         (*pcre2-posix*|*pcreposix*)
7706                 ;;
7707         (*)
7708                 echo "$as_me:7708: checking for regcomp in -lpcre2-posix" >&5
7709 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7710 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7711   echo $ECHO_N "(cached) $ECHO_C" >&6
7712 else
7713   ac_check_lib_save_LIBS=$LIBS
7714 LIBS="-lpcre2-posix  $LIBS"
7715 cat >"conftest.$ac_ext" <<_ACEOF
7716 #line 7716 "configure"
7717 #include "confdefs.h"
7718
7719 /* Override any gcc2 internal prototype to avoid an error.  */
7720 #ifdef __cplusplus
7721 extern "C"
7722 #endif
7723 /* We use char because int might match the return type of a gcc2
7724    builtin and then its argument prototype would still apply.  */
7725 char regcomp ();
7726 int
7727 main (void)
7728 {
7729 regcomp ();
7730   ;
7731   return 0;
7732 }
7733 _ACEOF
7734 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7735 if { (eval echo "$as_me:7735: \"$ac_link\"") >&5
7736   (eval $ac_link) 2>&5
7737   ac_status=$?
7738   echo "$as_me:7738: \$? = $ac_status" >&5
7739   (exit "$ac_status"); } &&
7740          { ac_try='test -s "conftest$ac_exeext"'
7741   { (eval echo "$as_me:7741: \"$ac_try\"") >&5
7742   (eval $ac_try) 2>&5
7743   ac_status=$?
7744   echo "$as_me:7744: \$? = $ac_status" >&5
7745   (exit "$ac_status"); }; }; then
7746   ac_cv_lib_pcre2_posix_regcomp=yes
7747 else
7748   echo "$as_me: failed program was:" >&5
7749 cat "conftest.$ac_ext" >&5
7750 ac_cv_lib_pcre2_posix_regcomp=no
7751 fi
7752 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7753 LIBS=$ac_check_lib_save_LIBS
7754 fi
7755 echo "$as_me:7755: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7756 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7757 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7758
7759 cf_add_libs="$LIBS"
7760 # reverse order
7761 cf_add_0lib=
7762 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7763 # filter duplicates
7764 for cf_add_1lib in $cf_add_0lib; do
7765         for cf_add_2lib in $cf_add_libs; do
7766                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7767                         cf_add_1lib=
7768                         break
7769                 fi
7770         done
7771         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7772 done
7773 LIBS="$cf_add_libs"
7774
7775 else
7776   echo "$as_me:7776: checking for regcomp in -lpcreposix" >&5
7777 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7778 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7779   echo $ECHO_N "(cached) $ECHO_C" >&6
7780 else
7781   ac_check_lib_save_LIBS=$LIBS
7782 LIBS="-lpcreposix  $LIBS"
7783 cat >"conftest.$ac_ext" <<_ACEOF
7784 #line 7784 "configure"
7785 #include "confdefs.h"
7786
7787 /* Override any gcc2 internal prototype to avoid an error.  */
7788 #ifdef __cplusplus
7789 extern "C"
7790 #endif
7791 /* We use char because int might match the return type of a gcc2
7792    builtin and then its argument prototype would still apply.  */
7793 char regcomp ();
7794 int
7795 main (void)
7796 {
7797 regcomp ();
7798   ;
7799   return 0;
7800 }
7801 _ACEOF
7802 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7803 if { (eval echo "$as_me:7803: \"$ac_link\"") >&5
7804   (eval $ac_link) 2>&5
7805   ac_status=$?
7806   echo "$as_me:7806: \$? = $ac_status" >&5
7807   (exit "$ac_status"); } &&
7808          { ac_try='test -s "conftest$ac_exeext"'
7809   { (eval echo "$as_me:7809: \"$ac_try\"") >&5
7810   (eval $ac_try) 2>&5
7811   ac_status=$?
7812   echo "$as_me:7812: \$? = $ac_status" >&5
7813   (exit "$ac_status"); }; }; then
7814   ac_cv_lib_pcreposix_regcomp=yes
7815 else
7816   echo "$as_me: failed program was:" >&5
7817 cat "conftest.$ac_ext" >&5
7818 ac_cv_lib_pcreposix_regcomp=no
7819 fi
7820 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7821 LIBS=$ac_check_lib_save_LIBS
7822 fi
7823 echo "$as_me:7823: result: $ac_cv_lib_pcreposix_regcomp" >&5
7824 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7825 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7826
7827 cf_add_libs="$LIBS"
7828 # reverse order
7829 cf_add_0lib=
7830 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7831 # filter duplicates
7832 for cf_add_1lib in $cf_add_0lib; do
7833         for cf_add_2lib in $cf_add_libs; do
7834                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7835                         cf_add_1lib=
7836                         break
7837                 fi
7838         done
7839         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7840 done
7841 LIBS="$cf_add_libs"
7842
7843 else
7844   { { echo "$as_me:7844: error: Cannot find PCRE2 POSIX library" >&5
7845 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7846    { (exit 1); exit 1; }; }
7847 fi
7848
7849 fi
7850
7851                 ;;
7852         esac
7853
7854         # either way, check for the library header files
7855
7856 for ac_header in pcre2posix.h pcreposix.h
7857 do
7858 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7859 echo "$as_me:7859: checking for $ac_header" >&5
7860 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7861 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7862   echo $ECHO_N "(cached) $ECHO_C" >&6
7863 else
7864   cat >"conftest.$ac_ext" <<_ACEOF
7865 #line 7865 "configure"
7866 #include "confdefs.h"
7867 #include <$ac_header>
7868 _ACEOF
7869 if { (eval echo "$as_me:7869: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7870   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7871   ac_status=$?
7872   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7873   rm -f conftest.er1
7874   cat conftest.err >&5
7875   echo "$as_me:7875: \$? = $ac_status" >&5
7876   (exit "$ac_status"); } >/dev/null; then
7877   if test -s conftest.err; then
7878     ac_cpp_err=$ac_c_preproc_warn_flag
7879   else
7880     ac_cpp_err=
7881   fi
7882 else
7883   ac_cpp_err=yes
7884 fi
7885 if test -z "$ac_cpp_err"; then
7886   eval "$as_ac_Header=yes"
7887 else
7888   echo "$as_me: failed program was:" >&5
7889   cat "conftest.$ac_ext" >&5
7890   eval "$as_ac_Header=no"
7891 fi
7892 rm -f conftest.err "conftest.$ac_ext"
7893 fi
7894 echo "$as_me:7894: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7895 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7896 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7897   cat >>confdefs.h <<EOF
7898 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7899 EOF
7900
7901 fi
7902 done
7903
7904 for ac_func in PCRE2regcomp
7905 do
7906 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7907 echo "$as_me:7907: checking for $ac_func" >&5
7908 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7909 if eval "test \"\${$as_ac_var+set}\" = set"; then
7910   echo $ECHO_N "(cached) $ECHO_C" >&6
7911 else
7912   cat >"conftest.$ac_ext" <<_ACEOF
7913 #line 7913 "configure"
7914 #include "confdefs.h"
7915 #define $ac_func autoconf_temporary
7916 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7917 #undef $ac_func
7918
7919 #ifdef __cplusplus
7920 extern "C"
7921 #endif
7922
7923 /* We use char because int might match the return type of a gcc2
7924    builtin and then its argument prototype would still apply.  */
7925 char $ac_func (void);
7926
7927 int
7928 main (void)
7929 {
7930
7931 /* The GNU C library defines stubs for functions which it implements
7932     to always fail with ENOSYS.  Some functions are actually named
7933     something starting with __ and the normal name is an alias.  */
7934 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7935 #error found stub for $ac_func
7936 #endif
7937
7938         return $ac_func ();
7939   ;
7940   return 0;
7941 }
7942 _ACEOF
7943 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7944 if { (eval echo "$as_me:7944: \"$ac_link\"") >&5
7945   (eval $ac_link) 2>&5
7946   ac_status=$?
7947   echo "$as_me:7947: \$? = $ac_status" >&5
7948   (exit "$ac_status"); } &&
7949          { ac_try='test -s "conftest$ac_exeext"'
7950   { (eval echo "$as_me:7950: \"$ac_try\"") >&5
7951   (eval $ac_try) 2>&5
7952   ac_status=$?
7953   echo "$as_me:7953: \$? = $ac_status" >&5
7954   (exit "$ac_status"); }; }; then
7955   eval "$as_ac_var=yes"
7956 else
7957   echo "$as_me: failed program was:" >&5
7958 cat "conftest.$ac_ext" >&5
7959 eval "$as_ac_var=no"
7960 fi
7961 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7962 fi
7963 echo "$as_me:7963: result: `eval echo '${'"$as_ac_var"'}'`" >&5
7964 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
7965 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
7966   cat >>confdefs.h <<EOF
7967 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7968 EOF
7969
7970 fi
7971 done
7972
7973 fi
7974
7975 # not everyone has "test -c"
7976 if test -c /dev/sysmouse 2>/dev/null ; then
7977 echo "$as_me:7977: checking if you want to use sysmouse" >&5
7978 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7979
7980 # Check whether --with-sysmouse or --without-sysmouse was given.
7981 if test "${with_sysmouse+set}" = set; then
7982   withval="$with_sysmouse"
7983   cf_with_sysmouse=$withval
7984 else
7985   cf_with_sysmouse=maybe
7986 fi;
7987         if test "$cf_with_sysmouse" != no ; then
7988         cat >"conftest.$ac_ext" <<_ACEOF
7989 #line 7989 "configure"
7990 #include "confdefs.h"
7991
7992 #include <osreldate.h>
7993 #if (__FreeBSD_version >= 400017)
7994 #include <sys/consio.h>
7995 #include <sys/fbio.h>
7996 #else
7997 #include <machine/console.h>
7998 #endif
7999
8000 int
8001 main (void)
8002 {
8003
8004         struct mouse_info the_mouse;
8005         ioctl(0, CONS_MOUSECTL, &the_mouse);
8006
8007   ;
8008   return 0;
8009 }
8010 _ACEOF
8011 rm -f "conftest.$ac_objext"
8012 if { (eval echo "$as_me:8012: \"$ac_compile\"") >&5
8013   (eval $ac_compile) 2>&5
8014   ac_status=$?
8015   echo "$as_me:8015: \$? = $ac_status" >&5
8016   (exit "$ac_status"); } &&
8017          { ac_try='test -s "conftest.$ac_objext"'
8018   { (eval echo "$as_me:8018: \"$ac_try\"") >&5
8019   (eval $ac_try) 2>&5
8020   ac_status=$?
8021   echo "$as_me:8021: \$? = $ac_status" >&5
8022   (exit "$ac_status"); }; }; then
8023   cf_with_sysmouse=yes
8024 else
8025   echo "$as_me: failed program was:" >&5
8026 cat "conftest.$ac_ext" >&5
8027 cf_with_sysmouse=no
8028 fi
8029 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8030         fi
8031 echo "$as_me:8031: result: $cf_with_sysmouse" >&5
8032 echo "${ECHO_T}$cf_with_sysmouse" >&6
8033 test "$cf_with_sysmouse" = yes &&
8034 cat >>confdefs.h <<\EOF
8035 #define USE_SYSMOUSE 1
8036 EOF
8037
8038 fi
8039
8040 # pretend that ncurses==ncursesw==ncursest
8041 echo "$as_me:8041: checking if you want to disable library suffixes" >&5
8042 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8043
8044 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8045 if test "${enable_lib_suffixes+set}" = set; then
8046   enableval="$enable_lib_suffixes"
8047   test "$enableval" != no && enableval=yes
8048         if test "$enableval" != "yes" ; then
8049     disable_lib_suffixes=yes
8050         else
8051                 disable_lib_suffixes=no
8052         fi
8053 else
8054   enableval=yes
8055         disable_lib_suffixes=no
8056
8057 fi;
8058 echo "$as_me:8058: result: $disable_lib_suffixes" >&5
8059 echo "${ECHO_T}$disable_lib_suffixes" >&6
8060
8061 ### If we're building with rpath, try to link non-standard libs that way too.
8062 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8063
8064 echo "$as_me:8064: checking if rpath-hack should be disabled" >&5
8065 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8066
8067 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8068 if test "${enable_rpath_hack+set}" = set; then
8069   enableval="$enable_rpath_hack"
8070   test "$enableval" != no && enableval=yes
8071         if test "$enableval" != "yes" ; then
8072     enable_rpath_hack=no
8073         else
8074                 enable_rpath_hack=yes
8075         fi
8076 else
8077   enableval=yes
8078         enable_rpath_hack=yes
8079
8080 fi;
8081 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8082 echo "$as_me:8082: result: $cf_disable_rpath_hack" >&5
8083 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8084
8085 if test "$enable_rpath_hack" = yes ; then
8086
8087 echo "$as_me:8087: checking for updated LDFLAGS" >&5
8088 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8089 if test -n "$LD_RPATH_OPT" ; then
8090         echo "$as_me:8090: result: maybe" >&5
8091 echo "${ECHO_T}maybe" >&6
8092
8093         for ac_prog in ldd
8094 do
8095   # Extract the first word of "$ac_prog", so it can be a program name with args.
8096 set dummy $ac_prog; ac_word=$2
8097 echo "$as_me:8097: checking for $ac_word" >&5
8098 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8099 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8100   echo $ECHO_N "(cached) $ECHO_C" >&6
8101 else
8102   if test -n "$cf_ldd_prog"; then
8103   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8104 else
8105   ac_save_IFS=$IFS; IFS=$ac_path_separator
8106 ac_dummy="$PATH"
8107 for ac_dir in $ac_dummy; do
8108   IFS=$ac_save_IFS
8109   test -z "$ac_dir" && ac_dir=.
8110   $as_executable_p "$ac_dir/$ac_word" || continue
8111 ac_cv_prog_cf_ldd_prog="$ac_prog"
8112 echo "$as_me:8112: found $ac_dir/$ac_word" >&5
8113 break
8114 done
8115
8116 fi
8117 fi
8118 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8119 if test -n "$cf_ldd_prog"; then
8120   echo "$as_me:8120: result: $cf_ldd_prog" >&5
8121 echo "${ECHO_T}$cf_ldd_prog" >&6
8122 else
8123   echo "$as_me:8123: result: no" >&5
8124 echo "${ECHO_T}no" >&6
8125 fi
8126
8127   test -n "$cf_ldd_prog" && break
8128 done
8129 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8130
8131         cf_rpath_list="/usr/lib /lib"
8132         if test "$cf_ldd_prog" != no
8133         then
8134                 cf_rpath_oops=
8135
8136 cat >"conftest.$ac_ext" <<_ACEOF
8137 #line 8137 "configure"
8138 #include "confdefs.h"
8139 #include <stdio.h>
8140 int
8141 main (void)
8142 {
8143 printf("Hello");
8144   ;
8145   return 0;
8146 }
8147 _ACEOF
8148 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8149 if { (eval echo "$as_me:8149: \"$ac_link\"") >&5
8150   (eval $ac_link) 2>&5
8151   ac_status=$?
8152   echo "$as_me:8152: \$? = $ac_status" >&5
8153   (exit "$ac_status"); } &&
8154          { ac_try='test -s "conftest$ac_exeext"'
8155   { (eval echo "$as_me:8155: \"$ac_try\"") >&5
8156   (eval $ac_try) 2>&5
8157   ac_status=$?
8158   echo "$as_me:8158: \$? = $ac_status" >&5
8159   (exit "$ac_status"); }; }; then
8160   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8161                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8162 else
8163   echo "$as_me: failed program was:" >&5
8164 cat "conftest.$ac_ext" >&5
8165 fi
8166 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8167
8168                 # If we passed the link-test, but get a "not found" on a given library,
8169                 # this could be due to inept reconfiguration of gcc to make it only
8170                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8171                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8172                 # /usr/local libraries.
8173                 if test -n "$cf_rpath_oops"
8174                 then
8175                         for cf_rpath_src in $cf_rpath_oops
8176                         do
8177                                 for cf_rpath_dir in \
8178                                         /usr/local \
8179                                         /usr/pkg \
8180                                         /opt/sfw
8181                                 do
8182                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8183                                         then
8184                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8185
8186 echo "${as_me:-configure}:8186: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8187
8188                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8189                                                 break
8190                                         fi
8191                                 done
8192                         done
8193                 fi
8194         fi
8195
8196         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8197
8198 echo "${as_me:-configure}:8198: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8199
8200 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8201
8202 echo "${as_me:-configure}:8202: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8203
8204 cf_rpath_dst=
8205 for cf_rpath_src in $LDFLAGS
8206 do
8207         case "$cf_rpath_src" in
8208         (-L*)
8209
8210                 # check if this refers to a directory which we will ignore
8211                 cf_rpath_skip=no
8212                 if test -n "$cf_rpath_list"
8213                 then
8214                         for cf_rpath_item in $cf_rpath_list
8215                         do
8216                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8217                                 then
8218                                         cf_rpath_skip=yes
8219                                         break
8220                                 fi
8221                         done
8222                 fi
8223
8224                 if test "$cf_rpath_skip" = no
8225                 then
8226                         # transform the option
8227                         if test "$LD_RPATH_OPT" = "-R " ; then
8228                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8229                         else
8230                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8231                         fi
8232
8233                         # if we have not already added this, add it now
8234                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8235                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8236                         then
8237                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8238
8239 echo "${as_me:-configure}:8239: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8240
8241                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8242                         fi
8243                 fi
8244                 ;;
8245         esac
8246         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8247 done
8248 LDFLAGS=$cf_rpath_dst
8249
8250 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8251
8252 echo "${as_me:-configure}:8252: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8253
8254 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8255
8256 echo "${as_me:-configure}:8256: testing ...checking LIBS $LIBS ..." 1>&5
8257
8258 cf_rpath_dst=
8259 for cf_rpath_src in $LIBS
8260 do
8261         case "$cf_rpath_src" in
8262         (-L*)
8263
8264                 # check if this refers to a directory which we will ignore
8265                 cf_rpath_skip=no
8266                 if test -n "$cf_rpath_list"
8267                 then
8268                         for cf_rpath_item in $cf_rpath_list
8269                         do
8270                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8271                                 then
8272                                         cf_rpath_skip=yes
8273                                         break
8274                                 fi
8275                         done
8276                 fi
8277
8278                 if test "$cf_rpath_skip" = no
8279                 then
8280                         # transform the option
8281                         if test "$LD_RPATH_OPT" = "-R " ; then
8282                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8283                         else
8284                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8285                         fi
8286
8287                         # if we have not already added this, add it now
8288                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8289                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8290                         then
8291                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8292
8293 echo "${as_me:-configure}:8293: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8294
8295                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8296                         fi
8297                 fi
8298                 ;;
8299         esac
8300         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8301 done
8302 LIBS=$cf_rpath_dst
8303
8304 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8305
8306 echo "${as_me:-configure}:8306: testing ...checked LIBS $LIBS ..." 1>&5
8307
8308         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8309
8310 echo "${as_me:-configure}:8310: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8311
8312 else
8313         echo "$as_me:8313: result: no" >&5
8314 echo "${ECHO_T}no" >&6
8315 fi
8316
8317 fi
8318
8319 fi
8320
8321 ### Depending on the system, someone may use rpath to build ncurses but not
8322 # want users of the package to rely upon that feature.  Give those people an
8323 # option to suppress that detail from EXTRA_LDFLAGS.
8324 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8325 if test -n "$EXTRA_PKG_LDFLAGS"
8326 then
8327         echo "$as_me:8327: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8328 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8329
8330 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8331 if test "${enable_pkg_ldflags+set}" = set; then
8332   enableval="$enable_pkg_ldflags"
8333   test "$enableval" != no && enableval=yes
8334         if test "$enableval" != "yes" ; then
8335     disable_pkg_ldflags=yes
8336         else
8337                 disable_pkg_ldflags=no
8338         fi
8339 else
8340   enableval=yes
8341         disable_pkg_ldflags=no
8342
8343 fi;
8344         echo "$as_me:8344: result: $disable_pkg_ldflags" >&5
8345 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8346         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8347 fi
8348
8349 ###############################################################################
8350
8351 ###     use option --with-extra-suffix to append suffix to headers and libraries
8352 echo "$as_me:8352: checking if you wish to append extra suffix to header/library paths" >&5
8353 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8354 EXTRA_SUFFIX=
8355
8356 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8357 if test "${with_extra_suffix+set}" = set; then
8358   withval="$with_extra_suffix"
8359   case x$withval in
8360         (xno)
8361                 ;;
8362         (xyes|x)
8363                 EXTRA_SUFFIX=$cf_cv_abi_version
8364                 ;;
8365         (*)
8366                 EXTRA_SUFFIX=$withval
8367                 ;;
8368         esac
8369
8370 fi;
8371 echo "$as_me:8371: result: $EXTRA_SUFFIX" >&5
8372 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8373
8374 ###     use option --disable-overwrite to leave out the link to -lcurses
8375 echo "$as_me:8375: checking if you wish to install ncurses overwriting curses" >&5
8376 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8377
8378 # Check whether --enable-overwrite or --disable-overwrite was given.
8379 if test "${enable_overwrite+set}" = set; then
8380   enableval="$enable_overwrite"
8381   with_overwrite=$enableval
8382 else
8383   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8384 fi;
8385 echo "$as_me:8385: result: $with_overwrite" >&5
8386 echo "${ECHO_T}$with_overwrite" >&6
8387
8388 echo "$as_me:8388: checking if external terminfo-database is used" >&5
8389 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8390
8391 # Check whether --enable-database or --disable-database was given.
8392 if test "${enable_database+set}" = set; then
8393   enableval="$enable_database"
8394   use_database=$enableval
8395 else
8396   use_database=yes
8397 fi;
8398 echo "$as_me:8398: result: $use_database" >&5
8399 echo "${ECHO_T}$use_database" >&6
8400
8401 case "$host_os" in
8402 (os2*)
8403         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8404         ;;
8405 (*)
8406         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8407         ;;
8408 esac
8409
8410 NCURSES_USE_DATABASE=0
8411 if test "$use_database" != no ; then
8412         NCURSES_USE_DATABASE=1
8413
8414         echo "$as_me:8414: checking which terminfo source-file will be installed" >&5
8415 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8416
8417 # Check whether --with-database or --without-database was given.
8418 if test "${with_database+set}" = set; then
8419   withval="$with_database"
8420   TERMINFO_SRC=$withval
8421 fi;
8422         echo "$as_me:8422: result: $TERMINFO_SRC" >&5
8423 echo "${ECHO_T}$TERMINFO_SRC" >&6
8424
8425         echo "$as_me:8425: checking whether to use hashed database instead of directory/tree" >&5
8426 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8427
8428 # Check whether --with-hashed-db or --without-hashed-db was given.
8429 if test "${with_hashed_db+set}" = set; then
8430   withval="$with_hashed_db"
8431
8432 else
8433   with_hashed_db=no
8434 fi;
8435         echo "$as_me:8435: result: $with_hashed_db" >&5
8436 echo "${ECHO_T}$with_hashed_db" >&6
8437 else
8438         with_hashed_db=no
8439 fi
8440
8441 echo "$as_me:8441: checking for list of fallback descriptions" >&5
8442 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8443
8444 # Check whether --with-fallbacks or --without-fallbacks was given.
8445 if test "${with_fallbacks+set}" = set; then
8446   withval="$with_fallbacks"
8447   with_fallback=$withval
8448 else
8449   with_fallback=
8450 fi;
8451 echo "$as_me:8451: result: $with_fallback" >&5
8452 echo "${ECHO_T}$with_fallback" >&6
8453
8454 case ".$with_fallback" in
8455 (.|.no)
8456         FALLBACK_LIST=
8457         ;;
8458 (.yes)
8459         { echo "$as_me:8459: WARNING: expected a list of terminal descriptions" >&5
8460 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8461         ;;
8462 (*)
8463         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8464         ;;
8465 esac
8466
8467 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8468 # tree for generating the terminal descriptions that will be compiled into the
8469 # library.  If your toolchain is old, it may not handle current terminal
8470 # databases.  Use configure-options to point to the tools which will be used,
8471 # rather than the first ones found on the $PATH.
8472 if test -n "$ac_tool_prefix"; then
8473   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8474 set dummy ${ac_tool_prefix}tic; ac_word=$2
8475 echo "$as_me:8475: checking for $ac_word" >&5
8476 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8477 if test "${ac_cv_prog_TIC+set}" = set; then
8478   echo $ECHO_N "(cached) $ECHO_C" >&6
8479 else
8480   if test -n "$TIC"; then
8481   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8482 else
8483   ac_save_IFS=$IFS; IFS=$ac_path_separator
8484 ac_dummy="$PATH"
8485 for ac_dir in $ac_dummy; do
8486   IFS=$ac_save_IFS
8487   test -z "$ac_dir" && ac_dir=.
8488   $as_executable_p "$ac_dir/$ac_word" || continue
8489 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8490 echo "$as_me:8490: found $ac_dir/$ac_word" >&5
8491 break
8492 done
8493
8494 fi
8495 fi
8496 TIC=$ac_cv_prog_TIC
8497 if test -n "$TIC"; then
8498   echo "$as_me:8498: result: $TIC" >&5
8499 echo "${ECHO_T}$TIC" >&6
8500 else
8501   echo "$as_me:8501: result: no" >&5
8502 echo "${ECHO_T}no" >&6
8503 fi
8504
8505 fi
8506 if test -z "$ac_cv_prog_TIC"; then
8507   ac_ct_TIC=$TIC
8508   # Extract the first word of "tic", so it can be a program name with args.
8509 set dummy tic; ac_word=$2
8510 echo "$as_me:8510: checking for $ac_word" >&5
8511 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8512 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8513   echo $ECHO_N "(cached) $ECHO_C" >&6
8514 else
8515   if test -n "$ac_ct_TIC"; then
8516   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8517 else
8518   ac_save_IFS=$IFS; IFS=$ac_path_separator
8519 ac_dummy="$PATH"
8520 for ac_dir in $ac_dummy; do
8521   IFS=$ac_save_IFS
8522   test -z "$ac_dir" && ac_dir=.
8523   $as_executable_p "$ac_dir/$ac_word" || continue
8524 ac_cv_prog_ac_ct_TIC="tic"
8525 echo "$as_me:8525: found $ac_dir/$ac_word" >&5
8526 break
8527 done
8528
8529 fi
8530 fi
8531 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8532 if test -n "$ac_ct_TIC"; then
8533   echo "$as_me:8533: result: $ac_ct_TIC" >&5
8534 echo "${ECHO_T}$ac_ct_TIC" >&6
8535 else
8536   echo "$as_me:8536: result: no" >&5
8537 echo "${ECHO_T}no" >&6
8538 fi
8539
8540   TIC=$ac_ct_TIC
8541 else
8542   TIC="$ac_cv_prog_TIC"
8543 fi
8544
8545 if test -n "$ac_tool_prefix"; then
8546   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8547 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8548 echo "$as_me:8548: checking for $ac_word" >&5
8549 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8550 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8551   echo $ECHO_N "(cached) $ECHO_C" >&6
8552 else
8553   if test -n "$INFOCMP"; then
8554   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8555 else
8556   ac_save_IFS=$IFS; IFS=$ac_path_separator
8557 ac_dummy="$PATH"
8558 for ac_dir in $ac_dummy; do
8559   IFS=$ac_save_IFS
8560   test -z "$ac_dir" && ac_dir=.
8561   $as_executable_p "$ac_dir/$ac_word" || continue
8562 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8563 echo "$as_me:8563: found $ac_dir/$ac_word" >&5
8564 break
8565 done
8566
8567 fi
8568 fi
8569 INFOCMP=$ac_cv_prog_INFOCMP
8570 if test -n "$INFOCMP"; then
8571   echo "$as_me:8571: result: $INFOCMP" >&5
8572 echo "${ECHO_T}$INFOCMP" >&6
8573 else
8574   echo "$as_me:8574: result: no" >&5
8575 echo "${ECHO_T}no" >&6
8576 fi
8577
8578 fi
8579 if test -z "$ac_cv_prog_INFOCMP"; then
8580   ac_ct_INFOCMP=$INFOCMP
8581   # Extract the first word of "infocmp", so it can be a program name with args.
8582 set dummy infocmp; ac_word=$2
8583 echo "$as_me:8583: checking for $ac_word" >&5
8584 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8585 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8586   echo $ECHO_N "(cached) $ECHO_C" >&6
8587 else
8588   if test -n "$ac_ct_INFOCMP"; then
8589   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8590 else
8591   ac_save_IFS=$IFS; IFS=$ac_path_separator
8592 ac_dummy="$PATH"
8593 for ac_dir in $ac_dummy; do
8594   IFS=$ac_save_IFS
8595   test -z "$ac_dir" && ac_dir=.
8596   $as_executable_p "$ac_dir/$ac_word" || continue
8597 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8598 echo "$as_me:8598: found $ac_dir/$ac_word" >&5
8599 break
8600 done
8601
8602 fi
8603 fi
8604 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8605 if test -n "$ac_ct_INFOCMP"; then
8606   echo "$as_me:8606: result: $ac_ct_INFOCMP" >&5
8607 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8608 else
8609   echo "$as_me:8609: result: no" >&5
8610 echo "${ECHO_T}no" >&6
8611 fi
8612
8613   INFOCMP=$ac_ct_INFOCMP
8614 else
8615   INFOCMP="$ac_cv_prog_INFOCMP"
8616 fi
8617
8618 if test -n "$FALLBACK_LIST"
8619 then
8620
8621 # Check whether --with-tic-path or --without-tic-path was given.
8622 if test "${with_tic_path+set}" = set; then
8623   withval="$with_tic_path"
8624   echo "$as_me:8624: checking for tic program for fallbacks" >&5
8625 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8626                 TIC=$withval
8627                 echo "$as_me:8627: result: $TIC" >&5
8628 echo "${ECHO_T}$TIC" >&6
8629
8630 if test "x$prefix" != xNONE; then
8631         cf_path_syntax="$prefix"
8632 else
8633         cf_path_syntax="$ac_default_prefix"
8634 fi
8635
8636 case ".$TIC" in
8637 (.\$\(*\)*|.\'*\'*)
8638         ;;
8639 (..|./*|.\\*)
8640         ;;
8641 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8642         ;;
8643 (.\$\{*prefix\}*|.\$\{*dir\}*)
8644         eval TIC="$TIC"
8645         case ".$TIC" in
8646         (.NONE/*)
8647                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8648                 ;;
8649         esac
8650         ;;
8651 (.no|.NONE/*)
8652         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8653         ;;
8654 (*)
8655         { { echo "$as_me:8655: error: expected a pathname, not \"$TIC\"" >&5
8656 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8657    { (exit 1); exit 1; }; }
8658         ;;
8659 esac
8660
8661 else
8662
8663 test -z "$TIC" && TIC="tic"
8664 for ac_prog in $TIC tic
8665 do
8666   # Extract the first word of "$ac_prog", so it can be a program name with args.
8667 set dummy $ac_prog; ac_word=$2
8668 echo "$as_me:8668: checking for $ac_word" >&5
8669 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8670 if test "${ac_cv_path_TIC+set}" = set; then
8671   echo $ECHO_N "(cached) $ECHO_C" >&6
8672 else
8673   case $TIC in
8674   [\\/]* | ?:[\\/]*)
8675   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8676   ;;
8677   *)
8678   ac_save_IFS=$IFS; IFS=$ac_path_separator
8679 ac_dummy="$PATH:/usr/local/ncurses/bin"
8680 for ac_dir in $ac_dummy; do
8681   IFS=$ac_save_IFS
8682   test -z "$ac_dir" && ac_dir=.
8683   if $as_executable_p "$ac_dir/$ac_word"; then
8684    ac_cv_path_TIC="$ac_dir/$ac_word"
8685    echo "$as_me:8685: found $ac_dir/$ac_word" >&5
8686    break
8687 fi
8688 done
8689
8690   ;;
8691 esac
8692 fi
8693 TIC=$ac_cv_path_TIC
8694
8695 if test -n "$TIC"; then
8696   echo "$as_me:8696: result: $TIC" >&5
8697 echo "${ECHO_T}$TIC" >&6
8698 else
8699   echo "$as_me:8699: result: no" >&5
8700 echo "${ECHO_T}no" >&6
8701 fi
8702
8703   test -n "$TIC" && break
8704 done
8705 test -n "$TIC" || TIC="$TIC"
8706
8707 cf_path_prog=""
8708 cf_path_args=""
8709 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8710 for cf_temp in $ac_cv_path_TIC
8711 do
8712         if test -z "$cf_path_prog" ; then
8713                 if test "$with_full_paths" = yes ; then
8714
8715 if test "x$prefix" != xNONE; then
8716         cf_path_syntax="$prefix"
8717 else
8718         cf_path_syntax="$ac_default_prefix"
8719 fi
8720
8721 case ".$cf_temp" in
8722 (.\$\(*\)*|.\'*\'*)
8723         ;;
8724 (..|./*|.\\*)
8725         ;;
8726 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8727         ;;
8728 (.\$\{*prefix\}*|.\$\{*dir\}*)
8729         eval cf_temp="$cf_temp"
8730         case ".$cf_temp" in
8731         (.NONE/*)
8732                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8733                 ;;
8734         esac
8735         ;;
8736 (.no|.NONE/*)
8737         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8738         ;;
8739 (*)
8740         break
8741         ;;
8742 esac
8743
8744                         cf_path_prog="$cf_temp"
8745                 else
8746                         cf_path_prog="`basename "$cf_temp"`"
8747                 fi
8748         elif test -z "$cf_path_args" ; then
8749                 cf_path_args="$cf_temp"
8750         else
8751                 cf_path_args="$cf_path_args $cf_temp"
8752         fi
8753 done
8754 IFS="$cf_save_ifs"
8755
8756 if test -n "$cf_path_prog" ; then
8757
8758 echo "${as_me:-configure}:8758: testing defining path for ${cf_path_prog} ..." 1>&5
8759
8760 cat >>confdefs.h <<EOF
8761 #define TIC_PATH "$cf_path_prog"
8762 EOF
8763
8764         test -n "$cf_path_args" &&
8765 cat >>confdefs.h <<EOF
8766 #define TIC_ARGS "$cf_path_args"
8767 EOF
8768
8769 fi
8770
8771                 if test -z "$TIC"
8772                 then
8773                         { echo "$as_me:8773: WARNING: no tic program found for fallbacks" >&5
8774 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8775                 fi
8776
8777 fi;
8778
8779 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8780 if test "${with_infocmp_path+set}" = set; then
8781   withval="$with_infocmp_path"
8782   echo "$as_me:8782: checking for infocmp program for fallbacks" >&5
8783 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8784                 INFOCMP=$withval
8785                 echo "$as_me:8785: result: $INFOCMP" >&5
8786 echo "${ECHO_T}$INFOCMP" >&6
8787
8788 if test "x$prefix" != xNONE; then
8789         cf_path_syntax="$prefix"
8790 else
8791         cf_path_syntax="$ac_default_prefix"
8792 fi
8793
8794 case ".$INFOCMP" in
8795 (.\$\(*\)*|.\'*\'*)
8796         ;;
8797 (..|./*|.\\*)
8798         ;;
8799 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8800         ;;
8801 (.\$\{*prefix\}*|.\$\{*dir\}*)
8802         eval INFOCMP="$INFOCMP"
8803         case ".$INFOCMP" in
8804         (.NONE/*)
8805                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8806                 ;;
8807         esac
8808         ;;
8809 (.no|.NONE/*)
8810         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8811         ;;
8812 (*)
8813         { { echo "$as_me:8813: error: expected a pathname, not \"$INFOCMP\"" >&5
8814 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8815    { (exit 1); exit 1; }; }
8816         ;;
8817 esac
8818
8819 else
8820
8821 test -z "$INFOCMP" && INFOCMP="infocmp"
8822 for ac_prog in $INFOCMP infocmp
8823 do
8824   # Extract the first word of "$ac_prog", so it can be a program name with args.
8825 set dummy $ac_prog; ac_word=$2
8826 echo "$as_me:8826: checking for $ac_word" >&5
8827 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8828 if test "${ac_cv_path_INFOCMP+set}" = set; then
8829   echo $ECHO_N "(cached) $ECHO_C" >&6
8830 else
8831   case $INFOCMP in
8832   [\\/]* | ?:[\\/]*)
8833   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8834   ;;
8835   *)
8836   ac_save_IFS=$IFS; IFS=$ac_path_separator
8837 ac_dummy="$PATH:/usr/local/ncurses/bin"
8838 for ac_dir in $ac_dummy; do
8839   IFS=$ac_save_IFS
8840   test -z "$ac_dir" && ac_dir=.
8841   if $as_executable_p "$ac_dir/$ac_word"; then
8842    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8843    echo "$as_me:8843: found $ac_dir/$ac_word" >&5
8844    break
8845 fi
8846 done
8847
8848   ;;
8849 esac
8850 fi
8851 INFOCMP=$ac_cv_path_INFOCMP
8852
8853 if test -n "$INFOCMP"; then
8854   echo "$as_me:8854: result: $INFOCMP" >&5
8855 echo "${ECHO_T}$INFOCMP" >&6
8856 else
8857   echo "$as_me:8857: result: no" >&5
8858 echo "${ECHO_T}no" >&6
8859 fi
8860
8861   test -n "$INFOCMP" && break
8862 done
8863 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8864
8865 cf_path_prog=""
8866 cf_path_args=""
8867 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8868 for cf_temp in $ac_cv_path_INFOCMP
8869 do
8870         if test -z "$cf_path_prog" ; then
8871                 if test "$with_full_paths" = yes ; then
8872
8873 if test "x$prefix" != xNONE; then
8874         cf_path_syntax="$prefix"
8875 else
8876         cf_path_syntax="$ac_default_prefix"
8877 fi
8878
8879 case ".$cf_temp" in
8880 (.\$\(*\)*|.\'*\'*)
8881         ;;
8882 (..|./*|.\\*)
8883         ;;
8884 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8885         ;;
8886 (.\$\{*prefix\}*|.\$\{*dir\}*)
8887         eval cf_temp="$cf_temp"
8888         case ".$cf_temp" in
8889         (.NONE/*)
8890                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8891                 ;;
8892         esac
8893         ;;
8894 (.no|.NONE/*)
8895         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8896         ;;
8897 (*)
8898         break
8899         ;;
8900 esac
8901
8902                         cf_path_prog="$cf_temp"
8903                 else
8904                         cf_path_prog="`basename "$cf_temp"`"
8905                 fi
8906         elif test -z "$cf_path_args" ; then
8907                 cf_path_args="$cf_temp"
8908         else
8909                 cf_path_args="$cf_path_args $cf_temp"
8910         fi
8911 done
8912 IFS="$cf_save_ifs"
8913
8914 if test -n "$cf_path_prog" ; then
8915
8916 echo "${as_me:-configure}:8916: testing defining path for ${cf_path_prog} ..." 1>&5
8917
8918 cat >>confdefs.h <<EOF
8919 #define INFOCMP_PATH "$cf_path_prog"
8920 EOF
8921
8922         test -n "$cf_path_args" &&
8923 cat >>confdefs.h <<EOF
8924 #define INFOCMP_ARGS "$cf_path_args"
8925 EOF
8926
8927 fi
8928
8929                 if test -z "$INFOCMP"
8930                 then
8931                         { echo "$as_me:8931: WARNING: no infocmp program found for fallbacks" >&5
8932 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8933                 fi
8934
8935 fi;
8936
8937         test -z "$TIC" && FALLBACK_LIST=
8938         test -z "$INFOCMP" && FALLBACK_LIST=
8939         if test -z "$FALLBACK_LIST"
8940         then
8941                 { echo "$as_me:8941: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8942 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8943         fi
8944 fi
8945
8946 USE_FALLBACKS=
8947 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8948
8949 echo "$as_me:8949: checking if you want modern xterm or antique" >&5
8950 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8951
8952 # Check whether --with-xterm-new or --without-xterm-new was given.
8953 if test "${with_xterm_new+set}" = set; then
8954   withval="$with_xterm_new"
8955   with_xterm_new=$withval
8956 else
8957   with_xterm_new=yes
8958 fi;
8959 case "$with_xterm_new" in
8960 (no) with_xterm_new=xterm-old;;
8961 (*)      with_xterm_new=xterm-new;;
8962 esac
8963 echo "$as_me:8963: result: $with_xterm_new" >&5
8964 echo "${ECHO_T}$with_xterm_new" >&6
8965 WHICH_XTERM=$with_xterm_new
8966
8967 echo "$as_me:8967: checking if xterm backspace sends BS or DEL" >&5
8968 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8969
8970 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8971 if test "${with_xterm_kbs+set}" = set; then
8972   withval="$with_xterm_kbs"
8973   with_xterm_kbs=$withval
8974 else
8975   with_xterm_kbs=BS
8976 fi;
8977 case x$with_xterm_kbs in
8978 (xyes|xno|xBS|xbs|x8)
8979         with_xterm_kbs=BS
8980         ;;
8981 (xDEL|xdel|x127)
8982         with_xterm_kbs=DEL
8983         ;;
8984 (*)
8985         with_xterm_kbs=$withval
8986         ;;
8987 esac
8988 echo "$as_me:8988: result: $with_xterm_kbs" >&5
8989 echo "${ECHO_T}$with_xterm_kbs" >&6
8990 XTERM_KBS=$with_xterm_kbs
8991
8992 MAKE_TERMINFO=
8993 if test "$use_database" = no ; then
8994         TERMINFO="${datadir}/terminfo"
8995         MAKE_TERMINFO="#"
8996 else
8997
8998 echo "$as_me:8998: checking for list of terminfo directories" >&5
8999 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9000
9001 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9002 if test "${with_terminfo_dirs+set}" = set; then
9003   withval="$with_terminfo_dirs"
9004
9005 else
9006   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9007 fi;
9008 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9009 cf_dst_path=
9010 for cf_src_path in $withval
9011 do
9012
9013 if test "x$prefix" != xNONE; then
9014         cf_path_syntax="$prefix"
9015 else
9016         cf_path_syntax="$ac_default_prefix"
9017 fi
9018
9019 case ".$cf_src_path" in
9020 (.\$\(*\)*|.\'*\'*)
9021         ;;
9022 (..|./*|.\\*)
9023         ;;
9024 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9025         ;;
9026 (.\$\{*prefix\}*|.\$\{*dir\}*)
9027         eval cf_src_path="$cf_src_path"
9028         case ".$cf_src_path" in
9029         (.NONE/*)
9030                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9031                 ;;
9032         esac
9033         ;;
9034 (.no|.NONE/*)
9035         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9036         ;;
9037 (*)
9038         { { echo "$as_me:9038: error: expected a pathname, not \"$cf_src_path\"" >&5
9039 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9040    { (exit 1); exit 1; }; }
9041         ;;
9042 esac
9043
9044   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9045   cf_dst_path="${cf_dst_path}${cf_src_path}"
9046 done
9047 IFS="$ac_save_ifs"
9048
9049 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9050 # so we have to check/work around.  We do prefer the result of "eval"...
9051 eval cf_dst_eval="$cf_dst_path"
9052 case "x$cf_dst_eval" in
9053 (xNONE*)
9054         TERMINFO_DIRS=$cf_dst_path
9055         ;;
9056 (*)
9057         TERMINFO_DIRS="$cf_dst_eval"
9058         ;;
9059 esac
9060
9061 echo "$as_me:9061: result: $TERMINFO_DIRS" >&5
9062 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9063 test -n "$TERMINFO_DIRS" &&
9064 cat >>confdefs.h <<EOF
9065 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9066 EOF
9067
9068 case "x$TERMINFO" in
9069 x???:*)
9070         { echo "$as_me:9070: WARNING: ignoring non-directory/file TERMINFO value" >&5
9071 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9072         unset TERMINFO
9073         ;;
9074 esac
9075
9076 echo "$as_me:9076: checking for default terminfo directory" >&5
9077 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9078
9079 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9080 if test "${with_default_terminfo_dir+set}" = set; then
9081   withval="$with_default_terminfo_dir"
9082
9083 else
9084   withval="${TERMINFO:-${datadir}/terminfo}"
9085 fi; if test -n "${datadir}/terminfo" ; then
9086
9087 if test "x$prefix" != xNONE; then
9088         cf_path_syntax="$prefix"
9089 else
9090         cf_path_syntax="$ac_default_prefix"
9091 fi
9092
9093 case ".$withval" in
9094 (.\$\(*\)*|.\'*\'*)
9095         ;;
9096 (..|./*|.\\*)
9097         ;;
9098 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9099         ;;
9100 (.\$\{*prefix\}*|.\$\{*dir\}*)
9101         eval withval="$withval"
9102         case ".$withval" in
9103         (.NONE/*)
9104                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9105                 ;;
9106         esac
9107         ;;
9108 (.no|.NONE/*)
9109         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9110         ;;
9111 (*)
9112         { { echo "$as_me:9112: error: expected a pathname, not \"$withval\"" >&5
9113 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9114    { (exit 1); exit 1; }; }
9115         ;;
9116 esac
9117
9118 fi
9119 eval TERMINFO="$withval"
9120
9121 echo "$as_me:9121: result: $TERMINFO" >&5
9122 echo "${ECHO_T}$TERMINFO" >&6
9123
9124 cat >>confdefs.h <<EOF
9125 #define TERMINFO "$TERMINFO"
9126 EOF
9127
9128 fi
9129
9130 ###     use option --disable-big-core to make tic run on small machines
9131 ###     We need 4Mb, check if we can allocate 50% more than that.
9132 echo "$as_me:9132: checking if big-core option selected" >&5
9133 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9134
9135 # Check whether --enable-big-core or --disable-big-core was given.
9136 if test "${enable_big_core+set}" = set; then
9137   enableval="$enable_big_core"
9138   with_big_core=$enableval
9139 else
9140   if test "$cross_compiling" = yes; then
9141   with_big_core=no
9142 else
9143   cat >"conftest.$ac_ext" <<_ACEOF
9144 #line 9144 "configure"
9145 #include "confdefs.h"
9146
9147 #include <stdlib.h>
9148 #include <string.h>
9149 int main() {
9150         unsigned long n = 6000000L;
9151         char *s = malloc(n);
9152         if (s != 0)
9153                 s[0] = s[n-1] = 0;
9154         ${cf_cv_main_return:-return}(s == 0);
9155 }
9156 _ACEOF
9157 rm -f "conftest$ac_exeext"
9158 if { (eval echo "$as_me:9158: \"$ac_link\"") >&5
9159   (eval $ac_link) 2>&5
9160   ac_status=$?
9161   echo "$as_me:9161: \$? = $ac_status" >&5
9162   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9163   { (eval echo "$as_me:9163: \"$ac_try\"") >&5
9164   (eval $ac_try) 2>&5
9165   ac_status=$?
9166   echo "$as_me:9166: \$? = $ac_status" >&5
9167   (exit "$ac_status"); }; }; then
9168   with_big_core=yes
9169 else
9170   echo "$as_me: program exited with status $ac_status" >&5
9171 echo "$as_me: failed program was:" >&5
9172 cat "conftest.$ac_ext" >&5
9173 with_big_core=no
9174 fi
9175 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9176 fi
9177 fi;
9178 echo "$as_me:9178: result: $with_big_core" >&5
9179 echo "${ECHO_T}$with_big_core" >&6
9180 test "x$with_big_core" = "xyes" &&
9181 cat >>confdefs.h <<\EOF
9182 #define HAVE_BIG_CORE 1
9183 EOF
9184
9185 ### ISO C only guarantees 512-char strings, we have tables which load faster
9186 ### when constructed using "big" strings.  More than the C compiler, the awk
9187 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9188 echo "$as_me:9188: checking if big-strings option selected" >&5
9189 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9190
9191 # Check whether --enable-big-strings or --disable-big-strings was given.
9192 if test "${enable_big_strings+set}" = set; then
9193   enableval="$enable_big_strings"
9194   with_big_strings=$enableval
9195 else
9196
9197         case x$AWK in
9198         (x)
9199                 eval with_big_strings=no
9200                 ;;
9201         (*)
9202                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9203                         | $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
9204                         eval with_big_strings=yes
9205                 else
9206                         eval with_big_strings=no
9207                 fi
9208                 ;;
9209         esac
9210
9211 fi;
9212 echo "$as_me:9212: result: $with_big_strings" >&5
9213 echo "${ECHO_T}$with_big_strings" >&6
9214
9215 USE_BIG_STRINGS=0
9216 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9217
9218 ###     use option --enable-termcap to compile in the termcap fallback support
9219 echo "$as_me:9219: checking if you want termcap-fallback support" >&5
9220 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9221
9222 # Check whether --enable-termcap or --disable-termcap was given.
9223 if test "${enable_termcap+set}" = set; then
9224   enableval="$enable_termcap"
9225   with_termcap=$enableval
9226 else
9227   with_termcap=no
9228 fi;
9229 echo "$as_me:9229: result: $with_termcap" >&5
9230 echo "${ECHO_T}$with_termcap" >&6
9231
9232 NCURSES_USE_TERMCAP=0
9233 if test "x$with_termcap" != "xyes" ; then
9234         if test "$use_database" = no ; then
9235                 if test -z "$with_fallback" ; then
9236                         { { echo "$as_me:9236: error: You have disabled the database w/o specifying fallbacks" >&5
9237 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9238    { (exit 1); exit 1; }; }
9239                 fi
9240         fi
9241
9242 cat >>confdefs.h <<\EOF
9243 #define PURE_TERMINFO 1
9244 EOF
9245
9246 else
9247
9248         if test "$with_ticlib" != no ; then
9249                 { { echo "$as_me:9249: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9250 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9251    { (exit 1); exit 1; }; }
9252         fi
9253
9254         NCURSES_USE_TERMCAP=1
9255         echo "$as_me:9255: checking for list of termcap files" >&5
9256 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9257
9258 # Check whether --with-termpath or --without-termpath was given.
9259 if test "${with_termpath+set}" = set; then
9260   withval="$with_termpath"
9261
9262 else
9263   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9264 fi;
9265 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9266 cf_dst_path=
9267 for cf_src_path in $withval
9268 do
9269
9270 if test "x$prefix" != xNONE; then
9271         cf_path_syntax="$prefix"
9272 else
9273         cf_path_syntax="$ac_default_prefix"
9274 fi
9275
9276 case ".$cf_src_path" in
9277 (.\$\(*\)*|.\'*\'*)
9278         ;;
9279 (..|./*|.\\*)
9280         ;;
9281 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9282         ;;
9283 (.\$\{*prefix\}*|.\$\{*dir\}*)
9284         eval cf_src_path="$cf_src_path"
9285         case ".$cf_src_path" in
9286         (.NONE/*)
9287                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9288                 ;;
9289         esac
9290         ;;
9291 (.no|.NONE/*)
9292         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9293         ;;
9294 (*)
9295         { { echo "$as_me:9295: error: expected a pathname, not \"$cf_src_path\"" >&5
9296 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9297    { (exit 1); exit 1; }; }
9298         ;;
9299 esac
9300
9301   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9302   cf_dst_path="${cf_dst_path}${cf_src_path}"
9303 done
9304 IFS="$ac_save_ifs"
9305
9306 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9307 # so we have to check/work around.  We do prefer the result of "eval"...
9308 eval cf_dst_eval="$cf_dst_path"
9309 case "x$cf_dst_eval" in
9310 (xNONE*)
9311         TERMPATH=$cf_dst_path
9312         ;;
9313 (*)
9314         TERMPATH="$cf_dst_eval"
9315         ;;
9316 esac
9317
9318         echo "$as_me:9318: result: $TERMPATH" >&5
9319 echo "${ECHO_T}$TERMPATH" >&6
9320         test -n "$TERMPATH" &&
9321 cat >>confdefs.h <<EOF
9322 #define TERMPATH "$TERMPATH"
9323 EOF
9324
9325         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9326         echo "$as_me:9326: checking if fast termcap-loader is needed" >&5
9327 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9328
9329 # Check whether --enable-getcap or --disable-getcap was given.
9330 if test "${enable_getcap+set}" = set; then
9331   enableval="$enable_getcap"
9332   with_getcap=$enableval
9333 else
9334   with_getcap=no
9335 fi;
9336         echo "$as_me:9336: result: $with_getcap" >&5
9337 echo "${ECHO_T}$with_getcap" >&6
9338         test "x$with_getcap" = "xyes" &&
9339 cat >>confdefs.h <<\EOF
9340 #define USE_GETCAP 1
9341 EOF
9342
9343         echo "$as_me:9343: checking if translated termcaps will be cached in ~/.terminfo" >&5
9344 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9345
9346 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9347 if test "${enable_getcap_cache+set}" = set; then
9348   enableval="$enable_getcap_cache"
9349   with_getcap_cache=$enableval
9350 else
9351   with_getcap_cache=no
9352 fi;
9353         echo "$as_me:9353: result: $with_getcap_cache" >&5
9354 echo "${ECHO_T}$with_getcap_cache" >&6
9355         test "x$with_getcap_cache" = "xyes" &&
9356 cat >>confdefs.h <<\EOF
9357 #define USE_GETCAP_CACHE 1
9358 EOF
9359
9360 fi
9361
9362 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9363 echo "$as_me:9363: checking if ~/.terminfo is wanted" >&5
9364 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9365
9366 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9367 if test "${enable_home_terminfo+set}" = set; then
9368   enableval="$enable_home_terminfo"
9369   with_home_terminfo=$enableval
9370 else
9371   with_home_terminfo=yes
9372 fi;
9373 echo "$as_me:9373: result: $with_home_terminfo" >&5
9374 echo "${ECHO_T}$with_home_terminfo" >&6
9375 test "x$with_home_terminfo" = "xyes" &&
9376 cat >>confdefs.h <<\EOF
9377 #define USE_HOME_TERMINFO 1
9378 EOF
9379
9380 echo "$as_me:9380: checking if you want to permit root to use ncurses environment variables" >&5
9381 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9382
9383 # Check whether --enable-root-environ or --disable-root-environ was given.
9384 if test "${enable_root_environ+set}" = set; then
9385   enableval="$enable_root_environ"
9386   with_root_environ=$enableval
9387 else
9388   with_root_environ=yes
9389 fi;
9390 echo "$as_me:9390: result: $with_root_environ" >&5
9391 echo "${ECHO_T}$with_root_environ" >&6
9392 test "x$with_root_environ" = xyes &&
9393 cat >>confdefs.h <<\EOF
9394 #define USE_ROOT_ENVIRON 1
9395 EOF
9396
9397 echo "$as_me:9397: checking if you want to permit setuid programs to access all files" >&5
9398 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9399
9400 # Check whether --enable-root-environ or --disable-root-environ was given.
9401 if test "${enable_root_environ+set}" = set; then
9402   enableval="$enable_root_environ"
9403   with_root_access=$enableval
9404 else
9405   with_root_access=yes
9406 fi;
9407 echo "$as_me:9407: result: $with_root_access" >&5
9408 echo "${ECHO_T}$with_root_access" >&6
9409 test "x$with_root_access" = xyes &&
9410 cat >>confdefs.h <<\EOF
9411 #define USE_ROOT_ACCESS 1
9412 EOF
9413
9414 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9415 ###   to reduce storage requirements for the terminfo database.
9416
9417 for ac_header in \
9418 unistd.h \
9419
9420 do
9421 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9422 echo "$as_me:9422: checking for $ac_header" >&5
9423 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9424 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9425   echo $ECHO_N "(cached) $ECHO_C" >&6
9426 else
9427   cat >"conftest.$ac_ext" <<_ACEOF
9428 #line 9428 "configure"
9429 #include "confdefs.h"
9430 #include <$ac_header>
9431 _ACEOF
9432 if { (eval echo "$as_me:9432: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9433   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9434   ac_status=$?
9435   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9436   rm -f conftest.er1
9437   cat conftest.err >&5
9438   echo "$as_me:9438: \$? = $ac_status" >&5
9439   (exit "$ac_status"); } >/dev/null; then
9440   if test -s conftest.err; then
9441     ac_cpp_err=$ac_c_preproc_warn_flag
9442   else
9443     ac_cpp_err=
9444   fi
9445 else
9446   ac_cpp_err=yes
9447 fi
9448 if test -z "$ac_cpp_err"; then
9449   eval "$as_ac_Header=yes"
9450 else
9451   echo "$as_me: failed program was:" >&5
9452   cat "conftest.$ac_ext" >&5
9453   eval "$as_ac_Header=no"
9454 fi
9455 rm -f conftest.err "conftest.$ac_ext"
9456 fi
9457 echo "$as_me:9457: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9458 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9459 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9460   cat >>confdefs.h <<EOF
9461 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9462 EOF
9463
9464 fi
9465 done
9466
9467 for ac_func in \
9468         remove \
9469         unlink
9470 do
9471 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9472 echo "$as_me:9472: checking for $ac_func" >&5
9473 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9474 if eval "test \"\${$as_ac_var+set}\" = set"; then
9475   echo $ECHO_N "(cached) $ECHO_C" >&6
9476 else
9477   cat >"conftest.$ac_ext" <<_ACEOF
9478 #line 9478 "configure"
9479 #include "confdefs.h"
9480 #define $ac_func autoconf_temporary
9481 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9482 #undef $ac_func
9483
9484 #ifdef __cplusplus
9485 extern "C"
9486 #endif
9487
9488 /* We use char because int might match the return type of a gcc2
9489    builtin and then its argument prototype would still apply.  */
9490 char $ac_func (void);
9491
9492 int
9493 main (void)
9494 {
9495
9496 /* The GNU C library defines stubs for functions which it implements
9497     to always fail with ENOSYS.  Some functions are actually named
9498     something starting with __ and the normal name is an alias.  */
9499 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9500 #error found stub for $ac_func
9501 #endif
9502
9503         return $ac_func ();
9504   ;
9505   return 0;
9506 }
9507 _ACEOF
9508 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9509 if { (eval echo "$as_me:9509: \"$ac_link\"") >&5
9510   (eval $ac_link) 2>&5
9511   ac_status=$?
9512   echo "$as_me:9512: \$? = $ac_status" >&5
9513   (exit "$ac_status"); } &&
9514          { ac_try='test -s "conftest$ac_exeext"'
9515   { (eval echo "$as_me:9515: \"$ac_try\"") >&5
9516   (eval $ac_try) 2>&5
9517   ac_status=$?
9518   echo "$as_me:9518: \$? = $ac_status" >&5
9519   (exit "$ac_status"); }; }; then
9520   eval "$as_ac_var=yes"
9521 else
9522   echo "$as_me: failed program was:" >&5
9523 cat "conftest.$ac_ext" >&5
9524 eval "$as_ac_var=no"
9525 fi
9526 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9527 fi
9528 echo "$as_me:9528: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9529 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9530 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9531   cat >>confdefs.h <<EOF
9532 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9533 EOF
9534
9535 fi
9536 done
9537
9538 if test "$cross_compiling" = yes ; then
9539
9540 for ac_func in \
9541                 link \
9542                 symlink
9543 do
9544 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9545 echo "$as_me:9545: checking for $ac_func" >&5
9546 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9547 if eval "test \"\${$as_ac_var+set}\" = set"; then
9548   echo $ECHO_N "(cached) $ECHO_C" >&6
9549 else
9550   cat >"conftest.$ac_ext" <<_ACEOF
9551 #line 9551 "configure"
9552 #include "confdefs.h"
9553 #define $ac_func autoconf_temporary
9554 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9555 #undef $ac_func
9556
9557 #ifdef __cplusplus
9558 extern "C"
9559 #endif
9560
9561 /* We use char because int might match the return type of a gcc2
9562    builtin and then its argument prototype would still apply.  */
9563 char $ac_func (void);
9564
9565 int
9566 main (void)
9567 {
9568
9569 /* The GNU C library defines stubs for functions which it implements
9570     to always fail with ENOSYS.  Some functions are actually named
9571     something starting with __ and the normal name is an alias.  */
9572 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9573 #error found stub for $ac_func
9574 #endif
9575
9576         return $ac_func ();
9577   ;
9578   return 0;
9579 }
9580 _ACEOF
9581 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9582 if { (eval echo "$as_me:9582: \"$ac_link\"") >&5
9583   (eval $ac_link) 2>&5
9584   ac_status=$?
9585   echo "$as_me:9585: \$? = $ac_status" >&5
9586   (exit "$ac_status"); } &&
9587          { ac_try='test -s "conftest$ac_exeext"'
9588   { (eval echo "$as_me:9588: \"$ac_try\"") >&5
9589   (eval $ac_try) 2>&5
9590   ac_status=$?
9591   echo "$as_me:9591: \$? = $ac_status" >&5
9592   (exit "$ac_status"); }; }; then
9593   eval "$as_ac_var=yes"
9594 else
9595   echo "$as_me: failed program was:" >&5
9596 cat "conftest.$ac_ext" >&5
9597 eval "$as_ac_var=no"
9598 fi
9599 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9600 fi
9601 echo "$as_me:9601: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9602 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9603 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9604   cat >>confdefs.h <<EOF
9605 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9606 EOF
9607
9608 fi
9609 done
9610
9611 else
9612         echo "$as_me:9612: checking if link/symlink functions work" >&5
9613 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9614 if test "${cf_cv_link_funcs+set}" = set; then
9615   echo $ECHO_N "(cached) $ECHO_C" >&6
9616 else
9617
9618                 cf_cv_link_funcs=
9619                 for cf_func in link symlink ; do
9620                         if test "$cross_compiling" = yes; then
9621
9622                         eval 'ac_cv_func_'$cf_func'=error'
9623 else
9624   cat >"conftest.$ac_ext" <<_ACEOF
9625 #line 9625 "configure"
9626 #include "confdefs.h"
9627
9628 #include <stdio.h>
9629 #include <sys/types.h>
9630 #include <sys/stat.h>
9631 #ifdef HAVE_UNISTD_H
9632 #include <unistd.h>
9633 #endif
9634 int main(void)
9635 {
9636         int fail = 0;
9637         char *src = "conftest.tmp";
9638         char *dst = "conftest.chk";
9639         struct stat src_sb, dst_sb;
9640         FILE *fp = fopen(src, "w");
9641         if (fp == 0) { fail = 3; } else {
9642                 fclose(fp); stat(src, &src_sb);
9643                 if ($cf_func(src, dst) < 0) {
9644                         fail = 1;
9645                 } else if (stat(dst, &dst_sb) < 0) {
9646                         fail = 2;
9647                 } else {
9648                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9649                         if (diff < 0) diff = -diff;
9650                         if (diff > 2) fail = 3;
9651                 }
9652         }
9653 #ifdef HAVE_UNLINK
9654         unlink(dst); unlink(src);
9655 #else
9656         remove(dst); remove(src);
9657 #endif
9658         ${cf_cv_main_return:-return} (fail);
9659 }
9660
9661 _ACEOF
9662 rm -f "conftest$ac_exeext"
9663 if { (eval echo "$as_me:9663: \"$ac_link\"") >&5
9664   (eval $ac_link) 2>&5
9665   ac_status=$?
9666   echo "$as_me:9666: \$? = $ac_status" >&5
9667   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9668   { (eval echo "$as_me:9668: \"$ac_try\"") >&5
9669   (eval $ac_try) 2>&5
9670   ac_status=$?
9671   echo "$as_me:9671: \$? = $ac_status" >&5
9672   (exit "$ac_status"); }; }; then
9673
9674                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9675                         eval 'ac_cv_func_'$cf_func'=yes'
9676 else
9677   echo "$as_me: program exited with status $ac_status" >&5
9678 echo "$as_me: failed program was:" >&5
9679 cat "conftest.$ac_ext" >&5
9680
9681                         eval 'ac_cv_func_'$cf_func'=no'
9682 fi
9683 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9684 fi
9685                 done
9686                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9687
9688 fi
9689 echo "$as_me:9689: result: $cf_cv_link_funcs" >&5
9690 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9691         test "$ac_cv_func_link"    = yes &&
9692 cat >>confdefs.h <<\EOF
9693 #define HAVE_LINK 1
9694 EOF
9695
9696         test "$ac_cv_func_symlink" = yes &&
9697 cat >>confdefs.h <<\EOF
9698 #define HAVE_SYMLINK 1
9699 EOF
9700
9701 fi
9702
9703 with_links=no
9704 with_symlinks=no
9705
9706 # soft links (symbolic links) are useful for some systems where hard links do
9707 # not work, or to make it simpler to copy terminfo trees around.
9708 if test "x$ac_cv_func_symlink" = xyes ; then
9709         echo "$as_me:9709: checking if tic should use symbolic links" >&5
9710 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9711
9712 # Check whether --enable-symlinks or --disable-symlinks was given.
9713 if test "${enable_symlinks+set}" = set; then
9714   enableval="$enable_symlinks"
9715   with_symlinks=$enableval
9716 else
9717   with_symlinks=no
9718 fi;
9719         echo "$as_me:9719: result: $with_symlinks" >&5
9720 echo "${ECHO_T}$with_symlinks" >&6
9721 fi
9722
9723 # If we have hard links and did not choose to use soft links instead, there is
9724 # no reason to make this choice optional - use the hard links.
9725 if test "$with_symlinks" = no ; then
9726         echo "$as_me:9726: checking if tic should use hard links" >&5
9727 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9728         if test "x$ac_cv_func_link" = xyes ; then
9729                 with_links=yes
9730         else
9731                 with_links=no
9732         fi
9733         echo "$as_me:9733: result: $with_links" >&5
9734 echo "${ECHO_T}$with_links" >&6
9735 fi
9736
9737 test "x$with_links" = xyes &&
9738 cat >>confdefs.h <<\EOF
9739 #define USE_LINKS 1
9740 EOF
9741
9742 test "x$with_symlinks" = xyes &&
9743 cat >>confdefs.h <<\EOF
9744 #define USE_SYMLINKS 1
9745 EOF
9746
9747 ###   use option --enable-broken-linker to force on use of broken-linker support
9748
9749 echo "$as_me:9749: checking if you want broken-linker support code" >&5
9750 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9751
9752 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9753 if test "${enable_broken_linker+set}" = set; then
9754   enableval="$enable_broken_linker"
9755   with_broken_linker=$enableval
9756 else
9757   with_broken_linker=no
9758 fi;
9759 echo "$as_me:9759: result: $with_broken_linker" >&5
9760 echo "${ECHO_T}$with_broken_linker" >&6
9761
9762 : "${BROKEN_LINKER:=0}"
9763 if test "x$with_broken_linker" = xyes ; then
9764
9765 cat >>confdefs.h <<\EOF
9766 #define BROKEN_LINKER 1
9767 EOF
9768
9769         BROKEN_LINKER=1
9770 fi
9771
9772 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9773 echo "$as_me:9773: checking if tputs should process BSD-style prefix padding" >&5
9774 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9775
9776 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9777 if test "${enable_bsdpad+set}" = set; then
9778   enableval="$enable_bsdpad"
9779   with_bsdpad=$enableval
9780 else
9781   with_bsdpad=no
9782 fi;
9783 echo "$as_me:9783: result: $with_bsdpad" >&5
9784 echo "${ECHO_T}$with_bsdpad" >&6
9785 test "x$with_bsdpad" = xyes &&
9786 cat >>confdefs.h <<\EOF
9787 #define BSD_TPUTS 1
9788 EOF
9789
9790 ###   use option --enable-widec to turn on use of wide-character support
9791 NCURSES_CH_T=chtype
9792 NCURSES_LIBUTF8=0
9793
9794 NEED_WCHAR_H=0
9795 NCURSES_MBSTATE_T=0
9796 NCURSES_WCHAR_T=0
9797 NCURSES_WINT_T=0
9798
9799 # Check to define _XOPEN_SOURCE "automatically"
9800 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9801
9802 echo "$as_me:9802: checking if the POSIX test-macros are already defined" >&5
9803 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9804 if test "${cf_cv_posix_visible+set}" = set; then
9805   echo $ECHO_N "(cached) $ECHO_C" >&6
9806 else
9807
9808 cat >"conftest.$ac_ext" <<_ACEOF
9809 #line 9809 "configure"
9810 #include "confdefs.h"
9811 #include <stdio.h>
9812 int
9813 main (void)
9814 {
9815
9816 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9817         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9818         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9819         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9820 #error conflicting symbols found
9821 #endif
9822
9823   ;
9824   return 0;
9825 }
9826 _ACEOF
9827 rm -f "conftest.$ac_objext"
9828 if { (eval echo "$as_me:9828: \"$ac_compile\"") >&5
9829   (eval $ac_compile) 2>&5
9830   ac_status=$?
9831   echo "$as_me:9831: \$? = $ac_status" >&5
9832   (exit "$ac_status"); } &&
9833          { ac_try='test -s "conftest.$ac_objext"'
9834   { (eval echo "$as_me:9834: \"$ac_try\"") >&5
9835   (eval $ac_try) 2>&5
9836   ac_status=$?
9837   echo "$as_me:9837: \$? = $ac_status" >&5
9838   (exit "$ac_status"); }; }; then
9839   cf_cv_posix_visible=no
9840 else
9841   echo "$as_me: failed program was:" >&5
9842 cat "conftest.$ac_ext" >&5
9843 cf_cv_posix_visible=yes
9844 fi
9845 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9846
9847 fi
9848 echo "$as_me:9848: result: $cf_cv_posix_visible" >&5
9849 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9850
9851 if test "$cf_cv_posix_visible" = no; then
9852
9853 cf_XOPEN_SOURCE=600
9854 cf_POSIX_C_SOURCE=199506L
9855 cf_xopen_source=
9856
9857 case "$host_os" in
9858 (aix[4-7]*)
9859         cf_xopen_source="-D_ALL_SOURCE"
9860         ;;
9861 (msys)
9862         cf_XOPEN_SOURCE=600
9863         ;;
9864 (darwin[0-8].*)
9865         cf_xopen_source="-D_APPLE_C_SOURCE"
9866         ;;
9867 (darwin*)
9868         cf_xopen_source="-D_DARWIN_C_SOURCE"
9869         cf_XOPEN_SOURCE=
9870         ;;
9871 (freebsd*|dragonfly*|midnightbsd*)
9872         # 5.x headers associate
9873         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9874         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9875         cf_POSIX_C_SOURCE=200112L
9876         cf_XOPEN_SOURCE=600
9877         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9878         ;;
9879 (hpux11*)
9880         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9881         ;;
9882 (hpux*)
9883         cf_xopen_source="-D_HPUX_SOURCE"
9884         ;;
9885 (irix[56].*)
9886         cf_xopen_source="-D_SGI_SOURCE"
9887         cf_XOPEN_SOURCE=
9888         ;;
9889 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9890
9891 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9892
9893 echo "$as_me:9893: checking if this is the GNU C library" >&5
9894 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9895 if test "${cf_cv_gnu_library+set}" = set; then
9896   echo $ECHO_N "(cached) $ECHO_C" >&6
9897 else
9898
9899 cat >"conftest.$ac_ext" <<_ACEOF
9900 #line 9900 "configure"
9901 #include "confdefs.h"
9902 #include <sys/types.h>
9903 int
9904 main (void)
9905 {
9906
9907         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9908                 return 0;
9909         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9910                 return 0;
9911         #else
9912         #       error not GNU C library
9913         #endif
9914   ;
9915   return 0;
9916 }
9917 _ACEOF
9918 rm -f "conftest.$ac_objext"
9919 if { (eval echo "$as_me:9919: \"$ac_compile\"") >&5
9920   (eval $ac_compile) 2>&5
9921   ac_status=$?
9922   echo "$as_me:9922: \$? = $ac_status" >&5
9923   (exit "$ac_status"); } &&
9924          { ac_try='test -s "conftest.$ac_objext"'
9925   { (eval echo "$as_me:9925: \"$ac_try\"") >&5
9926   (eval $ac_try) 2>&5
9927   ac_status=$?
9928   echo "$as_me:9928: \$? = $ac_status" >&5
9929   (exit "$ac_status"); }; }; then
9930   cf_cv_gnu_library=yes
9931 else
9932   echo "$as_me: failed program was:" >&5
9933 cat "conftest.$ac_ext" >&5
9934 cf_cv_gnu_library=no
9935 fi
9936 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9937
9938 fi
9939 echo "$as_me:9939: result: $cf_cv_gnu_library" >&5
9940 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9941
9942 if test x$cf_cv_gnu_library = xyes; then
9943
9944         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9945         # was changed to help a little.  newlib incorporated the change about 4
9946         # years later.
9947         echo "$as_me:9947: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9948 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9949 if test "${cf_cv_gnu_library_219+set}" = set; then
9950   echo $ECHO_N "(cached) $ECHO_C" >&6
9951 else
9952
9953                 cf_save="$CPPFLAGS"
9954
9955         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9956         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9957
9958                 cat >"conftest.$ac_ext" <<_ACEOF
9959 #line 9959 "configure"
9960 #include "confdefs.h"
9961 #include <sys/types.h>
9962 int
9963 main (void)
9964 {
9965
9966                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9967                                 return 0;
9968                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9969                                 return 0;
9970                         #else
9971                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9972                         #endif
9973   ;
9974   return 0;
9975 }
9976 _ACEOF
9977 rm -f "conftest.$ac_objext"
9978 if { (eval echo "$as_me:9978: \"$ac_compile\"") >&5
9979   (eval $ac_compile) 2>&5
9980   ac_status=$?
9981   echo "$as_me:9981: \$? = $ac_status" >&5
9982   (exit "$ac_status"); } &&
9983          { ac_try='test -s "conftest.$ac_objext"'
9984   { (eval echo "$as_me:9984: \"$ac_try\"") >&5
9985   (eval $ac_try) 2>&5
9986   ac_status=$?
9987   echo "$as_me:9987: \$? = $ac_status" >&5
9988   (exit "$ac_status"); }; }; then
9989   cf_cv_gnu_library_219=yes
9990 else
9991   echo "$as_me: failed program was:" >&5
9992 cat "conftest.$ac_ext" >&5
9993 cf_cv_gnu_library_219=no
9994 fi
9995 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9996                 CPPFLAGS="$cf_save"
9997
9998 fi
9999 echo "$as_me:9999: result: $cf_cv_gnu_library_219" >&5
10000 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10001
10002         if test "x$cf_cv_gnu_library_219" = xyes; then
10003                 cf_save="$CPPFLAGS"
10004                 echo "$as_me:10004: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10005 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10006 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10007   echo $ECHO_N "(cached) $ECHO_C" >&6
10008 else
10009
10010 cf_fix_cppflags=no
10011 cf_new_cflags=
10012 cf_new_cppflags=
10013 cf_new_extra_cppflags=
10014
10015 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10016 do
10017 case "$cf_fix_cppflags" in
10018 (no)
10019         case "$cf_add_cflags" in
10020         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10021                 case "$cf_add_cflags" in
10022                 (-D*)
10023                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10024
10025                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10026                                 && test -z "${cf_tst_cflags}" \
10027                                 && cf_fix_cppflags=yes
10028
10029                         if test "$cf_fix_cppflags" = yes ; then
10030
10031         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10032         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10033
10034                                 continue
10035                         elif test "${cf_tst_cflags}" = "\"'" ; then
10036
10037         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10038         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10039
10040                                 continue
10041                         fi
10042                         ;;
10043                 esac
10044                 case "$CPPFLAGS" in
10045                 (*$cf_add_cflags)
10046                         ;;
10047                 (*)
10048                         case "$cf_add_cflags" in
10049                         (-D*)
10050                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10051
10052 CPPFLAGS=`echo "$CPPFLAGS" | \
10053         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10054                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10055
10056                                 ;;
10057                         esac
10058
10059         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10060         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10061
10062                         ;;
10063                 esac
10064                 ;;
10065         (*)
10066
10067         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10068         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10069
10070                 ;;
10071         esac
10072         ;;
10073 (yes)
10074
10075         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10076         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10077
10078         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10079
10080         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10081                 && test -z "${cf_tst_cflags}" \
10082                 && cf_fix_cppflags=no
10083         ;;
10084 esac
10085 done
10086
10087 if test -n "$cf_new_cflags" ; then
10088
10089         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10090         CFLAGS="${CFLAGS}$cf_new_cflags"
10091
10092 fi
10093
10094 if test -n "$cf_new_cppflags" ; then
10095
10096         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10097         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10098
10099 fi
10100
10101 if test -n "$cf_new_extra_cppflags" ; then
10102
10103         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10104         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10105
10106 fi
10107
10108                         cat >"conftest.$ac_ext" <<_ACEOF
10109 #line 10109 "configure"
10110 #include "confdefs.h"
10111
10112                                 #include <limits.h>
10113                                 #include <sys/types.h>
10114
10115 int
10116 main (void)
10117 {
10118
10119                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10120                                         return 0;
10121                                 #else
10122                                 #       error GNU C library is too old
10123                                 #endif
10124   ;
10125   return 0;
10126 }
10127 _ACEOF
10128 rm -f "conftest.$ac_objext"
10129 if { (eval echo "$as_me:10129: \"$ac_compile\"") >&5
10130   (eval $ac_compile) 2>&5
10131   ac_status=$?
10132   echo "$as_me:10132: \$? = $ac_status" >&5
10133   (exit "$ac_status"); } &&
10134          { ac_try='test -s "conftest.$ac_objext"'
10135   { (eval echo "$as_me:10135: \"$ac_try\"") >&5
10136   (eval $ac_try) 2>&5
10137   ac_status=$?
10138   echo "$as_me:10138: \$? = $ac_status" >&5
10139   (exit "$ac_status"); }; }; then
10140   cf_cv_gnu_dftsrc_219=yes
10141 else
10142   echo "$as_me: failed program was:" >&5
10143 cat "conftest.$ac_ext" >&5
10144 cf_cv_gnu_dftsrc_219=no
10145 fi
10146 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10147
10148 fi
10149 echo "$as_me:10149: result: $cf_cv_gnu_dftsrc_219" >&5
10150 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10151                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10152         else
10153                 cf_cv_gnu_dftsrc_219=maybe
10154         fi
10155
10156         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10157
10158                 echo "$as_me:10158: checking if we must define _GNU_SOURCE" >&5
10159 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10160 if test "${cf_cv_gnu_source+set}" = set; then
10161   echo $ECHO_N "(cached) $ECHO_C" >&6
10162 else
10163
10164                 cat >"conftest.$ac_ext" <<_ACEOF
10165 #line 10165 "configure"
10166 #include "confdefs.h"
10167 #include <sys/types.h>
10168 int
10169 main (void)
10170 {
10171
10172                         #ifndef _XOPEN_SOURCE
10173                         #error  expected _XOPEN_SOURCE to be defined
10174                         #endif
10175   ;
10176   return 0;
10177 }
10178 _ACEOF
10179 rm -f "conftest.$ac_objext"
10180 if { (eval echo "$as_me:10180: \"$ac_compile\"") >&5
10181   (eval $ac_compile) 2>&5
10182   ac_status=$?
10183   echo "$as_me:10183: \$? = $ac_status" >&5
10184   (exit "$ac_status"); } &&
10185          { ac_try='test -s "conftest.$ac_objext"'
10186   { (eval echo "$as_me:10186: \"$ac_try\"") >&5
10187   (eval $ac_try) 2>&5
10188   ac_status=$?
10189   echo "$as_me:10189: \$? = $ac_status" >&5
10190   (exit "$ac_status"); }; }; then
10191   cf_cv_gnu_source=no
10192 else
10193   echo "$as_me: failed program was:" >&5
10194 cat "conftest.$ac_ext" >&5
10195 cf_save="$CPPFLAGS"
10196
10197 cf_fix_cppflags=no
10198 cf_new_cflags=
10199 cf_new_cppflags=
10200 cf_new_extra_cppflags=
10201
10202 for cf_add_cflags in -D_GNU_SOURCE
10203 do
10204 case "$cf_fix_cppflags" in
10205 (no)
10206         case "$cf_add_cflags" in
10207         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10208                 case "$cf_add_cflags" in
10209                 (-D*)
10210                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10211
10212                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10213                                 && test -z "${cf_tst_cflags}" \
10214                                 && cf_fix_cppflags=yes
10215
10216                         if test "$cf_fix_cppflags" = yes ; then
10217
10218         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10219         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10220
10221                                 continue
10222                         elif test "${cf_tst_cflags}" = "\"'" ; then
10223
10224         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10225         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10226
10227                                 continue
10228                         fi
10229                         ;;
10230                 esac
10231                 case "$CPPFLAGS" in
10232                 (*$cf_add_cflags)
10233                         ;;
10234                 (*)
10235                         case "$cf_add_cflags" in
10236                         (-D*)
10237                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10238
10239 CPPFLAGS=`echo "$CPPFLAGS" | \
10240         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10241                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10242
10243                                 ;;
10244                         esac
10245
10246         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10247         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10248
10249                         ;;
10250                 esac
10251                 ;;
10252         (*)
10253
10254         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10255         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10256
10257                 ;;
10258         esac
10259         ;;
10260 (yes)
10261
10262         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10263         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10264
10265         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10266
10267         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10268                 && test -z "${cf_tst_cflags}" \
10269                 && cf_fix_cppflags=no
10270         ;;
10271 esac
10272 done
10273
10274 if test -n "$cf_new_cflags" ; then
10275
10276         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10277         CFLAGS="${CFLAGS}$cf_new_cflags"
10278
10279 fi
10280
10281 if test -n "$cf_new_cppflags" ; then
10282
10283         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10284         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10285
10286 fi
10287
10288 if test -n "$cf_new_extra_cppflags" ; then
10289
10290         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10291         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10292
10293 fi
10294
10295                          cat >"conftest.$ac_ext" <<_ACEOF
10296 #line 10296 "configure"
10297 #include "confdefs.h"
10298 #include <sys/types.h>
10299 int
10300 main (void)
10301 {
10302
10303                                 #ifdef _XOPEN_SOURCE
10304                                 #error  expected _XOPEN_SOURCE to be undefined
10305                                 #endif
10306   ;
10307   return 0;
10308 }
10309 _ACEOF
10310 rm -f "conftest.$ac_objext"
10311 if { (eval echo "$as_me:10311: \"$ac_compile\"") >&5
10312   (eval $ac_compile) 2>&5
10313   ac_status=$?
10314   echo "$as_me:10314: \$? = $ac_status" >&5
10315   (exit "$ac_status"); } &&
10316          { ac_try='test -s "conftest.$ac_objext"'
10317   { (eval echo "$as_me:10317: \"$ac_try\"") >&5
10318   (eval $ac_try) 2>&5
10319   ac_status=$?
10320   echo "$as_me:10320: \$? = $ac_status" >&5
10321   (exit "$ac_status"); }; }; then
10322   cf_cv_gnu_source=no
10323 else
10324   echo "$as_me: failed program was:" >&5
10325 cat "conftest.$ac_ext" >&5
10326 cf_cv_gnu_source=yes
10327 fi
10328 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10329                         CPPFLAGS="$cf_save"
10330
10331 fi
10332 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10333
10334 fi
10335 echo "$as_me:10335: result: $cf_cv_gnu_source" >&5
10336 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10337
10338                 if test "$cf_cv_gnu_source" = yes
10339                 then
10340                 echo "$as_me:10340: checking if we should also define _DEFAULT_SOURCE" >&5
10341 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10342 if test "${cf_cv_default_source+set}" = set; then
10343   echo $ECHO_N "(cached) $ECHO_C" >&6
10344 else
10345
10346         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10347         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10348
10349                         cat >"conftest.$ac_ext" <<_ACEOF
10350 #line 10350 "configure"
10351 #include "confdefs.h"
10352 #include <sys/types.h>
10353 int
10354 main (void)
10355 {
10356
10357                                 #ifdef _DEFAULT_SOURCE
10358                                 #error  expected _DEFAULT_SOURCE to be undefined
10359                                 #endif
10360   ;
10361   return 0;
10362 }
10363 _ACEOF
10364 rm -f "conftest.$ac_objext"
10365 if { (eval echo "$as_me:10365: \"$ac_compile\"") >&5
10366   (eval $ac_compile) 2>&5
10367   ac_status=$?
10368   echo "$as_me:10368: \$? = $ac_status" >&5
10369   (exit "$ac_status"); } &&
10370          { ac_try='test -s "conftest.$ac_objext"'
10371   { (eval echo "$as_me:10371: \"$ac_try\"") >&5
10372   (eval $ac_try) 2>&5
10373   ac_status=$?
10374   echo "$as_me:10374: \$? = $ac_status" >&5
10375   (exit "$ac_status"); }; }; then
10376   cf_cv_default_source=no
10377 else
10378   echo "$as_me: failed program was:" >&5
10379 cat "conftest.$ac_ext" >&5
10380 cf_cv_default_source=yes
10381 fi
10382 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10383
10384 fi
10385 echo "$as_me:10385: result: $cf_cv_default_source" >&5
10386 echo "${ECHO_T}$cf_cv_default_source" >&6
10387                         if test "$cf_cv_default_source" = yes
10388                         then
10389
10390         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10391         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10392
10393                         fi
10394                 fi
10395         fi
10396
10397 fi
10398
10399         ;;
10400 (minix*)
10401         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10402         ;;
10403 (mirbsd*)
10404         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10405         cf_XOPEN_SOURCE=
10406
10407 if test "$cf_cv_posix_visible" = no; then
10408
10409 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10410
10411 cf_save_CFLAGS="$CFLAGS"
10412 cf_save_CPPFLAGS="$CPPFLAGS"
10413
10414 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10415         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10416                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10417
10418 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10419         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10420                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10421
10422 echo "$as_me:10422: checking if we should define _POSIX_C_SOURCE" >&5
10423 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10424 if test "${cf_cv_posix_c_source+set}" = set; then
10425   echo $ECHO_N "(cached) $ECHO_C" >&6
10426 else
10427
10428 echo "${as_me:-configure}:10428: testing if the symbol is already defined go no further ..." 1>&5
10429
10430         cat >"conftest.$ac_ext" <<_ACEOF
10431 #line 10431 "configure"
10432 #include "confdefs.h"
10433 #include <sys/types.h>
10434 int
10435 main (void)
10436 {
10437
10438 #ifndef _POSIX_C_SOURCE
10439 make an error
10440 #endif
10441   ;
10442   return 0;
10443 }
10444 _ACEOF
10445 rm -f "conftest.$ac_objext"
10446 if { (eval echo "$as_me:10446: \"$ac_compile\"") >&5
10447   (eval $ac_compile) 2>&5
10448   ac_status=$?
10449   echo "$as_me:10449: \$? = $ac_status" >&5
10450   (exit "$ac_status"); } &&
10451          { ac_try='test -s "conftest.$ac_objext"'
10452   { (eval echo "$as_me:10452: \"$ac_try\"") >&5
10453   (eval $ac_try) 2>&5
10454   ac_status=$?
10455   echo "$as_me:10455: \$? = $ac_status" >&5
10456   (exit "$ac_status"); }; }; then
10457   cf_cv_posix_c_source=no
10458 else
10459   echo "$as_me: failed program was:" >&5
10460 cat "conftest.$ac_ext" >&5
10461 cf_want_posix_source=no
10462          case .$cf_POSIX_C_SOURCE in
10463          (.[12]??*)
10464                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10465                 ;;
10466          (.2)
10467                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10468                 cf_want_posix_source=yes
10469                 ;;
10470          (.*)
10471                 cf_want_posix_source=yes
10472                 ;;
10473          esac
10474          if test "$cf_want_posix_source" = yes ; then
10475                 cat >"conftest.$ac_ext" <<_ACEOF
10476 #line 10476 "configure"
10477 #include "confdefs.h"
10478 #include <sys/types.h>
10479 int
10480 main (void)
10481 {
10482
10483 #ifdef _POSIX_SOURCE
10484 make an error
10485 #endif
10486   ;
10487   return 0;
10488 }
10489 _ACEOF
10490 rm -f "conftest.$ac_objext"
10491 if { (eval echo "$as_me:10491: \"$ac_compile\"") >&5
10492   (eval $ac_compile) 2>&5
10493   ac_status=$?
10494   echo "$as_me:10494: \$? = $ac_status" >&5
10495   (exit "$ac_status"); } &&
10496          { ac_try='test -s "conftest.$ac_objext"'
10497   { (eval echo "$as_me:10497: \"$ac_try\"") >&5
10498   (eval $ac_try) 2>&5
10499   ac_status=$?
10500   echo "$as_me:10500: \$? = $ac_status" >&5
10501   (exit "$ac_status"); }; }; then
10502   :
10503 else
10504   echo "$as_me: failed program was:" >&5
10505 cat "conftest.$ac_ext" >&5
10506 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10507 fi
10508 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10509          fi
10510
10511 echo "${as_me:-configure}:10511: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10512
10513          CFLAGS="$cf_trim_CFLAGS"
10514          CPPFLAGS="$cf_trim_CPPFLAGS"
10515
10516         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10517         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10518
10519 echo "${as_me:-configure}:10519: testing if the second compile does not leave our definition intact error ..." 1>&5
10520
10521          cat >"conftest.$ac_ext" <<_ACEOF
10522 #line 10522 "configure"
10523 #include "confdefs.h"
10524 #include <sys/types.h>
10525 int
10526 main (void)
10527 {
10528
10529 #ifndef _POSIX_C_SOURCE
10530 make an error
10531 #endif
10532   ;
10533   return 0;
10534 }
10535 _ACEOF
10536 rm -f "conftest.$ac_objext"
10537 if { (eval echo "$as_me:10537: \"$ac_compile\"") >&5
10538   (eval $ac_compile) 2>&5
10539   ac_status=$?
10540   echo "$as_me:10540: \$? = $ac_status" >&5
10541   (exit "$ac_status"); } &&
10542          { ac_try='test -s "conftest.$ac_objext"'
10543   { (eval echo "$as_me:10543: \"$ac_try\"") >&5
10544   (eval $ac_try) 2>&5
10545   ac_status=$?
10546   echo "$as_me:10546: \$? = $ac_status" >&5
10547   (exit "$ac_status"); }; }; then
10548   :
10549 else
10550   echo "$as_me: failed program was:" >&5
10551 cat "conftest.$ac_ext" >&5
10552 cf_cv_posix_c_source=no
10553 fi
10554 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10555          CFLAGS="$cf_save_CFLAGS"
10556          CPPFLAGS="$cf_save_CPPFLAGS"
10557
10558 fi
10559 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10560
10561 fi
10562 echo "$as_me:10562: result: $cf_cv_posix_c_source" >&5
10563 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10564
10565 if test "$cf_cv_posix_c_source" != no ; then
10566         CFLAGS="$cf_trim_CFLAGS"
10567         CPPFLAGS="$cf_trim_CPPFLAGS"
10568
10569 cf_fix_cppflags=no
10570 cf_new_cflags=
10571 cf_new_cppflags=
10572 cf_new_extra_cppflags=
10573
10574 for cf_add_cflags in $cf_cv_posix_c_source
10575 do
10576 case "$cf_fix_cppflags" in
10577 (no)
10578         case "$cf_add_cflags" in
10579         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10580                 case "$cf_add_cflags" in
10581                 (-D*)
10582                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10583
10584                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10585                                 && test -z "${cf_tst_cflags}" \
10586                                 && cf_fix_cppflags=yes
10587
10588                         if test "$cf_fix_cppflags" = yes ; then
10589
10590         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10591         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10592
10593                                 continue
10594                         elif test "${cf_tst_cflags}" = "\"'" ; then
10595
10596         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10597         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10598
10599                                 continue
10600                         fi
10601                         ;;
10602                 esac
10603                 case "$CPPFLAGS" in
10604                 (*$cf_add_cflags)
10605                         ;;
10606                 (*)
10607                         case "$cf_add_cflags" in
10608                         (-D*)
10609                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10610
10611 CPPFLAGS=`echo "$CPPFLAGS" | \
10612         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10613                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10614
10615                                 ;;
10616                         esac
10617
10618         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10619         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10620
10621                         ;;
10622                 esac
10623                 ;;
10624         (*)
10625
10626         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10627         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10628
10629                 ;;
10630         esac
10631         ;;
10632 (yes)
10633
10634         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10635         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10636
10637         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10638
10639         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10640                 && test -z "${cf_tst_cflags}" \
10641                 && cf_fix_cppflags=no
10642         ;;
10643 esac
10644 done
10645
10646 if test -n "$cf_new_cflags" ; then
10647
10648         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10649         CFLAGS="${CFLAGS}$cf_new_cflags"
10650
10651 fi
10652
10653 if test -n "$cf_new_cppflags" ; then
10654
10655         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10656         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10657
10658 fi
10659
10660 if test -n "$cf_new_extra_cppflags" ; then
10661
10662         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10663         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10664
10665 fi
10666
10667 fi
10668
10669 fi # cf_cv_posix_visible
10670
10671         ;;
10672 (netbsd*)
10673         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10674         ;;
10675 (openbsd[6-9]*)
10676         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10677         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10678         # Abusing the conformance level is a workaround.
10679         { echo "$as_me:10679: WARNING: this system does not provide usable locale support" >&5
10680 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10681         cf_xopen_source="-D_BSD_SOURCE"
10682         cf_XOPEN_SOURCE=700
10683         ;;
10684 (openbsd[4-5]*)
10685         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10686         cf_xopen_source="-D_BSD_SOURCE"
10687         cf_XOPEN_SOURCE=600
10688         ;;
10689 (openbsd*)
10690         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10691         ;;
10692 (osf[45]*)
10693         cf_xopen_source="-D_OSF_SOURCE"
10694         ;;
10695 (nto-qnx*)
10696         cf_xopen_source="-D_QNX_SOURCE"
10697         ;;
10698 (sco*)
10699         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10700         ;;
10701 (solaris2.*)
10702         cf_xopen_source="-D__EXTENSIONS__"
10703         cf_cv_xopen_source=broken
10704         ;;
10705 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10706         cf_XOPEN_SOURCE=
10707         cf_POSIX_C_SOURCE=
10708         ;;
10709 (*)
10710
10711 echo "$as_me:10711: checking if we should define _XOPEN_SOURCE" >&5
10712 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10713 if test "${cf_cv_xopen_source+set}" = set; then
10714   echo $ECHO_N "(cached) $ECHO_C" >&6
10715 else
10716
10717         cat >"conftest.$ac_ext" <<_ACEOF
10718 #line 10718 "configure"
10719 #include "confdefs.h"
10720
10721 #include <stdlib.h>
10722 #include <string.h>
10723 #include <sys/types.h>
10724
10725 int
10726 main (void)
10727 {
10728
10729 #ifndef _XOPEN_SOURCE
10730 make an error
10731 #endif
10732   ;
10733   return 0;
10734 }
10735 _ACEOF
10736 rm -f "conftest.$ac_objext"
10737 if { (eval echo "$as_me:10737: \"$ac_compile\"") >&5
10738   (eval $ac_compile) 2>&5
10739   ac_status=$?
10740   echo "$as_me:10740: \$? = $ac_status" >&5
10741   (exit "$ac_status"); } &&
10742          { ac_try='test -s "conftest.$ac_objext"'
10743   { (eval echo "$as_me:10743: \"$ac_try\"") >&5
10744   (eval $ac_try) 2>&5
10745   ac_status=$?
10746   echo "$as_me:10746: \$? = $ac_status" >&5
10747   (exit "$ac_status"); }; }; then
10748   cf_cv_xopen_source=no
10749 else
10750   echo "$as_me: failed program was:" >&5
10751 cat "conftest.$ac_ext" >&5
10752 cf_save="$CPPFLAGS"
10753
10754         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10755         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10756
10757          cat >"conftest.$ac_ext" <<_ACEOF
10758 #line 10758 "configure"
10759 #include "confdefs.h"
10760
10761 #include <stdlib.h>
10762 #include <string.h>
10763 #include <sys/types.h>
10764
10765 int
10766 main (void)
10767 {
10768
10769 #ifdef _XOPEN_SOURCE
10770 make an error
10771 #endif
10772   ;
10773   return 0;
10774 }
10775 _ACEOF
10776 rm -f "conftest.$ac_objext"
10777 if { (eval echo "$as_me:10777: \"$ac_compile\"") >&5
10778   (eval $ac_compile) 2>&5
10779   ac_status=$?
10780   echo "$as_me:10780: \$? = $ac_status" >&5
10781   (exit "$ac_status"); } &&
10782          { ac_try='test -s "conftest.$ac_objext"'
10783   { (eval echo "$as_me:10783: \"$ac_try\"") >&5
10784   (eval $ac_try) 2>&5
10785   ac_status=$?
10786   echo "$as_me:10786: \$? = $ac_status" >&5
10787   (exit "$ac_status"); }; }; then
10788   cf_cv_xopen_source=no
10789 else
10790   echo "$as_me: failed program was:" >&5
10791 cat "conftest.$ac_ext" >&5
10792 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10793 fi
10794 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10795         CPPFLAGS="$cf_save"
10796
10797 fi
10798 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10799
10800 fi
10801 echo "$as_me:10801: result: $cf_cv_xopen_source" >&5
10802 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10803
10804 if test "$cf_cv_xopen_source" != no ; then
10805
10806 CFLAGS=`echo "$CFLAGS" | \
10807         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10808                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10809
10810 CPPFLAGS=`echo "$CPPFLAGS" | \
10811         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10812                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10813
10814         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10815
10816 for cf_add_cflags in $cf_temp_xopen_source
10817 do
10818         case "x$cf_add_cflags" in
10819         (x-[DU]*)
10820
10821 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10822 while true
10823 do
10824         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'`
10825         test "$CFLAGS" != "$cf_old_cflag" || break
10826
10827         CFLAGS="$cf_old_cflag"
10828 done
10829
10830 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10831 while true
10832 do
10833         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'`
10834         test "$CPPFLAGS" != "$cf_old_cflag" || break
10835
10836         CPPFLAGS="$cf_old_cflag"
10837 done
10838
10839                 ;;
10840         esac
10841
10842 cf_fix_cppflags=no
10843 cf_new_cflags=
10844 cf_new_cppflags=
10845 cf_new_extra_cppflags=
10846
10847 for cf_add_cflags in $cf_add_cflags
10848 do
10849 case "$cf_fix_cppflags" in
10850 (no)
10851         case "$cf_add_cflags" in
10852         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10853                 case "$cf_add_cflags" in
10854                 (-D*)
10855                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10856
10857                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10858                                 && test -z "${cf_tst_cflags}" \
10859                                 && cf_fix_cppflags=yes
10860
10861                         if test "$cf_fix_cppflags" = yes ; then
10862
10863         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10864         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10865
10866                                 continue
10867                         elif test "${cf_tst_cflags}" = "\"'" ; then
10868
10869         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10870         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10871
10872                                 continue
10873                         fi
10874                         ;;
10875                 esac
10876                 case "$CPPFLAGS" in
10877                 (*$cf_add_cflags)
10878                         ;;
10879                 (*)
10880                         case "$cf_add_cflags" in
10881                         (-D*)
10882                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10883
10884 CPPFLAGS=`echo "$CPPFLAGS" | \
10885         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10886                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10887
10888                                 ;;
10889                         esac
10890
10891         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10892         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10893
10894                         ;;
10895                 esac
10896                 ;;
10897         (*)
10898
10899         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10900         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10901
10902                 ;;
10903         esac
10904         ;;
10905 (yes)
10906
10907         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10908         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10909
10910         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10911
10912         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10913                 && test -z "${cf_tst_cflags}" \
10914                 && cf_fix_cppflags=no
10915         ;;
10916 esac
10917 done
10918
10919 if test -n "$cf_new_cflags" ; then
10920
10921         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10922         CFLAGS="${CFLAGS}$cf_new_cflags"
10923
10924 fi
10925
10926 if test -n "$cf_new_cppflags" ; then
10927
10928         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10929         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10930
10931 fi
10932
10933 if test -n "$cf_new_extra_cppflags" ; then
10934
10935         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10936         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10937
10938 fi
10939
10940 done
10941
10942 fi
10943
10944 if test "$cf_cv_posix_visible" = no; then
10945
10946 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10947
10948 cf_save_CFLAGS="$CFLAGS"
10949 cf_save_CPPFLAGS="$CPPFLAGS"
10950
10951 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10952         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10953                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10954
10955 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10956         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10957                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10958
10959 echo "$as_me:10959: checking if we should define _POSIX_C_SOURCE" >&5
10960 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10961 if test "${cf_cv_posix_c_source+set}" = set; then
10962   echo $ECHO_N "(cached) $ECHO_C" >&6
10963 else
10964
10965 echo "${as_me:-configure}:10965: testing if the symbol is already defined go no further ..." 1>&5
10966
10967         cat >"conftest.$ac_ext" <<_ACEOF
10968 #line 10968 "configure"
10969 #include "confdefs.h"
10970 #include <sys/types.h>
10971 int
10972 main (void)
10973 {
10974
10975 #ifndef _POSIX_C_SOURCE
10976 make an error
10977 #endif
10978   ;
10979   return 0;
10980 }
10981 _ACEOF
10982 rm -f "conftest.$ac_objext"
10983 if { (eval echo "$as_me:10983: \"$ac_compile\"") >&5
10984   (eval $ac_compile) 2>&5
10985   ac_status=$?
10986   echo "$as_me:10986: \$? = $ac_status" >&5
10987   (exit "$ac_status"); } &&
10988          { ac_try='test -s "conftest.$ac_objext"'
10989   { (eval echo "$as_me:10989: \"$ac_try\"") >&5
10990   (eval $ac_try) 2>&5
10991   ac_status=$?
10992   echo "$as_me:10992: \$? = $ac_status" >&5
10993   (exit "$ac_status"); }; }; then
10994   cf_cv_posix_c_source=no
10995 else
10996   echo "$as_me: failed program was:" >&5
10997 cat "conftest.$ac_ext" >&5
10998 cf_want_posix_source=no
10999          case .$cf_POSIX_C_SOURCE in
11000          (.[12]??*)
11001                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11002                 ;;
11003          (.2)
11004                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11005                 cf_want_posix_source=yes
11006                 ;;
11007          (.*)
11008                 cf_want_posix_source=yes
11009                 ;;
11010          esac
11011          if test "$cf_want_posix_source" = yes ; then
11012                 cat >"conftest.$ac_ext" <<_ACEOF
11013 #line 11013 "configure"
11014 #include "confdefs.h"
11015 #include <sys/types.h>
11016 int
11017 main (void)
11018 {
11019
11020 #ifdef _POSIX_SOURCE
11021 make an error
11022 #endif
11023   ;
11024   return 0;
11025 }
11026 _ACEOF
11027 rm -f "conftest.$ac_objext"
11028 if { (eval echo "$as_me:11028: \"$ac_compile\"") >&5
11029   (eval $ac_compile) 2>&5
11030   ac_status=$?
11031   echo "$as_me:11031: \$? = $ac_status" >&5
11032   (exit "$ac_status"); } &&
11033          { ac_try='test -s "conftest.$ac_objext"'
11034   { (eval echo "$as_me:11034: \"$ac_try\"") >&5
11035   (eval $ac_try) 2>&5
11036   ac_status=$?
11037   echo "$as_me:11037: \$? = $ac_status" >&5
11038   (exit "$ac_status"); }; }; then
11039   :
11040 else
11041   echo "$as_me: failed program was:" >&5
11042 cat "conftest.$ac_ext" >&5
11043 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11044 fi
11045 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11046          fi
11047
11048 echo "${as_me:-configure}:11048: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11049
11050          CFLAGS="$cf_trim_CFLAGS"
11051          CPPFLAGS="$cf_trim_CPPFLAGS"
11052
11053         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11054         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11055
11056 echo "${as_me:-configure}:11056: testing if the second compile does not leave our definition intact error ..." 1>&5
11057
11058          cat >"conftest.$ac_ext" <<_ACEOF
11059 #line 11059 "configure"
11060 #include "confdefs.h"
11061 #include <sys/types.h>
11062 int
11063 main (void)
11064 {
11065
11066 #ifndef _POSIX_C_SOURCE
11067 make an error
11068 #endif
11069   ;
11070   return 0;
11071 }
11072 _ACEOF
11073 rm -f "conftest.$ac_objext"
11074 if { (eval echo "$as_me:11074: \"$ac_compile\"") >&5
11075   (eval $ac_compile) 2>&5
11076   ac_status=$?
11077   echo "$as_me:11077: \$? = $ac_status" >&5
11078   (exit "$ac_status"); } &&
11079          { ac_try='test -s "conftest.$ac_objext"'
11080   { (eval echo "$as_me:11080: \"$ac_try\"") >&5
11081   (eval $ac_try) 2>&5
11082   ac_status=$?
11083   echo "$as_me:11083: \$? = $ac_status" >&5
11084   (exit "$ac_status"); }; }; then
11085   :
11086 else
11087   echo "$as_me: failed program was:" >&5
11088 cat "conftest.$ac_ext" >&5
11089 cf_cv_posix_c_source=no
11090 fi
11091 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11092          CFLAGS="$cf_save_CFLAGS"
11093          CPPFLAGS="$cf_save_CPPFLAGS"
11094
11095 fi
11096 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11097
11098 fi
11099 echo "$as_me:11099: result: $cf_cv_posix_c_source" >&5
11100 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11101
11102 if test "$cf_cv_posix_c_source" != no ; then
11103         CFLAGS="$cf_trim_CFLAGS"
11104         CPPFLAGS="$cf_trim_CPPFLAGS"
11105
11106 cf_fix_cppflags=no
11107 cf_new_cflags=
11108 cf_new_cppflags=
11109 cf_new_extra_cppflags=
11110
11111 for cf_add_cflags in $cf_cv_posix_c_source
11112 do
11113 case "$cf_fix_cppflags" in
11114 (no)
11115         case "$cf_add_cflags" in
11116         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11117                 case "$cf_add_cflags" in
11118                 (-D*)
11119                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11120
11121                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11122                                 && test -z "${cf_tst_cflags}" \
11123                                 && cf_fix_cppflags=yes
11124
11125                         if test "$cf_fix_cppflags" = yes ; then
11126
11127         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11128         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11129
11130                                 continue
11131                         elif test "${cf_tst_cflags}" = "\"'" ; then
11132
11133         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11134         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11135
11136                                 continue
11137                         fi
11138                         ;;
11139                 esac
11140                 case "$CPPFLAGS" in
11141                 (*$cf_add_cflags)
11142                         ;;
11143                 (*)
11144                         case "$cf_add_cflags" in
11145                         (-D*)
11146                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11147
11148 CPPFLAGS=`echo "$CPPFLAGS" | \
11149         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11150                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11151
11152                                 ;;
11153                         esac
11154
11155         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11156         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11157
11158                         ;;
11159                 esac
11160                 ;;
11161         (*)
11162
11163         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11164         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11165
11166                 ;;
11167         esac
11168         ;;
11169 (yes)
11170
11171         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11172         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11173
11174         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11175
11176         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11177                 && test -z "${cf_tst_cflags}" \
11178                 && cf_fix_cppflags=no
11179         ;;
11180 esac
11181 done
11182
11183 if test -n "$cf_new_cflags" ; then
11184
11185         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11186         CFLAGS="${CFLAGS}$cf_new_cflags"
11187
11188 fi
11189
11190 if test -n "$cf_new_cppflags" ; then
11191
11192         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11193         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11194
11195 fi
11196
11197 if test -n "$cf_new_extra_cppflags" ; then
11198
11199         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11200         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11201
11202 fi
11203
11204 fi
11205
11206 fi # cf_cv_posix_visible
11207
11208         ;;
11209 esac
11210
11211 if test -n "$cf_xopen_source" ; then
11212
11213 for cf_add_cflags in $cf_xopen_source
11214 do
11215         case "x$cf_add_cflags" in
11216         (x-[DU]*)
11217
11218 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11219 while true
11220 do
11221         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'`
11222         test "$CFLAGS" != "$cf_old_cflag" || break
11223         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11224
11225 echo "${as_me:-configure}:11225: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11226
11227         CFLAGS="$cf_old_cflag"
11228 done
11229
11230 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11231 while true
11232 do
11233         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'`
11234         test "$CPPFLAGS" != "$cf_old_cflag" || break
11235         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11236
11237 echo "${as_me:-configure}:11237: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11238
11239         CPPFLAGS="$cf_old_cflag"
11240 done
11241
11242                 ;;
11243         esac
11244
11245 cf_fix_cppflags=no
11246 cf_new_cflags=
11247 cf_new_cppflags=
11248 cf_new_extra_cppflags=
11249
11250 for cf_add_cflags in $cf_add_cflags
11251 do
11252 case "$cf_fix_cppflags" in
11253 (no)
11254         case "$cf_add_cflags" in
11255         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11256                 case "$cf_add_cflags" in
11257                 (-D*)
11258                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11259
11260                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11261                                 && test -z "${cf_tst_cflags}" \
11262                                 && cf_fix_cppflags=yes
11263
11264                         if test "$cf_fix_cppflags" = yes ; then
11265
11266         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11267         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11268
11269                                 continue
11270                         elif test "${cf_tst_cflags}" = "\"'" ; then
11271
11272         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11273         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11274
11275                                 continue
11276                         fi
11277                         ;;
11278                 esac
11279                 case "$CPPFLAGS" in
11280                 (*$cf_add_cflags)
11281                         ;;
11282                 (*)
11283                         case "$cf_add_cflags" in
11284                         (-D*)
11285                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11286
11287 CPPFLAGS=`echo "$CPPFLAGS" | \
11288         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11289                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11290
11291                                 ;;
11292                         esac
11293
11294         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11295         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11296
11297                         ;;
11298                 esac
11299                 ;;
11300         (*)
11301
11302         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11303         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11304
11305                 ;;
11306         esac
11307         ;;
11308 (yes)
11309
11310         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11311         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11312
11313         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11314
11315         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11316                 && test -z "${cf_tst_cflags}" \
11317                 && cf_fix_cppflags=no
11318         ;;
11319 esac
11320 done
11321
11322 if test -n "$cf_new_cflags" ; then
11323         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11324
11325 echo "${as_me:-configure}:11325: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11326
11327         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11328         CFLAGS="${CFLAGS}$cf_new_cflags"
11329
11330 fi
11331
11332 if test -n "$cf_new_cppflags" ; then
11333         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11334
11335 echo "${as_me:-configure}:11335: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11336
11337         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11338         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11339
11340 fi
11341
11342 if test -n "$cf_new_extra_cppflags" ; then
11343         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11344
11345 echo "${as_me:-configure}:11345: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11346
11347         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11348         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11349
11350 fi
11351
11352 done
11353
11354 fi
11355
11356 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11357         echo "$as_me:11357: checking if _XOPEN_SOURCE really is set" >&5
11358 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11359         cat >"conftest.$ac_ext" <<_ACEOF
11360 #line 11360 "configure"
11361 #include "confdefs.h"
11362 #include <stdlib.h>
11363 int
11364 main (void)
11365 {
11366
11367 #ifndef _XOPEN_SOURCE
11368 make an error
11369 #endif
11370   ;
11371   return 0;
11372 }
11373 _ACEOF
11374 rm -f "conftest.$ac_objext"
11375 if { (eval echo "$as_me:11375: \"$ac_compile\"") >&5
11376   (eval $ac_compile) 2>&5
11377   ac_status=$?
11378   echo "$as_me:11378: \$? = $ac_status" >&5
11379   (exit "$ac_status"); } &&
11380          { ac_try='test -s "conftest.$ac_objext"'
11381   { (eval echo "$as_me:11381: \"$ac_try\"") >&5
11382   (eval $ac_try) 2>&5
11383   ac_status=$?
11384   echo "$as_me:11384: \$? = $ac_status" >&5
11385   (exit "$ac_status"); }; }; then
11386   cf_XOPEN_SOURCE_set=yes
11387 else
11388   echo "$as_me: failed program was:" >&5
11389 cat "conftest.$ac_ext" >&5
11390 cf_XOPEN_SOURCE_set=no
11391 fi
11392 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11393         echo "$as_me:11393: result: $cf_XOPEN_SOURCE_set" >&5
11394 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11395         if test "$cf_XOPEN_SOURCE_set" = yes
11396         then
11397                 cat >"conftest.$ac_ext" <<_ACEOF
11398 #line 11398 "configure"
11399 #include "confdefs.h"
11400 #include <stdlib.h>
11401 int
11402 main (void)
11403 {
11404
11405 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11406 make an error
11407 #endif
11408   ;
11409   return 0;
11410 }
11411 _ACEOF
11412 rm -f "conftest.$ac_objext"
11413 if { (eval echo "$as_me:11413: \"$ac_compile\"") >&5
11414   (eval $ac_compile) 2>&5
11415   ac_status=$?
11416   echo "$as_me:11416: \$? = $ac_status" >&5
11417   (exit "$ac_status"); } &&
11418          { ac_try='test -s "conftest.$ac_objext"'
11419   { (eval echo "$as_me:11419: \"$ac_try\"") >&5
11420   (eval $ac_try) 2>&5
11421   ac_status=$?
11422   echo "$as_me:11422: \$? = $ac_status" >&5
11423   (exit "$ac_status"); }; }; then
11424   cf_XOPEN_SOURCE_set_ok=yes
11425 else
11426   echo "$as_me: failed program was:" >&5
11427 cat "conftest.$ac_ext" >&5
11428 cf_XOPEN_SOURCE_set_ok=no
11429 fi
11430 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11431                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11432                 then
11433                         { echo "$as_me:11433: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11434 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11435                 fi
11436         else
11437
11438 echo "$as_me:11438: checking if we should define _XOPEN_SOURCE" >&5
11439 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11440 if test "${cf_cv_xopen_source+set}" = set; then
11441   echo $ECHO_N "(cached) $ECHO_C" >&6
11442 else
11443
11444         cat >"conftest.$ac_ext" <<_ACEOF
11445 #line 11445 "configure"
11446 #include "confdefs.h"
11447
11448 #include <stdlib.h>
11449 #include <string.h>
11450 #include <sys/types.h>
11451
11452 int
11453 main (void)
11454 {
11455
11456 #ifndef _XOPEN_SOURCE
11457 make an error
11458 #endif
11459   ;
11460   return 0;
11461 }
11462 _ACEOF
11463 rm -f "conftest.$ac_objext"
11464 if { (eval echo "$as_me:11464: \"$ac_compile\"") >&5
11465   (eval $ac_compile) 2>&5
11466   ac_status=$?
11467   echo "$as_me:11467: \$? = $ac_status" >&5
11468   (exit "$ac_status"); } &&
11469          { ac_try='test -s "conftest.$ac_objext"'
11470   { (eval echo "$as_me:11470: \"$ac_try\"") >&5
11471   (eval $ac_try) 2>&5
11472   ac_status=$?
11473   echo "$as_me:11473: \$? = $ac_status" >&5
11474   (exit "$ac_status"); }; }; then
11475   cf_cv_xopen_source=no
11476 else
11477   echo "$as_me: failed program was:" >&5
11478 cat "conftest.$ac_ext" >&5
11479 cf_save="$CPPFLAGS"
11480
11481         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11482         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11483
11484          cat >"conftest.$ac_ext" <<_ACEOF
11485 #line 11485 "configure"
11486 #include "confdefs.h"
11487
11488 #include <stdlib.h>
11489 #include <string.h>
11490 #include <sys/types.h>
11491
11492 int
11493 main (void)
11494 {
11495
11496 #ifdef _XOPEN_SOURCE
11497 make an error
11498 #endif
11499   ;
11500   return 0;
11501 }
11502 _ACEOF
11503 rm -f "conftest.$ac_objext"
11504 if { (eval echo "$as_me:11504: \"$ac_compile\"") >&5
11505   (eval $ac_compile) 2>&5
11506   ac_status=$?
11507   echo "$as_me:11507: \$? = $ac_status" >&5
11508   (exit "$ac_status"); } &&
11509          { ac_try='test -s "conftest.$ac_objext"'
11510   { (eval echo "$as_me:11510: \"$ac_try\"") >&5
11511   (eval $ac_try) 2>&5
11512   ac_status=$?
11513   echo "$as_me:11513: \$? = $ac_status" >&5
11514   (exit "$ac_status"); }; }; then
11515   cf_cv_xopen_source=no
11516 else
11517   echo "$as_me: failed program was:" >&5
11518 cat "conftest.$ac_ext" >&5
11519 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11520 fi
11521 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11522         CPPFLAGS="$cf_save"
11523
11524 fi
11525 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11526
11527 fi
11528 echo "$as_me:11528: result: $cf_cv_xopen_source" >&5
11529 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11530
11531 if test "$cf_cv_xopen_source" != no ; then
11532
11533 CFLAGS=`echo "$CFLAGS" | \
11534         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11535                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11536
11537 CPPFLAGS=`echo "$CPPFLAGS" | \
11538         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11539                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11540
11541         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11542
11543 for cf_add_cflags in $cf_temp_xopen_source
11544 do
11545         case "x$cf_add_cflags" in
11546         (x-[DU]*)
11547
11548 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11549 while true
11550 do
11551         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'`
11552         test "$CFLAGS" != "$cf_old_cflag" || break
11553
11554         CFLAGS="$cf_old_cflag"
11555 done
11556
11557 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11558 while true
11559 do
11560         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'`
11561         test "$CPPFLAGS" != "$cf_old_cflag" || break
11562
11563         CPPFLAGS="$cf_old_cflag"
11564 done
11565
11566                 ;;
11567         esac
11568
11569 cf_fix_cppflags=no
11570 cf_new_cflags=
11571 cf_new_cppflags=
11572 cf_new_extra_cppflags=
11573
11574 for cf_add_cflags in $cf_add_cflags
11575 do
11576 case "$cf_fix_cppflags" in
11577 (no)
11578         case "$cf_add_cflags" in
11579         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11580                 case "$cf_add_cflags" in
11581                 (-D*)
11582                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11583
11584                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11585                                 && test -z "${cf_tst_cflags}" \
11586                                 && cf_fix_cppflags=yes
11587
11588                         if test "$cf_fix_cppflags" = yes ; then
11589
11590         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11591         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11592
11593                                 continue
11594                         elif test "${cf_tst_cflags}" = "\"'" ; then
11595
11596         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11597         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11598
11599                                 continue
11600                         fi
11601                         ;;
11602                 esac
11603                 case "$CPPFLAGS" in
11604                 (*$cf_add_cflags)
11605                         ;;
11606                 (*)
11607                         case "$cf_add_cflags" in
11608                         (-D*)
11609                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11610
11611 CPPFLAGS=`echo "$CPPFLAGS" | \
11612         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11613                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11614
11615                                 ;;
11616                         esac
11617
11618         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11619         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11620
11621                         ;;
11622                 esac
11623                 ;;
11624         (*)
11625
11626         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11627         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11628
11629                 ;;
11630         esac
11631         ;;
11632 (yes)
11633
11634         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11635         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11636
11637         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11638
11639         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11640                 && test -z "${cf_tst_cflags}" \
11641                 && cf_fix_cppflags=no
11642         ;;
11643 esac
11644 done
11645
11646 if test -n "$cf_new_cflags" ; then
11647
11648         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11649         CFLAGS="${CFLAGS}$cf_new_cflags"
11650
11651 fi
11652
11653 if test -n "$cf_new_cppflags" ; then
11654
11655         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11656         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11657
11658 fi
11659
11660 if test -n "$cf_new_extra_cppflags" ; then
11661
11662         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11663         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11664
11665 fi
11666
11667 done
11668
11669 fi
11670
11671         fi
11672 fi
11673 fi # cf_cv_posix_visible
11674
11675 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11676
11677 # Work around breakage on OS X
11678
11679 echo "$as_me:11679: checking if SIGWINCH is defined" >&5
11680 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11681 if test "${cf_cv_define_sigwinch+set}" = set; then
11682   echo $ECHO_N "(cached) $ECHO_C" >&6
11683 else
11684
11685         cat >"conftest.$ac_ext" <<_ACEOF
11686 #line 11686 "configure"
11687 #include "confdefs.h"
11688
11689 #include <sys/types.h>
11690 #include <sys/signal.h>
11691
11692 int
11693 main (void)
11694 {
11695 int x = SIGWINCH; (void)x
11696   ;
11697   return 0;
11698 }
11699 _ACEOF
11700 rm -f "conftest.$ac_objext"
11701 if { (eval echo "$as_me:11701: \"$ac_compile\"") >&5
11702   (eval $ac_compile) 2>&5
11703   ac_status=$?
11704   echo "$as_me:11704: \$? = $ac_status" >&5
11705   (exit "$ac_status"); } &&
11706          { ac_try='test -s "conftest.$ac_objext"'
11707   { (eval echo "$as_me:11707: \"$ac_try\"") >&5
11708   (eval $ac_try) 2>&5
11709   ac_status=$?
11710   echo "$as_me:11710: \$? = $ac_status" >&5
11711   (exit "$ac_status"); }; }; then
11712   cf_cv_define_sigwinch=yes
11713 else
11714   echo "$as_me: failed program was:" >&5
11715 cat "conftest.$ac_ext" >&5
11716 cat >"conftest.$ac_ext" <<_ACEOF
11717 #line 11717 "configure"
11718 #include "confdefs.h"
11719
11720 #undef _XOPEN_SOURCE
11721 #undef _POSIX_SOURCE
11722 #undef _POSIX_C_SOURCE
11723 #include <sys/types.h>
11724 #include <sys/signal.h>
11725
11726 int
11727 main (void)
11728 {
11729 int x = SIGWINCH; (void)x
11730   ;
11731   return 0;
11732 }
11733 _ACEOF
11734 rm -f "conftest.$ac_objext"
11735 if { (eval echo "$as_me:11735: \"$ac_compile\"") >&5
11736   (eval $ac_compile) 2>&5
11737   ac_status=$?
11738   echo "$as_me:11738: \$? = $ac_status" >&5
11739   (exit "$ac_status"); } &&
11740          { ac_try='test -s "conftest.$ac_objext"'
11741   { (eval echo "$as_me:11741: \"$ac_try\"") >&5
11742   (eval $ac_try) 2>&5
11743   ac_status=$?
11744   echo "$as_me:11744: \$? = $ac_status" >&5
11745   (exit "$ac_status"); }; }; then
11746   cf_cv_define_sigwinch=maybe
11747 else
11748   echo "$as_me: failed program was:" >&5
11749 cat "conftest.$ac_ext" >&5
11750 cf_cv_define_sigwinch=no
11751 fi
11752 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11753
11754 fi
11755 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11756
11757 fi
11758 echo "$as_me:11758: result: $cf_cv_define_sigwinch" >&5
11759 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11760
11761 if test "$cf_cv_define_sigwinch" = maybe ; then
11762 echo "$as_me:11762: checking for actual SIGWINCH definition" >&5
11763 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11764 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11765   echo $ECHO_N "(cached) $ECHO_C" >&6
11766 else
11767
11768 cf_cv_fixup_sigwinch=unknown
11769 cf_sigwinch=32
11770 while test "$cf_sigwinch" != 1
11771 do
11772         cat >"conftest.$ac_ext" <<_ACEOF
11773 #line 11773 "configure"
11774 #include "confdefs.h"
11775
11776 #undef _XOPEN_SOURCE
11777 #undef _POSIX_SOURCE
11778 #undef _POSIX_C_SOURCE
11779 #include <sys/types.h>
11780 #include <sys/signal.h>
11781
11782 int
11783 main (void)
11784 {
11785
11786 #if SIGWINCH != $cf_sigwinch
11787 make an error
11788 #endif
11789 int x = SIGWINCH; (void)x
11790   ;
11791   return 0;
11792 }
11793 _ACEOF
11794 rm -f "conftest.$ac_objext"
11795 if { (eval echo "$as_me:11795: \"$ac_compile\"") >&5
11796   (eval $ac_compile) 2>&5
11797   ac_status=$?
11798   echo "$as_me:11798: \$? = $ac_status" >&5
11799   (exit "$ac_status"); } &&
11800          { ac_try='test -s "conftest.$ac_objext"'
11801   { (eval echo "$as_me:11801: \"$ac_try\"") >&5
11802   (eval $ac_try) 2>&5
11803   ac_status=$?
11804   echo "$as_me:11804: \$? = $ac_status" >&5
11805   (exit "$ac_status"); }; }; then
11806   cf_cv_fixup_sigwinch=$cf_sigwinch
11807          break
11808 else
11809   echo "$as_me: failed program was:" >&5
11810 cat "conftest.$ac_ext" >&5
11811 fi
11812 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11813
11814 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11815 done
11816
11817 fi
11818 echo "$as_me:11818: result: $cf_cv_fixup_sigwinch" >&5
11819 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11820
11821         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11822                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11823         fi
11824 fi
11825
11826 # Checks for CODESET support.
11827
11828 echo "$as_me:11828: checking for nl_langinfo and CODESET" >&5
11829 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11830 if test "${am_cv_langinfo_codeset+set}" = set; then
11831   echo $ECHO_N "(cached) $ECHO_C" >&6
11832 else
11833   cat >"conftest.$ac_ext" <<_ACEOF
11834 #line 11834 "configure"
11835 #include "confdefs.h"
11836 #include <langinfo.h>
11837 int
11838 main (void)
11839 {
11840 char* cs = nl_langinfo(CODESET); (void)cs
11841   ;
11842   return 0;
11843 }
11844 _ACEOF
11845 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11846 if { (eval echo "$as_me:11846: \"$ac_link\"") >&5
11847   (eval $ac_link) 2>&5
11848   ac_status=$?
11849   echo "$as_me:11849: \$? = $ac_status" >&5
11850   (exit "$ac_status"); } &&
11851          { ac_try='test -s "conftest$ac_exeext"'
11852   { (eval echo "$as_me:11852: \"$ac_try\"") >&5
11853   (eval $ac_try) 2>&5
11854   ac_status=$?
11855   echo "$as_me:11855: \$? = $ac_status" >&5
11856   (exit "$ac_status"); }; }; then
11857   am_cv_langinfo_codeset=yes
11858 else
11859   echo "$as_me: failed program was:" >&5
11860 cat "conftest.$ac_ext" >&5
11861 am_cv_langinfo_codeset=no
11862 fi
11863 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11864
11865 fi
11866 echo "$as_me:11866: result: $am_cv_langinfo_codeset" >&5
11867 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11868         if test "$am_cv_langinfo_codeset" = yes; then
11869
11870 cat >>confdefs.h <<\EOF
11871 #define HAVE_LANGINFO_CODESET 1
11872 EOF
11873
11874         fi
11875
11876 # use these variables to work around a defect in gcc's fixincludes.
11877 NCURSES_OK_WCHAR_T=
11878 NCURSES_OK_WINT_T=
11879
11880 echo "$as_me:11880: checking if you want wide-character code" >&5
11881 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11882
11883 # Check whether --enable-widec or --disable-widec was given.
11884 if test "${enable_widec+set}" = set; then
11885   enableval="$enable_widec"
11886   with_widec=$enableval
11887 else
11888   with_widec=no
11889 fi;
11890 echo "$as_me:11890: result: $with_widec" >&5
11891 echo "${ECHO_T}$with_widec" >&6
11892
11893 NCURSES_WCWIDTH_GRAPHICS=1
11894
11895 if test "x$with_widec" = xyes ; then
11896         if test "x$disable_lib_suffixes" = xno ; then
11897                 LIB_SUFFIX="w${LIB_SUFFIX}"
11898         fi
11899
11900 cat >>confdefs.h <<\EOF
11901 #define USE_WIDEC_SUPPORT 1
11902 EOF
11903
11904 cat >>confdefs.h <<\EOF
11905 #define NCURSES_WIDECHAR 1
11906 EOF
11907
11908 for ac_header in \
11909 wchar.h \
11910 wctype.h \
11911
11912 do
11913 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11914 echo "$as_me:11914: checking for $ac_header" >&5
11915 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11916 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11917   echo $ECHO_N "(cached) $ECHO_C" >&6
11918 else
11919   cat >"conftest.$ac_ext" <<_ACEOF
11920 #line 11920 "configure"
11921 #include "confdefs.h"
11922 #include <$ac_header>
11923 _ACEOF
11924 if { (eval echo "$as_me:11924: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11925   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11926   ac_status=$?
11927   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11928   rm -f conftest.er1
11929   cat conftest.err >&5
11930   echo "$as_me:11930: \$? = $ac_status" >&5
11931   (exit "$ac_status"); } >/dev/null; then
11932   if test -s conftest.err; then
11933     ac_cpp_err=$ac_c_preproc_warn_flag
11934   else
11935     ac_cpp_err=
11936   fi
11937 else
11938   ac_cpp_err=yes
11939 fi
11940 if test -z "$ac_cpp_err"; then
11941   eval "$as_ac_Header=yes"
11942 else
11943   echo "$as_me: failed program was:" >&5
11944   cat "conftest.$ac_ext" >&5
11945   eval "$as_ac_Header=no"
11946 fi
11947 rm -f conftest.err "conftest.$ac_ext"
11948 fi
11949 echo "$as_me:11949: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11950 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11951 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11952   cat >>confdefs.h <<EOF
11953 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11954 EOF
11955
11956 fi
11957 done
11958
11959 echo "$as_me:11959: checking if wchar.h can be used as is" >&5
11960 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11961 if test "${cf_cv_wchar_h_okay+set}" = set; then
11962   echo $ECHO_N "(cached) $ECHO_C" >&6
11963 else
11964
11965 cat >"conftest.$ac_ext" <<_ACEOF
11966 #line 11966 "configure"
11967 #include "confdefs.h"
11968
11969 #include <stdlib.h>
11970 #ifdef HAVE_WCHAR_H
11971 #include <wchar.h>
11972 #endif
11973 #ifdef HAVE_WCTYPE_H
11974 #include <wctype.h>
11975 #endif
11976
11977 int
11978 main (void)
11979 {
11980
11981         wint_t foo = 0;
11982         int bar = iswpunct(foo)
11983   ;
11984   return 0;
11985 }
11986 _ACEOF
11987 rm -f "conftest.$ac_objext"
11988 if { (eval echo "$as_me:11988: \"$ac_compile\"") >&5
11989   (eval $ac_compile) 2>&5
11990   ac_status=$?
11991   echo "$as_me:11991: \$? = $ac_status" >&5
11992   (exit "$ac_status"); } &&
11993          { ac_try='test -s "conftest.$ac_objext"'
11994   { (eval echo "$as_me:11994: \"$ac_try\"") >&5
11995   (eval $ac_try) 2>&5
11996   ac_status=$?
11997   echo "$as_me:11997: \$? = $ac_status" >&5
11998   (exit "$ac_status"); }; }; then
11999   cf_cv_wchar_h_okay=yes
12000 else
12001   echo "$as_me: failed program was:" >&5
12002 cat "conftest.$ac_ext" >&5
12003 cf_cv_wchar_h_okay=no
12004 fi
12005 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12006 fi
12007 echo "$as_me:12007: result: $cf_cv_wchar_h_okay" >&5
12008 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12009
12010 if test "$cf_cv_wchar_h_okay" = no
12011 then
12012
12013 echo "$as_me:12013: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12014 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12015 cat >"conftest.$ac_ext" <<_ACEOF
12016 #line 12016 "configure"
12017 #include "confdefs.h"
12018 #include <sys/types.h>
12019
12020 int
12021 main (void)
12022 {
12023
12024 #ifndef _XOPEN_SOURCE_EXTENDED
12025 make an error
12026 #endif
12027   ;
12028   return 0;
12029 }
12030 _ACEOF
12031 rm -f "conftest.$ac_objext"
12032 if { (eval echo "$as_me:12032: \"$ac_compile\"") >&5
12033   (eval $ac_compile) 2>&5
12034   ac_status=$?
12035   echo "$as_me:12035: \$? = $ac_status" >&5
12036   (exit "$ac_status"); } &&
12037          { ac_try='test -s "conftest.$ac_objext"'
12038   { (eval echo "$as_me:12038: \"$ac_try\"") >&5
12039   (eval $ac_try) 2>&5
12040   ac_status=$?
12041   echo "$as_me:12041: \$? = $ac_status" >&5
12042   (exit "$ac_status"); }; }; then
12043   cf_result=no
12044 else
12045   echo "$as_me: failed program was:" >&5
12046 cat "conftest.$ac_ext" >&5
12047 cf_result=yes
12048 fi
12049 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12050 echo "$as_me:12050: result: $cf_result" >&5
12051 echo "${ECHO_T}$cf_result" >&6
12052
12053 if test "$cf_result" = yes ; then
12054         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12055 elif test "x" != "x" ; then
12056         echo "$as_me:12056: checking checking for compatible value versus " >&5
12057 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12058         cat >"conftest.$ac_ext" <<_ACEOF
12059 #line 12059 "configure"
12060 #include "confdefs.h"
12061 #include <sys/types.h>
12062
12063 int
12064 main (void)
12065 {
12066
12067 #if _XOPEN_SOURCE_EXTENDED- < 0
12068 make an error
12069 #endif
12070   ;
12071   return 0;
12072 }
12073 _ACEOF
12074 rm -f "conftest.$ac_objext"
12075 if { (eval echo "$as_me:12075: \"$ac_compile\"") >&5
12076   (eval $ac_compile) 2>&5
12077   ac_status=$?
12078   echo "$as_me:12078: \$? = $ac_status" >&5
12079   (exit "$ac_status"); } &&
12080          { ac_try='test -s "conftest.$ac_objext"'
12081   { (eval echo "$as_me:12081: \"$ac_try\"") >&5
12082   (eval $ac_try) 2>&5
12083   ac_status=$?
12084   echo "$as_me:12084: \$? = $ac_status" >&5
12085   (exit "$ac_status"); }; }; then
12086   cf_result=yes
12087 else
12088   echo "$as_me: failed program was:" >&5
12089 cat "conftest.$ac_ext" >&5
12090 cf_result=no
12091 fi
12092 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12093         echo "$as_me:12093: result: $cf_result" >&5
12094 echo "${ECHO_T}$cf_result" >&6
12095         if test "$cf_result" = no ; then
12096                 # perhaps we can override it - try...
12097                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12098         fi
12099 fi
12100
12101 fi
12102
12103 echo "$as_me:12103: checking if wcwidth agrees graphics are single-width" >&5
12104 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12105 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12106   echo $ECHO_N "(cached) $ECHO_C" >&6
12107 else
12108
12109 cat >conftest.in <<CF_EOF
12110 -       VT100 symbols
12111 0x250c  upper left corner
12112 0x2514  lower left corner
12113 0x2510  upper right corner
12114 0x2518  lower right corner
12115 0x251c  tee pointing left
12116 0x2524  tee pointing right
12117 0x2534  tee pointing up
12118 0x252c  tee pointing down
12119 0x2500  horizontal line
12120 0x2502  vertical line
12121 0x253c  large plus or crossover
12122 0x23ba  scan line 1
12123 0x23bd  scan line 9
12124 0x25c6  diamond
12125 0x2592  checker board (stipple)
12126 0x00b0  degree symbol
12127 0x00b1  plus/minus
12128 0x00b7  bullet
12129 -       Teletype 5410v1 symbols
12130 0x2190  arrow pointing left
12131 0x2192  arrow pointing right
12132 0x2193  arrow pointing down
12133 0x2191  arrow pointing up
12134 0x2592  board of squares
12135 0x2603  lantern symbol
12136 0x25ae  solid square block
12137 -       these defaults were invented for ncurses
12138 0x23bb  scan line 3
12139 0x23bc  scan line 7
12140 0x2264  less-than-or-equal-to
12141 0x2265  greater-than-or-equal-to
12142 0x03c0  greek pi
12143 0x2260  not-equal
12144 0x00a3  pound-sterling symbol
12145 -       thick-line-drawing
12146 0x250f  upper left corner
12147 0x2517  lower left corner
12148 0x2513  upper right corner
12149 0x251b  lower right corner
12150 0x2523  tee pointing left
12151 0x252b  tee pointing right
12152 0x253b  tee pointing up
12153 0x2533  tee pointing down
12154 0x2501  horizontal line
12155 0x2503  vertical line
12156 0x254b  large plus or crossover
12157 -       double-line-drawing
12158 0x2554  upper left corner
12159 0x255a  lower left corner
12160 0x2557  upper right corner
12161 0x255d  lower right corner
12162 0x2563  tee pointing left
12163 0x2560  tee pointing right
12164 0x2569  tee pointing up
12165 0x2566  tee pointing down
12166 0x2550  horizontal line
12167 0x2551  vertical line
12168 0x256c  large plus or crossover
12169 CF_EOF
12170 if test "$cross_compiling" = yes; then
12171   cf_cv_wcwidth_graphics=unknown
12172 else
12173   cat >"conftest.$ac_ext" <<_ACEOF
12174 #line 12174 "configure"
12175 #include "confdefs.h"
12176
12177 #include <locale.h>
12178 #include <stdio.h>
12179 #include <wchar.h>
12180
12181 #define MY_LEN 80
12182
12183 int
12184 main(void)
12185 {
12186         FILE *fp;
12187         int value;
12188         char buffer[MY_LEN + 1];
12189         char notes[MY_LEN + 1];
12190         int totals = 0;
12191         int passed = 0;
12192
12193         if (setlocale(LC_ALL, "en_US.UTF8") ||
12194                 setlocale(LC_ALL, "en_US.UTF-8") ||
12195                 setlocale(LC_ALL, "en_US.utf8") ||
12196                 setlocale(LC_ALL, "en_US.utf-8")) {
12197                 if ((fp = fopen("conftest.in", "r")) != 0) {
12198                         while (fgets(buffer, MY_LEN, fp) != 0) {
12199                                 if (*buffer == '-') {
12200                                         fprintf(stderr, "\\t%s", buffer);
12201                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12202                                         ++totals;
12203                                         if (wcwidth(value) == 1)
12204                                                 ++passed;
12205                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12206                                 } else {
12207                                         fprintf(stderr, "?\\t%s", buffer);
12208                                 }
12209                         }
12210                 }
12211         }
12212         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12213         return (totals == passed) ? 0 : 1;
12214 }
12215
12216 _ACEOF
12217 rm -f "conftest$ac_exeext"
12218 if { (eval echo "$as_me:12218: \"$ac_link\"") >&5
12219   (eval $ac_link) 2>&5
12220   ac_status=$?
12221   echo "$as_me:12221: \$? = $ac_status" >&5
12222   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12223   { (eval echo "$as_me:12223: \"$ac_try\"") >&5
12224   (eval $ac_try) 2>&5
12225   ac_status=$?
12226   echo "$as_me:12226: \$? = $ac_status" >&5
12227   (exit "$ac_status"); }; }; then
12228   cf_cv_wcwidth_graphics=yes
12229 else
12230   echo "$as_me: program exited with status $ac_status" >&5
12231 echo "$as_me: failed program was:" >&5
12232 cat "conftest.$ac_ext" >&5
12233 cf_cv_wcwidth_graphics=no
12234 fi
12235 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12236 fi
12237
12238 fi
12239 echo "$as_me:12239: result: $cf_cv_wcwidth_graphics" >&5
12240 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12241
12242         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12243
12244         # with_overwrite=no
12245         NCURSES_CH_T=cchar_t
12246
12247 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12248 do
12249 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12250 echo "$as_me:12250: checking for $ac_func" >&5
12251 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12252 if eval "test \"\${$as_ac_var+set}\" = set"; then
12253   echo $ECHO_N "(cached) $ECHO_C" >&6
12254 else
12255   cat >"conftest.$ac_ext" <<_ACEOF
12256 #line 12256 "configure"
12257 #include "confdefs.h"
12258 #define $ac_func autoconf_temporary
12259 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12260 #undef $ac_func
12261
12262 #ifdef __cplusplus
12263 extern "C"
12264 #endif
12265
12266 /* We use char because int might match the return type of a gcc2
12267    builtin and then its argument prototype would still apply.  */
12268 char $ac_func (void);
12269
12270 int
12271 main (void)
12272 {
12273
12274 /* The GNU C library defines stubs for functions which it implements
12275     to always fail with ENOSYS.  Some functions are actually named
12276     something starting with __ and the normal name is an alias.  */
12277 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12278 #error found stub for $ac_func
12279 #endif
12280
12281         return $ac_func ();
12282   ;
12283   return 0;
12284 }
12285 _ACEOF
12286 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12287 if { (eval echo "$as_me:12287: \"$ac_link\"") >&5
12288   (eval $ac_link) 2>&5
12289   ac_status=$?
12290   echo "$as_me:12290: \$? = $ac_status" >&5
12291   (exit "$ac_status"); } &&
12292          { ac_try='test -s "conftest$ac_exeext"'
12293   { (eval echo "$as_me:12293: \"$ac_try\"") >&5
12294   (eval $ac_try) 2>&5
12295   ac_status=$?
12296   echo "$as_me:12296: \$? = $ac_status" >&5
12297   (exit "$ac_status"); }; }; then
12298   eval "$as_ac_var=yes"
12299 else
12300   echo "$as_me: failed program was:" >&5
12301 cat "conftest.$ac_ext" >&5
12302 eval "$as_ac_var=no"
12303 fi
12304 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12305 fi
12306 echo "$as_me:12306: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12307 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12308 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12309   cat >>confdefs.h <<EOF
12310 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12311 EOF
12312
12313 fi
12314 done
12315
12316         if test "x$ac_cv_func_putwc" != xyes ; then
12317
12318 for ac_header in wchar.h
12319 do
12320 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12321 echo "$as_me:12321: checking for $ac_header" >&5
12322 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12323 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12324   echo $ECHO_N "(cached) $ECHO_C" >&6
12325 else
12326   cat >"conftest.$ac_ext" <<_ACEOF
12327 #line 12327 "configure"
12328 #include "confdefs.h"
12329 #include <$ac_header>
12330 _ACEOF
12331 if { (eval echo "$as_me:12331: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12332   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12333   ac_status=$?
12334   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12335   rm -f conftest.er1
12336   cat conftest.err >&5
12337   echo "$as_me:12337: \$? = $ac_status" >&5
12338   (exit "$ac_status"); } >/dev/null; then
12339   if test -s conftest.err; then
12340     ac_cpp_err=$ac_c_preproc_warn_flag
12341   else
12342     ac_cpp_err=
12343   fi
12344 else
12345   ac_cpp_err=yes
12346 fi
12347 if test -z "$ac_cpp_err"; then
12348   eval "$as_ac_Header=yes"
12349 else
12350   echo "$as_me: failed program was:" >&5
12351   cat "conftest.$ac_ext" >&5
12352   eval "$as_ac_Header=no"
12353 fi
12354 rm -f conftest.err "conftest.$ac_ext"
12355 fi
12356 echo "$as_me:12356: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12357 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12358 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12359   cat >>confdefs.h <<EOF
12360 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12361 EOF
12362
12363 fi
12364 done
12365
12366 echo "$as_me:12366: checking for multibyte character support" >&5
12367 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12368 if test "${cf_cv_utf8_lib+set}" = set; then
12369   echo $ECHO_N "(cached) $ECHO_C" >&6
12370 else
12371
12372         cf_save_LIBS="$LIBS"
12373         cat >"conftest.$ac_ext" <<_ACEOF
12374 #line 12374 "configure"
12375 #include "confdefs.h"
12376
12377 #include <stdlib.h>
12378 #include <stdio.h>
12379 #ifdef HAVE_WCHAR_H
12380 #include <wchar.h>
12381 #endif
12382
12383 int
12384 main (void)
12385 {
12386 putwc(0,0);
12387   ;
12388   return 0;
12389 }
12390 _ACEOF
12391 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12392 if { (eval echo "$as_me:12392: \"$ac_link\"") >&5
12393   (eval $ac_link) 2>&5
12394   ac_status=$?
12395   echo "$as_me:12395: \$? = $ac_status" >&5
12396   (exit "$ac_status"); } &&
12397          { ac_try='test -s "conftest$ac_exeext"'
12398   { (eval echo "$as_me:12398: \"$ac_try\"") >&5
12399   (eval $ac_try) 2>&5
12400   ac_status=$?
12401   echo "$as_me:12401: \$? = $ac_status" >&5
12402   (exit "$ac_status"); }; }; then
12403   cf_cv_utf8_lib=yes
12404 else
12405   echo "$as_me: failed program was:" >&5
12406 cat "conftest.$ac_ext" >&5
12407
12408 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12409 # will be set on completion of the AC_TRY_LINK below.
12410 cf_cv_header_path_utf8=
12411 cf_cv_library_path_utf8=
12412
12413 echo "${as_me:-configure}:12413: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12414
12415 cf_save_LIBS="$LIBS"
12416
12417 cat >"conftest.$ac_ext" <<_ACEOF
12418 #line 12418 "configure"
12419 #include "confdefs.h"
12420
12421 #include <libutf8.h>
12422 int
12423 main (void)
12424 {
12425 putwc(0,0);
12426   ;
12427   return 0;
12428 }
12429 _ACEOF
12430 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12431 if { (eval echo "$as_me:12431: \"$ac_link\"") >&5
12432   (eval $ac_link) 2>&5
12433   ac_status=$?
12434   echo "$as_me:12434: \$? = $ac_status" >&5
12435   (exit "$ac_status"); } &&
12436          { ac_try='test -s "conftest$ac_exeext"'
12437   { (eval echo "$as_me:12437: \"$ac_try\"") >&5
12438   (eval $ac_try) 2>&5
12439   ac_status=$?
12440   echo "$as_me:12440: \$? = $ac_status" >&5
12441   (exit "$ac_status"); }; }; then
12442
12443         cf_cv_find_linkage_utf8=yes
12444         cf_cv_header_path_utf8=/usr/include
12445         cf_cv_library_path_utf8=/usr/lib
12446
12447 else
12448   echo "$as_me: failed program was:" >&5
12449 cat "conftest.$ac_ext" >&5
12450
12451 LIBS="-lutf8  $cf_save_LIBS"
12452
12453 cat >"conftest.$ac_ext" <<_ACEOF
12454 #line 12454 "configure"
12455 #include "confdefs.h"
12456
12457 #include <libutf8.h>
12458 int
12459 main (void)
12460 {
12461 putwc(0,0);
12462   ;
12463   return 0;
12464 }
12465 _ACEOF
12466 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12467 if { (eval echo "$as_me:12467: \"$ac_link\"") >&5
12468   (eval $ac_link) 2>&5
12469   ac_status=$?
12470   echo "$as_me:12470: \$? = $ac_status" >&5
12471   (exit "$ac_status"); } &&
12472          { ac_try='test -s "conftest$ac_exeext"'
12473   { (eval echo "$as_me:12473: \"$ac_try\"") >&5
12474   (eval $ac_try) 2>&5
12475   ac_status=$?
12476   echo "$as_me:12476: \$? = $ac_status" >&5
12477   (exit "$ac_status"); }; }; then
12478
12479         cf_cv_find_linkage_utf8=yes
12480         cf_cv_header_path_utf8=/usr/include
12481         cf_cv_library_path_utf8=/usr/lib
12482         cf_cv_library_file_utf8="-lutf8"
12483
12484 else
12485   echo "$as_me: failed program was:" >&5
12486 cat "conftest.$ac_ext" >&5
12487
12488         cf_cv_find_linkage_utf8=no
12489         LIBS="$cf_save_LIBS"
12490
12491         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12492
12493 echo "${as_me:-configure}:12493: testing find linkage for utf8 library ..." 1>&5
12494
12495 echo "${as_me:-configure}:12495: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12496
12497         cf_save_CPPFLAGS="$CPPFLAGS"
12498         cf_test_CPPFLAGS="$CPPFLAGS"
12499
12500 cf_search=
12501
12502 # collect the current set of include-directories from compiler flags
12503 cf_header_path_list=""
12504 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12505         for cf_header_path in $CPPFLAGS $CFLAGS
12506         do
12507                 case "$cf_header_path" in
12508                 (-I*)
12509                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12510
12511 test "x$cf_header_path" != "xNONE" && \
12512 test -d "$cf_header_path" && \
12513  {
12514         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12515         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12516         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12517         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12518         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12519         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12520 }
12521
12522                         cf_header_path_list="$cf_header_path_list $cf_search"
12523                         ;;
12524                 esac
12525         done
12526 fi
12527
12528 # add the variations for the package we are looking for
12529
12530 cf_search=
12531
12532 test "x$prefix" != "xNONE" && \
12533 test -d "$prefix" && \
12534  {
12535         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12536         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12537         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12538         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12539         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12540         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12541 }
12542
12543 for cf_subdir_prefix in \
12544         /usr \
12545         /usr/local \
12546         /usr/pkg \
12547         /opt \
12548         /opt/local \
12549         $HOME
12550 do
12551
12552 test "x$cf_subdir_prefix" != "x$prefix" && \
12553 test -d "$cf_subdir_prefix" && \
12554 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12555         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12556         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12557         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12558         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12559         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12560         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12561 }
12562
12563 done
12564
12565 test "$includedir" != NONE && \
12566 test "$includedir" != "/usr/include" && \
12567 test -d "$includedir" && {
12568         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12569         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12570 }
12571
12572 test "$oldincludedir" != NONE && \
12573 test "$oldincludedir" != "/usr/include" && \
12574 test -d "$oldincludedir" && {
12575         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12576         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12577 }
12578
12579 cf_search="$cf_search $cf_header_path_list"
12580
12581         for cf_cv_header_path_utf8 in $cf_search
12582         do
12583                 if test -d "$cf_cv_header_path_utf8" ; then
12584                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12585
12586 echo "${as_me:-configure}:12586: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12587
12588                         CPPFLAGS="$cf_save_CPPFLAGS"
12589
12590         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12591         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12592
12593                         cat >"conftest.$ac_ext" <<_ACEOF
12594 #line 12594 "configure"
12595 #include "confdefs.h"
12596
12597 #include <libutf8.h>
12598 int
12599 main (void)
12600 {
12601 putwc(0,0);
12602   ;
12603   return 0;
12604 }
12605 _ACEOF
12606 rm -f "conftest.$ac_objext"
12607 if { (eval echo "$as_me:12607: \"$ac_compile\"") >&5
12608   (eval $ac_compile) 2>&5
12609   ac_status=$?
12610   echo "$as_me:12610: \$? = $ac_status" >&5
12611   (exit "$ac_status"); } &&
12612          { ac_try='test -s "conftest.$ac_objext"'
12613   { (eval echo "$as_me:12613: \"$ac_try\"") >&5
12614   (eval $ac_try) 2>&5
12615   ac_status=$?
12616   echo "$as_me:12616: \$? = $ac_status" >&5
12617   (exit "$ac_status"); }; }; then
12618
12619                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12620
12621 echo "${as_me:-configure}:12621: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12622
12623                                 cf_cv_find_linkage_utf8=maybe
12624                                 cf_test_CPPFLAGS="$CPPFLAGS"
12625                                 break
12626 else
12627   echo "$as_me: failed program was:" >&5
12628 cat "conftest.$ac_ext" >&5
12629
12630                                 CPPFLAGS="$cf_save_CPPFLAGS"
12631
12632 fi
12633 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12634                 fi
12635         done
12636
12637         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12638
12639 echo "${as_me:-configure}:12639: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12640
12641                 cf_save_LIBS="$LIBS"
12642                 cf_save_LDFLAGS="$LDFLAGS"
12643
12644                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12645
12646 cf_search=
12647 cf_library_path_list=""
12648 if test -n "${LDFLAGS}${LIBS}" ; then
12649         for cf_library_path in $LDFLAGS $LIBS
12650         do
12651                 case "$cf_library_path" in
12652                 (-L*)
12653                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12654
12655 test "x$cf_library_path" != "xNONE" && \
12656 test -d "$cf_library_path" && \
12657  {
12658         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12659         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12660         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12661         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12662         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12663         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12664 }
12665
12666                         cf_library_path_list="$cf_library_path_list $cf_search"
12667                         ;;
12668                 esac
12669         done
12670 fi
12671
12672 cf_search=
12673
12674 test "x$prefix" != "xNONE" && \
12675 test -d "$prefix" && \
12676  {
12677         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12678         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12679         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12680         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12681         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12682         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12683 }
12684
12685 for cf_subdir_prefix in \
12686         /usr \
12687         /usr/local \
12688         /usr/pkg \
12689         /opt \
12690         /opt/local \
12691         $HOME
12692 do
12693
12694 test "x$cf_subdir_prefix" != "x$prefix" && \
12695 test -d "$cf_subdir_prefix" && \
12696 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12697         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12698         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12699         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12700         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12701         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12702         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12703 }
12704
12705 done
12706
12707 cf_search="$cf_library_path_list $cf_search"
12708
12709                         for cf_cv_library_path_utf8 in $cf_search
12710                         do
12711                                 if test -d "$cf_cv_library_path_utf8" ; then
12712                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12713
12714 echo "${as_me:-configure}:12714: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12715
12716                                         CPPFLAGS="$cf_test_CPPFLAGS"
12717                                         LIBS="-lutf8  $cf_save_LIBS"
12718                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12719                                         cat >"conftest.$ac_ext" <<_ACEOF
12720 #line 12720 "configure"
12721 #include "confdefs.h"
12722
12723 #include <libutf8.h>
12724 int
12725 main (void)
12726 {
12727 putwc(0,0);
12728   ;
12729   return 0;
12730 }
12731 _ACEOF
12732 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12733 if { (eval echo "$as_me:12733: \"$ac_link\"") >&5
12734   (eval $ac_link) 2>&5
12735   ac_status=$?
12736   echo "$as_me:12736: \$? = $ac_status" >&5
12737   (exit "$ac_status"); } &&
12738          { ac_try='test -s "conftest$ac_exeext"'
12739   { (eval echo "$as_me:12739: \"$ac_try\"") >&5
12740   (eval $ac_try) 2>&5
12741   ac_status=$?
12742   echo "$as_me:12742: \$? = $ac_status" >&5
12743   (exit "$ac_status"); }; }; then
12744
12745                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12746
12747 echo "${as_me:-configure}:12747: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12748
12749                                         cf_cv_find_linkage_utf8=yes
12750                                         cf_cv_library_file_utf8="-lutf8"
12751                                         break
12752 else
12753   echo "$as_me: failed program was:" >&5
12754 cat "conftest.$ac_ext" >&5
12755
12756                                         CPPFLAGS="$cf_save_CPPFLAGS"
12757                                         LIBS="$cf_save_LIBS"
12758                                         LDFLAGS="$cf_save_LDFLAGS"
12759
12760 fi
12761 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12762                                 fi
12763                         done
12764                         CPPFLAGS="$cf_save_CPPFLAGS"
12765                         LDFLAGS="$cf_save_LDFLAGS"
12766                 fi
12767
12768         else
12769                 cf_cv_find_linkage_utf8=no
12770         fi
12771
12772 fi
12773 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12774
12775 fi
12776 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12777
12778 LIBS="$cf_save_LIBS"
12779
12780 if test "$cf_cv_find_linkage_utf8" = yes ; then
12781 cf_cv_utf8_lib=add-on
12782 else
12783 cf_cv_utf8_lib=no
12784 fi
12785
12786 fi
12787 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12788 fi
12789 echo "$as_me:12789: result: $cf_cv_utf8_lib" >&5
12790 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12791
12792 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12793 # ncurses/ncursesw:
12794 if test "$cf_cv_utf8_lib" = "add-on" ; then
12795
12796 cat >>confdefs.h <<\EOF
12797 #define HAVE_LIBUTF8_H 1
12798 EOF
12799
12800 if test -n "$cf_cv_header_path_utf8" ; then
12801   for cf_add_incdir in $cf_cv_header_path_utf8
12802   do
12803         while test "$cf_add_incdir" != /usr/include
12804         do
12805           if test -d "$cf_add_incdir"
12806           then
12807                 cf_have_incdir=no
12808                 if test -n "$CFLAGS$CPPFLAGS" ; then
12809                   # a loop is needed to ensure we can add subdirs of existing dirs
12810                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12811                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12812                           cf_have_incdir=yes; break
12813                         fi
12814                   done
12815                 fi
12816
12817                 if test "$cf_have_incdir" = no ; then
12818                   if test "$cf_add_incdir" = /usr/local/include ; then
12819                         if test "$GCC" = yes
12820                         then
12821                           cf_save_CPPFLAGS=$CPPFLAGS
12822
12823         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12824         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12825
12826                           cat >"conftest.$ac_ext" <<_ACEOF
12827 #line 12827 "configure"
12828 #include "confdefs.h"
12829 #include <stdio.h>
12830 int
12831 main (void)
12832 {
12833 printf("Hello")
12834   ;
12835   return 0;
12836 }
12837 _ACEOF
12838 rm -f "conftest.$ac_objext"
12839 if { (eval echo "$as_me:12839: \"$ac_compile\"") >&5
12840   (eval $ac_compile) 2>&5
12841   ac_status=$?
12842   echo "$as_me:12842: \$? = $ac_status" >&5
12843   (exit "$ac_status"); } &&
12844          { ac_try='test -s "conftest.$ac_objext"'
12845   { (eval echo "$as_me:12845: \"$ac_try\"") >&5
12846   (eval $ac_try) 2>&5
12847   ac_status=$?
12848   echo "$as_me:12848: \$? = $ac_status" >&5
12849   (exit "$ac_status"); }; }; then
12850   :
12851 else
12852   echo "$as_me: failed program was:" >&5
12853 cat "conftest.$ac_ext" >&5
12854 cf_have_incdir=yes
12855 fi
12856 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12857                           CPPFLAGS=$cf_save_CPPFLAGS
12858                         fi
12859                   fi
12860                 fi
12861
12862                 if test "$cf_have_incdir" = no ; then
12863                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12864
12865 echo "${as_me:-configure}:12865: testing adding $cf_add_incdir to include-path ..." 1>&5
12866
12867                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12868
12869                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12870                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12871                   cf_add_incdir="$cf_top_incdir"
12872                 else
12873                   break
12874                 fi
12875           else
12876                 break
12877           fi
12878         done
12879   done
12880 fi
12881
12882 if test -n "$cf_cv_library_path_utf8" ; then
12883         for cf_add_libdir in $cf_cv_library_path_utf8
12884         do
12885                 if test "$cf_add_libdir" = /usr/lib ; then
12886                         :
12887                 elif test -d "$cf_add_libdir"
12888                 then
12889                         cf_have_libdir=no
12890                         if test -n "$LDFLAGS$LIBS" ; then
12891                                 # a loop is needed to ensure we can add subdirs of existing dirs
12892                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12893                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12894                                                 cf_have_libdir=yes; break
12895                                         fi
12896                                 done
12897                         fi
12898                         if test "$cf_have_libdir" = no ; then
12899                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12900
12901 echo "${as_me:-configure}:12901: testing adding $cf_add_libdir to library-path ..." 1>&5
12902
12903                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12904                         fi
12905                 fi
12906         done
12907 fi
12908
12909 cf_add_libs="$LIBS"
12910 # reverse order
12911 cf_add_0lib=
12912 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12913 # filter duplicates
12914 for cf_add_1lib in $cf_add_0lib; do
12915         for cf_add_2lib in $cf_add_libs; do
12916                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12917                         cf_add_1lib=
12918                         break
12919                 fi
12920         done
12921         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12922 done
12923 LIBS="$cf_add_libs"
12924
12925 fi
12926
12927                 if test "$cf_cv_utf8_lib" != no ; then
12928                         NCURSES_LIBUTF8=1
12929                 fi
12930         fi
12931
12932 # This is needed on Tru64 5.0 to declare mbstate_t
12933 echo "$as_me:12933: checking if we must include wchar.h to declare mbstate_t" >&5
12934 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12935 if test "${cf_cv_mbstate_t+set}" = set; then
12936   echo $ECHO_N "(cached) $ECHO_C" >&6
12937 else
12938
12939 cat >"conftest.$ac_ext" <<_ACEOF
12940 #line 12940 "configure"
12941 #include "confdefs.h"
12942
12943 #include <stdlib.h>
12944 #include <stdarg.h>
12945 #include <stdio.h>
12946 #ifdef HAVE_LIBUTF8_H
12947 #include <libutf8.h>
12948 #endif
12949 int
12950 main (void)
12951 {
12952 mbstate_t state
12953   ;
12954   return 0;
12955 }
12956 _ACEOF
12957 rm -f "conftest.$ac_objext"
12958 if { (eval echo "$as_me:12958: \"$ac_compile\"") >&5
12959   (eval $ac_compile) 2>&5
12960   ac_status=$?
12961   echo "$as_me:12961: \$? = $ac_status" >&5
12962   (exit "$ac_status"); } &&
12963          { ac_try='test -s "conftest.$ac_objext"'
12964   { (eval echo "$as_me:12964: \"$ac_try\"") >&5
12965   (eval $ac_try) 2>&5
12966   ac_status=$?
12967   echo "$as_me:12967: \$? = $ac_status" >&5
12968   (exit "$ac_status"); }; }; then
12969   cf_cv_mbstate_t=no
12970 else
12971   echo "$as_me: failed program was:" >&5
12972 cat "conftest.$ac_ext" >&5
12973 cat >"conftest.$ac_ext" <<_ACEOF
12974 #line 12974 "configure"
12975 #include "confdefs.h"
12976
12977 #include <stdlib.h>
12978 #include <stdarg.h>
12979 #include <stdio.h>
12980 #include <wchar.h>
12981 #ifdef HAVE_LIBUTF8_H
12982 #include <libutf8.h>
12983 #endif
12984 int
12985 main (void)
12986 {
12987 mbstate_t value
12988   ;
12989   return 0;
12990 }
12991 _ACEOF
12992 rm -f "conftest.$ac_objext"
12993 if { (eval echo "$as_me:12993: \"$ac_compile\"") >&5
12994   (eval $ac_compile) 2>&5
12995   ac_status=$?
12996   echo "$as_me:12996: \$? = $ac_status" >&5
12997   (exit "$ac_status"); } &&
12998          { ac_try='test -s "conftest.$ac_objext"'
12999   { (eval echo "$as_me:12999: \"$ac_try\"") >&5
13000   (eval $ac_try) 2>&5
13001   ac_status=$?
13002   echo "$as_me:13002: \$? = $ac_status" >&5
13003   (exit "$ac_status"); }; }; then
13004   cf_cv_mbstate_t=yes
13005 else
13006   echo "$as_me: failed program was:" >&5
13007 cat "conftest.$ac_ext" >&5
13008 cf_cv_mbstate_t=unknown
13009 fi
13010 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13011 fi
13012 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13013 fi
13014 echo "$as_me:13014: result: $cf_cv_mbstate_t" >&5
13015 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13016
13017 if test "$cf_cv_mbstate_t" = yes ; then
13018
13019 cat >>confdefs.h <<\EOF
13020 #define NEED_WCHAR_H 1
13021 EOF
13022
13023         NEED_WCHAR_H=1
13024 fi
13025
13026 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13027 if test "$cf_cv_mbstate_t" = unknown ; then
13028         NCURSES_MBSTATE_T=1
13029 fi
13030
13031 # This is needed on Tru64 5.0 to declare wchar_t
13032 echo "$as_me:13032: checking if we must include wchar.h to declare wchar_t" >&5
13033 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13034 if test "${cf_cv_wchar_t+set}" = set; then
13035   echo $ECHO_N "(cached) $ECHO_C" >&6
13036 else
13037
13038 cat >"conftest.$ac_ext" <<_ACEOF
13039 #line 13039 "configure"
13040 #include "confdefs.h"
13041
13042 #include <stdlib.h>
13043 #include <stdarg.h>
13044 #include <stdio.h>
13045 #ifdef HAVE_LIBUTF8_H
13046 #include <libutf8.h>
13047 #endif
13048 int
13049 main (void)
13050 {
13051 wchar_t state
13052   ;
13053   return 0;
13054 }
13055 _ACEOF
13056 rm -f "conftest.$ac_objext"
13057 if { (eval echo "$as_me:13057: \"$ac_compile\"") >&5
13058   (eval $ac_compile) 2>&5
13059   ac_status=$?
13060   echo "$as_me:13060: \$? = $ac_status" >&5
13061   (exit "$ac_status"); } &&
13062          { ac_try='test -s "conftest.$ac_objext"'
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   cf_cv_wchar_t=no
13069 else
13070   echo "$as_me: failed program was:" >&5
13071 cat "conftest.$ac_ext" >&5
13072 cat >"conftest.$ac_ext" <<_ACEOF
13073 #line 13073 "configure"
13074 #include "confdefs.h"
13075
13076 #include <stdlib.h>
13077 #include <stdarg.h>
13078 #include <stdio.h>
13079 #include <wchar.h>
13080 #ifdef HAVE_LIBUTF8_H
13081 #include <libutf8.h>
13082 #endif
13083 int
13084 main (void)
13085 {
13086 wchar_t value
13087   ;
13088   return 0;
13089 }
13090 _ACEOF
13091 rm -f "conftest.$ac_objext"
13092 if { (eval echo "$as_me:13092: \"$ac_compile\"") >&5
13093   (eval $ac_compile) 2>&5
13094   ac_status=$?
13095   echo "$as_me:13095: \$? = $ac_status" >&5
13096   (exit "$ac_status"); } &&
13097          { ac_try='test -s "conftest.$ac_objext"'
13098   { (eval echo "$as_me:13098: \"$ac_try\"") >&5
13099   (eval $ac_try) 2>&5
13100   ac_status=$?
13101   echo "$as_me:13101: \$? = $ac_status" >&5
13102   (exit "$ac_status"); }; }; then
13103   cf_cv_wchar_t=yes
13104 else
13105   echo "$as_me: failed program was:" >&5
13106 cat "conftest.$ac_ext" >&5
13107 cf_cv_wchar_t=unknown
13108 fi
13109 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13110 fi
13111 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13112 fi
13113 echo "$as_me:13113: result: $cf_cv_wchar_t" >&5
13114 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13115
13116 if test "$cf_cv_wchar_t" = yes ; then
13117
13118 cat >>confdefs.h <<\EOF
13119 #define NEED_WCHAR_H 1
13120 EOF
13121
13122         NEED_WCHAR_H=1
13123 fi
13124
13125 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13126 if test "$cf_cv_wchar_t" = unknown ; then
13127         NCURSES_WCHAR_T=1
13128 fi
13129
13130 # if we find wchar_t in either place, use substitution to provide a fallback.
13131 if test "$cf_cv_wchar_t" != unknown ; then
13132         NCURSES_OK_WCHAR_T=1
13133 fi
13134
13135 # This is needed on Tru64 5.0 to declare wint_t
13136 echo "$as_me:13136: checking if we must include wchar.h to declare wint_t" >&5
13137 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13138 if test "${cf_cv_wint_t+set}" = set; then
13139   echo $ECHO_N "(cached) $ECHO_C" >&6
13140 else
13141
13142 cat >"conftest.$ac_ext" <<_ACEOF
13143 #line 13143 "configure"
13144 #include "confdefs.h"
13145
13146 #include <stdlib.h>
13147 #include <stdarg.h>
13148 #include <stdio.h>
13149 #ifdef HAVE_LIBUTF8_H
13150 #include <libutf8.h>
13151 #endif
13152 int
13153 main (void)
13154 {
13155 wint_t state
13156   ;
13157   return 0;
13158 }
13159 _ACEOF
13160 rm -f "conftest.$ac_objext"
13161 if { (eval echo "$as_me:13161: \"$ac_compile\"") >&5
13162   (eval $ac_compile) 2>&5
13163   ac_status=$?
13164   echo "$as_me:13164: \$? = $ac_status" >&5
13165   (exit "$ac_status"); } &&
13166          { ac_try='test -s "conftest.$ac_objext"'
13167   { (eval echo "$as_me:13167: \"$ac_try\"") >&5
13168   (eval $ac_try) 2>&5
13169   ac_status=$?
13170   echo "$as_me:13170: \$? = $ac_status" >&5
13171   (exit "$ac_status"); }; }; then
13172   cf_cv_wint_t=no
13173 else
13174   echo "$as_me: failed program was:" >&5
13175 cat "conftest.$ac_ext" >&5
13176 cat >"conftest.$ac_ext" <<_ACEOF
13177 #line 13177 "configure"
13178 #include "confdefs.h"
13179
13180 #include <stdlib.h>
13181 #include <stdarg.h>
13182 #include <stdio.h>
13183 #include <wchar.h>
13184 #ifdef HAVE_LIBUTF8_H
13185 #include <libutf8.h>
13186 #endif
13187 int
13188 main (void)
13189 {
13190 wint_t value
13191   ;
13192   return 0;
13193 }
13194 _ACEOF
13195 rm -f "conftest.$ac_objext"
13196 if { (eval echo "$as_me:13196: \"$ac_compile\"") >&5
13197   (eval $ac_compile) 2>&5
13198   ac_status=$?
13199   echo "$as_me:13199: \$? = $ac_status" >&5
13200   (exit "$ac_status"); } &&
13201          { ac_try='test -s "conftest.$ac_objext"'
13202   { (eval echo "$as_me:13202: \"$ac_try\"") >&5
13203   (eval $ac_try) 2>&5
13204   ac_status=$?
13205   echo "$as_me:13205: \$? = $ac_status" >&5
13206   (exit "$ac_status"); }; }; then
13207   cf_cv_wint_t=yes
13208 else
13209   echo "$as_me: failed program was:" >&5
13210 cat "conftest.$ac_ext" >&5
13211 cf_cv_wint_t=unknown
13212 fi
13213 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13214 fi
13215 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13216 fi
13217 echo "$as_me:13217: result: $cf_cv_wint_t" >&5
13218 echo "${ECHO_T}$cf_cv_wint_t" >&6
13219
13220 if test "$cf_cv_wint_t" = yes ; then
13221
13222 cat >>confdefs.h <<\EOF
13223 #define NEED_WCHAR_H 1
13224 EOF
13225
13226         NEED_WCHAR_H=1
13227 fi
13228
13229 # if we do not find wint_t in either place, use substitution to provide a fallback.
13230 if test "$cf_cv_wint_t" = unknown ; then
13231         NCURSES_WINT_T=1
13232 fi
13233
13234 # if we find wint_t in either place, use substitution to provide a fallback.
13235 if test "$cf_cv_wint_t" != unknown ; then
13236         NCURSES_OK_WINT_T=1
13237 fi
13238
13239         if test "$NCURSES_MBSTATE_T" != 0; then
13240
13241 cat >>confdefs.h <<\EOF
13242 #define NEED_MBSTATE_T_DEF 1
13243 EOF
13244
13245         fi
13246 fi
13247
13248 ###   use option --disable-lp64 to allow long chtype
13249 echo "$as_me:13249: checking whether to enable _LP64 definition in curses.h" >&5
13250 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13251
13252 # Check whether --enable-lp64 or --disable-lp64 was given.
13253 if test "${enable_lp64+set}" = set; then
13254   enableval="$enable_lp64"
13255   with_lp64=$enableval
13256 else
13257   with_lp64=$cf_dft_with_lp64
13258 fi;
13259 echo "$as_me:13259: result: $with_lp64" >&5
13260 echo "${ECHO_T}$with_lp64" >&6
13261
13262 if test "x$with_lp64" = xyes ; then
13263         cf_cv_enable_lp64=1
13264 else
13265         cf_cv_enable_lp64=0
13266 fi
13267
13268 # Check whether --enable-largefile or --disable-largefile was given.
13269 if test "${enable_largefile+set}" = set; then
13270   enableval="$enable_largefile"
13271
13272 fi;
13273 if test "$enable_largefile" != no; then
13274
13275   echo "$as_me:13275: checking for special C compiler options needed for large files" >&5
13276 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13277 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13278   echo $ECHO_N "(cached) $ECHO_C" >&6
13279 else
13280   ac_cv_sys_largefile_CC=no
13281      if test "$GCC" != yes; then
13282        ac_save_CC=$CC
13283        while :; do
13284          # IRIX 6.2 and later do not support large files by default,
13285          # so use the C compiler's -n32 option if that helps.
13286          cat >"conftest.$ac_ext" <<_ACEOF
13287 #line 13287 "configure"
13288 #include "confdefs.h"
13289 #include <sys/types.h>
13290  /* Check that off_t can represent 2**63 - 1 correctly.
13291     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13292     since some C++ compilers masquerading as C compilers
13293     incorrectly reject 9223372036854775807.  */
13294 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13295   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13296                        && LARGE_OFF_T % 2147483647 == 1)
13297                       ? 1 : -1];
13298 int
13299 main (void)
13300 {
13301
13302   ;
13303   return 0;
13304 }
13305 _ACEOF
13306          rm -f "conftest.$ac_objext"
13307 if { (eval echo "$as_me:13307: \"$ac_compile\"") >&5
13308   (eval $ac_compile) 2>&5
13309   ac_status=$?
13310   echo "$as_me:13310: \$? = $ac_status" >&5
13311   (exit "$ac_status"); } &&
13312          { ac_try='test -s "conftest.$ac_objext"'
13313   { (eval echo "$as_me:13313: \"$ac_try\"") >&5
13314   (eval $ac_try) 2>&5
13315   ac_status=$?
13316   echo "$as_me:13316: \$? = $ac_status" >&5
13317   (exit "$ac_status"); }; }; then
13318   break
13319 else
13320   echo "$as_me: failed program was:" >&5
13321 cat "conftest.$ac_ext" >&5
13322 fi
13323 rm -f "conftest.$ac_objext"
13324          CC="$CC -n32"
13325          rm -f "conftest.$ac_objext"
13326 if { (eval echo "$as_me:13326: \"$ac_compile\"") >&5
13327   (eval $ac_compile) 2>&5
13328   ac_status=$?
13329   echo "$as_me:13329: \$? = $ac_status" >&5
13330   (exit "$ac_status"); } &&
13331          { ac_try='test -s "conftest.$ac_objext"'
13332   { (eval echo "$as_me:13332: \"$ac_try\"") >&5
13333   (eval $ac_try) 2>&5
13334   ac_status=$?
13335   echo "$as_me:13335: \$? = $ac_status" >&5
13336   (exit "$ac_status"); }; }; then
13337   ac_cv_sys_largefile_CC=' -n32'; break
13338 else
13339   echo "$as_me: failed program was:" >&5
13340 cat "conftest.$ac_ext" >&5
13341 fi
13342 rm -f "conftest.$ac_objext"
13343          break
13344        done
13345        CC=$ac_save_CC
13346        rm -f "conftest.$ac_ext"
13347     fi
13348 fi
13349 echo "$as_me:13349: result: $ac_cv_sys_largefile_CC" >&5
13350 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13351   if test "$ac_cv_sys_largefile_CC" != no; then
13352     CC=$CC$ac_cv_sys_largefile_CC
13353   fi
13354
13355   echo "$as_me:13355: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13356 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13357 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13358   echo $ECHO_N "(cached) $ECHO_C" >&6
13359 else
13360   while :; do
13361   ac_cv_sys_file_offset_bits=no
13362   cat >"conftest.$ac_ext" <<_ACEOF
13363 #line 13363 "configure"
13364 #include "confdefs.h"
13365 #include <sys/types.h>
13366  /* Check that off_t can represent 2**63 - 1 correctly.
13367     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13368     since some C++ compilers masquerading as C compilers
13369     incorrectly reject 9223372036854775807.  */
13370 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13371   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13372                        && LARGE_OFF_T % 2147483647 == 1)
13373                       ? 1 : -1];
13374 int
13375 main (void)
13376 {
13377
13378   ;
13379   return 0;
13380 }
13381 _ACEOF
13382 rm -f "conftest.$ac_objext"
13383 if { (eval echo "$as_me:13383: \"$ac_compile\"") >&5
13384   (eval $ac_compile) 2>&5
13385   ac_status=$?
13386   echo "$as_me:13386: \$? = $ac_status" >&5
13387   (exit "$ac_status"); } &&
13388          { ac_try='test -s "conftest.$ac_objext"'
13389   { (eval echo "$as_me:13389: \"$ac_try\"") >&5
13390   (eval $ac_try) 2>&5
13391   ac_status=$?
13392   echo "$as_me:13392: \$? = $ac_status" >&5
13393   (exit "$ac_status"); }; }; then
13394   break
13395 else
13396   echo "$as_me: failed program was:" >&5
13397 cat "conftest.$ac_ext" >&5
13398 fi
13399 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13400   cat >"conftest.$ac_ext" <<_ACEOF
13401 #line 13401 "configure"
13402 #include "confdefs.h"
13403 #define _FILE_OFFSET_BITS 64
13404 #include <sys/types.h>
13405  /* Check that off_t can represent 2**63 - 1 correctly.
13406     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13407     since some C++ compilers masquerading as C compilers
13408     incorrectly reject 9223372036854775807.  */
13409 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13410   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13411                        && LARGE_OFF_T % 2147483647 == 1)
13412                       ? 1 : -1];
13413 int
13414 main (void)
13415 {
13416
13417   ;
13418   return 0;
13419 }
13420 _ACEOF
13421 rm -f "conftest.$ac_objext"
13422 if { (eval echo "$as_me:13422: \"$ac_compile\"") >&5
13423   (eval $ac_compile) 2>&5
13424   ac_status=$?
13425   echo "$as_me:13425: \$? = $ac_status" >&5
13426   (exit "$ac_status"); } &&
13427          { ac_try='test -s "conftest.$ac_objext"'
13428   { (eval echo "$as_me:13428: \"$ac_try\"") >&5
13429   (eval $ac_try) 2>&5
13430   ac_status=$?
13431   echo "$as_me:13431: \$? = $ac_status" >&5
13432   (exit "$ac_status"); }; }; then
13433   ac_cv_sys_file_offset_bits=64; break
13434 else
13435   echo "$as_me: failed program was:" >&5
13436 cat "conftest.$ac_ext" >&5
13437 fi
13438 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13439   break
13440 done
13441 fi
13442 echo "$as_me:13442: result: $ac_cv_sys_file_offset_bits" >&5
13443 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13444 if test "$ac_cv_sys_file_offset_bits" != no; then
13445
13446 cat >>confdefs.h <<EOF
13447 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13448 EOF
13449
13450 fi
13451 rm -rf conftest*
13452   echo "$as_me:13452: checking for _LARGE_FILES value needed for large files" >&5
13453 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13454 if test "${ac_cv_sys_large_files+set}" = set; then
13455   echo $ECHO_N "(cached) $ECHO_C" >&6
13456 else
13457   while :; do
13458   ac_cv_sys_large_files=no
13459   cat >"conftest.$ac_ext" <<_ACEOF
13460 #line 13460 "configure"
13461 #include "confdefs.h"
13462 #include <sys/types.h>
13463  /* Check that off_t can represent 2**63 - 1 correctly.
13464     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13465     since some C++ compilers masquerading as C compilers
13466     incorrectly reject 9223372036854775807.  */
13467 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13468   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13469                        && LARGE_OFF_T % 2147483647 == 1)
13470                       ? 1 : -1];
13471 int
13472 main (void)
13473 {
13474
13475   ;
13476   return 0;
13477 }
13478 _ACEOF
13479 rm -f "conftest.$ac_objext"
13480 if { (eval echo "$as_me:13480: \"$ac_compile\"") >&5
13481   (eval $ac_compile) 2>&5
13482   ac_status=$?
13483   echo "$as_me:13483: \$? = $ac_status" >&5
13484   (exit "$ac_status"); } &&
13485          { ac_try='test -s "conftest.$ac_objext"'
13486   { (eval echo "$as_me:13486: \"$ac_try\"") >&5
13487   (eval $ac_try) 2>&5
13488   ac_status=$?
13489   echo "$as_me:13489: \$? = $ac_status" >&5
13490   (exit "$ac_status"); }; }; then
13491   break
13492 else
13493   echo "$as_me: failed program was:" >&5
13494 cat "conftest.$ac_ext" >&5
13495 fi
13496 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13497   cat >"conftest.$ac_ext" <<_ACEOF
13498 #line 13498 "configure"
13499 #include "confdefs.h"
13500 #define _LARGE_FILES 1
13501 #include <sys/types.h>
13502  /* Check that off_t can represent 2**63 - 1 correctly.
13503     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13504     since some C++ compilers masquerading as C compilers
13505     incorrectly reject 9223372036854775807.  */
13506 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13507   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13508                        && LARGE_OFF_T % 2147483647 == 1)
13509                       ? 1 : -1];
13510 int
13511 main (void)
13512 {
13513
13514   ;
13515   return 0;
13516 }
13517 _ACEOF
13518 rm -f "conftest.$ac_objext"
13519 if { (eval echo "$as_me:13519: \"$ac_compile\"") >&5
13520   (eval $ac_compile) 2>&5
13521   ac_status=$?
13522   echo "$as_me:13522: \$? = $ac_status" >&5
13523   (exit "$ac_status"); } &&
13524          { ac_try='test -s "conftest.$ac_objext"'
13525   { (eval echo "$as_me:13525: \"$ac_try\"") >&5
13526   (eval $ac_try) 2>&5
13527   ac_status=$?
13528   echo "$as_me:13528: \$? = $ac_status" >&5
13529   (exit "$ac_status"); }; }; then
13530   ac_cv_sys_large_files=1; break
13531 else
13532   echo "$as_me: failed program was:" >&5
13533 cat "conftest.$ac_ext" >&5
13534 fi
13535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13536   break
13537 done
13538 fi
13539 echo "$as_me:13539: result: $ac_cv_sys_large_files" >&5
13540 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13541 if test "$ac_cv_sys_large_files" != no; then
13542
13543 cat >>confdefs.h <<EOF
13544 #define _LARGE_FILES $ac_cv_sys_large_files
13545 EOF
13546
13547 fi
13548 rm -rf conftest*
13549 fi
13550
13551         if test "$enable_largefile" != no ; then
13552         echo "$as_me:13552: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13553 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13554 if test "${ac_cv_sys_largefile_source+set}" = set; then
13555   echo $ECHO_N "(cached) $ECHO_C" >&6
13556 else
13557   while :; do
13558   ac_cv_sys_largefile_source=no
13559   cat >"conftest.$ac_ext" <<_ACEOF
13560 #line 13560 "configure"
13561 #include "confdefs.h"
13562 #include <stdio.h>
13563 int
13564 main (void)
13565 {
13566 return !fseeko;
13567   ;
13568   return 0;
13569 }
13570 _ACEOF
13571 rm -f "conftest.$ac_objext"
13572 if { (eval echo "$as_me:13572: \"$ac_compile\"") >&5
13573   (eval $ac_compile) 2>&5
13574   ac_status=$?
13575   echo "$as_me:13575: \$? = $ac_status" >&5
13576   (exit "$ac_status"); } &&
13577          { ac_try='test -s "conftest.$ac_objext"'
13578   { (eval echo "$as_me:13578: \"$ac_try\"") >&5
13579   (eval $ac_try) 2>&5
13580   ac_status=$?
13581   echo "$as_me:13581: \$? = $ac_status" >&5
13582   (exit "$ac_status"); }; }; then
13583   break
13584 else
13585   echo "$as_me: failed program was:" >&5
13586 cat "conftest.$ac_ext" >&5
13587 fi
13588 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13589   cat >"conftest.$ac_ext" <<_ACEOF
13590 #line 13590 "configure"
13591 #include "confdefs.h"
13592 #define _LARGEFILE_SOURCE 1
13593 #include <stdio.h>
13594 int
13595 main (void)
13596 {
13597 return !fseeko;
13598   ;
13599   return 0;
13600 }
13601 _ACEOF
13602 rm -f "conftest.$ac_objext"
13603 if { (eval echo "$as_me:13603: \"$ac_compile\"") >&5
13604   (eval $ac_compile) 2>&5
13605   ac_status=$?
13606   echo "$as_me:13606: \$? = $ac_status" >&5
13607   (exit "$ac_status"); } &&
13608          { ac_try='test -s "conftest.$ac_objext"'
13609   { (eval echo "$as_me:13609: \"$ac_try\"") >&5
13610   (eval $ac_try) 2>&5
13611   ac_status=$?
13612   echo "$as_me:13612: \$? = $ac_status" >&5
13613   (exit "$ac_status"); }; }; then
13614   ac_cv_sys_largefile_source=1; break
13615 else
13616   echo "$as_me: failed program was:" >&5
13617 cat "conftest.$ac_ext" >&5
13618 fi
13619 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13620   break
13621 done
13622 fi
13623 echo "$as_me:13623: result: $ac_cv_sys_largefile_source" >&5
13624 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13625 if test "$ac_cv_sys_largefile_source" != no; then
13626
13627 cat >>confdefs.h <<EOF
13628 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13629 EOF
13630
13631 fi
13632 rm -rf conftest*
13633
13634 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13635 # in glibc 2.1.3, but that breaks too many other things.
13636 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13637 echo "$as_me:13637: checking for fseeko" >&5
13638 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13639 if test "${ac_cv_func_fseeko+set}" = set; then
13640   echo $ECHO_N "(cached) $ECHO_C" >&6
13641 else
13642   cat >"conftest.$ac_ext" <<_ACEOF
13643 #line 13643 "configure"
13644 #include "confdefs.h"
13645 #include <stdio.h>
13646 int
13647 main (void)
13648 {
13649 return fseeko && fseeko (stdin, 0, 0);
13650   ;
13651   return 0;
13652 }
13653 _ACEOF
13654 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13655 if { (eval echo "$as_me:13655: \"$ac_link\"") >&5
13656   (eval $ac_link) 2>&5
13657   ac_status=$?
13658   echo "$as_me:13658: \$? = $ac_status" >&5
13659   (exit "$ac_status"); } &&
13660          { ac_try='test -s "conftest$ac_exeext"'
13661   { (eval echo "$as_me:13661: \"$ac_try\"") >&5
13662   (eval $ac_try) 2>&5
13663   ac_status=$?
13664   echo "$as_me:13664: \$? = $ac_status" >&5
13665   (exit "$ac_status"); }; }; then
13666   ac_cv_func_fseeko=yes
13667 else
13668   echo "$as_me: failed program was:" >&5
13669 cat "conftest.$ac_ext" >&5
13670 ac_cv_func_fseeko=no
13671 fi
13672 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13673 fi
13674 echo "$as_me:13674: result: $ac_cv_func_fseeko" >&5
13675 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13676 if test $ac_cv_func_fseeko = yes; then
13677
13678 cat >>confdefs.h <<\EOF
13679 #define HAVE_FSEEKO 1
13680 EOF
13681
13682 fi
13683
13684         # Normally we would collect these definitions in the config.h,
13685         # but (like _XOPEN_SOURCE), some environments rely on having these
13686         # defined before any of the system headers are included.  Another
13687         # case comes up with C++, e.g., on AIX the compiler compiles the
13688         # header files by themselves before looking at the body files it is
13689         # told to compile.  For ncurses, those header files do not include
13690         # the config.h
13691         if test "$ac_cv_sys_large_files" != no
13692         then
13693
13694         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13695         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13696
13697         fi
13698         if test "$ac_cv_sys_largefile_source" != no
13699         then
13700
13701         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13702         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13703
13704         fi
13705         if test "$ac_cv_sys_file_offset_bits" != no
13706         then
13707
13708         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13709         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13710
13711         fi
13712
13713         echo "$as_me:13713: checking whether to use struct dirent64" >&5
13714 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13715 if test "${cf_cv_struct_dirent64+set}" = set; then
13716   echo $ECHO_N "(cached) $ECHO_C" >&6
13717 else
13718
13719                 cat >"conftest.$ac_ext" <<_ACEOF
13720 #line 13720 "configure"
13721 #include "confdefs.h"
13722
13723 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13724 #include <sys/types.h>
13725 #include <dirent.h>
13726
13727 int
13728 main (void)
13729 {
13730
13731                 /* if transitional largefile support is setup, this is true */
13732                 extern struct dirent64 * readdir(DIR *);
13733                 struct dirent64 *x = readdir((DIR *)0);
13734                 struct dirent *y = readdir((DIR *)0);
13735                 int z = x - y;
13736                 (void)z;
13737
13738   ;
13739   return 0;
13740 }
13741 _ACEOF
13742 rm -f "conftest.$ac_objext"
13743 if { (eval echo "$as_me:13743: \"$ac_compile\"") >&5
13744   (eval $ac_compile) 2>&5
13745   ac_status=$?
13746   echo "$as_me:13746: \$? = $ac_status" >&5
13747   (exit "$ac_status"); } &&
13748          { ac_try='test -s "conftest.$ac_objext"'
13749   { (eval echo "$as_me:13749: \"$ac_try\"") >&5
13750   (eval $ac_try) 2>&5
13751   ac_status=$?
13752   echo "$as_me:13752: \$? = $ac_status" >&5
13753   (exit "$ac_status"); }; }; then
13754   cf_cv_struct_dirent64=yes
13755 else
13756   echo "$as_me: failed program was:" >&5
13757 cat "conftest.$ac_ext" >&5
13758 cf_cv_struct_dirent64=no
13759 fi
13760 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13761
13762 fi
13763 echo "$as_me:13763: result: $cf_cv_struct_dirent64" >&5
13764 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13765         test "$cf_cv_struct_dirent64" = yes &&
13766 cat >>confdefs.h <<\EOF
13767 #define HAVE_STRUCT_DIRENT64 1
13768 EOF
13769
13770         fi
13771
13772 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13773 echo "$as_me:13773: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13774 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13775
13776 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13777 if test "${enable_tparm_varargs+set}" = set; then
13778   enableval="$enable_tparm_varargs"
13779   with_tparm_varargs=$enableval
13780 else
13781   with_tparm_varargs=yes
13782 fi;
13783 echo "$as_me:13783: result: $with_tparm_varargs" >&5
13784 echo "${ECHO_T}$with_tparm_varargs" >&6
13785 NCURSES_TPARM_VARARGS=0
13786 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13787
13788 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13789 if test "$with_ticlib" != no ; then
13790 echo "$as_me:13790: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13791 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13792
13793 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13794 if test "${enable_tic_depends+set}" = set; then
13795   enableval="$enable_tic_depends"
13796   with_tic_depends=$enableval
13797 else
13798   with_tic_depends=yes
13799 fi;
13800 echo "$as_me:13800: result: $with_tic_depends" >&5
13801 echo "${ECHO_T}$with_tic_depends" >&6
13802 else
13803         with_tic_depends=no
13804 fi
13805
13806 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
13807 echo "$as_me:13807: checking if you want to enable wattr* macros" >&5
13808 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
13809
13810 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13811 if test "${enable_wattr_macros+set}" = set; then
13812   enableval="$enable_wattr_macros"
13813   with_wattr_macros=$enableval
13814 else
13815   with_wattr_macros=no
13816 fi;
13817 if [ "x$with_wattr_macros" != xyes ]; then
13818         NCURSES_WATTR_MACROS=0
13819         echo "$as_me:13819: result: no" >&5
13820 echo "${ECHO_T}no" >&6
13821 else
13822         NCURSES_WATTR_MACROS=1
13823         echo "$as_me:13823: result: yes" >&5
13824 echo "${ECHO_T}yes" >&6
13825 fi
13826
13827 echo "$as_me:13827: checking for X11 rgb file" >&5
13828 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13829
13830 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13831 if test "${with_x11_rgb+set}" = set; then
13832   withval="$with_x11_rgb"
13833   RGB_PATH=$withval
13834 else
13835   RGB_PATH=auto
13836 fi;
13837
13838 if test "x$RGB_PATH" = xauto
13839 then
13840         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13841         for cf_path in \
13842                 /opt/local/share/X11/rgb.txt \
13843                 /opt/X11/share/X11/rgb.txt \
13844                 /usr/share/X11/rgb.txt \
13845                 /usr/X11/share/X11/rgb.txt \
13846                 /usr/X11/lib/X11/rgb.txt \
13847                 /usr/lib/X11/rgb.txt \
13848                 /etc/X11/rgb.txt \
13849                 /usr/pkg/lib/X11/rgb.txt \
13850                 /usr/X11R7/lib/X11/rgb.txt \
13851                 /usr/X11R6/lib/X11/rgb.txt \
13852                 /usr/X11R5/lib/X11/rgb.txt \
13853                 /usr/X11R4/lib/X11/rgb.txt \
13854                 /usr/local/lib/X11/rgb.txt \
13855                 /usr/local/share/X11/rgb.txt \
13856                 /usr/lib64/X11/rgb.txt
13857         do
13858                 if test -f "$cf_path" ; then
13859                         RGB_PATH="$cf_path"
13860                         break
13861                 fi
13862         done
13863 else
13864         cf_path=$RGB_PATH
13865
13866 if test "x$prefix" != xNONE; then
13867         cf_path_syntax="$prefix"
13868 else
13869         cf_path_syntax="$ac_default_prefix"
13870 fi
13871
13872 case ".$cf_path" in
13873 (.\$\(*\)*|.\'*\'*)
13874         ;;
13875 (..|./*|.\\*)
13876         ;;
13877 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13878         ;;
13879 (.\$\{*prefix\}*|.\$\{*dir\}*)
13880         eval cf_path="$cf_path"
13881         case ".$cf_path" in
13882         (.NONE/*)
13883                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13884                 ;;
13885         esac
13886         ;;
13887 (.no|.NONE/*)
13888         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13889         ;;
13890 (*)
13891         { { echo "$as_me:13891: error: expected a pathname, not \"$cf_path\"" >&5
13892 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13893    { (exit 1); exit 1; }; }
13894         ;;
13895 esac
13896
13897 fi
13898
13899 echo "$as_me:13899: result: $RGB_PATH" >&5
13900 echo "${ECHO_T}$RGB_PATH" >&6
13901
13902 cat >>confdefs.h <<EOF
13903 #define RGB_PATH "$cf_path"
13904 EOF
13905
13906 no_x11_rgb=
13907 if test "$RGB_PATH" = no
13908 then
13909         no_x11_rgb="#"
13910 fi
13911
13912 ###   use option --with-bool to override bool's type
13913 echo "$as_me:13913: checking for type of bool" >&5
13914 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13915
13916 # Check whether --with-bool or --without-bool was given.
13917 if test "${with_bool+set}" = set; then
13918   withval="$with_bool"
13919   NCURSES_BOOL="$withval"
13920 else
13921   NCURSES_BOOL=auto
13922 fi;
13923 echo "$as_me:13923: result: $NCURSES_BOOL" >&5
13924 echo "${ECHO_T}$NCURSES_BOOL" >&6
13925
13926 echo "$as_me:13926: checking for alternate terminal capabilities file" >&5
13927 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13928
13929 # Check whether --with-caps or --without-caps was given.
13930 if test "${with_caps+set}" = set; then
13931   withval="$with_caps"
13932   TERMINFO_CAPS=Caps.$withval
13933 else
13934   TERMINFO_CAPS=Caps
13935 fi;
13936 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13937 echo "$as_me:13937: result: $TERMINFO_CAPS" >&5
13938 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13939
13940 ###   use option --with-chtype to override chtype's type
13941 echo "$as_me:13941: checking for type of chtype" >&5
13942 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13943
13944 # Check whether --with-chtype or --without-chtype was given.
13945 if test "${with_chtype+set}" = set; then
13946   withval="$with_chtype"
13947   NCURSES_CHTYPE="$withval"
13948 else
13949   NCURSES_CHTYPE=$cf_dft_chtype
13950 fi;
13951 echo "$as_me:13951: result: $NCURSES_CHTYPE" >&5
13952 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13953
13954 ###   use option --with-ospeed to override ospeed's type
13955 echo "$as_me:13955: checking for type of ospeed" >&5
13956 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13957
13958 # Check whether --with-ospeed or --without-ospeed was given.
13959 if test "${with_ospeed+set}" = set; then
13960   withval="$with_ospeed"
13961   NCURSES_OSPEED="$withval"
13962 else
13963   NCURSES_OSPEED=short
13964 fi;
13965 echo "$as_me:13965: result: $NCURSES_OSPEED" >&5
13966 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13967
13968 ###   use option --with-mmask-t to override mmask_t's type
13969 echo "$as_me:13969: checking for type of mmask_t" >&5
13970 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13971
13972 # Check whether --with-mmask-t or --without-mmask-t was given.
13973 if test "${with_mmask_t+set}" = set; then
13974   withval="$with_mmask_t"
13975   NCURSES_MMASK_T="$withval"
13976 else
13977   NCURSES_MMASK_T=$cf_dft_mmask_t
13978 fi;
13979 echo "$as_me:13979: result: $NCURSES_MMASK_T" >&5
13980 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13981
13982 ###   use option --with-ccharw-max to override CCHARW_MAX size
13983 echo "$as_me:13983: checking for size CCHARW_MAX" >&5
13984 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13985
13986 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13987 if test "${with_ccharw_max+set}" = set; then
13988   withval="$with_ccharw_max"
13989   NCURSES_CCHARW_MAX="$withval"
13990 else
13991   NCURSES_CCHARW_MAX=5
13992 fi;
13993 echo "$as_me:13993: result: $NCURSES_CCHARW_MAX" >&5
13994 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13995
13996 echo "$as_me:13996: checking for ANSI C header files" >&5
13997 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13998 if test "${ac_cv_header_stdc+set}" = set; then
13999   echo $ECHO_N "(cached) $ECHO_C" >&6
14000 else
14001   cat >"conftest.$ac_ext" <<_ACEOF
14002 #line 14002 "configure"
14003 #include "confdefs.h"
14004 #include <stdlib.h>
14005 #include <stdarg.h>
14006 #include <string.h>
14007 #include <float.h>
14008
14009 _ACEOF
14010 if { (eval echo "$as_me:14010: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14011   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14012   ac_status=$?
14013   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14014   rm -f conftest.er1
14015   cat conftest.err >&5
14016   echo "$as_me:14016: \$? = $ac_status" >&5
14017   (exit "$ac_status"); } >/dev/null; then
14018   if test -s conftest.err; then
14019     ac_cpp_err=$ac_c_preproc_warn_flag
14020   else
14021     ac_cpp_err=
14022   fi
14023 else
14024   ac_cpp_err=yes
14025 fi
14026 if test -z "$ac_cpp_err"; then
14027   ac_cv_header_stdc=yes
14028 else
14029   echo "$as_me: failed program was:" >&5
14030   cat "conftest.$ac_ext" >&5
14031   ac_cv_header_stdc=no
14032 fi
14033 rm -f conftest.err "conftest.$ac_ext"
14034
14035 if test $ac_cv_header_stdc = yes; then
14036   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14037   cat >"conftest.$ac_ext" <<_ACEOF
14038 #line 14038 "configure"
14039 #include "confdefs.h"
14040 #include <string.h>
14041
14042 _ACEOF
14043 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14044   $EGREP "memchr" >/dev/null 2>&1; then
14045   :
14046 else
14047   ac_cv_header_stdc=no
14048 fi
14049 rm -rf conftest*
14050
14051 fi
14052
14053 if test $ac_cv_header_stdc = yes; then
14054   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14055   cat >"conftest.$ac_ext" <<_ACEOF
14056 #line 14056 "configure"
14057 #include "confdefs.h"
14058 #include <stdlib.h>
14059
14060 _ACEOF
14061 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14062   $EGREP "free" >/dev/null 2>&1; then
14063   :
14064 else
14065   ac_cv_header_stdc=no
14066 fi
14067 rm -rf conftest*
14068
14069 fi
14070
14071 if test $ac_cv_header_stdc = yes; then
14072   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14073   if test "$cross_compiling" = yes; then
14074   :
14075 else
14076   cat >"conftest.$ac_ext" <<_ACEOF
14077 #line 14077 "configure"
14078 #include "confdefs.h"
14079 #include <ctype.h>
14080 #if ((' ' & 0x0FF) == 0x020)
14081 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14082 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14083 #else
14084 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14085                      || ('j' <= (c) && (c) <= 'r') \
14086                      || ('s' <= (c) && (c) <= 'z'))
14087 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14088 #endif
14089
14090 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14091 int
14092 main (void)
14093 {
14094   int i;
14095   for (i = 0; i < 256; i++)
14096     if (XOR (islower (i), ISLOWER (i))
14097         || toupper (i) != TOUPPER (i))
14098       $ac_main_return(2);
14099   $ac_main_return (0);
14100 }
14101 _ACEOF
14102 rm -f "conftest$ac_exeext"
14103 if { (eval echo "$as_me:14103: \"$ac_link\"") >&5
14104   (eval $ac_link) 2>&5
14105   ac_status=$?
14106   echo "$as_me:14106: \$? = $ac_status" >&5
14107   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14108   { (eval echo "$as_me:14108: \"$ac_try\"") >&5
14109   (eval $ac_try) 2>&5
14110   ac_status=$?
14111   echo "$as_me:14111: \$? = $ac_status" >&5
14112   (exit "$ac_status"); }; }; then
14113   :
14114 else
14115   echo "$as_me: program exited with status $ac_status" >&5
14116 echo "$as_me: failed program was:" >&5
14117 cat "conftest.$ac_ext" >&5
14118 ac_cv_header_stdc=no
14119 fi
14120 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14121 fi
14122 fi
14123 fi
14124 echo "$as_me:14124: result: $ac_cv_header_stdc" >&5
14125 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14126 if test $ac_cv_header_stdc = yes; then
14127
14128 cat >>confdefs.h <<\EOF
14129 #define STDC_HEADERS 1
14130 EOF
14131
14132 fi
14133
14134 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14135
14136 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14137                   inttypes.h stdint.h unistd.h
14138 do
14139 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14140 echo "$as_me:14140: checking for $ac_header" >&5
14141 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14142 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14143   echo $ECHO_N "(cached) $ECHO_C" >&6
14144 else
14145   cat >"conftest.$ac_ext" <<_ACEOF
14146 #line 14146 "configure"
14147 #include "confdefs.h"
14148 $ac_includes_default
14149 #include <$ac_header>
14150 _ACEOF
14151 rm -f "conftest.$ac_objext"
14152 if { (eval echo "$as_me:14152: \"$ac_compile\"") >&5
14153   (eval $ac_compile) 2>&5
14154   ac_status=$?
14155   echo "$as_me:14155: \$? = $ac_status" >&5
14156   (exit "$ac_status"); } &&
14157          { ac_try='test -s "conftest.$ac_objext"'
14158   { (eval echo "$as_me:14158: \"$ac_try\"") >&5
14159   (eval $ac_try) 2>&5
14160   ac_status=$?
14161   echo "$as_me:14161: \$? = $ac_status" >&5
14162   (exit "$ac_status"); }; }; then
14163   eval "$as_ac_Header=yes"
14164 else
14165   echo "$as_me: failed program was:" >&5
14166 cat "conftest.$ac_ext" >&5
14167 eval "$as_ac_Header=no"
14168 fi
14169 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14170 fi
14171 echo "$as_me:14171: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14172 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14173 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14174   cat >>confdefs.h <<EOF
14175 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14176 EOF
14177
14178 fi
14179 done
14180
14181 echo "$as_me:14181: checking for signed char" >&5
14182 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14183 if test "${ac_cv_type_signed_char+set}" = set; then
14184   echo $ECHO_N "(cached) $ECHO_C" >&6
14185 else
14186   cat >"conftest.$ac_ext" <<_ACEOF
14187 #line 14187 "configure"
14188 #include "confdefs.h"
14189 $ac_includes_default
14190 int
14191 main (void)
14192 {
14193 if ((signed char *) 0)
14194   return 0;
14195 if (sizeof (signed char))
14196   return 0;
14197   ;
14198   return 0;
14199 }
14200 _ACEOF
14201 rm -f "conftest.$ac_objext"
14202 if { (eval echo "$as_me:14202: \"$ac_compile\"") >&5
14203   (eval $ac_compile) 2>&5
14204   ac_status=$?
14205   echo "$as_me:14205: \$? = $ac_status" >&5
14206   (exit "$ac_status"); } &&
14207          { ac_try='test -s "conftest.$ac_objext"'
14208   { (eval echo "$as_me:14208: \"$ac_try\"") >&5
14209   (eval $ac_try) 2>&5
14210   ac_status=$?
14211   echo "$as_me:14211: \$? = $ac_status" >&5
14212   (exit "$ac_status"); }; }; then
14213   ac_cv_type_signed_char=yes
14214 else
14215   echo "$as_me: failed program was:" >&5
14216 cat "conftest.$ac_ext" >&5
14217 ac_cv_type_signed_char=no
14218 fi
14219 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14220 fi
14221 echo "$as_me:14221: result: $ac_cv_type_signed_char" >&5
14222 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14223
14224 echo "$as_me:14224: checking size of signed char" >&5
14225 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14226 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14227   echo $ECHO_N "(cached) $ECHO_C" >&6
14228 else
14229   if test "$ac_cv_type_signed_char" = yes; then
14230   if test "$cross_compiling" = yes; then
14231   # Depending upon the size, compute the lo and hi bounds.
14232 cat >"conftest.$ac_ext" <<_ACEOF
14233 #line 14233 "configure"
14234 #include "confdefs.h"
14235 $ac_includes_default
14236 int
14237 main (void)
14238 {
14239 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14240   ;
14241   return 0;
14242 }
14243 _ACEOF
14244 rm -f "conftest.$ac_objext"
14245 if { (eval echo "$as_me:14245: \"$ac_compile\"") >&5
14246   (eval $ac_compile) 2>&5
14247   ac_status=$?
14248   echo "$as_me:14248: \$? = $ac_status" >&5
14249   (exit "$ac_status"); } &&
14250          { ac_try='test -s "conftest.$ac_objext"'
14251   { (eval echo "$as_me:14251: \"$ac_try\"") >&5
14252   (eval $ac_try) 2>&5
14253   ac_status=$?
14254   echo "$as_me:14254: \$? = $ac_status" >&5
14255   (exit "$ac_status"); }; }; then
14256   ac_lo=0 ac_mid=0
14257   while :; do
14258     cat >"conftest.$ac_ext" <<_ACEOF
14259 #line 14259 "configure"
14260 #include "confdefs.h"
14261 $ac_includes_default
14262 int
14263 main (void)
14264 {
14265 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14266   ;
14267   return 0;
14268 }
14269 _ACEOF
14270 rm -f "conftest.$ac_objext"
14271 if { (eval echo "$as_me:14271: \"$ac_compile\"") >&5
14272   (eval $ac_compile) 2>&5
14273   ac_status=$?
14274   echo "$as_me:14274: \$? = $ac_status" >&5
14275   (exit "$ac_status"); } &&
14276          { ac_try='test -s "conftest.$ac_objext"'
14277   { (eval echo "$as_me:14277: \"$ac_try\"") >&5
14278   (eval $ac_try) 2>&5
14279   ac_status=$?
14280   echo "$as_me:14280: \$? = $ac_status" >&5
14281   (exit "$ac_status"); }; }; then
14282   ac_hi=$ac_mid; break
14283 else
14284   echo "$as_me: failed program was:" >&5
14285 cat "conftest.$ac_ext" >&5
14286 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14287 fi
14288 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14289   done
14290 else
14291   echo "$as_me: failed program was:" >&5
14292 cat "conftest.$ac_ext" >&5
14293 ac_hi=-1 ac_mid=-1
14294   while :; do
14295     cat >"conftest.$ac_ext" <<_ACEOF
14296 #line 14296 "configure"
14297 #include "confdefs.h"
14298 $ac_includes_default
14299 int
14300 main (void)
14301 {
14302 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14303   ;
14304   return 0;
14305 }
14306 _ACEOF
14307 rm -f "conftest.$ac_objext"
14308 if { (eval echo "$as_me:14308: \"$ac_compile\"") >&5
14309   (eval $ac_compile) 2>&5
14310   ac_status=$?
14311   echo "$as_me:14311: \$? = $ac_status" >&5
14312   (exit "$ac_status"); } &&
14313          { ac_try='test -s "conftest.$ac_objext"'
14314   { (eval echo "$as_me:14314: \"$ac_try\"") >&5
14315   (eval $ac_try) 2>&5
14316   ac_status=$?
14317   echo "$as_me:14317: \$? = $ac_status" >&5
14318   (exit "$ac_status"); }; }; then
14319   ac_lo=$ac_mid; break
14320 else
14321   echo "$as_me: failed program was:" >&5
14322 cat "conftest.$ac_ext" >&5
14323 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14324 fi
14325 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14326   done
14327 fi
14328 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14329 # Binary search between lo and hi bounds.
14330 while test "x$ac_lo" != "x$ac_hi"; do
14331   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14332   cat >"conftest.$ac_ext" <<_ACEOF
14333 #line 14333 "configure"
14334 #include "confdefs.h"
14335 $ac_includes_default
14336 int
14337 main (void)
14338 {
14339 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
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   ac_hi=$ac_mid
14357 else
14358   echo "$as_me: failed program was:" >&5
14359 cat "conftest.$ac_ext" >&5
14360 ac_lo=`expr "$ac_mid" + 1`
14361 fi
14362 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14363 done
14364 ac_cv_sizeof_signed_char=$ac_lo
14365 else
14366   if test "$cross_compiling" = yes; then
14367   { { echo "$as_me:14367: error: cannot run test program while cross compiling" >&5
14368 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14369    { (exit 1); exit 1; }; }
14370 else
14371   cat >"conftest.$ac_ext" <<_ACEOF
14372 #line 14372 "configure"
14373 #include "confdefs.h"
14374 $ac_includes_default
14375 int
14376 main (void)
14377 {
14378 FILE *f = fopen ("conftest.val", "w");
14379 if (!f)
14380   $ac_main_return (1);
14381 fprintf (f, "%ld", (long)(sizeof (signed char)));
14382 fclose (f);
14383   ;
14384   return 0;
14385 }
14386 _ACEOF
14387 rm -f "conftest$ac_exeext"
14388 if { (eval echo "$as_me:14388: \"$ac_link\"") >&5
14389   (eval $ac_link) 2>&5
14390   ac_status=$?
14391   echo "$as_me:14391: \$? = $ac_status" >&5
14392   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14393   { (eval echo "$as_me:14393: \"$ac_try\"") >&5
14394   (eval $ac_try) 2>&5
14395   ac_status=$?
14396   echo "$as_me:14396: \$? = $ac_status" >&5
14397   (exit "$ac_status"); }; }; then
14398   ac_cv_sizeof_signed_char=`cat conftest.val`
14399 else
14400   echo "$as_me: program exited with status $ac_status" >&5
14401 echo "$as_me: failed program was:" >&5
14402 cat "conftest.$ac_ext" >&5
14403 fi
14404 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14405 fi
14406 fi
14407 rm -f conftest.val
14408 else
14409   ac_cv_sizeof_signed_char=0
14410 fi
14411 fi
14412 echo "$as_me:14412: result: $ac_cv_sizeof_signed_char" >&5
14413 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14414 cat >>confdefs.h <<EOF
14415 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14416 EOF
14417
14418 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14419         NCURSES_SBOOL="signed char"
14420 else
14421         NCURSES_SBOOL="char"
14422 fi
14423 echo "$as_me:14423: checking if you want to use signed Boolean array in term.h" >&5
14424 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14425
14426 # Check whether --enable-signed-char or --disable-signed-char was given.
14427 if test "${enable_signed_char+set}" = set; then
14428   enableval="$enable_signed_char"
14429   with_signed_char=$enableval
14430 else
14431   with_signed_char=no
14432 fi;
14433 echo "$as_me:14433: result: $with_signed_char" >&5
14434 echo "${ECHO_T}$with_signed_char" >&6
14435 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14436
14437 ###   use option --with-tparm-arg to override tparm's argument type
14438 echo "$as_me:14438: checking for type of tparm args" >&5
14439 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14440
14441 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14442 if test "${with_tparm_arg+set}" = set; then
14443   withval="$with_tparm_arg"
14444   NCURSES_TPARM_ARG="$withval"
14445 else
14446   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14447 fi;
14448 echo "$as_me:14448: result: $NCURSES_TPARM_ARG" >&5
14449 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14450
14451 ### Enable compiling-in rcs id's
14452 echo "$as_me:14452: checking if RCS identifiers should be compiled-in" >&5
14453 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14454
14455 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14456 if test "${with_rcs_ids+set}" = set; then
14457   withval="$with_rcs_ids"
14458   with_rcs_ids=$withval
14459 else
14460   with_rcs_ids=no
14461 fi;
14462 echo "$as_me:14462: result: $with_rcs_ids" >&5
14463 echo "${ECHO_T}$with_rcs_ids" >&6
14464 test "x$with_rcs_ids" = xyes &&
14465 cat >>confdefs.h <<\EOF
14466 #define USE_RCS_IDS 1
14467 EOF
14468
14469 ###############################################################################
14470
14471 echo "$as_me:14471: checking format of man-pages" >&5
14472 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14473
14474 # Check whether --with-manpage-format or --without-manpage-format was given.
14475 if test "${with_manpage_format+set}" = set; then
14476   withval="$with_manpage_format"
14477   MANPAGE_FORMAT=$withval
14478 else
14479   MANPAGE_FORMAT=unknown
14480 fi;
14481
14482 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14483 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14484
14485 cf_unknown=
14486
14487 case "$MANPAGE_FORMAT" in
14488 (unknown)
14489         if test -z "$MANPATH" ; then
14490                 MANPATH="/usr/man:/usr/share/man"
14491         fi
14492
14493         # look for the 'date' man-page (it is most likely to be installed!)
14494         MANPAGE_FORMAT=
14495         cf_preform="no"
14496         cf_catonly="yes"
14497         cf_example="date"
14498
14499         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14500         for cf_dir in $MANPATH; do
14501                 test -z "$cf_dir" && cf_dir=/usr/man
14502                 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
14503                 do
14504                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14505                         if test "x$cf_test" = "x$cf_name" ; then
14506
14507                                 case "$cf_name" in
14508                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14509                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14510                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14511                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14512                                 esac
14513
14514                                 case "$cf_name" in
14515                                 ($cf_dir/man*)
14516                                         cf_catonly=no
14517                                         ;;
14518                                 ($cf_dir/cat*)
14519                                         cf_preform=yes
14520                                         ;;
14521                                 esac
14522                                 break
14523                         fi
14524
14525                         # if we found a match in either man* or cat*, stop looking
14526                         if test -n "$MANPAGE_FORMAT" ; then
14527                                 cf_found=no
14528                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14529                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14530                                 case "$cf_name" in
14531                                 ($cf_dir/cat*)
14532                                         cf_found=yes
14533                                         ;;
14534                                 esac
14535                                 test "$cf_found" = yes && break
14536                         fi
14537                 done
14538                 # only check the first directory in $MANPATH where we find manpages
14539                 if test -n "$MANPAGE_FORMAT" ; then
14540                         break
14541                 fi
14542         done
14543         # if we did not find the example, just assume it is normal
14544         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14545         IFS="$ac_save_ifs"
14546         ;;
14547 (*)
14548         for cf_option in $MANPAGE_FORMAT; do
14549         case "$cf_option" in
14550         (gzip|compress|BSDI|normal|formatted|catonly)
14551                 ;;
14552         (*)
14553                 cf_unknown="$cf_unknown $cf_option"
14554                 ;;
14555         esac
14556         done
14557         ;;
14558 esac
14559
14560 echo "$as_me:14560: result: $MANPAGE_FORMAT" >&5
14561 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14562 if test -n "$cf_unknown" ; then
14563         { echo "$as_me:14563: WARNING: Unexpected manpage-format $cf_unknown" >&5
14564 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14565 fi
14566
14567 echo "$as_me:14567: checking for manpage renaming" >&5
14568 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14569
14570 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14571 if test "${with_manpage_renames+set}" = set; then
14572   withval="$with_manpage_renames"
14573   MANPAGE_RENAMES=$withval
14574 else
14575   MANPAGE_RENAMES=yes
14576 fi;
14577
14578 case ".$MANPAGE_RENAMES" in
14579 (.no)
14580         ;;
14581 (.|.yes)
14582         # Debian 'man' program?
14583         if test -f /etc/debian_version ; then
14584                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14585         else
14586                 MANPAGE_RENAMES=no
14587         fi
14588         ;;
14589 esac
14590
14591 if test "$MANPAGE_RENAMES" != no ; then
14592         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14593                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14594         elif test ! -f "$MANPAGE_RENAMES" ; then
14595                 { { echo "$as_me:14595: error: not a filename: $MANPAGE_RENAMES" >&5
14596 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14597    { (exit 1); exit 1; }; }
14598         fi
14599
14600         test ! -d man && mkdir man
14601
14602         # Construct a sed-script to perform renaming within man-pages
14603         if test -n "$MANPAGE_RENAMES" ; then
14604                 test ! -d man && mkdir man
14605                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14606         fi
14607 fi
14608
14609 echo "$as_me:14609: result: $MANPAGE_RENAMES" >&5
14610 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14611
14612 echo "$as_me:14612: checking if manpage aliases will be installed" >&5
14613 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14614
14615 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14616 if test "${with_manpage_aliases+set}" = set; then
14617   withval="$with_manpage_aliases"
14618   MANPAGE_ALIASES=$withval
14619 else
14620   MANPAGE_ALIASES=yes
14621 fi;
14622
14623 echo "$as_me:14623: result: $MANPAGE_ALIASES" >&5
14624 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14625
14626 case "x$LN_S" in
14627 (xln*)
14628         cf_use_symlinks=yes
14629         ;;
14630 (*)
14631         cf_use_symlinks=no
14632         ;;
14633 esac
14634
14635 MANPAGE_SYMLINKS=no
14636 if test "$MANPAGE_ALIASES" = yes ; then
14637 echo "$as_me:14637: checking if manpage symlinks should be used" >&5
14638 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14639
14640 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14641 if test "${with_manpage_symlinks+set}" = set; then
14642   withval="$with_manpage_symlinks"
14643   MANPAGE_SYMLINKS=$withval
14644 else
14645   MANPAGE_SYMLINKS=$cf_use_symlinks
14646 fi;
14647
14648 if test "$$cf_use_symlinks" = no; then
14649 if test "$MANPAGE_SYMLINKS" = yes ; then
14650         { echo "$as_me:14650: WARNING: cannot make symlinks" >&5
14651 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14652         MANPAGE_SYMLINKS=no
14653 fi
14654 fi
14655
14656 echo "$as_me:14656: result: $MANPAGE_SYMLINKS" >&5
14657 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14658 fi
14659
14660 echo "$as_me:14660: checking for manpage tbl" >&5
14661 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14662
14663 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14664 if test "${with_manpage_tbl+set}" = set; then
14665   withval="$with_manpage_tbl"
14666   MANPAGE_TBL=$withval
14667 else
14668   MANPAGE_TBL=no
14669 fi;
14670
14671 echo "$as_me:14671: result: $MANPAGE_TBL" >&5
14672 echo "${ECHO_T}$MANPAGE_TBL" >&6
14673
14674 if test "$prefix" = "NONE" ; then
14675         cf_prefix="$ac_default_prefix"
14676 else
14677         cf_prefix="$prefix"
14678 fi
14679
14680 case "$MANPAGE_FORMAT" in
14681 (*catonly*)
14682         cf_format=yes
14683         cf_inboth=no
14684         ;;
14685 (*formatted*)
14686         cf_format=yes
14687         cf_inboth=yes
14688         ;;
14689 (*)
14690         cf_format=no
14691         cf_inboth=no
14692         ;;
14693 esac
14694
14695 test ! -d man && mkdir man
14696
14697 cf_so_strip=
14698 cf_compress=
14699 case "$MANPAGE_FORMAT" in
14700 (*compress*)
14701         cf_so_strip="Z"
14702         cf_compress=compress
14703         ;;
14704 (*gzip*)
14705         cf_so_strip="gz"
14706         cf_compress=gzip
14707         ;;
14708 esac
14709
14710 cf_edit_man=./edit_man.sh
14711 cf_man_alias=`pwd`/man_alias.sed
14712
14713 cat >$cf_edit_man <<CF_EOF
14714 #! $SHELL
14715 # this script is generated by the configure-script CF_MAN_PAGES macro.
14716
14717 prefix="$cf_prefix"
14718 datarootdir="$datarootdir"
14719 datadir="$datadir"
14720
14721 NCURSES_MAJOR="$NCURSES_MAJOR"
14722 NCURSES_MINOR="$NCURSES_MINOR"
14723 NCURSES_PATCH="$NCURSES_PATCH"
14724
14725 NCURSES_OSPEED="$NCURSES_OSPEED"
14726 TERMINFO="$TERMINFO"
14727
14728 INSTALL="$INSTALL"
14729 INSTALL_DATA="$INSTALL_DATA"
14730
14731 transform="$program_transform_name"
14732
14733 TMP=\${TMPDIR:=/tmp}/man\$\$
14734 trap "rm -f \$TMP" 0 1 2 3 15
14735
14736 form=\$1
14737 shift || exit 1
14738
14739 verb=\$1
14740 shift || exit 1
14741
14742 mandir=\$1
14743 shift || exit 1
14744
14745 srcdir=\$1
14746 top_srcdir=\$srcdir/..
14747 shift || exit 1
14748
14749 if test "\$form" = normal ; then
14750         if test "$cf_format" = yes ; then
14751         if test "$cf_inboth" = no ; then
14752                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14753                 exit $?
14754         fi
14755         fi
14756         cf_subdir=\$mandir/man
14757         cf_tables=$MANPAGE_TBL
14758 else
14759         cf_subdir=\$mandir/cat
14760         cf_tables=yes
14761 fi
14762
14763 # process the list of source-files
14764 for i in "\$@" ; do
14765 case \$i in
14766 (*.orig|*.rej) ;;
14767 (*.[0-9]*)
14768         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14769         if test "\$verb" = installing ; then
14770         if test ! -d "\$cf_subdir\${section}" ; then
14771                 mkdir -p "\$cf_subdir\$section"
14772         fi
14773         fi
14774
14775         # replace variables in man page
14776         if test ! -f "$cf_man_alias" ; then
14777 cat >>$cf_man_alias <<-CF_EOF2
14778                 s,@DATADIR@,\$datadir,g
14779                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14780                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14781                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14782                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14783                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14784                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14785 CF_EOF
14786
14787         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14788         do
14789                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14790                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14791 cat >>$cf_edit_man <<-CF_EOF
14792                 s,@$cf_NAME@,$cf_name,g
14793 CF_EOF
14794         done
14795
14796 cat >>$cf_edit_man <<CF_EOF
14797 CF_EOF2
14798                 echo "...made $cf_man_alias"
14799         fi
14800
14801         aliases=
14802         cf_source=\`basename "\$i"\`
14803         inalias=\$cf_source
14804         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14805         if test ! -f "\$inalias" ; then
14806                 echo ".. skipped \$cf_source"
14807                 continue
14808         fi
14809 CF_EOF
14810
14811 if test "$MANPAGE_ALIASES" != no ; then
14812 cat >>$cf_edit_man <<CF_EOF
14813         nCurses=ignore.3x
14814         test "$with_curses_h" = yes && nCurses=ncurses.3x
14815         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14816 CF_EOF
14817 fi
14818
14819 if test "$MANPAGE_RENAMES" = no ; then
14820 cat >>$cf_edit_man <<CF_EOF
14821         # perform program transformations for section 1 man pages
14822         if test \$section = 1 ; then
14823                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14824         else
14825                 cf_target=\$cf_subdir\${section}/\$cf_source
14826         fi
14827 CF_EOF
14828 else
14829 cat >>$cf_edit_man <<CF_EOF
14830         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14831         if test -z "\$cf_target" ; then
14832                 echo "? missing rename for \$cf_source"
14833                 cf_target="\$cf_source"
14834         fi
14835         cf_target="\$cf_subdir\${section}/\${cf_target}"
14836
14837 CF_EOF
14838 fi
14839
14840 cat >>$cf_edit_man <<CF_EOF
14841         sed     -f "$cf_man_alias" \\
14842 CF_EOF
14843
14844 if test -f "$MANPAGE_RENAMES" ; then
14845 cat >>$cf_edit_man <<CF_EOF
14846                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14847 CF_EOF
14848 else
14849 cat >>$cf_edit_man <<CF_EOF
14850                 < "\$i" >\$TMP
14851 CF_EOF
14852 fi
14853
14854 cat >>$cf_edit_man <<CF_EOF
14855 if test \$cf_tables = yes ; then
14856         tbl \$TMP >\$TMP.out
14857         mv \$TMP.out \$TMP
14858 fi
14859 CF_EOF
14860
14861 if test "$with_overwrite" != yes ; then
14862 cat >>$cf_edit_man <<CF_EOF
14863         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14864         mv \$TMP.out \$TMP
14865 CF_EOF
14866 fi
14867
14868 if test "$with_curses_h" != yes ; then
14869 cat >>$cf_edit_man <<CF_EOF
14870         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14871         mv \$TMP.out \$TMP
14872 CF_EOF
14873 fi
14874
14875 cat >>$cf_edit_man <<CF_EOF
14876         if test "\$form" = format ; then
14877                 nroff -man \$TMP >\$TMP.out
14878                 mv \$TMP.out \$TMP
14879         fi
14880 CF_EOF
14881
14882 if test -n "$cf_compress" ; then
14883 cat >>$cf_edit_man <<CF_EOF
14884         if test "\$verb" = installing ; then
14885         if ( "$cf_compress" -f \$TMP )
14886         then
14887                 mv \$TMP.$cf_so_strip \$TMP
14888         fi
14889         fi
14890         cf_target="\$cf_target.$cf_so_strip"
14891 CF_EOF
14892 fi
14893
14894 case "$MANPAGE_FORMAT" in
14895 (*BSDI*)
14896 cat >>$cf_edit_man <<CF_EOF
14897         if test "\$form" = format ; then
14898                 # BSDI installs only .0 suffixes in the cat directories
14899                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14900         fi
14901 CF_EOF
14902   ;;
14903 esac
14904
14905 cat >>$cf_edit_man <<CF_EOF
14906         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14907         if test "\$verb" = installing ; then
14908                 echo "\$verb \$cf_target"
14909                 \$INSTALL_DATA \$TMP "\$cf_target"
14910                 test -d "\$cf_subdir\${section}" &&
14911                 test -n "\$aliases" && (
14912                         cd "\$cf_subdir\${section}" && (
14913                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14914                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14915                                 cf_target=\`basename "\$cf_target"\`
14916                                 for cf_alias in \$aliases
14917                                 do
14918                                         if test "\$section" = 1 ; then
14919                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14920                                         fi
14921
14922                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14923                                                 if test -f "\$cf_alias\${suffix}" ; then
14924                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14925                                                         then
14926                                                                 continue
14927                                                         fi
14928                                                 fi
14929                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14930 CF_EOF
14931 case "x$LN_S" in
14932 (*-f)
14933 cat >>$cf_edit_man <<CF_EOF
14934                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14935 CF_EOF
14936         ;;
14937 (*)
14938 cat >>$cf_edit_man <<CF_EOF
14939                                                 rm -f "\$cf_alias\${suffix}"
14940                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14941 CF_EOF
14942         ;;
14943 esac
14944 cat >>$cf_edit_man <<CF_EOF
14945                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14946                                                 echo ".so \$cf_source" >\$TMP
14947 CF_EOF
14948 if test -n "$cf_compress" ; then
14949 cat >>$cf_edit_man <<CF_EOF
14950                                                 if test -n "$cf_so_strip" ; then
14951                                                         "$cf_compress" -f \$TMP
14952                                                         mv \$TMP.$cf_so_strip \$TMP
14953                                                 fi
14954 CF_EOF
14955 fi
14956 cat >>$cf_edit_man <<CF_EOF
14957                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14958                                                 rm -f "\$cf_alias\${suffix}"
14959                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14960                                         fi
14961                                 done
14962                         )
14963                 )
14964         elif test "\$verb" = removing ; then
14965                 test -f "\$cf_target" && (
14966                         echo "\$verb \$cf_target"
14967                         rm -f "\$cf_target"
14968                 )
14969                 test -d "\$cf_subdir\${section}" &&
14970                 test -n "\$aliases" && (
14971                         cd "\$cf_subdir\${section}" && (
14972                                 for cf_alias in \$aliases
14973                                 do
14974                                         if test "\$section" = 1 ; then
14975                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14976                                         fi
14977
14978                                         echo ".. \$verb alias \$cf_alias\${suffix}"
14979                                         rm -f "\$cf_alias\${suffix}"
14980                                 done
14981                         )
14982                 )
14983         else
14984 #               echo ".hy 0"
14985                 cat \$TMP
14986         fi
14987         ;;
14988 esac
14989 done
14990
14991 if test "$cf_inboth" = yes ; then
14992 if test "\$form" != format ; then
14993         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14994 fi
14995 fi
14996
14997 exit 0
14998 CF_EOF
14999 chmod 755 "$cf_edit_man"
15000
15001 ###############################################################################
15002
15003 ### Note that some functions (such as const) are normally disabled anyway.
15004 echo "$as_me:15004: checking if you want to build with function extensions" >&5
15005 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15006
15007 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15008 if test "${enable_ext_funcs+set}" = set; then
15009   enableval="$enable_ext_funcs"
15010   with_ext_funcs=$enableval
15011 else
15012   with_ext_funcs=yes
15013 fi;
15014 echo "$as_me:15014: result: $with_ext_funcs" >&5
15015 echo "${ECHO_T}$with_ext_funcs" >&6
15016 if test "x$with_ext_funcs" = xyes ; then
15017         NCURSES_EXT_FUNCS=1
15018
15019 cat >>confdefs.h <<\EOF
15020 #define NCURSES_EXT_FUNCS 1
15021 EOF
15022
15023 cat >>confdefs.h <<\EOF
15024 #define HAVE_ASSUME_DEFAULT_COLORS 1
15025 EOF
15026
15027 cat >>confdefs.h <<\EOF
15028 #define HAVE_CURSES_VERSION 1
15029 EOF
15030
15031 cat >>confdefs.h <<\EOF
15032 #define HAVE_HAS_KEY 1
15033 EOF
15034
15035 cat >>confdefs.h <<\EOF
15036 #define HAVE_RESIZETERM 1
15037 EOF
15038
15039 cat >>confdefs.h <<\EOF
15040 #define HAVE_RESIZE_TERM 1
15041 EOF
15042
15043 cat >>confdefs.h <<\EOF
15044 #define HAVE_TERM_ENTRY_H 1
15045 EOF
15046
15047 cat >>confdefs.h <<\EOF
15048 #define HAVE_USE_DEFAULT_COLORS 1
15049 EOF
15050
15051 cat >>confdefs.h <<\EOF
15052 #define HAVE_USE_EXTENDED_NAMES 1
15053 EOF
15054
15055 cat >>confdefs.h <<\EOF
15056 #define HAVE_USE_SCREEN 1
15057 EOF
15058
15059 cat >>confdefs.h <<\EOF
15060 #define HAVE_USE_WINDOW 1
15061 EOF
15062
15063 cat >>confdefs.h <<\EOF
15064 #define HAVE_WRESIZE 1
15065 EOF
15066
15067         GENERATED_EXT_FUNCS=generated
15068         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15069 else
15070         NCURSES_EXT_FUNCS=0
15071         GENERATED_EXT_FUNCS=
15072 fi
15073
15074 echo "$as_me:15074: checking if you want to build with SCREEN extensions" >&5
15075 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15076
15077 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15078 if test "${enable_sp_funcs+set}" = set; then
15079   enableval="$enable_sp_funcs"
15080   with_sp_funcs=$enableval
15081 else
15082   with_sp_funcs=$cf_dft_ext_spfuncs
15083 fi;
15084 echo "$as_me:15084: result: $with_sp_funcs" >&5
15085 echo "${ECHO_T}$with_sp_funcs" >&6
15086 if test "x$with_sp_funcs" = xyes ; then
15087         NCURSES_SP_FUNCS=1
15088
15089 cat >>confdefs.h <<\EOF
15090 #define NCURSES_SP_FUNCS 1
15091 EOF
15092
15093 cat >>confdefs.h <<\EOF
15094 #define HAVE_TPUTS_SP 1
15095 EOF
15096
15097         GENERATED_SP_FUNCS=generated
15098 else
15099         NCURSES_SP_FUNCS=0
15100         GENERATED_SP_FUNCS=
15101 fi
15102
15103 echo "$as_me:15103: checking if you want to build with terminal-driver" >&5
15104 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15105
15106 # Check whether --enable-term-driver or --disable-term-driver was given.
15107 if test "${enable_term_driver+set}" = set; then
15108   enableval="$enable_term_driver"
15109   with_term_driver=$enableval
15110 else
15111   with_term_driver=no
15112 fi;
15113 echo "$as_me:15113: result: $with_term_driver" >&5
15114 echo "${ECHO_T}$with_term_driver" >&6
15115 if test "x$with_term_driver" = xyes ; then
15116
15117 cat >>confdefs.h <<\EOF
15118 #define USE_TERM_DRIVER 1
15119 EOF
15120
15121         if test "x$with_termlib" != xno ; then
15122                 { { echo "$as_me:15122: error: The term-driver option conflicts with the termlib option" >&5
15123 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15124    { (exit 1); exit 1; }; }
15125         fi
15126         if test "x$with_sp_funcs" != xyes ; then
15127                 { { echo "$as_me:15127: error: The term-driver option relies upon sp-funcs" >&5
15128 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15129    { (exit 1); exit 1; }; }
15130         fi
15131 fi
15132
15133 ###   use option --enable-const to turn on use of const beyond that in XSI.
15134 echo "$as_me:15134: checking for extended use of const keyword" >&5
15135 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15136
15137 # Check whether --enable-const or --disable-const was given.
15138 if test "${enable_const+set}" = set; then
15139   enableval="$enable_const"
15140   with_ext_const=$enableval
15141 else
15142   with_ext_const=$cf_dft_ext_const
15143 fi;
15144 echo "$as_me:15144: result: $with_ext_const" >&5
15145 echo "${ECHO_T}$with_ext_const" >&6
15146 NCURSES_CONST='/*nothing*/'
15147 if test "x$with_ext_const" = xyes ; then
15148         NCURSES_CONST=const
15149 fi
15150
15151 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15152 echo "$as_me:15152: checking if you want to use extended colors" >&5
15153 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15154
15155 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15156 if test "${enable_ext_colors+set}" = set; then
15157   enableval="$enable_ext_colors"
15158   with_ext_colors=$enableval
15159 else
15160   with_ext_colors=$cf_dft_ext_colors
15161 fi;
15162 echo "$as_me:15162: result: $with_ext_colors" >&5
15163 echo "${ECHO_T}$with_ext_colors" >&6
15164 NCURSES_EXT_COLORS=0
15165 if test "x$with_ext_colors" = xyes ; then
15166         if test "x$with_widec" != xyes ; then
15167                 { echo "$as_me:15167: WARNING: This option applies only to wide-character library" >&5
15168 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15169         else
15170                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15171
15172 if test "${with_abi_version+set}" != set; then
15173         case "$cf_cv_rel_version" in
15174         (5.*)
15175                 cf_cv_rel_version=6.0
15176                 cf_cv_abi_version=6
15177                 { echo "$as_me:15177: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15178 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15179                 ;;
15180         esac
15181 fi
15182
15183                 NCURSES_EXT_COLORS=1
15184
15185 cat >>confdefs.h <<\EOF
15186 #define NCURSES_EXT_COLORS 1
15187 EOF
15188
15189 cat >>confdefs.h <<\EOF
15190 #define HAVE_ALLOC_PAIR 1
15191 EOF
15192
15193 cat >>confdefs.h <<\EOF
15194 #define HAVE_INIT_EXTENDED_COLOR 1
15195 EOF
15196
15197 cat >>confdefs.h <<\EOF
15198 #define HAVE_RESET_COLOR_PAIRS 1
15199 EOF
15200
15201         fi
15202 fi
15203
15204 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15205 echo "$as_me:15205: checking if you want to use extended mouse encoding" >&5
15206 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15207
15208 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15209 if test "${enable_ext_mouse+set}" = set; then
15210   enableval="$enable_ext_mouse"
15211   with_ext_mouse=$enableval
15212 else
15213   with_ext_mouse=$cf_dft_ext_mouse
15214 fi;
15215 echo "$as_me:15215: result: $with_ext_mouse" >&5
15216 echo "${ECHO_T}$with_ext_mouse" >&6
15217 NCURSES_MOUSE_VERSION=1
15218 if test "x$with_ext_mouse" = xyes ; then
15219         NCURSES_MOUSE_VERSION=2
15220
15221 if test "${with_abi_version+set}" != set; then
15222         case "$cf_cv_rel_version" in
15223         (5.*)
15224                 cf_cv_rel_version=6.0
15225                 cf_cv_abi_version=6
15226                 { echo "$as_me:15226: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15227 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15228                 ;;
15229         esac
15230 fi
15231
15232 fi
15233
15234 ###   use option --enable-ext-putwin to turn on extended screendumps
15235 echo "$as_me:15235: checking if you want to use extended putwin/screendump" >&5
15236 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15237
15238 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15239 if test "${enable_ext_putwin+set}" = set; then
15240   enableval="$enable_ext_putwin"
15241   with_ext_putwin=$enableval
15242 else
15243   with_ext_putwin=$cf_dft_ext_putwin
15244 fi;
15245 echo "$as_me:15245: result: $with_ext_putwin" >&5
15246 echo "${ECHO_T}$with_ext_putwin" >&6
15247 if test "x$with_ext_putwin" = xyes ; then
15248
15249 cat >>confdefs.h <<\EOF
15250 #define NCURSES_EXT_PUTWIN 1
15251 EOF
15252
15253 fi
15254
15255 echo "$as_me:15255: checking if you want \$NCURSES_NO_PADDING code" >&5
15256 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15257
15258 # Check whether --enable-no-padding or --disable-no-padding was given.
15259 if test "${enable_no_padding+set}" = set; then
15260   enableval="$enable_no_padding"
15261   with_no_padding=$enableval
15262 else
15263   with_no_padding=$with_ext_funcs
15264 fi;
15265 echo "$as_me:15265: result: $with_no_padding" >&5
15266 echo "${ECHO_T}$with_no_padding" >&6
15267 test "x$with_no_padding" = xyes &&
15268 cat >>confdefs.h <<\EOF
15269 #define NCURSES_NO_PADDING 1
15270 EOF
15271
15272 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15273 echo "$as_me:15273: checking if you want SIGWINCH handler" >&5
15274 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15275
15276 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15277 if test "${enable_sigwinch+set}" = set; then
15278   enableval="$enable_sigwinch"
15279   with_sigwinch=$enableval
15280 else
15281   with_sigwinch=$with_ext_funcs
15282 fi;
15283 echo "$as_me:15283: result: $with_sigwinch" >&5
15284 echo "${ECHO_T}$with_sigwinch" >&6
15285 test "x$with_sigwinch" = xyes &&
15286 cat >>confdefs.h <<\EOF
15287 #define USE_SIGWINCH 1
15288 EOF
15289
15290 ###   use option --enable-tcap-names to allow user to define new capabilities
15291 echo "$as_me:15291: checking if you want user-definable terminal capabilities like termcap" >&5
15292 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15293
15294 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15295 if test "${enable_tcap_names+set}" = set; then
15296   enableval="$enable_tcap_names"
15297   with_tcap_names=$enableval
15298 else
15299   with_tcap_names=$with_ext_funcs
15300 fi;
15301 echo "$as_me:15301: result: $with_tcap_names" >&5
15302 echo "${ECHO_T}$with_tcap_names" >&6
15303 NCURSES_XNAMES=0
15304 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15305
15306 ##############################################################################
15307
15308 echo "$as_me:15308: checking if you want to link with the pthread library" >&5
15309 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15310
15311 # Check whether --with-pthread or --without-pthread was given.
15312 if test "${with_pthread+set}" = set; then
15313   withval="$with_pthread"
15314   with_pthread=$withval
15315 else
15316   with_pthread=no
15317 fi;
15318 echo "$as_me:15318: result: $with_pthread" >&5
15319 echo "${ECHO_T}$with_pthread" >&6
15320
15321 if test "$with_pthread" != no ; then
15322         echo "$as_me:15322: checking for pthread.h" >&5
15323 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15324 if test "${ac_cv_header_pthread_h+set}" = set; then
15325   echo $ECHO_N "(cached) $ECHO_C" >&6
15326 else
15327   cat >"conftest.$ac_ext" <<_ACEOF
15328 #line 15328 "configure"
15329 #include "confdefs.h"
15330 #include <pthread.h>
15331 _ACEOF
15332 if { (eval echo "$as_me:15332: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15333   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15334   ac_status=$?
15335   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15336   rm -f conftest.er1
15337   cat conftest.err >&5
15338   echo "$as_me:15338: \$? = $ac_status" >&5
15339   (exit "$ac_status"); } >/dev/null; then
15340   if test -s conftest.err; then
15341     ac_cpp_err=$ac_c_preproc_warn_flag
15342   else
15343     ac_cpp_err=
15344   fi
15345 else
15346   ac_cpp_err=yes
15347 fi
15348 if test -z "$ac_cpp_err"; then
15349   ac_cv_header_pthread_h=yes
15350 else
15351   echo "$as_me: failed program was:" >&5
15352   cat "conftest.$ac_ext" >&5
15353   ac_cv_header_pthread_h=no
15354 fi
15355 rm -f conftest.err "conftest.$ac_ext"
15356 fi
15357 echo "$as_me:15357: result: $ac_cv_header_pthread_h" >&5
15358 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15359 if test "$ac_cv_header_pthread_h" = yes; then
15360
15361 cat >>confdefs.h <<\EOF
15362 #define HAVE_PTHREADS_H 1
15363 EOF
15364
15365         for cf_lib_pthread in pthread c_r
15366         do
15367             echo "$as_me:15367: checking if we can link with the $cf_lib_pthread library" >&5
15368 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15369             cf_save_LIBS="$LIBS"
15370
15371 cf_add_libs="$LIBS"
15372 # reverse order
15373 cf_add_0lib=
15374 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15375 # filter duplicates
15376 for cf_add_1lib in $cf_add_0lib; do
15377         for cf_add_2lib in $cf_add_libs; do
15378                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15379                         cf_add_1lib=
15380                         break
15381                 fi
15382         done
15383         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15384 done
15385 LIBS="$cf_add_libs"
15386
15387             cat >"conftest.$ac_ext" <<_ACEOF
15388 #line 15388 "configure"
15389 #include "confdefs.h"
15390
15391 #include <pthread.h>
15392
15393 int
15394 main (void)
15395 {
15396
15397                 int rc = pthread_create(0,0,0,0);
15398                 int r2 = pthread_mutexattr_settype(0, 0);
15399
15400   ;
15401   return 0;
15402 }
15403 _ACEOF
15404 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15405 if { (eval echo "$as_me:15405: \"$ac_link\"") >&5
15406   (eval $ac_link) 2>&5
15407   ac_status=$?
15408   echo "$as_me:15408: \$? = $ac_status" >&5
15409   (exit "$ac_status"); } &&
15410          { ac_try='test -s "conftest$ac_exeext"'
15411   { (eval echo "$as_me:15411: \"$ac_try\"") >&5
15412   (eval $ac_try) 2>&5
15413   ac_status=$?
15414   echo "$as_me:15414: \$? = $ac_status" >&5
15415   (exit "$ac_status"); }; }; then
15416   with_pthread=yes
15417 else
15418   echo "$as_me: failed program was:" >&5
15419 cat "conftest.$ac_ext" >&5
15420 with_pthread=no
15421 fi
15422 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15423             LIBS="$cf_save_LIBS"
15424             echo "$as_me:15424: result: $with_pthread" >&5
15425 echo "${ECHO_T}$with_pthread" >&6
15426             test "$with_pthread" = yes && break
15427         done
15428
15429         if test "$with_pthread" = yes ; then
15430
15431 cf_add_libs="$LIBS"
15432 # reverse order
15433 cf_add_0lib=
15434 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15435 # filter duplicates
15436 for cf_add_1lib in $cf_add_0lib; do
15437         for cf_add_2lib in $cf_add_libs; do
15438                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15439                         cf_add_1lib=
15440                         break
15441                 fi
15442         done
15443         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15444 done
15445 LIBS="$cf_add_libs"
15446
15447 cat >>confdefs.h <<\EOF
15448 #define HAVE_LIBPTHREADS 1
15449 EOF
15450
15451         else
15452             { { echo "$as_me:15452: error: Cannot link with pthread library" >&5
15453 echo "$as_me: error: Cannot link with pthread library" >&2;}
15454    { (exit 1); exit 1; }; }
15455         fi
15456
15457 fi
15458
15459 fi
15460
15461 if test "x$with_pthread" != xno; then
15462         echo "$as_me:15462: checking for pthread_kill" >&5
15463 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15464 if test "${ac_cv_func_pthread_kill+set}" = set; then
15465   echo $ECHO_N "(cached) $ECHO_C" >&6
15466 else
15467   cat >"conftest.$ac_ext" <<_ACEOF
15468 #line 15468 "configure"
15469 #include "confdefs.h"
15470 #define pthread_kill autoconf_temporary
15471 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15472 #undef pthread_kill
15473
15474 #ifdef __cplusplus
15475 extern "C"
15476 #endif
15477
15478 /* We use char because int might match the return type of a gcc2
15479    builtin and then its argument prototype would still apply.  */
15480 char pthread_kill (void);
15481
15482 int
15483 main (void)
15484 {
15485
15486 /* The GNU C library defines stubs for functions which it implements
15487     to always fail with ENOSYS.  Some functions are actually named
15488     something starting with __ and the normal name is an alias.  */
15489 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15490 #error found stub for pthread_kill
15491 #endif
15492
15493         return pthread_kill ();
15494   ;
15495   return 0;
15496 }
15497 _ACEOF
15498 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15499 if { (eval echo "$as_me:15499: \"$ac_link\"") >&5
15500   (eval $ac_link) 2>&5
15501   ac_status=$?
15502   echo "$as_me:15502: \$? = $ac_status" >&5
15503   (exit "$ac_status"); } &&
15504          { ac_try='test -s "conftest$ac_exeext"'
15505   { (eval echo "$as_me:15505: \"$ac_try\"") >&5
15506   (eval $ac_try) 2>&5
15507   ac_status=$?
15508   echo "$as_me:15508: \$? = $ac_status" >&5
15509   (exit "$ac_status"); }; }; then
15510   ac_cv_func_pthread_kill=yes
15511 else
15512   echo "$as_me: failed program was:" >&5
15513 cat "conftest.$ac_ext" >&5
15514 ac_cv_func_pthread_kill=no
15515 fi
15516 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15517 fi
15518 echo "$as_me:15518: result: $ac_cv_func_pthread_kill" >&5
15519 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15520 if test "$ac_cv_func_pthread_kill" = yes; then
15521
15522                 echo "$as_me:15522: checking if you want to allow EINTR in wgetch with pthreads" >&5
15523 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15524
15525 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15526 if test "${enable_pthreads_eintr+set}" = set; then
15527   enableval="$enable_pthreads_eintr"
15528   use_pthreads_eintr=$enableval
15529 else
15530   use_pthreads_eintr=no
15531 fi;
15532                 echo "$as_me:15532: result: $use_pthreads_eintr" >&5
15533 echo "${ECHO_T}$use_pthreads_eintr" >&6
15534                 if test "x$use_pthreads_eintr" = xyes ; then
15535
15536 cat >>confdefs.h <<\EOF
15537 #define USE_PTHREADS_EINTR 1
15538 EOF
15539
15540                 fi
15541 fi
15542
15543         echo "$as_me:15543: checking if you want to use weak-symbols for pthreads" >&5
15544 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15545
15546 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15547 if test "${enable_weak_symbols+set}" = set; then
15548   enableval="$enable_weak_symbols"
15549   use_weak_symbols=$enableval
15550 else
15551   use_weak_symbols=no
15552 fi;
15553         echo "$as_me:15553: result: $use_weak_symbols" >&5
15554 echo "${ECHO_T}$use_weak_symbols" >&6
15555         if test "x$use_weak_symbols" = xyes ; then
15556
15557 echo "$as_me:15557: checking if $CC supports weak symbols" >&5
15558 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15559 if test "${cf_cv_weak_symbols+set}" = set; then
15560   echo $ECHO_N "(cached) $ECHO_C" >&6
15561 else
15562
15563 cat >"conftest.$ac_ext" <<_ACEOF
15564 #line 15564 "configure"
15565 #include "confdefs.h"
15566
15567 #include <stdio.h>
15568 int
15569 main (void)
15570 {
15571
15572 #if defined(__GNUC__)
15573 #  if defined __USE_ISOC99
15574 #    define _cat_pragma(exp)    _Pragma(#exp)
15575 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15576 #  else
15577 #    define _weak_pragma(exp)
15578 #  endif
15579 #  define _declare(name)        __extension__ extern __typeof__(name) name
15580 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15581 #endif
15582
15583 weak_symbol(fopen);
15584
15585   ;
15586   return 0;
15587 }
15588 _ACEOF
15589 rm -f "conftest.$ac_objext"
15590 if { (eval echo "$as_me:15590: \"$ac_compile\"") >&5
15591   (eval $ac_compile) 2>&5
15592   ac_status=$?
15593   echo "$as_me:15593: \$? = $ac_status" >&5
15594   (exit "$ac_status"); } &&
15595          { ac_try='test -s "conftest.$ac_objext"'
15596   { (eval echo "$as_me:15596: \"$ac_try\"") >&5
15597   (eval $ac_try) 2>&5
15598   ac_status=$?
15599   echo "$as_me:15599: \$? = $ac_status" >&5
15600   (exit "$ac_status"); }; }; then
15601   cf_cv_weak_symbols=yes
15602 else
15603   echo "$as_me: failed program was:" >&5
15604 cat "conftest.$ac_ext" >&5
15605 cf_cv_weak_symbols=no
15606 fi
15607 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15608
15609 fi
15610 echo "$as_me:15610: result: $cf_cv_weak_symbols" >&5
15611 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15612
15613         else
15614                 cf_cv_weak_symbols=no
15615         fi
15616
15617         if test "x$cf_cv_weak_symbols" = xyes ; then
15618
15619 cat >>confdefs.h <<\EOF
15620 #define USE_WEAK_SYMBOLS 1
15621 EOF
15622
15623         fi
15624 fi
15625
15626 PTHREAD=
15627 if test "x$with_pthread" = "xyes" ; then
15628
15629 cat >>confdefs.h <<\EOF
15630 #define USE_PTHREADS 1
15631 EOF
15632
15633         enable_reentrant=yes
15634         if test "x$cf_cv_weak_symbols" = xyes ; then
15635                 PTHREAD=-lpthread
15636
15637 cf_add_libs="$PRIVATE_LIBS"
15638 # reverse order
15639 cf_add_0lib=
15640 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15641 # filter duplicates
15642 for cf_add_1lib in $cf_add_0lib; do
15643         for cf_add_2lib in $cf_add_libs; do
15644                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15645                         cf_add_1lib=
15646                         break
15647                 fi
15648         done
15649         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15650 done
15651 PRIVATE_LIBS="$cf_add_libs"
15652
15653         fi
15654 fi
15655
15656 # Reentrant code has to be opaque; there's little advantage to making ncurses
15657 # opaque outside of that, so there is no --enable-opaque option.  We can use
15658 # this option without --with-pthreads, but this will be always set for
15659 # pthreads.
15660 echo "$as_me:15660: checking if you want reentrant code" >&5
15661 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15662
15663 # Check whether --enable-reentrant or --disable-reentrant was given.
15664 if test "${enable_reentrant+set}" = set; then
15665   enableval="$enable_reentrant"
15666   with_reentrant=$enableval
15667 else
15668   with_reentrant=no
15669 fi;
15670 echo "$as_me:15670: result: $with_reentrant" >&5
15671 echo "${ECHO_T}$with_reentrant" >&6
15672 if test "x$with_reentrant" = xyes ; then
15673         cf_cv_enable_reentrant=1
15674         cf_cv_enable_opaque="NCURSES_INTERNALS"
15675         NCURSES_SIZE_T=int
15676         if test "x$cf_cv_weak_symbols" = xyes ; then
15677
15678 # remove pthread library from $LIBS
15679 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15680
15681 cf_add_libs="$TEST_LIBS"
15682 # reverse order
15683 cf_add_0lib=
15684 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15685 # filter duplicates
15686 for cf_add_1lib in $cf_add_0lib; do
15687         for cf_add_2lib in $cf_add_libs; do
15688                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15689                         cf_add_1lib=
15690                         break
15691                 fi
15692         done
15693         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15694 done
15695 TEST_LIBS="$cf_add_libs"
15696
15697 cf_add_libs="$TEST_LIBS2"
15698 # reverse order
15699 cf_add_0lib=
15700 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15701 # filter duplicates
15702 for cf_add_1lib in $cf_add_0lib; do
15703         for cf_add_2lib in $cf_add_libs; do
15704                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15705                         cf_add_1lib=
15706                         break
15707                 fi
15708         done
15709         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15710 done
15711 TEST_LIBS2="$cf_add_libs"
15712
15713 cf_add_libs="$PRIVATE_LIBS"
15714 # reverse order
15715 cf_add_0lib=
15716 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15717 # filter duplicates
15718 for cf_add_1lib in $cf_add_0lib; do
15719         for cf_add_2lib in $cf_add_libs; do
15720                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15721                         cf_add_1lib=
15722                         break
15723                 fi
15724         done
15725         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15726 done
15727 PRIVATE_LIBS="$cf_add_libs"
15728
15729         else
15730                 # when not using weak symbols but with_reentrant,
15731                 # add 't' to the library suffix on all platforms
15732                 # except cygwin, where we only do that if ALSO
15733                 # compiling with full thread support.
15734                 case "$host" in
15735                 (*cygwin* | *msys*)
15736                         if test "$with_pthread" = "yes" ; then
15737                                 if test "x$disable_lib_suffixes" = "xno" ; then
15738                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15739                                 fi
15740                         fi ;;
15741                 (*)
15742                         if test "x$disable_lib_suffixes" = "xno" ; then
15743                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15744                         fi
15745                         ;;
15746                 esac
15747         fi
15748
15749 cat >>confdefs.h <<\EOF
15750 #define USE_REENTRANT 1
15751 EOF
15752
15753 if test "${with_abi_version+set}" != set; then
15754         case "$cf_cv_rel_version" in
15755         (5.*)
15756                 cf_cv_rel_version=6.0
15757                 cf_cv_abi_version=6
15758                 { echo "$as_me:15758: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15759 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15760                 ;;
15761         esac
15762 fi
15763
15764 else
15765         cf_cv_enable_reentrant=0
15766         cf_cv_enable_opaque="NCURSES_OPAQUE"
15767         NCURSES_SIZE_T=short
15768 fi
15769
15770 echo "$as_me:15770: checking if you want opaque curses-library structures" >&5
15771 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15772
15773 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15774 if test "${enable_opaque_curses+set}" = set; then
15775   enableval="$enable_opaque_curses"
15776   test "$enableval" != yes && enableval=no
15777         if test "$enableval" != "no" ; then
15778     enable_opaque_curses=yes
15779         else
15780
15781          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15782          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15783
15784         fi
15785 else
15786   enableval=no
15787
15788          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15789          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15790
15791 fi;
15792 echo "$as_me:15792: result: $enable_opaque_curses" >&5
15793 echo "${ECHO_T}$enable_opaque_curses" >&6
15794
15795 test "$cf_cv_enable_reentrant" = 1 && \
15796 test "$enable_opaque_curses" = no && \
15797 { { echo "$as_me:15797: error: reentrant configuration requires opaque library" >&5
15798 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15799    { (exit 1); exit 1; }; }
15800
15801 echo "$as_me:15801: checking if you want opaque form-library structures" >&5
15802 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15803
15804 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15805 if test "${enable_opaque_form+set}" = set; then
15806   enableval="$enable_opaque_form"
15807   enable_opaque_form=yes
15808 else
15809   enable_opaque_form=no
15810 fi;
15811 echo "$as_me:15811: result: $enable_opaque_form" >&5
15812 echo "${ECHO_T}$enable_opaque_form" >&6
15813
15814 echo "$as_me:15814: checking if you want opaque menu-library structures" >&5
15815 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15816
15817 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15818 if test "${enable_opaque_menu+set}" = set; then
15819   enableval="$enable_opaque_menu"
15820   enable_opaque_menu=yes
15821 else
15822   enable_opaque_menu=no
15823 fi;
15824 echo "$as_me:15824: result: $enable_opaque_menu" >&5
15825 echo "${ECHO_T}$enable_opaque_menu" >&6
15826
15827 echo "$as_me:15827: checking if you want opaque panel-library structures" >&5
15828 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15829
15830 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15831 if test "${enable_opaque_panel+set}" = set; then
15832   enableval="$enable_opaque_panel"
15833   enable_opaque_panel=yes
15834 else
15835   enable_opaque_panel=no
15836 fi;
15837 echo "$as_me:15837: result: $enable_opaque_panel" >&5
15838 echo "${ECHO_T}$enable_opaque_panel" >&6
15839
15840 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15841 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15842 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15843 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15844
15845 ### Allow using a different wrap-prefix
15846 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15847         echo "$as_me:15847: checking for prefix used to wrap public variables" >&5
15848 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15849
15850 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15851 if test "${with_wrap_prefix+set}" = set; then
15852   withval="$with_wrap_prefix"
15853   NCURSES_WRAP_PREFIX=$withval
15854 else
15855   NCURSES_WRAP_PREFIX=_nc_
15856 fi;
15857         echo "$as_me:15857: result: $NCURSES_WRAP_PREFIX" >&5
15858 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15859 else
15860         NCURSES_WRAP_PREFIX=_nc_
15861 fi
15862
15863 cat >>confdefs.h <<EOF
15864 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15865 EOF
15866
15867 ###############################################################################
15868 # These options are relatively safe to experiment with.
15869
15870 echo "$as_me:15870: checking if you want all development code" >&5
15871 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15872
15873 # Check whether --with-develop or --without-develop was given.
15874 if test "${with_develop+set}" = set; then
15875   withval="$with_develop"
15876   with_develop=$withval
15877 else
15878   with_develop=no
15879 fi;
15880 echo "$as_me:15880: result: $with_develop" >&5
15881 echo "${ECHO_T}$with_develop" >&6
15882
15883 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15884 echo "$as_me:15884: checking if you want hard-tabs code" >&5
15885 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15886
15887 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15888 if test "${enable_hard_tabs+set}" = set; then
15889   enableval="$enable_hard_tabs"
15890
15891 else
15892   enable_hard_tabs=$with_develop
15893 fi;
15894 echo "$as_me:15894: result: $enable_hard_tabs" >&5
15895 echo "${ECHO_T}$enable_hard_tabs" >&6
15896 test "x$enable_hard_tabs" = xyes &&
15897 cat >>confdefs.h <<\EOF
15898 #define USE_HARD_TABS 1
15899 EOF
15900
15901 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15902 echo "$as_me:15902: checking if you want limited support for xmc" >&5
15903 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15904
15905 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15906 if test "${enable_xmc_glitch+set}" = set; then
15907   enableval="$enable_xmc_glitch"
15908
15909 else
15910   enable_xmc_glitch=$with_develop
15911 fi;
15912 echo "$as_me:15912: result: $enable_xmc_glitch" >&5
15913 echo "${ECHO_T}$enable_xmc_glitch" >&6
15914 test "x$enable_xmc_glitch" = xyes &&
15915 cat >>confdefs.h <<\EOF
15916 #define USE_XMC_SUPPORT 1
15917 EOF
15918
15919 ###############################################################################
15920 # These are just experimental, probably should not be in a package:
15921
15922 echo "$as_me:15922: checking if you do not want to assume colors are white-on-black" >&5
15923 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15924
15925 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15926 if test "${enable_assumed_color+set}" = set; then
15927   enableval="$enable_assumed_color"
15928   with_assumed_color=$enableval
15929 else
15930   with_assumed_color=yes
15931 fi;
15932 echo "$as_me:15932: result: $with_assumed_color" >&5
15933 echo "${ECHO_T}$with_assumed_color" >&6
15934 test "x$with_assumed_color" = xyes &&
15935 cat >>confdefs.h <<\EOF
15936 #define USE_ASSUMED_COLOR 1
15937 EOF
15938
15939 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15940 echo "$as_me:15940: checking if you want hashmap scrolling-optimization code" >&5
15941 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15942
15943 # Check whether --enable-hashmap or --disable-hashmap was given.
15944 if test "${enable_hashmap+set}" = set; then
15945   enableval="$enable_hashmap"
15946   with_hashmap=$enableval
15947 else
15948   with_hashmap=yes
15949 fi;
15950 echo "$as_me:15950: result: $with_hashmap" >&5
15951 echo "${ECHO_T}$with_hashmap" >&6
15952 test "x$with_hashmap" = xyes &&
15953 cat >>confdefs.h <<\EOF
15954 #define USE_HASHMAP 1
15955 EOF
15956
15957 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15958 echo "$as_me:15958: checking if you want colorfgbg code" >&5
15959 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15960
15961 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15962 if test "${enable_colorfgbg+set}" = set; then
15963   enableval="$enable_colorfgbg"
15964   with_colorfgbg=$enableval
15965 else
15966   with_colorfgbg=no
15967 fi;
15968 echo "$as_me:15968: result: $with_colorfgbg" >&5
15969 echo "${ECHO_T}$with_colorfgbg" >&6
15970 test "x$with_colorfgbg" = xyes &&
15971 cat >>confdefs.h <<\EOF
15972 #define USE_COLORFGBG 1
15973 EOF
15974
15975 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15976 echo "$as_me:15976: checking if you want to use gcc -fvisibility option" >&5
15977 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15978
15979 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15980 if test "${enable_fvisibility+set}" = set; then
15981   enableval="$enable_fvisibility"
15982   cf_with_fvisibility=$enableval
15983 else
15984   cf_with_fvisibility=no
15985 fi;
15986 echo "$as_me:15986: result: $cf_with_fvisibility" >&5
15987 echo "${ECHO_T}$cf_with_fvisibility" >&6
15988
15989 NCURSES_IMPEXP=
15990 NCURSES_CXX_IMPEXP=
15991 if test "x$cf_with_fvisibility" = xyes; then
15992
15993 echo "$as_me:15993: checking if $CC -fvisibility=hidden option works" >&5
15994 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15995 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15996   echo $ECHO_N "(cached) $ECHO_C" >&6
15997 else
15998
15999     cf_save_cflags="$CFLAGS"
16000     CFLAGS="$CFLAGS -fvisibility=hidden"
16001     cat >"conftest.$ac_ext" <<_ACEOF
16002 #line 16002 "configure"
16003 #include "confdefs.h"
16004
16005 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16006
16007 int
16008 main (void)
16009 {
16010
16011         if (somefunc()) return 1;
16012
16013   ;
16014   return 0;
16015 }
16016 _ACEOF
16017 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16018 if { (eval echo "$as_me:16018: \"$ac_link\"") >&5
16019   (eval $ac_link) 2>&5
16020   ac_status=$?
16021   echo "$as_me:16021: \$? = $ac_status" >&5
16022   (exit "$ac_status"); } &&
16023          { ac_try='test -s "conftest$ac_exeext"'
16024   { (eval echo "$as_me:16024: \"$ac_try\"") >&5
16025   (eval $ac_try) 2>&5
16026   ac_status=$?
16027   echo "$as_me:16027: \$? = $ac_status" >&5
16028   (exit "$ac_status"); }; }; then
16029   cf_cv_fvisibility_hidden=yes
16030 else
16031   echo "$as_me: failed program was:" >&5
16032 cat "conftest.$ac_ext" >&5
16033 cf_cv_fvisibility_hidden=no
16034 fi
16035 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16036     CFLAGS=$cf_save_cflags
16037
16038 fi
16039 echo "$as_me:16039: result: $cf_cv_fvisibility_hidden" >&5
16040 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16041
16042         if test "x$cf_cv_fvisibility_hidden" = xyes
16043         then
16044
16045 cf_fix_cppflags=no
16046 cf_new_cflags=
16047 cf_new_cppflags=
16048 cf_new_extra_cppflags=
16049
16050 for cf_add_cflags in -fvisibility=hidden
16051 do
16052 case "$cf_fix_cppflags" in
16053 (no)
16054         case "$cf_add_cflags" in
16055         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16056                 case "$cf_add_cflags" in
16057                 (-D*)
16058                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16059
16060                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16061                                 && test -z "${cf_tst_cflags}" \
16062                                 && cf_fix_cppflags=yes
16063
16064                         if test "$cf_fix_cppflags" = yes ; then
16065
16066         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16067         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16068
16069                                 continue
16070                         elif test "${cf_tst_cflags}" = "\"'" ; then
16071
16072         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16073         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16074
16075                                 continue
16076                         fi
16077                         ;;
16078                 esac
16079                 case "$CPPFLAGS" in
16080                 (*$cf_add_cflags)
16081                         ;;
16082                 (*)
16083                         case "$cf_add_cflags" in
16084                         (-D*)
16085                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16086
16087 CPPFLAGS=`echo "$CPPFLAGS" | \
16088         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16089                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16090
16091                                 ;;
16092                         esac
16093
16094         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16095         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16096
16097                         ;;
16098                 esac
16099                 ;;
16100         (*)
16101
16102         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16103         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16104
16105                 ;;
16106         esac
16107         ;;
16108 (yes)
16109
16110         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16111         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16112
16113         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16114
16115         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16116                 && test -z "${cf_tst_cflags}" \
16117                 && cf_fix_cppflags=no
16118         ;;
16119 esac
16120 done
16121
16122 if test -n "$cf_new_cflags" ; then
16123
16124         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16125         CFLAGS="${CFLAGS}$cf_new_cflags"
16126
16127 fi
16128
16129 if test -n "$cf_new_cppflags" ; then
16130
16131         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16132         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16133
16134 fi
16135
16136 if test -n "$cf_new_extra_cppflags" ; then
16137
16138         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16139         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16140
16141 fi
16142
16143                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16144         fi
16145         if test -n "$CXX"
16146         then
16147                 ac_ext=cc
16148 ac_cpp='$CXXCPP $CPPFLAGS'
16149 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16150 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16151 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16152 ac_main_return="return"
16153
16154 echo "$as_me:16154: checking if $CXX -fvisibility=hidden option works" >&5
16155 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16156 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16157   echo $ECHO_N "(cached) $ECHO_C" >&6
16158 else
16159
16160     cf_save_cflags="$CXXFLAGS"
16161     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16162     cat >"conftest.$ac_ext" <<_ACEOF
16163 #line 16163 "configure"
16164 #include "confdefs.h"
16165
16166 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16167
16168 int
16169 main (void)
16170 {
16171
16172         if (somefunc()) return 1;
16173
16174   ;
16175   return 0;
16176 }
16177 _ACEOF
16178 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16179 if { (eval echo "$as_me:16179: \"$ac_link\"") >&5
16180   (eval $ac_link) 2>&5
16181   ac_status=$?
16182   echo "$as_me:16182: \$? = $ac_status" >&5
16183   (exit "$ac_status"); } &&
16184          { ac_try='test -s "conftest$ac_exeext"'
16185   { (eval echo "$as_me:16185: \"$ac_try\"") >&5
16186   (eval $ac_try) 2>&5
16187   ac_status=$?
16188   echo "$as_me:16188: \$? = $ac_status" >&5
16189   (exit "$ac_status"); }; }; then
16190   cf_cv_fvisibility_hidden2=yes
16191 else
16192   echo "$as_me: failed program was:" >&5
16193 cat "conftest.$ac_ext" >&5
16194 cf_cv_fvisibility_hidden2=no
16195 fi
16196 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16197     CXXFLAGS=$cf_save_cflags
16198
16199 fi
16200 echo "$as_me:16200: result: $cf_cv_fvisibility_hidden2" >&5
16201 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16202
16203                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16204                 then
16205
16206 cf_save_CXXFLAGS="$CFLAGS"
16207 CFLAGS="$CXXFLAGS"
16208
16209 cf_fix_cppflags=no
16210 cf_new_cflags=
16211 cf_new_cppflags=
16212 cf_new_extra_cppflags=
16213
16214 for cf_add_cflags in -fvisibility=hidden
16215 do
16216 case "$cf_fix_cppflags" in
16217 (no)
16218         case "$cf_add_cflags" in
16219         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16220                 case "$cf_add_cflags" in
16221                 (-D*)
16222                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16223
16224                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16225                                 && test -z "${cf_tst_cflags}" \
16226                                 && cf_fix_cppflags=yes
16227
16228                         if test "$cf_fix_cppflags" = yes ; then
16229
16230         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16231         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16232
16233                                 continue
16234                         elif test "${cf_tst_cflags}" = "\"'" ; then
16235
16236         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16237         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16238
16239                                 continue
16240                         fi
16241                         ;;
16242                 esac
16243                 case "$CPPFLAGS" in
16244                 (*$cf_add_cflags)
16245                         ;;
16246                 (*)
16247                         case "$cf_add_cflags" in
16248                         (-D*)
16249                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16250
16251 CPPFLAGS=`echo "$CPPFLAGS" | \
16252         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16253                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16254
16255                                 ;;
16256                         esac
16257
16258         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16259         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16260
16261                         ;;
16262                 esac
16263                 ;;
16264         (*)
16265
16266         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16267         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16268
16269                 ;;
16270         esac
16271         ;;
16272 (yes)
16273
16274         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16275         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16276
16277         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16278
16279         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16280                 && test -z "${cf_tst_cflags}" \
16281                 && cf_fix_cppflags=no
16282         ;;
16283 esac
16284 done
16285
16286 if test -n "$cf_new_cflags" ; then
16287
16288         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16289         CFLAGS="${CFLAGS}$cf_new_cflags"
16290
16291 fi
16292
16293 if test -n "$cf_new_cppflags" ; then
16294
16295         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16296         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16297
16298 fi
16299
16300 if test -n "$cf_new_extra_cppflags" ; then
16301
16302         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16303         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16304
16305 fi
16306
16307 CXXFLAGS="$CFLAGS"
16308 CFLAGS="$cf_save_CXXFLAGS"
16309
16310                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16311                 fi
16312                 ac_ext=c
16313 ac_cpp='$CPP $CPPFLAGS'
16314 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16315 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16316 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16317 ac_main_return="return"
16318
16319         fi
16320 fi
16321
16322 ###   use option --enable-interop to turn on use of bindings used for interop
16323 echo "$as_me:16323: checking if you want interop bindings" >&5
16324 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16325
16326 # Check whether --enable-interop or --disable-interop was given.
16327 if test "${enable_interop+set}" = set; then
16328   enableval="$enable_interop"
16329   with_exp_interop=$enableval
16330 else
16331   with_exp_interop=$cf_dft_interop
16332 fi;
16333 echo "$as_me:16333: result: $with_exp_interop" >&5
16334 echo "${ECHO_T}$with_exp_interop" >&6
16335
16336 NCURSES_INTEROP_FUNCS=0
16337 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16338
16339 echo "$as_me:16339: checking if you want experimental safe-sprintf code" >&5
16340 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16341
16342 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16343 if test "${enable_safe_sprintf+set}" = set; then
16344   enableval="$enable_safe_sprintf"
16345   with_safe_sprintf=$enableval
16346 else
16347   with_safe_sprintf=no
16348 fi;
16349 echo "$as_me:16349: result: $with_safe_sprintf" >&5
16350 echo "${ECHO_T}$with_safe_sprintf" >&6
16351
16352 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16353 # when hashmap is used scroll hints are useless
16354 if test "$with_hashmap" = no ; then
16355 echo "$as_me:16355: checking if you want to experiment without scrolling-hints code" >&5
16356 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16357
16358 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16359 if test "${enable_scroll_hints+set}" = set; then
16360   enableval="$enable_scroll_hints"
16361   with_scroll_hints=$enableval
16362 else
16363   with_scroll_hints=yes
16364 fi;
16365 echo "$as_me:16365: result: $with_scroll_hints" >&5
16366 echo "${ECHO_T}$with_scroll_hints" >&6
16367 test "x$with_scroll_hints" = xyes &&
16368 cat >>confdefs.h <<\EOF
16369 #define USE_SCROLL_HINTS 1
16370 EOF
16371
16372 fi
16373
16374 echo "$as_me:16374: checking if you want wgetch-events code" >&5
16375 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16376
16377 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16378 if test "${enable_wgetch_events+set}" = set; then
16379   enableval="$enable_wgetch_events"
16380   with_wgetch_events=$enableval
16381 else
16382   with_wgetch_events=no
16383 fi;
16384 echo "$as_me:16384: result: $with_wgetch_events" >&5
16385 echo "${ECHO_T}$with_wgetch_events" >&6
16386 if test "x$with_wgetch_events" = xyes ; then
16387
16388 cat >>confdefs.h <<\EOF
16389 #define NCURSES_WGETCH_EVENTS 1
16390 EOF
16391
16392         NCURSES_WGETCH_EVENTS=1
16393 else
16394         NCURSES_WGETCH_EVENTS=0
16395 fi
16396
16397 case "$cf_cv_system_name" in
16398 (*mingw32*|*mingw64*|*-msvc*)
16399         echo "$as_me:16399: checking if you want experimental-Windows driver" >&5
16400 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16401
16402 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16403 if test "${enable_exp_win32+set}" = set; then
16404   enableval="$enable_exp_win32"
16405   with_exp_win32=$enableval
16406 else
16407   with_exp_win32=no
16408 fi;
16409         echo "$as_me:16409: result: $with_exp_win32" >&5
16410 echo "${ECHO_T}$with_exp_win32" >&6
16411         if test "x$with_exp_win32" = xyes
16412         then
16413
16414 cat >>confdefs.h <<\EOF
16415 #define EXP_WIN32_DRIVER 1
16416 EOF
16417
16418                 EXP_WIN32_DRIVER=1
16419                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16420         else
16421                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16422                 EXP_WIN32_DRIVER=0
16423         fi
16424         ;;
16425 (*)
16426         EXP_WIN32_DRIVER=0
16427         INTERNALS_HDR=
16428         ;;
16429 esac
16430
16431 ###############################################################################
16432
16433 ###     use option --disable-echo to suppress full display compiling commands
16434
16435 echo "$as_me:16435: checking if you want to see long compiling messages" >&5
16436 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16437
16438 # Check whether --enable-echo or --disable-echo was given.
16439 if test "${enable_echo+set}" = set; then
16440   enableval="$enable_echo"
16441   test "$enableval" != no && enableval=yes
16442         if test "$enableval" != "yes" ; then
16443
16444         ECHO_LT='--silent'
16445         ECHO_LD='@echo linking $@;'
16446         RULE_CC='@echo compiling $<'
16447         SHOW_CC='@echo compiling $@'
16448         ECHO_CC='@'
16449
16450         else
16451
16452         ECHO_LT=''
16453         ECHO_LD=''
16454         RULE_CC=''
16455         SHOW_CC=''
16456         ECHO_CC=''
16457
16458         fi
16459 else
16460   enableval=yes
16461
16462         ECHO_LT=''
16463         ECHO_LD=''
16464         RULE_CC=''
16465         SHOW_CC=''
16466         ECHO_CC=''
16467
16468 fi;
16469 echo "$as_me:16469: result: $enableval" >&5
16470 echo "${ECHO_T}$enableval" >&6
16471
16472 if test "x$enable_echo" = xyes; then
16473         ECHO_LINK=
16474 else
16475         ECHO_LINK='@ echo linking $@ ... ;'
16476         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16477         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16478 fi
16479
16480 # --disable-stripping is used for debugging
16481
16482 echo "$as_me:16482: checking if you want to install stripped executables" >&5
16483 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16484
16485 # Check whether --enable-stripping or --disable-stripping was given.
16486 if test "${enable_stripping+set}" = set; then
16487   enableval="$enable_stripping"
16488   test "$enableval" != no && enableval=yes
16489         if test "$enableval" != "yes" ; then
16490     enable_stripping=no
16491         else
16492                 enable_stripping=yes
16493         fi
16494 else
16495   enableval=yes
16496         enable_stripping=yes
16497
16498 fi;
16499 echo "$as_me:16499: result: $enable_stripping" >&5
16500 echo "${ECHO_T}$enable_stripping" >&6
16501
16502 if test "$enable_stripping" = yes
16503 then
16504         INSTALL_OPT_S="-s"
16505 else
16506         INSTALL_OPT_S=
16507 fi
16508
16509 : "${INSTALL:=install}"
16510 echo "$as_me:16510: checking if install accepts -p option" >&5
16511 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16512 if test "${cf_cv_install_p+set}" = set; then
16513   echo $ECHO_N "(cached) $ECHO_C" >&6
16514 else
16515
16516         rm -rf ./conftest*
16517         date >conftest.in
16518         mkdir conftest.out
16519         sleep 3
16520         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16521         then
16522                 if test -f conftest.out/conftest.in
16523                 then
16524                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16525                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16526                         if test -s conftest.err
16527                         then
16528                                 cf_cv_install_p=no
16529                         else
16530                                 cf_cv_install_p=yes
16531                         fi
16532                 else
16533                         cf_cv_install_p=no
16534                 fi
16535         else
16536                 cf_cv_install_p=no
16537         fi
16538         rm -rf ./conftest*
16539
16540 fi
16541 echo "$as_me:16541: result: $cf_cv_install_p" >&5
16542 echo "${ECHO_T}$cf_cv_install_p" >&6
16543
16544 echo "$as_me:16544: checking if install needs to be told about ownership" >&5
16545 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16546 case `$ac_config_guess` in
16547 (*minix)
16548         with_install_o=yes
16549         ;;
16550 (*)
16551         with_install_o=no
16552         ;;
16553 esac
16554
16555 echo "$as_me:16555: result: $with_install_o" >&5
16556 echo "${ECHO_T}$with_install_o" >&6
16557 if test "x$with_install_o" = xyes
16558 then
16559         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'`"
16560 else
16561         INSTALL_OPT_O=
16562 fi
16563
16564 # If we're avoiding relinking of shared libraries during install, that is to
16565 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16566 # the install program has "-p" (for preserving timestamps).
16567 cf_cv_do_reranlib=yes
16568 if test "x$cf_cv_install_p" = xyes
16569 then
16570         if test "x$cf_cv_do_relink" != xyes
16571         then
16572                 cf_cv_do_reranlib=no
16573                 INSTALL_OPT_P="-p"
16574                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16575         fi
16576 fi
16577
16578 ###     use option --enable-warnings to turn on all gcc warnings
16579
16580 echo "$as_me:16580: checking if you want to use C11 _Noreturn feature" >&5
16581 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16582
16583 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16584 if test "${enable_stdnoreturn+set}" = set; then
16585   enableval="$enable_stdnoreturn"
16586   test "$enableval" != yes && enableval=no
16587         if test "$enableval" != "no" ; then
16588     enable_stdnoreturn=yes
16589         else
16590                 enable_stdnoreturn=no
16591         fi
16592 else
16593   enableval=no
16594         enable_stdnoreturn=no
16595
16596 fi;
16597 echo "$as_me:16597: result: $enable_stdnoreturn" >&5
16598 echo "${ECHO_T}$enable_stdnoreturn" >&6
16599
16600 if test $enable_stdnoreturn = yes; then
16601 echo "$as_me:16601: checking for C11 _Noreturn feature" >&5
16602 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16603 if test "${cf_cv_c11_noreturn+set}" = set; then
16604   echo $ECHO_N "(cached) $ECHO_C" >&6
16605 else
16606   cat >"conftest.$ac_ext" <<_ACEOF
16607 #line 16607 "configure"
16608 #include "confdefs.h"
16609
16610 #include <stdio.h>
16611 #include <stdlib.h>
16612 #include <stdnoreturn.h>
16613 static _Noreturn void giveup(void) { exit(0); }
16614
16615 int
16616 main (void)
16617 {
16618 if (feof(stdin)) giveup()
16619   ;
16620   return 0;
16621 }
16622 _ACEOF
16623 rm -f "conftest.$ac_objext"
16624 if { (eval echo "$as_me:16624: \"$ac_compile\"") >&5
16625   (eval $ac_compile) 2>&5
16626   ac_status=$?
16627   echo "$as_me:16627: \$? = $ac_status" >&5
16628   (exit "$ac_status"); } &&
16629          { ac_try='test -s "conftest.$ac_objext"'
16630   { (eval echo "$as_me:16630: \"$ac_try\"") >&5
16631   (eval $ac_try) 2>&5
16632   ac_status=$?
16633   echo "$as_me:16633: \$? = $ac_status" >&5
16634   (exit "$ac_status"); }; }; then
16635   cf_cv_c11_noreturn=yes
16636 else
16637   echo "$as_me: failed program was:" >&5
16638 cat "conftest.$ac_ext" >&5
16639 cf_cv_c11_noreturn=no
16640 fi
16641 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16642
16643 fi
16644 echo "$as_me:16644: result: $cf_cv_c11_noreturn" >&5
16645 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16646 else
16647         cf_cv_c11_noreturn=no,
16648 fi
16649
16650 if test "$cf_cv_c11_noreturn" = yes; then
16651
16652 cat >>confdefs.h <<\EOF
16653 #define HAVE_STDNORETURN_H 1
16654 EOF
16655
16656 cat >>confdefs.h <<EOF
16657 #define STDC_NORETURN _Noreturn
16658 EOF
16659
16660         HAVE_STDNORETURN_H=1
16661 else
16662         HAVE_STDNORETURN_H=0
16663 fi
16664
16665 if test "$GCC" = yes || test "$GXX" = yes
16666 then
16667
16668 if test "$GCC" = yes || test "$GXX" = yes
16669 then
16670         case $CFLAGS in
16671         (*-Werror=*)
16672                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16673
16674 echo "${as_me:-configure}:16674: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16675
16676                 cf_temp_flags=
16677                 for cf_temp_scan in $CFLAGS
16678                 do
16679                         case "x$cf_temp_scan" in
16680                         (x-Werror=*)
16681
16682         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16683         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16684
16685                                 ;;
16686                         (*)
16687
16688         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16689         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16690
16691                                 ;;
16692                         esac
16693                 done
16694                 CFLAGS="$cf_temp_flags"
16695                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16696
16697 echo "${as_me:-configure}:16697: testing ... fixed $CFLAGS ..." 1>&5
16698
16699                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16700
16701 echo "${as_me:-configure}:16701: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16702
16703                 ;;
16704         esac
16705 fi
16706
16707 if test "$GCC" = yes || test "$GXX" = yes
16708 then
16709         case $CPPFLAGS in
16710         (*-Werror=*)
16711                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16712
16713 echo "${as_me:-configure}:16713: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16714
16715                 cf_temp_flags=
16716                 for cf_temp_scan in $CPPFLAGS
16717                 do
16718                         case "x$cf_temp_scan" in
16719                         (x-Werror=*)
16720
16721         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16722         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16723
16724                                 ;;
16725                         (*)
16726
16727         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16728         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16729
16730                                 ;;
16731                         esac
16732                 done
16733                 CPPFLAGS="$cf_temp_flags"
16734                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16735
16736 echo "${as_me:-configure}:16736: testing ... fixed $CPPFLAGS ..." 1>&5
16737
16738                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16739
16740 echo "${as_me:-configure}:16740: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16741
16742                 ;;
16743         esac
16744 fi
16745
16746 if test "$GCC" = yes || test "$GXX" = yes
16747 then
16748         case $LDFLAGS in
16749         (*-Werror=*)
16750                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16751
16752 echo "${as_me:-configure}:16752: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16753
16754                 cf_temp_flags=
16755                 for cf_temp_scan in $LDFLAGS
16756                 do
16757                         case "x$cf_temp_scan" in
16758                         (x-Werror=*)
16759
16760         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16761         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16762
16763                                 ;;
16764                         (*)
16765
16766         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16767         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16768
16769                                 ;;
16770                         esac
16771                 done
16772                 LDFLAGS="$cf_temp_flags"
16773                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16774
16775 echo "${as_me:-configure}:16775: testing ... fixed $LDFLAGS ..." 1>&5
16776
16777                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16778
16779 echo "${as_me:-configure}:16779: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16780
16781                 ;;
16782         esac
16783 fi
16784
16785 echo "$as_me:16785: checking if you want to turn on gcc warnings" >&5
16786 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16787
16788 # Check whether --enable-warnings or --disable-warnings was given.
16789 if test "${enable_warnings+set}" = set; then
16790   enableval="$enable_warnings"
16791   test "$enableval" != yes && enableval=no
16792         if test "$enableval" != "no" ; then
16793     enable_warnings=yes
16794         else
16795                 enable_warnings=no
16796         fi
16797 else
16798   enableval=no
16799         enable_warnings=no
16800
16801 fi;
16802 echo "$as_me:16802: result: $enable_warnings" >&5
16803 echo "${ECHO_T}$enable_warnings" >&6
16804 if test "$enable_warnings" = "yes"
16805 then
16806
16807 if test "x$have_x" = xyes; then
16808
16809 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16810 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16811 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16812 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16813 for cf_X_CFLAGS in $X_CFLAGS
16814 do
16815         case "x$cf_X_CFLAGS" in
16816         x-[IUD]*)
16817                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16818                 ;;
16819         *)
16820                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16821                 ;;
16822         esac
16823 done
16824
16825 cat >"conftest.$ac_ext" <<_ACEOF
16826 #line 16826 "configure"
16827 #include "confdefs.h"
16828
16829 #include <stdlib.h>
16830 #include <X11/Intrinsic.h>
16831
16832 int
16833 main (void)
16834 {
16835 String foo = malloc(1); free((void*)foo)
16836   ;
16837   return 0;
16838 }
16839 _ACEOF
16840 rm -f "conftest.$ac_objext"
16841 if { (eval echo "$as_me:16841: \"$ac_compile\"") >&5
16842   (eval $ac_compile) 2>&5
16843   ac_status=$?
16844   echo "$as_me:16844: \$? = $ac_status" >&5
16845   (exit "$ac_status"); } &&
16846          { ac_try='test -s "conftest.$ac_objext"'
16847   { (eval echo "$as_me:16847: \"$ac_try\"") >&5
16848   (eval $ac_try) 2>&5
16849   ac_status=$?
16850   echo "$as_me:16850: \$? = $ac_status" >&5
16851   (exit "$ac_status"); }; }; then
16852
16853 echo "$as_me:16853: checking for X11/Xt const-feature" >&5
16854 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16855 if test "${cf_cv_const_x_string+set}" = set; then
16856   echo $ECHO_N "(cached) $ECHO_C" >&6
16857 else
16858
16859         cat >"conftest.$ac_ext" <<_ACEOF
16860 #line 16860 "configure"
16861 #include "confdefs.h"
16862
16863 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16864 #undef  XTSTRINGDEFINES /* X11R5 and later */
16865 #include <stdlib.h>
16866 #include <X11/Intrinsic.h>
16867
16868 int
16869 main (void)
16870 {
16871 String foo = malloc(1); *foo = 0
16872   ;
16873   return 0;
16874 }
16875 _ACEOF
16876 rm -f "conftest.$ac_objext"
16877 if { (eval echo "$as_me:16877: \"$ac_compile\"") >&5
16878   (eval $ac_compile) 2>&5
16879   ac_status=$?
16880   echo "$as_me:16880: \$? = $ac_status" >&5
16881   (exit "$ac_status"); } &&
16882          { ac_try='test -s "conftest.$ac_objext"'
16883   { (eval echo "$as_me:16883: \"$ac_try\"") >&5
16884   (eval $ac_try) 2>&5
16885   ac_status=$?
16886   echo "$as_me:16886: \$? = $ac_status" >&5
16887   (exit "$ac_status"); }; }; then
16888
16889                         cf_cv_const_x_string=no
16890
16891 else
16892   echo "$as_me: failed program was:" >&5
16893 cat "conftest.$ac_ext" >&5
16894
16895                         cf_cv_const_x_string=yes
16896
16897 fi
16898 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16899
16900 fi
16901 echo "$as_me:16901: result: $cf_cv_const_x_string" >&5
16902 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16903
16904 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16905 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16906 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16907
16908 case "$cf_cv_const_x_string" in
16909 (no)
16910
16911         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16912         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16913
16914         ;;
16915 (*)
16916
16917         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16918         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16919
16920         ;;
16921 esac
16922
16923 else
16924   echo "$as_me: failed program was:" >&5
16925 cat "conftest.$ac_ext" >&5
16926 fi
16927 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16928  fi
16929 cat > "conftest.$ac_ext" <<EOF
16930 #line 16930 "${as_me:-configure}"
16931 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16932 EOF
16933 if test "$INTEL_COMPILER" = yes
16934 then
16935 # The "-wdXXX" options suppress warnings:
16936 # remark #1419: external declaration in primary source file
16937 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16938 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16939 # remark #193: zero used for undefined preprocessing identifier
16940 # remark #593: variable "curs_sb_left_arrow" was set but never used
16941 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16942 # remark #869: parameter "tw" was never referenced
16943 # remark #981: operands are evaluated in unspecified order
16944 # warning #279: controlling expression is constant
16945
16946         { echo "$as_me:16946: checking for $CC warning options..." >&5
16947 echo "$as_me: checking for $CC warning options..." >&6;}
16948         cf_save_CFLAGS="$CFLAGS"
16949         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16950         for cf_opt in \
16951                 wd1419 \
16952                 wd1683 \
16953                 wd1684 \
16954                 wd193 \
16955                 wd593 \
16956                 wd279 \
16957                 wd810 \
16958                 wd869 \
16959                 wd981
16960         do
16961                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16962                 if { (eval echo "$as_me:16962: \"$ac_compile\"") >&5
16963   (eval $ac_compile) 2>&5
16964   ac_status=$?
16965   echo "$as_me:16965: \$? = $ac_status" >&5
16966   (exit "$ac_status"); }; then
16967                         test -n "$verbose" && echo "$as_me:16967: result: ... -$cf_opt" >&5
16968 echo "${ECHO_T}... -$cf_opt" >&6
16969                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16970                 fi
16971         done
16972         CFLAGS="$cf_save_CFLAGS"
16973 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16974 then
16975         { echo "$as_me:16975: checking for $CC warning options..." >&5
16976 echo "$as_me: checking for $CC warning options..." >&6;}
16977         cf_save_CFLAGS="$CFLAGS"
16978         cf_warn_CONST=""
16979         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16980         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16981         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16982         for cf_opt in W Wall \
16983                 Wbad-function-cast \
16984                 Wcast-align \
16985                 Wcast-qual \
16986                 Wdeclaration-after-statement \
16987                 Wextra \
16988                 Winline \
16989                 Wmissing-declarations \
16990                 Wmissing-prototypes \
16991                 Wnested-externs \
16992                 Wpointer-arith \
16993                 Wshadow \
16994                 Wstrict-prototypes \
16995                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16996         do
16997                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16998                 if { (eval echo "$as_me:16998: \"$ac_compile\"") >&5
16999   (eval $ac_compile) 2>&5
17000   ac_status=$?
17001   echo "$as_me:17001: \$? = $ac_status" >&5
17002   (exit "$ac_status"); }; then
17003                         test -n "$verbose" && echo "$as_me:17003: result: ... -$cf_opt" >&5
17004 echo "${ECHO_T}... -$cf_opt" >&6
17005                         case "$cf_opt" in
17006                         (Winline)
17007                                 case "$GCC_VERSION" in
17008                                 ([34].*)
17009                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17010
17011 echo "${as_me:-configure}:17011: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17012
17013                                         continue;;
17014                                 esac
17015                                 ;;
17016                         (Wpointer-arith)
17017                                 case "$GCC_VERSION" in
17018                                 ([12].*)
17019                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17020
17021 echo "${as_me:-configure}:17021: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17022
17023                                         continue;;
17024                                 esac
17025                                 ;;
17026                         esac
17027                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17028                 fi
17029         done
17030         CFLAGS="$cf_save_CFLAGS"
17031 fi
17032 rm -rf ./conftest*
17033
17034 fi
17035
17036 if test "$GCC" = yes || test "$GXX" = yes
17037 then
17038 cat > conftest.i <<EOF
17039 #ifndef GCC_PRINTF
17040 #define GCC_PRINTF 0
17041 #endif
17042 #ifndef GCC_SCANF
17043 #define GCC_SCANF 0
17044 #endif
17045 #ifndef GCC_NORETURN
17046 #define GCC_NORETURN /* nothing */
17047 #endif
17048 #ifndef GCC_UNUSED
17049 #define GCC_UNUSED /* nothing */
17050 #endif
17051 EOF
17052 if test "$GCC" = yes
17053 then
17054         { echo "$as_me:17054: checking for $CC __attribute__ directives..." >&5
17055 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17056 cat > "conftest.$ac_ext" <<EOF
17057 #line 17057 "${as_me:-configure}"
17058 #include "confdefs.h"
17059 #include "conftest.h"
17060 #include "conftest.i"
17061 #if     GCC_PRINTF
17062 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17063 #else
17064 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17065 #endif
17066 #if     GCC_SCANF
17067 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17068 #else
17069 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17070 #endif
17071 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17072 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17073 extern GCC_NORETURN void foo(void);
17074 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17075 EOF
17076         cf_printf_attribute=no
17077         cf_scanf_attribute=no
17078         for cf_attribute in scanf printf unused noreturn
17079         do
17080
17081 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17082
17083                 cf_directive="__attribute__(($cf_attribute))"
17084                 echo "checking for $CC $cf_directive" 1>&5
17085
17086                 case "$cf_attribute" in
17087                 (printf)
17088                         cf_printf_attribute=yes
17089                         cat >conftest.h <<EOF
17090 #define GCC_$cf_ATTRIBUTE 1
17091 EOF
17092                         ;;
17093                 (scanf)
17094                         cf_scanf_attribute=yes
17095                         cat >conftest.h <<EOF
17096 #define GCC_$cf_ATTRIBUTE 1
17097 EOF
17098                         ;;
17099                 (*)
17100                         cat >conftest.h <<EOF
17101 #define GCC_$cf_ATTRIBUTE $cf_directive
17102 EOF
17103                         ;;
17104                 esac
17105
17106                 if { (eval echo "$as_me:17106: \"$ac_compile\"") >&5
17107   (eval $ac_compile) 2>&5
17108   ac_status=$?
17109   echo "$as_me:17109: \$? = $ac_status" >&5
17110   (exit "$ac_status"); }; then
17111                         test -n "$verbose" && echo "$as_me:17111: result: ... $cf_attribute" >&5
17112 echo "${ECHO_T}... $cf_attribute" >&6
17113                         cat conftest.h >>confdefs.h
17114                         case "$cf_attribute" in
17115                         (noreturn)
17116
17117 cat >>confdefs.h <<EOF
17118 #define GCC_NORETURN $cf_directive
17119 EOF
17120
17121                                 ;;
17122                         (printf)
17123                                 cf_value='/* nothing */'
17124                                 if test "$cf_printf_attribute" != no ; then
17125                                         cf_value='__attribute__((format(printf,fmt,var)))'
17126
17127 cat >>confdefs.h <<\EOF
17128 #define GCC_PRINTF 1
17129 EOF
17130
17131                                 fi
17132
17133 cat >>confdefs.h <<EOF
17134 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17135 EOF
17136
17137                                 ;;
17138                         (scanf)
17139                                 cf_value='/* nothing */'
17140                                 if test "$cf_scanf_attribute" != no ; then
17141                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17142
17143 cat >>confdefs.h <<\EOF
17144 #define GCC_SCANF 1
17145 EOF
17146
17147                                 fi
17148
17149 cat >>confdefs.h <<EOF
17150 #define GCC_SCANFLIKE(fmt,var) $cf_value
17151 EOF
17152
17153                                 ;;
17154                         (unused)
17155
17156 cat >>confdefs.h <<EOF
17157 #define GCC_UNUSED $cf_directive
17158 EOF
17159
17160                                 ;;
17161                         esac
17162                 fi
17163         done
17164 else
17165         ${FGREP-fgrep} define conftest.i >>confdefs.h
17166 fi
17167 rm -rf ./conftest*
17168 fi
17169
17170 fi
17171
17172 if test "x$enable_warnings" = "xyes"; then
17173
17174         ADAFLAGS="$ADAFLAGS -gnatg"
17175
17176         if test "x$cf_with_cxx" = xyes ; then
17177
17178 INTEL_CPLUSPLUS=no
17179
17180 if test "$GCC" = yes ; then
17181         case "$host_os" in
17182         (linux*|gnu*)
17183                 echo "$as_me:17183: checking if this is really Intel C++ compiler" >&5
17184 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17185                 cf_save_CFLAGS="$CXXFLAGS"
17186                 CXXFLAGS="$CXXFLAGS -no-gcc"
17187                 cat >"conftest.$ac_ext" <<_ACEOF
17188 #line 17188 "configure"
17189 #include "confdefs.h"
17190
17191 int
17192 main (void)
17193 {
17194
17195 #ifdef __INTEL_COMPILER
17196 #else
17197 make an error
17198 #endif
17199
17200   ;
17201   return 0;
17202 }
17203 _ACEOF
17204 rm -f "conftest.$ac_objext"
17205 if { (eval echo "$as_me:17205: \"$ac_compile\"") >&5
17206   (eval $ac_compile) 2>&5
17207   ac_status=$?
17208   echo "$as_me:17208: \$? = $ac_status" >&5
17209   (exit "$ac_status"); } &&
17210          { ac_try='test -s "conftest.$ac_objext"'
17211   { (eval echo "$as_me:17211: \"$ac_try\"") >&5
17212   (eval $ac_try) 2>&5
17213   ac_status=$?
17214   echo "$as_me:17214: \$? = $ac_status" >&5
17215   (exit "$ac_status"); }; }; then
17216   INTEL_CPLUSPLUS=yes
17217 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17218
17219 else
17220   echo "$as_me: failed program was:" >&5
17221 cat "conftest.$ac_ext" >&5
17222 fi
17223 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17224                 CXXFLAGS="$cf_save_CFLAGS"
17225                 echo "$as_me:17225: result: $INTEL_CPLUSPLUS" >&5
17226 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17227                 ;;
17228         esac
17229 fi
17230
17231 CLANG_CPLUSPLUS=no
17232
17233 if test "$GCC" = yes ; then
17234         echo "$as_me:17234: checking if this is really Clang C++ compiler" >&5
17235 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17236         cf_save_CFLAGS="$CXXFLAGS"
17237         cat >"conftest.$ac_ext" <<_ACEOF
17238 #line 17238 "configure"
17239 #include "confdefs.h"
17240
17241 int
17242 main (void)
17243 {
17244
17245 #ifdef __clang__
17246 #else
17247 make an error
17248 #endif
17249
17250   ;
17251   return 0;
17252 }
17253 _ACEOF
17254 rm -f "conftest.$ac_objext"
17255 if { (eval echo "$as_me:17255: \"$ac_compile\"") >&5
17256   (eval $ac_compile) 2>&5
17257   ac_status=$?
17258   echo "$as_me:17258: \$? = $ac_status" >&5
17259   (exit "$ac_status"); } &&
17260          { ac_try='test -s "conftest.$ac_objext"'
17261   { (eval echo "$as_me:17261: \"$ac_try\"") >&5
17262   (eval $ac_try) 2>&5
17263   ac_status=$?
17264   echo "$as_me:17264: \$? = $ac_status" >&5
17265   (exit "$ac_status"); }; }; then
17266   CLANG_CPLUSPLUS=yes
17267
17268 else
17269   echo "$as_me: failed program was:" >&5
17270 cat "conftest.$ac_ext" >&5
17271 fi
17272 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17273         CXXFLAGS="$cf_save_CFLAGS"
17274         echo "$as_me:17274: result: $CLANG_CPLUSPLUS" >&5
17275 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17276 fi
17277
17278 CLANG_VERSION=none
17279
17280 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17281         case "$CC" in
17282         (c[1-9][0-9]|*/c[1-9][0-9])
17283                 { echo "$as_me:17283: WARNING: replacing broken compiler alias $CC" >&5
17284 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17285                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17286                 CC=clang
17287                 ;;
17288         esac
17289
17290         echo "$as_me:17290: checking version of $CC" >&5
17291 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17292         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.].*//'`"
17293         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17294         echo "$as_me:17294: result: $CLANG_VERSION" >&5
17295 echo "${ECHO_T}$CLANG_VERSION" >&6
17296
17297         for cf_clang_opt in \
17298                 -Qunused-arguments \
17299                 -Wno-error=implicit-function-declaration
17300         do
17301                 echo "$as_me:17301: checking if option $cf_clang_opt works" >&5
17302 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17303                 cf_save_CFLAGS="$CFLAGS"
17304                 CFLAGS="$CFLAGS $cf_clang_opt"
17305                 cat >"conftest.$ac_ext" <<_ACEOF
17306 #line 17306 "configure"
17307 #include "confdefs.h"
17308
17309                         #include <stdio.h>
17310 int
17311 main (void)
17312 {
17313
17314                         printf("hello!\\n");
17315   ;
17316   return 0;
17317 }
17318 _ACEOF
17319 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17320 if { (eval echo "$as_me:17320: \"$ac_link\"") >&5
17321   (eval $ac_link) 2>&5
17322   ac_status=$?
17323   echo "$as_me:17323: \$? = $ac_status" >&5
17324   (exit "$ac_status"); } &&
17325          { ac_try='test -s "conftest$ac_exeext"'
17326   { (eval echo "$as_me:17326: \"$ac_try\"") >&5
17327   (eval $ac_try) 2>&5
17328   ac_status=$?
17329   echo "$as_me:17329: \$? = $ac_status" >&5
17330   (exit "$ac_status"); }; }; then
17331
17332                         cf_clang_optok=yes
17333 else
17334   echo "$as_me: failed program was:" >&5
17335 cat "conftest.$ac_ext" >&5
17336
17337                         cf_clang_optok=no
17338 fi
17339 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17340                 echo "$as_me:17340: result: $cf_clang_optok" >&5
17341 echo "${ECHO_T}$cf_clang_optok" >&6
17342                 CFLAGS="$cf_save_CFLAGS"
17343                 if test "$cf_clang_optok" = yes; then
17344                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17345
17346 echo "${as_me:-configure}:17346: testing adding option $cf_clang_opt ..." 1>&5
17347
17348         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17349         CFLAGS="${CFLAGS}$cf_clang_opt"
17350
17351                 fi
17352         done
17353 fi
17354
17355 ac_ext=cc
17356 ac_cpp='$CXXCPP $CPPFLAGS'
17357 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17358 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17359 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17360 ac_main_return="return"
17361
17362 cat > conftest.$ac_ext <<EOF
17363 #line 17363 "configure"
17364 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17365 EOF
17366
17367 if test "$INTEL_CPLUSPLUS" = yes
17368 then
17369 # The "-wdXXX" options suppress warnings:
17370 # remark #1419: external declaration in primary source file
17371 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17372 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17373 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17374 # remark #193: zero used for undefined preprocessing identifier
17375 # remark #593: variable "curs_sb_left_arrow" was set but never used
17376 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17377 # remark #869: parameter "tw" was never referenced
17378 # remark #981: operands are evaluated in unspecified order
17379 # warning #269: invalid format string conversion
17380
17381         { echo "$as_me:17381: checking for $CC warning options..." >&5
17382 echo "$as_me: checking for $CC warning options..." >&6;}
17383         cf_save_CXXFLAGS="$CXXFLAGS"
17384         EXTRA_CXXFLAGS="-Wall"
17385         for cf_opt in \
17386                 wd1419 \
17387                 wd1682 \
17388                 wd1683 \
17389                 wd1684 \
17390                 wd193 \
17391                 wd279 \
17392                 wd593 \
17393                 wd810 \
17394                 wd869 \
17395                 wd981
17396         do
17397                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17398                 if { (eval echo "$as_me:17398: \"$ac_compile\"") >&5
17399   (eval $ac_compile) 2>&5
17400   ac_status=$?
17401   echo "$as_me:17401: \$? = $ac_status" >&5
17402   (exit "$ac_status"); }; then
17403                         test -n "$verbose" && echo "$as_me:17403: result: ... -$cf_opt" >&5
17404 echo "${ECHO_T}... -$cf_opt" >&6
17405                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17406                 fi
17407         done
17408         CXXFLAGS="$cf_save_CXXFLAGS"
17409
17410 elif test "$GXX" = yes
17411 then
17412         { echo "$as_me:17412: checking for $CXX warning options..." >&5
17413 echo "$as_me: checking for $CXX warning options..." >&6;}
17414         cf_save_CXXFLAGS="$CXXFLAGS"
17415         EXTRA_CXXFLAGS="-W -Wall"
17416         cf_gxx_extra_warnings=""
17417         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17418         case "$GXX_VERSION" in
17419         ([1-2].*)
17420                 ;;
17421         (*)
17422                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17423                 ;;
17424         esac
17425         for cf_opt in \
17426                 Wabi \
17427                 fabi-version=0 \
17428                 Wextra \
17429                 Wignored-qualifiers \
17430                 Wlogical-op \
17431                 Woverloaded-virtual \
17432                 Wsign-promo \
17433                 Wsynth \
17434                 Wold-style-cast \
17435                 Wcast-align \
17436                 Wcast-qual \
17437                 Wpointer-arith \
17438                 Wshadow \
17439                 Wundef $cf_gxx_extra_warnings Wno-unused
17440         do
17441                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17442                 if { (eval echo "$as_me:17442: \"$ac_compile\"") >&5
17443   (eval $ac_compile) 2>&5
17444   ac_status=$?
17445   echo "$as_me:17445: \$? = $ac_status" >&5
17446   (exit "$ac_status"); }; then
17447                         test -n "$verbose" && echo "$as_me:17447: result: ... -$cf_opt" >&5
17448 echo "${ECHO_T}... -$cf_opt" >&6
17449                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17450                 else
17451                         test -n "$verbose" && echo "$as_me:17451: result: ... no -$cf_opt" >&5
17452 echo "${ECHO_T}... no -$cf_opt" >&6
17453                 fi
17454         done
17455         CXXFLAGS="$cf_save_CXXFLAGS"
17456 fi
17457
17458 rm -rf ./conftest*
17459 ac_ext=c
17460 ac_cpp='$CPP $CPPFLAGS'
17461 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17462 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17463 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17464 ac_main_return="return"
17465
17466         fi
17467 fi
17468
17469 echo "$as_me:17469: checking if you want to work around bogus compiler/loader warnings" >&5
17470 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17471
17472 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17473 if test "${enable_string_hacks+set}" = set; then
17474   enableval="$enable_string_hacks"
17475   enable_string_hacks=$enableval
17476 else
17477   enable_string_hacks=no
17478 fi;
17479 echo "$as_me:17479: result: $enable_string_hacks" >&5
17480 echo "${ECHO_T}$enable_string_hacks" >&6
17481
17482 if test "x$enable_string_hacks" = "xyes"; then
17483
17484 cat >>confdefs.h <<\EOF
17485 #define USE_STRING_HACKS 1
17486 EOF
17487
17488         { echo "$as_me:17488: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17489 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17490         echo "$as_me:17490: checking for strlcat" >&5
17491 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17492 if test "${ac_cv_func_strlcat+set}" = set; then
17493   echo $ECHO_N "(cached) $ECHO_C" >&6
17494 else
17495   cat >"conftest.$ac_ext" <<_ACEOF
17496 #line 17496 "configure"
17497 #include "confdefs.h"
17498 #define strlcat autoconf_temporary
17499 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17500 #undef strlcat
17501
17502 #ifdef __cplusplus
17503 extern "C"
17504 #endif
17505
17506 /* We use char because int might match the return type of a gcc2
17507    builtin and then its argument prototype would still apply.  */
17508 char strlcat (void);
17509
17510 int
17511 main (void)
17512 {
17513
17514 /* The GNU C library defines stubs for functions which it implements
17515     to always fail with ENOSYS.  Some functions are actually named
17516     something starting with __ and the normal name is an alias.  */
17517 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17518 #error found stub for strlcat
17519 #endif
17520
17521         return strlcat ();
17522   ;
17523   return 0;
17524 }
17525 _ACEOF
17526 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17527 if { (eval echo "$as_me:17527: \"$ac_link\"") >&5
17528   (eval $ac_link) 2>&5
17529   ac_status=$?
17530   echo "$as_me:17530: \$? = $ac_status" >&5
17531   (exit "$ac_status"); } &&
17532          { ac_try='test -s "conftest$ac_exeext"'
17533   { (eval echo "$as_me:17533: \"$ac_try\"") >&5
17534   (eval $ac_try) 2>&5
17535   ac_status=$?
17536   echo "$as_me:17536: \$? = $ac_status" >&5
17537   (exit "$ac_status"); }; }; then
17538   ac_cv_func_strlcat=yes
17539 else
17540   echo "$as_me: failed program was:" >&5
17541 cat "conftest.$ac_ext" >&5
17542 ac_cv_func_strlcat=no
17543 fi
17544 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17545 fi
17546 echo "$as_me:17546: result: $ac_cv_func_strlcat" >&5
17547 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17548 if test "$ac_cv_func_strlcat" = yes; then
17549
17550 cat >>confdefs.h <<\EOF
17551 #define HAVE_STRLCAT 1
17552 EOF
17553
17554 else
17555
17556                 echo "$as_me:17556: checking for strlcat in -lbsd" >&5
17557 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17558 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17559   echo $ECHO_N "(cached) $ECHO_C" >&6
17560 else
17561   ac_check_lib_save_LIBS=$LIBS
17562 LIBS="-lbsd  $LIBS"
17563 cat >"conftest.$ac_ext" <<_ACEOF
17564 #line 17564 "configure"
17565 #include "confdefs.h"
17566
17567 /* Override any gcc2 internal prototype to avoid an error.  */
17568 #ifdef __cplusplus
17569 extern "C"
17570 #endif
17571 /* We use char because int might match the return type of a gcc2
17572    builtin and then its argument prototype would still apply.  */
17573 char strlcat ();
17574 int
17575 main (void)
17576 {
17577 strlcat ();
17578   ;
17579   return 0;
17580 }
17581 _ACEOF
17582 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17583 if { (eval echo "$as_me:17583: \"$ac_link\"") >&5
17584   (eval $ac_link) 2>&5
17585   ac_status=$?
17586   echo "$as_me:17586: \$? = $ac_status" >&5
17587   (exit "$ac_status"); } &&
17588          { ac_try='test -s "conftest$ac_exeext"'
17589   { (eval echo "$as_me:17589: \"$ac_try\"") >&5
17590   (eval $ac_try) 2>&5
17591   ac_status=$?
17592   echo "$as_me:17592: \$? = $ac_status" >&5
17593   (exit "$ac_status"); }; }; then
17594   ac_cv_lib_bsd_strlcat=yes
17595 else
17596   echo "$as_me: failed program was:" >&5
17597 cat "conftest.$ac_ext" >&5
17598 ac_cv_lib_bsd_strlcat=no
17599 fi
17600 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17601 LIBS=$ac_check_lib_save_LIBS
17602 fi
17603 echo "$as_me:17603: result: $ac_cv_lib_bsd_strlcat" >&5
17604 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17605 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17606
17607 cf_add_libs="$LIBS"
17608 # reverse order
17609 cf_add_0lib=
17610 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17611 # filter duplicates
17612 for cf_add_1lib in $cf_add_0lib; do
17613         for cf_add_2lib in $cf_add_libs; do
17614                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17615                         cf_add_1lib=
17616                         break
17617                 fi
17618         done
17619         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17620 done
17621 LIBS="$cf_add_libs"
17622
17623 for ac_header in bsd/string.h
17624 do
17625 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17626 echo "$as_me:17626: checking for $ac_header" >&5
17627 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17628 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17629   echo $ECHO_N "(cached) $ECHO_C" >&6
17630 else
17631   cat >"conftest.$ac_ext" <<_ACEOF
17632 #line 17632 "configure"
17633 #include "confdefs.h"
17634 #include <$ac_header>
17635 _ACEOF
17636 if { (eval echo "$as_me:17636: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17637   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17638   ac_status=$?
17639   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17640   rm -f conftest.er1
17641   cat conftest.err >&5
17642   echo "$as_me:17642: \$? = $ac_status" >&5
17643   (exit "$ac_status"); } >/dev/null; then
17644   if test -s conftest.err; then
17645     ac_cpp_err=$ac_c_preproc_warn_flag
17646   else
17647     ac_cpp_err=
17648   fi
17649 else
17650   ac_cpp_err=yes
17651 fi
17652 if test -z "$ac_cpp_err"; then
17653   eval "$as_ac_Header=yes"
17654 else
17655   echo "$as_me: failed program was:" >&5
17656   cat "conftest.$ac_ext" >&5
17657   eval "$as_ac_Header=no"
17658 fi
17659 rm -f conftest.err "conftest.$ac_ext"
17660 fi
17661 echo "$as_me:17661: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17662 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17663 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17664   cat >>confdefs.h <<EOF
17665 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17666 EOF
17667
17668 fi
17669 done
17670
17671 cat >>confdefs.h <<\EOF
17672 #define HAVE_STRLCAT 1
17673 EOF
17674
17675 fi
17676
17677 fi
17678
17679 for ac_func in strlcpy snprintf
17680 do
17681 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17682 echo "$as_me:17682: checking for $ac_func" >&5
17683 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17684 if eval "test \"\${$as_ac_var+set}\" = set"; then
17685   echo $ECHO_N "(cached) $ECHO_C" >&6
17686 else
17687   cat >"conftest.$ac_ext" <<_ACEOF
17688 #line 17688 "configure"
17689 #include "confdefs.h"
17690 #define $ac_func autoconf_temporary
17691 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17692 #undef $ac_func
17693
17694 #ifdef __cplusplus
17695 extern "C"
17696 #endif
17697
17698 /* We use char because int might match the return type of a gcc2
17699    builtin and then its argument prototype would still apply.  */
17700 char $ac_func (void);
17701
17702 int
17703 main (void)
17704 {
17705
17706 /* The GNU C library defines stubs for functions which it implements
17707     to always fail with ENOSYS.  Some functions are actually named
17708     something starting with __ and the normal name is an alias.  */
17709 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17710 #error found stub for $ac_func
17711 #endif
17712
17713         return $ac_func ();
17714   ;
17715   return 0;
17716 }
17717 _ACEOF
17718 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17719 if { (eval echo "$as_me:17719: \"$ac_link\"") >&5
17720   (eval $ac_link) 2>&5
17721   ac_status=$?
17722   echo "$as_me:17722: \$? = $ac_status" >&5
17723   (exit "$ac_status"); } &&
17724          { ac_try='test -s "conftest$ac_exeext"'
17725   { (eval echo "$as_me:17725: \"$ac_try\"") >&5
17726   (eval $ac_try) 2>&5
17727   ac_status=$?
17728   echo "$as_me:17728: \$? = $ac_status" >&5
17729   (exit "$ac_status"); }; }; then
17730   eval "$as_ac_var=yes"
17731 else
17732   echo "$as_me: failed program was:" >&5
17733 cat "conftest.$ac_ext" >&5
17734 eval "$as_ac_var=no"
17735 fi
17736 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17737 fi
17738 echo "$as_me:17738: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17739 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17740 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17741   cat >>confdefs.h <<EOF
17742 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17743 EOF
17744
17745 fi
17746 done
17747
17748 fi
17749
17750 ###     use option --enable-assertions to turn on generation of assertion code
17751 echo "$as_me:17751: checking if you want to enable runtime assertions" >&5
17752 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17753
17754 # Check whether --enable-assertions or --disable-assertions was given.
17755 if test "${enable_assertions+set}" = set; then
17756   enableval="$enable_assertions"
17757   with_assertions=$enableval
17758 else
17759   with_assertions=no
17760 fi;
17761 echo "$as_me:17761: result: $with_assertions" >&5
17762 echo "${ECHO_T}$with_assertions" >&6
17763 if test -n "$GCC"
17764 then
17765         if test "$with_assertions" = no
17766         then
17767                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17768         else
17769
17770         ADAFLAGS="$ADAFLAGS -gnata"
17771
17772         fi
17773 fi
17774
17775 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17776
17777 echo "$as_me:17777: checking if you want to use dmalloc for testing" >&5
17778 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17779
17780 # Check whether --with-dmalloc or --without-dmalloc was given.
17781 if test "${with_dmalloc+set}" = set; then
17782   withval="$with_dmalloc"
17783   case "x$withval" in
17784         (x|xno) ;;
17785         (*)
17786                 : "${with_cflags:=-g}"
17787                 : "${enable_leaks:=no}"
17788                 with_dmalloc=yes
17789
17790 cat >>confdefs.h <<EOF
17791 #define USE_DMALLOC 1
17792 EOF
17793
17794                 ;;
17795         esac
17796 else
17797   with_dmalloc=
17798 fi;
17799 echo "$as_me:17799: result: ${with_dmalloc:-no}" >&5
17800 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17801
17802 case ".$with_cflags" in
17803 (.*-g*)
17804         case .$CFLAGS in
17805         (.*-g*)
17806                 ;;
17807         (*)
17808
17809 cf_fix_cppflags=no
17810 cf_new_cflags=
17811 cf_new_cppflags=
17812 cf_new_extra_cppflags=
17813
17814 for cf_add_cflags in -g
17815 do
17816 case "$cf_fix_cppflags" in
17817 (no)
17818         case "$cf_add_cflags" in
17819         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17820                 case "$cf_add_cflags" in
17821                 (-D*)
17822                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17823
17824                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17825                                 && test -z "${cf_tst_cflags}" \
17826                                 && cf_fix_cppflags=yes
17827
17828                         if test "$cf_fix_cppflags" = yes ; then
17829
17830         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17831         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17832
17833                                 continue
17834                         elif test "${cf_tst_cflags}" = "\"'" ; then
17835
17836         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17837         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17838
17839                                 continue
17840                         fi
17841                         ;;
17842                 esac
17843                 case "$CPPFLAGS" in
17844                 (*$cf_add_cflags)
17845                         ;;
17846                 (*)
17847                         case "$cf_add_cflags" in
17848                         (-D*)
17849                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17850
17851 CPPFLAGS=`echo "$CPPFLAGS" | \
17852         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17853                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17854
17855                                 ;;
17856                         esac
17857
17858         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17859         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17860
17861                         ;;
17862                 esac
17863                 ;;
17864         (*)
17865
17866         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17867         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17868
17869                 ;;
17870         esac
17871         ;;
17872 (yes)
17873
17874         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17875         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17876
17877         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17878
17879         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17880                 && test -z "${cf_tst_cflags}" \
17881                 && cf_fix_cppflags=no
17882         ;;
17883 esac
17884 done
17885
17886 if test -n "$cf_new_cflags" ; then
17887
17888         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17889         CFLAGS="${CFLAGS}$cf_new_cflags"
17890
17891 fi
17892
17893 if test -n "$cf_new_cppflags" ; then
17894
17895         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17896         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17897
17898 fi
17899
17900 if test -n "$cf_new_extra_cppflags" ; then
17901
17902         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17903         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17904
17905 fi
17906
17907                 ;;
17908         esac
17909         ;;
17910 esac
17911
17912 if test "$with_dmalloc" = yes ; then
17913         echo "$as_me:17913: checking for dmalloc.h" >&5
17914 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17915 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17916   echo $ECHO_N "(cached) $ECHO_C" >&6
17917 else
17918   cat >"conftest.$ac_ext" <<_ACEOF
17919 #line 17919 "configure"
17920 #include "confdefs.h"
17921 #include <dmalloc.h>
17922 _ACEOF
17923 if { (eval echo "$as_me:17923: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17924   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17925   ac_status=$?
17926   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17927   rm -f conftest.er1
17928   cat conftest.err >&5
17929   echo "$as_me:17929: \$? = $ac_status" >&5
17930   (exit "$ac_status"); } >/dev/null; then
17931   if test -s conftest.err; then
17932     ac_cpp_err=$ac_c_preproc_warn_flag
17933   else
17934     ac_cpp_err=
17935   fi
17936 else
17937   ac_cpp_err=yes
17938 fi
17939 if test -z "$ac_cpp_err"; then
17940   ac_cv_header_dmalloc_h=yes
17941 else
17942   echo "$as_me: failed program was:" >&5
17943   cat "conftest.$ac_ext" >&5
17944   ac_cv_header_dmalloc_h=no
17945 fi
17946 rm -f conftest.err "conftest.$ac_ext"
17947 fi
17948 echo "$as_me:17948: result: $ac_cv_header_dmalloc_h" >&5
17949 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17950 if test "$ac_cv_header_dmalloc_h" = yes; then
17951
17952 echo "$as_me:17952: checking for dmalloc_debug in -ldmalloc" >&5
17953 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17954 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17955   echo $ECHO_N "(cached) $ECHO_C" >&6
17956 else
17957   ac_check_lib_save_LIBS=$LIBS
17958 LIBS="-ldmalloc  $LIBS"
17959 cat >"conftest.$ac_ext" <<_ACEOF
17960 #line 17960 "configure"
17961 #include "confdefs.h"
17962
17963 /* Override any gcc2 internal prototype to avoid an error.  */
17964 #ifdef __cplusplus
17965 extern "C"
17966 #endif
17967 /* We use char because int might match the return type of a gcc2
17968    builtin and then its argument prototype would still apply.  */
17969 char dmalloc_debug ();
17970 int
17971 main (void)
17972 {
17973 dmalloc_debug ();
17974   ;
17975   return 0;
17976 }
17977 _ACEOF
17978 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17979 if { (eval echo "$as_me:17979: \"$ac_link\"") >&5
17980   (eval $ac_link) 2>&5
17981   ac_status=$?
17982   echo "$as_me:17982: \$? = $ac_status" >&5
17983   (exit "$ac_status"); } &&
17984          { ac_try='test -s "conftest$ac_exeext"'
17985   { (eval echo "$as_me:17985: \"$ac_try\"") >&5
17986   (eval $ac_try) 2>&5
17987   ac_status=$?
17988   echo "$as_me:17988: \$? = $ac_status" >&5
17989   (exit "$ac_status"); }; }; then
17990   ac_cv_lib_dmalloc_dmalloc_debug=yes
17991 else
17992   echo "$as_me: failed program was:" >&5
17993 cat "conftest.$ac_ext" >&5
17994 ac_cv_lib_dmalloc_dmalloc_debug=no
17995 fi
17996 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17997 LIBS=$ac_check_lib_save_LIBS
17998 fi
17999 echo "$as_me:17999: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18000 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18001 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18002   cat >>confdefs.h <<EOF
18003 #define HAVE_LIBDMALLOC 1
18004 EOF
18005
18006   LIBS="-ldmalloc $LIBS"
18007
18008 fi
18009
18010 fi
18011
18012 fi
18013
18014 echo "$as_me:18014: checking if you want to use dbmalloc for testing" >&5
18015 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18016
18017 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18018 if test "${with_dbmalloc+set}" = set; then
18019   withval="$with_dbmalloc"
18020   case "x$withval" in
18021         (x|xno) ;;
18022         (*)
18023                 : "${with_cflags:=-g}"
18024                 : "${enable_leaks:=no}"
18025                 with_dbmalloc=yes
18026
18027 cat >>confdefs.h <<EOF
18028 #define USE_DBMALLOC 1
18029 EOF
18030
18031                 ;;
18032         esac
18033 else
18034   with_dbmalloc=
18035 fi;
18036 echo "$as_me:18036: result: ${with_dbmalloc:-no}" >&5
18037 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18038
18039 case ".$with_cflags" in
18040 (.*-g*)
18041         case .$CFLAGS in
18042         (.*-g*)
18043                 ;;
18044         (*)
18045
18046 cf_fix_cppflags=no
18047 cf_new_cflags=
18048 cf_new_cppflags=
18049 cf_new_extra_cppflags=
18050
18051 for cf_add_cflags in -g
18052 do
18053 case "$cf_fix_cppflags" in
18054 (no)
18055         case "$cf_add_cflags" in
18056         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18057                 case "$cf_add_cflags" in
18058                 (-D*)
18059                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18060
18061                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18062                                 && test -z "${cf_tst_cflags}" \
18063                                 && cf_fix_cppflags=yes
18064
18065                         if test "$cf_fix_cppflags" = yes ; then
18066
18067         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18068         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18069
18070                                 continue
18071                         elif test "${cf_tst_cflags}" = "\"'" ; then
18072
18073         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18074         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18075
18076                                 continue
18077                         fi
18078                         ;;
18079                 esac
18080                 case "$CPPFLAGS" in
18081                 (*$cf_add_cflags)
18082                         ;;
18083                 (*)
18084                         case "$cf_add_cflags" in
18085                         (-D*)
18086                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18087
18088 CPPFLAGS=`echo "$CPPFLAGS" | \
18089         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18090                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18091
18092                                 ;;
18093                         esac
18094
18095         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18096         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18097
18098                         ;;
18099                 esac
18100                 ;;
18101         (*)
18102
18103         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18104         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18105
18106                 ;;
18107         esac
18108         ;;
18109 (yes)
18110
18111         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18112         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18113
18114         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18115
18116         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18117                 && test -z "${cf_tst_cflags}" \
18118                 && cf_fix_cppflags=no
18119         ;;
18120 esac
18121 done
18122
18123 if test -n "$cf_new_cflags" ; then
18124
18125         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18126         CFLAGS="${CFLAGS}$cf_new_cflags"
18127
18128 fi
18129
18130 if test -n "$cf_new_cppflags" ; then
18131
18132         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18133         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18134
18135 fi
18136
18137 if test -n "$cf_new_extra_cppflags" ; then
18138
18139         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18140         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18141
18142 fi
18143
18144                 ;;
18145         esac
18146         ;;
18147 esac
18148
18149 if test "$with_dbmalloc" = yes ; then
18150         echo "$as_me:18150: checking for dbmalloc.h" >&5
18151 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18152 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18153   echo $ECHO_N "(cached) $ECHO_C" >&6
18154 else
18155   cat >"conftest.$ac_ext" <<_ACEOF
18156 #line 18156 "configure"
18157 #include "confdefs.h"
18158 #include <dbmalloc.h>
18159 _ACEOF
18160 if { (eval echo "$as_me:18160: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18161   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18162   ac_status=$?
18163   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18164   rm -f conftest.er1
18165   cat conftest.err >&5
18166   echo "$as_me:18166: \$? = $ac_status" >&5
18167   (exit "$ac_status"); } >/dev/null; then
18168   if test -s conftest.err; then
18169     ac_cpp_err=$ac_c_preproc_warn_flag
18170   else
18171     ac_cpp_err=
18172   fi
18173 else
18174   ac_cpp_err=yes
18175 fi
18176 if test -z "$ac_cpp_err"; then
18177   ac_cv_header_dbmalloc_h=yes
18178 else
18179   echo "$as_me: failed program was:" >&5
18180   cat "conftest.$ac_ext" >&5
18181   ac_cv_header_dbmalloc_h=no
18182 fi
18183 rm -f conftest.err "conftest.$ac_ext"
18184 fi
18185 echo "$as_me:18185: result: $ac_cv_header_dbmalloc_h" >&5
18186 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18187 if test "$ac_cv_header_dbmalloc_h" = yes; then
18188
18189 echo "$as_me:18189: checking for debug_malloc in -ldbmalloc" >&5
18190 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18191 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18192   echo $ECHO_N "(cached) $ECHO_C" >&6
18193 else
18194   ac_check_lib_save_LIBS=$LIBS
18195 LIBS="-ldbmalloc  $LIBS"
18196 cat >"conftest.$ac_ext" <<_ACEOF
18197 #line 18197 "configure"
18198 #include "confdefs.h"
18199
18200 /* Override any gcc2 internal prototype to avoid an error.  */
18201 #ifdef __cplusplus
18202 extern "C"
18203 #endif
18204 /* We use char because int might match the return type of a gcc2
18205    builtin and then its argument prototype would still apply.  */
18206 char debug_malloc ();
18207 int
18208 main (void)
18209 {
18210 debug_malloc ();
18211   ;
18212   return 0;
18213 }
18214 _ACEOF
18215 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18216 if { (eval echo "$as_me:18216: \"$ac_link\"") >&5
18217   (eval $ac_link) 2>&5
18218   ac_status=$?
18219   echo "$as_me:18219: \$? = $ac_status" >&5
18220   (exit "$ac_status"); } &&
18221          { ac_try='test -s "conftest$ac_exeext"'
18222   { (eval echo "$as_me:18222: \"$ac_try\"") >&5
18223   (eval $ac_try) 2>&5
18224   ac_status=$?
18225   echo "$as_me:18225: \$? = $ac_status" >&5
18226   (exit "$ac_status"); }; }; then
18227   ac_cv_lib_dbmalloc_debug_malloc=yes
18228 else
18229   echo "$as_me: failed program was:" >&5
18230 cat "conftest.$ac_ext" >&5
18231 ac_cv_lib_dbmalloc_debug_malloc=no
18232 fi
18233 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18234 LIBS=$ac_check_lib_save_LIBS
18235 fi
18236 echo "$as_me:18236: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18237 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18238 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18239   cat >>confdefs.h <<EOF
18240 #define HAVE_LIBDBMALLOC 1
18241 EOF
18242
18243   LIBS="-ldbmalloc $LIBS"
18244
18245 fi
18246
18247 fi
18248
18249 fi
18250
18251 echo "$as_me:18251: checking if you want to use valgrind for testing" >&5
18252 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18253
18254 # Check whether --with-valgrind or --without-valgrind was given.
18255 if test "${with_valgrind+set}" = set; then
18256   withval="$with_valgrind"
18257   case "x$withval" in
18258         (x|xno) ;;
18259         (*)
18260                 : "${with_cflags:=-g}"
18261                 : "${enable_leaks:=no}"
18262                 with_valgrind=yes
18263
18264 cat >>confdefs.h <<EOF
18265 #define USE_VALGRIND 1
18266 EOF
18267
18268                 ;;
18269         esac
18270 else
18271   with_valgrind=
18272 fi;
18273 echo "$as_me:18273: result: ${with_valgrind:-no}" >&5
18274 echo "${ECHO_T}${with_valgrind:-no}" >&6
18275
18276 case ".$with_cflags" in
18277 (.*-g*)
18278         case .$CFLAGS in
18279         (.*-g*)
18280                 ;;
18281         (*)
18282
18283 cf_fix_cppflags=no
18284 cf_new_cflags=
18285 cf_new_cppflags=
18286 cf_new_extra_cppflags=
18287
18288 for cf_add_cflags in -g
18289 do
18290 case "$cf_fix_cppflags" in
18291 (no)
18292         case "$cf_add_cflags" in
18293         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18294                 case "$cf_add_cflags" in
18295                 (-D*)
18296                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18297
18298                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18299                                 && test -z "${cf_tst_cflags}" \
18300                                 && cf_fix_cppflags=yes
18301
18302                         if test "$cf_fix_cppflags" = yes ; then
18303
18304         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18305         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18306
18307                                 continue
18308                         elif test "${cf_tst_cflags}" = "\"'" ; then
18309
18310         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18311         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18312
18313                                 continue
18314                         fi
18315                         ;;
18316                 esac
18317                 case "$CPPFLAGS" in
18318                 (*$cf_add_cflags)
18319                         ;;
18320                 (*)
18321                         case "$cf_add_cflags" in
18322                         (-D*)
18323                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18324
18325 CPPFLAGS=`echo "$CPPFLAGS" | \
18326         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18327                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18328
18329                                 ;;
18330                         esac
18331
18332         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18333         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18334
18335                         ;;
18336                 esac
18337                 ;;
18338         (*)
18339
18340         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18341         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18342
18343                 ;;
18344         esac
18345         ;;
18346 (yes)
18347
18348         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18349         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18350
18351         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18352
18353         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18354                 && test -z "${cf_tst_cflags}" \
18355                 && cf_fix_cppflags=no
18356         ;;
18357 esac
18358 done
18359
18360 if test -n "$cf_new_cflags" ; then
18361
18362         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18363         CFLAGS="${CFLAGS}$cf_new_cflags"
18364
18365 fi
18366
18367 if test -n "$cf_new_cppflags" ; then
18368
18369         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18370         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18371
18372 fi
18373
18374 if test -n "$cf_new_extra_cppflags" ; then
18375
18376         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18377         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18378
18379 fi
18380
18381                 ;;
18382         esac
18383         ;;
18384 esac
18385
18386 echo "$as_me:18386: checking if you want to perform memory-leak testing" >&5
18387 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18388
18389 # Check whether --enable-leaks or --disable-leaks was given.
18390 if test "${enable_leaks+set}" = set; then
18391   enableval="$enable_leaks"
18392   enable_leaks=$enableval
18393 else
18394   enable_leaks=yes
18395 fi;
18396 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18397 echo "$as_me:18397: result: $with_no_leaks" >&5
18398 echo "${ECHO_T}$with_no_leaks" >&6
18399
18400 if test "$enable_leaks" = no ; then
18401
18402 cat >>confdefs.h <<\EOF
18403 #define NO_LEAKS 1
18404 EOF
18405
18406 cat >>confdefs.h <<\EOF
18407 #define YY_NO_LEAKS 1
18408 EOF
18409
18410 fi
18411
18412 cat >>confdefs.h <<\EOF
18413 #define HAVE_NC_ALLOC_H 1
18414 EOF
18415
18416 ###     use option --enable-expanded to generate certain macros as functions
18417
18418 # Check whether --enable-expanded or --disable-expanded was given.
18419 if test "${enable_expanded+set}" = set; then
18420   enableval="$enable_expanded"
18421   test "x$enableval" = xyes &&
18422 cat >>confdefs.h <<\EOF
18423 #define NCURSES_EXPANDED 1
18424 EOF
18425
18426 fi;
18427
18428 ###     use option --disable-macros to suppress macros in favor of functions
18429
18430 # Check whether --enable-macros or --disable-macros was given.
18431 if test "${enable_macros+set}" = set; then
18432   enableval="$enable_macros"
18433   test "$enableval" = no &&
18434 cat >>confdefs.h <<\EOF
18435 #define NCURSES_NOMACROS 1
18436 EOF
18437
18438 fi;
18439
18440 # Normally we only add trace() to the debug-library.  Allow this to be
18441 # extended to all models of the ncurses library:
18442 cf_all_traces=no
18443 case "$CFLAGS $CPPFLAGS" in
18444 (*-DTRACE*)
18445         cf_all_traces=yes
18446         ;;
18447 esac
18448
18449 echo "$as_me:18449: checking whether to add trace feature to all models" >&5
18450 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18451
18452 # Check whether --with-trace or --without-trace was given.
18453 if test "${with_trace+set}" = set; then
18454   withval="$with_trace"
18455   cf_with_trace=$withval
18456 else
18457   cf_with_trace=$cf_all_traces
18458 fi;
18459 echo "$as_me:18459: result: $cf_with_trace" >&5
18460 echo "${ECHO_T}$cf_with_trace" >&6
18461
18462 if test "x$cf_with_trace" = xyes ; then
18463         LIB_TRACING=all
18464         ADA_TRACE=TRUE
18465
18466 cf_fix_cppflags=no
18467 cf_new_cflags=
18468 cf_new_cppflags=
18469 cf_new_extra_cppflags=
18470
18471 for cf_add_cflags in -DTRACE
18472 do
18473 case "$cf_fix_cppflags" in
18474 (no)
18475         case "$cf_add_cflags" in
18476         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18477                 case "$cf_add_cflags" in
18478                 (-D*)
18479                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18480
18481                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18482                                 && test -z "${cf_tst_cflags}" \
18483                                 && cf_fix_cppflags=yes
18484
18485                         if test "$cf_fix_cppflags" = yes ; then
18486
18487         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18488         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18489
18490                                 continue
18491                         elif test "${cf_tst_cflags}" = "\"'" ; then
18492
18493         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18494         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18495
18496                                 continue
18497                         fi
18498                         ;;
18499                 esac
18500                 case "$CPPFLAGS" in
18501                 (*$cf_add_cflags)
18502                         ;;
18503                 (*)
18504                         case "$cf_add_cflags" in
18505                         (-D*)
18506                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18507
18508 CPPFLAGS=`echo "$CPPFLAGS" | \
18509         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18510                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18511
18512                                 ;;
18513                         esac
18514
18515         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18516         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18517
18518                         ;;
18519                 esac
18520                 ;;
18521         (*)
18522
18523         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18524         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18525
18526                 ;;
18527         esac
18528         ;;
18529 (yes)
18530
18531         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18532         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18533
18534         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18535
18536         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18537                 && test -z "${cf_tst_cflags}" \
18538                 && cf_fix_cppflags=no
18539         ;;
18540 esac
18541 done
18542
18543 if test -n "$cf_new_cflags" ; then
18544
18545         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18546         CFLAGS="${CFLAGS}$cf_new_cflags"
18547
18548 fi
18549
18550 if test -n "$cf_new_cppflags" ; then
18551
18552         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18553         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18554
18555 fi
18556
18557 if test -n "$cf_new_extra_cppflags" ; then
18558
18559         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18560         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18561
18562 fi
18563
18564 cat >>confdefs.h <<\EOF
18565 #define HAVE__TRACEF 1
18566 EOF
18567
18568 else
18569         LIB_TRACING=DEBUG
18570         ADA_TRACE=FALSE
18571 fi
18572
18573 echo "$as_me:18573: checking if we want to use GNAT projects" >&5
18574 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18575
18576 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18577 if test "${enable_gnat_projects+set}" = set; then
18578   enableval="$enable_gnat_projects"
18579   test "$enableval" != no && enableval=yes
18580         if test "$enableval" != "yes" ; then
18581     enable_gnat_projects=no
18582         else
18583                 enable_gnat_projects=yes
18584         fi
18585 else
18586   enableval=yes
18587         enable_gnat_projects=yes
18588
18589 fi;
18590 echo "$as_me:18590: result: $enable_gnat_projects" >&5
18591 echo "${ECHO_T}$enable_gnat_projects" >&6
18592
18593 ###     Checks for libraries.
18594 case "$cf_cv_system_name" in
18595 (*mingw32*|*mingw64*)
18596         # Note: WINVER may be a problem with Windows 10
18597         if test "x$with_exp_win32" = xyes ; then
18598                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18599         else
18600                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18601         fi
18602
18603 echo "$as_me:18603: checking if ssp library is needed" >&5
18604 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
18605 if test "${cf_cv_need_libssp+set}" = set; then
18606   echo $ECHO_N "(cached) $ECHO_C" >&6
18607 else
18608
18609 cat >"conftest.$ac_ext" <<_ACEOF
18610 #line 18610 "configure"
18611 #include "confdefs.h"
18612
18613 #include <sys/types.h>
18614 #include <dirent.h>
18615
18616 int
18617 main (void)
18618 {
18619
18620        DIR *dp = opendir(".");
18621
18622   ;
18623   return 0;
18624 }
18625 _ACEOF
18626 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18627 if { (eval echo "$as_me:18627: \"$ac_link\"") >&5
18628   (eval $ac_link) 2>&5
18629   ac_status=$?
18630   echo "$as_me:18630: \$? = $ac_status" >&5
18631   (exit "$ac_status"); } &&
18632          { ac_try='test -s "conftest$ac_exeext"'
18633   { (eval echo "$as_me:18633: \"$ac_try\"") >&5
18634   (eval $ac_try) 2>&5
18635   ac_status=$?
18636   echo "$as_me:18636: \$? = $ac_status" >&5
18637   (exit "$ac_status"); }; }; then
18638   cf_cv_need_libssp=no
18639 else
18640   echo "$as_me: failed program was:" >&5
18641 cat "conftest.$ac_ext" >&5
18642
18643         cf_save_LIBS="$LIBS"
18644         LIBS="$LIBS -lssp"
18645         cat >"conftest.$ac_ext" <<_ACEOF
18646 #line 18646 "configure"
18647 #include "confdefs.h"
18648
18649 #include <sys/types.h>
18650 #include <dirent.h>
18651
18652 int
18653 main (void)
18654 {
18655
18656                    DIR *dp = opendir(".");
18657
18658   ;
18659   return 0;
18660 }
18661 _ACEOF
18662 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18663 if { (eval echo "$as_me:18663: \"$ac_link\"") >&5
18664   (eval $ac_link) 2>&5
18665   ac_status=$?
18666   echo "$as_me:18666: \$? = $ac_status" >&5
18667   (exit "$ac_status"); } &&
18668          { ac_try='test -s "conftest$ac_exeext"'
18669   { (eval echo "$as_me:18669: \"$ac_try\"") >&5
18670   (eval $ac_try) 2>&5
18671   ac_status=$?
18672   echo "$as_me:18672: \$? = $ac_status" >&5
18673   (exit "$ac_status"); }; }; then
18674   cf_cv_need_libssp=yes
18675 else
18676   echo "$as_me: failed program was:" >&5
18677 cat "conftest.$ac_ext" >&5
18678 cf_cv_need_libssp=maybe
18679 fi
18680 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18681         LIBS="$cf_save_LIBS"
18682
18683 fi
18684 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18685 fi
18686 echo "$as_me:18686: result: $cf_cv_need_libssp" >&5
18687 echo "${ECHO_T}$cf_cv_need_libssp" >&6
18688
18689 if test "x$cf_cv_need_libssp" = xyes
18690 then
18691
18692 cf_add_libs="$LIBS"
18693 # reverse order
18694 cf_add_0lib=
18695 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18696 # filter duplicates
18697 for cf_add_1lib in $cf_add_0lib; do
18698         for cf_add_2lib in $cf_add_libs; do
18699                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18700                         cf_add_1lib=
18701                         break
18702                 fi
18703         done
18704         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18705 done
18706 LIBS="$cf_add_libs"
18707
18708 fi
18709
18710         ;;
18711 (*)
18712 echo "$as_me:18712: checking for gettimeofday" >&5
18713 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18714 if test "${ac_cv_func_gettimeofday+set}" = set; then
18715   echo $ECHO_N "(cached) $ECHO_C" >&6
18716 else
18717   cat >"conftest.$ac_ext" <<_ACEOF
18718 #line 18718 "configure"
18719 #include "confdefs.h"
18720 #define gettimeofday autoconf_temporary
18721 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18722 #undef gettimeofday
18723
18724 #ifdef __cplusplus
18725 extern "C"
18726 #endif
18727
18728 /* We use char because int might match the return type of a gcc2
18729    builtin and then its argument prototype would still apply.  */
18730 char gettimeofday (void);
18731
18732 int
18733 main (void)
18734 {
18735
18736 /* The GNU C library defines stubs for functions which it implements
18737     to always fail with ENOSYS.  Some functions are actually named
18738     something starting with __ and the normal name is an alias.  */
18739 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18740 #error found stub for gettimeofday
18741 #endif
18742
18743         return gettimeofday ();
18744   ;
18745   return 0;
18746 }
18747 _ACEOF
18748 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18749 if { (eval echo "$as_me:18749: \"$ac_link\"") >&5
18750   (eval $ac_link) 2>&5
18751   ac_status=$?
18752   echo "$as_me:18752: \$? = $ac_status" >&5
18753   (exit "$ac_status"); } &&
18754          { ac_try='test -s "conftest$ac_exeext"'
18755   { (eval echo "$as_me:18755: \"$ac_try\"") >&5
18756   (eval $ac_try) 2>&5
18757   ac_status=$?
18758   echo "$as_me:18758: \$? = $ac_status" >&5
18759   (exit "$ac_status"); }; }; then
18760   ac_cv_func_gettimeofday=yes
18761 else
18762   echo "$as_me: failed program was:" >&5
18763 cat "conftest.$ac_ext" >&5
18764 ac_cv_func_gettimeofday=no
18765 fi
18766 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18767 fi
18768 echo "$as_me:18768: result: $ac_cv_func_gettimeofday" >&5
18769 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18770 if test "$ac_cv_func_gettimeofday" = yes; then
18771
18772 cat >>confdefs.h <<\EOF
18773 #define HAVE_GETTIMEOFDAY 1
18774 EOF
18775
18776 else
18777
18778 echo "$as_me:18778: checking for gettimeofday in -lbsd" >&5
18779 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18780 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18781   echo $ECHO_N "(cached) $ECHO_C" >&6
18782 else
18783   ac_check_lib_save_LIBS=$LIBS
18784 LIBS="-lbsd  $LIBS"
18785 cat >"conftest.$ac_ext" <<_ACEOF
18786 #line 18786 "configure"
18787 #include "confdefs.h"
18788
18789 /* Override any gcc2 internal prototype to avoid an error.  */
18790 #ifdef __cplusplus
18791 extern "C"
18792 #endif
18793 /* We use char because int might match the return type of a gcc2
18794    builtin and then its argument prototype would still apply.  */
18795 char gettimeofday ();
18796 int
18797 main (void)
18798 {
18799 gettimeofday ();
18800   ;
18801   return 0;
18802 }
18803 _ACEOF
18804 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18805 if { (eval echo "$as_me:18805: \"$ac_link\"") >&5
18806   (eval $ac_link) 2>&5
18807   ac_status=$?
18808   echo "$as_me:18808: \$? = $ac_status" >&5
18809   (exit "$ac_status"); } &&
18810          { ac_try='test -s "conftest$ac_exeext"'
18811   { (eval echo "$as_me:18811: \"$ac_try\"") >&5
18812   (eval $ac_try) 2>&5
18813   ac_status=$?
18814   echo "$as_me:18814: \$? = $ac_status" >&5
18815   (exit "$ac_status"); }; }; then
18816   ac_cv_lib_bsd_gettimeofday=yes
18817 else
18818   echo "$as_me: failed program was:" >&5
18819 cat "conftest.$ac_ext" >&5
18820 ac_cv_lib_bsd_gettimeofday=no
18821 fi
18822 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18823 LIBS=$ac_check_lib_save_LIBS
18824 fi
18825 echo "$as_me:18825: result: $ac_cv_lib_bsd_gettimeofday" >&5
18826 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18827 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18828
18829 cat >>confdefs.h <<\EOF
18830 #define HAVE_GETTIMEOFDAY 1
18831 EOF
18832
18833 cf_add_libs="$LIBS"
18834 # reverse order
18835 cf_add_0lib=
18836 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18837 # filter duplicates
18838 for cf_add_1lib in $cf_add_0lib; do
18839         for cf_add_2lib in $cf_add_libs; do
18840                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18841                         cf_add_1lib=
18842                         break
18843                 fi
18844         done
18845         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18846 done
18847 LIBS="$cf_add_libs"
18848
18849 fi
18850
18851 fi
18852         ;;
18853 esac
18854
18855 echo "$as_me:18855: checking if -lm needed for math functions" >&5
18856 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18857 if test "${cf_cv_need_libm+set}" = set; then
18858   echo $ECHO_N "(cached) $ECHO_C" >&6
18859 else
18860
18861         cat >"conftest.$ac_ext" <<_ACEOF
18862 #line 18862 "configure"
18863 #include "confdefs.h"
18864
18865         #include <stdio.h>
18866         #include <stdlib.h>
18867         #include <math.h>
18868
18869 int
18870 main (void)
18871 {
18872 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18873   ;
18874   return 0;
18875 }
18876 _ACEOF
18877 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18878 if { (eval echo "$as_me:18878: \"$ac_link\"") >&5
18879   (eval $ac_link) 2>&5
18880   ac_status=$?
18881   echo "$as_me:18881: \$? = $ac_status" >&5
18882   (exit "$ac_status"); } &&
18883          { ac_try='test -s "conftest$ac_exeext"'
18884   { (eval echo "$as_me:18884: \"$ac_try\"") >&5
18885   (eval $ac_try) 2>&5
18886   ac_status=$?
18887   echo "$as_me:18887: \$? = $ac_status" >&5
18888   (exit "$ac_status"); }; }; then
18889   cf_cv_need_libm=no
18890 else
18891   echo "$as_me: failed program was:" >&5
18892 cat "conftest.$ac_ext" >&5
18893 cf_cv_need_libm=yes
18894 fi
18895 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18896 fi
18897 echo "$as_me:18897: result: $cf_cv_need_libm" >&5
18898 echo "${ECHO_T}$cf_cv_need_libm" >&6
18899 if test "$cf_cv_need_libm" = yes
18900 then
18901 MATH_LIB=-lm
18902 fi
18903
18904 ###     Checks for header files.
18905 echo "$as_me:18905: checking for ANSI C header files" >&5
18906 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18907 if test "${ac_cv_header_stdc+set}" = set; then
18908   echo $ECHO_N "(cached) $ECHO_C" >&6
18909 else
18910   cat >"conftest.$ac_ext" <<_ACEOF
18911 #line 18911 "configure"
18912 #include "confdefs.h"
18913 #include <stdlib.h>
18914 #include <stdarg.h>
18915 #include <string.h>
18916 #include <float.h>
18917
18918 _ACEOF
18919 if { (eval echo "$as_me:18919: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18920   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18921   ac_status=$?
18922   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18923   rm -f conftest.er1
18924   cat conftest.err >&5
18925   echo "$as_me:18925: \$? = $ac_status" >&5
18926   (exit "$ac_status"); } >/dev/null; then
18927   if test -s conftest.err; then
18928     ac_cpp_err=$ac_c_preproc_warn_flag
18929   else
18930     ac_cpp_err=
18931   fi
18932 else
18933   ac_cpp_err=yes
18934 fi
18935 if test -z "$ac_cpp_err"; then
18936   ac_cv_header_stdc=yes
18937 else
18938   echo "$as_me: failed program was:" >&5
18939   cat "conftest.$ac_ext" >&5
18940   ac_cv_header_stdc=no
18941 fi
18942 rm -f conftest.err "conftest.$ac_ext"
18943
18944 if test $ac_cv_header_stdc = yes; then
18945   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18946   cat >"conftest.$ac_ext" <<_ACEOF
18947 #line 18947 "configure"
18948 #include "confdefs.h"
18949 #include <string.h>
18950
18951 _ACEOF
18952 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18953   $EGREP "memchr" >/dev/null 2>&1; then
18954   :
18955 else
18956   ac_cv_header_stdc=no
18957 fi
18958 rm -rf conftest*
18959
18960 fi
18961
18962 if test $ac_cv_header_stdc = yes; then
18963   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18964   cat >"conftest.$ac_ext" <<_ACEOF
18965 #line 18965 "configure"
18966 #include "confdefs.h"
18967 #include <stdlib.h>
18968
18969 _ACEOF
18970 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18971   $EGREP "free" >/dev/null 2>&1; then
18972   :
18973 else
18974   ac_cv_header_stdc=no
18975 fi
18976 rm -rf conftest*
18977
18978 fi
18979
18980 if test $ac_cv_header_stdc = yes; then
18981   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18982   if test "$cross_compiling" = yes; then
18983   :
18984 else
18985   cat >"conftest.$ac_ext" <<_ACEOF
18986 #line 18986 "configure"
18987 #include "confdefs.h"
18988 #include <ctype.h>
18989 #if ((' ' & 0x0FF) == 0x020)
18990 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18991 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18992 #else
18993 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18994                      || ('j' <= (c) && (c) <= 'r') \
18995                      || ('s' <= (c) && (c) <= 'z'))
18996 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18997 #endif
18998
18999 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
19000 int
19001 main (void)
19002 {
19003   int i;
19004   for (i = 0; i < 256; i++)
19005     if (XOR (islower (i), ISLOWER (i))
19006         || toupper (i) != TOUPPER (i))
19007       $ac_main_return(2);
19008   $ac_main_return (0);
19009 }
19010 _ACEOF
19011 rm -f "conftest$ac_exeext"
19012 if { (eval echo "$as_me:19012: \"$ac_link\"") >&5
19013   (eval $ac_link) 2>&5
19014   ac_status=$?
19015   echo "$as_me:19015: \$? = $ac_status" >&5
19016   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19017   { (eval echo "$as_me:19017: \"$ac_try\"") >&5
19018   (eval $ac_try) 2>&5
19019   ac_status=$?
19020   echo "$as_me:19020: \$? = $ac_status" >&5
19021   (exit "$ac_status"); }; }; then
19022   :
19023 else
19024   echo "$as_me: program exited with status $ac_status" >&5
19025 echo "$as_me: failed program was:" >&5
19026 cat "conftest.$ac_ext" >&5
19027 ac_cv_header_stdc=no
19028 fi
19029 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19030 fi
19031 fi
19032 fi
19033 echo "$as_me:19033: result: $ac_cv_header_stdc" >&5
19034 echo "${ECHO_T}$ac_cv_header_stdc" >&6
19035 if test $ac_cv_header_stdc = yes; then
19036
19037 cat >>confdefs.h <<\EOF
19038 #define STDC_HEADERS 1
19039 EOF
19040
19041 fi
19042
19043 ac_header_dirent=no
19044 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
19045   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
19046 echo "$as_me:19046: checking for $ac_hdr that defines DIR" >&5
19047 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
19048 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19049   echo $ECHO_N "(cached) $ECHO_C" >&6
19050 else
19051   cat >"conftest.$ac_ext" <<_ACEOF
19052 #line 19052 "configure"
19053 #include "confdefs.h"
19054 #include <sys/types.h>
19055 #include <$ac_hdr>
19056
19057 int
19058 main (void)
19059 {
19060 if ((DIR *) 0)
19061 return 0;
19062   ;
19063   return 0;
19064 }
19065 _ACEOF
19066 rm -f "conftest.$ac_objext"
19067 if { (eval echo "$as_me:19067: \"$ac_compile\"") >&5
19068   (eval $ac_compile) 2>&5
19069   ac_status=$?
19070   echo "$as_me:19070: \$? = $ac_status" >&5
19071   (exit "$ac_status"); } &&
19072          { ac_try='test -s "conftest.$ac_objext"'
19073   { (eval echo "$as_me:19073: \"$ac_try\"") >&5
19074   (eval $ac_try) 2>&5
19075   ac_status=$?
19076   echo "$as_me:19076: \$? = $ac_status" >&5
19077   (exit "$ac_status"); }; }; then
19078   eval "$as_ac_Header=yes"
19079 else
19080   echo "$as_me: failed program was:" >&5
19081 cat "conftest.$ac_ext" >&5
19082 eval "$as_ac_Header=no"
19083 fi
19084 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19085 fi
19086 echo "$as_me:19086: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19087 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19088 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19089   cat >>confdefs.h <<EOF
19090 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
19091 EOF
19092
19093 ac_header_dirent=$ac_hdr; break
19094 fi
19095
19096 done
19097 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
19098 if test $ac_header_dirent = dirent.h; then
19099   echo "$as_me:19099: checking for opendir in -ldir" >&5
19100 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
19101 if test "${ac_cv_lib_dir_opendir+set}" = set; then
19102   echo $ECHO_N "(cached) $ECHO_C" >&6
19103 else
19104   ac_check_lib_save_LIBS=$LIBS
19105 LIBS="-ldir  $LIBS"
19106 cat >"conftest.$ac_ext" <<_ACEOF
19107 #line 19107 "configure"
19108 #include "confdefs.h"
19109
19110 /* Override any gcc2 internal prototype to avoid an error.  */
19111 #ifdef __cplusplus
19112 extern "C"
19113 #endif
19114 /* We use char because int might match the return type of a gcc2
19115    builtin and then its argument prototype would still apply.  */
19116 char opendir ();
19117 int
19118 main (void)
19119 {
19120 opendir ();
19121   ;
19122   return 0;
19123 }
19124 _ACEOF
19125 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19126 if { (eval echo "$as_me:19126: \"$ac_link\"") >&5
19127   (eval $ac_link) 2>&5
19128   ac_status=$?
19129   echo "$as_me:19129: \$? = $ac_status" >&5
19130   (exit "$ac_status"); } &&
19131          { ac_try='test -s "conftest$ac_exeext"'
19132   { (eval echo "$as_me:19132: \"$ac_try\"") >&5
19133   (eval $ac_try) 2>&5
19134   ac_status=$?
19135   echo "$as_me:19135: \$? = $ac_status" >&5
19136   (exit "$ac_status"); }; }; then
19137   ac_cv_lib_dir_opendir=yes
19138 else
19139   echo "$as_me: failed program was:" >&5
19140 cat "conftest.$ac_ext" >&5
19141 ac_cv_lib_dir_opendir=no
19142 fi
19143 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19144 LIBS=$ac_check_lib_save_LIBS
19145 fi
19146 echo "$as_me:19146: result: $ac_cv_lib_dir_opendir" >&5
19147 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
19148 if test "$ac_cv_lib_dir_opendir" = yes; then
19149   LIBS="$LIBS -ldir"
19150 fi
19151
19152 else
19153   echo "$as_me:19153: checking for opendir in -lx" >&5
19154 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
19155 if test "${ac_cv_lib_x_opendir+set}" = set; then
19156   echo $ECHO_N "(cached) $ECHO_C" >&6
19157 else
19158   ac_check_lib_save_LIBS=$LIBS
19159 LIBS="-lx  $LIBS"
19160 cat >"conftest.$ac_ext" <<_ACEOF
19161 #line 19161 "configure"
19162 #include "confdefs.h"
19163
19164 /* Override any gcc2 internal prototype to avoid an error.  */
19165 #ifdef __cplusplus
19166 extern "C"
19167 #endif
19168 /* We use char because int might match the return type of a gcc2
19169    builtin and then its argument prototype would still apply.  */
19170 char opendir ();
19171 int
19172 main (void)
19173 {
19174 opendir ();
19175   ;
19176   return 0;
19177 }
19178 _ACEOF
19179 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19180 if { (eval echo "$as_me:19180: \"$ac_link\"") >&5
19181   (eval $ac_link) 2>&5
19182   ac_status=$?
19183   echo "$as_me:19183: \$? = $ac_status" >&5
19184   (exit "$ac_status"); } &&
19185          { ac_try='test -s "conftest$ac_exeext"'
19186   { (eval echo "$as_me:19186: \"$ac_try\"") >&5
19187   (eval $ac_try) 2>&5
19188   ac_status=$?
19189   echo "$as_me:19189: \$? = $ac_status" >&5
19190   (exit "$ac_status"); }; }; then
19191   ac_cv_lib_x_opendir=yes
19192 else
19193   echo "$as_me: failed program was:" >&5
19194 cat "conftest.$ac_ext" >&5
19195 ac_cv_lib_x_opendir=no
19196 fi
19197 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19198 LIBS=$ac_check_lib_save_LIBS
19199 fi
19200 echo "$as_me:19200: result: $ac_cv_lib_x_opendir" >&5
19201 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
19202 if test "$ac_cv_lib_x_opendir" = yes; then
19203   LIBS="$LIBS -lx"
19204 fi
19205
19206 fi
19207
19208 echo "$as_me:19208: checking whether time.h and sys/time.h may both be included" >&5
19209 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19210 if test "${ac_cv_header_time+set}" = set; then
19211   echo $ECHO_N "(cached) $ECHO_C" >&6
19212 else
19213   cat >"conftest.$ac_ext" <<_ACEOF
19214 #line 19214 "configure"
19215 #include "confdefs.h"
19216 #include <sys/types.h>
19217 #include <sys/time.h>
19218 #include <time.h>
19219
19220 int
19221 main (void)
19222 {
19223 if ((struct tm *) 0)
19224 return 0;
19225   ;
19226   return 0;
19227 }
19228 _ACEOF
19229 rm -f "conftest.$ac_objext"
19230 if { (eval echo "$as_me:19230: \"$ac_compile\"") >&5
19231   (eval $ac_compile) 2>&5
19232   ac_status=$?
19233   echo "$as_me:19233: \$? = $ac_status" >&5
19234   (exit "$ac_status"); } &&
19235          { ac_try='test -s "conftest.$ac_objext"'
19236   { (eval echo "$as_me:19236: \"$ac_try\"") >&5
19237   (eval $ac_try) 2>&5
19238   ac_status=$?
19239   echo "$as_me:19239: \$? = $ac_status" >&5
19240   (exit "$ac_status"); }; }; then
19241   ac_cv_header_time=yes
19242 else
19243   echo "$as_me: failed program was:" >&5
19244 cat "conftest.$ac_ext" >&5
19245 ac_cv_header_time=no
19246 fi
19247 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19248 fi
19249 echo "$as_me:19249: result: $ac_cv_header_time" >&5
19250 echo "${ECHO_T}$ac_cv_header_time" >&6
19251 if test $ac_cv_header_time = yes; then
19252
19253 cat >>confdefs.h <<\EOF
19254 #define TIME_WITH_SYS_TIME 1
19255 EOF
19256
19257 fi
19258
19259 cf_regex_func=no
19260 cf_regex_libs=
19261 case "$host_os" in
19262 (mingw*)
19263         # -lsystre -ltre -lintl -liconv
19264         echo "$as_me:19264: checking for regcomp in -lsystre" >&5
19265 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19266 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19267   echo $ECHO_N "(cached) $ECHO_C" >&6
19268 else
19269   ac_check_lib_save_LIBS=$LIBS
19270 LIBS="-lsystre  $LIBS"
19271 cat >"conftest.$ac_ext" <<_ACEOF
19272 #line 19272 "configure"
19273 #include "confdefs.h"
19274
19275 /* Override any gcc2 internal prototype to avoid an error.  */
19276 #ifdef __cplusplus
19277 extern "C"
19278 #endif
19279 /* We use char because int might match the return type of a gcc2
19280    builtin and then its argument prototype would still apply.  */
19281 char regcomp ();
19282 int
19283 main (void)
19284 {
19285 regcomp ();
19286   ;
19287   return 0;
19288 }
19289 _ACEOF
19290 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19291 if { (eval echo "$as_me:19291: \"$ac_link\"") >&5
19292   (eval $ac_link) 2>&5
19293   ac_status=$?
19294   echo "$as_me:19294: \$? = $ac_status" >&5
19295   (exit "$ac_status"); } &&
19296          { ac_try='test -s "conftest$ac_exeext"'
19297   { (eval echo "$as_me:19297: \"$ac_try\"") >&5
19298   (eval $ac_try) 2>&5
19299   ac_status=$?
19300   echo "$as_me:19300: \$? = $ac_status" >&5
19301   (exit "$ac_status"); }; }; then
19302   ac_cv_lib_systre_regcomp=yes
19303 else
19304   echo "$as_me: failed program was:" >&5
19305 cat "conftest.$ac_ext" >&5
19306 ac_cv_lib_systre_regcomp=no
19307 fi
19308 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19309 LIBS=$ac_check_lib_save_LIBS
19310 fi
19311 echo "$as_me:19311: result: $ac_cv_lib_systre_regcomp" >&5
19312 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19313 if test "$ac_cv_lib_systre_regcomp" = yes; then
19314
19315                 echo "$as_me:19315: checking for libiconv_open in -liconv" >&5
19316 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19317 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19318   echo $ECHO_N "(cached) $ECHO_C" >&6
19319 else
19320   ac_check_lib_save_LIBS=$LIBS
19321 LIBS="-liconv  $LIBS"
19322 cat >"conftest.$ac_ext" <<_ACEOF
19323 #line 19323 "configure"
19324 #include "confdefs.h"
19325
19326 /* Override any gcc2 internal prototype to avoid an error.  */
19327 #ifdef __cplusplus
19328 extern "C"
19329 #endif
19330 /* We use char because int might match the return type of a gcc2
19331    builtin and then its argument prototype would still apply.  */
19332 char libiconv_open ();
19333 int
19334 main (void)
19335 {
19336 libiconv_open ();
19337   ;
19338   return 0;
19339 }
19340 _ACEOF
19341 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19342 if { (eval echo "$as_me:19342: \"$ac_link\"") >&5
19343   (eval $ac_link) 2>&5
19344   ac_status=$?
19345   echo "$as_me:19345: \$? = $ac_status" >&5
19346   (exit "$ac_status"); } &&
19347          { ac_try='test -s "conftest$ac_exeext"'
19348   { (eval echo "$as_me:19348: \"$ac_try\"") >&5
19349   (eval $ac_try) 2>&5
19350   ac_status=$?
19351   echo "$as_me:19351: \$? = $ac_status" >&5
19352   (exit "$ac_status"); }; }; then
19353   ac_cv_lib_iconv_libiconv_open=yes
19354 else
19355   echo "$as_me: failed program was:" >&5
19356 cat "conftest.$ac_ext" >&5
19357 ac_cv_lib_iconv_libiconv_open=no
19358 fi
19359 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19360 LIBS=$ac_check_lib_save_LIBS
19361 fi
19362 echo "$as_me:19362: result: $ac_cv_lib_iconv_libiconv_open" >&5
19363 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19364 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19365
19366 cf_add_libs="$LIBS"
19367 # reverse order
19368 cf_add_0lib=
19369 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19370 # filter duplicates
19371 for cf_add_1lib in $cf_add_0lib; do
19372         for cf_add_2lib in $cf_add_libs; do
19373                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19374                         cf_add_1lib=
19375                         break
19376                 fi
19377         done
19378         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19379 done
19380 LIBS="$cf_add_libs"
19381
19382 fi
19383
19384                 echo "$as_me:19384: checking for libintl_gettext in -lintl" >&5
19385 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19386 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19387   echo $ECHO_N "(cached) $ECHO_C" >&6
19388 else
19389   ac_check_lib_save_LIBS=$LIBS
19390 LIBS="-lintl  $LIBS"
19391 cat >"conftest.$ac_ext" <<_ACEOF
19392 #line 19392 "configure"
19393 #include "confdefs.h"
19394
19395 /* Override any gcc2 internal prototype to avoid an error.  */
19396 #ifdef __cplusplus
19397 extern "C"
19398 #endif
19399 /* We use char because int might match the return type of a gcc2
19400    builtin and then its argument prototype would still apply.  */
19401 char libintl_gettext ();
19402 int
19403 main (void)
19404 {
19405 libintl_gettext ();
19406   ;
19407   return 0;
19408 }
19409 _ACEOF
19410 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19411 if { (eval echo "$as_me:19411: \"$ac_link\"") >&5
19412   (eval $ac_link) 2>&5
19413   ac_status=$?
19414   echo "$as_me:19414: \$? = $ac_status" >&5
19415   (exit "$ac_status"); } &&
19416          { ac_try='test -s "conftest$ac_exeext"'
19417   { (eval echo "$as_me:19417: \"$ac_try\"") >&5
19418   (eval $ac_try) 2>&5
19419   ac_status=$?
19420   echo "$as_me:19420: \$? = $ac_status" >&5
19421   (exit "$ac_status"); }; }; then
19422   ac_cv_lib_intl_libintl_gettext=yes
19423 else
19424   echo "$as_me: failed program was:" >&5
19425 cat "conftest.$ac_ext" >&5
19426 ac_cv_lib_intl_libintl_gettext=no
19427 fi
19428 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19429 LIBS=$ac_check_lib_save_LIBS
19430 fi
19431 echo "$as_me:19431: result: $ac_cv_lib_intl_libintl_gettext" >&5
19432 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19433 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19434
19435 cf_add_libs="$LIBS"
19436 # reverse order
19437 cf_add_0lib=
19438 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19439 # filter duplicates
19440 for cf_add_1lib in $cf_add_0lib; do
19441         for cf_add_2lib in $cf_add_libs; do
19442                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19443                         cf_add_1lib=
19444                         break
19445                 fi
19446         done
19447         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19448 done
19449 LIBS="$cf_add_libs"
19450
19451 fi
19452
19453                 echo "$as_me:19453: checking for tre_regcomp in -ltre" >&5
19454 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19455 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19456   echo $ECHO_N "(cached) $ECHO_C" >&6
19457 else
19458   ac_check_lib_save_LIBS=$LIBS
19459 LIBS="-ltre  $LIBS"
19460 cat >"conftest.$ac_ext" <<_ACEOF
19461 #line 19461 "configure"
19462 #include "confdefs.h"
19463
19464 /* Override any gcc2 internal prototype to avoid an error.  */
19465 #ifdef __cplusplus
19466 extern "C"
19467 #endif
19468 /* We use char because int might match the return type of a gcc2
19469    builtin and then its argument prototype would still apply.  */
19470 char tre_regcomp ();
19471 int
19472 main (void)
19473 {
19474 tre_regcomp ();
19475   ;
19476   return 0;
19477 }
19478 _ACEOF
19479 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19480 if { (eval echo "$as_me:19480: \"$ac_link\"") >&5
19481   (eval $ac_link) 2>&5
19482   ac_status=$?
19483   echo "$as_me:19483: \$? = $ac_status" >&5
19484   (exit "$ac_status"); } &&
19485          { ac_try='test -s "conftest$ac_exeext"'
19486   { (eval echo "$as_me:19486: \"$ac_try\"") >&5
19487   (eval $ac_try) 2>&5
19488   ac_status=$?
19489   echo "$as_me:19489: \$? = $ac_status" >&5
19490   (exit "$ac_status"); }; }; then
19491   ac_cv_lib_tre_tre_regcomp=yes
19492 else
19493   echo "$as_me: failed program was:" >&5
19494 cat "conftest.$ac_ext" >&5
19495 ac_cv_lib_tre_tre_regcomp=no
19496 fi
19497 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19498 LIBS=$ac_check_lib_save_LIBS
19499 fi
19500 echo "$as_me:19500: result: $ac_cv_lib_tre_tre_regcomp" >&5
19501 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19502 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19503
19504 cf_add_libs="$LIBS"
19505 # reverse order
19506 cf_add_0lib=
19507 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19508 # filter duplicates
19509 for cf_add_1lib in $cf_add_0lib; do
19510         for cf_add_2lib in $cf_add_libs; do
19511                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19512                         cf_add_1lib=
19513                         break
19514                 fi
19515         done
19516         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19517 done
19518 LIBS="$cf_add_libs"
19519
19520 fi
19521
19522 cf_add_libs="$LIBS"
19523 # reverse order
19524 cf_add_0lib=
19525 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19526 # filter duplicates
19527 for cf_add_1lib in $cf_add_0lib; do
19528         for cf_add_2lib in $cf_add_libs; do
19529                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19530                         cf_add_1lib=
19531                         break
19532                 fi
19533         done
19534         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19535 done
19536 LIBS="$cf_add_libs"
19537
19538                 cf_regex_func=regcomp
19539
19540 else
19541
19542                 echo "$as_me:19542: checking for regcomp in -lgnurx" >&5
19543 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19544 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19545   echo $ECHO_N "(cached) $ECHO_C" >&6
19546 else
19547   ac_check_lib_save_LIBS=$LIBS
19548 LIBS="-lgnurx  $LIBS"
19549 cat >"conftest.$ac_ext" <<_ACEOF
19550 #line 19550 "configure"
19551 #include "confdefs.h"
19552
19553 /* Override any gcc2 internal prototype to avoid an error.  */
19554 #ifdef __cplusplus
19555 extern "C"
19556 #endif
19557 /* We use char because int might match the return type of a gcc2
19558    builtin and then its argument prototype would still apply.  */
19559 char regcomp ();
19560 int
19561 main (void)
19562 {
19563 regcomp ();
19564   ;
19565   return 0;
19566 }
19567 _ACEOF
19568 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19569 if { (eval echo "$as_me:19569: \"$ac_link\"") >&5
19570   (eval $ac_link) 2>&5
19571   ac_status=$?
19572   echo "$as_me:19572: \$? = $ac_status" >&5
19573   (exit "$ac_status"); } &&
19574          { ac_try='test -s "conftest$ac_exeext"'
19575   { (eval echo "$as_me:19575: \"$ac_try\"") >&5
19576   (eval $ac_try) 2>&5
19577   ac_status=$?
19578   echo "$as_me:19578: \$? = $ac_status" >&5
19579   (exit "$ac_status"); }; }; then
19580   ac_cv_lib_gnurx_regcomp=yes
19581 else
19582   echo "$as_me: failed program was:" >&5
19583 cat "conftest.$ac_ext" >&5
19584 ac_cv_lib_gnurx_regcomp=no
19585 fi
19586 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19587 LIBS=$ac_check_lib_save_LIBS
19588 fi
19589 echo "$as_me:19589: result: $ac_cv_lib_gnurx_regcomp" >&5
19590 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19591 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19592
19593 cf_add_libs="$LIBS"
19594 # reverse order
19595 cf_add_0lib=
19596 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19597 # filter duplicates
19598 for cf_add_1lib in $cf_add_0lib; do
19599         for cf_add_2lib in $cf_add_libs; do
19600                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19601                         cf_add_1lib=
19602                         break
19603                 fi
19604         done
19605         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19606 done
19607 LIBS="$cf_add_libs"
19608
19609                         cf_regex_func=regcomp
19610 fi
19611
19612 fi
19613
19614         ;;
19615 (*)
19616         cf_regex_libs="regex re"
19617         echo "$as_me:19617: checking for regcomp" >&5
19618 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19619 if test "${ac_cv_func_regcomp+set}" = set; then
19620   echo $ECHO_N "(cached) $ECHO_C" >&6
19621 else
19622   cat >"conftest.$ac_ext" <<_ACEOF
19623 #line 19623 "configure"
19624 #include "confdefs.h"
19625 #define regcomp autoconf_temporary
19626 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19627 #undef regcomp
19628
19629 #ifdef __cplusplus
19630 extern "C"
19631 #endif
19632
19633 /* We use char because int might match the return type of a gcc2
19634    builtin and then its argument prototype would still apply.  */
19635 char regcomp (void);
19636
19637 int
19638 main (void)
19639 {
19640
19641 /* The GNU C library defines stubs for functions which it implements
19642     to always fail with ENOSYS.  Some functions are actually named
19643     something starting with __ and the normal name is an alias.  */
19644 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19645 #error found stub for regcomp
19646 #endif
19647
19648         return regcomp ();
19649   ;
19650   return 0;
19651 }
19652 _ACEOF
19653 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19654 if { (eval echo "$as_me:19654: \"$ac_link\"") >&5
19655   (eval $ac_link) 2>&5
19656   ac_status=$?
19657   echo "$as_me:19657: \$? = $ac_status" >&5
19658   (exit "$ac_status"); } &&
19659          { ac_try='test -s "conftest$ac_exeext"'
19660   { (eval echo "$as_me:19660: \"$ac_try\"") >&5
19661   (eval $ac_try) 2>&5
19662   ac_status=$?
19663   echo "$as_me:19663: \$? = $ac_status" >&5
19664   (exit "$ac_status"); }; }; then
19665   ac_cv_func_regcomp=yes
19666 else
19667   echo "$as_me: failed program was:" >&5
19668 cat "conftest.$ac_ext" >&5
19669 ac_cv_func_regcomp=no
19670 fi
19671 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19672 fi
19673 echo "$as_me:19673: result: $ac_cv_func_regcomp" >&5
19674 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19675 if test "$ac_cv_func_regcomp" = yes; then
19676   cf_regex_func=regcomp
19677 else
19678
19679                 for cf_regex_lib in $cf_regex_libs
19680                 do
19681                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19682 echo "$as_me:19682: checking for regcomp in -l$cf_regex_lib" >&5
19683 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19684 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19685   echo $ECHO_N "(cached) $ECHO_C" >&6
19686 else
19687   ac_check_lib_save_LIBS=$LIBS
19688 LIBS="-l$cf_regex_lib  $LIBS"
19689 cat >"conftest.$ac_ext" <<_ACEOF
19690 #line 19690 "configure"
19691 #include "confdefs.h"
19692
19693 /* Override any gcc2 internal prototype to avoid an error.  */
19694 #ifdef __cplusplus
19695 extern "C"
19696 #endif
19697 /* We use char because int might match the return type of a gcc2
19698    builtin and then its argument prototype would still apply.  */
19699 char regcomp ();
19700 int
19701 main (void)
19702 {
19703 regcomp ();
19704   ;
19705   return 0;
19706 }
19707 _ACEOF
19708 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19709 if { (eval echo "$as_me:19709: \"$ac_link\"") >&5
19710   (eval $ac_link) 2>&5
19711   ac_status=$?
19712   echo "$as_me:19712: \$? = $ac_status" >&5
19713   (exit "$ac_status"); } &&
19714          { ac_try='test -s "conftest$ac_exeext"'
19715   { (eval echo "$as_me:19715: \"$ac_try\"") >&5
19716   (eval $ac_try) 2>&5
19717   ac_status=$?
19718   echo "$as_me:19718: \$? = $ac_status" >&5
19719   (exit "$ac_status"); }; }; then
19720   eval "$as_ac_Lib=yes"
19721 else
19722   echo "$as_me: failed program was:" >&5
19723 cat "conftest.$ac_ext" >&5
19724 eval "$as_ac_Lib=no"
19725 fi
19726 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19727 LIBS=$ac_check_lib_save_LIBS
19728 fi
19729 echo "$as_me:19729: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19730 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19731 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19732
19733 cf_add_libs="$LIBS"
19734 # reverse order
19735 cf_add_0lib=
19736 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19737 # filter duplicates
19738 for cf_add_1lib in $cf_add_0lib; do
19739         for cf_add_2lib in $cf_add_libs; do
19740                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19741                         cf_add_1lib=
19742                         break
19743                 fi
19744         done
19745         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19746 done
19747 LIBS="$cf_add_libs"
19748
19749                                         cf_regex_func=regcomp
19750                                         break
19751 fi
19752
19753                 done
19754
19755 fi
19756
19757         ;;
19758 esac
19759
19760 if test "$cf_regex_func" = no ; then
19761         echo "$as_me:19761: checking for compile" >&5
19762 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19763 if test "${ac_cv_func_compile+set}" = set; then
19764   echo $ECHO_N "(cached) $ECHO_C" >&6
19765 else
19766   cat >"conftest.$ac_ext" <<_ACEOF
19767 #line 19767 "configure"
19768 #include "confdefs.h"
19769 #define compile autoconf_temporary
19770 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19771 #undef compile
19772
19773 #ifdef __cplusplus
19774 extern "C"
19775 #endif
19776
19777 /* We use char because int might match the return type of a gcc2
19778    builtin and then its argument prototype would still apply.  */
19779 char compile (void);
19780
19781 int
19782 main (void)
19783 {
19784
19785 /* The GNU C library defines stubs for functions which it implements
19786     to always fail with ENOSYS.  Some functions are actually named
19787     something starting with __ and the normal name is an alias.  */
19788 #if defined (__stub_compile) || defined (__stub___compile)
19789 #error found stub for compile
19790 #endif
19791
19792         return compile ();
19793   ;
19794   return 0;
19795 }
19796 _ACEOF
19797 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19798 if { (eval echo "$as_me:19798: \"$ac_link\"") >&5
19799   (eval $ac_link) 2>&5
19800   ac_status=$?
19801   echo "$as_me:19801: \$? = $ac_status" >&5
19802   (exit "$ac_status"); } &&
19803          { ac_try='test -s "conftest$ac_exeext"'
19804   { (eval echo "$as_me:19804: \"$ac_try\"") >&5
19805   (eval $ac_try) 2>&5
19806   ac_status=$?
19807   echo "$as_me:19807: \$? = $ac_status" >&5
19808   (exit "$ac_status"); }; }; then
19809   ac_cv_func_compile=yes
19810 else
19811   echo "$as_me: failed program was:" >&5
19812 cat "conftest.$ac_ext" >&5
19813 ac_cv_func_compile=no
19814 fi
19815 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19816 fi
19817 echo "$as_me:19817: result: $ac_cv_func_compile" >&5
19818 echo "${ECHO_T}$ac_cv_func_compile" >&6
19819 if test "$ac_cv_func_compile" = yes; then
19820   cf_regex_func=compile
19821 else
19822
19823                 echo "$as_me:19823: checking for compile in -lgen" >&5
19824 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19825 if test "${ac_cv_lib_gen_compile+set}" = set; then
19826   echo $ECHO_N "(cached) $ECHO_C" >&6
19827 else
19828   ac_check_lib_save_LIBS=$LIBS
19829 LIBS="-lgen  $LIBS"
19830 cat >"conftest.$ac_ext" <<_ACEOF
19831 #line 19831 "configure"
19832 #include "confdefs.h"
19833
19834 /* Override any gcc2 internal prototype to avoid an error.  */
19835 #ifdef __cplusplus
19836 extern "C"
19837 #endif
19838 /* We use char because int might match the return type of a gcc2
19839    builtin and then its argument prototype would still apply.  */
19840 char compile ();
19841 int
19842 main (void)
19843 {
19844 compile ();
19845   ;
19846   return 0;
19847 }
19848 _ACEOF
19849 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19850 if { (eval echo "$as_me:19850: \"$ac_link\"") >&5
19851   (eval $ac_link) 2>&5
19852   ac_status=$?
19853   echo "$as_me:19853: \$? = $ac_status" >&5
19854   (exit "$ac_status"); } &&
19855          { ac_try='test -s "conftest$ac_exeext"'
19856   { (eval echo "$as_me:19856: \"$ac_try\"") >&5
19857   (eval $ac_try) 2>&5
19858   ac_status=$?
19859   echo "$as_me:19859: \$? = $ac_status" >&5
19860   (exit "$ac_status"); }; }; then
19861   ac_cv_lib_gen_compile=yes
19862 else
19863   echo "$as_me: failed program was:" >&5
19864 cat "conftest.$ac_ext" >&5
19865 ac_cv_lib_gen_compile=no
19866 fi
19867 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19868 LIBS=$ac_check_lib_save_LIBS
19869 fi
19870 echo "$as_me:19870: result: $ac_cv_lib_gen_compile" >&5
19871 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19872 if test "$ac_cv_lib_gen_compile" = yes; then
19873
19874 cf_add_libs="$LIBS"
19875 # reverse order
19876 cf_add_0lib=
19877 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19878 # filter duplicates
19879 for cf_add_1lib in $cf_add_0lib; do
19880         for cf_add_2lib in $cf_add_libs; do
19881                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19882                         cf_add_1lib=
19883                         break
19884                 fi
19885         done
19886         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19887 done
19888 LIBS="$cf_add_libs"
19889
19890                                 cf_regex_func=compile
19891 fi
19892
19893 fi
19894
19895 fi
19896
19897 if test "$cf_regex_func" = no ; then
19898         { echo "$as_me:19898: WARNING: cannot find regular expression library" >&5
19899 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19900 fi
19901
19902 echo "$as_me:19902: checking for regular-expression headers" >&5
19903 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19904 if test "${cf_cv_regex_hdrs+set}" = set; then
19905   echo $ECHO_N "(cached) $ECHO_C" >&6
19906 else
19907
19908 cf_cv_regex_hdrs=no
19909 case "$cf_regex_func" in
19910 (compile)
19911         for cf_regex_hdr in regexp.h regexpr.h
19912         do
19913                 cat >"conftest.$ac_ext" <<_ACEOF
19914 #line 19914 "configure"
19915 #include "confdefs.h"
19916 #include <$cf_regex_hdr>
19917 int
19918 main (void)
19919 {
19920
19921                         char *p = compile("", "", "", 0);
19922                         int x = step("", "");
19923                         (void)p;
19924                         (void)x;
19925
19926   ;
19927   return 0;
19928 }
19929 _ACEOF
19930 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19931 if { (eval echo "$as_me:19931: \"$ac_link\"") >&5
19932   (eval $ac_link) 2>&5
19933   ac_status=$?
19934   echo "$as_me:19934: \$? = $ac_status" >&5
19935   (exit "$ac_status"); } &&
19936          { ac_try='test -s "conftest$ac_exeext"'
19937   { (eval echo "$as_me:19937: \"$ac_try\"") >&5
19938   (eval $ac_try) 2>&5
19939   ac_status=$?
19940   echo "$as_me:19940: \$? = $ac_status" >&5
19941   (exit "$ac_status"); }; }; then
19942
19943                         cf_cv_regex_hdrs=$cf_regex_hdr
19944                         break
19945
19946 else
19947   echo "$as_me: failed program was:" >&5
19948 cat "conftest.$ac_ext" >&5
19949 fi
19950 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19951         done
19952         ;;
19953 (*)
19954         for cf_regex_hdr in regex.h
19955         do
19956                 cat >"conftest.$ac_ext" <<_ACEOF
19957 #line 19957 "configure"
19958 #include "confdefs.h"
19959 #include <sys/types.h>
19960 #include <$cf_regex_hdr>
19961 int
19962 main (void)
19963 {
19964
19965                         regex_t *p = 0;
19966                         int x = regcomp(p, "", 0);
19967                         int y = regexec(p, "", 0, 0, 0);
19968                         (void)x;
19969                         (void)y;
19970                         regfree(p);
19971
19972   ;
19973   return 0;
19974 }
19975 _ACEOF
19976 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19977 if { (eval echo "$as_me:19977: \"$ac_link\"") >&5
19978   (eval $ac_link) 2>&5
19979   ac_status=$?
19980   echo "$as_me:19980: \$? = $ac_status" >&5
19981   (exit "$ac_status"); } &&
19982          { ac_try='test -s "conftest$ac_exeext"'
19983   { (eval echo "$as_me:19983: \"$ac_try\"") >&5
19984   (eval $ac_try) 2>&5
19985   ac_status=$?
19986   echo "$as_me:19986: \$? = $ac_status" >&5
19987   (exit "$ac_status"); }; }; then
19988
19989                         cf_cv_regex_hdrs=$cf_regex_hdr
19990                         break
19991
19992 else
19993   echo "$as_me: failed program was:" >&5
19994 cat "conftest.$ac_ext" >&5
19995 fi
19996 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19997         done
19998         ;;
19999 esac
20000
20001 fi
20002 echo "$as_me:20002: result: $cf_cv_regex_hdrs" >&5
20003 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20004
20005 case "$cf_cv_regex_hdrs" in
20006         (no)            { echo "$as_me:20006: WARNING: no regular expression header found" >&5
20007 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20008         (regex.h)
20009 cat >>confdefs.h <<\EOF
20010 #define HAVE_REGEX_H_FUNCS 1
20011 EOF
20012  ;;
20013         (regexp.h)
20014 cat >>confdefs.h <<\EOF
20015 #define HAVE_REGEXP_H_FUNCS 1
20016 EOF
20017  ;;
20018         (regexpr.h)
20019 cat >>confdefs.h <<\EOF
20020 #define HAVE_REGEXPR_H_FUNCS 1
20021 EOF
20022  ;;
20023 esac
20024
20025 for ac_header in \
20026 fcntl.h \
20027 getopt.h \
20028 limits.h \
20029 locale.h \
20030 math.h \
20031 poll.h \
20032 sys/ioctl.h \
20033 sys/param.h \
20034 sys/poll.h \
20035 sys/select.h \
20036 sys/time.h \
20037 sys/times.h \
20038 ttyent.h \
20039 unistd.h \
20040 wctype.h \
20041
20042 do
20043 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20044 echo "$as_me:20044: checking for $ac_header" >&5
20045 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20046 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20047   echo $ECHO_N "(cached) $ECHO_C" >&6
20048 else
20049   cat >"conftest.$ac_ext" <<_ACEOF
20050 #line 20050 "configure"
20051 #include "confdefs.h"
20052 #include <$ac_header>
20053 _ACEOF
20054 if { (eval echo "$as_me:20054: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20055   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20056   ac_status=$?
20057   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20058   rm -f conftest.er1
20059   cat conftest.err >&5
20060   echo "$as_me:20060: \$? = $ac_status" >&5
20061   (exit "$ac_status"); } >/dev/null; then
20062   if test -s conftest.err; then
20063     ac_cpp_err=$ac_c_preproc_warn_flag
20064   else
20065     ac_cpp_err=
20066   fi
20067 else
20068   ac_cpp_err=yes
20069 fi
20070 if test -z "$ac_cpp_err"; then
20071   eval "$as_ac_Header=yes"
20072 else
20073   echo "$as_me: failed program was:" >&5
20074   cat "conftest.$ac_ext" >&5
20075   eval "$as_ac_Header=no"
20076 fi
20077 rm -f conftest.err "conftest.$ac_ext"
20078 fi
20079 echo "$as_me:20079: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20080 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20081 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20082   cat >>confdefs.h <<EOF
20083 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20084 EOF
20085
20086 fi
20087 done
20088
20089 for ac_header in unistd.h getopt.h
20090 do
20091 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20092 echo "$as_me:20092: checking for $ac_header" >&5
20093 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20094 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20095   echo $ECHO_N "(cached) $ECHO_C" >&6
20096 else
20097   cat >"conftest.$ac_ext" <<_ACEOF
20098 #line 20098 "configure"
20099 #include "confdefs.h"
20100 #include <$ac_header>
20101 _ACEOF
20102 if { (eval echo "$as_me:20102: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20103   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20104   ac_status=$?
20105   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20106   rm -f conftest.er1
20107   cat conftest.err >&5
20108   echo "$as_me:20108: \$? = $ac_status" >&5
20109   (exit "$ac_status"); } >/dev/null; then
20110   if test -s conftest.err; then
20111     ac_cpp_err=$ac_c_preproc_warn_flag
20112   else
20113     ac_cpp_err=
20114   fi
20115 else
20116   ac_cpp_err=yes
20117 fi
20118 if test -z "$ac_cpp_err"; then
20119   eval "$as_ac_Header=yes"
20120 else
20121   echo "$as_me: failed program was:" >&5
20122   cat "conftest.$ac_ext" >&5
20123   eval "$as_ac_Header=no"
20124 fi
20125 rm -f conftest.err "conftest.$ac_ext"
20126 fi
20127 echo "$as_me:20127: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20128 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20129 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20130   cat >>confdefs.h <<EOF
20131 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20132 EOF
20133
20134 fi
20135 done
20136
20137 echo "$as_me:20137: checking for header declaring getopt variables" >&5
20138 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20139 if test "${cf_cv_getopt_header+set}" = set; then
20140   echo $ECHO_N "(cached) $ECHO_C" >&6
20141 else
20142
20143 cf_cv_getopt_header=none
20144 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20145 do
20146 cat >"conftest.$ac_ext" <<_ACEOF
20147 #line 20147 "configure"
20148 #include "confdefs.h"
20149
20150 #include <$cf_header>
20151 int
20152 main (void)
20153 {
20154 int x = optind; char *y = optarg; (void)x; (void)y
20155   ;
20156   return 0;
20157 }
20158 _ACEOF
20159 rm -f "conftest.$ac_objext"
20160 if { (eval echo "$as_me:20160: \"$ac_compile\"") >&5
20161   (eval $ac_compile) 2>&5
20162   ac_status=$?
20163   echo "$as_me:20163: \$? = $ac_status" >&5
20164   (exit "$ac_status"); } &&
20165          { ac_try='test -s "conftest.$ac_objext"'
20166   { (eval echo "$as_me:20166: \"$ac_try\"") >&5
20167   (eval $ac_try) 2>&5
20168   ac_status=$?
20169   echo "$as_me:20169: \$? = $ac_status" >&5
20170   (exit "$ac_status"); }; }; then
20171   cf_cv_getopt_header=$cf_header
20172  break
20173 else
20174   echo "$as_me: failed program was:" >&5
20175 cat "conftest.$ac_ext" >&5
20176 fi
20177 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20178 done
20179
20180 fi
20181 echo "$as_me:20181: result: $cf_cv_getopt_header" >&5
20182 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20183 if test "$cf_cv_getopt_header" != none ; then
20184
20185 cat >>confdefs.h <<\EOF
20186 #define HAVE_GETOPT_HEADER 1
20187 EOF
20188
20189 fi
20190 if test "$cf_cv_getopt_header" = getopt.h ; then
20191
20192 cat >>confdefs.h <<\EOF
20193 #define NEED_GETOPT_H 1
20194 EOF
20195
20196 fi
20197
20198 echo "$as_me:20198: checking if external environ is declared" >&5
20199 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20200 if test "${cf_cv_dcl_environ+set}" = set; then
20201   echo $ECHO_N "(cached) $ECHO_C" >&6
20202 else
20203
20204     cat >"conftest.$ac_ext" <<_ACEOF
20205 #line 20205 "configure"
20206 #include "confdefs.h"
20207
20208 #ifdef HAVE_STDLIB_H
20209 #include <stdlib.h>
20210 #endif
20211 #include <unistd.h>
20212 int
20213 main (void)
20214 {
20215 int x = (int) environ
20216   ;
20217   return 0;
20218 }
20219 _ACEOF
20220 rm -f "conftest.$ac_objext"
20221 if { (eval echo "$as_me:20221: \"$ac_compile\"") >&5
20222   (eval $ac_compile) 2>&5
20223   ac_status=$?
20224   echo "$as_me:20224: \$? = $ac_status" >&5
20225   (exit "$ac_status"); } &&
20226          { ac_try='test -s "conftest.$ac_objext"'
20227   { (eval echo "$as_me:20227: \"$ac_try\"") >&5
20228   (eval $ac_try) 2>&5
20229   ac_status=$?
20230   echo "$as_me:20230: \$? = $ac_status" >&5
20231   (exit "$ac_status"); }; }; then
20232   cf_cv_dcl_environ=yes
20233 else
20234   echo "$as_me: failed program was:" >&5
20235 cat "conftest.$ac_ext" >&5
20236 cf_cv_dcl_environ=no
20237 fi
20238 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20239
20240 fi
20241 echo "$as_me:20241: result: $cf_cv_dcl_environ" >&5
20242 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20243
20244 if test "$cf_cv_dcl_environ" = no ; then
20245
20246 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20247
20248     cat >>confdefs.h <<EOF
20249 #define $cf_result 1
20250 EOF
20251
20252 fi
20253
20254 # It's possible (for near-UNIX clones) that the data doesn't exist
20255
20256 echo "$as_me:20256: checking if external environ exists" >&5
20257 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20258 if test "${cf_cv_have_environ+set}" = set; then
20259   echo $ECHO_N "(cached) $ECHO_C" >&6
20260 else
20261
20262         cat >"conftest.$ac_ext" <<_ACEOF
20263 #line 20263 "configure"
20264 #include "confdefs.h"
20265
20266 #undef environ
20267 extern int environ;
20268
20269 int
20270 main (void)
20271 {
20272 environ = 2
20273   ;
20274   return 0;
20275 }
20276 _ACEOF
20277 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20278 if { (eval echo "$as_me:20278: \"$ac_link\"") >&5
20279   (eval $ac_link) 2>&5
20280   ac_status=$?
20281   echo "$as_me:20281: \$? = $ac_status" >&5
20282   (exit "$ac_status"); } &&
20283          { ac_try='test -s "conftest$ac_exeext"'
20284   { (eval echo "$as_me:20284: \"$ac_try\"") >&5
20285   (eval $ac_try) 2>&5
20286   ac_status=$?
20287   echo "$as_me:20287: \$? = $ac_status" >&5
20288   (exit "$ac_status"); }; }; then
20289   cf_cv_have_environ=yes
20290 else
20291   echo "$as_me: failed program was:" >&5
20292 cat "conftest.$ac_ext" >&5
20293 cf_cv_have_environ=no
20294 fi
20295 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20296
20297 fi
20298 echo "$as_me:20298: result: $cf_cv_have_environ" >&5
20299 echo "${ECHO_T}$cf_cv_have_environ" >&6
20300
20301 if test "$cf_cv_have_environ" = yes ; then
20302
20303 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20304
20305         cat >>confdefs.h <<EOF
20306 #define $cf_result 1
20307 EOF
20308
20309 fi
20310
20311 echo "$as_me:20311: checking for getenv" >&5
20312 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20313 if test "${ac_cv_func_getenv+set}" = set; then
20314   echo $ECHO_N "(cached) $ECHO_C" >&6
20315 else
20316   cat >"conftest.$ac_ext" <<_ACEOF
20317 #line 20317 "configure"
20318 #include "confdefs.h"
20319 #define getenv autoconf_temporary
20320 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20321 #undef getenv
20322
20323 #ifdef __cplusplus
20324 extern "C"
20325 #endif
20326
20327 /* We use char because int might match the return type of a gcc2
20328    builtin and then its argument prototype would still apply.  */
20329 char getenv (void);
20330
20331 int
20332 main (void)
20333 {
20334
20335 /* The GNU C library defines stubs for functions which it implements
20336     to always fail with ENOSYS.  Some functions are actually named
20337     something starting with __ and the normal name is an alias.  */
20338 #if defined (__stub_getenv) || defined (__stub___getenv)
20339 #error found stub for getenv
20340 #endif
20341
20342         return getenv ();
20343   ;
20344   return 0;
20345 }
20346 _ACEOF
20347 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20348 if { (eval echo "$as_me:20348: \"$ac_link\"") >&5
20349   (eval $ac_link) 2>&5
20350   ac_status=$?
20351   echo "$as_me:20351: \$? = $ac_status" >&5
20352   (exit "$ac_status"); } &&
20353          { ac_try='test -s "conftest$ac_exeext"'
20354   { (eval echo "$as_me:20354: \"$ac_try\"") >&5
20355   (eval $ac_try) 2>&5
20356   ac_status=$?
20357   echo "$as_me:20357: \$? = $ac_status" >&5
20358   (exit "$ac_status"); }; }; then
20359   ac_cv_func_getenv=yes
20360 else
20361   echo "$as_me: failed program was:" >&5
20362 cat "conftest.$ac_ext" >&5
20363 ac_cv_func_getenv=no
20364 fi
20365 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20366 fi
20367 echo "$as_me:20367: result: $ac_cv_func_getenv" >&5
20368 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20369
20370 for ac_func in putenv setenv strdup
20371 do
20372 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20373 echo "$as_me:20373: checking for $ac_func" >&5
20374 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20375 if eval "test \"\${$as_ac_var+set}\" = set"; then
20376   echo $ECHO_N "(cached) $ECHO_C" >&6
20377 else
20378   cat >"conftest.$ac_ext" <<_ACEOF
20379 #line 20379 "configure"
20380 #include "confdefs.h"
20381 #define $ac_func autoconf_temporary
20382 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20383 #undef $ac_func
20384
20385 #ifdef __cplusplus
20386 extern "C"
20387 #endif
20388
20389 /* We use char because int might match the return type of a gcc2
20390    builtin and then its argument prototype would still apply.  */
20391 char $ac_func (void);
20392
20393 int
20394 main (void)
20395 {
20396
20397 /* The GNU C library defines stubs for functions which it implements
20398     to always fail with ENOSYS.  Some functions are actually named
20399     something starting with __ and the normal name is an alias.  */
20400 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20401 #error found stub for $ac_func
20402 #endif
20403
20404         return $ac_func ();
20405   ;
20406   return 0;
20407 }
20408 _ACEOF
20409 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20410 if { (eval echo "$as_me:20410: \"$ac_link\"") >&5
20411   (eval $ac_link) 2>&5
20412   ac_status=$?
20413   echo "$as_me:20413: \$? = $ac_status" >&5
20414   (exit "$ac_status"); } &&
20415          { ac_try='test -s "conftest$ac_exeext"'
20416   { (eval echo "$as_me:20416: \"$ac_try\"") >&5
20417   (eval $ac_try) 2>&5
20418   ac_status=$?
20419   echo "$as_me:20419: \$? = $ac_status" >&5
20420   (exit "$ac_status"); }; }; then
20421   eval "$as_ac_var=yes"
20422 else
20423   echo "$as_me: failed program was:" >&5
20424 cat "conftest.$ac_ext" >&5
20425 eval "$as_ac_var=no"
20426 fi
20427 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20428 fi
20429 echo "$as_me:20429: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20430 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20431 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20432   cat >>confdefs.h <<EOF
20433 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20434 EOF
20435
20436 fi
20437 done
20438
20439 echo "$as_me:20439: checking if getenv returns consistent values" >&5
20440 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20441 if test "${cf_cv_consistent_getenv+set}" = set; then
20442   echo $ECHO_N "(cached) $ECHO_C" >&6
20443 else
20444
20445 if test "$cross_compiling" = yes; then
20446   cf_cv_consistent_getenv=unknown
20447 else
20448   cat >"conftest.$ac_ext" <<_ACEOF
20449 #line 20449 "configure"
20450 #include "confdefs.h"
20451
20452 #include <stdlib.h>
20453 #include <unistd.h>
20454 #include <stdio.h>
20455 #include <string.h>
20456 #include <sys/types.h>
20457
20458 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20459 extern char **environ;  /* POSIX, but some systems are not... */
20460 #endif
20461
20462 #if defined(HAVE_STRDUP)
20463 #define str_alloc(s) strdup(s)
20464 #else
20465 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20466 #endif
20467
20468 static void set_value(const char *name, const char *value)
20469 {
20470 #if defined(HAVE_SETENV)
20471         setenv(name, value, 1);
20472 #elif defined(HAVE_PUTENV)
20473         char buffer[1024];
20474         sprintf(buffer, "%s=%s", name, value);
20475         putenv(str_alloc(buffer));
20476 #else
20477 #error neither putenv/setenv found
20478 #endif
20479 }
20480 int main(void)
20481 {
20482         int pass;
20483         size_t numenv, limit, j;
20484         char **mynames;
20485         char **myvalues;
20486         char **mypointer;
20487         char *equals;
20488         for (numenv = 0; environ[numenv]; ++numenv) ;
20489         limit = numenv + 10;
20490         mynames = (char **) calloc(limit + 1, sizeof(char *));
20491         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20492         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20493 #if defined(HAVE_ENVIRON)
20494         for (j = 0; environ[j]; ++j) {
20495                 mynames[j] = str_alloc(environ[j]);
20496                 equals = strchr(mynames[j], '=');
20497                 if (equals != 0) {
20498                         *equals++ = '\\0';
20499                         myvalues[j] = str_alloc(equals);
20500                 } else {
20501                         myvalues[j] = str_alloc("");
20502                 }
20503         }
20504 #endif
20505         for (j = numenv; j < limit; ++j) {
20506                 char name[80];
20507                 char value[80];
20508                 size_t found;
20509                 size_t k = 0;
20510                 do {
20511                         size_t jk;
20512                         found = 0;
20513                         sprintf(name, "TERM%lu", (unsigned long) k);
20514                         for (jk = 0; jk < j; ++jk) {
20515                                 if (!strcmp(name, mynames[jk])) {
20516                                         found = 1;
20517                                         ++k;
20518                                         break;
20519                                 }
20520                         }
20521                 } while (found);
20522                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20523                 set_value(name, value);
20524                 mynames[j] = str_alloc(name);
20525                 myvalues[j] = str_alloc(value);
20526         }
20527         for (pass = 0; pass < 3; ++pass) {
20528                 for (j = 0; j < limit; ++j) {
20529                         char *value = getenv(mynames[j]);
20530                         if (pass) {
20531                                 if (value == 0) {
20532                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20533                                         ${cf_cv_main_return:-return}(1);
20534                                 } else if (value != mypointer[j]) {
20535                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20536                                         ${cf_cv_main_return:-return}(1);
20537                                 } else if (strcmp(value, myvalues[j])) {
20538                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20539                                         ${cf_cv_main_return:-return}(1);
20540                                 }
20541                         } else {
20542                                 size_t k;
20543                                 mypointer[j] = value;
20544                                 for (k = 0; k < j; ++k) {
20545                                         if (mypointer[j] == mypointer[k]) {
20546                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20547                                                 ${cf_cv_main_return:-return}(1);
20548                                         }
20549                                 }
20550                         }
20551                 }
20552         }
20553         ${cf_cv_main_return:-return}(0);
20554 }
20555
20556 _ACEOF
20557 rm -f "conftest$ac_exeext"
20558 if { (eval echo "$as_me:20558: \"$ac_link\"") >&5
20559   (eval $ac_link) 2>&5
20560   ac_status=$?
20561   echo "$as_me:20561: \$? = $ac_status" >&5
20562   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20563   { (eval echo "$as_me:20563: \"$ac_try\"") >&5
20564   (eval $ac_try) 2>&5
20565   ac_status=$?
20566   echo "$as_me:20566: \$? = $ac_status" >&5
20567   (exit "$ac_status"); }; }; then
20568   cf_cv_consistent_getenv=yes
20569 else
20570   echo "$as_me: program exited with status $ac_status" >&5
20571 echo "$as_me: failed program was:" >&5
20572 cat "conftest.$ac_ext" >&5
20573 cf_cv_consistent_getenv=no
20574 fi
20575 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20576 fi
20577
20578 fi
20579 echo "$as_me:20579: result: $cf_cv_consistent_getenv" >&5
20580 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20581
20582 if test "x$cf_cv_consistent_getenv" = xno
20583 then
20584
20585 cat >>confdefs.h <<\EOF
20586 #define HAVE_CONSISTENT_GETENV 1
20587 EOF
20588
20589 fi
20590
20591 if test "x$cf_cv_consistent_getenv" = xno && \
20592         test "x$cf_with_trace" = xyes
20593 then
20594         { echo "$as_me:20594: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20595 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20596 fi
20597
20598 echo "$as_me:20598: checking if sys/time.h works with sys/select.h" >&5
20599 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20600 if test "${cf_cv_sys_time_select+set}" = set; then
20601   echo $ECHO_N "(cached) $ECHO_C" >&6
20602 else
20603
20604 cat >"conftest.$ac_ext" <<_ACEOF
20605 #line 20605 "configure"
20606 #include "confdefs.h"
20607
20608 #include <sys/types.h>
20609 #ifdef HAVE_SYS_TIME_H
20610 #include <sys/time.h>
20611 #endif
20612 #ifdef HAVE_SYS_SELECT_H
20613 #include <sys/select.h>
20614 #endif
20615
20616 int
20617 main (void)
20618 {
20619
20620   ;
20621   return 0;
20622 }
20623 _ACEOF
20624 rm -f "conftest.$ac_objext"
20625 if { (eval echo "$as_me:20625: \"$ac_compile\"") >&5
20626   (eval $ac_compile) 2>&5
20627   ac_status=$?
20628   echo "$as_me:20628: \$? = $ac_status" >&5
20629   (exit "$ac_status"); } &&
20630          { ac_try='test -s "conftest.$ac_objext"'
20631   { (eval echo "$as_me:20631: \"$ac_try\"") >&5
20632   (eval $ac_try) 2>&5
20633   ac_status=$?
20634   echo "$as_me:20634: \$? = $ac_status" >&5
20635   (exit "$ac_status"); }; }; then
20636   cf_cv_sys_time_select=yes
20637 else
20638   echo "$as_me: failed program was:" >&5
20639 cat "conftest.$ac_ext" >&5
20640 cf_cv_sys_time_select=no
20641 fi
20642 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20643
20644 fi
20645
20646 echo "$as_me:20646: result: $cf_cv_sys_time_select" >&5
20647 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20648 test "$cf_cv_sys_time_select" = yes &&
20649 cat >>confdefs.h <<\EOF
20650 #define HAVE_SYS_TIME_SELECT 1
20651 EOF
20652
20653 ###     checks for compiler characteristics
20654 ac_ext=c
20655 ac_cpp='$CPP $CPPFLAGS'
20656 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20657 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20658 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20659 ac_main_return="return"
20660
20661 echo "$as_me:20661: checking for an ANSI C-conforming const" >&5
20662 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20663 if test "${ac_cv_c_const+set}" = set; then
20664   echo $ECHO_N "(cached) $ECHO_C" >&6
20665 else
20666   cat >"conftest.$ac_ext" <<_ACEOF
20667 #line 20667 "configure"
20668 #include "confdefs.h"
20669
20670 int
20671 main (void)
20672 {
20673 /* FIXME: Include the comments suggested by Paul. */
20674 #ifndef __cplusplus
20675   /* Ultrix mips cc rejects this.  */
20676   typedef int charset[2];
20677   const charset x;
20678   /* SunOS 4.1.1 cc rejects this.  */
20679   char const *const *ccp;
20680   char **p;
20681   /* NEC SVR4.0.2 mips cc rejects this.  */
20682   struct point {int x, y;};
20683   static struct point const zero = {0,0};
20684   /* AIX XL C 1.02.0.0 rejects this.
20685      It does not let you subtract one const X* pointer from another in
20686      an arm of an if-expression whose if-part is not a constant
20687      expression */
20688   const char *g = "string";
20689   ccp = &g + (g ? g-g : 0);
20690   /* HPUX 7.0 cc rejects these. */
20691   ++ccp;
20692   p = (char**) ccp;
20693   ccp = (char const *const *) p;
20694   { /* SCO 3.2v4 cc rejects this.  */
20695     char *t;
20696     char const *s = 0 ? (char *) 0 : (char const *) 0;
20697
20698     *t++ = 0;
20699   }
20700   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20701     int x[] = {25, 17};
20702     const int *foo = &x[0];
20703     ++foo;
20704   }
20705   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20706     typedef const int *iptr;
20707     iptr p = 0;
20708     ++p;
20709   }
20710   { /* AIX XL C 1.02.0.0 rejects this saying
20711        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20712     struct s { int j; const int *ap[3]; };
20713     struct s *b; b->j = 5;
20714   }
20715   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20716     const int foo = 10;
20717   }
20718 #endif
20719
20720   ;
20721   return 0;
20722 }
20723 _ACEOF
20724 rm -f "conftest.$ac_objext"
20725 if { (eval echo "$as_me:20725: \"$ac_compile\"") >&5
20726   (eval $ac_compile) 2>&5
20727   ac_status=$?
20728   echo "$as_me:20728: \$? = $ac_status" >&5
20729   (exit "$ac_status"); } &&
20730          { ac_try='test -s "conftest.$ac_objext"'
20731   { (eval echo "$as_me:20731: \"$ac_try\"") >&5
20732   (eval $ac_try) 2>&5
20733   ac_status=$?
20734   echo "$as_me:20734: \$? = $ac_status" >&5
20735   (exit "$ac_status"); }; }; then
20736   ac_cv_c_const=yes
20737 else
20738   echo "$as_me: failed program was:" >&5
20739 cat "conftest.$ac_ext" >&5
20740 ac_cv_c_const=no
20741 fi
20742 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20743 fi
20744 echo "$as_me:20744: result: $ac_cv_c_const" >&5
20745 echo "${ECHO_T}$ac_cv_c_const" >&6
20746 if test $ac_cv_c_const = no; then
20747
20748 cat >>confdefs.h <<\EOF
20749 #define const
20750 EOF
20751
20752 fi
20753
20754 echo "$as_me:20754: checking for inline" >&5
20755 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20756 if test "${ac_cv_c_inline+set}" = set; then
20757   echo $ECHO_N "(cached) $ECHO_C" >&6
20758 else
20759   ac_cv_c_inline=no
20760 for ac_kw in inline __inline__ __inline; do
20761   cat >"conftest.$ac_ext" <<_ACEOF
20762 #line 20762 "configure"
20763 #include "confdefs.h"
20764 #ifndef __cplusplus
20765 static $ac_kw int static_foo () {return 0; }
20766 $ac_kw int foo () {return 0; }
20767 #endif
20768
20769 _ACEOF
20770 rm -f "conftest.$ac_objext"
20771 if { (eval echo "$as_me:20771: \"$ac_compile\"") >&5
20772   (eval $ac_compile) 2>&5
20773   ac_status=$?
20774   echo "$as_me:20774: \$? = $ac_status" >&5
20775   (exit "$ac_status"); } &&
20776          { ac_try='test -s "conftest.$ac_objext"'
20777   { (eval echo "$as_me:20777: \"$ac_try\"") >&5
20778   (eval $ac_try) 2>&5
20779   ac_status=$?
20780   echo "$as_me:20780: \$? = $ac_status" >&5
20781   (exit "$ac_status"); }; }; then
20782   ac_cv_c_inline=$ac_kw; break
20783 else
20784   echo "$as_me: failed program was:" >&5
20785 cat "conftest.$ac_ext" >&5
20786 fi
20787 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20788 done
20789
20790 fi
20791 echo "$as_me:20791: result: $ac_cv_c_inline" >&5
20792 echo "${ECHO_T}$ac_cv_c_inline" >&6
20793 case $ac_cv_c_inline in
20794   inline | yes) ;;
20795   no)
20796 cat >>confdefs.h <<\EOF
20797 #define inline
20798 EOF
20799  ;;
20800   *)  cat >>confdefs.h <<EOF
20801 #define inline $ac_cv_c_inline
20802 EOF
20803  ;;
20804 esac
20805
20806 NCURSES_INLINE=
20807 if test "$ac_cv_c_inline" != no ; then
20808         NCURSES_INLINE=inline
20809         if test "$INTEL_COMPILER" = yes
20810         then
20811                 :
20812         elif test "$CLANG_COMPILER" = yes
20813         then
20814                 :
20815         elif test "$GCC" = yes
20816         then
20817                 echo "$as_me:20817: checking if $CC supports options to tune inlining" >&5
20818 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20819 if test "${cf_cv_gcc_inline+set}" = set; then
20820   echo $ECHO_N "(cached) $ECHO_C" >&6
20821 else
20822
20823                 cf_save_CFLAGS=$CFLAGS
20824                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20825                 cat >"conftest.$ac_ext" <<_ACEOF
20826 #line 20826 "configure"
20827 #include "confdefs.h"
20828 inline int foo(void) { return 1; }
20829 int
20830 main (void)
20831 {
20832 ${cf_cv_main_return:-return} foo()
20833   ;
20834   return 0;
20835 }
20836 _ACEOF
20837 rm -f "conftest.$ac_objext"
20838 if { (eval echo "$as_me:20838: \"$ac_compile\"") >&5
20839   (eval $ac_compile) 2>&5
20840   ac_status=$?
20841   echo "$as_me:20841: \$? = $ac_status" >&5
20842   (exit "$ac_status"); } &&
20843          { ac_try='test -s "conftest.$ac_objext"'
20844   { (eval echo "$as_me:20844: \"$ac_try\"") >&5
20845   (eval $ac_try) 2>&5
20846   ac_status=$?
20847   echo "$as_me:20847: \$? = $ac_status" >&5
20848   (exit "$ac_status"); }; }; then
20849   cf_cv_gcc_inline=yes
20850 else
20851   echo "$as_me: failed program was:" >&5
20852 cat "conftest.$ac_ext" >&5
20853 cf_cv_gcc_inline=no
20854 fi
20855 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20856                 CFLAGS=$cf_save_CFLAGS
20857
20858 fi
20859 echo "$as_me:20859: result: $cf_cv_gcc_inline" >&5
20860 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20861                 if test "$cf_cv_gcc_inline" = yes ; then
20862
20863 cf_fix_cppflags=no
20864 cf_new_cflags=
20865 cf_new_cppflags=
20866 cf_new_extra_cppflags=
20867
20868 for cf_add_cflags in --param max-inline-insns-single=1200
20869 do
20870 case "$cf_fix_cppflags" in
20871 (no)
20872         case "$cf_add_cflags" in
20873         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20874                 case "$cf_add_cflags" in
20875                 (-D*)
20876                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20877
20878                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20879                                 && test -z "${cf_tst_cflags}" \
20880                                 && cf_fix_cppflags=yes
20881
20882                         if test "$cf_fix_cppflags" = yes ; then
20883
20884         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20885         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20886
20887                                 continue
20888                         elif test "${cf_tst_cflags}" = "\"'" ; then
20889
20890         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20891         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20892
20893                                 continue
20894                         fi
20895                         ;;
20896                 esac
20897                 case "$CPPFLAGS" in
20898                 (*$cf_add_cflags)
20899                         ;;
20900                 (*)
20901                         case "$cf_add_cflags" in
20902                         (-D*)
20903                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20904
20905 CPPFLAGS=`echo "$CPPFLAGS" | \
20906         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20907                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20908
20909                                 ;;
20910                         esac
20911
20912         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20913         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20914
20915                         ;;
20916                 esac
20917                 ;;
20918         (*)
20919
20920         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20921         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20922
20923                 ;;
20924         esac
20925         ;;
20926 (yes)
20927
20928         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20929         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20930
20931         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20932
20933         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20934                 && test -z "${cf_tst_cflags}" \
20935                 && cf_fix_cppflags=no
20936         ;;
20937 esac
20938 done
20939
20940 if test -n "$cf_new_cflags" ; then
20941
20942         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20943         CFLAGS="${CFLAGS}$cf_new_cflags"
20944
20945 fi
20946
20947 if test -n "$cf_new_cppflags" ; then
20948
20949         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20950         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20951
20952 fi
20953
20954 if test -n "$cf_new_extra_cppflags" ; then
20955
20956         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20957         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20958
20959 fi
20960
20961                 fi
20962         fi
20963 fi
20964
20965 echo "$as_me:20965: checking for signal global datatype" >&5
20966 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20967 if test "${cf_cv_sig_atomic_t+set}" = set; then
20968   echo $ECHO_N "(cached) $ECHO_C" >&6
20969 else
20970
20971         for cf_type in \
20972                 "volatile sig_atomic_t" \
20973                 "sig_atomic_t" \
20974                 "int"
20975         do
20976         cat >"conftest.$ac_ext" <<_ACEOF
20977 #line 20977 "configure"
20978 #include "confdefs.h"
20979
20980 #include <sys/types.h>
20981 #include <signal.h>
20982 #include <stdio.h>
20983
20984 extern $cf_type x;
20985 $cf_type x;
20986 static void handler(int sig)
20987 {
20988         (void)sig;
20989         x = 5;
20990 }
20991 int
20992 main (void)
20993 {
20994 signal(SIGINT, handler);
20995                  x = 1
20996   ;
20997   return 0;
20998 }
20999 _ACEOF
21000 rm -f "conftest.$ac_objext"
21001 if { (eval echo "$as_me:21001: \"$ac_compile\"") >&5
21002   (eval $ac_compile) 2>&5
21003   ac_status=$?
21004   echo "$as_me:21004: \$? = $ac_status" >&5
21005   (exit "$ac_status"); } &&
21006          { ac_try='test -s "conftest.$ac_objext"'
21007   { (eval echo "$as_me:21007: \"$ac_try\"") >&5
21008   (eval $ac_try) 2>&5
21009   ac_status=$?
21010   echo "$as_me:21010: \$? = $ac_status" >&5
21011   (exit "$ac_status"); }; }; then
21012   cf_cv_sig_atomic_t=$cf_type
21013 else
21014   echo "$as_me: failed program was:" >&5
21015 cat "conftest.$ac_ext" >&5
21016 cf_cv_sig_atomic_t=no
21017 fi
21018 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21019                 test "$cf_cv_sig_atomic_t" != no && break
21020         done
21021
21022 fi
21023
21024 echo "$as_me:21024: result: $cf_cv_sig_atomic_t" >&5
21025 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21026 test "$cf_cv_sig_atomic_t" != no &&
21027 cat >>confdefs.h <<EOF
21028 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21029 EOF
21030
21031 if test "$NCURSES_CHTYPE" = auto ; then
21032
21033 echo "$as_me:21033: checking for type of chtype" >&5
21034 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21035 if test "${cf_cv_typeof_chtype+set}" = set; then
21036   echo $ECHO_N "(cached) $ECHO_C" >&6
21037 else
21038
21039                 if test "$cross_compiling" = yes; then
21040   cf_cv_typeof_chtype=long
21041 else
21042   cat >"conftest.$ac_ext" <<_ACEOF
21043 #line 21043 "configure"
21044 #include "confdefs.h"
21045
21046 #define WANT_BITS 31
21047 #include <stdio.h>
21048 int main(void)
21049 {
21050         FILE *fp = fopen("cf_test.out", "w");
21051         if (fp != 0) {
21052                 char *result = "long";
21053                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21054                         int n;
21055                         unsigned int x, y;
21056                         for (n = 0; n < WANT_BITS; n++) {
21057                                 x = (1 << n);
21058                                 y = (x >> n);
21059                                 if (y != 1 || x == 0) {
21060                                         x = 0;
21061                                         break;
21062                                 }
21063                         }
21064                         /*
21065                          * If x is nonzero, an int is big enough for the bits
21066                          * that we want.
21067                          */
21068                         result = (x != 0) ? "int" : "long";
21069                 }
21070                 fputs(result, fp);
21071                 fclose(fp);
21072         }
21073         ${cf_cv_main_return:-return}(0);
21074 }
21075
21076 _ACEOF
21077 rm -f "conftest$ac_exeext"
21078 if { (eval echo "$as_me:21078: \"$ac_link\"") >&5
21079   (eval $ac_link) 2>&5
21080   ac_status=$?
21081   echo "$as_me:21081: \$? = $ac_status" >&5
21082   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21083   { (eval echo "$as_me:21083: \"$ac_try\"") >&5
21084   (eval $ac_try) 2>&5
21085   ac_status=$?
21086   echo "$as_me:21086: \$? = $ac_status" >&5
21087   (exit "$ac_status"); }; }; then
21088   cf_cv_typeof_chtype=`cat cf_test.out`
21089 else
21090   echo "$as_me: program exited with status $ac_status" >&5
21091 echo "$as_me: failed program was:" >&5
21092 cat "conftest.$ac_ext" >&5
21093 cf_cv_typeof_chtype=long
21094 fi
21095 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21096 fi
21097                 rm -f cf_test.out
21098
21099 fi
21100
21101 echo "$as_me:21101: result: $cf_cv_typeof_chtype" >&5
21102 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21103
21104 cat >>confdefs.h <<EOF
21105 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21106 EOF
21107
21108 else
21109         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21110 fi
21111 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21112
21113 echo "$as_me:21113: checking if unsigned literals are legal" >&5
21114 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21115 if test "${cf_cv_unsigned_literals+set}" = set; then
21116   echo $ECHO_N "(cached) $ECHO_C" >&6
21117 else
21118
21119         cat >"conftest.$ac_ext" <<_ACEOF
21120 #line 21120 "configure"
21121 #include "confdefs.h"
21122
21123 int
21124 main (void)
21125 {
21126 long x = 1L + 1UL + 1U + 1
21127   ;
21128   return 0;
21129 }
21130 _ACEOF
21131 rm -f "conftest.$ac_objext"
21132 if { (eval echo "$as_me:21132: \"$ac_compile\"") >&5
21133   (eval $ac_compile) 2>&5
21134   ac_status=$?
21135   echo "$as_me:21135: \$? = $ac_status" >&5
21136   (exit "$ac_status"); } &&
21137          { ac_try='test -s "conftest.$ac_objext"'
21138   { (eval echo "$as_me:21138: \"$ac_try\"") >&5
21139   (eval $ac_try) 2>&5
21140   ac_status=$?
21141   echo "$as_me:21141: \$? = $ac_status" >&5
21142   (exit "$ac_status"); }; }; then
21143   cf_cv_unsigned_literals=yes
21144 else
21145   echo "$as_me: failed program was:" >&5
21146 cat "conftest.$ac_ext" >&5
21147 cf_cv_unsigned_literals=no
21148 fi
21149 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21150
21151 fi
21152
21153 echo "$as_me:21153: result: $cf_cv_unsigned_literals" >&5
21154 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21155
21156 cf_cv_1UL="1"
21157 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21158 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21159
21160 if test "$NCURSES_MMASK_T" = auto ; then
21161         cf_cv_typeof_mmask_t=long
21162 else
21163         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21164 fi
21165 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21166
21167 ###     Checks for external-data
21168
21169 echo "$as_me:21169: checking if external errno is declared" >&5
21170 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21171 if test "${cf_cv_dcl_errno+set}" = set; then
21172   echo $ECHO_N "(cached) $ECHO_C" >&6
21173 else
21174
21175         cat >"conftest.$ac_ext" <<_ACEOF
21176 #line 21176 "configure"
21177 #include "confdefs.h"
21178
21179 #ifdef HAVE_STDLIB_H
21180 #include <stdlib.h>
21181 #endif
21182 #include <stdio.h>
21183 #include <sys/types.h>
21184 #include <errno.h>
21185 int
21186 main (void)
21187 {
21188 int x = (int) errno; (void)x
21189   ;
21190   return 0;
21191 }
21192 _ACEOF
21193 rm -f "conftest.$ac_objext"
21194 if { (eval echo "$as_me:21194: \"$ac_compile\"") >&5
21195   (eval $ac_compile) 2>&5
21196   ac_status=$?
21197   echo "$as_me:21197: \$? = $ac_status" >&5
21198   (exit "$ac_status"); } &&
21199          { ac_try='test -s "conftest.$ac_objext"'
21200   { (eval echo "$as_me:21200: \"$ac_try\"") >&5
21201   (eval $ac_try) 2>&5
21202   ac_status=$?
21203   echo "$as_me:21203: \$? = $ac_status" >&5
21204   (exit "$ac_status"); }; }; then
21205   cf_cv_dcl_errno=yes
21206 else
21207   echo "$as_me: failed program was:" >&5
21208 cat "conftest.$ac_ext" >&5
21209 cf_cv_dcl_errno=no
21210 fi
21211 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21212
21213 fi
21214 echo "$as_me:21214: result: $cf_cv_dcl_errno" >&5
21215 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21216
21217 if test "$cf_cv_dcl_errno" = no ; then
21218
21219 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21220
21221         cat >>confdefs.h <<EOF
21222 #define $cf_result 1
21223 EOF
21224
21225 fi
21226
21227 # It's possible (for near-UNIX clones) that the data doesn't exist
21228
21229 echo "$as_me:21229: checking if external errno exists" >&5
21230 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21231 if test "${cf_cv_have_errno+set}" = set; then
21232   echo $ECHO_N "(cached) $ECHO_C" >&6
21233 else
21234
21235         cat >"conftest.$ac_ext" <<_ACEOF
21236 #line 21236 "configure"
21237 #include "confdefs.h"
21238
21239 #undef errno
21240 extern int errno;
21241
21242 int
21243 main (void)
21244 {
21245 errno = 2
21246   ;
21247   return 0;
21248 }
21249 _ACEOF
21250 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21251 if { (eval echo "$as_me:21251: \"$ac_link\"") >&5
21252   (eval $ac_link) 2>&5
21253   ac_status=$?
21254   echo "$as_me:21254: \$? = $ac_status" >&5
21255   (exit "$ac_status"); } &&
21256          { ac_try='test -s "conftest$ac_exeext"'
21257   { (eval echo "$as_me:21257: \"$ac_try\"") >&5
21258   (eval $ac_try) 2>&5
21259   ac_status=$?
21260   echo "$as_me:21260: \$? = $ac_status" >&5
21261   (exit "$ac_status"); }; }; then
21262   cf_cv_have_errno=yes
21263 else
21264   echo "$as_me: failed program was:" >&5
21265 cat "conftest.$ac_ext" >&5
21266 cf_cv_have_errno=no
21267 fi
21268 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21269
21270 fi
21271 echo "$as_me:21271: result: $cf_cv_have_errno" >&5
21272 echo "${ECHO_T}$cf_cv_have_errno" >&6
21273
21274 if test "$cf_cv_have_errno" = yes ; then
21275
21276 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21277
21278         cat >>confdefs.h <<EOF
21279 #define $cf_result 1
21280 EOF
21281
21282 fi
21283
21284 echo "$as_me:21284: checking if data-only library module links" >&5
21285 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21286 if test "${cf_cv_link_dataonly+set}" = set; then
21287   echo $ECHO_N "(cached) $ECHO_C" >&6
21288 else
21289
21290         rm -f conftest.a
21291         cat >conftest.$ac_ext <<EOF
21292 #line 21292 "configure"
21293 int     testdata[3] = { 123, 456, 789 };
21294 EOF
21295         if { (eval echo "$as_me:21295: \"$ac_compile\"") >&5
21296   (eval $ac_compile) 2>&5
21297   ac_status=$?
21298   echo "$as_me:21298: \$? = $ac_status" >&5
21299   (exit "$ac_status"); } ; then
21300                 mv conftest.o data.o && \
21301                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21302         fi
21303         rm -f conftest.$ac_ext data.o
21304         cat >conftest.$ac_ext <<EOF
21305 #line 21305 "configure"
21306 int     testfunc(void)
21307 {
21308 #if defined(NeXT)
21309         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21310 #else
21311         extern int testdata[3];
21312         return testdata[0] == 123
21313            &&  testdata[1] == 456
21314            &&  testdata[2] == 789;
21315 #endif
21316 }
21317 EOF
21318         if { (eval echo "$as_me:21318: \"$ac_compile\"") >&5
21319   (eval $ac_compile) 2>&5
21320   ac_status=$?
21321   echo "$as_me:21321: \$? = $ac_status" >&5
21322   (exit "$ac_status"); }; then
21323                 mv conftest.o func.o && \
21324                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21325         fi
21326         rm -f conftest.$ac_ext func.o
21327         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21328         cf_saveLIBS="$LIBS"
21329         LIBS="conftest.a $LIBS"
21330         if test "$cross_compiling" = yes; then
21331   cf_cv_link_dataonly=unknown
21332 else
21333   cat >"conftest.$ac_ext" <<_ACEOF
21334 #line 21334 "configure"
21335 #include "confdefs.h"
21336
21337         int main(void)
21338         {
21339                 extern int testfunc();
21340                 ${cf_cv_main_return:-return} (!testfunc());
21341         }
21342
21343 _ACEOF
21344 rm -f "conftest$ac_exeext"
21345 if { (eval echo "$as_me:21345: \"$ac_link\"") >&5
21346   (eval $ac_link) 2>&5
21347   ac_status=$?
21348   echo "$as_me:21348: \$? = $ac_status" >&5
21349   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21350   { (eval echo "$as_me:21350: \"$ac_try\"") >&5
21351   (eval $ac_try) 2>&5
21352   ac_status=$?
21353   echo "$as_me:21353: \$? = $ac_status" >&5
21354   (exit "$ac_status"); }; }; then
21355   cf_cv_link_dataonly=yes
21356 else
21357   echo "$as_me: program exited with status $ac_status" >&5
21358 echo "$as_me: failed program was:" >&5
21359 cat "conftest.$ac_ext" >&5
21360 cf_cv_link_dataonly=no
21361 fi
21362 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21363 fi
21364         LIBS="$cf_saveLIBS"
21365
21366 fi
21367
21368 echo "$as_me:21368: result: $cf_cv_link_dataonly" >&5
21369 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21370
21371 if test "$cf_cv_link_dataonly" = no ; then
21372
21373 cat >>confdefs.h <<\EOF
21374 #define BROKEN_LINKER 1
21375 EOF
21376
21377         BROKEN_LINKER=1
21378 fi
21379
21380 ###     Checks for library functions.
21381
21382 for ac_func in \
21383 getcwd \
21384 getegid \
21385 geteuid \
21386 getopt \
21387 getttynam \
21388 issetugid \
21389 localeconv \
21390 poll \
21391 putenv \
21392 remove \
21393 select \
21394 setbuf \
21395 setbuffer \
21396 setenv \
21397 setfsuid \
21398 setvbuf \
21399 sigaction \
21400 sigvec \
21401 snprintf \
21402 strdup \
21403 strstr \
21404 sysconf \
21405 tcgetpgrp \
21406 times \
21407 tsearch \
21408 vsnprintf \
21409
21410 do
21411 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21412 echo "$as_me:21412: checking for $ac_func" >&5
21413 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21414 if eval "test \"\${$as_ac_var+set}\" = set"; then
21415   echo $ECHO_N "(cached) $ECHO_C" >&6
21416 else
21417   cat >"conftest.$ac_ext" <<_ACEOF
21418 #line 21418 "configure"
21419 #include "confdefs.h"
21420 #define $ac_func autoconf_temporary
21421 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21422 #undef $ac_func
21423
21424 #ifdef __cplusplus
21425 extern "C"
21426 #endif
21427
21428 /* We use char because int might match the return type of a gcc2
21429    builtin and then its argument prototype would still apply.  */
21430 char $ac_func (void);
21431
21432 int
21433 main (void)
21434 {
21435
21436 /* The GNU C library defines stubs for functions which it implements
21437     to always fail with ENOSYS.  Some functions are actually named
21438     something starting with __ and the normal name is an alias.  */
21439 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21440 #error found stub for $ac_func
21441 #endif
21442
21443         return $ac_func ();
21444   ;
21445   return 0;
21446 }
21447 _ACEOF
21448 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21449 if { (eval echo "$as_me:21449: \"$ac_link\"") >&5
21450   (eval $ac_link) 2>&5
21451   ac_status=$?
21452   echo "$as_me:21452: \$? = $ac_status" >&5
21453   (exit "$ac_status"); } &&
21454          { ac_try='test -s "conftest$ac_exeext"'
21455   { (eval echo "$as_me:21455: \"$ac_try\"") >&5
21456   (eval $ac_try) 2>&5
21457   ac_status=$?
21458   echo "$as_me:21458: \$? = $ac_status" >&5
21459   (exit "$ac_status"); }; }; then
21460   eval "$as_ac_var=yes"
21461 else
21462   echo "$as_me: failed program was:" >&5
21463 cat "conftest.$ac_ext" >&5
21464 eval "$as_ac_var=no"
21465 fi
21466 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21467 fi
21468 echo "$as_me:21468: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21469 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21470 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21471   cat >>confdefs.h <<EOF
21472 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21473 EOF
21474
21475 fi
21476 done
21477
21478 if test "x$ac_cv_func_getopt" = xno && \
21479    test "x$cf_with_progs$cf_with_tests" != xnono; then
21480         { { echo "$as_me:21480: error: getopt is required for building programs" >&5
21481 echo "$as_me: error: getopt is required for building programs" >&2;}
21482    { (exit 1); exit 1; }; }
21483 fi
21484
21485 if test "x$with_safe_sprintf" = xyes
21486 then
21487         if test "x$ac_cv_func_vsnprintf" = xyes
21488         then
21489                 { echo "$as_me:21489: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21490 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21491         else
21492
21493 cat >>confdefs.h <<\EOF
21494 #define USE_SAFE_SPRINTF 1
21495 EOF
21496
21497         fi
21498 fi
21499
21500 if test "x$with_getcap" = "xyes" ; then
21501
21502 echo "$as_me:21502: checking for terminal-capability database functions" >&5
21503 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21504 if test "${cf_cv_cgetent+set}" = set; then
21505   echo $ECHO_N "(cached) $ECHO_C" >&6
21506 else
21507
21508 cat >"conftest.$ac_ext" <<_ACEOF
21509 #line 21509 "configure"
21510 #include "confdefs.h"
21511
21512 #include <stdlib.h>
21513 int
21514 main (void)
21515 {
21516
21517         char temp[128];
21518         char *buf = temp;
21519         char *db_array = temp;
21520         cgetent(&buf, &db_array, "vt100");
21521         cgetcap(buf, "tc", '=');
21522         cgetmatch(buf, "tc");
21523
21524   ;
21525   return 0;
21526 }
21527 _ACEOF
21528 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21529 if { (eval echo "$as_me:21529: \"$ac_link\"") >&5
21530   (eval $ac_link) 2>&5
21531   ac_status=$?
21532   echo "$as_me:21532: \$? = $ac_status" >&5
21533   (exit "$ac_status"); } &&
21534          { ac_try='test -s "conftest$ac_exeext"'
21535   { (eval echo "$as_me:21535: \"$ac_try\"") >&5
21536   (eval $ac_try) 2>&5
21537   ac_status=$?
21538   echo "$as_me:21538: \$? = $ac_status" >&5
21539   (exit "$ac_status"); }; }; then
21540   cf_cv_cgetent=yes
21541 else
21542   echo "$as_me: failed program was:" >&5
21543 cat "conftest.$ac_ext" >&5
21544 cf_cv_cgetent=no
21545 fi
21546 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21547
21548 fi
21549 echo "$as_me:21549: result: $cf_cv_cgetent" >&5
21550 echo "${ECHO_T}$cf_cv_cgetent" >&6
21551
21552 if test "$cf_cv_cgetent" = yes
21553 then
21554
21555 cat >>confdefs.h <<\EOF
21556 #define HAVE_BSD_CGETENT 1
21557 EOF
21558
21559 echo "$as_me:21559: checking if cgetent uses const parameter" >&5
21560 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21561 if test "${cf_cv_cgetent_const+set}" = set; then
21562   echo $ECHO_N "(cached) $ECHO_C" >&6
21563 else
21564
21565 cat >"conftest.$ac_ext" <<_ACEOF
21566 #line 21566 "configure"
21567 #include "confdefs.h"
21568
21569 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21570 #include <stdlib.h>
21571 int
21572 main (void)
21573 {
21574
21575         char temp[128];
21576         char *buf = temp;
21577 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21578         const char *db_array = temp;
21579         cgetent(&buf, &db_array, "vt100");
21580 #endif
21581         cgetcap(buf, "tc", '=');
21582         cgetmatch(buf, "tc");
21583
21584   ;
21585   return 0;
21586 }
21587 _ACEOF
21588 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21589 if { (eval echo "$as_me:21589: \"$ac_link\"") >&5
21590   (eval $ac_link) 2>&5
21591   ac_status=$?
21592   echo "$as_me:21592: \$? = $ac_status" >&5
21593   (exit "$ac_status"); } &&
21594          { ac_try='test -s "conftest$ac_exeext"'
21595   { (eval echo "$as_me:21595: \"$ac_try\"") >&5
21596   (eval $ac_try) 2>&5
21597   ac_status=$?
21598   echo "$as_me:21598: \$? = $ac_status" >&5
21599   (exit "$ac_status"); }; }; then
21600   cf_cv_cgetent_const=yes
21601 else
21602   echo "$as_me: failed program was:" >&5
21603 cat "conftest.$ac_ext" >&5
21604 cf_cv_cgetent_const=no
21605 fi
21606 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21607
21608 fi
21609 echo "$as_me:21609: result: $cf_cv_cgetent_const" >&5
21610 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21611         if test "$cf_cv_cgetent_const" = yes
21612         then
21613
21614 cat >>confdefs.h <<EOF
21615 #define CGETENT_CONST const
21616 EOF
21617
21618         fi
21619 fi
21620
21621 fi
21622
21623 echo "$as_me:21623: checking for isascii" >&5
21624 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21625 if test "${cf_cv_have_isascii+set}" = set; then
21626   echo $ECHO_N "(cached) $ECHO_C" >&6
21627 else
21628
21629         cat >"conftest.$ac_ext" <<_ACEOF
21630 #line 21630 "configure"
21631 #include "confdefs.h"
21632 #include <ctype.h>
21633 int
21634 main (void)
21635 {
21636 int x = isascii(' ')
21637   ;
21638   return 0;
21639 }
21640 _ACEOF
21641 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21642 if { (eval echo "$as_me:21642: \"$ac_link\"") >&5
21643   (eval $ac_link) 2>&5
21644   ac_status=$?
21645   echo "$as_me:21645: \$? = $ac_status" >&5
21646   (exit "$ac_status"); } &&
21647          { ac_try='test -s "conftest$ac_exeext"'
21648   { (eval echo "$as_me:21648: \"$ac_try\"") >&5
21649   (eval $ac_try) 2>&5
21650   ac_status=$?
21651   echo "$as_me:21651: \$? = $ac_status" >&5
21652   (exit "$ac_status"); }; }; then
21653   cf_cv_have_isascii=yes
21654 else
21655   echo "$as_me: failed program was:" >&5
21656 cat "conftest.$ac_ext" >&5
21657 cf_cv_have_isascii=no
21658 fi
21659 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21660
21661 fi
21662 echo "$as_me:21662: result: $cf_cv_have_isascii" >&5
21663 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21664 test "$cf_cv_have_isascii" = yes &&
21665 cat >>confdefs.h <<\EOF
21666 #define HAVE_ISASCII 1
21667 EOF
21668
21669 if test "$ac_cv_func_sigaction" = yes; then
21670 echo "$as_me:21670: checking whether sigaction needs _POSIX_SOURCE" >&5
21671 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21672 cat >"conftest.$ac_ext" <<_ACEOF
21673 #line 21673 "configure"
21674 #include "confdefs.h"
21675
21676 #include <sys/types.h>
21677 #include <signal.h>
21678 int
21679 main (void)
21680 {
21681 struct sigaction act
21682   ;
21683   return 0;
21684 }
21685 _ACEOF
21686 rm -f "conftest.$ac_objext"
21687 if { (eval echo "$as_me:21687: \"$ac_compile\"") >&5
21688   (eval $ac_compile) 2>&5
21689   ac_status=$?
21690   echo "$as_me:21690: \$? = $ac_status" >&5
21691   (exit "$ac_status"); } &&
21692          { ac_try='test -s "conftest.$ac_objext"'
21693   { (eval echo "$as_me:21693: \"$ac_try\"") >&5
21694   (eval $ac_try) 2>&5
21695   ac_status=$?
21696   echo "$as_me:21696: \$? = $ac_status" >&5
21697   (exit "$ac_status"); }; }; then
21698   sigact_bad=no
21699 else
21700   echo "$as_me: failed program was:" >&5
21701 cat "conftest.$ac_ext" >&5
21702
21703 cat >"conftest.$ac_ext" <<_ACEOF
21704 #line 21704 "configure"
21705 #include "confdefs.h"
21706
21707 #define _POSIX_SOURCE
21708 #include <sys/types.h>
21709 #include <signal.h>
21710 int
21711 main (void)
21712 {
21713 struct sigaction act
21714   ;
21715   return 0;
21716 }
21717 _ACEOF
21718 rm -f "conftest.$ac_objext"
21719 if { (eval echo "$as_me:21719: \"$ac_compile\"") >&5
21720   (eval $ac_compile) 2>&5
21721   ac_status=$?
21722   echo "$as_me:21722: \$? = $ac_status" >&5
21723   (exit "$ac_status"); } &&
21724          { ac_try='test -s "conftest.$ac_objext"'
21725   { (eval echo "$as_me:21725: \"$ac_try\"") >&5
21726   (eval $ac_try) 2>&5
21727   ac_status=$?
21728   echo "$as_me:21728: \$? = $ac_status" >&5
21729   (exit "$ac_status"); }; }; then
21730   sigact_bad=yes
21731
21732 cat >>confdefs.h <<\EOF
21733 #define _POSIX_SOURCE 1
21734 EOF
21735
21736 else
21737   echo "$as_me: failed program was:" >&5
21738 cat "conftest.$ac_ext" >&5
21739 sigact_bad=unknown
21740 fi
21741 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21742 fi
21743 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21744 echo "$as_me:21744: result: $sigact_bad" >&5
21745 echo "${ECHO_T}$sigact_bad" >&6
21746 fi
21747
21748 echo "$as_me:21748: checking if nanosleep really works" >&5
21749 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21750 if test "${cf_cv_func_nanosleep+set}" = set; then
21751   echo $ECHO_N "(cached) $ECHO_C" >&6
21752 else
21753
21754 if test "$cross_compiling" = yes; then
21755   cf_cv_func_nanosleep=unknown
21756 else
21757   cat >"conftest.$ac_ext" <<_ACEOF
21758 #line 21758 "configure"
21759 #include "confdefs.h"
21760
21761 #include <stdio.h>
21762 #include <errno.h>
21763 #include <time.h>
21764
21765 #ifdef HAVE_SYS_TIME_H
21766 #include <sys/time.h>
21767 #endif
21768
21769 int main(void) {
21770         struct timespec ts1, ts2;
21771         int code;
21772         ts1.tv_sec  = 0;
21773         ts1.tv_nsec = 750000000;
21774         ts2.tv_sec  = 0;
21775         ts2.tv_nsec = 0;
21776         errno = 0;
21777         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21778         ${cf_cv_main_return:-return}(code != 0);
21779 }
21780
21781 _ACEOF
21782 rm -f "conftest$ac_exeext"
21783 if { (eval echo "$as_me:21783: \"$ac_link\"") >&5
21784   (eval $ac_link) 2>&5
21785   ac_status=$?
21786   echo "$as_me:21786: \$? = $ac_status" >&5
21787   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21788   { (eval echo "$as_me:21788: \"$ac_try\"") >&5
21789   (eval $ac_try) 2>&5
21790   ac_status=$?
21791   echo "$as_me:21791: \$? = $ac_status" >&5
21792   (exit "$ac_status"); }; }; then
21793   cf_cv_func_nanosleep=yes
21794 else
21795   echo "$as_me: program exited with status $ac_status" >&5
21796 echo "$as_me: failed program was:" >&5
21797 cat "conftest.$ac_ext" >&5
21798 cf_cv_func_nanosleep=no
21799 fi
21800 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21801 fi
21802 fi
21803 echo "$as_me:21803: result: $cf_cv_func_nanosleep" >&5
21804 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21805
21806 test "$cf_cv_func_nanosleep" = "yes" &&
21807 cat >>confdefs.h <<\EOF
21808 #define HAVE_NANOSLEEP 1
21809 EOF
21810
21811 for ac_header in \
21812 termio.h \
21813 termios.h \
21814 unistd.h \
21815 sys/ioctl.h \
21816 sys/termio.h \
21817
21818 do
21819 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21820 echo "$as_me:21820: checking for $ac_header" >&5
21821 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21822 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21823   echo $ECHO_N "(cached) $ECHO_C" >&6
21824 else
21825   cat >"conftest.$ac_ext" <<_ACEOF
21826 #line 21826 "configure"
21827 #include "confdefs.h"
21828 #include <$ac_header>
21829 _ACEOF
21830 if { (eval echo "$as_me:21830: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21831   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21832   ac_status=$?
21833   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21834   rm -f conftest.er1
21835   cat conftest.err >&5
21836   echo "$as_me:21836: \$? = $ac_status" >&5
21837   (exit "$ac_status"); } >/dev/null; then
21838   if test -s conftest.err; then
21839     ac_cpp_err=$ac_c_preproc_warn_flag
21840   else
21841     ac_cpp_err=
21842   fi
21843 else
21844   ac_cpp_err=yes
21845 fi
21846 if test -z "$ac_cpp_err"; then
21847   eval "$as_ac_Header=yes"
21848 else
21849   echo "$as_me: failed program was:" >&5
21850   cat "conftest.$ac_ext" >&5
21851   eval "$as_ac_Header=no"
21852 fi
21853 rm -f conftest.err "conftest.$ac_ext"
21854 fi
21855 echo "$as_me:21855: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21856 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21857 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21858   cat >>confdefs.h <<EOF
21859 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21860 EOF
21861
21862 fi
21863 done
21864
21865 if test "$ac_cv_header_termios_h" = yes ; then
21866         case "$CFLAGS $CPPFLAGS" in
21867         (*-D_POSIX_SOURCE*)
21868                 termios_bad=dunno ;;
21869         (*)     termios_bad=maybe ;;
21870         esac
21871         if test "$termios_bad" = maybe ; then
21872         echo "$as_me:21872: checking whether termios.h needs _POSIX_SOURCE" >&5
21873 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21874         cat >"conftest.$ac_ext" <<_ACEOF
21875 #line 21875 "configure"
21876 #include "confdefs.h"
21877 #include <termios.h>
21878 int
21879 main (void)
21880 {
21881 struct termios foo; int x = foo.c_iflag = 1; (void)x
21882   ;
21883   return 0;
21884 }
21885 _ACEOF
21886 rm -f "conftest.$ac_objext"
21887 if { (eval echo "$as_me:21887: \"$ac_compile\"") >&5
21888   (eval $ac_compile) 2>&5
21889   ac_status=$?
21890   echo "$as_me:21890: \$? = $ac_status" >&5
21891   (exit "$ac_status"); } &&
21892          { ac_try='test -s "conftest.$ac_objext"'
21893   { (eval echo "$as_me:21893: \"$ac_try\"") >&5
21894   (eval $ac_try) 2>&5
21895   ac_status=$?
21896   echo "$as_me:21896: \$? = $ac_status" >&5
21897   (exit "$ac_status"); }; }; then
21898   termios_bad=no
21899 else
21900   echo "$as_me: failed program was:" >&5
21901 cat "conftest.$ac_ext" >&5
21902
21903                 cat >"conftest.$ac_ext" <<_ACEOF
21904 #line 21904 "configure"
21905 #include "confdefs.h"
21906
21907 #define _POSIX_SOURCE
21908 #include <termios.h>
21909 int
21910 main (void)
21911 {
21912 struct termios foo; int x = foo.c_iflag = 2; (void)x
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   termios_bad=unknown
21930 else
21931   echo "$as_me: failed program was:" >&5
21932 cat "conftest.$ac_ext" >&5
21933 termios_bad=yes
21934 cat >>confdefs.h <<\EOF
21935 #define _POSIX_SOURCE 1
21936 EOF
21937
21938 fi
21939 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21940
21941 fi
21942 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21943         echo "$as_me:21943: result: $termios_bad" >&5
21944 echo "${ECHO_T}$termios_bad" >&6
21945         fi
21946 fi
21947
21948 echo "$as_me:21948: checking for tcgetattr" >&5
21949 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21950 if test "${cf_cv_have_tcgetattr+set}" = set; then
21951   echo $ECHO_N "(cached) $ECHO_C" >&6
21952 else
21953
21954 cat >"conftest.$ac_ext" <<_ACEOF
21955 #line 21955 "configure"
21956 #include "confdefs.h"
21957
21958 #include <sys/types.h>
21959 #ifdef HAVE_UNISTD_H
21960 #include <unistd.h>
21961 #endif
21962 #ifdef HAVE_TERMIOS_H
21963 #include <termios.h>
21964 #define TTY struct termios
21965 #else
21966 #ifdef HAVE_TERMIO_H
21967 #include <termio.h>
21968 #define TTY struct termio
21969 #endif
21970 #endif
21971
21972 int
21973 main (void)
21974 {
21975
21976 TTY foo;
21977 tcgetattr(1, &foo);
21978   ;
21979   return 0;
21980 }
21981 _ACEOF
21982 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21983 if { (eval echo "$as_me:21983: \"$ac_link\"") >&5
21984   (eval $ac_link) 2>&5
21985   ac_status=$?
21986   echo "$as_me:21986: \$? = $ac_status" >&5
21987   (exit "$ac_status"); } &&
21988          { ac_try='test -s "conftest$ac_exeext"'
21989   { (eval echo "$as_me:21989: \"$ac_try\"") >&5
21990   (eval $ac_try) 2>&5
21991   ac_status=$?
21992   echo "$as_me:21992: \$? = $ac_status" >&5
21993   (exit "$ac_status"); }; }; then
21994   cf_cv_have_tcgetattr=yes
21995 else
21996   echo "$as_me: failed program was:" >&5
21997 cat "conftest.$ac_ext" >&5
21998 cf_cv_have_tcgetattr=no
21999 fi
22000 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22001 fi
22002 echo "$as_me:22002: result: $cf_cv_have_tcgetattr" >&5
22003 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22004 test "$cf_cv_have_tcgetattr" = yes &&
22005 cat >>confdefs.h <<\EOF
22006 #define HAVE_TCGETATTR 1
22007 EOF
22008
22009 echo "$as_me:22009: checking for vsscanf function or workaround" >&5
22010 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22011 if test "${cf_cv_func_vsscanf+set}" = set; then
22012   echo $ECHO_N "(cached) $ECHO_C" >&6
22013 else
22014
22015 cat >"conftest.$ac_ext" <<_ACEOF
22016 #line 22016 "configure"
22017 #include "confdefs.h"
22018
22019 #include <stdarg.h>
22020 #include <stdio.h>
22021 int
22022 main (void)
22023 {
22024
22025         va_list ap;
22026         vsscanf("from", "%d", ap)
22027   ;
22028   return 0;
22029 }
22030 _ACEOF
22031 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22032 if { (eval echo "$as_me:22032: \"$ac_link\"") >&5
22033   (eval $ac_link) 2>&5
22034   ac_status=$?
22035   echo "$as_me:22035: \$? = $ac_status" >&5
22036   (exit "$ac_status"); } &&
22037          { ac_try='test -s "conftest$ac_exeext"'
22038   { (eval echo "$as_me:22038: \"$ac_try\"") >&5
22039   (eval $ac_try) 2>&5
22040   ac_status=$?
22041   echo "$as_me:22041: \$? = $ac_status" >&5
22042   (exit "$ac_status"); }; }; then
22043   cf_cv_func_vsscanf=vsscanf
22044 else
22045   echo "$as_me: failed program was:" >&5
22046 cat "conftest.$ac_ext" >&5
22047
22048 cat >"conftest.$ac_ext" <<_ACEOF
22049 #line 22049 "configure"
22050 #include "confdefs.h"
22051
22052 #include <stdarg.h>
22053 #include <stdio.h>
22054 int
22055 main (void)
22056 {
22057
22058         FILE strbuf;
22059         char *str = "from";
22060
22061         strbuf._flag = _IOREAD;
22062         strbuf._ptr = strbuf._base = (unsigned char *) str;
22063         strbuf._cnt = strlen(str);
22064         strbuf._file = _NFILE;
22065         return (vfscanf(&strbuf, "%d", ap))
22066   ;
22067   return 0;
22068 }
22069 _ACEOF
22070 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22071 if { (eval echo "$as_me:22071: \"$ac_link\"") >&5
22072   (eval $ac_link) 2>&5
22073   ac_status=$?
22074   echo "$as_me:22074: \$? = $ac_status" >&5
22075   (exit "$ac_status"); } &&
22076          { ac_try='test -s "conftest$ac_exeext"'
22077   { (eval echo "$as_me:22077: \"$ac_try\"") >&5
22078   (eval $ac_try) 2>&5
22079   ac_status=$?
22080   echo "$as_me:22080: \$? = $ac_status" >&5
22081   (exit "$ac_status"); }; }; then
22082   cf_cv_func_vsscanf=vfscanf
22083 else
22084   echo "$as_me: failed program was:" >&5
22085 cat "conftest.$ac_ext" >&5
22086
22087 cat >"conftest.$ac_ext" <<_ACEOF
22088 #line 22088 "configure"
22089 #include "confdefs.h"
22090
22091 #include <stdarg.h>
22092 #include <stdio.h>
22093 int
22094 main (void)
22095 {
22096
22097         FILE strbuf;
22098         char *str = "from";
22099
22100         strbuf._flag = _IOREAD;
22101         strbuf._ptr = strbuf._base = (unsigned char *) str;
22102         strbuf._cnt = strlen(str);
22103         strbuf._file = _NFILE;
22104         return (_doscan(&strbuf, "%d", ap))
22105   ;
22106   return 0;
22107 }
22108 _ACEOF
22109 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22110 if { (eval echo "$as_me:22110: \"$ac_link\"") >&5
22111   (eval $ac_link) 2>&5
22112   ac_status=$?
22113   echo "$as_me:22113: \$? = $ac_status" >&5
22114   (exit "$ac_status"); } &&
22115          { ac_try='test -s "conftest$ac_exeext"'
22116   { (eval echo "$as_me:22116: \"$ac_try\"") >&5
22117   (eval $ac_try) 2>&5
22118   ac_status=$?
22119   echo "$as_me:22119: \$? = $ac_status" >&5
22120   (exit "$ac_status"); }; }; then
22121   cf_cv_func_vsscanf=_doscan
22122 else
22123   echo "$as_me: failed program was:" >&5
22124 cat "conftest.$ac_ext" >&5
22125
22126 cf_cv_func_vsscanf=no
22127 fi
22128 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22129 fi
22130 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22131 fi
22132 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22133 fi
22134 echo "$as_me:22134: result: $cf_cv_func_vsscanf" >&5
22135 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22136
22137 case "$cf_cv_func_vsscanf" in
22138 (vsscanf)
22139 cat >>confdefs.h <<\EOF
22140 #define HAVE_VSSCANF 1
22141 EOF
22142 ;;
22143 (vfscanf)
22144 cat >>confdefs.h <<\EOF
22145 #define HAVE_VFSCANF 1
22146 EOF
22147 ;;
22148 (_doscan)
22149 cat >>confdefs.h <<\EOF
22150 #define HAVE__DOSCAN 1
22151 EOF
22152 ;;
22153 esac
22154
22155 for ac_header in \
22156 unistd.h \
22157
22158 do
22159 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22160 echo "$as_me:22160: checking for $ac_header" >&5
22161 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22162 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22163   echo $ECHO_N "(cached) $ECHO_C" >&6
22164 else
22165   cat >"conftest.$ac_ext" <<_ACEOF
22166 #line 22166 "configure"
22167 #include "confdefs.h"
22168 #include <$ac_header>
22169 _ACEOF
22170 if { (eval echo "$as_me:22170: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22171   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22172   ac_status=$?
22173   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22174   rm -f conftest.er1
22175   cat conftest.err >&5
22176   echo "$as_me:22176: \$? = $ac_status" >&5
22177   (exit "$ac_status"); } >/dev/null; then
22178   if test -s conftest.err; then
22179     ac_cpp_err=$ac_c_preproc_warn_flag
22180   else
22181     ac_cpp_err=
22182   fi
22183 else
22184   ac_cpp_err=yes
22185 fi
22186 if test -z "$ac_cpp_err"; then
22187   eval "$as_ac_Header=yes"
22188 else
22189   echo "$as_me: failed program was:" >&5
22190   cat "conftest.$ac_ext" >&5
22191   eval "$as_ac_Header=no"
22192 fi
22193 rm -f conftest.err "conftest.$ac_ext"
22194 fi
22195 echo "$as_me:22195: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22196 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22197 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22198   cat >>confdefs.h <<EOF
22199 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22200 EOF
22201
22202 fi
22203 done
22204
22205 echo "$as_me:22205: checking for working mkstemp" >&5
22206 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22207 if test "${cf_cv_func_mkstemp+set}" = set; then
22208   echo $ECHO_N "(cached) $ECHO_C" >&6
22209 else
22210
22211 rm -rf ./conftest*
22212 if test "$cross_compiling" = yes; then
22213   cf_cv_func_mkstemp=maybe
22214 else
22215   cat >"conftest.$ac_ext" <<_ACEOF
22216 #line 22216 "configure"
22217 #include "confdefs.h"
22218
22219 #include <sys/types.h>
22220 #ifdef HAVE_UNISTD_H
22221 #include <unistd.h>
22222 #endif
22223 #include <stdlib.h>
22224 #include <stdio.h>
22225 #include <string.h>
22226 #include <sys/stat.h>
22227 int main(void)
22228 {
22229         char *tmpl = "conftestXXXXXX";
22230         char name[2][80];
22231         int n;
22232         int result = 0;
22233         int fd;
22234         struct stat sb;
22235
22236         umask(077);
22237         for (n = 0; n < 2; ++n) {
22238                 strcpy(name[n], tmpl);
22239                 if ((fd = mkstemp(name[n])) >= 0) {
22240                         if (!strcmp(name[n], tmpl)
22241                          || stat(name[n], &sb) != 0
22242                          || (sb.st_mode & S_IFMT) != S_IFREG
22243                          || (sb.st_mode & 077) != 0) {
22244                                 result = 1;
22245                         }
22246                         close(fd);
22247                 }
22248         }
22249         if (result == 0
22250          && !strcmp(name[0], name[1]))
22251                 result = 1;
22252         ${cf_cv_main_return:-return}(result);
22253 }
22254
22255 _ACEOF
22256 rm -f "conftest$ac_exeext"
22257 if { (eval echo "$as_me:22257: \"$ac_link\"") >&5
22258   (eval $ac_link) 2>&5
22259   ac_status=$?
22260   echo "$as_me:22260: \$? = $ac_status" >&5
22261   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22262   { (eval echo "$as_me:22262: \"$ac_try\"") >&5
22263   (eval $ac_try) 2>&5
22264   ac_status=$?
22265   echo "$as_me:22265: \$? = $ac_status" >&5
22266   (exit "$ac_status"); }; }; then
22267   cf_cv_func_mkstemp=yes
22268
22269 else
22270   echo "$as_me: program exited with status $ac_status" >&5
22271 echo "$as_me: failed program was:" >&5
22272 cat "conftest.$ac_ext" >&5
22273 cf_cv_func_mkstemp=no
22274
22275 fi
22276 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22277 fi
22278
22279 fi
22280 echo "$as_me:22280: result: $cf_cv_func_mkstemp" >&5
22281 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22282 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22283         echo "$as_me:22283: checking for mkstemp" >&5
22284 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22285 if test "${ac_cv_func_mkstemp+set}" = set; then
22286   echo $ECHO_N "(cached) $ECHO_C" >&6
22287 else
22288   cat >"conftest.$ac_ext" <<_ACEOF
22289 #line 22289 "configure"
22290 #include "confdefs.h"
22291 #define mkstemp autoconf_temporary
22292 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22293 #undef mkstemp
22294
22295 #ifdef __cplusplus
22296 extern "C"
22297 #endif
22298
22299 /* We use char because int might match the return type of a gcc2
22300    builtin and then its argument prototype would still apply.  */
22301 char mkstemp (void);
22302
22303 int
22304 main (void)
22305 {
22306
22307 /* The GNU C library defines stubs for functions which it implements
22308     to always fail with ENOSYS.  Some functions are actually named
22309     something starting with __ and the normal name is an alias.  */
22310 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22311 #error found stub for mkstemp
22312 #endif
22313
22314         return mkstemp ();
22315   ;
22316   return 0;
22317 }
22318 _ACEOF
22319 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22320 if { (eval echo "$as_me:22320: \"$ac_link\"") >&5
22321   (eval $ac_link) 2>&5
22322   ac_status=$?
22323   echo "$as_me:22323: \$? = $ac_status" >&5
22324   (exit "$ac_status"); } &&
22325          { ac_try='test -s "conftest$ac_exeext"'
22326   { (eval echo "$as_me:22326: \"$ac_try\"") >&5
22327   (eval $ac_try) 2>&5
22328   ac_status=$?
22329   echo "$as_me:22329: \$? = $ac_status" >&5
22330   (exit "$ac_status"); }; }; then
22331   ac_cv_func_mkstemp=yes
22332 else
22333   echo "$as_me: failed program was:" >&5
22334 cat "conftest.$ac_ext" >&5
22335 ac_cv_func_mkstemp=no
22336 fi
22337 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22338 fi
22339 echo "$as_me:22339: result: $ac_cv_func_mkstemp" >&5
22340 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22341
22342 fi
22343 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22344
22345 cat >>confdefs.h <<\EOF
22346 #define HAVE_MKSTEMP 1
22347 EOF
22348
22349 fi
22350
22351 # setup for prototype of fallback for vsscanf()
22352
22353 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22354         HAVE_VSSCANF=1
22355 else
22356         HAVE_VSSCANF=0
22357 fi
22358
22359 if test "x$cross_compiling" = xyes ; then
22360         { echo "$as_me:22360: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22361 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22362 else
22363         echo "$as_me:22363: checking whether setvbuf arguments are reversed" >&5
22364 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22365 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22366   echo $ECHO_N "(cached) $ECHO_C" >&6
22367 else
22368   if test "$cross_compiling" = yes; then
22369   { { echo "$as_me:22369: error: cannot run test program while cross compiling" >&5
22370 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22371    { (exit 1); exit 1; }; }
22372 else
22373   cat >"conftest.$ac_ext" <<_ACEOF
22374 #line 22374 "configure"
22375 #include "confdefs.h"
22376 #include <stdio.h>
22377 /* If setvbuf has the reversed format, exit 0. */
22378 int
22379 main (void)
22380 {
22381   /* This call has the arguments reversed.
22382      A reversed system may check and see that the address of main
22383      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22384   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22385     $ac_main_return(1);
22386   putc('\r', stdout);
22387   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22388 }
22389 _ACEOF
22390 rm -f "conftest$ac_exeext"
22391 if { (eval echo "$as_me:22391: \"$ac_link\"") >&5
22392   (eval $ac_link) 2>&5
22393   ac_status=$?
22394   echo "$as_me:22394: \$? = $ac_status" >&5
22395   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22396   { (eval echo "$as_me:22396: \"$ac_try\"") >&5
22397   (eval $ac_try) 2>&5
22398   ac_status=$?
22399   echo "$as_me:22399: \$? = $ac_status" >&5
22400   (exit "$ac_status"); }; }; then
22401   ac_cv_func_setvbuf_reversed=yes
22402 else
22403   echo "$as_me: program exited with status $ac_status" >&5
22404 echo "$as_me: failed program was:" >&5
22405 cat "conftest.$ac_ext" >&5
22406 ac_cv_func_setvbuf_reversed=no
22407 fi
22408 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22409 fi
22410 rm -f core ./core.* ./*.core
22411 fi
22412 echo "$as_me:22412: result: $ac_cv_func_setvbuf_reversed" >&5
22413 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22414 if test $ac_cv_func_setvbuf_reversed = yes; then
22415
22416 cat >>confdefs.h <<\EOF
22417 #define SETVBUF_REVERSED 1
22418 EOF
22419
22420 fi
22421
22422 fi
22423 echo "$as_me:22423: checking for intptr_t" >&5
22424 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22425 if test "${ac_cv_type_intptr_t+set}" = set; then
22426   echo $ECHO_N "(cached) $ECHO_C" >&6
22427 else
22428   cat >"conftest.$ac_ext" <<_ACEOF
22429 #line 22429 "configure"
22430 #include "confdefs.h"
22431 $ac_includes_default
22432 int
22433 main (void)
22434 {
22435 if ((intptr_t *) 0)
22436   return 0;
22437 if (sizeof (intptr_t))
22438   return 0;
22439   ;
22440   return 0;
22441 }
22442 _ACEOF
22443 rm -f "conftest.$ac_objext"
22444 if { (eval echo "$as_me:22444: \"$ac_compile\"") >&5
22445   (eval $ac_compile) 2>&5
22446   ac_status=$?
22447   echo "$as_me:22447: \$? = $ac_status" >&5
22448   (exit "$ac_status"); } &&
22449          { ac_try='test -s "conftest.$ac_objext"'
22450   { (eval echo "$as_me:22450: \"$ac_try\"") >&5
22451   (eval $ac_try) 2>&5
22452   ac_status=$?
22453   echo "$as_me:22453: \$? = $ac_status" >&5
22454   (exit "$ac_status"); }; }; then
22455   ac_cv_type_intptr_t=yes
22456 else
22457   echo "$as_me: failed program was:" >&5
22458 cat "conftest.$ac_ext" >&5
22459 ac_cv_type_intptr_t=no
22460 fi
22461 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22462 fi
22463 echo "$as_me:22463: result: $ac_cv_type_intptr_t" >&5
22464 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22465 if test "$ac_cv_type_intptr_t" = yes; then
22466   :
22467 else
22468
22469 cat >>confdefs.h <<EOF
22470 #define intptr_t long
22471 EOF
22472
22473 fi
22474
22475 echo "$as_me:22475: checking for ssize_t" >&5
22476 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22477 if test "${ac_cv_type_ssize_t+set}" = set; then
22478   echo $ECHO_N "(cached) $ECHO_C" >&6
22479 else
22480   cat >"conftest.$ac_ext" <<_ACEOF
22481 #line 22481 "configure"
22482 #include "confdefs.h"
22483 $ac_includes_default
22484 int
22485 main (void)
22486 {
22487 if ((ssize_t *) 0)
22488   return 0;
22489 if (sizeof (ssize_t))
22490   return 0;
22491   ;
22492   return 0;
22493 }
22494 _ACEOF
22495 rm -f "conftest.$ac_objext"
22496 if { (eval echo "$as_me:22496: \"$ac_compile\"") >&5
22497   (eval $ac_compile) 2>&5
22498   ac_status=$?
22499   echo "$as_me:22499: \$? = $ac_status" >&5
22500   (exit "$ac_status"); } &&
22501          { ac_try='test -s "conftest.$ac_objext"'
22502   { (eval echo "$as_me:22502: \"$ac_try\"") >&5
22503   (eval $ac_try) 2>&5
22504   ac_status=$?
22505   echo "$as_me:22505: \$? = $ac_status" >&5
22506   (exit "$ac_status"); }; }; then
22507   ac_cv_type_ssize_t=yes
22508 else
22509   echo "$as_me: failed program was:" >&5
22510 cat "conftest.$ac_ext" >&5
22511 ac_cv_type_ssize_t=no
22512 fi
22513 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22514 fi
22515 echo "$as_me:22515: result: $ac_cv_type_ssize_t" >&5
22516 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22517 if test "$ac_cv_type_ssize_t" = yes; then
22518   :
22519 else
22520
22521 cat >>confdefs.h <<EOF
22522 #define ssize_t int
22523 EOF
22524
22525 fi
22526
22527 echo "$as_me:22527: checking for type sigaction_t" >&5
22528 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22529 if test "${cf_cv_type_sigaction+set}" = set; then
22530   echo $ECHO_N "(cached) $ECHO_C" >&6
22531 else
22532
22533         cat >"conftest.$ac_ext" <<_ACEOF
22534 #line 22534 "configure"
22535 #include "confdefs.h"
22536
22537 #include <signal.h>
22538 int
22539 main (void)
22540 {
22541 sigaction_t x
22542   ;
22543   return 0;
22544 }
22545 _ACEOF
22546 rm -f "conftest.$ac_objext"
22547 if { (eval echo "$as_me:22547: \"$ac_compile\"") >&5
22548   (eval $ac_compile) 2>&5
22549   ac_status=$?
22550   echo "$as_me:22550: \$? = $ac_status" >&5
22551   (exit "$ac_status"); } &&
22552          { ac_try='test -s "conftest.$ac_objext"'
22553   { (eval echo "$as_me:22553: \"$ac_try\"") >&5
22554   (eval $ac_try) 2>&5
22555   ac_status=$?
22556   echo "$as_me:22556: \$? = $ac_status" >&5
22557   (exit "$ac_status"); }; }; then
22558   cf_cv_type_sigaction=yes
22559 else
22560   echo "$as_me: failed program was:" >&5
22561 cat "conftest.$ac_ext" >&5
22562 cf_cv_type_sigaction=no
22563 fi
22564 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22565 fi
22566
22567 echo "$as_me:22567: result: $cf_cv_type_sigaction" >&5
22568 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22569 test "$cf_cv_type_sigaction" = yes &&
22570 cat >>confdefs.h <<\EOF
22571 #define HAVE_TYPE_SIGACTION 1
22572 EOF
22573
22574 echo "$as_me:22574: checking declaration of size-change" >&5
22575 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22576 if test "${cf_cv_sizechange+set}" = set; then
22577   echo $ECHO_N "(cached) $ECHO_C" >&6
22578 else
22579
22580         cf_cv_sizechange=unknown
22581         cf_save_CPPFLAGS="$CPPFLAGS"
22582
22583 for cf_opts in "" "NEED_PTEM_H"
22584 do
22585
22586         CPPFLAGS="$cf_save_CPPFLAGS"
22587         if test -n "$cf_opts"
22588         then
22589
22590         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22591         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22592
22593         fi
22594         cat >"conftest.$ac_ext" <<_ACEOF
22595 #line 22595 "configure"
22596 #include "confdefs.h"
22597 #include <sys/types.h>
22598 #ifdef HAVE_TERMIOS_H
22599 #include <termios.h>
22600 #else
22601 #ifdef HAVE_TERMIO_H
22602 #include <termio.h>
22603 #endif
22604 #endif
22605
22606 #ifdef NEED_PTEM_H
22607 /* This is a workaround for SCO:  they neglected to define struct winsize in
22608  * termios.h -- it is only in termio.h and ptem.h
22609  */
22610 #include <sys/stream.h>
22611 #include <sys/ptem.h>
22612 #endif
22613
22614 #ifdef HAVE_SYS_IOCTL_H
22615 #include <sys/ioctl.h>
22616 #endif
22617
22618 int
22619 main (void)
22620 {
22621
22622 #ifdef TIOCGSIZE
22623         struct ttysize win;     /* SunOS 3.0... */
22624         int y = win.ts_lines = 2;
22625         int x = win.ts_cols = 1;
22626         (void)y;
22627         (void)x;
22628 #else
22629 #ifdef TIOCGWINSZ
22630         struct winsize win;     /* everything else */
22631         int y = win.ws_row = 2;
22632         int x = win.ws_col = 1;
22633         (void)y;
22634         (void)x;
22635 #else
22636         no TIOCGSIZE or TIOCGWINSZ
22637 #endif /* TIOCGWINSZ */
22638 #endif /* TIOCGSIZE */
22639
22640   ;
22641   return 0;
22642 }
22643 _ACEOF
22644 rm -f "conftest.$ac_objext"
22645 if { (eval echo "$as_me:22645: \"$ac_compile\"") >&5
22646   (eval $ac_compile) 2>&5
22647   ac_status=$?
22648   echo "$as_me:22648: \$? = $ac_status" >&5
22649   (exit "$ac_status"); } &&
22650          { ac_try='test -s "conftest.$ac_objext"'
22651   { (eval echo "$as_me:22651: \"$ac_try\"") >&5
22652   (eval $ac_try) 2>&5
22653   ac_status=$?
22654   echo "$as_me:22654: \$? = $ac_status" >&5
22655   (exit "$ac_status"); }; }; then
22656   cf_cv_sizechange=yes
22657 else
22658   echo "$as_me: failed program was:" >&5
22659 cat "conftest.$ac_ext" >&5
22660 cf_cv_sizechange=no
22661 fi
22662 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22663
22664         CPPFLAGS="$cf_save_CPPFLAGS"
22665         if test "$cf_cv_sizechange" = yes ; then
22666                 echo "size-change succeeded ($cf_opts)" >&5
22667                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22668                 break
22669         fi
22670 done
22671
22672 fi
22673 echo "$as_me:22673: result: $cf_cv_sizechange" >&5
22674 echo "${ECHO_T}$cf_cv_sizechange" >&6
22675 if test "$cf_cv_sizechange" != no ; then
22676
22677 cat >>confdefs.h <<\EOF
22678 #define HAVE_SIZECHANGE 1
22679 EOF
22680
22681         case "$cf_cv_sizechange" in
22682         (NEED*)
22683                 cat >>confdefs.h <<EOF
22684 #define $cf_cv_sizechange  1
22685 EOF
22686
22687                 ;;
22688         esac
22689 fi
22690
22691 echo "$as_me:22691: checking for memmove" >&5
22692 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22693 if test "${ac_cv_func_memmove+set}" = set; then
22694   echo $ECHO_N "(cached) $ECHO_C" >&6
22695 else
22696   cat >"conftest.$ac_ext" <<_ACEOF
22697 #line 22697 "configure"
22698 #include "confdefs.h"
22699 #define memmove autoconf_temporary
22700 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22701 #undef memmove
22702
22703 #ifdef __cplusplus
22704 extern "C"
22705 #endif
22706
22707 /* We use char because int might match the return type of a gcc2
22708    builtin and then its argument prototype would still apply.  */
22709 char memmove (void);
22710
22711 int
22712 main (void)
22713 {
22714
22715 /* The GNU C library defines stubs for functions which it implements
22716     to always fail with ENOSYS.  Some functions are actually named
22717     something starting with __ and the normal name is an alias.  */
22718 #if defined (__stub_memmove) || defined (__stub___memmove)
22719 #error found stub for memmove
22720 #endif
22721
22722         return memmove ();
22723   ;
22724   return 0;
22725 }
22726 _ACEOF
22727 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22728 if { (eval echo "$as_me:22728: \"$ac_link\"") >&5
22729   (eval $ac_link) 2>&5
22730   ac_status=$?
22731   echo "$as_me:22731: \$? = $ac_status" >&5
22732   (exit "$ac_status"); } &&
22733          { ac_try='test -s "conftest$ac_exeext"'
22734   { (eval echo "$as_me:22734: \"$ac_try\"") >&5
22735   (eval $ac_try) 2>&5
22736   ac_status=$?
22737   echo "$as_me:22737: \$? = $ac_status" >&5
22738   (exit "$ac_status"); }; }; then
22739   ac_cv_func_memmove=yes
22740 else
22741   echo "$as_me: failed program was:" >&5
22742 cat "conftest.$ac_ext" >&5
22743 ac_cv_func_memmove=no
22744 fi
22745 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22746 fi
22747 echo "$as_me:22747: result: $ac_cv_func_memmove" >&5
22748 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22749 if test "$ac_cv_func_memmove" = yes; then
22750   :
22751 else
22752
22753 echo "$as_me:22753: checking for bcopy" >&5
22754 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22755 if test "${ac_cv_func_bcopy+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 #define bcopy autoconf_temporary
22762 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22763 #undef bcopy
22764
22765 #ifdef __cplusplus
22766 extern "C"
22767 #endif
22768
22769 /* We use char because int might match the return type of a gcc2
22770    builtin and then its argument prototype would still apply.  */
22771 char bcopy (void);
22772
22773 int
22774 main (void)
22775 {
22776
22777 /* The GNU C library defines stubs for functions which it implements
22778     to always fail with ENOSYS.  Some functions are actually named
22779     something starting with __ and the normal name is an alias.  */
22780 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22781 #error found stub for bcopy
22782 #endif
22783
22784         return bcopy ();
22785   ;
22786   return 0;
22787 }
22788 _ACEOF
22789 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22790 if { (eval echo "$as_me:22790: \"$ac_link\"") >&5
22791   (eval $ac_link) 2>&5
22792   ac_status=$?
22793   echo "$as_me:22793: \$? = $ac_status" >&5
22794   (exit "$ac_status"); } &&
22795          { ac_try='test -s "conftest$ac_exeext"'
22796   { (eval echo "$as_me:22796: \"$ac_try\"") >&5
22797   (eval $ac_try) 2>&5
22798   ac_status=$?
22799   echo "$as_me:22799: \$? = $ac_status" >&5
22800   (exit "$ac_status"); }; }; then
22801   ac_cv_func_bcopy=yes
22802 else
22803   echo "$as_me: failed program was:" >&5
22804 cat "conftest.$ac_ext" >&5
22805 ac_cv_func_bcopy=no
22806 fi
22807 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22808 fi
22809 echo "$as_me:22809: result: $ac_cv_func_bcopy" >&5
22810 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22811 if test "$ac_cv_func_bcopy" = yes; then
22812
22813         echo "$as_me:22813: checking if bcopy does overlapping moves" >&5
22814 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22815 if test "${cf_cv_good_bcopy+set}" = set; then
22816   echo $ECHO_N "(cached) $ECHO_C" >&6
22817 else
22818
22819                 if test "$cross_compiling" = yes; then
22820   cf_cv_good_bcopy=unknown
22821 else
22822   cat >"conftest.$ac_ext" <<_ACEOF
22823 #line 22823 "configure"
22824 #include "confdefs.h"
22825
22826 int main(void) {
22827         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22828         char temp[40];
22829         bcopy(data, temp, sizeof(data));
22830         bcopy(temp+10, temp, 15);
22831         bcopy(temp+5, temp+15, 10);
22832         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22833 }
22834
22835 _ACEOF
22836 rm -f "conftest$ac_exeext"
22837 if { (eval echo "$as_me:22837: \"$ac_link\"") >&5
22838   (eval $ac_link) 2>&5
22839   ac_status=$?
22840   echo "$as_me:22840: \$? = $ac_status" >&5
22841   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22842   { (eval echo "$as_me:22842: \"$ac_try\"") >&5
22843   (eval $ac_try) 2>&5
22844   ac_status=$?
22845   echo "$as_me:22845: \$? = $ac_status" >&5
22846   (exit "$ac_status"); }; }; then
22847   cf_cv_good_bcopy=yes
22848 else
22849   echo "$as_me: program exited with status $ac_status" >&5
22850 echo "$as_me: failed program was:" >&5
22851 cat "conftest.$ac_ext" >&5
22852 cf_cv_good_bcopy=no
22853 fi
22854 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22855 fi
22856
22857 fi
22858 echo "$as_me:22858: result: $cf_cv_good_bcopy" >&5
22859 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22860
22861 else
22862   cf_cv_good_bcopy=no
22863 fi
22864
22865         if test "$cf_cv_good_bcopy" = yes ; then
22866
22867 cat >>confdefs.h <<\EOF
22868 #define USE_OK_BCOPY 1
22869 EOF
22870
22871         else
22872
22873 cat >>confdefs.h <<\EOF
22874 #define USE_MY_MEMMOVE 1
22875 EOF
22876
22877         fi
22878
22879 fi
22880
22881 tty >/dev/null 2>&1 || {
22882 for ac_func in posix_openpt
22883 do
22884 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22885 echo "$as_me:22885: checking for $ac_func" >&5
22886 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22887 if eval "test \"\${$as_ac_var+set}\" = set"; then
22888   echo $ECHO_N "(cached) $ECHO_C" >&6
22889 else
22890   cat >"conftest.$ac_ext" <<_ACEOF
22891 #line 22891 "configure"
22892 #include "confdefs.h"
22893 #define $ac_func autoconf_temporary
22894 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22895 #undef $ac_func
22896
22897 #ifdef __cplusplus
22898 extern "C"
22899 #endif
22900
22901 /* We use char because int might match the return type of a gcc2
22902    builtin and then its argument prototype would still apply.  */
22903 char $ac_func (void);
22904
22905 int
22906 main (void)
22907 {
22908
22909 /* The GNU C library defines stubs for functions which it implements
22910     to always fail with ENOSYS.  Some functions are actually named
22911     something starting with __ and the normal name is an alias.  */
22912 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22913 #error found stub for $ac_func
22914 #endif
22915
22916         return $ac_func ();
22917   ;
22918   return 0;
22919 }
22920 _ACEOF
22921 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22922 if { (eval echo "$as_me:22922: \"$ac_link\"") >&5
22923   (eval $ac_link) 2>&5
22924   ac_status=$?
22925   echo "$as_me:22925: \$? = $ac_status" >&5
22926   (exit "$ac_status"); } &&
22927          { ac_try='test -s "conftest$ac_exeext"'
22928   { (eval echo "$as_me:22928: \"$ac_try\"") >&5
22929   (eval $ac_try) 2>&5
22930   ac_status=$?
22931   echo "$as_me:22931: \$? = $ac_status" >&5
22932   (exit "$ac_status"); }; }; then
22933   eval "$as_ac_var=yes"
22934 else
22935   echo "$as_me: failed program was:" >&5
22936 cat "conftest.$ac_ext" >&5
22937 eval "$as_ac_var=no"
22938 fi
22939 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22940 fi
22941 echo "$as_me:22941: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22942 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22943 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22944   cat >>confdefs.h <<EOF
22945 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22946 EOF
22947
22948 fi
22949 done
22950  }
22951 echo "$as_me:22951: checking if poll really works" >&5
22952 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22953 if test "${cf_cv_working_poll+set}" = set; then
22954   echo $ECHO_N "(cached) $ECHO_C" >&6
22955 else
22956
22957 if test "$cross_compiling" = yes; then
22958   cf_cv_working_poll=unknown
22959 else
22960   cat >"conftest.$ac_ext" <<_ACEOF
22961 #line 22961 "configure"
22962 #include "confdefs.h"
22963
22964 #include <stdlib.h>
22965 #include <stdio.h>
22966 #include <unistd.h>
22967 #include <fcntl.h>
22968 #ifdef HAVE_POLL_H
22969 #include <poll.h>
22970 #else
22971 #include <sys/poll.h>
22972 #endif
22973 int main(void) {
22974         struct pollfd myfds;
22975         int ret;
22976
22977         /* check for Darwin bug with respect to "devices" */
22978         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22979         if (myfds.fd < 0)
22980                 myfds.fd = 0;
22981         myfds.events = POLLIN;
22982         myfds.revents = 0;
22983
22984         ret = poll(&myfds, 1, 100);
22985
22986         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22987                 ret = -1;
22988         } else {
22989                 int fd = 0;
22990                 if (!isatty(fd)) {
22991                         fd = open("/dev/tty", 2);       /* O_RDWR */
22992                 }
22993 #ifdef HAVE_POSIX_OPENPT
22994                 if (fd < 0) {
22995                         fd = posix_openpt(O_RDWR);
22996                 }
22997 #endif
22998
22999                 if (fd >= 0) {
23000                         /* also check with standard input */
23001                         myfds.fd = fd;
23002                         myfds.events = POLLIN;
23003                         myfds.revents = 0;
23004                         ret = poll(&myfds, 1, 100);
23005                 } else {
23006                         ret = -1;
23007                 }
23008         }
23009         ${cf_cv_main_return:-return}(ret < 0);
23010 }
23011 _ACEOF
23012 rm -f "conftest$ac_exeext"
23013 if { (eval echo "$as_me:23013: \"$ac_link\"") >&5
23014   (eval $ac_link) 2>&5
23015   ac_status=$?
23016   echo "$as_me:23016: \$? = $ac_status" >&5
23017   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23018   { (eval echo "$as_me:23018: \"$ac_try\"") >&5
23019   (eval $ac_try) 2>&5
23020   ac_status=$?
23021   echo "$as_me:23021: \$? = $ac_status" >&5
23022   (exit "$ac_status"); }; }; then
23023   cf_cv_working_poll=yes
23024 else
23025   echo "$as_me: program exited with status $ac_status" >&5
23026 echo "$as_me: failed program was:" >&5
23027 cat "conftest.$ac_ext" >&5
23028 cf_cv_working_poll=no
23029 fi
23030 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23031 fi
23032 fi
23033 echo "$as_me:23033: result: $cf_cv_working_poll" >&5
23034 echo "${ECHO_T}$cf_cv_working_poll" >&6
23035 test "$cf_cv_working_poll" = "yes" &&
23036 cat >>confdefs.h <<\EOF
23037 #define HAVE_WORKING_POLL 1
23038 EOF
23039
23040 echo "$as_me:23040: checking for va_copy" >&5
23041 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23042 if test "${cf_cv_have_va_copy+set}" = set; then
23043   echo $ECHO_N "(cached) $ECHO_C" >&6
23044 else
23045
23046 cat >"conftest.$ac_ext" <<_ACEOF
23047 #line 23047 "configure"
23048 #include "confdefs.h"
23049
23050 #include <stdarg.h>
23051
23052 int
23053 main (void)
23054 {
23055
23056         static va_list dst;
23057         static va_list src;
23058         va_copy(dst, src)
23059   ;
23060   return 0;
23061 }
23062 _ACEOF
23063 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23064 if { (eval echo "$as_me:23064: \"$ac_link\"") >&5
23065   (eval $ac_link) 2>&5
23066   ac_status=$?
23067   echo "$as_me:23067: \$? = $ac_status" >&5
23068   (exit "$ac_status"); } &&
23069          { ac_try='test -s "conftest$ac_exeext"'
23070   { (eval echo "$as_me:23070: \"$ac_try\"") >&5
23071   (eval $ac_try) 2>&5
23072   ac_status=$?
23073   echo "$as_me:23073: \$? = $ac_status" >&5
23074   (exit "$ac_status"); }; }; then
23075   cf_cv_have_va_copy=yes
23076 else
23077   echo "$as_me: failed program was:" >&5
23078 cat "conftest.$ac_ext" >&5
23079 cf_cv_have_va_copy=no
23080 fi
23081 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23082 fi
23083 echo "$as_me:23083: result: $cf_cv_have_va_copy" >&5
23084 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23085
23086 if test "$cf_cv_have_va_copy" = yes;
23087 then
23088
23089 cat >>confdefs.h <<\EOF
23090 #define HAVE_VA_COPY 1
23091 EOF
23092
23093 else # !cf_cv_have_va_copy
23094
23095 echo "$as_me:23095: checking for __va_copy" >&5
23096 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23097 if test "${cf_cv_have___va_copy+set}" = set; then
23098   echo $ECHO_N "(cached) $ECHO_C" >&6
23099 else
23100
23101 cat >"conftest.$ac_ext" <<_ACEOF
23102 #line 23102 "configure"
23103 #include "confdefs.h"
23104
23105 #include <stdarg.h>
23106
23107 int
23108 main (void)
23109 {
23110
23111         static va_list dst;
23112         static va_list src;
23113         __va_copy(dst, src)
23114   ;
23115   return 0;
23116 }
23117 _ACEOF
23118 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23119 if { (eval echo "$as_me:23119: \"$ac_link\"") >&5
23120   (eval $ac_link) 2>&5
23121   ac_status=$?
23122   echo "$as_me:23122: \$? = $ac_status" >&5
23123   (exit "$ac_status"); } &&
23124          { ac_try='test -s "conftest$ac_exeext"'
23125   { (eval echo "$as_me:23125: \"$ac_try\"") >&5
23126   (eval $ac_try) 2>&5
23127   ac_status=$?
23128   echo "$as_me:23128: \$? = $ac_status" >&5
23129   (exit "$ac_status"); }; }; then
23130   cf_cv_have___va_copy=yes
23131 else
23132   echo "$as_me: failed program was:" >&5
23133 cat "conftest.$ac_ext" >&5
23134 cf_cv_have___va_copy=no
23135 fi
23136 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23137 fi
23138 echo "$as_me:23138: result: $cf_cv_have___va_copy" >&5
23139 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23140
23141 if test "$cf_cv_have___va_copy" = yes
23142 then
23143
23144 cat >>confdefs.h <<\EOF
23145 #define HAVE___VA_COPY 1
23146 EOF
23147
23148 else # !cf_cv_have___va_copy
23149
23150 echo "$as_me:23150: checking for __builtin_va_copy" >&5
23151 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23152 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23153   echo $ECHO_N "(cached) $ECHO_C" >&6
23154 else
23155
23156 cat >"conftest.$ac_ext" <<_ACEOF
23157 #line 23157 "configure"
23158 #include "confdefs.h"
23159
23160 #include <stdarg.h>
23161
23162 int
23163 main (void)
23164 {
23165
23166         static va_list dst;
23167         static va_list src;
23168         __builtin_va_copy(dst, src)
23169   ;
23170   return 0;
23171 }
23172 _ACEOF
23173 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23174 if { (eval echo "$as_me:23174: \"$ac_link\"") >&5
23175   (eval $ac_link) 2>&5
23176   ac_status=$?
23177   echo "$as_me:23177: \$? = $ac_status" >&5
23178   (exit "$ac_status"); } &&
23179          { ac_try='test -s "conftest$ac_exeext"'
23180   { (eval echo "$as_me:23180: \"$ac_try\"") >&5
23181   (eval $ac_try) 2>&5
23182   ac_status=$?
23183   echo "$as_me:23183: \$? = $ac_status" >&5
23184   (exit "$ac_status"); }; }; then
23185   cf_cv_have___builtin_va_copy=yes
23186 else
23187   echo "$as_me: failed program was:" >&5
23188 cat "conftest.$ac_ext" >&5
23189 cf_cv_have___builtin_va_copy=no
23190 fi
23191 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23192 fi
23193 echo "$as_me:23193: result: $cf_cv_have___builtin_va_copy" >&5
23194 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23195
23196 test "$cf_cv_have___builtin_va_copy" = yes &&
23197
23198 cat >>confdefs.h <<\EOF
23199 #define HAVE___BUILTIN_VA_COPY 1
23200 EOF
23201
23202 fi # cf_cv_have___va_copy
23203
23204 fi # cf_cv_have_va_copy
23205
23206 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23207 (*yes*)
23208         ;;
23209
23210 (*)
23211         echo "$as_me:23211: checking if we can simply copy va_list" >&5
23212 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23213 if test "${cf_cv_pointer_va_list+set}" = set; then
23214   echo $ECHO_N "(cached) $ECHO_C" >&6
23215 else
23216
23217 cat >"conftest.$ac_ext" <<_ACEOF
23218 #line 23218 "configure"
23219 #include "confdefs.h"
23220
23221 #include <stdarg.h>
23222
23223 int
23224 main (void)
23225 {
23226
23227         va_list dst;
23228         va_list src;
23229         dst = src
23230   ;
23231   return 0;
23232 }
23233 _ACEOF
23234 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23235 if { (eval echo "$as_me:23235: \"$ac_link\"") >&5
23236   (eval $ac_link) 2>&5
23237   ac_status=$?
23238   echo "$as_me:23238: \$? = $ac_status" >&5
23239   (exit "$ac_status"); } &&
23240          { ac_try='test -s "conftest$ac_exeext"'
23241   { (eval echo "$as_me:23241: \"$ac_try\"") >&5
23242   (eval $ac_try) 2>&5
23243   ac_status=$?
23244   echo "$as_me:23244: \$? = $ac_status" >&5
23245   (exit "$ac_status"); }; }; then
23246   cf_cv_pointer_va_list=yes
23247 else
23248   echo "$as_me: failed program was:" >&5
23249 cat "conftest.$ac_ext" >&5
23250 cf_cv_pointer_va_list=no
23251 fi
23252 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23253 fi
23254 echo "$as_me:23254: result: $cf_cv_pointer_va_list" >&5
23255 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23256
23257         if test "$cf_cv_pointer_va_list" = no
23258         then
23259                 echo "$as_me:23259: checking if we can copy va_list indirectly" >&5
23260 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23261 if test "${cf_cv_array_va_list+set}" = set; then
23262   echo $ECHO_N "(cached) $ECHO_C" >&6
23263 else
23264
23265 cat >"conftest.$ac_ext" <<_ACEOF
23266 #line 23266 "configure"
23267 #include "confdefs.h"
23268
23269 #include <stdarg.h>
23270
23271 int
23272 main (void)
23273 {
23274
23275         va_list dst;
23276         va_list src;
23277         *dst = *src
23278   ;
23279   return 0;
23280 }
23281 _ACEOF
23282 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23283 if { (eval echo "$as_me:23283: \"$ac_link\"") >&5
23284   (eval $ac_link) 2>&5
23285   ac_status=$?
23286   echo "$as_me:23286: \$? = $ac_status" >&5
23287   (exit "$ac_status"); } &&
23288          { ac_try='test -s "conftest$ac_exeext"'
23289   { (eval echo "$as_me:23289: \"$ac_try\"") >&5
23290   (eval $ac_try) 2>&5
23291   ac_status=$?
23292   echo "$as_me:23292: \$? = $ac_status" >&5
23293   (exit "$ac_status"); }; }; then
23294   cf_cv_array_va_list=yes
23295 else
23296   echo "$as_me: failed program was:" >&5
23297 cat "conftest.$ac_ext" >&5
23298 cf_cv_array_va_list=no
23299 fi
23300 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23301 fi
23302 echo "$as_me:23302: result: $cf_cv_array_va_list" >&5
23303 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23304                 test "$cf_cv_array_va_list" = yes &&
23305 cat >>confdefs.h <<\EOF
23306 #define ARRAY_VA_LIST 1
23307 EOF
23308
23309         fi
23310         ;;
23311 esac
23312
23313 echo "$as_me:23313: checking for pid_t" >&5
23314 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23315 if test "${ac_cv_type_pid_t+set}" = set; then
23316   echo $ECHO_N "(cached) $ECHO_C" >&6
23317 else
23318   cat >"conftest.$ac_ext" <<_ACEOF
23319 #line 23319 "configure"
23320 #include "confdefs.h"
23321 $ac_includes_default
23322 int
23323 main (void)
23324 {
23325 if ((pid_t *) 0)
23326   return 0;
23327 if (sizeof (pid_t))
23328   return 0;
23329   ;
23330   return 0;
23331 }
23332 _ACEOF
23333 rm -f "conftest.$ac_objext"
23334 if { (eval echo "$as_me:23334: \"$ac_compile\"") >&5
23335   (eval $ac_compile) 2>&5
23336   ac_status=$?
23337   echo "$as_me:23337: \$? = $ac_status" >&5
23338   (exit "$ac_status"); } &&
23339          { ac_try='test -s "conftest.$ac_objext"'
23340   { (eval echo "$as_me:23340: \"$ac_try\"") >&5
23341   (eval $ac_try) 2>&5
23342   ac_status=$?
23343   echo "$as_me:23343: \$? = $ac_status" >&5
23344   (exit "$ac_status"); }; }; then
23345   ac_cv_type_pid_t=yes
23346 else
23347   echo "$as_me: failed program was:" >&5
23348 cat "conftest.$ac_ext" >&5
23349 ac_cv_type_pid_t=no
23350 fi
23351 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23352 fi
23353 echo "$as_me:23353: result: $ac_cv_type_pid_t" >&5
23354 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23355 if test "$ac_cv_type_pid_t" = yes; then
23356   :
23357 else
23358
23359 cat >>confdefs.h <<EOF
23360 #define pid_t int
23361 EOF
23362
23363 fi
23364
23365 for ac_header in unistd.h vfork.h
23366 do
23367 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23368 echo "$as_me:23368: checking for $ac_header" >&5
23369 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23370 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23371   echo $ECHO_N "(cached) $ECHO_C" >&6
23372 else
23373   cat >"conftest.$ac_ext" <<_ACEOF
23374 #line 23374 "configure"
23375 #include "confdefs.h"
23376 #include <$ac_header>
23377 _ACEOF
23378 if { (eval echo "$as_me:23378: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23379   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23380   ac_status=$?
23381   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23382   rm -f conftest.er1
23383   cat conftest.err >&5
23384   echo "$as_me:23384: \$? = $ac_status" >&5
23385   (exit "$ac_status"); } >/dev/null; then
23386   if test -s conftest.err; then
23387     ac_cpp_err=$ac_c_preproc_warn_flag
23388   else
23389     ac_cpp_err=
23390   fi
23391 else
23392   ac_cpp_err=yes
23393 fi
23394 if test -z "$ac_cpp_err"; then
23395   eval "$as_ac_Header=yes"
23396 else
23397   echo "$as_me: failed program was:" >&5
23398   cat "conftest.$ac_ext" >&5
23399   eval "$as_ac_Header=no"
23400 fi
23401 rm -f conftest.err "conftest.$ac_ext"
23402 fi
23403 echo "$as_me:23403: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23404 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23405 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23406   cat >>confdefs.h <<EOF
23407 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23408 EOF
23409
23410 fi
23411 done
23412
23413 for ac_func in fork vfork
23414 do
23415 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23416 echo "$as_me:23416: checking for $ac_func" >&5
23417 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23418 if eval "test \"\${$as_ac_var+set}\" = set"; then
23419   echo $ECHO_N "(cached) $ECHO_C" >&6
23420 else
23421   cat >"conftest.$ac_ext" <<_ACEOF
23422 #line 23422 "configure"
23423 #include "confdefs.h"
23424 #define $ac_func autoconf_temporary
23425 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23426 #undef $ac_func
23427
23428 #ifdef __cplusplus
23429 extern "C"
23430 #endif
23431
23432 /* We use char because int might match the return type of a gcc2
23433    builtin and then its argument prototype would still apply.  */
23434 char $ac_func (void);
23435
23436 int
23437 main (void)
23438 {
23439
23440 /* The GNU C library defines stubs for functions which it implements
23441     to always fail with ENOSYS.  Some functions are actually named
23442     something starting with __ and the normal name is an alias.  */
23443 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23444 #error found stub for $ac_func
23445 #endif
23446
23447         return $ac_func ();
23448   ;
23449   return 0;
23450 }
23451 _ACEOF
23452 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23453 if { (eval echo "$as_me:23453: \"$ac_link\"") >&5
23454   (eval $ac_link) 2>&5
23455   ac_status=$?
23456   echo "$as_me:23456: \$? = $ac_status" >&5
23457   (exit "$ac_status"); } &&
23458          { ac_try='test -s "conftest$ac_exeext"'
23459   { (eval echo "$as_me:23459: \"$ac_try\"") >&5
23460   (eval $ac_try) 2>&5
23461   ac_status=$?
23462   echo "$as_me:23462: \$? = $ac_status" >&5
23463   (exit "$ac_status"); }; }; then
23464   eval "$as_ac_var=yes"
23465 else
23466   echo "$as_me: failed program was:" >&5
23467 cat "conftest.$ac_ext" >&5
23468 eval "$as_ac_var=no"
23469 fi
23470 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23471 fi
23472 echo "$as_me:23472: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23473 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23474 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23475   cat >>confdefs.h <<EOF
23476 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23477 EOF
23478
23479 fi
23480 done
23481
23482 ac_cv_func_fork_works=$ac_cv_func_fork
23483 if test "x$ac_cv_func_fork" = xyes; then
23484   echo "$as_me:23484: checking for working fork" >&5
23485 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23486 if test "${ac_cv_func_fork_works+set}" = set; then
23487   echo $ECHO_N "(cached) $ECHO_C" >&6
23488 else
23489   if test "$cross_compiling" = yes; then
23490   ac_cv_func_fork_works=cross
23491 else
23492   cat >"conftest.$ac_ext" <<_ACEOF
23493 /* By Rüdiger Kuhlmann. */
23494       #include <sys/types.h>
23495       #if HAVE_UNISTD_H
23496       # include <unistd.h>
23497       #endif
23498       /* Some systems only have a dummy stub for fork() */
23499       int main (void)
23500       {
23501         if (fork() < 0)
23502           $ac_main_return (1);
23503         $ac_main_return (0);
23504       }
23505 _ACEOF
23506 rm -f "conftest$ac_exeext"
23507 if { (eval echo "$as_me:23507: \"$ac_link\"") >&5
23508   (eval $ac_link) 2>&5
23509   ac_status=$?
23510   echo "$as_me:23510: \$? = $ac_status" >&5
23511   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23512   { (eval echo "$as_me:23512: \"$ac_try\"") >&5
23513   (eval $ac_try) 2>&5
23514   ac_status=$?
23515   echo "$as_me:23515: \$? = $ac_status" >&5
23516   (exit "$ac_status"); }; }; then
23517   ac_cv_func_fork_works=yes
23518 else
23519   echo "$as_me: program exited with status $ac_status" >&5
23520 echo "$as_me: failed program was:" >&5
23521 cat "conftest.$ac_ext" >&5
23522 ac_cv_func_fork_works=no
23523 fi
23524 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23525 fi
23526 fi
23527 echo "$as_me:23527: result: $ac_cv_func_fork_works" >&5
23528 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23529
23530 fi
23531 if test "x$ac_cv_func_fork_works" = xcross; then
23532   case $host in
23533     *-*-amigaos* | *-*-msdosdjgpp*)
23534       # Override, as these systems have only a dummy fork() stub
23535       ac_cv_func_fork_works=no
23536       ;;
23537     *)
23538       ac_cv_func_fork_works=yes
23539       ;;
23540   esac
23541   { echo "$as_me:23541: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23542 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23543 fi
23544 ac_cv_func_vfork_works=$ac_cv_func_vfork
23545 if test "x$ac_cv_func_vfork" = xyes; then
23546   echo "$as_me:23546: checking for working vfork" >&5
23547 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23548 if test "${ac_cv_func_vfork_works+set}" = set; then
23549   echo $ECHO_N "(cached) $ECHO_C" >&6
23550 else
23551   if test "$cross_compiling" = yes; then
23552   ac_cv_func_vfork_works=cross
23553 else
23554   cat >"conftest.$ac_ext" <<_ACEOF
23555 #line 23555 "configure"
23556 #include "confdefs.h"
23557 /* Thanks to Paul Eggert for this test.  */
23558 #include <stdio.h>
23559 #include <sys/types.h>
23560 #include <sys/stat.h>
23561 #if HAVE_UNISTD_H
23562 # include <unistd.h>
23563 #endif
23564 #if HAVE_VFORK_H
23565 # include <vfork.h>
23566 #endif
23567 /* On some sparc systems, changes by the child to local and incoming
23568    argument registers are propagated back to the parent.  The compiler
23569    is told about this with #include <vfork.h>, but some compilers
23570    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23571    static variable whose address is put into a register that is
23572    clobbered by the vfork.  */
23573 static
23574 #ifdef __cplusplus
23575 sparc_address_test (int arg)
23576 # else
23577 sparc_address_test (arg) int arg;
23578 #endif
23579 {
23580   static pid_t child;
23581   if (!child) {
23582     child = vfork ();
23583     if (child < 0) {
23584       perror ("vfork");
23585       _exit(2);
23586     }
23587     if (!child) {
23588       arg = getpid();
23589       write(-1, "", 0);
23590       _exit (arg);
23591     }
23592   }
23593 }
23594
23595 int
23596 main (void)
23597 {
23598   pid_t parent = getpid ();
23599   pid_t child;
23600
23601   sparc_address_test ();
23602
23603   child = vfork ();
23604
23605   if (child == 0) {
23606     /* Here is another test for sparc vfork register problems.  This
23607        test uses lots of local variables, at least as many local
23608        variables as main has allocated so far including compiler
23609        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23610        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23611        reuse the register of parent for one of the local variables,
23612        since it will think that parent can't possibly be used any more
23613        in this routine.  Assigning to the local variable will thus
23614        munge parent in the parent process.  */
23615     pid_t
23616       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23617       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23618     /* Convince the compiler that p..p7 are live; otherwise, it might
23619        use the same hardware register for all 8 local variables.  */
23620     if (p != p1 || p != p2 || p != p3 || p != p4
23621         || p != p5 || p != p6 || p != p7)
23622       _exit(1);
23623
23624     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23625        from child file descriptors.  If the child closes a descriptor
23626        before it execs or exits, this munges the parent's descriptor
23627        as well.  Test for this by closing stdout in the child.  */
23628     _exit(close(fileno(stdout)) != 0);
23629   } else {
23630     int status;
23631     struct stat st;
23632
23633     while (wait(&status) != child)
23634       ;
23635     $ac_main_return(
23636          /* Was there some problem with vforking?  */
23637          child < 0
23638
23639          /* Did the child fail?  (This shouldn't happen.)  */
23640          || status
23641
23642          /* Did the vfork/compiler bug occur?  */
23643          || parent != getpid()
23644
23645          /* Did the file descriptor bug occur?  */
23646          || fstat(fileno(stdout), &st) != 0
23647          );
23648   }
23649 }
23650 _ACEOF
23651 rm -f "conftest$ac_exeext"
23652 if { (eval echo "$as_me:23652: \"$ac_link\"") >&5
23653   (eval $ac_link) 2>&5
23654   ac_status=$?
23655   echo "$as_me:23655: \$? = $ac_status" >&5
23656   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23657   { (eval echo "$as_me:23657: \"$ac_try\"") >&5
23658   (eval $ac_try) 2>&5
23659   ac_status=$?
23660   echo "$as_me:23660: \$? = $ac_status" >&5
23661   (exit "$ac_status"); }; }; then
23662   ac_cv_func_vfork_works=yes
23663 else
23664   echo "$as_me: program exited with status $ac_status" >&5
23665 echo "$as_me: failed program was:" >&5
23666 cat "conftest.$ac_ext" >&5
23667 ac_cv_func_vfork_works=no
23668 fi
23669 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23670 fi
23671 fi
23672 echo "$as_me:23672: result: $ac_cv_func_vfork_works" >&5
23673 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23674
23675 fi;
23676 if test "x$ac_cv_func_fork_works" = xcross; then
23677   ac_cv_func_vfork_works=ac_cv_func_vfork
23678   { echo "$as_me:23678: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23679 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23680 fi
23681
23682 if test "x$ac_cv_func_vfork_works" = xyes; then
23683
23684 cat >>confdefs.h <<\EOF
23685 #define HAVE_WORKING_VFORK 1
23686 EOF
23687
23688 else
23689
23690 cat >>confdefs.h <<\EOF
23691 #define vfork fork
23692 EOF
23693
23694 fi
23695 if test "x$ac_cv_func_fork_works" = xyes; then
23696
23697 cat >>confdefs.h <<\EOF
23698 #define HAVE_WORKING_FORK 1
23699 EOF
23700
23701 fi
23702
23703 echo "$as_me:23703: checking if fopen accepts explicit binary mode" >&5
23704 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23705 if test "${cf_cv_fopen_bin_r+set}" = set; then
23706   echo $ECHO_N "(cached) $ECHO_C" >&6
23707 else
23708
23709         if test "$cross_compiling" = yes; then
23710   cf_cv_fopen_bin_r=unknown
23711 else
23712   cat >"conftest.$ac_ext" <<_ACEOF
23713 #line 23713 "configure"
23714 #include "confdefs.h"
23715
23716 #include <stdio.h>
23717 int main(void) {
23718         FILE *fp = fopen("conftest.tmp", "wb");
23719         int rc = 0;
23720         if (fp != 0) {
23721                 int p, q;
23722                 for (p = 0; p < 256; ++p) {
23723                         fputc(p, fp);
23724                 }
23725                 fclose(fp);
23726                 fp = fopen("conftest.tmp", "rb");
23727                 if (fp != 0) {
23728                         for (p = 0; p < 256; ++p) {
23729                                 q = fgetc(fp);
23730                                 if (q != p) {
23731                                         rc = 1;
23732                                         break;
23733                                 }
23734                         }
23735                 } else {
23736                         rc = 1;
23737                 }
23738         } else {
23739                 rc = 1;
23740         }
23741         ${cf_cv_main_return:-return} (rc);
23742 }
23743
23744 _ACEOF
23745 rm -f "conftest$ac_exeext"
23746 if { (eval echo "$as_me:23746: \"$ac_link\"") >&5
23747   (eval $ac_link) 2>&5
23748   ac_status=$?
23749   echo "$as_me:23749: \$? = $ac_status" >&5
23750   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23751   { (eval echo "$as_me:23751: \"$ac_try\"") >&5
23752   (eval $ac_try) 2>&5
23753   ac_status=$?
23754   echo "$as_me:23754: \$? = $ac_status" >&5
23755   (exit "$ac_status"); }; }; then
23756   cf_cv_fopen_bin_r=yes
23757 else
23758   echo "$as_me: program exited with status $ac_status" >&5
23759 echo "$as_me: failed program was:" >&5
23760 cat "conftest.$ac_ext" >&5
23761 cf_cv_fopen_bin_r=no
23762 fi
23763 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23764 fi
23765
23766 fi
23767 echo "$as_me:23767: result: $cf_cv_fopen_bin_r" >&5
23768 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23769 test "x$cf_cv_fopen_bin_r" != xno &&
23770 cat >>confdefs.h <<\EOF
23771 #define USE_FOPEN_BIN_R 1
23772 EOF
23773
23774 # special check for test/ditto.c
23775
23776 echo "$as_me:23776: checking for openpty in -lutil" >&5
23777 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23778 if test "${ac_cv_lib_util_openpty+set}" = set; then
23779   echo $ECHO_N "(cached) $ECHO_C" >&6
23780 else
23781   ac_check_lib_save_LIBS=$LIBS
23782 LIBS="-lutil  $LIBS"
23783 cat >"conftest.$ac_ext" <<_ACEOF
23784 #line 23784 "configure"
23785 #include "confdefs.h"
23786
23787 /* Override any gcc2 internal prototype to avoid an error.  */
23788 #ifdef __cplusplus
23789 extern "C"
23790 #endif
23791 /* We use char because int might match the return type of a gcc2
23792    builtin and then its argument prototype would still apply.  */
23793 char openpty ();
23794 int
23795 main (void)
23796 {
23797 openpty ();
23798   ;
23799   return 0;
23800 }
23801 _ACEOF
23802 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23803 if { (eval echo "$as_me:23803: \"$ac_link\"") >&5
23804   (eval $ac_link) 2>&5
23805   ac_status=$?
23806   echo "$as_me:23806: \$? = $ac_status" >&5
23807   (exit "$ac_status"); } &&
23808          { ac_try='test -s "conftest$ac_exeext"'
23809   { (eval echo "$as_me:23809: \"$ac_try\"") >&5
23810   (eval $ac_try) 2>&5
23811   ac_status=$?
23812   echo "$as_me:23812: \$? = $ac_status" >&5
23813   (exit "$ac_status"); }; }; then
23814   ac_cv_lib_util_openpty=yes
23815 else
23816   echo "$as_me: failed program was:" >&5
23817 cat "conftest.$ac_ext" >&5
23818 ac_cv_lib_util_openpty=no
23819 fi
23820 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23821 LIBS=$ac_check_lib_save_LIBS
23822 fi
23823 echo "$as_me:23823: result: $ac_cv_lib_util_openpty" >&5
23824 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23825 if test "$ac_cv_lib_util_openpty" = yes; then
23826   cf_cv_lib_util=yes
23827 else
23828   cf_cv_lib_util=no
23829 fi
23830
23831 echo "$as_me:23831: checking for openpty header" >&5
23832 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23833 if test "${cf_cv_func_openpty+set}" = set; then
23834   echo $ECHO_N "(cached) $ECHO_C" >&6
23835 else
23836
23837         cf_save_LIBS="$LIBS"
23838         test "$cf_cv_lib_util" = yes && {
23839 cf_add_libs="$LIBS"
23840 # reverse order
23841 cf_add_0lib=
23842 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23843 # filter duplicates
23844 for cf_add_1lib in $cf_add_0lib; do
23845         for cf_add_2lib in $cf_add_libs; do
23846                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23847                         cf_add_1lib=
23848                         break
23849                 fi
23850         done
23851         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23852 done
23853 LIBS="$cf_add_libs"
23854  }
23855         for cf_header in pty.h libutil.h util.h
23856         do
23857         cat >"conftest.$ac_ext" <<_ACEOF
23858 #line 23858 "configure"
23859 #include "confdefs.h"
23860
23861 #include <$cf_header>
23862
23863 int
23864 main (void)
23865 {
23866
23867         int x = openpty((int *)0, (int *)0, (char *)0,
23868                                    (struct termios *)0, (struct winsize *)0);
23869
23870   ;
23871   return 0;
23872 }
23873 _ACEOF
23874 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23875 if { (eval echo "$as_me:23875: \"$ac_link\"") >&5
23876   (eval $ac_link) 2>&5
23877   ac_status=$?
23878   echo "$as_me:23878: \$? = $ac_status" >&5
23879   (exit "$ac_status"); } &&
23880          { ac_try='test -s "conftest$ac_exeext"'
23881   { (eval echo "$as_me:23881: \"$ac_try\"") >&5
23882   (eval $ac_try) 2>&5
23883   ac_status=$?
23884   echo "$as_me:23884: \$? = $ac_status" >&5
23885   (exit "$ac_status"); }; }; then
23886
23887                 cf_cv_func_openpty=$cf_header
23888                 break
23889
23890 else
23891   echo "$as_me: failed program was:" >&5
23892 cat "conftest.$ac_ext" >&5
23893
23894                 cf_cv_func_openpty=no
23895
23896 fi
23897 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23898         done
23899         LIBS="$cf_save_LIBS"
23900
23901 fi
23902 echo "$as_me:23902: result: $cf_cv_func_openpty" >&5
23903 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23904
23905 if test "$cf_cv_func_openpty" != no ; then
23906
23907 cat >>confdefs.h <<EOF
23908 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23909 EOF
23910
23911 cat >>confdefs.h <<\EOF
23912 #define USE_XTERM_PTY 1
23913 EOF
23914
23915         if test "x$cf_cv_lib_util" = xyes ; then
23916
23917 cf_add_libs="$TEST_LIBS"
23918 # reverse order
23919 cf_add_0lib=
23920 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23921 # filter duplicates
23922 for cf_add_1lib in $cf_add_0lib; do
23923         for cf_add_2lib in $cf_add_libs; do
23924                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23925                         cf_add_1lib=
23926                         break
23927                 fi
23928         done
23929         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23930 done
23931 TEST_LIBS="$cf_add_libs"
23932
23933         fi
23934 fi
23935
23936 if test "$with_hashed_db" != no ; then
23937
23938 cat >>confdefs.h <<\EOF
23939 #define USE_HASHED_DB 1
23940 EOF
23941
23942 case $with_hashed_db in
23943 (yes|*able*)
23944         ;;
23945 (*)
23946         if test -d "$with_hashed_db" ; then
23947
23948 if test -n "$with_hashed_db/include" ; then
23949   for cf_add_incdir in $with_hashed_db/include
23950   do
23951         while test "$cf_add_incdir" != /usr/include
23952         do
23953           if test -d "$cf_add_incdir"
23954           then
23955                 cf_have_incdir=no
23956                 if test -n "$CFLAGS$CPPFLAGS" ; then
23957                   # a loop is needed to ensure we can add subdirs of existing dirs
23958                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23959                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23960                           cf_have_incdir=yes; break
23961                         fi
23962                   done
23963                 fi
23964
23965                 if test "$cf_have_incdir" = no ; then
23966                   if test "$cf_add_incdir" = /usr/local/include ; then
23967                         if test "$GCC" = yes
23968                         then
23969                           cf_save_CPPFLAGS=$CPPFLAGS
23970
23971         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23972         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23973
23974                           cat >"conftest.$ac_ext" <<_ACEOF
23975 #line 23975 "configure"
23976 #include "confdefs.h"
23977 #include <stdio.h>
23978 int
23979 main (void)
23980 {
23981 printf("Hello")
23982   ;
23983   return 0;
23984 }
23985 _ACEOF
23986 rm -f "conftest.$ac_objext"
23987 if { (eval echo "$as_me:23987: \"$ac_compile\"") >&5
23988   (eval $ac_compile) 2>&5
23989   ac_status=$?
23990   echo "$as_me:23990: \$? = $ac_status" >&5
23991   (exit "$ac_status"); } &&
23992          { ac_try='test -s "conftest.$ac_objext"'
23993   { (eval echo "$as_me:23993: \"$ac_try\"") >&5
23994   (eval $ac_try) 2>&5
23995   ac_status=$?
23996   echo "$as_me:23996: \$? = $ac_status" >&5
23997   (exit "$ac_status"); }; }; then
23998   :
23999 else
24000   echo "$as_me: failed program was:" >&5
24001 cat "conftest.$ac_ext" >&5
24002 cf_have_incdir=yes
24003 fi
24004 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24005                           CPPFLAGS=$cf_save_CPPFLAGS
24006                         fi
24007                   fi
24008                 fi
24009
24010                 if test "$cf_have_incdir" = no ; then
24011                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24012
24013 echo "${as_me:-configure}:24013: testing adding $cf_add_incdir to include-path ..." 1>&5
24014
24015                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24016
24017                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24018                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24019                   cf_add_incdir="$cf_top_incdir"
24020                 else
24021                   break
24022                 fi
24023           else
24024                 break
24025           fi
24026         done
24027   done
24028 fi
24029
24030 if test -n "$with_hashed_db/lib" ; then
24031         for cf_add_libdir in $with_hashed_db/lib
24032         do
24033                 if test "$cf_add_libdir" = /usr/lib ; then
24034                         :
24035                 elif test -d "$cf_add_libdir"
24036                 then
24037                         cf_have_libdir=no
24038                         if test -n "$LDFLAGS$LIBS" ; then
24039                                 # a loop is needed to ensure we can add subdirs of existing dirs
24040                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24041                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24042                                                 cf_have_libdir=yes; break
24043                                         fi
24044                                 done
24045                         fi
24046                         if test "$cf_have_libdir" = no ; then
24047                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24048
24049 echo "${as_me:-configure}:24049: testing adding $cf_add_libdir to library-path ..." 1>&5
24050
24051                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24052                         fi
24053                 fi
24054         done
24055 fi
24056
24057         else
24058                 case "$with_hashed_db" in
24059                 (./*|../*|/*)
24060                         { echo "$as_me:24060: WARNING: no such directory $with_hashed_db" >&5
24061 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24062                         ;;
24063                 (*)
24064
24065 cf_search=
24066
24067 test "x$prefix" != "xNONE" && \
24068 test -d "$prefix" && \
24069  {
24070         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24071         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24072         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24073         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24074         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24075         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24076 }
24077
24078 for cf_subdir_prefix in \
24079         /usr \
24080         /usr/local \
24081         /usr/pkg \
24082         /opt \
24083         /opt/local \
24084         $HOME
24085 do
24086
24087 test "x$cf_subdir_prefix" != "x$prefix" && \
24088 test -d "$cf_subdir_prefix" && \
24089 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24090         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24091         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24092         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24093         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24094         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24095         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"
24096 }
24097
24098 done
24099
24100         for cf_item in $cf_search
24101         do
24102                 case "$cf_item" in
24103                 (*/$with_hashed_db)
24104
24105 if test -n "$cf_item" ; then
24106   for cf_add_incdir in $cf_item
24107   do
24108         while test "$cf_add_incdir" != /usr/include
24109         do
24110           if test -d "$cf_add_incdir"
24111           then
24112                 cf_have_incdir=no
24113                 if test -n "$CFLAGS$CPPFLAGS" ; then
24114                   # a loop is needed to ensure we can add subdirs of existing dirs
24115                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24116                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24117                           cf_have_incdir=yes; break
24118                         fi
24119                   done
24120                 fi
24121
24122                 if test "$cf_have_incdir" = no ; then
24123                   if test "$cf_add_incdir" = /usr/local/include ; then
24124                         if test "$GCC" = yes
24125                         then
24126                           cf_save_CPPFLAGS=$CPPFLAGS
24127
24128         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24129         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24130
24131                           cat >"conftest.$ac_ext" <<_ACEOF
24132 #line 24132 "configure"
24133 #include "confdefs.h"
24134 #include <stdio.h>
24135 int
24136 main (void)
24137 {
24138 printf("Hello")
24139   ;
24140   return 0;
24141 }
24142 _ACEOF
24143 rm -f "conftest.$ac_objext"
24144 if { (eval echo "$as_me:24144: \"$ac_compile\"") >&5
24145   (eval $ac_compile) 2>&5
24146   ac_status=$?
24147   echo "$as_me:24147: \$? = $ac_status" >&5
24148   (exit "$ac_status"); } &&
24149          { ac_try='test -s "conftest.$ac_objext"'
24150   { (eval echo "$as_me:24150: \"$ac_try\"") >&5
24151   (eval $ac_try) 2>&5
24152   ac_status=$?
24153   echo "$as_me:24153: \$? = $ac_status" >&5
24154   (exit "$ac_status"); }; }; then
24155   :
24156 else
24157   echo "$as_me: failed program was:" >&5
24158 cat "conftest.$ac_ext" >&5
24159 cf_have_incdir=yes
24160 fi
24161 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24162                           CPPFLAGS=$cf_save_CPPFLAGS
24163                         fi
24164                   fi
24165                 fi
24166
24167                 if test "$cf_have_incdir" = no ; then
24168                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24169
24170 echo "${as_me:-configure}:24170: testing adding $cf_add_incdir to include-path ..." 1>&5
24171
24172                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24173
24174                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24175                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24176                   cf_add_incdir="$cf_top_incdir"
24177                 else
24178                   break
24179                 fi
24180           else
24181                 break
24182           fi
24183         done
24184   done
24185 fi
24186
24187                         ;;
24188                 esac
24189         done
24190
24191 cf_search=
24192
24193 test "x$prefix" != "xNONE" && \
24194 test -d "$prefix" && \
24195  {
24196         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24197         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24198         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24199         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24200         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24201         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24202 }
24203
24204 for cf_subdir_prefix in \
24205         /usr \
24206         /usr/local \
24207         /usr/pkg \
24208         /opt \
24209         /opt/local \
24210         $HOME
24211 do
24212
24213 test "x$cf_subdir_prefix" != "x$prefix" && \
24214 test -d "$cf_subdir_prefix" && \
24215 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24216         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24217         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24218         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24219         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24220         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24221         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"
24222 }
24223
24224 done
24225
24226         for cf_item in $cf_search
24227         do
24228                 case "$cf_item" in
24229                 (*/$with_hashed_db)
24230
24231 if test -n "$cf_item" ; then
24232         for cf_add_libdir in $cf_item
24233         do
24234                 if test "$cf_add_libdir" = /usr/lib ; then
24235                         :
24236                 elif test -d "$cf_add_libdir"
24237                 then
24238                         cf_have_libdir=no
24239                         if test -n "$LDFLAGS$LIBS" ; then
24240                                 # a loop is needed to ensure we can add subdirs of existing dirs
24241                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24242                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24243                                                 cf_have_libdir=yes; break
24244                                         fi
24245                                 done
24246                         fi
24247                         if test "$cf_have_libdir" = no ; then
24248                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24249
24250 echo "${as_me:-configure}:24250: testing adding $cf_add_libdir to library-path ..." 1>&5
24251
24252                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24253                         fi
24254                 fi
24255         done
24256 fi
24257
24258                         ;;
24259                 esac
24260         done
24261
24262                         ;;
24263                 esac
24264         fi
24265 esac
24266
24267 echo "$as_me:24267: checking for db.h" >&5
24268 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24269 if test "${ac_cv_header_db_h+set}" = set; then
24270   echo $ECHO_N "(cached) $ECHO_C" >&6
24271 else
24272   cat >"conftest.$ac_ext" <<_ACEOF
24273 #line 24273 "configure"
24274 #include "confdefs.h"
24275 #include <db.h>
24276 _ACEOF
24277 if { (eval echo "$as_me:24277: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24278   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24279   ac_status=$?
24280   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24281   rm -f conftest.er1
24282   cat conftest.err >&5
24283   echo "$as_me:24283: \$? = $ac_status" >&5
24284   (exit "$ac_status"); } >/dev/null; then
24285   if test -s conftest.err; then
24286     ac_cpp_err=$ac_c_preproc_warn_flag
24287   else
24288     ac_cpp_err=
24289   fi
24290 else
24291   ac_cpp_err=yes
24292 fi
24293 if test -z "$ac_cpp_err"; then
24294   ac_cv_header_db_h=yes
24295 else
24296   echo "$as_me: failed program was:" >&5
24297   cat "conftest.$ac_ext" >&5
24298   ac_cv_header_db_h=no
24299 fi
24300 rm -f conftest.err "conftest.$ac_ext"
24301 fi
24302 echo "$as_me:24302: result: $ac_cv_header_db_h" >&5
24303 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24304 if test "$ac_cv_header_db_h" = yes; then
24305
24306 echo "$as_me:24306: checking for version of db" >&5
24307 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24308 if test "${cf_cv_hashed_db_version+set}" = set; then
24309   echo $ECHO_N "(cached) $ECHO_C" >&6
24310 else
24311
24312 cf_cv_hashed_db_version=unknown
24313
24314 for cf_db_version in 1 2 3 4 5 6
24315 do
24316
24317 echo "${as_me:-configure}:24317: testing checking for db version $cf_db_version ..." 1>&5
24318
24319         cat >"conftest.$ac_ext" <<_ACEOF
24320 #line 24320 "configure"
24321 #include "confdefs.h"
24322
24323 $ac_includes_default
24324 #include <db.h>
24325
24326 #ifdef DB_VERSION_MAJOR
24327         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24328 #if $cf_db_version == DB_VERSION_MAJOR
24329         /* ok */
24330 #else
24331         make an error
24332 #endif
24333 #else
24334 #if $cf_db_version == 1
24335         /* ok: assuming this is DB 1.8.5 */
24336 #else
24337         make an error
24338 #endif
24339 #endif
24340
24341 int
24342 main (void)
24343 {
24344 DBT *foo = 0
24345   ;
24346   return 0;
24347 }
24348 _ACEOF
24349 rm -f "conftest.$ac_objext"
24350 if { (eval echo "$as_me:24350: \"$ac_compile\"") >&5
24351   (eval $ac_compile) 2>&5
24352   ac_status=$?
24353   echo "$as_me:24353: \$? = $ac_status" >&5
24354   (exit "$ac_status"); } &&
24355          { ac_try='test -s "conftest.$ac_objext"'
24356   { (eval echo "$as_me:24356: \"$ac_try\"") >&5
24357   (eval $ac_try) 2>&5
24358   ac_status=$?
24359   echo "$as_me:24359: \$? = $ac_status" >&5
24360   (exit "$ac_status"); }; }; then
24361
24362         cf_cv_hashed_db_version=$cf_db_version
24363         break
24364
24365 else
24366   echo "$as_me: failed program was:" >&5
24367 cat "conftest.$ac_ext" >&5
24368 fi
24369 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24370 done
24371
24372 fi
24373 echo "$as_me:24373: result: $cf_cv_hashed_db_version" >&5
24374 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24375
24376 if test "$cf_cv_hashed_db_version" = unknown ; then
24377         { { echo "$as_me:24377: error: Cannot determine version of db" >&5
24378 echo "$as_me: error: Cannot determine version of db" >&2;}
24379    { (exit 1); exit 1; }; }
24380 else
24381
24382 echo "$as_me:24382: checking for db libraries" >&5
24383 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24384 if test "${cf_cv_hashed_db_libs+set}" = set; then
24385   echo $ECHO_N "(cached) $ECHO_C" >&6
24386 else
24387
24388 cf_cv_hashed_db_libs=unknown
24389 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24390 do
24391         cf_save_libs="$LIBS"
24392         if test -n "$cf_db_libs"; then
24393
24394 cf_add_libs="$LIBS"
24395 # reverse order
24396 cf_add_0lib=
24397 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24398 # filter duplicates
24399 for cf_add_1lib in $cf_add_0lib; do
24400         for cf_add_2lib in $cf_add_libs; do
24401                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24402                         cf_add_1lib=
24403                         break
24404                 fi
24405         done
24406         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24407 done
24408 LIBS="$cf_add_libs"
24409
24410         fi
24411
24412 echo "${as_me:-configure}:24412: testing checking for library $cf_db_libs ..." 1>&5
24413
24414         cat >"conftest.$ac_ext" <<_ACEOF
24415 #line 24415 "configure"
24416 #include "confdefs.h"
24417
24418 $ac_includes_default
24419 #include <db.h>
24420
24421 int
24422 main (void)
24423 {
24424
24425         char *path = "/tmp/foo";
24426 #ifdef DB_VERSION_MAJOR
24427 #if DB_VERSION_MAJOR >= 4
24428         DB *result = 0;
24429         db_create(&result, NULL, 0);
24430         result->open(result,
24431                 NULL,
24432                 path,
24433                 path,
24434                 DB_HASH,
24435                 DB_CREATE,
24436                 0644);
24437 #elif DB_VERSION_MAJOR >= 3
24438         DB *result = 0;
24439         db_create(&result, NULL, 0);
24440         result->open(result,
24441                 path,
24442                 path,
24443                 DB_HASH,
24444                 DB_CREATE,
24445                 0644);
24446 #elif DB_VERSION_MAJOR >= 2
24447         DB *result = 0;
24448         db_open(path,
24449                 DB_HASH,
24450                 DB_CREATE,
24451                 0644,
24452                 (DB_ENV *) 0,
24453                 (DB_INFO *) 0,
24454                 &result);
24455 #endif /* DB_VERSION_MAJOR */
24456 #else
24457         DB *result = dbopen(path,
24458                      2,
24459                      0644,
24460                      DB_HASH,
24461                      0);
24462 #endif
24463         ${cf_cv_main_return:-return}(result != 0)
24464
24465   ;
24466   return 0;
24467 }
24468 _ACEOF
24469 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24470 if { (eval echo "$as_me:24470: \"$ac_link\"") >&5
24471   (eval $ac_link) 2>&5
24472   ac_status=$?
24473   echo "$as_me:24473: \$? = $ac_status" >&5
24474   (exit "$ac_status"); } &&
24475          { ac_try='test -s "conftest$ac_exeext"'
24476   { (eval echo "$as_me:24476: \"$ac_try\"") >&5
24477   (eval $ac_try) 2>&5
24478   ac_status=$?
24479   echo "$as_me:24479: \$? = $ac_status" >&5
24480   (exit "$ac_status"); }; }; then
24481
24482         if test -n "$cf_db_libs" ; then
24483                 cf_cv_hashed_db_libs=$cf_db_libs
24484         else
24485                 cf_cv_hashed_db_libs=default
24486         fi
24487         LIBS="$cf_save_libs"
24488         break
24489
24490 else
24491   echo "$as_me: failed program was:" >&5
24492 cat "conftest.$ac_ext" >&5
24493 fi
24494 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24495         LIBS="$cf_save_libs"
24496 done
24497
24498 fi
24499 echo "$as_me:24499: result: $cf_cv_hashed_db_libs" >&5
24500 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24501
24502         if test "$cf_cv_hashed_db_libs" = unknown ; then
24503                 { { echo "$as_me:24503: error: Cannot determine library for db" >&5
24504 echo "$as_me: error: Cannot determine library for db" >&2;}
24505    { (exit 1); exit 1; }; }
24506         elif test "$cf_cv_hashed_db_libs" != default ; then
24507
24508 cf_add_libs="$LIBS"
24509 # reverse order
24510 cf_add_0lib=
24511 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24512 # filter duplicates
24513 for cf_add_1lib in $cf_add_0lib; do
24514         for cf_add_2lib in $cf_add_libs; do
24515                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24516                         cf_add_1lib=
24517                         break
24518                 fi
24519         done
24520         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24521 done
24522 LIBS="$cf_add_libs"
24523
24524         fi
24525 fi
24526
24527 else
24528
24529         { { echo "$as_me:24529: error: Cannot find db.h" >&5
24530 echo "$as_me: error: Cannot find db.h" >&2;}
24531    { (exit 1); exit 1; }; }
24532
24533 fi
24534
24535 fi
24536
24537 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24538         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24539         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24540 fi
24541
24542 # Just in case, check if the C compiler has a bool type.
24543
24544 echo "$as_me:24544: checking if we should include stdbool.h" >&5
24545 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24546
24547 if test "${cf_cv_header_stdbool_h+set}" = set; then
24548   echo $ECHO_N "(cached) $ECHO_C" >&6
24549 else
24550
24551         cat >"conftest.$ac_ext" <<_ACEOF
24552 #line 24552 "configure"
24553 #include "confdefs.h"
24554
24555 int
24556 main (void)
24557 {
24558 bool foo = false
24559   ;
24560   return 0;
24561 }
24562 _ACEOF
24563 rm -f "conftest.$ac_objext"
24564 if { (eval echo "$as_me:24564: \"$ac_compile\"") >&5
24565   (eval $ac_compile) 2>&5
24566   ac_status=$?
24567   echo "$as_me:24567: \$? = $ac_status" >&5
24568   (exit "$ac_status"); } &&
24569          { ac_try='test -s "conftest.$ac_objext"'
24570   { (eval echo "$as_me:24570: \"$ac_try\"") >&5
24571   (eval $ac_try) 2>&5
24572   ac_status=$?
24573   echo "$as_me:24573: \$? = $ac_status" >&5
24574   (exit "$ac_status"); }; }; then
24575   cf_cv_header_stdbool_h=0
24576 else
24577   echo "$as_me: failed program was:" >&5
24578 cat "conftest.$ac_ext" >&5
24579 cat >"conftest.$ac_ext" <<_ACEOF
24580 #line 24580 "configure"
24581 #include "confdefs.h"
24582
24583 #ifndef __BEOS__
24584 #include <stdbool.h>
24585 #endif
24586
24587 int
24588 main (void)
24589 {
24590 bool foo = false
24591   ;
24592   return 0;
24593 }
24594 _ACEOF
24595 rm -f "conftest.$ac_objext"
24596 if { (eval echo "$as_me:24596: \"$ac_compile\"") >&5
24597   (eval $ac_compile) 2>&5
24598   ac_status=$?
24599   echo "$as_me:24599: \$? = $ac_status" >&5
24600   (exit "$ac_status"); } &&
24601          { ac_try='test -s "conftest.$ac_objext"'
24602   { (eval echo "$as_me:24602: \"$ac_try\"") >&5
24603   (eval $ac_try) 2>&5
24604   ac_status=$?
24605   echo "$as_me:24605: \$? = $ac_status" >&5
24606   (exit "$ac_status"); }; }; then
24607   cf_cv_header_stdbool_h=1
24608 else
24609   echo "$as_me: failed program was:" >&5
24610 cat "conftest.$ac_ext" >&5
24611 cf_cv_header_stdbool_h=0
24612 fi
24613 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24614 fi
24615 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24616 fi
24617
24618 if test "$cf_cv_header_stdbool_h" = 1
24619 then    echo "$as_me:24619: result: yes" >&5
24620 echo "${ECHO_T}yes" >&6
24621 else    echo "$as_me:24621: result: no" >&5
24622 echo "${ECHO_T}no" >&6
24623 fi
24624
24625 echo "$as_me:24625: checking for builtin bool type" >&5
24626 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24627
24628 if test "${cf_cv_cc_bool_type+set}" = set; then
24629   echo $ECHO_N "(cached) $ECHO_C" >&6
24630 else
24631
24632         cat >"conftest.$ac_ext" <<_ACEOF
24633 #line 24633 "configure"
24634 #include "confdefs.h"
24635
24636 #include <stdio.h>
24637 #include <sys/types.h>
24638
24639 int
24640 main (void)
24641 {
24642 bool x = false
24643   ;
24644   return 0;
24645 }
24646 _ACEOF
24647 rm -f "conftest.$ac_objext"
24648 if { (eval echo "$as_me:24648: \"$ac_compile\"") >&5
24649   (eval $ac_compile) 2>&5
24650   ac_status=$?
24651   echo "$as_me:24651: \$? = $ac_status" >&5
24652   (exit "$ac_status"); } &&
24653          { ac_try='test -s "conftest.$ac_objext"'
24654   { (eval echo "$as_me:24654: \"$ac_try\"") >&5
24655   (eval $ac_try) 2>&5
24656   ac_status=$?
24657   echo "$as_me:24657: \$? = $ac_status" >&5
24658   (exit "$ac_status"); }; }; then
24659   cf_cv_cc_bool_type=1
24660 else
24661   echo "$as_me: failed program was:" >&5
24662 cat "conftest.$ac_ext" >&5
24663 cf_cv_cc_bool_type=0
24664 fi
24665 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24666
24667 fi
24668
24669 if test "$cf_cv_cc_bool_type" = 1
24670 then    echo "$as_me:24670: result: yes" >&5
24671 echo "${ECHO_T}yes" >&6
24672 else    echo "$as_me:24672: result: no" >&5
24673 echo "${ECHO_T}no" >&6
24674 fi
24675
24676 # Check for C++ compiler characteristics (and ensure that it's there!)
24677 if test -n "$CXX" ; then
24678         ac_ext=cc
24679 ac_cpp='$CXXCPP $CPPFLAGS'
24680 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24681 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24682 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24683 ac_main_return="return"
24684
24685 if test -n "$GXX" ; then
24686
24687         cf_save="$LIBS"
24688         LIBS="$LIBS $CXXLIBS"
24689         echo "$as_me:24689: checking if we already have C++ library" >&5
24690 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24691         cat >"conftest.$ac_ext" <<_ACEOF
24692 #line 24692 "configure"
24693 #include "confdefs.h"
24694
24695                         #include <iostream>
24696 int
24697 main (void)
24698 {
24699
24700                         std::cout << "Hello World!" << std::endl;
24701   ;
24702   return 0;
24703 }
24704 _ACEOF
24705 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24706 if { (eval echo "$as_me:24706: \"$ac_link\"") >&5
24707   (eval $ac_link) 2>&5
24708   ac_status=$?
24709   echo "$as_me:24709: \$? = $ac_status" >&5
24710   (exit "$ac_status"); } &&
24711          { ac_try='test -s "conftest$ac_exeext"'
24712   { (eval echo "$as_me:24712: \"$ac_try\"") >&5
24713   (eval $ac_try) 2>&5
24714   ac_status=$?
24715   echo "$as_me:24715: \$? = $ac_status" >&5
24716   (exit "$ac_status"); }; }; then
24717   cf_have_libstdcpp=yes
24718 else
24719   echo "$as_me: failed program was:" >&5
24720 cat "conftest.$ac_ext" >&5
24721 cf_have_libstdcpp=no
24722 fi
24723 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24724         echo "$as_me:24724: result: $cf_have_libstdcpp" >&5
24725 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24726         LIBS="$cf_save"
24727
24728         if test "$cf_have_libstdcpp" != yes
24729         then
24730                 case "$cf_cv_system_name" in
24731                 (os2*)
24732                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24733                                 cf_stdcpp_libname=stdcpp
24734                         else
24735                                 cf_stdcpp_libname=stdc++
24736                         fi
24737                         ;;
24738                 (*)
24739                         cf_stdcpp_libname=stdc++
24740                         ;;
24741                 esac
24742
24743                 echo "$as_me:24743: checking for library $cf_stdcpp_libname" >&5
24744 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24745 if test "${cf_cv_libstdcpp+set}" = set; then
24746   echo $ECHO_N "(cached) $ECHO_C" >&6
24747 else
24748
24749                         cf_save="$LIBS"
24750                         LIBS="$LIBS $CXXLIBS"
24751
24752 cf_add_libs="$LIBS"
24753 # reverse order
24754 cf_add_0lib=
24755 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24756 # filter duplicates
24757 for cf_add_1lib in $cf_add_0lib; do
24758         for cf_add_2lib in $cf_add_libs; do
24759                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24760                         cf_add_1lib=
24761                         break
24762                 fi
24763         done
24764         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24765 done
24766 LIBS="$cf_add_libs"
24767
24768                 cat >"conftest.$ac_ext" <<_ACEOF
24769 #line 24769 "configure"
24770 #include "confdefs.h"
24771
24772                                 #include <iostream>
24773 int
24774 main (void)
24775 {
24776
24777                                 std::cout << "Hello World!" << std::endl;
24778   ;
24779   return 0;
24780 }
24781 _ACEOF
24782 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24783 if { (eval echo "$as_me:24783: \"$ac_link\"") >&5
24784   (eval $ac_link) 2>&5
24785   ac_status=$?
24786   echo "$as_me:24786: \$? = $ac_status" >&5
24787   (exit "$ac_status"); } &&
24788          { ac_try='test -s "conftest$ac_exeext"'
24789   { (eval echo "$as_me:24789: \"$ac_try\"") >&5
24790   (eval $ac_try) 2>&5
24791   ac_status=$?
24792   echo "$as_me:24792: \$? = $ac_status" >&5
24793   (exit "$ac_status"); }; }; then
24794   cf_cv_libstdcpp=yes
24795 else
24796   echo "$as_me: failed program was:" >&5
24797 cat "conftest.$ac_ext" >&5
24798 cf_cv_libstdcpp=no
24799 fi
24800 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24801                         LIBS="$cf_save"
24802
24803 fi
24804 echo "$as_me:24804: result: $cf_cv_libstdcpp" >&5
24805 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24806                 test "$cf_cv_libstdcpp" = yes && {
24807 cf_add_libs="$CXXLIBS"
24808 # reverse order
24809 cf_add_0lib=
24810 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24811 # filter duplicates
24812 for cf_add_1lib in $cf_add_0lib; do
24813         for cf_add_2lib in $cf_add_libs; do
24814                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24815                         cf_add_1lib=
24816                         break
24817                 fi
24818         done
24819         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24820 done
24821 CXXLIBS="$cf_add_libs"
24822  }
24823         fi
24824 fi
24825
24826         echo "$as_me:24826: checking whether $CXX understands -c and -o together" >&5
24827 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24828 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24829   echo $ECHO_N "(cached) $ECHO_C" >&6
24830 else
24831
24832 cat > conftest.$ac_ext <<CF_EOF
24833 int main(void)
24834 {
24835         ${cf_cv_main_return:-return}(0);
24836 }
24837 CF_EOF
24838 # We do the test twice because some compilers refuse to overwrite an
24839 # existing .o file with -o, though they will create one.
24840 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24841 if { (eval echo "$as_me:24841: \"$ac_try\"") >&5
24842   (eval $ac_try) 2>&5
24843   ac_status=$?
24844   echo "$as_me:24844: \$? = $ac_status" >&5
24845   (exit "$ac_status"); } &&
24846   test -f conftest2.$ac_objext && { (eval echo "$as_me:24846: \"$ac_try\"") >&5
24847   (eval $ac_try) 2>&5
24848   ac_status=$?
24849   echo "$as_me:24849: \$? = $ac_status" >&5
24850   (exit "$ac_status"); };
24851 then
24852   eval cf_cv_prog_CXX_c_o=yes
24853 else
24854   eval cf_cv_prog_CXX_c_o=no
24855 fi
24856 rm -rf ./conftest*
24857
24858 fi
24859 if test "$cf_cv_prog_CXX_c_o" = yes; then
24860   echo "$as_me:24860: result: yes" >&5
24861 echo "${ECHO_T}yes" >&6
24862 else
24863   echo "$as_me:24863: result: no" >&5
24864 echo "${ECHO_T}no" >&6
24865 fi
24866
24867         case "$GXX_VERSION" in
24868         (1.*|2.[0-6]*|[1-9][0-9].*)
24869                 cf_cxx_library=yes
24870                 ;;
24871         (*-2.7*|2.7*)
24872
24873 cf_cxx_library=unknown
24874 case "$cf_cv_system_name" in
24875 (os2*)
24876         cf_gpp_libname=gpp
24877         ;;
24878 (*)
24879         cf_gpp_libname=g++
24880         ;;
24881 esac
24882 if test "$GXX" = yes; then
24883         echo "$as_me:24883: checking for lib$cf_gpp_libname" >&5
24884 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24885         cf_save="$LIBS"
24886
24887 cf_add_libs="$LIBS"
24888 # reverse order
24889 cf_add_0lib=
24890 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24891 # filter duplicates
24892 for cf_add_1lib in $cf_add_0lib; do
24893         for cf_add_2lib in $cf_add_libs; do
24894                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24895                         cf_add_1lib=
24896                         break
24897                 fi
24898         done
24899         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24900 done
24901 LIBS="$cf_add_libs"
24902
24903         cat >"conftest.$ac_ext" <<_ACEOF
24904 #line 24904 "configure"
24905 #include "confdefs.h"
24906
24907 #include <$cf_gpp_libname/builtin.h>
24908
24909 int
24910 main (void)
24911 {
24912 two_arg_error_handler_t foo2 = lib_error_handler
24913   ;
24914   return 0;
24915 }
24916 _ACEOF
24917 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24918 if { (eval echo "$as_me:24918: \"$ac_link\"") >&5
24919   (eval $ac_link) 2>&5
24920   ac_status=$?
24921   echo "$as_me:24921: \$? = $ac_status" >&5
24922   (exit "$ac_status"); } &&
24923          { ac_try='test -s "conftest$ac_exeext"'
24924   { (eval echo "$as_me:24924: \"$ac_try\"") >&5
24925   (eval $ac_try) 2>&5
24926   ac_status=$?
24927   echo "$as_me:24927: \$? = $ac_status" >&5
24928   (exit "$ac_status"); }; }; then
24929   cf_cxx_library=yes
24930
24931 cf_add_libs="$CXXLIBS"
24932 # reverse order
24933 cf_add_0lib=
24934 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24935 # filter duplicates
24936 for cf_add_1lib in $cf_add_0lib; do
24937         for cf_add_2lib in $cf_add_libs; do
24938                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24939                         cf_add_1lib=
24940                         break
24941                 fi
24942         done
24943         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24944 done
24945 CXXLIBS="$cf_add_libs"
24946
24947          if test "$cf_gpp_libname" = cpp ; then
24948
24949 cat >>confdefs.h <<\EOF
24950 #define HAVE_GPP_BUILTIN_H 1
24951 EOF
24952
24953          else
24954
24955 cat >>confdefs.h <<\EOF
24956 #define HAVE_GXX_BUILTIN_H 1
24957 EOF
24958
24959          fi
24960 else
24961   echo "$as_me: failed program was:" >&5
24962 cat "conftest.$ac_ext" >&5
24963 cat >"conftest.$ac_ext" <<_ACEOF
24964 #line 24964 "configure"
24965 #include "confdefs.h"
24966
24967 #include <builtin.h>
24968
24969 int
24970 main (void)
24971 {
24972 two_arg_error_handler_t foo2 = lib_error_handler
24973   ;
24974   return 0;
24975 }
24976 _ACEOF
24977 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24978 if { (eval echo "$as_me:24978: \"$ac_link\"") >&5
24979   (eval $ac_link) 2>&5
24980   ac_status=$?
24981   echo "$as_me:24981: \$? = $ac_status" >&5
24982   (exit "$ac_status"); } &&
24983          { ac_try='test -s "conftest$ac_exeext"'
24984   { (eval echo "$as_me:24984: \"$ac_try\"") >&5
24985   (eval $ac_try) 2>&5
24986   ac_status=$?
24987   echo "$as_me:24987: \$? = $ac_status" >&5
24988   (exit "$ac_status"); }; }; then
24989   cf_cxx_library=yes
24990
24991 cf_add_libs="$CXXLIBS"
24992 # reverse order
24993 cf_add_0lib=
24994 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24995 # filter duplicates
24996 for cf_add_1lib in $cf_add_0lib; do
24997         for cf_add_2lib in $cf_add_libs; do
24998                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24999                         cf_add_1lib=
25000                         break
25001                 fi
25002         done
25003         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25004 done
25005 CXXLIBS="$cf_add_libs"
25006
25007 cat >>confdefs.h <<\EOF
25008 #define HAVE_BUILTIN_H 1
25009 EOF
25010
25011 else
25012   echo "$as_me: failed program was:" >&5
25013 cat "conftest.$ac_ext" >&5
25014 cf_cxx_library=no
25015 fi
25016 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25017 fi
25018 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25019         LIBS="$cf_save"
25020         echo "$as_me:25020: result: $cf_cxx_library" >&5
25021 echo "${ECHO_T}$cf_cxx_library" >&6
25022 fi
25023
25024                 ;;
25025         (*)
25026                 cf_cxx_library=no
25027                 ;;
25028         esac
25029
25030         ac_ext=cc
25031 ac_cpp='$CXXCPP $CPPFLAGS'
25032 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25033 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25034 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25035 ac_main_return="return"
25036 echo "$as_me:25036: checking how to run the C++ preprocessor" >&5
25037 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25038 if test -z "$CXXCPP"; then
25039   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25040   echo $ECHO_N "(cached) $ECHO_C" >&6
25041 else
25042       # Double quotes because CXXCPP needs to be expanded
25043     for CXXCPP in "$CXX -E" "/lib/cpp"
25044     do
25045       ac_preproc_ok=false
25046 for ac_cxx_preproc_warn_flag in '' yes
25047 do
25048   # Use a header file that comes with gcc, so configuring glibc
25049   # with a fresh cross-compiler works.
25050   # On the NeXT, cc -E runs the code through the compiler's parser,
25051   # not just through cpp. "Syntax error" is here to catch this case.
25052   cat >"conftest.$ac_ext" <<_ACEOF
25053 #line 25053 "configure"
25054 #include "confdefs.h"
25055 #include <assert.h>
25056                      Syntax error
25057 _ACEOF
25058 if { (eval echo "$as_me:25058: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25059   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25060   ac_status=$?
25061   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25062   rm -f conftest.er1
25063   cat conftest.err >&5
25064   echo "$as_me:25064: \$? = $ac_status" >&5
25065   (exit "$ac_status"); } >/dev/null; then
25066   if test -s conftest.err; then
25067     ac_cpp_err=$ac_cxx_preproc_warn_flag
25068   else
25069     ac_cpp_err=
25070   fi
25071 else
25072   ac_cpp_err=yes
25073 fi
25074 if test -z "$ac_cpp_err"; then
25075   :
25076 else
25077   echo "$as_me: failed program was:" >&5
25078   cat "conftest.$ac_ext" >&5
25079   # Broken: fails on valid input.
25080 continue
25081 fi
25082 rm -f conftest.err "conftest.$ac_ext"
25083
25084   # OK, works on sane cases.  Now check whether non-existent headers
25085   # can be detected and how.
25086   cat >"conftest.$ac_ext" <<_ACEOF
25087 #line 25087 "configure"
25088 #include "confdefs.h"
25089 #include <ac_nonexistent.h>
25090 _ACEOF
25091 if { (eval echo "$as_me:25091: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25092   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25093   ac_status=$?
25094   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25095   rm -f conftest.er1
25096   cat conftest.err >&5
25097   echo "$as_me:25097: \$? = $ac_status" >&5
25098   (exit "$ac_status"); } >/dev/null; then
25099   if test -s conftest.err; then
25100     ac_cpp_err=$ac_cxx_preproc_warn_flag
25101   else
25102     ac_cpp_err=
25103   fi
25104 else
25105   ac_cpp_err=yes
25106 fi
25107 if test -z "$ac_cpp_err"; then
25108   # Broken: success on invalid input.
25109 continue
25110 else
25111   echo "$as_me: failed program was:" >&5
25112   cat "conftest.$ac_ext" >&5
25113   # Passes both tests.
25114 ac_preproc_ok=:
25115 break
25116 fi
25117 rm -f conftest.err "conftest.$ac_ext"
25118
25119 done
25120 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25121 rm -f conftest.err "conftest.$ac_ext"
25122 if $ac_preproc_ok; then
25123   break
25124 fi
25125
25126     done
25127     ac_cv_prog_CXXCPP=$CXXCPP
25128
25129 fi
25130   CXXCPP=$ac_cv_prog_CXXCPP
25131 else
25132   ac_cv_prog_CXXCPP=$CXXCPP
25133 fi
25134 echo "$as_me:25134: result: $CXXCPP" >&5
25135 echo "${ECHO_T}$CXXCPP" >&6
25136 ac_preproc_ok=false
25137 for ac_cxx_preproc_warn_flag in '' yes
25138 do
25139   # Use a header file that comes with gcc, so configuring glibc
25140   # with a fresh cross-compiler works.
25141   # On the NeXT, cc -E runs the code through the compiler's parser,
25142   # not just through cpp. "Syntax error" is here to catch this case.
25143   cat >"conftest.$ac_ext" <<_ACEOF
25144 #line 25144 "configure"
25145 #include "confdefs.h"
25146 #include <assert.h>
25147                      Syntax error
25148 _ACEOF
25149 if { (eval echo "$as_me:25149: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25150   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25151   ac_status=$?
25152   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25153   rm -f conftest.er1
25154   cat conftest.err >&5
25155   echo "$as_me:25155: \$? = $ac_status" >&5
25156   (exit "$ac_status"); } >/dev/null; then
25157   if test -s conftest.err; then
25158     ac_cpp_err=$ac_cxx_preproc_warn_flag
25159   else
25160     ac_cpp_err=
25161   fi
25162 else
25163   ac_cpp_err=yes
25164 fi
25165 if test -z "$ac_cpp_err"; then
25166   :
25167 else
25168   echo "$as_me: failed program was:" >&5
25169   cat "conftest.$ac_ext" >&5
25170   # Broken: fails on valid input.
25171 continue
25172 fi
25173 rm -f conftest.err "conftest.$ac_ext"
25174
25175   # OK, works on sane cases.  Now check whether non-existent headers
25176   # can be detected and how.
25177   cat >"conftest.$ac_ext" <<_ACEOF
25178 #line 25178 "configure"
25179 #include "confdefs.h"
25180 #include <ac_nonexistent.h>
25181 _ACEOF
25182 if { (eval echo "$as_me:25182: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25183   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25184   ac_status=$?
25185   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25186   rm -f conftest.er1
25187   cat conftest.err >&5
25188   echo "$as_me:25188: \$? = $ac_status" >&5
25189   (exit "$ac_status"); } >/dev/null; then
25190   if test -s conftest.err; then
25191     ac_cpp_err=$ac_cxx_preproc_warn_flag
25192   else
25193     ac_cpp_err=
25194   fi
25195 else
25196   ac_cpp_err=yes
25197 fi
25198 if test -z "$ac_cpp_err"; then
25199   # Broken: success on invalid input.
25200 continue
25201 else
25202   echo "$as_me: failed program was:" >&5
25203   cat "conftest.$ac_ext" >&5
25204   # Passes both tests.
25205 ac_preproc_ok=:
25206 break
25207 fi
25208 rm -f conftest.err "conftest.$ac_ext"
25209
25210 done
25211 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25212 rm -f conftest.err "conftest.$ac_ext"
25213 if $ac_preproc_ok; then
25214   :
25215 else
25216   { { echo "$as_me:25216: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25217 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25218    { (exit 1); exit 1; }; }
25219 fi
25220
25221 ac_ext=cc
25222 ac_cpp='$CXXCPP $CPPFLAGS'
25223 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25224 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25225 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25226 ac_main_return="return"
25227
25228 for ac_header in typeinfo
25229 do
25230 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25231 echo "$as_me:25231: checking for $ac_header" >&5
25232 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25233 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25234   echo $ECHO_N "(cached) $ECHO_C" >&6
25235 else
25236   cat >"conftest.$ac_ext" <<_ACEOF
25237 #line 25237 "configure"
25238 #include "confdefs.h"
25239 #include <$ac_header>
25240 _ACEOF
25241 if { (eval echo "$as_me:25241: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25242   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25243   ac_status=$?
25244   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25245   rm -f conftest.er1
25246   cat conftest.err >&5
25247   echo "$as_me:25247: \$? = $ac_status" >&5
25248   (exit "$ac_status"); } >/dev/null; then
25249   if test -s conftest.err; then
25250     ac_cpp_err=$ac_cxx_preproc_warn_flag
25251   else
25252     ac_cpp_err=
25253   fi
25254 else
25255   ac_cpp_err=yes
25256 fi
25257 if test -z "$ac_cpp_err"; then
25258   eval "$as_ac_Header=yes"
25259 else
25260   echo "$as_me: failed program was:" >&5
25261   cat "conftest.$ac_ext" >&5
25262   eval "$as_ac_Header=no"
25263 fi
25264 rm -f conftest.err "conftest.$ac_ext"
25265 fi
25266 echo "$as_me:25266: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25267 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25268 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25269   cat >>confdefs.h <<EOF
25270 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25271 EOF
25272
25273 fi
25274 done
25275
25276 for ac_header in iostream
25277 do
25278 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25279 echo "$as_me:25279: checking for $ac_header" >&5
25280 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25281 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25282   echo $ECHO_N "(cached) $ECHO_C" >&6
25283 else
25284   cat >"conftest.$ac_ext" <<_ACEOF
25285 #line 25285 "configure"
25286 #include "confdefs.h"
25287 #include <$ac_header>
25288 _ACEOF
25289 if { (eval echo "$as_me:25289: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25290   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25291   ac_status=$?
25292   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25293   rm -f conftest.er1
25294   cat conftest.err >&5
25295   echo "$as_me:25295: \$? = $ac_status" >&5
25296   (exit "$ac_status"); } >/dev/null; then
25297   if test -s conftest.err; then
25298     ac_cpp_err=$ac_cxx_preproc_warn_flag
25299   else
25300     ac_cpp_err=
25301   fi
25302 else
25303   ac_cpp_err=yes
25304 fi
25305 if test -z "$ac_cpp_err"; then
25306   eval "$as_ac_Header=yes"
25307 else
25308   echo "$as_me: failed program was:" >&5
25309   cat "conftest.$ac_ext" >&5
25310   eval "$as_ac_Header=no"
25311 fi
25312 rm -f conftest.err "conftest.$ac_ext"
25313 fi
25314 echo "$as_me:25314: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25315 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25316 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25317   cat >>confdefs.h <<EOF
25318 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25319 EOF
25320
25321 fi
25322 done
25323
25324 if test x"$ac_cv_header_iostream" = xyes ; then
25325         echo "$as_me:25325: checking if iostream uses std-namespace" >&5
25326 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25327         cat >"conftest.$ac_ext" <<_ACEOF
25328 #line 25328 "configure"
25329 #include "confdefs.h"
25330
25331 #include <iostream>
25332 using std::endl;
25333 using std::cerr;
25334 int
25335 main (void)
25336 {
25337
25338 cerr << "testing" << endl;
25339
25340   ;
25341   return 0;
25342 }
25343 _ACEOF
25344 rm -f "conftest.$ac_objext"
25345 if { (eval echo "$as_me:25345: \"$ac_compile\"") >&5
25346   (eval $ac_compile) 2>&5
25347   ac_status=$?
25348   echo "$as_me:25348: \$? = $ac_status" >&5
25349   (exit "$ac_status"); } &&
25350          { ac_try='test -s "conftest.$ac_objext"'
25351   { (eval echo "$as_me:25351: \"$ac_try\"") >&5
25352   (eval $ac_try) 2>&5
25353   ac_status=$?
25354   echo "$as_me:25354: \$? = $ac_status" >&5
25355   (exit "$ac_status"); }; }; then
25356   cf_iostream_namespace=yes
25357 else
25358   echo "$as_me: failed program was:" >&5
25359 cat "conftest.$ac_ext" >&5
25360 cf_iostream_namespace=no
25361 fi
25362 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25363         echo "$as_me:25363: result: $cf_iostream_namespace" >&5
25364 echo "${ECHO_T}$cf_iostream_namespace" >&6
25365         if test "$cf_iostream_namespace" = yes ; then
25366
25367 cat >>confdefs.h <<\EOF
25368 #define IOSTREAM_NAMESPACE 1
25369 EOF
25370
25371         fi
25372 fi
25373
25374 echo "$as_me:25374: checking if we should include stdbool.h" >&5
25375 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25376
25377 if test "${cf_cv_header_stdbool_h+set}" = set; then
25378   echo $ECHO_N "(cached) $ECHO_C" >&6
25379 else
25380
25381         cat >"conftest.$ac_ext" <<_ACEOF
25382 #line 25382 "configure"
25383 #include "confdefs.h"
25384
25385 int
25386 main (void)
25387 {
25388 bool foo = false
25389   ;
25390   return 0;
25391 }
25392 _ACEOF
25393 rm -f "conftest.$ac_objext"
25394 if { (eval echo "$as_me:25394: \"$ac_compile\"") >&5
25395   (eval $ac_compile) 2>&5
25396   ac_status=$?
25397   echo "$as_me:25397: \$? = $ac_status" >&5
25398   (exit "$ac_status"); } &&
25399          { ac_try='test -s "conftest.$ac_objext"'
25400   { (eval echo "$as_me:25400: \"$ac_try\"") >&5
25401   (eval $ac_try) 2>&5
25402   ac_status=$?
25403   echo "$as_me:25403: \$? = $ac_status" >&5
25404   (exit "$ac_status"); }; }; then
25405   cf_cv_header_stdbool_h=0
25406 else
25407   echo "$as_me: failed program was:" >&5
25408 cat "conftest.$ac_ext" >&5
25409 cat >"conftest.$ac_ext" <<_ACEOF
25410 #line 25410 "configure"
25411 #include "confdefs.h"
25412
25413 #ifndef __BEOS__
25414 #include <stdbool.h>
25415 #endif
25416
25417 int
25418 main (void)
25419 {
25420 bool foo = false
25421   ;
25422   return 0;
25423 }
25424 _ACEOF
25425 rm -f "conftest.$ac_objext"
25426 if { (eval echo "$as_me:25426: \"$ac_compile\"") >&5
25427   (eval $ac_compile) 2>&5
25428   ac_status=$?
25429   echo "$as_me:25429: \$? = $ac_status" >&5
25430   (exit "$ac_status"); } &&
25431          { ac_try='test -s "conftest.$ac_objext"'
25432   { (eval echo "$as_me:25432: \"$ac_try\"") >&5
25433   (eval $ac_try) 2>&5
25434   ac_status=$?
25435   echo "$as_me:25435: \$? = $ac_status" >&5
25436   (exit "$ac_status"); }; }; then
25437   cf_cv_header_stdbool_h=1
25438 else
25439   echo "$as_me: failed program was:" >&5
25440 cat "conftest.$ac_ext" >&5
25441 cf_cv_header_stdbool_h=0
25442 fi
25443 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25444 fi
25445 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25446 fi
25447
25448 if test "$cf_cv_header_stdbool_h" = 1
25449 then    echo "$as_me:25449: result: yes" >&5
25450 echo "${ECHO_T}yes" >&6
25451 else    echo "$as_me:25451: result: no" >&5
25452 echo "${ECHO_T}no" >&6
25453 fi
25454
25455 echo "$as_me:25455: checking for builtin bool type" >&5
25456 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25457
25458 if test "${cf_cv_builtin_bool+set}" = set; then
25459   echo $ECHO_N "(cached) $ECHO_C" >&6
25460 else
25461
25462         cat >"conftest.$ac_ext" <<_ACEOF
25463 #line 25463 "configure"
25464 #include "confdefs.h"
25465
25466 #include <stdio.h>
25467 #include <sys/types.h>
25468
25469 int
25470 main (void)
25471 {
25472 bool x = false
25473   ;
25474   return 0;
25475 }
25476 _ACEOF
25477 rm -f "conftest.$ac_objext"
25478 if { (eval echo "$as_me:25478: \"$ac_compile\"") >&5
25479   (eval $ac_compile) 2>&5
25480   ac_status=$?
25481   echo "$as_me:25481: \$? = $ac_status" >&5
25482   (exit "$ac_status"); } &&
25483          { ac_try='test -s "conftest.$ac_objext"'
25484   { (eval echo "$as_me:25484: \"$ac_try\"") >&5
25485   (eval $ac_try) 2>&5
25486   ac_status=$?
25487   echo "$as_me:25487: \$? = $ac_status" >&5
25488   (exit "$ac_status"); }; }; then
25489   cf_cv_builtin_bool=1
25490 else
25491   echo "$as_me: failed program was:" >&5
25492 cat "conftest.$ac_ext" >&5
25493 cf_cv_builtin_bool=0
25494 fi
25495 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25496
25497 fi
25498
25499 if test "$cf_cv_builtin_bool" = 1
25500 then    echo "$as_me:25500: result: yes" >&5
25501 echo "${ECHO_T}yes" >&6
25502 else    echo "$as_me:25502: result: no" >&5
25503 echo "${ECHO_T}no" >&6
25504 fi
25505
25506 echo "$as_me:25506: checking for bool" >&5
25507 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25508 if test "${ac_cv_type_bool+set}" = set; then
25509   echo $ECHO_N "(cached) $ECHO_C" >&6
25510 else
25511   cat >"conftest.$ac_ext" <<_ACEOF
25512 #line 25512 "configure"
25513 #include "confdefs.h"
25514
25515 #include <stdlib.h>
25516 #include <stdio.h>
25517
25518 #if defined(__cplusplus)
25519
25520 #ifdef HAVE_GXX_BUILTIN_H
25521 #include <g++/builtin.h>
25522 #elif HAVE_GPP_BUILTIN_H
25523 #include <gpp/builtin.h>
25524 #elif HAVE_BUILTIN_H
25525 #include <builtin.h>
25526 #endif
25527
25528 #else
25529
25530 #if $cf_cv_header_stdbool_h
25531 #include <stdbool.h>
25532 #endif
25533
25534 #endif
25535
25536 int
25537 main (void)
25538 {
25539 if ((bool *) 0)
25540   return 0;
25541 if (sizeof (bool))
25542   return 0;
25543   ;
25544   return 0;
25545 }
25546 _ACEOF
25547 rm -f "conftest.$ac_objext"
25548 if { (eval echo "$as_me:25548: \"$ac_compile\"") >&5
25549   (eval $ac_compile) 2>&5
25550   ac_status=$?
25551   echo "$as_me:25551: \$? = $ac_status" >&5
25552   (exit "$ac_status"); } &&
25553          { ac_try='test -s "conftest.$ac_objext"'
25554   { (eval echo "$as_me:25554: \"$ac_try\"") >&5
25555   (eval $ac_try) 2>&5
25556   ac_status=$?
25557   echo "$as_me:25557: \$? = $ac_status" >&5
25558   (exit "$ac_status"); }; }; then
25559   ac_cv_type_bool=yes
25560 else
25561   echo "$as_me: failed program was:" >&5
25562 cat "conftest.$ac_ext" >&5
25563 ac_cv_type_bool=no
25564 fi
25565 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25566 fi
25567 echo "$as_me:25567: result: $ac_cv_type_bool" >&5
25568 echo "${ECHO_T}$ac_cv_type_bool" >&6
25569
25570 echo "$as_me:25570: checking size of bool" >&5
25571 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25572 if test "${ac_cv_sizeof_bool+set}" = set; then
25573   echo $ECHO_N "(cached) $ECHO_C" >&6
25574 else
25575   if test "$ac_cv_type_bool" = yes; then
25576   if test "$cross_compiling" = yes; then
25577   # Depending upon the size, compute the lo and hi bounds.
25578 cat >"conftest.$ac_ext" <<_ACEOF
25579 #line 25579 "configure"
25580 #include "confdefs.h"
25581
25582 #include <stdlib.h>
25583 #include <stdio.h>
25584
25585 #if defined(__cplusplus)
25586
25587 #ifdef HAVE_GXX_BUILTIN_H
25588 #include <g++/builtin.h>
25589 #elif HAVE_GPP_BUILTIN_H
25590 #include <gpp/builtin.h>
25591 #elif HAVE_BUILTIN_H
25592 #include <builtin.h>
25593 #endif
25594
25595 #else
25596
25597 #if $cf_cv_header_stdbool_h
25598 #include <stdbool.h>
25599 #endif
25600
25601 #endif
25602
25603 int
25604 main (void)
25605 {
25606 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25607   ;
25608   return 0;
25609 }
25610 _ACEOF
25611 rm -f "conftest.$ac_objext"
25612 if { (eval echo "$as_me:25612: \"$ac_compile\"") >&5
25613   (eval $ac_compile) 2>&5
25614   ac_status=$?
25615   echo "$as_me:25615: \$? = $ac_status" >&5
25616   (exit "$ac_status"); } &&
25617          { ac_try='test -s "conftest.$ac_objext"'
25618   { (eval echo "$as_me:25618: \"$ac_try\"") >&5
25619   (eval $ac_try) 2>&5
25620   ac_status=$?
25621   echo "$as_me:25621: \$? = $ac_status" >&5
25622   (exit "$ac_status"); }; }; then
25623   ac_lo=0 ac_mid=0
25624   while :; do
25625     cat >"conftest.$ac_ext" <<_ACEOF
25626 #line 25626 "configure"
25627 #include "confdefs.h"
25628
25629 #include <stdlib.h>
25630 #include <stdio.h>
25631
25632 #if defined(__cplusplus)
25633
25634 #ifdef HAVE_GXX_BUILTIN_H
25635 #include <g++/builtin.h>
25636 #elif HAVE_GPP_BUILTIN_H
25637 #include <gpp/builtin.h>
25638 #elif HAVE_BUILTIN_H
25639 #include <builtin.h>
25640 #endif
25641
25642 #else
25643
25644 #if $cf_cv_header_stdbool_h
25645 #include <stdbool.h>
25646 #endif
25647
25648 #endif
25649
25650 int
25651 main (void)
25652 {
25653 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25654   ;
25655   return 0;
25656 }
25657 _ACEOF
25658 rm -f "conftest.$ac_objext"
25659 if { (eval echo "$as_me:25659: \"$ac_compile\"") >&5
25660   (eval $ac_compile) 2>&5
25661   ac_status=$?
25662   echo "$as_me:25662: \$? = $ac_status" >&5
25663   (exit "$ac_status"); } &&
25664          { ac_try='test -s "conftest.$ac_objext"'
25665   { (eval echo "$as_me:25665: \"$ac_try\"") >&5
25666   (eval $ac_try) 2>&5
25667   ac_status=$?
25668   echo "$as_me:25668: \$? = $ac_status" >&5
25669   (exit "$ac_status"); }; }; then
25670   ac_hi=$ac_mid; break
25671 else
25672   echo "$as_me: failed program was:" >&5
25673 cat "conftest.$ac_ext" >&5
25674 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25675 fi
25676 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25677   done
25678 else
25679   echo "$as_me: failed program was:" >&5
25680 cat "conftest.$ac_ext" >&5
25681 ac_hi=-1 ac_mid=-1
25682   while :; do
25683     cat >"conftest.$ac_ext" <<_ACEOF
25684 #line 25684 "configure"
25685 #include "confdefs.h"
25686
25687 #include <stdlib.h>
25688 #include <stdio.h>
25689
25690 #if defined(__cplusplus)
25691
25692 #ifdef HAVE_GXX_BUILTIN_H
25693 #include <g++/builtin.h>
25694 #elif HAVE_GPP_BUILTIN_H
25695 #include <gpp/builtin.h>
25696 #elif HAVE_BUILTIN_H
25697 #include <builtin.h>
25698 #endif
25699
25700 #else
25701
25702 #if $cf_cv_header_stdbool_h
25703 #include <stdbool.h>
25704 #endif
25705
25706 #endif
25707
25708 int
25709 main (void)
25710 {
25711 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25712   ;
25713   return 0;
25714 }
25715 _ACEOF
25716 rm -f "conftest.$ac_objext"
25717 if { (eval echo "$as_me:25717: \"$ac_compile\"") >&5
25718   (eval $ac_compile) 2>&5
25719   ac_status=$?
25720   echo "$as_me:25720: \$? = $ac_status" >&5
25721   (exit "$ac_status"); } &&
25722          { ac_try='test -s "conftest.$ac_objext"'
25723   { (eval echo "$as_me:25723: \"$ac_try\"") >&5
25724   (eval $ac_try) 2>&5
25725   ac_status=$?
25726   echo "$as_me:25726: \$? = $ac_status" >&5
25727   (exit "$ac_status"); }; }; then
25728   ac_lo=$ac_mid; break
25729 else
25730   echo "$as_me: failed program was:" >&5
25731 cat "conftest.$ac_ext" >&5
25732 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25733 fi
25734 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25735   done
25736 fi
25737 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25738 # Binary search between lo and hi bounds.
25739 while test "x$ac_lo" != "x$ac_hi"; do
25740   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25741   cat >"conftest.$ac_ext" <<_ACEOF
25742 #line 25742 "configure"
25743 #include "confdefs.h"
25744
25745 #include <stdlib.h>
25746 #include <stdio.h>
25747
25748 #if defined(__cplusplus)
25749
25750 #ifdef HAVE_GXX_BUILTIN_H
25751 #include <g++/builtin.h>
25752 #elif HAVE_GPP_BUILTIN_H
25753 #include <gpp/builtin.h>
25754 #elif HAVE_BUILTIN_H
25755 #include <builtin.h>
25756 #endif
25757
25758 #else
25759
25760 #if $cf_cv_header_stdbool_h
25761 #include <stdbool.h>
25762 #endif
25763
25764 #endif
25765
25766 int
25767 main (void)
25768 {
25769 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25770   ;
25771   return 0;
25772 }
25773 _ACEOF
25774 rm -f "conftest.$ac_objext"
25775 if { (eval echo "$as_me:25775: \"$ac_compile\"") >&5
25776   (eval $ac_compile) 2>&5
25777   ac_status=$?
25778   echo "$as_me:25778: \$? = $ac_status" >&5
25779   (exit "$ac_status"); } &&
25780          { ac_try='test -s "conftest.$ac_objext"'
25781   { (eval echo "$as_me:25781: \"$ac_try\"") >&5
25782   (eval $ac_try) 2>&5
25783   ac_status=$?
25784   echo "$as_me:25784: \$? = $ac_status" >&5
25785   (exit "$ac_status"); }; }; then
25786   ac_hi=$ac_mid
25787 else
25788   echo "$as_me: failed program was:" >&5
25789 cat "conftest.$ac_ext" >&5
25790 ac_lo=`expr "$ac_mid" + 1`
25791 fi
25792 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25793 done
25794 ac_cv_sizeof_bool=$ac_lo
25795 else
25796   if test "$cross_compiling" = yes; then
25797   { { echo "$as_me:25797: error: cannot run test program while cross compiling" >&5
25798 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25799    { (exit 1); exit 1; }; }
25800 else
25801   cat >"conftest.$ac_ext" <<_ACEOF
25802 #line 25802 "configure"
25803 #include "confdefs.h"
25804
25805 #include <stdlib.h>
25806 #include <stdio.h>
25807
25808 #if defined(__cplusplus)
25809
25810 #ifdef HAVE_GXX_BUILTIN_H
25811 #include <g++/builtin.h>
25812 #elif HAVE_GPP_BUILTIN_H
25813 #include <gpp/builtin.h>
25814 #elif HAVE_BUILTIN_H
25815 #include <builtin.h>
25816 #endif
25817
25818 #else
25819
25820 #if $cf_cv_header_stdbool_h
25821 #include <stdbool.h>
25822 #endif
25823
25824 #endif
25825
25826 int
25827 main (void)
25828 {
25829 FILE *f = fopen ("conftest.val", "w");
25830 if (!f)
25831   $ac_main_return (1);
25832 fprintf (f, "%ld", (long)(sizeof (bool)));
25833 fclose (f);
25834   ;
25835   return 0;
25836 }
25837 _ACEOF
25838 rm -f "conftest$ac_exeext"
25839 if { (eval echo "$as_me:25839: \"$ac_link\"") >&5
25840   (eval $ac_link) 2>&5
25841   ac_status=$?
25842   echo "$as_me:25842: \$? = $ac_status" >&5
25843   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25844   { (eval echo "$as_me:25844: \"$ac_try\"") >&5
25845   (eval $ac_try) 2>&5
25846   ac_status=$?
25847   echo "$as_me:25847: \$? = $ac_status" >&5
25848   (exit "$ac_status"); }; }; then
25849   ac_cv_sizeof_bool=`cat conftest.val`
25850 else
25851   echo "$as_me: program exited with status $ac_status" >&5
25852 echo "$as_me: failed program was:" >&5
25853 cat "conftest.$ac_ext" >&5
25854 fi
25855 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25856 fi
25857 fi
25858 rm -f conftest.val
25859 else
25860   ac_cv_sizeof_bool=0
25861 fi
25862 fi
25863 echo "$as_me:25863: result: $ac_cv_sizeof_bool" >&5
25864 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25865 cat >>confdefs.h <<EOF
25866 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25867 EOF
25868
25869 echo "$as_me:25869: checking for type of bool" >&5
25870 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25871 if test "${cf_cv_type_of_bool+set}" = set; then
25872   echo $ECHO_N "(cached) $ECHO_C" >&6
25873 else
25874
25875         rm -f cf_test.out
25876         if test "$cross_compiling" = yes; then
25877
25878                 case x$ac_cv_sizeof_bool in
25879                 (x1) cf_cv_type_of_bool="unsigned char";;
25880                 (x2) cf_cv_type_of_bool="unsigned short";;
25881                 (x4) cf_cv_type_of_bool="unsigned int";;
25882                 (x8) cf_cv_type_of_bool="unsigned long";;
25883                 (*)  cf_cv_type_of_bool=unknown;;
25884                 esac
25885
25886 else
25887   cat >"conftest.$ac_ext" <<_ACEOF
25888 #line 25888 "configure"
25889 #include "confdefs.h"
25890
25891 #include <stdlib.h>
25892 #include <stdio.h>
25893
25894 #if defined(__cplusplus)
25895
25896 #ifdef HAVE_GXX_BUILTIN_H
25897 #include <g++/builtin.h>
25898 #elif HAVE_GPP_BUILTIN_H
25899 #include <gpp/builtin.h>
25900 #elif HAVE_BUILTIN_H
25901 #include <builtin.h>
25902 #endif
25903
25904 #else
25905
25906 #if $cf_cv_header_stdbool_h
25907 #include <stdbool.h>
25908 #endif
25909
25910 #endif
25911
25912 int main(void)
25913 {
25914         FILE *fp = fopen("cf_test.out", "w");
25915         if (fp != 0) {
25916                 bool x = true;
25917                 if ((bool)(-x) >= 0)
25918                         fputs("unsigned ", fp);
25919                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25920                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25921                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25922                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25923                 fclose(fp);
25924         }
25925         ${cf_cv_main_return:-return}(0);
25926 }
25927
25928 _ACEOF
25929 rm -f "conftest$ac_exeext"
25930 if { (eval echo "$as_me:25930: \"$ac_link\"") >&5
25931   (eval $ac_link) 2>&5
25932   ac_status=$?
25933   echo "$as_me:25933: \$? = $ac_status" >&5
25934   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25935   { (eval echo "$as_me:25935: \"$ac_try\"") >&5
25936   (eval $ac_try) 2>&5
25937   ac_status=$?
25938   echo "$as_me:25938: \$? = $ac_status" >&5
25939   (exit "$ac_status"); }; }; then
25940   cf_cv_type_of_bool=`cat cf_test.out`
25941                  if test -z "$cf_cv_type_of_bool"; then
25942                    cf_cv_type_of_bool=unknown
25943                  fi
25944 else
25945   echo "$as_me: program exited with status $ac_status" >&5
25946 echo "$as_me: failed program was:" >&5
25947 cat "conftest.$ac_ext" >&5
25948 cf_cv_type_of_bool=unknown
25949 fi
25950 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25951 fi
25952         rm -f cf_test.out
25953
25954 fi
25955 echo "$as_me:25955: result: $cf_cv_type_of_bool" >&5
25956 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25957
25958 if test "$cf_cv_type_of_bool" = unknown ; then
25959         case .$NCURSES_BOOL in
25960         (.auto|.) NCURSES_BOOL=unsigned;;
25961         esac
25962         { echo "$as_me:25962: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25963 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25964         cf_cv_type_of_bool=$NCURSES_BOOL
25965 fi
25966
25967 echo "$as_me:25967: checking for special defines needed for etip.h" >&5
25968 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25969 cf_save_CXXFLAGS="$CXXFLAGS"
25970 cf_result="none"
25971
25972 # etip.h includes ncurses.h which includes ncurses_dll.h
25973 # But ncurses_dll.h is generated - fix here.
25974 test -d include || mkdir include
25975 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
25976
25977 for cf_math in "" MATH_H
25978 do
25979 for cf_excp in "" MATH_EXCEPTION
25980 do
25981         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25982         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25983         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25984 cat >"conftest.$ac_ext" <<_ACEOF
25985 #line 25985 "configure"
25986 #include "confdefs.h"
25987
25988 #include <etip.h.in>
25989
25990 int
25991 main (void)
25992 {
25993
25994   ;
25995   return 0;
25996 }
25997 _ACEOF
25998 rm -f "conftest.$ac_objext"
25999 if { (eval echo "$as_me:25999: \"$ac_compile\"") >&5
26000   (eval $ac_compile) 2>&5
26001   ac_status=$?
26002   echo "$as_me:26002: \$? = $ac_status" >&5
26003   (exit "$ac_status"); } &&
26004          { ac_try='test -s "conftest.$ac_objext"'
26005   { (eval echo "$as_me:26005: \"$ac_try\"") >&5
26006   (eval $ac_try) 2>&5
26007   ac_status=$?
26008   echo "$as_me:26008: \$? = $ac_status" >&5
26009   (exit "$ac_status"); }; }; then
26010
26011         test -n "$cf_math" && cat >>confdefs.h <<EOF
26012 #define ETIP_NEEDS_${cf_math} 1
26013 EOF
26014
26015         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26016 #define ETIP_NEEDS_${cf_excp} 1
26017 EOF
26018
26019         cf_result="$cf_math $cf_excp"
26020         break 2
26021
26022 else
26023   echo "$as_me: failed program was:" >&5
26024 cat "conftest.$ac_ext" >&5
26025 fi
26026 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26027 done
26028 done
26029 echo "$as_me:26029: result: $cf_result" >&5
26030 echo "${ECHO_T}$cf_result" >&6
26031 CXXFLAGS="$cf_save_CXXFLAGS"
26032
26033 if test -n "$CXX"; then
26034 echo "$as_me:26034: checking if $CXX accepts parameter initialization" >&5
26035 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26036 if test "${cf_cv_cpp_param_init+set}" = set; then
26037   echo $ECHO_N "(cached) $ECHO_C" >&6
26038 else
26039
26040         ac_ext=cc
26041 ac_cpp='$CXXCPP $CPPFLAGS'
26042 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26043 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26044 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26045 ac_main_return="return"
26046
26047         if test "$cross_compiling" = yes; then
26048   cf_cv_cpp_param_init=unknown
26049 else
26050   cat >"conftest.$ac_ext" <<_ACEOF
26051 #line 26051 "configure"
26052 #include "confdefs.h"
26053
26054 class TEST {
26055 private:
26056         int value;
26057 public:
26058         TEST(int x = 1);
26059         ~TEST();
26060 };
26061
26062 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26063 {
26064         value = x;
26065 }
26066 int main(void) { }
26067
26068 _ACEOF
26069 rm -f "conftest$ac_exeext"
26070 if { (eval echo "$as_me:26070: \"$ac_link\"") >&5
26071   (eval $ac_link) 2>&5
26072   ac_status=$?
26073   echo "$as_me:26073: \$? = $ac_status" >&5
26074   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26075   { (eval echo "$as_me:26075: \"$ac_try\"") >&5
26076   (eval $ac_try) 2>&5
26077   ac_status=$?
26078   echo "$as_me:26078: \$? = $ac_status" >&5
26079   (exit "$ac_status"); }; }; then
26080   cf_cv_cpp_param_init=yes
26081 else
26082   echo "$as_me: program exited with status $ac_status" >&5
26083 echo "$as_me: failed program was:" >&5
26084 cat "conftest.$ac_ext" >&5
26085 cf_cv_cpp_param_init=no
26086 fi
26087 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26088 fi
26089         ac_ext=cc
26090 ac_cpp='$CXXCPP $CPPFLAGS'
26091 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26092 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26093 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26094 ac_main_return="return"
26095
26096 fi
26097 echo "$as_me:26097: result: $cf_cv_cpp_param_init" >&5
26098 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26099 fi
26100 test "$cf_cv_cpp_param_init" = yes &&
26101 cat >>confdefs.h <<\EOF
26102 #define CPP_HAS_PARAM_INIT 1
26103 EOF
26104
26105 if test -n "$CXX"; then
26106
26107 echo "$as_me:26107: checking if $CXX accepts static_cast" >&5
26108 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26109 if test "${cf_cv_cpp_static_cast+set}" = set; then
26110   echo $ECHO_N "(cached) $ECHO_C" >&6
26111 else
26112
26113         ac_ext=cc
26114 ac_cpp='$CXXCPP $CPPFLAGS'
26115 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26116 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26117 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26118 ac_main_return="return"
26119
26120         cat >"conftest.$ac_ext" <<_ACEOF
26121 #line 26121 "configure"
26122 #include "confdefs.h"
26123
26124 class NCursesPanel
26125 {
26126 public:
26127   NCursesPanel(int nlines,
26128                int ncols,
26129                int begin_y = 0,
26130                int begin_x = 0)
26131   {
26132   }
26133   NCursesPanel();
26134   ~NCursesPanel();
26135 };
26136
26137 template<class T> class NCursesUserPanel : public NCursesPanel
26138 {
26139 public:
26140   NCursesUserPanel (int nlines,
26141                     int ncols,
26142                     int begin_y = 0,
26143                     int begin_x = 0,
26144                     const T* p_UserData = static_cast<T*>(0))
26145     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26146   {
26147   };
26148   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26149   {
26150   };
26151
26152   virtual ~NCursesUserPanel() {};
26153 };
26154
26155 int
26156 main (void)
26157 {
26158
26159         const char* p_UserData = static_cast<char*>(0)
26160   ;
26161   return 0;
26162 }
26163 _ACEOF
26164 rm -f "conftest.$ac_objext"
26165 if { (eval echo "$as_me:26165: \"$ac_compile\"") >&5
26166   (eval $ac_compile) 2>&5
26167   ac_status=$?
26168   echo "$as_me:26168: \$? = $ac_status" >&5
26169   (exit "$ac_status"); } &&
26170          { ac_try='test -s "conftest.$ac_objext"'
26171   { (eval echo "$as_me:26171: \"$ac_try\"") >&5
26172   (eval $ac_try) 2>&5
26173   ac_status=$?
26174   echo "$as_me:26174: \$? = $ac_status" >&5
26175   (exit "$ac_status"); }; }; then
26176   cf_cv_cpp_static_cast=yes
26177 else
26178   echo "$as_me: failed program was:" >&5
26179 cat "conftest.$ac_ext" >&5
26180 cf_cv_cpp_static_cast=no
26181 fi
26182 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26183
26184         ac_ext=cc
26185 ac_cpp='$CXXCPP $CPPFLAGS'
26186 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26187 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26188 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26189 ac_main_return="return"
26190
26191 fi
26192 echo "$as_me:26192: result: $cf_cv_cpp_static_cast" >&5
26193 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26194
26195 fi
26196
26197 test "$cf_cv_cpp_static_cast" = yes &&
26198 cat >>confdefs.h <<\EOF
26199 #define CPP_HAS_STATIC_CAST 1
26200 EOF
26201
26202         CXX_AR='$(AR)'
26203         CXX_ARFLAGS='$(ARFLAGS)'
26204         case "$cf_cv_system_name" in
26205         (irix*)
26206             if test "$GXX" != yes ; then
26207                 CXX_AR='$(CXX)'
26208                 CXX_ARFLAGS='-ar -o'
26209             fi
26210             ;;
26211         (sco3.2v5*)
26212             CXXLDFLAGS="-u main"
26213             ;;
26214         (solaris2*)
26215             if test "$GXX" != yes ; then
26216                 CXX_AR='$(CXX)'
26217                 CXX_ARFLAGS='-xar -o'
26218             fi
26219             ;;
26220         esac
26221
26222 else
26223         cf_cxx_library=no
26224         cf_cv_builtin_bool=1
26225
26226         # Just because we are not configuring against C++ right now does not
26227         # mean that a user will not want to use C++.  Some distributors disable
26228         # the C++ portion of this configuration as a shortcut (or just to avoid
26229         # compiling the demo in the c++ directory).  So we need a reasonable
26230         # default for the 'bool' type.
26231         #
26232         # Caveat: since the storage of the bool type is not standardized, it
26233         # may change.
26234
26235         if test "$NCURSES_BOOL" != auto ; then
26236                 cf_cv_type_of_bool=$NCURSES_BOOL
26237                 cf_cv_header_stdbool_h=0
26238         else
26239                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26240
26241 echo "$as_me:26241: checking for bool" >&5
26242 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26243 if test "${ac_cv_type_bool+set}" = set; then
26244   echo $ECHO_N "(cached) $ECHO_C" >&6
26245 else
26246   cat >"conftest.$ac_ext" <<_ACEOF
26247 #line 26247 "configure"
26248 #include "confdefs.h"
26249
26250 #include <stdlib.h>
26251 #include <stdio.h>
26252
26253 #if defined(__cplusplus)
26254
26255 #ifdef HAVE_GXX_BUILTIN_H
26256 #include <g++/builtin.h>
26257 #elif HAVE_GPP_BUILTIN_H
26258 #include <gpp/builtin.h>
26259 #elif HAVE_BUILTIN_H
26260 #include <builtin.h>
26261 #endif
26262
26263 #else
26264
26265 #if $cf_cv_header_stdbool_h
26266 #include <stdbool.h>
26267 #endif
26268
26269 #endif
26270
26271 int
26272 main (void)
26273 {
26274 if ((bool *) 0)
26275   return 0;
26276 if (sizeof (bool))
26277   return 0;
26278   ;
26279   return 0;
26280 }
26281 _ACEOF
26282 rm -f "conftest.$ac_objext"
26283 if { (eval echo "$as_me:26283: \"$ac_compile\"") >&5
26284   (eval $ac_compile) 2>&5
26285   ac_status=$?
26286   echo "$as_me:26286: \$? = $ac_status" >&5
26287   (exit "$ac_status"); } &&
26288          { ac_try='test -s "conftest.$ac_objext"'
26289   { (eval echo "$as_me:26289: \"$ac_try\"") >&5
26290   (eval $ac_try) 2>&5
26291   ac_status=$?
26292   echo "$as_me:26292: \$? = $ac_status" >&5
26293   (exit "$ac_status"); }; }; then
26294   ac_cv_type_bool=yes
26295 else
26296   echo "$as_me: failed program was:" >&5
26297 cat "conftest.$ac_ext" >&5
26298 ac_cv_type_bool=no
26299 fi
26300 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26301 fi
26302 echo "$as_me:26302: result: $ac_cv_type_bool" >&5
26303 echo "${ECHO_T}$ac_cv_type_bool" >&6
26304
26305 echo "$as_me:26305: checking size of bool" >&5
26306 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26307 if test "${ac_cv_sizeof_bool+set}" = set; then
26308   echo $ECHO_N "(cached) $ECHO_C" >&6
26309 else
26310   if test "$ac_cv_type_bool" = yes; then
26311   if test "$cross_compiling" = yes; then
26312   # Depending upon the size, compute the lo and hi bounds.
26313 cat >"conftest.$ac_ext" <<_ACEOF
26314 #line 26314 "configure"
26315 #include "confdefs.h"
26316
26317 #include <stdlib.h>
26318 #include <stdio.h>
26319
26320 #if defined(__cplusplus)
26321
26322 #ifdef HAVE_GXX_BUILTIN_H
26323 #include <g++/builtin.h>
26324 #elif HAVE_GPP_BUILTIN_H
26325 #include <gpp/builtin.h>
26326 #elif HAVE_BUILTIN_H
26327 #include <builtin.h>
26328 #endif
26329
26330 #else
26331
26332 #if $cf_cv_header_stdbool_h
26333 #include <stdbool.h>
26334 #endif
26335
26336 #endif
26337
26338 int
26339 main (void)
26340 {
26341 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26342   ;
26343   return 0;
26344 }
26345 _ACEOF
26346 rm -f "conftest.$ac_objext"
26347 if { (eval echo "$as_me:26347: \"$ac_compile\"") >&5
26348   (eval $ac_compile) 2>&5
26349   ac_status=$?
26350   echo "$as_me:26350: \$? = $ac_status" >&5
26351   (exit "$ac_status"); } &&
26352          { ac_try='test -s "conftest.$ac_objext"'
26353   { (eval echo "$as_me:26353: \"$ac_try\"") >&5
26354   (eval $ac_try) 2>&5
26355   ac_status=$?
26356   echo "$as_me:26356: \$? = $ac_status" >&5
26357   (exit "$ac_status"); }; }; then
26358   ac_lo=0 ac_mid=0
26359   while :; do
26360     cat >"conftest.$ac_ext" <<_ACEOF
26361 #line 26361 "configure"
26362 #include "confdefs.h"
26363
26364 #include <stdlib.h>
26365 #include <stdio.h>
26366
26367 #if defined(__cplusplus)
26368
26369 #ifdef HAVE_GXX_BUILTIN_H
26370 #include <g++/builtin.h>
26371 #elif HAVE_GPP_BUILTIN_H
26372 #include <gpp/builtin.h>
26373 #elif HAVE_BUILTIN_H
26374 #include <builtin.h>
26375 #endif
26376
26377 #else
26378
26379 #if $cf_cv_header_stdbool_h
26380 #include <stdbool.h>
26381 #endif
26382
26383 #endif
26384
26385 int
26386 main (void)
26387 {
26388 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26389   ;
26390   return 0;
26391 }
26392 _ACEOF
26393 rm -f "conftest.$ac_objext"
26394 if { (eval echo "$as_me:26394: \"$ac_compile\"") >&5
26395   (eval $ac_compile) 2>&5
26396   ac_status=$?
26397   echo "$as_me:26397: \$? = $ac_status" >&5
26398   (exit "$ac_status"); } &&
26399          { ac_try='test -s "conftest.$ac_objext"'
26400   { (eval echo "$as_me:26400: \"$ac_try\"") >&5
26401   (eval $ac_try) 2>&5
26402   ac_status=$?
26403   echo "$as_me:26403: \$? = $ac_status" >&5
26404   (exit "$ac_status"); }; }; then
26405   ac_hi=$ac_mid; break
26406 else
26407   echo "$as_me: failed program was:" >&5
26408 cat "conftest.$ac_ext" >&5
26409 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26410 fi
26411 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26412   done
26413 else
26414   echo "$as_me: failed program was:" >&5
26415 cat "conftest.$ac_ext" >&5
26416 ac_hi=-1 ac_mid=-1
26417   while :; do
26418     cat >"conftest.$ac_ext" <<_ACEOF
26419 #line 26419 "configure"
26420 #include "confdefs.h"
26421
26422 #include <stdlib.h>
26423 #include <stdio.h>
26424
26425 #if defined(__cplusplus)
26426
26427 #ifdef HAVE_GXX_BUILTIN_H
26428 #include <g++/builtin.h>
26429 #elif HAVE_GPP_BUILTIN_H
26430 #include <gpp/builtin.h>
26431 #elif HAVE_BUILTIN_H
26432 #include <builtin.h>
26433 #endif
26434
26435 #else
26436
26437 #if $cf_cv_header_stdbool_h
26438 #include <stdbool.h>
26439 #endif
26440
26441 #endif
26442
26443 int
26444 main (void)
26445 {
26446 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26447   ;
26448   return 0;
26449 }
26450 _ACEOF
26451 rm -f "conftest.$ac_objext"
26452 if { (eval echo "$as_me:26452: \"$ac_compile\"") >&5
26453   (eval $ac_compile) 2>&5
26454   ac_status=$?
26455   echo "$as_me:26455: \$? = $ac_status" >&5
26456   (exit "$ac_status"); } &&
26457          { ac_try='test -s "conftest.$ac_objext"'
26458   { (eval echo "$as_me:26458: \"$ac_try\"") >&5
26459   (eval $ac_try) 2>&5
26460   ac_status=$?
26461   echo "$as_me:26461: \$? = $ac_status" >&5
26462   (exit "$ac_status"); }; }; then
26463   ac_lo=$ac_mid; break
26464 else
26465   echo "$as_me: failed program was:" >&5
26466 cat "conftest.$ac_ext" >&5
26467 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26468 fi
26469 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26470   done
26471 fi
26472 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26473 # Binary search between lo and hi bounds.
26474 while test "x$ac_lo" != "x$ac_hi"; do
26475   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26476   cat >"conftest.$ac_ext" <<_ACEOF
26477 #line 26477 "configure"
26478 #include "confdefs.h"
26479
26480 #include <stdlib.h>
26481 #include <stdio.h>
26482
26483 #if defined(__cplusplus)
26484
26485 #ifdef HAVE_GXX_BUILTIN_H
26486 #include <g++/builtin.h>
26487 #elif HAVE_GPP_BUILTIN_H
26488 #include <gpp/builtin.h>
26489 #elif HAVE_BUILTIN_H
26490 #include <builtin.h>
26491 #endif
26492
26493 #else
26494
26495 #if $cf_cv_header_stdbool_h
26496 #include <stdbool.h>
26497 #endif
26498
26499 #endif
26500
26501 int
26502 main (void)
26503 {
26504 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26505   ;
26506   return 0;
26507 }
26508 _ACEOF
26509 rm -f "conftest.$ac_objext"
26510 if { (eval echo "$as_me:26510: \"$ac_compile\"") >&5
26511   (eval $ac_compile) 2>&5
26512   ac_status=$?
26513   echo "$as_me:26513: \$? = $ac_status" >&5
26514   (exit "$ac_status"); } &&
26515          { ac_try='test -s "conftest.$ac_objext"'
26516   { (eval echo "$as_me:26516: \"$ac_try\"") >&5
26517   (eval $ac_try) 2>&5
26518   ac_status=$?
26519   echo "$as_me:26519: \$? = $ac_status" >&5
26520   (exit "$ac_status"); }; }; then
26521   ac_hi=$ac_mid
26522 else
26523   echo "$as_me: failed program was:" >&5
26524 cat "conftest.$ac_ext" >&5
26525 ac_lo=`expr "$ac_mid" + 1`
26526 fi
26527 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26528 done
26529 ac_cv_sizeof_bool=$ac_lo
26530 else
26531   if test "$cross_compiling" = yes; then
26532   { { echo "$as_me:26532: error: cannot run test program while cross compiling" >&5
26533 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26534    { (exit 1); exit 1; }; }
26535 else
26536   cat >"conftest.$ac_ext" <<_ACEOF
26537 #line 26537 "configure"
26538 #include "confdefs.h"
26539
26540 #include <stdlib.h>
26541 #include <stdio.h>
26542
26543 #if defined(__cplusplus)
26544
26545 #ifdef HAVE_GXX_BUILTIN_H
26546 #include <g++/builtin.h>
26547 #elif HAVE_GPP_BUILTIN_H
26548 #include <gpp/builtin.h>
26549 #elif HAVE_BUILTIN_H
26550 #include <builtin.h>
26551 #endif
26552
26553 #else
26554
26555 #if $cf_cv_header_stdbool_h
26556 #include <stdbool.h>
26557 #endif
26558
26559 #endif
26560
26561 int
26562 main (void)
26563 {
26564 FILE *f = fopen ("conftest.val", "w");
26565 if (!f)
26566   $ac_main_return (1);
26567 fprintf (f, "%ld", (long)(sizeof (bool)));
26568 fclose (f);
26569   ;
26570   return 0;
26571 }
26572 _ACEOF
26573 rm -f "conftest$ac_exeext"
26574 if { (eval echo "$as_me:26574: \"$ac_link\"") >&5
26575   (eval $ac_link) 2>&5
26576   ac_status=$?
26577   echo "$as_me:26577: \$? = $ac_status" >&5
26578   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26579   { (eval echo "$as_me:26579: \"$ac_try\"") >&5
26580   (eval $ac_try) 2>&5
26581   ac_status=$?
26582   echo "$as_me:26582: \$? = $ac_status" >&5
26583   (exit "$ac_status"); }; }; then
26584   ac_cv_sizeof_bool=`cat conftest.val`
26585 else
26586   echo "$as_me: program exited with status $ac_status" >&5
26587 echo "$as_me: failed program was:" >&5
26588 cat "conftest.$ac_ext" >&5
26589 fi
26590 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26591 fi
26592 fi
26593 rm -f conftest.val
26594 else
26595   ac_cv_sizeof_bool=0
26596 fi
26597 fi
26598 echo "$as_me:26598: result: $ac_cv_sizeof_bool" >&5
26599 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26600 cat >>confdefs.h <<EOF
26601 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26602 EOF
26603
26604 echo "$as_me:26604: checking for type of bool" >&5
26605 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26606 if test "${cf_cv_type_of_bool+set}" = set; then
26607   echo $ECHO_N "(cached) $ECHO_C" >&6
26608 else
26609
26610         rm -f cf_test.out
26611         if test "$cross_compiling" = yes; then
26612
26613                 case x$ac_cv_sizeof_bool in
26614                 (x1) cf_cv_type_of_bool="unsigned char";;
26615                 (x2) cf_cv_type_of_bool="unsigned short";;
26616                 (x4) cf_cv_type_of_bool="unsigned int";;
26617                 (x8) cf_cv_type_of_bool="unsigned long";;
26618                 (*)  cf_cv_type_of_bool=unknown;;
26619                 esac
26620
26621 else
26622   cat >"conftest.$ac_ext" <<_ACEOF
26623 #line 26623 "configure"
26624 #include "confdefs.h"
26625
26626 #include <stdlib.h>
26627 #include <stdio.h>
26628
26629 #if defined(__cplusplus)
26630
26631 #ifdef HAVE_GXX_BUILTIN_H
26632 #include <g++/builtin.h>
26633 #elif HAVE_GPP_BUILTIN_H
26634 #include <gpp/builtin.h>
26635 #elif HAVE_BUILTIN_H
26636 #include <builtin.h>
26637 #endif
26638
26639 #else
26640
26641 #if $cf_cv_header_stdbool_h
26642 #include <stdbool.h>
26643 #endif
26644
26645 #endif
26646
26647 int main(void)
26648 {
26649         FILE *fp = fopen("cf_test.out", "w");
26650         if (fp != 0) {
26651                 bool x = true;
26652                 if ((bool)(-x) >= 0)
26653                         fputs("unsigned ", fp);
26654                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26655                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26656                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26657                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26658                 fclose(fp);
26659         }
26660         ${cf_cv_main_return:-return}(0);
26661 }
26662
26663 _ACEOF
26664 rm -f "conftest$ac_exeext"
26665 if { (eval echo "$as_me:26665: \"$ac_link\"") >&5
26666   (eval $ac_link) 2>&5
26667   ac_status=$?
26668   echo "$as_me:26668: \$? = $ac_status" >&5
26669   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26670   { (eval echo "$as_me:26670: \"$ac_try\"") >&5
26671   (eval $ac_try) 2>&5
26672   ac_status=$?
26673   echo "$as_me:26673: \$? = $ac_status" >&5
26674   (exit "$ac_status"); }; }; then
26675   cf_cv_type_of_bool=`cat cf_test.out`
26676                  if test -z "$cf_cv_type_of_bool"; then
26677                    cf_cv_type_of_bool=unknown
26678                  fi
26679 else
26680   echo "$as_me: program exited with status $ac_status" >&5
26681 echo "$as_me: failed program was:" >&5
26682 cat "conftest.$ac_ext" >&5
26683 cf_cv_type_of_bool=unknown
26684 fi
26685 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26686 fi
26687         rm -f cf_test.out
26688
26689 fi
26690 echo "$as_me:26690: result: $cf_cv_type_of_bool" >&5
26691 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26692
26693 if test "$cf_cv_type_of_bool" = unknown ; then
26694         case .$NCURSES_BOOL in
26695         (.auto|.) NCURSES_BOOL=unsigned;;
26696         esac
26697         { echo "$as_me:26697: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26698 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26699         cf_cv_type_of_bool=$NCURSES_BOOL
26700 fi
26701
26702                 else
26703                         echo "$as_me:26703: checking for fallback type of bool" >&5
26704 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26705                         case "$host_cpu" in
26706                         (i?86)  cf_cv_type_of_bool=char ;;
26707                         (*)     cf_cv_type_of_bool=int  ;;
26708                         esac
26709                         echo "$as_me:26709: result: $cf_cv_type_of_bool" >&5
26710 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26711                 fi
26712         fi
26713 fi
26714
26715 # If the C compiler did not declare bool, and we did not determine that the C++
26716 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26717 # ncurses library use the same type as C++ bool.  Note that this allows one to
26718 # specify the type of bool in a configure-script option and postpone
26719 # integration with the C++ compiler provided that the types are compatible.
26720 USE_CXX_BOOL=1
26721 if test "$cf_cv_cc_bool_type" = 1
26722 then
26723         # oops: C has a bool.  Unlikely, but C++ could differ.
26724         USE_CXX_BOOL=0
26725 elif test "$cf_cv_builtin_bool" = 0
26726 then
26727         # C++ has no bool
26728         USE_CXX_BOOL=0
26729 else
26730         # this is the normal case
26731         USE_CXX_BOOL='defined(__cplusplus)'
26732 fi
26733
26734 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26735
26736         if test "$cf_with_ada" != "no" ; then
26737                 if test "$with_libtool" != "no"; then
26738                         { echo "$as_me:26738: WARNING: libtool does not support Ada - disabling feature" >&5
26739 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26740                         cf_with_ada=no
26741                 fi
26742         fi
26743
26744         if test "$cf_with_ada" != "no" ; then
26745
26746 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26747 do
26748
26749 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26750
26751         unset ac_cv_path_cf_TEMP_gnat
26752         unset cf_TEMP_gnat
26753         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26754 set dummy $cf_prog_gnat; ac_word=$2
26755 echo "$as_me:26755: checking for $ac_word" >&5
26756 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26757 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26758   echo $ECHO_N "(cached) $ECHO_C" >&6
26759 else
26760   case $cf_TEMP_gnat in
26761   [\\/]* | ?:[\\/]*)
26762   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26763   ;;
26764   *)
26765   ac_save_IFS=$IFS; IFS=$ac_path_separator
26766 ac_dummy="$PATH"
26767 for ac_dir in $ac_dummy; do
26768   IFS=$ac_save_IFS
26769   test -z "$ac_dir" && ac_dir=.
26770   if $as_executable_p "$ac_dir/$ac_word"; then
26771    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26772    echo "$as_me:26772: found $ac_dir/$ac_word" >&5
26773    break
26774 fi
26775 done
26776
26777   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26778   ;;
26779 esac
26780 fi
26781 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26782
26783 if test -n "$cf_TEMP_gnat"; then
26784   echo "$as_me:26784: result: $cf_TEMP_gnat" >&5
26785 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26786 else
26787   echo "$as_me:26787: result: no" >&5
26788 echo "${ECHO_T}no" >&6
26789 fi
26790
26791         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26792
26793         if test "x$cf_TEMP_gnat" != xno; then
26794                 unset cf_cv_gnat_version
26795                 unset cf_TEMP_gnat
26796
26797 echo "$as_me:26797: checking for $cf_prog_gnat version" >&5
26798 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26799 if test "${cf_cv_gnat_version+set}" = set; then
26800   echo $ECHO_N "(cached) $ECHO_C" >&6
26801 else
26802
26803 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26804         grep '[0-9].[0-9][0-9]*' |\
26805         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26806
26807 fi
26808 echo "$as_me:26808: result: $cf_cv_gnat_version" >&5
26809 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26810 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26811 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26812
26813         fi
26814         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26815
26816         unset cf_TEMP_gnat
26817         unset cf_cv_gnat_version
26818         unset ac_cv_path_cf_TEMP_gnat
26819 done
26820
26821 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26822         cf_ada_make=
26823         cf_cv_prog_gnat_correct=no
26824 else
26825         cf_ada_make=gnatmake
26826         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26827                 # gprconfig is newer than gnatmake; we can continue...
26828                 cf_ada_config="##"
26829         else
26830                 rm -rf ./conftest* ./*~conftest*
26831                 if mkdir conftest.src
26832                 then
26833                         cf_ada_config=""
26834                         cd conftest.src
26835                         for cf_gprconfig in Ada C
26836                         do
26837                                 echo "$as_me:26837: checking for gprconfig name for $cf_gprconfig" >&5
26838 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26839                                 if test "$cf_gprconfig" = C
26840                                 then
26841                                         for cf_gprconfig_param in \
26842                                                 "$cf_gprconfig,,,,GNATGCC" \
26843                                                 "$cf_gprconfig,,,,GCC" \
26844                                                 "$cf_gprconfig"
26845                                         do
26846                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26847                                                 test -n "$cf_gprconfig_value" && break
26848                                         done
26849                                 else
26850                                         cf_gprconfig_param=$cf_gprconfig
26851                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26852                                 fi
26853                                 if test -n "$cf_gprconfig_value"
26854                                 then
26855                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
26856                                         echo "$as_me:26856: result: $cf_gprconfig_value" >&5
26857 echo "${ECHO_T}$cf_gprconfig_value" >&6
26858                                 else
26859                                         echo "$as_me:26859: result: missing" >&5
26860 echo "${ECHO_T}missing" >&6
26861                                         cf_ada_config="#"
26862                                         break
26863                                 fi
26864                         done
26865                         cd ..
26866                         rm -rf ./conftest* ./*~conftest*
26867                 fi
26868         fi
26869         if test "x$cf_ada_config" != "x#"
26870         then
26871
26872 echo "$as_me:26872: checking for gnat version" >&5
26873 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26874 if test "${cf_cv_gnat_version+set}" = set; then
26875   echo $ECHO_N "(cached) $ECHO_C" >&6
26876 else
26877
26878 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26879         grep '[0-9].[0-9][0-9]*' |\
26880         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26881
26882 fi
26883 echo "$as_me:26883: result: $cf_cv_gnat_version" >&5
26884 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26885 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26886
26887 case "$cf_cv_gnat_version" in
26888 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26889         cf_cv_prog_gnat_correct=yes
26890         ;;
26891 (*)
26892         { echo "$as_me:26892: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26893 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26894         cf_cv_prog_gnat_correct=no
26895         ;;
26896 esac
26897
26898                 # Extract the first word of "m4", so it can be a program name with args.
26899 set dummy m4; ac_word=$2
26900 echo "$as_me:26900: checking for $ac_word" >&5
26901 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26902 if test "${ac_cv_prog_M4_exists+set}" = set; then
26903   echo $ECHO_N "(cached) $ECHO_C" >&6
26904 else
26905   if test -n "$M4_exists"; then
26906   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26907 else
26908   ac_save_IFS=$IFS; IFS=$ac_path_separator
26909 ac_dummy="$PATH"
26910 for ac_dir in $ac_dummy; do
26911   IFS=$ac_save_IFS
26912   test -z "$ac_dir" && ac_dir=.
26913   $as_executable_p "$ac_dir/$ac_word" || continue
26914 ac_cv_prog_M4_exists="yes"
26915 echo "$as_me:26915: found $ac_dir/$ac_word" >&5
26916 break
26917 done
26918
26919   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26920 fi
26921 fi
26922 M4_exists=$ac_cv_prog_M4_exists
26923 if test -n "$M4_exists"; then
26924   echo "$as_me:26924: result: $M4_exists" >&5
26925 echo "${ECHO_T}$M4_exists" >&6
26926 else
26927   echo "$as_me:26927: result: no" >&5
26928 echo "${ECHO_T}no" >&6
26929 fi
26930
26931                 if test "$ac_cv_prog_M4_exists" = no; then
26932                         cf_cv_prog_gnat_correct=no
26933                         { echo "$as_me:26933: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26934 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26935                 fi
26936                 if test "$cf_cv_prog_gnat_correct" = yes; then
26937                         echo "$as_me:26937: checking if GNAT works" >&5
26938 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26939
26940 rm -rf ./conftest* ./*~conftest*
26941 cat >>conftest.ads <<CF_EOF
26942 procedure conftest;
26943 CF_EOF
26944 cat >>conftest.adb <<CF_EOF
26945 with Text_IO;
26946 with GNAT.OS_Lib;
26947 procedure conftest is
26948 begin
26949    Text_IO.Put ("Hello World");
26950    Text_IO.New_Line;
26951    GNAT.OS_Lib.OS_Exit (0);
26952 end conftest;
26953 CF_EOF
26954 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26955    if ( ./conftest 1>&5 2>&1 ) ; then
26956       cf_cv_prog_gnat_correct=yes
26957    else
26958       cf_cv_prog_gnat_correct=no
26959    fi
26960 else
26961    cf_cv_prog_gnat_correct=no
26962 fi
26963 rm -rf ./conftest* ./*~conftest*
26964
26965                         echo "$as_me:26965: result: $cf_cv_prog_gnat_correct" >&5
26966 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26967                 fi
26968         else
26969                 cf_cv_prog_gnat_correct=no
26970         fi
26971 fi
26972
26973                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26974
26975         ADAFLAGS="$ADAFLAGS -gnatpn"
26976
26977         echo "$as_me:26977: checking optimization options for ADAFLAGS" >&5
26978 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26979         case "$CFLAGS" in
26980         (*-g*)
26981
26982         ADAFLAGS="$ADAFLAGS -g"
26983
26984                 ;;
26985         esac
26986         case "$CFLAGS" in
26987         (*-O*)
26988                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26989
26990         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26991
26992                 ;;
26993         esac
26994         echo "$as_me:26994: result: $ADAFLAGS" >&5
26995 echo "${ECHO_T}$ADAFLAGS" >&6
26996
26997 echo "$as_me:26997: checking if GNATPREP supports -T option" >&5
26998 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26999 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27000   echo $ECHO_N "(cached) $ECHO_C" >&6
27001 else
27002
27003 cf_cv_gnatprep_opt_t=no
27004 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27005
27006 fi
27007 echo "$as_me:27007: result: $cf_cv_gnatprep_opt_t" >&5
27008 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27009 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27010
27011 echo "$as_me:27011: checking if GNAT supports generics" >&5
27012 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27013 case "$cf_cv_gnat_version" in
27014 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27015         cf_gnat_generics=yes
27016         ;;
27017 (*)
27018         cf_gnat_generics=no
27019         ;;
27020 esac
27021 echo "$as_me:27021: result: $cf_gnat_generics" >&5
27022 echo "${ECHO_T}$cf_gnat_generics" >&6
27023
27024 if test "$cf_gnat_generics" = yes
27025 then
27026         cf_compile_generics=generics
27027         cf_generic_objects="\${GENOBJS}"
27028 else
27029         cf_compile_generics=
27030         cf_generic_objects=
27031 fi
27032
27033 echo "$as_me:27033: checking if GNAT supports SIGINT" >&5
27034 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27035 if test "${cf_cv_gnat_sigint+set}" = set; then
27036   echo $ECHO_N "(cached) $ECHO_C" >&6
27037 else
27038
27039 rm -rf ./conftest* ./*~conftest*
27040 cat >>conftest.ads <<CF_EOF
27041 with Ada.Interrupts.Names;
27042
27043 package ConfTest is
27044
27045    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27046    pragma Unreserve_All_Interrupts;
27047    pragma Warnings (On);
27048
27049    protected Process is
27050       procedure Stop;
27051       function Continue return Boolean;
27052       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27053    private
27054       Done : Boolean := False;
27055    end Process;
27056
27057 end ConfTest;
27058 CF_EOF
27059 cat >>conftest.adb <<CF_EOF
27060 package body ConfTest is
27061    protected body Process is
27062       procedure Stop is
27063       begin
27064          Done := True;
27065       end Stop;
27066       function Continue return Boolean is
27067       begin
27068          return not Done;
27069       end Continue;
27070    end Process;
27071 end ConfTest;
27072 CF_EOF
27073 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27074       cf_cv_gnat_sigint=yes
27075 else
27076    cf_cv_gnat_sigint=no
27077 fi
27078 rm -rf ./conftest* ./*~conftest*
27079
27080 fi
27081 echo "$as_me:27081: result: $cf_cv_gnat_sigint" >&5
27082 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27083
27084 if test "$cf_cv_gnat_sigint" = yes ; then
27085         USE_GNAT_SIGINT=""
27086 else
27087         USE_GNAT_SIGINT="#"
27088 fi
27089
27090 cf_gnat_libraries=no
27091 cf_gnat_projects=no
27092
27093 if test "$enable_gnat_projects" != no ; then
27094 echo "$as_me:27094: checking if GNAT supports project files" >&5
27095 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27096 case "$cf_cv_gnat_version" in
27097 (3.[0-9]*)
27098         ;;
27099 (*)
27100         case "$cf_cv_system_name" in
27101         (cygwin*|msys*)
27102                 ;;
27103         (*)
27104                 rm -rf ./conftest* ./*~conftest*
27105                 if mkdir conftest.src conftest.bin conftest.lib
27106                 then
27107                         cd conftest.src
27108                         rm -rf ./conftest* ./*~conftest*
27109                         cat >>library.gpr <<CF_EOF
27110 project Library is
27111   Kind := External ("LIB_KIND");
27112   for Library_Name use "ConfTest";
27113   for Object_Dir use ".";
27114   for Library_ALI_Dir use External("LIBRARY_DIR");
27115   for Library_Version use External ("SONAME");
27116   for Library_Kind use Kind;
27117   for Library_Dir use External("BUILD_DIR");
27118   Source_Dir := External ("SOURCE_DIR");
27119   for Source_Dirs use (Source_Dir);
27120 end Library;
27121 CF_EOF
27122                         cat >>confpackage.ads <<CF_EOF
27123 package ConfPackage is
27124    procedure conftest;
27125 end ConfPackage;
27126 CF_EOF
27127                         cat >>confpackage.adb <<CF_EOF
27128 with Text_IO;
27129 package body ConfPackage is
27130    procedure conftest is
27131    begin
27132       Text_IO.Put ("Hello World");
27133       Text_IO.New_Line;
27134    end conftest;
27135 end ConfPackage;
27136 CF_EOF
27137                         if ( "$cf_ada_make" $ADAFLAGS \
27138                                         -Plibrary.gpr \
27139                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27140                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27141                                         -XSOURCE_DIR="`pwd`" \
27142                                         -XSONAME=libConfTest.so.1 \
27143                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27144                                 cf_gnat_projects=yes
27145                         fi
27146                         cd ..
27147                 fi
27148                 if test -f conftest.lib/confpackage.ali
27149                 then
27150                         cf_gnat_libraries=yes
27151                 fi
27152                 rm -rf ./conftest* ./*~conftest*
27153                 ;;
27154         esac
27155         ;;
27156 esac
27157 echo "$as_me:27157: result: $cf_gnat_projects" >&5
27158 echo "${ECHO_T}$cf_gnat_projects" >&6
27159 fi # enable_gnat_projects
27160
27161 if test "$cf_gnat_projects" = yes
27162 then
27163         echo "$as_me:27163: checking if GNAT supports libraries" >&5
27164 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27165         echo "$as_me:27165: result: $cf_gnat_libraries" >&5
27166 echo "${ECHO_T}$cf_gnat_libraries" >&6
27167 fi
27168
27169 USE_OLD_MAKERULES=""
27170 USE_GNAT_PROJECTS="#"
27171 USE_GNAT_MAKE_GPR="#"
27172 USE_GNAT_GPRBUILD="#"
27173
27174 if test "$cf_gnat_projects" = yes
27175 then
27176         USE_OLD_MAKERULES="#"
27177         USE_GNAT_PROJECTS=""
27178         if test "$cf_cv_VERSION_GPRBUILD" != no
27179         then
27180                 USE_GNAT_GPRBUILD=""
27181         elif test "$cf_cv_VERSION_GNATMAKE" != no
27182         then
27183                 USE_GNAT_MAKE_GPR=""
27184         else
27185                 { echo "$as_me:27185: WARNING: use old makefile rules since tools are missing" >&5
27186 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27187         fi
27188 fi
27189
27190 if test "$cf_gnat_libraries" = yes
27191 then
27192         USE_GNAT_LIBRARIES=""
27193 else
27194         USE_GNAT_LIBRARIES="#"
27195 fi
27196
27197 echo "$as_me:27197: checking for ada-compiler" >&5
27198 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27199
27200 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27201 if test "${with_ada_compiler+set}" = set; then
27202   withval="$with_ada_compiler"
27203   cf_ada_compiler=$withval
27204 else
27205   cf_ada_compiler=gnatmake
27206 fi;
27207
27208 echo "$as_me:27208: result: $cf_ada_compiler" >&5
27209 echo "${ECHO_T}$cf_ada_compiler" >&6
27210
27211                         cf_ada_package=terminal_interface
27212
27213 echo "$as_me:27213: checking for ada-include" >&5
27214 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27215
27216 # Check whether --with-ada-include or --without-ada-include was given.
27217 if test "${with_ada_include+set}" = set; then
27218   withval="$with_ada_include"
27219
27220 else
27221   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27222 fi; if test -n "$prefix/share/ada/adainclude" ; then
27223
27224 if test "x$prefix" != xNONE; then
27225         cf_path_syntax="$prefix"
27226 else
27227         cf_path_syntax="$ac_default_prefix"
27228 fi
27229
27230 case ".$withval" in
27231 (.\$\(*\)*|.\'*\'*)
27232         ;;
27233 (..|./*|.\\*)
27234         ;;
27235 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27236         ;;
27237 (.\$\{*prefix\}*|.\$\{*dir\}*)
27238         eval withval="$withval"
27239         case ".$withval" in
27240         (.NONE/*)
27241                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27242                 ;;
27243         esac
27244         ;;
27245 (.no|.NONE/*)
27246         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27247         ;;
27248 (*)
27249         { { echo "$as_me:27249: error: expected a pathname, not \"$withval\"" >&5
27250 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27251    { (exit 1); exit 1; }; }
27252         ;;
27253 esac
27254
27255 fi
27256 eval ADA_INCLUDE="$withval"
27257
27258 echo "$as_me:27258: result: $ADA_INCLUDE" >&5
27259 echo "${ECHO_T}$ADA_INCLUDE" >&6
27260
27261 echo "$as_me:27261: checking for ada-objects" >&5
27262 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27263
27264 # Check whether --with-ada-objects or --without-ada-objects was given.
27265 if test "${with_ada_objects+set}" = set; then
27266   withval="$with_ada_objects"
27267
27268 else
27269   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27270 fi; if test -n "$prefix/lib/ada/adalib" ; then
27271
27272 if test "x$prefix" != xNONE; then
27273         cf_path_syntax="$prefix"
27274 else
27275         cf_path_syntax="$ac_default_prefix"
27276 fi
27277
27278 case ".$withval" in
27279 (.\$\(*\)*|.\'*\'*)
27280         ;;
27281 (..|./*|.\\*)
27282         ;;
27283 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27284         ;;
27285 (.\$\{*prefix\}*|.\$\{*dir\}*)
27286         eval withval="$withval"
27287         case ".$withval" in
27288         (.NONE/*)
27289                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27290                 ;;
27291         esac
27292         ;;
27293 (.no|.NONE/*)
27294         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27295         ;;
27296 (*)
27297         { { echo "$as_me:27297: error: expected a pathname, not \"$withval\"" >&5
27298 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27299    { (exit 1); exit 1; }; }
27300         ;;
27301 esac
27302
27303 fi
27304 eval ADA_OBJECTS="$withval"
27305
27306 echo "$as_me:27306: result: $ADA_OBJECTS" >&5
27307 echo "${ECHO_T}$ADA_OBJECTS" >&6
27308
27309 echo "$as_me:27309: checking if an Ada95 shared-library should be built" >&5
27310 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27311
27312 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27313 if test "${with_ada_sharedlib+set}" = set; then
27314   withval="$with_ada_sharedlib"
27315   with_ada_sharedlib=$withval
27316 else
27317   with_ada_sharedlib=no
27318 fi;
27319 echo "$as_me:27319: result: $with_ada_sharedlib" >&5
27320 echo "${ECHO_T}$with_ada_sharedlib" >&6
27321
27322 if test "x$with_ada_sharedlib" != xno
27323 then
27324         if test "x$cf_gnat_projects" != xyes
27325         then
27326                 { echo "$as_me:27326: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27327 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27328                 with_ada_sharedlib=no
27329         fi
27330 fi
27331
27332 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27333 MAKE_ADA_SHAREDLIB="#"
27334
27335 if test "x$with_ada_sharedlib" != xno
27336 then
27337         MAKE_ADA_SHAREDLIB=
27338         if test "x$with_ada_sharedlib" != xyes
27339         then
27340                 ADA_SHAREDLIB="$with_ada_sharedlib"
27341         fi
27342 fi
27343
27344                         # allow the Ada binding to be renamed
27345
27346 echo "$as_me:27346: checking for ada-libname" >&5
27347 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27348
27349 # Check whether --with-ada-libname or --without-ada-libname was given.
27350 if test "${with_ada_libname+set}" = set; then
27351   withval="$with_ada_libname"
27352   ADA_LIBNAME=$withval
27353 else
27354   ADA_LIBNAME=AdaCurses
27355 fi;
27356 case "x$ADA_LIBNAME" in
27357 (x|xyes|xno)
27358         ADA_LIBNAME=AdaCurses
27359         ;;
27360 esac
27361
27362 echo "$as_me:27362: result: $ADA_LIBNAME" >&5
27363 echo "${ECHO_T}$ADA_LIBNAME" >&6
27364
27365                 fi
27366         fi
27367 else
27368         cf_with_ada=no
27369 fi
27370
27371 # do this "late" to avoid conflict with header-checks
27372 if test "x$with_widec" = xyes ; then
27373         echo "$as_me:27373: checking for wchar_t" >&5
27374 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27375 if test "${ac_cv_type_wchar_t+set}" = set; then
27376   echo $ECHO_N "(cached) $ECHO_C" >&6
27377 else
27378   cat >"conftest.$ac_ext" <<_ACEOF
27379 #line 27379 "configure"
27380 #include "confdefs.h"
27381 $ac_includes_default
27382 int
27383 main (void)
27384 {
27385 if ((wchar_t *) 0)
27386   return 0;
27387 if (sizeof (wchar_t))
27388   return 0;
27389   ;
27390   return 0;
27391 }
27392 _ACEOF
27393 rm -f "conftest.$ac_objext"
27394 if { (eval echo "$as_me:27394: \"$ac_compile\"") >&5
27395   (eval $ac_compile) 2>&5
27396   ac_status=$?
27397   echo "$as_me:27397: \$? = $ac_status" >&5
27398   (exit "$ac_status"); } &&
27399          { ac_try='test -s "conftest.$ac_objext"'
27400   { (eval echo "$as_me:27400: \"$ac_try\"") >&5
27401   (eval $ac_try) 2>&5
27402   ac_status=$?
27403   echo "$as_me:27403: \$? = $ac_status" >&5
27404   (exit "$ac_status"); }; }; then
27405   ac_cv_type_wchar_t=yes
27406 else
27407   echo "$as_me: failed program was:" >&5
27408 cat "conftest.$ac_ext" >&5
27409 ac_cv_type_wchar_t=no
27410 fi
27411 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27412 fi
27413 echo "$as_me:27413: result: $ac_cv_type_wchar_t" >&5
27414 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27415
27416 echo "$as_me:27416: checking size of wchar_t" >&5
27417 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27418 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27419   echo $ECHO_N "(cached) $ECHO_C" >&6
27420 else
27421   if test "$ac_cv_type_wchar_t" = yes; then
27422   if test "$cross_compiling" = yes; then
27423   # Depending upon the size, compute the lo and hi bounds.
27424 cat >"conftest.$ac_ext" <<_ACEOF
27425 #line 27425 "configure"
27426 #include "confdefs.h"
27427 $ac_includes_default
27428 int
27429 main (void)
27430 {
27431 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27432   ;
27433   return 0;
27434 }
27435 _ACEOF
27436 rm -f "conftest.$ac_objext"
27437 if { (eval echo "$as_me:27437: \"$ac_compile\"") >&5
27438   (eval $ac_compile) 2>&5
27439   ac_status=$?
27440   echo "$as_me:27440: \$? = $ac_status" >&5
27441   (exit "$ac_status"); } &&
27442          { ac_try='test -s "conftest.$ac_objext"'
27443   { (eval echo "$as_me:27443: \"$ac_try\"") >&5
27444   (eval $ac_try) 2>&5
27445   ac_status=$?
27446   echo "$as_me:27446: \$? = $ac_status" >&5
27447   (exit "$ac_status"); }; }; then
27448   ac_lo=0 ac_mid=0
27449   while :; do
27450     cat >"conftest.$ac_ext" <<_ACEOF
27451 #line 27451 "configure"
27452 #include "confdefs.h"
27453 $ac_includes_default
27454 int
27455 main (void)
27456 {
27457 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27458   ;
27459   return 0;
27460 }
27461 _ACEOF
27462 rm -f "conftest.$ac_objext"
27463 if { (eval echo "$as_me:27463: \"$ac_compile\"") >&5
27464   (eval $ac_compile) 2>&5
27465   ac_status=$?
27466   echo "$as_me:27466: \$? = $ac_status" >&5
27467   (exit "$ac_status"); } &&
27468          { ac_try='test -s "conftest.$ac_objext"'
27469   { (eval echo "$as_me:27469: \"$ac_try\"") >&5
27470   (eval $ac_try) 2>&5
27471   ac_status=$?
27472   echo "$as_me:27472: \$? = $ac_status" >&5
27473   (exit "$ac_status"); }; }; then
27474   ac_hi=$ac_mid; break
27475 else
27476   echo "$as_me: failed program was:" >&5
27477 cat "conftest.$ac_ext" >&5
27478 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27479 fi
27480 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27481   done
27482 else
27483   echo "$as_me: failed program was:" >&5
27484 cat "conftest.$ac_ext" >&5
27485 ac_hi=-1 ac_mid=-1
27486   while :; do
27487     cat >"conftest.$ac_ext" <<_ACEOF
27488 #line 27488 "configure"
27489 #include "confdefs.h"
27490 $ac_includes_default
27491 int
27492 main (void)
27493 {
27494 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27495   ;
27496   return 0;
27497 }
27498 _ACEOF
27499 rm -f "conftest.$ac_objext"
27500 if { (eval echo "$as_me:27500: \"$ac_compile\"") >&5
27501   (eval $ac_compile) 2>&5
27502   ac_status=$?
27503   echo "$as_me:27503: \$? = $ac_status" >&5
27504   (exit "$ac_status"); } &&
27505          { ac_try='test -s "conftest.$ac_objext"'
27506   { (eval echo "$as_me:27506: \"$ac_try\"") >&5
27507   (eval $ac_try) 2>&5
27508   ac_status=$?
27509   echo "$as_me:27509: \$? = $ac_status" >&5
27510   (exit "$ac_status"); }; }; then
27511   ac_lo=$ac_mid; break
27512 else
27513   echo "$as_me: failed program was:" >&5
27514 cat "conftest.$ac_ext" >&5
27515 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27516 fi
27517 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27518   done
27519 fi
27520 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27521 # Binary search between lo and hi bounds.
27522 while test "x$ac_lo" != "x$ac_hi"; do
27523   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27524   cat >"conftest.$ac_ext" <<_ACEOF
27525 #line 27525 "configure"
27526 #include "confdefs.h"
27527 $ac_includes_default
27528 int
27529 main (void)
27530 {
27531 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27532   ;
27533   return 0;
27534 }
27535 _ACEOF
27536 rm -f "conftest.$ac_objext"
27537 if { (eval echo "$as_me:27537: \"$ac_compile\"") >&5
27538   (eval $ac_compile) 2>&5
27539   ac_status=$?
27540   echo "$as_me:27540: \$? = $ac_status" >&5
27541   (exit "$ac_status"); } &&
27542          { ac_try='test -s "conftest.$ac_objext"'
27543   { (eval echo "$as_me:27543: \"$ac_try\"") >&5
27544   (eval $ac_try) 2>&5
27545   ac_status=$?
27546   echo "$as_me:27546: \$? = $ac_status" >&5
27547   (exit "$ac_status"); }; }; then
27548   ac_hi=$ac_mid
27549 else
27550   echo "$as_me: failed program was:" >&5
27551 cat "conftest.$ac_ext" >&5
27552 ac_lo=`expr "$ac_mid" + 1`
27553 fi
27554 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27555 done
27556 ac_cv_sizeof_wchar_t=$ac_lo
27557 else
27558   if test "$cross_compiling" = yes; then
27559   { { echo "$as_me:27559: error: cannot run test program while cross compiling" >&5
27560 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27561    { (exit 1); exit 1; }; }
27562 else
27563   cat >"conftest.$ac_ext" <<_ACEOF
27564 #line 27564 "configure"
27565 #include "confdefs.h"
27566 $ac_includes_default
27567 int
27568 main (void)
27569 {
27570 FILE *f = fopen ("conftest.val", "w");
27571 if (!f)
27572   $ac_main_return (1);
27573 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
27574 fclose (f);
27575   ;
27576   return 0;
27577 }
27578 _ACEOF
27579 rm -f "conftest$ac_exeext"
27580 if { (eval echo "$as_me:27580: \"$ac_link\"") >&5
27581   (eval $ac_link) 2>&5
27582   ac_status=$?
27583   echo "$as_me:27583: \$? = $ac_status" >&5
27584   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27585   { (eval echo "$as_me:27585: \"$ac_try\"") >&5
27586   (eval $ac_try) 2>&5
27587   ac_status=$?
27588   echo "$as_me:27588: \$? = $ac_status" >&5
27589   (exit "$ac_status"); }; }; then
27590   ac_cv_sizeof_wchar_t=`cat conftest.val`
27591 else
27592   echo "$as_me: program exited with status $ac_status" >&5
27593 echo "$as_me: failed program was:" >&5
27594 cat "conftest.$ac_ext" >&5
27595 fi
27596 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27597 fi
27598 fi
27599 rm -f conftest.val
27600 else
27601   ac_cv_sizeof_wchar_t=0
27602 fi
27603 fi
27604 echo "$as_me:27604: result: $ac_cv_sizeof_wchar_t" >&5
27605 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27606 cat >>confdefs.h <<EOF
27607 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27608 EOF
27609
27610         # cross-compiling to mingw can run into the problem that attempting to
27611         # link with the regex library fails, causing the test to not set this to
27612         # a number.  "recent" autoconf does not address this problem either -TD
27613         if test -z "$ac_cv_sizeof_wchar_t"
27614         then
27615                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27616
27617 echo "${as_me:-configure}:27617: testing test failed (assume 2) ..." 1>&5
27618
27619                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27620                 mv confdefs.tmp confdefs.h
27621                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27622         fi
27623 fi
27624
27625 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27626 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27627 ###
27628 ### ticlib modules may be a separate library, otherwise contained in termlib.
27629 ### termlib modules may be a separate library, otherwise contained in ncurses.
27630 ###
27631 ### The of "+" or " " between the tokens controls the way the script
27632 ### chooses to split module lists into libraries.
27633 ###
27634 ### (see CF_LIB_RULES).
27635 echo "$as_me:27635: checking for library subsets" >&5
27636 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27637 LIB_SUBSETS=
27638
27639 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27640         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27641         if test "$with_ticlib" != no ; then
27642                 LIB_SUBSETS="${LIB_SUBSETS} "
27643         else
27644                 LIB_SUBSETS="${LIB_SUBSETS}+"
27645         fi
27646 fi
27647
27648 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27649 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27650
27651 if test "$with_termlib" != no ; then
27652         LIB_SUBSETS="${LIB_SUBSETS} "
27653 else
27654         LIB_SUBSETS="${LIB_SUBSETS}+"
27655 fi
27656
27657 LIB_SUBSETS="${LIB_SUBSETS}base"
27658
27659 # Most term-driver calls are to tinfo, but some like init_pair are to the
27660 # base library (so it resides in base).
27661 if test "$with_term_driver" != no ; then
27662         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27663         case "$cf_cv_system_name" in
27664         (*mingw32*|*mingw64*)
27665                 if test "x$with_exp_win32" = xyes ; then
27666                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27667                 else
27668                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27669                 fi
27670                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27671                 ;;
27672         (*)
27673                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27674                 ;;
27675         esac
27676 elif test "x$with_exp_win32" = xyes ; then
27677         case "$cf_cv_system_name" in
27678         (*mingw32*|*mingw64*)
27679                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27680                 ;;
27681         (*)
27682                 ;;
27683         esac
27684 fi
27685
27686 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27687 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27688
27689 echo "$as_me:27689: result: $LIB_SUBSETS" >&5
27690 echo "${ECHO_T}$LIB_SUBSETS" >&6
27691
27692 ### Construct the list of include-directories to be generated
27693
27694 if test "$srcdir" != "."; then
27695         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27696 fi
27697 CPPFLAGS="-I../include $CPPFLAGS"
27698 if test "$srcdir" != "."; then
27699         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27700 fi
27701 CPPFLAGS="-I. $CPPFLAGS"
27702
27703 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27704 if test "$srcdir" != "."; then
27705         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27706 fi
27707 if test "$GCC" != yes; then
27708         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27709 elif test "$includedir" != "/usr/include"; then
27710         if test "$includedir" = '${prefix}/include' ; then
27711                 if test x$prefix != x/usr ; then
27712                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27713                 fi
27714         else
27715                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27716         fi
27717 fi
27718
27719 ### Build up pieces for makefile rules
27720 echo "$as_me:27720: checking default library suffix" >&5
27721 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27722
27723         case $DFT_LWR_MODEL in
27724         (libtool) DFT_ARG_SUFFIX=''   ;;
27725         (normal)  DFT_ARG_SUFFIX=''   ;;
27726         (debug)   DFT_ARG_SUFFIX='_g' ;;
27727         (profile) DFT_ARG_SUFFIX='_p' ;;
27728         (shared)  DFT_ARG_SUFFIX=''   ;;
27729         esac
27730         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27731 echo "$as_me:27731: result: $DFT_ARG_SUFFIX" >&5
27732 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27733
27734 echo "$as_me:27734: checking default library-dependency suffix" >&5
27735 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27736
27737         case X$DFT_LWR_MODEL in
27738         (Xlibtool)
27739                 DFT_LIB_SUFFIX='.la'
27740                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27741                 ;;
27742         (Xdebug)
27743                 case "$cf_cv_system_name" in
27744                 (*-msvc*)
27745                         DFT_LIB_SUFFIX='_g.lib'
27746                         ;;
27747                 (*)
27748                         DFT_LIB_SUFFIX='_g.a'
27749                         ;;
27750                 esac
27751                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27752                 ;;
27753         (Xprofile)
27754                 case "$cf_cv_system_name" in
27755                 (*-msvc*)
27756                         DFT_LIB_SUFFIX='_p.lib'
27757                         ;;
27758                 (*)
27759                         DFT_LIB_SUFFIX='_p.a'
27760                         ;;
27761                 esac
27762                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27763                 ;;
27764         (Xshared)
27765                 case "$cf_cv_system_name" in
27766                 (aix[5-7]*)
27767                         DFT_LIB_SUFFIX='.so'
27768                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27769                         ;;
27770                 (*-msvc*)
27771                         DFT_LIB_SUFFIX='.dll'
27772                         DFT_DEP_SUFFIX='.dll.lib'
27773                         ;;
27774                 (cygwin*|msys*|mingw*)
27775                         DFT_LIB_SUFFIX='.dll'
27776                         DFT_DEP_SUFFIX='.dll.a'
27777                         ;;
27778                 (darwin*)
27779                         DFT_LIB_SUFFIX='.dylib'
27780                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27781                         ;;
27782                 (hpux*)
27783                         case "$target" in
27784                         (ia64*)
27785                                 DFT_LIB_SUFFIX='.so'
27786                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27787                                 ;;
27788                         (*)
27789                                 DFT_LIB_SUFFIX='.sl'
27790                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27791                                 ;;
27792                         esac
27793                         ;;
27794                 (*)
27795                         DFT_LIB_SUFFIX='.so'
27796                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27797                         ;;
27798                 esac
27799                 ;;
27800         (*)
27801                 case "$target" in
27802                 (*-msvc*)
27803                         DFT_LIB_SUFFIX='.lib'
27804                         ;;
27805                 (*)
27806                         DFT_LIB_SUFFIX='.a'
27807                         ;;
27808                 esac
27809                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27810                 ;;
27811         esac
27812         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27813         then
27814                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27815                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27816         fi
27817 echo "$as_me:27817: result: $DFT_DEP_SUFFIX" >&5
27818 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27819
27820 echo "$as_me:27820: checking default object directory" >&5
27821 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27822
27823         case $DFT_LWR_MODEL in
27824         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27825         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27826         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27827         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27828         (shared)
27829                 case "$cf_cv_system_name" in
27830                 (cygwin|msys)
27831                         DFT_OBJ_SUBDIR='objects' ;;
27832                 (*)
27833                         DFT_OBJ_SUBDIR='obj_s' ;;
27834                 esac
27835         esac
27836 echo "$as_me:27836: result: $DFT_OBJ_SUBDIR" >&5
27837 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27838
27839 if test "x$cf_with_cxx" = xyes ; then
27840 echo "$as_me:27840: checking c++ library-dependency suffix" >&5
27841 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27842 if test "$with_libtool" != "no"; then
27843         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27844         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27845 elif test "$with_shared_cxx" != "no"; then
27846         # also for g++ users...
27847         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27848 else
27849         # we normally make a static library because C/C++ library rules differ
27850
27851         case Xnormal in
27852         (Xlibtool)
27853                 CXX_LIB_SUFFIX='.la'
27854                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27855                 ;;
27856         (Xdebug)
27857                 case "$cf_cv_system_name" in
27858                 (*-msvc*)
27859                         CXX_LIB_SUFFIX='_g.lib'
27860                         ;;
27861                 (*)
27862                         CXX_LIB_SUFFIX='_g.a'
27863                         ;;
27864                 esac
27865                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27866                 ;;
27867         (Xprofile)
27868                 case "$cf_cv_system_name" in
27869                 (*-msvc*)
27870                         CXX_LIB_SUFFIX='_p.lib'
27871                         ;;
27872                 (*)
27873                         CXX_LIB_SUFFIX='_p.a'
27874                         ;;
27875                 esac
27876                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27877                 ;;
27878         (Xshared)
27879                 case "$cf_cv_system_name" in
27880                 (aix[5-7]*)
27881                         CXX_LIB_SUFFIX='.so'
27882                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27883                         ;;
27884                 (*-msvc*)
27885                         CXX_LIB_SUFFIX='.dll'
27886                         CXX_DEP_SUFFIX='.dll.lib'
27887                         ;;
27888                 (cygwin*|msys*|mingw*)
27889                         CXX_LIB_SUFFIX='.dll'
27890                         CXX_DEP_SUFFIX='.dll.a'
27891                         ;;
27892                 (darwin*)
27893                         CXX_LIB_SUFFIX='.dylib'
27894                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27895                         ;;
27896                 (hpux*)
27897                         case "$target" in
27898                         (ia64*)
27899                                 CXX_LIB_SUFFIX='.so'
27900                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27901                                 ;;
27902                         (*)
27903                                 CXX_LIB_SUFFIX='.sl'
27904                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27905                                 ;;
27906                         esac
27907                         ;;
27908                 (*)
27909                         CXX_LIB_SUFFIX='.so'
27910                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27911                         ;;
27912                 esac
27913                 ;;
27914         (*)
27915                 case "$target" in
27916                 (*-msvc*)
27917                         CXX_LIB_SUFFIX='.lib'
27918                         ;;
27919                 (*)
27920                         CXX_LIB_SUFFIX='.a'
27921                         ;;
27922                 esac
27923                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27924                 ;;
27925         esac
27926         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27927         then
27928                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27929                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27930         fi
27931
27932 fi
27933 echo "$as_me:27933: result: $CXX_LIB_SUFFIX" >&5
27934 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27935
27936 fi
27937
27938 # do not want -ldl in build except as needed for -lncurses dependency
27939 if test "x$with_dlsym" = xyes ; then
27940 if test "$DFT_LWR_MODEL" = shared || \
27941    test "$DFT_LWR_MODEL" = libtool ; then
27942
27943 # remove dl library from $LIBS
27944 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27945
27946 fi
27947 fi
27948 ### Set up low-level terminfo dependencies for makefiles.
27949
27950 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27951 # do not need libdl
27952 TICS_LIST=
27953 if test "x$with_dlsym" = xyes ; then
27954
27955 # remove dl library from $SHLIB_LIST
27956 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27957
27958 fi
27959
27960 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27961 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27962 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27963 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27964 then
27965         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27966 fi
27967
27968 if test "$with_ticlib" != no ; then
27969
27970         if test "x$with_ticlib" != xyes ; then
27971                 TICS_NAME=$with_ticlib
27972                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27973                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27974                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27975                 TICS_LIB_SUFFIX="${with_ticlib}"
27976         else
27977                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27978                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27979                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27980                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27981         fi
27982         TICS_LDFLAGS="-L${LIB_DIR}"
27983         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27984 else
27985         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27986         TICS_LDFLAGS="-L${LIB_DIR}"
27987         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27988 fi
27989
27990 if test "$with_termlib" != no ; then
27991
27992         if test "x$with_termlib" != xyes ; then
27993                 TINFO_NAME=$with_termlib
27994                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27995                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27996                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27997                 TINFO_LIB_SUFFIX="${with_termlib}"
27998         else
27999                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28000                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28001                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28002                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28003         fi
28004
28005         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28006         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28007         if test "$DFT_LWR_MODEL" = "libtool"; then
28008                 TEST_ARGS="${TEST_DEPS}"
28009                 TEST_ARG2="${TEST_DEP2}"
28010                 TINFO_LDFLAGS="-L${LIB_DIR}"
28011                 TINFO_LIBS="$TEST_ARGS"
28012                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28013                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28014         else
28015                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28016                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28017                 if test "x$with_term_driver" != xno ; then
28018                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28019                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28020                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28021                 else
28022                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28023                         TINFO_LIBS="$TEST_ARGS"
28024                 fi
28025                 TINFO_LDFLAGS="-L${LIB_DIR}"
28026                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28027         fi
28028 else
28029         # the next lines are needed for linking libtic over libncurses
28030         TINFO_NAME=${LIB_NAME}
28031         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28032         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28033         if test "x$with_tic_depends" = xyes ; then
28034                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28035         else
28036                 TICS_LIST="$SHLIB_LIST"
28037         fi
28038
28039         TINFO_LDFLAGS="-L${LIB_DIR}"
28040         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28041 fi
28042
28043 if test "$DFT_LWR_MODEL" = shared ; then
28044         case "$cf_cv_system_name" in
28045         (cygwin*|msys*)
28046                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28047                 TINFO_SUFFIX=.dll
28048                 ;;
28049         esac
28050 fi
28051
28052 if test "x$with_dlsym" = xyes ; then
28053
28054 # remove dl library from $TICS_LIST
28055 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28056
28057 fi
28058
28059 if test "$DFT_LWR_MODEL" = "libtool"; then
28060         OBJEXT=lo
28061 fi
28062
28063 # needed for Ada95
28064 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28065
28066 case "$DFT_LWR_MODEL" in
28067 (normal|debug|profile)
28068
28069 if test "$GCC" = yes ; then
28070         case "$cf_cv_system_name" in
28071         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28072                 LDFLAGS_STATIC=
28073                 LDFLAGS_SHARED=
28074                 ;;
28075         (*)     # normally, except when broken
28076                 LDFLAGS_STATIC=-static
28077                 LDFLAGS_SHARED=-dynamic
28078                 ;;
28079         esac
28080 else
28081         case "$cf_cv_system_name" in
28082         (aix[4-7]*)     # from ld manpage
28083                 LDFLAGS_STATIC=-bstatic
28084                 LDFLAGS_SHARED=-bdynamic
28085                 ;;
28086         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28087                 # We could also use just "archive" and "shared".
28088                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28089                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28090                 ;;
28091         (irix*)         # from ld manpage IRIX64
28092                 LDFLAGS_STATIC=-Bstatic
28093                 LDFLAGS_SHARED=-Bdynamic
28094                 ;;
28095         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28096                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28097                 LDFLAGS_STATIC=-noso
28098                 LDFLAGS_SHARED=-so_archive
28099                 ;;
28100         (solaris2*)
28101                 LDFLAGS_STATIC=-Bstatic
28102                 LDFLAGS_SHARED=-Bdynamic
28103                 ;;
28104         esac
28105 fi
28106
28107 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28108 then
28109         echo "$as_me:28109: checking if linker supports switching between static/dynamic" >&5
28110 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28111
28112         rm -f libconftest.a
28113         cat >conftest.$ac_ext <<EOF
28114 #line 28114 "configure"
28115 #include <stdio.h>
28116 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28117 EOF
28118         if { (eval echo "$as_me:28118: \"$ac_compile\"") >&5
28119   (eval $ac_compile) 2>&5
28120   ac_status=$?
28121   echo "$as_me:28121: \$? = $ac_status" >&5
28122   (exit "$ac_status"); } ; then
28123                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28124                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28125         fi
28126         rm -f conftest.*
28127
28128         cf_save_LIBS="$LIBS"
28129
28130         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28131         cat >"conftest.$ac_ext" <<_ACEOF
28132 #line 28132 "configure"
28133 #include "confdefs.h"
28134
28135 #line 28135 "configure"
28136 #include <stdio.h>
28137 int cf_ldflags_static(FILE *fp);
28138
28139 int
28140 main (void)
28141 {
28142
28143         return cf_ldflags_static(stdin);
28144
28145   ;
28146   return 0;
28147 }
28148 _ACEOF
28149 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28150 if { (eval echo "$as_me:28150: \"$ac_link\"") >&5
28151   (eval $ac_link) 2>&5
28152   ac_status=$?
28153   echo "$as_me:28153: \$? = $ac_status" >&5
28154   (exit "$ac_status"); } &&
28155          { ac_try='test -s "conftest$ac_exeext"'
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
28162         # some linkers simply ignore the -dynamic
28163         case x`file "conftest$ac_exeext" 2>/dev/null` in
28164         (*static*)
28165                 cf_ldflags_static=no
28166                 ;;
28167         (*)
28168                 cf_ldflags_static=yes
28169                 ;;
28170         esac
28171
28172 else
28173   echo "$as_me: failed program was:" >&5
28174 cat "conftest.$ac_ext" >&5
28175 cf_ldflags_static=no
28176 fi
28177 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28178
28179         rm -f libconftest.*
28180         LIBS="$cf_save_LIBS"
28181
28182         echo "$as_me:28182: result: $cf_ldflags_static" >&5
28183 echo "${ECHO_T}$cf_ldflags_static" >&6
28184
28185         if test "$cf_ldflags_static" != yes
28186         then
28187                 LDFLAGS_STATIC=
28188                 LDFLAGS_SHARED=
28189         fi
28190 else
28191         LDFLAGS_STATIC=
28192         LDFLAGS_SHARED=
28193 fi
28194
28195         ;;
28196 esac
28197
28198 echo "$as_me:28198: checking where we will install curses.h" >&5
28199 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28200
28201 includesubdir=
28202 if test "$with_overwrite" = no && \
28203  { test "x$includedir" = 'x${prefix}/include' || \
28204    test "x$includedir" = "x${prefix}/include"; }
28205 then
28206         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28207 fi
28208 echo "$as_me:28208: result: ${includedir}${includesubdir}" >&5
28209 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28210
28211 ### Resolve a conflict between normal and wide-curses by forcing applications
28212 ### that will need libutf8 to add it to their configure script.
28213 if test "$with_overwrite" != no ; then
28214 if test "$NCURSES_LIBUTF8" = 1 ; then
28215         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28216         { echo "$as_me:28216: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28217 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28218 fi
28219 fi
28220 WITH_OVERWRITE=$with_overwrite
28221
28222 ### At least on MinGW a shared library build without libtool
28223 ### requires adding the additional libs to the link list.
28224 case "$cf_cv_system_name" in
28225 (*mingw32*|*mingw64*)
28226         if test "$DFT_LWR_MODEL" != "libtool"; then
28227            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28228         fi
28229         ;;
28230 *)      ;;
28231 esac
28232
28233 # used to separate tack out of the tree
28234 NCURSES_TREE=
28235
28236 ### predefined stuff for the test programs
28237
28238 cat >>confdefs.h <<\EOF
28239 #define HAVE_SLK_COLOR 1
28240 EOF
28241
28242 # pkgsrc uses these
28243
28244 echo "$as_me:28244: checking for desired basename for form library" >&5
28245 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28246
28247 # Check whether --with-form-libname or --without-form-libname was given.
28248 if test "${with_form_libname+set}" = set; then
28249   withval="$with_form_libname"
28250   with_lib_basename=$withval
28251 else
28252   with_lib_basename=form
28253 fi;
28254 FORM_NAME="$with_lib_basename"
28255
28256 case "x$FORM_NAME" in
28257 (x|xno|xnone|xyes)
28258         FORM_NAME=form
28259         ;;
28260 (*)
28261         ;;
28262 esac
28263
28264 echo "$as_me:28264: result: $FORM_NAME" >&5
28265 echo "${ECHO_T}$FORM_NAME" >&6
28266
28267 echo "$as_me:28267: checking for desired basename for menu library" >&5
28268 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28269
28270 # Check whether --with-menu-libname or --without-menu-libname was given.
28271 if test "${with_menu_libname+set}" = set; then
28272   withval="$with_menu_libname"
28273   with_lib_basename=$withval
28274 else
28275   with_lib_basename=menu
28276 fi;
28277 MENU_NAME="$with_lib_basename"
28278
28279 case "x$MENU_NAME" in
28280 (x|xno|xnone|xyes)
28281         MENU_NAME=menu
28282         ;;
28283 (*)
28284         ;;
28285 esac
28286
28287 echo "$as_me:28287: result: $MENU_NAME" >&5
28288 echo "${ECHO_T}$MENU_NAME" >&6
28289
28290 echo "$as_me:28290: checking for desired basename for panel library" >&5
28291 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28292
28293 # Check whether --with-panel-libname or --without-panel-libname was given.
28294 if test "${with_panel_libname+set}" = set; then
28295   withval="$with_panel_libname"
28296   with_lib_basename=$withval
28297 else
28298   with_lib_basename=panel
28299 fi;
28300 PANEL_NAME="$with_lib_basename"
28301
28302 case "x$PANEL_NAME" in
28303 (x|xno|xnone|xyes)
28304         PANEL_NAME=panel
28305         ;;
28306 (*)
28307         ;;
28308 esac
28309
28310 echo "$as_me:28310: result: $PANEL_NAME" >&5
28311 echo "${ECHO_T}$PANEL_NAME" >&6
28312
28313 echo "$as_me:28313: checking for desired basename for cxx library" >&5
28314 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28315
28316 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28317 if test "${with_cxx_libname+set}" = set; then
28318   withval="$with_cxx_libname"
28319   with_lib_basename=$withval
28320 else
28321   with_lib_basename=ncurses++
28322 fi;
28323 CXX_NAME="$with_lib_basename"
28324
28325 case "x$CXX_NAME" in
28326 (x|xno|xnone|xyes)
28327         CXX_NAME=ncurses++
28328         ;;
28329 (*)
28330         ;;
28331 esac
28332
28333 echo "$as_me:28333: result: $CXX_NAME" >&5
28334 echo "${ECHO_T}$CXX_NAME" >&6
28335
28336 ### Construct the list of subdirectories for which we'll customize makefiles
28337 ### with the appropriate compile-rules.
28338
28339 echo "$as_me:28339: checking for src modules" >&5
28340 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28341
28342 # dependencies and linker-arguments for test-programs
28343 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28344 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28345 if test "$DFT_LWR_MODEL" = "libtool"; then
28346         TEST_ARGS="${TEST_DEPS}"
28347         TEST_ARG2="${TEST_DEP2}"
28348 else
28349         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28350         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28351 fi
28352
28353 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28354 cf_cv_src_modules=
28355 for cf_dir in $modules_to_build
28356 do
28357         if test -f "$srcdir/$cf_dir/modules" ; then
28358
28359                 # We may/may not have tack in the distribution, though the
28360                 # makefile is.
28361                 if test "$cf_dir" = tack ; then
28362                         if test "x$cf_with_tack" != "xyes"; then
28363                                 continue
28364                         fi
28365                 fi
28366
28367                 if test -z "$cf_cv_src_modules"; then
28368                         cf_cv_src_modules=$cf_dir
28369                 else
28370                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28371                 fi
28372
28373                 # Make the ncurses_cfg.h file record the library interface files as
28374                 # well.  These are header files that are the same name as their
28375                 # directory.  Ncurses is the only library that does not follow
28376                 # that pattern.
28377                 if test "$cf_dir" = tack ; then
28378                         continue
28379                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28380
28381 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28382
28383                         cat >>confdefs.h <<EOF
28384 #define HAVE_${cf_have_include}_H 1
28385 EOF
28386
28387                         cat >>confdefs.h <<EOF
28388 #define HAVE_LIB${cf_have_include} 1
28389 EOF
28390
28391 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28392
28393 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28394
28395                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28396                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28397                         if test "$DFT_LWR_MODEL" = "libtool"; then
28398                                 TEST_ARGS="${TEST_DEPS}"
28399                                 TEST_ARG2="${TEST_DEP2}"
28400                         else
28401                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28402                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28403                         fi
28404                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28405                 fi
28406         fi
28407 done
28408 echo "$as_me:28408: result: $cf_cv_src_modules" >&5
28409 echo "${ECHO_T}$cf_cv_src_modules" >&6
28410
28411 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28412 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28413
28414 SRC_SUBDIRS=
28415 if test "x$cf_with_manpages" != xno ; then
28416         SRC_SUBDIRS="$SRC_SUBDIRS man"
28417 fi
28418 SRC_SUBDIRS="$SRC_SUBDIRS include"
28419 for cf_dir in $cf_cv_src_modules
28420 do
28421         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28422 done
28423 if test "x$cf_with_tests" != "xno" ; then
28424         SRC_SUBDIRS="$SRC_SUBDIRS test"
28425 fi
28426 # always make this, to install the ncurses-config script
28427 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28428 if test "$cf_with_cxx_binding" != no; then
28429         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28430         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28431 fi
28432
28433 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28434 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28435
28436 ADA_SUBDIRS=
28437 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28438         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28439         ADA_SUBDIRS="gen src"
28440         if test "x$cf_with_tests" != "xno" ; then
28441                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28442         fi
28443 fi
28444
28445 SUB_MAKEFILES=
28446 for cf_dir in $SRC_SUBDIRS
28447 do
28448         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28449 done
28450
28451 if test -n "$ADA_SUBDIRS"; then
28452         for cf_dir in $ADA_SUBDIRS
28453         do
28454                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28455         done
28456
28457 fi
28458
28459 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28460    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28461    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28462    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28463 fi
28464
28465 DIRS_TO_MAKE="lib"
28466 for cf_item in $cf_list_models
28467 do
28468
28469         case $cf_item in
28470         (libtool) cf_subdir='obj_lo'  ;;
28471         (normal)  cf_subdir='objects' ;;
28472         (debug)   cf_subdir='obj_g' ;;
28473         (profile) cf_subdir='obj_p' ;;
28474         (shared)
28475                 case "$cf_cv_system_name" in
28476                 (cygwin|msys)
28477                         cf_subdir='objects' ;;
28478                 (*)
28479                         cf_subdir='obj_s' ;;
28480                 esac
28481         esac
28482
28483         for cf_item2 in $DIRS_TO_MAKE
28484         do
28485                 test "$cf_item2" = "$cf_subdir" && break
28486         done
28487         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28488 done
28489 for cf_dir in $DIRS_TO_MAKE
28490 do
28491         test ! -d "$cf_dir" && mkdir "$cf_dir"
28492 done
28493
28494 # symbols that differ when compiling Ada95 by itself.
28495 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28496
28497 # values to use as strings
28498
28499 cat >>confdefs.h <<EOF
28500 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28501 EOF
28502
28503 cat >>confdefs.h <<EOF
28504 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28505 EOF
28506
28507 ### Define substitutions for header files to avoid name-pollution
28508
28509 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28510         HAVE_TCGETATTR=1
28511 else
28512         HAVE_TCGETATTR=0
28513 fi
28514
28515 if test "x$ac_cv_header_stdint_h" = xyes ; then
28516         HAVE_STDINT_H=1
28517 else
28518         HAVE_STDINT_H=0
28519 fi
28520
28521 if test "x$ac_cv_header_termio_h" = xyes ; then
28522         HAVE_TERMIO_H=1
28523 else
28524         HAVE_TERMIO_H=0
28525 fi
28526
28527 if test "x$ac_cv_header_termios_h" = xyes ; then
28528         HAVE_TERMIOS_H=1
28529 else
28530         HAVE_TERMIOS_H=0
28531 fi
28532
28533 ################################################################################
28534 test "x$use_database" = xyes && \
28535 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28536
28537 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28538 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28539
28540 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28541 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28542 fi
28543
28544 if test "x$cf_with_tests" != xno ; then
28545         MAKE_TESTS=
28546 else
28547         MAKE_TESTS="#"
28548 fi
28549
28550 ADAHTML_DIR=../../doc/html/ada
28551
28552 # workaround for OS/2 (20151017)
28553 case "$cf_cv_system_name" in
28554 (os2*)
28555         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28556         ;;
28557 (*)
28558         LIBTOOL_OPTS_CXX=
28559         ;;
28560 esac
28561
28562 # workaround for g++ versus Solaris (20131116)
28563 case "$cf_cv_system_name" in
28564 (solaris2*)
28565         case "x$CPPFLAGS" in
28566         (*-D_XOPEN_SOURCE_EXTENDED*)
28567                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28568
28569 echo "${as_me:-configure}:28569: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28570
28571                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28572                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28573                 ;;
28574         esac
28575         ;;
28576 esac
28577
28578 # Help to automatically enable the extended curses features when using either
28579 # the *-config or the ".pc" files by adding defines.
28580 echo "$as_me:28580: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28581 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28582 PKG_CFLAGS=
28583 for cf_loop1 in $CPPFLAGS_after_XOPEN
28584 do
28585         cf_found=no
28586         for cf_loop2 in $CPPFLAGS_before_XOPEN
28587         do
28588                 if test "x$cf_loop1" = "x$cf_loop2"
28589                 then
28590                         cf_found=yes
28591                         break
28592                 fi
28593         done
28594         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28595 done
28596 echo "$as_me:28596: result: $PKG_CFLAGS" >&5
28597 echo "${ECHO_T}$PKG_CFLAGS" >&6
28598
28599 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28600 case "x$NCURSES_OSPEED" in
28601 (*short*)
28602         cf_compatible=1
28603         ;;
28604 (*)
28605         cf_compatible=0
28606         ;;
28607 esac
28608
28609 cat >>confdefs.h <<EOF
28610 #define NCURSES_OSPEED_COMPAT $cf_compatible
28611 EOF
28612
28613 case "x$cf_cv_typeof_chtype" in
28614 (xshort|xint|xlong)
28615         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28616         ;;
28617 esac
28618
28619 case "x$cf_cv_typeof_mmask_t" in
28620 (xshort|xint|xlong)
28621         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28622         ;;
28623 esac
28624
28625 # substitute into misc/Makefile to suppress
28626 # (un)install.data from the
28627 # (un)install rules.
28628 if test "x$cf_with_db_install" = "xno"; then
28629         MISC_INSTALL_DATA=
28630         MISC_UNINSTALL_DATA=
28631 else
28632         MISC_INSTALL_DATA=install.data
28633         MISC_UNINSTALL_DATA=uninstall.data
28634 fi
28635
28636 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28637         MAKE_DATABASE="#"
28638 else
28639         MAKE_DATABASE="$MAKE_TERMINFO"
28640 fi
28641
28642 if test -n "$PACKAGE"
28643 then
28644         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28645         export PACKAGE
28646         echo "package: $PACKAGE"
28647 fi
28648
28649 UNALTERED_SYMS=
28650 cf_filter_syms=no
28651
28652 if test -n "$RESULTING_SYMS"
28653 then
28654         cf_filter_syms=$cf_dft_filter_syms
28655         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28656
28657 echo "${as_me:-configure}:28657: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28658
28659 fi
28660
28661 if test "x$WILDCARD_SYMS" = xno
28662 then
28663         cf_filter_syms=yes
28664 fi
28665
28666 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28667
28668 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28669 if test "$cf_filter_syms" = yes
28670 then
28671         RESULTING_SYMS=resulting.map
28672 fi
28673
28674 if test "x$cross_compiling" = xyes ; then
28675         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28676         CHECK_BUILD="#"
28677 else
28678         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28679         CHECK_BUILD=
28680 fi
28681
28682 # This is used for the *-config script and *.pc data files.
28683
28684 echo "$as_me:28684: checking for linker search path" >&5
28685 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28686 if test "${cf_cv_ld_searchpath+set}" = set; then
28687   echo $ECHO_N "(cached) $ECHO_C" >&6
28688 else
28689
28690 if test "$cross_compiling" != yes ; then
28691
28692 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28693 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28694
28695 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28696 # update the cache, which makes it run faster.
28697 test -z "$cf_pathlist" && \
28698         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28699
28700 test -z "$cf_pathlist" &&
28701         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28702
28703 # This works with OpenBSD 6.5, which lists only filenames
28704 test -z "$cf_pathlist" &&
28705         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28706
28707 if test -z "$cf_pathlist"
28708 then
28709         # dyld default path with MacOS
28710         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28711         then
28712                 # do this to bypass check
28713                 cf_cv_ld_searchpath='$HOME/lib'
28714                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28715         fi
28716 fi
28717
28718 if test -z "$cf_pathlist"
28719 then
28720         # Solaris is "SunOS"
28721         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28722         then
28723                 case x`(isainfo -b)` in
28724                 (x64)
28725                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28726                         ;;
28727                 (x32)
28728                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28729                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28730                         ;;
28731                 (*)
28732                         { echo "$as_me:28732: WARNING: problem with Solaris architecture" >&5
28733 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28734                         ;;
28735                 esac
28736         fi
28737 fi
28738
28739 if test -z "$cf_pathlist"
28740 then
28741         # HP-UX
28742         if test x"`uname -s`" = xHP-UX
28743         then
28744                 case x`getconf LONG_BIT` in
28745                 (x64)
28746                         cf_pathlist="/usr/lib/hpux64"
28747                         ;;
28748                 (x*)
28749                         cf_pathlist="/usr/lib/hpux32"
28750                         ;;
28751                 esac
28752         fi
28753 fi
28754
28755 fi
28756
28757 # If nothing else, assume it is conventional
28758 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28759
28760 # Finally, check that this is only directories
28761 for cf_path in $0 $cf_pathlist
28762 do
28763         if test -d "$cf_path"; then
28764                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28765                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28766         fi
28767 done
28768
28769 # Ensure that it is nonempty
28770 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28771
28772 fi
28773 echo "$as_me:28773: result: $cf_cv_ld_searchpath" >&5
28774 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28775
28776 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28777
28778 cat >>confdefs.h <<\EOF
28779 #define HAVE_CURSES_DATA_BOOLNAMES 1
28780 EOF
28781
28782 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 $SUB_MAKEFILES Makefile"
28783 ac_config_commands="$ac_config_commands default"
28784 cat >confcache <<\_ACEOF
28785 # This file is a shell script that caches the results of configure
28786 # tests run on this system so they can be shared between configure
28787 # scripts and configure runs, see configure's option --config-cache.
28788 # It is not useful on other systems.  If it contains results you don't
28789 # want to keep, you may remove or edit it.
28790 #
28791 # config.status only pays attention to the cache file if you give it
28792 # the --recheck option to rerun configure.
28793 #
28794 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28795 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28796 # following values.
28797
28798 _ACEOF
28799
28800 # The following way of writing the cache mishandles newlines in values,
28801 # but we know of no workaround that is simple, portable, and efficient.
28802 # So, don't put newlines in cache variables' values.
28803 # Ultrix sh set writes to stderr and can't be redirected directly,
28804 # and sets the high bit in the cache file unless we assign to the vars.
28805 {
28806   (set) 2>&1 |
28807     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28808     *ac_space=\ *)
28809       # `set' does not quote correctly, so add quotes (double-quote
28810       # substitution turns \\\\ into \\, and sed turns \\ into \).
28811       sed -n \
28812         "s/'/'\\\\''/g;
28813           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28814       ;;
28815     *)
28816       # `set' quotes correctly as required by POSIX, so do not add quotes.
28817       sed -n \
28818         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28819       ;;
28820     esac;
28821 } |
28822   sed '
28823      t clear
28824      : clear
28825      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28826      t end
28827      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28828      : end' >>confcache
28829 if cmp -s $cache_file confcache; then :; else
28830   if test -w $cache_file; then
28831     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28832     cat confcache >$cache_file
28833   else
28834     echo "not updating unwritable cache $cache_file"
28835   fi
28836 fi
28837 rm -f confcache
28838
28839 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28840 # Let make expand exec_prefix.
28841 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28842
28843 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28844 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28845 # trailing colons and then remove the whole line if VPATH becomes empty
28846 # (actually we leave an empty line to preserve line numbers).
28847 if test "x$srcdir" = x.; then
28848   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28849 s/:*\$(srcdir):*/:/;
28850 s/:*\${srcdir}:*/:/;
28851 s/:*@srcdir@:*/:/;
28852 s/^\([^=]*=[    ]*\):*/\1/;
28853 s/:*$//;
28854 s/^[^=]*=[      ]*$//;
28855 }'
28856 fi
28857
28858 DEFS=-DHAVE_CONFIG_H
28859
28860 : "${CONFIG_STATUS=./config.status}"
28861 ac_clean_files_save=$ac_clean_files
28862 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28863 { echo "$as_me:28863: creating $CONFIG_STATUS" >&5
28864 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28865 cat >"$CONFIG_STATUS" <<_ACEOF
28866 #! $SHELL
28867 # Generated automatically by configure.
28868 # Run this file to recreate the current configuration.
28869 # Compiler output produced by configure, useful for debugging
28870 # configure, is in config.log if it exists.
28871
28872 debug=false
28873 SHELL=\${CONFIG_SHELL-$SHELL}
28874 ac_cs_invocation="\$0 \$@"
28875
28876 CLICOLOR_FORCE= GREP_OPTIONS=
28877 unset CLICOLOR_FORCE GREP_OPTIONS
28878 _ACEOF
28879
28880 cat >>"$CONFIG_STATUS" <<\_ACEOF
28881 # Be Bourne compatible
28882 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28883   emulate sh
28884   NULLCMD=:
28885 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28886   set -o posix
28887 fi
28888
28889 # Name of the executable.
28890 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28891
28892 if expr a : '\(a\)' >/dev/null 2>&1; then
28893   as_expr=expr
28894 else
28895   as_expr=false
28896 fi
28897
28898 rm -f conf$$ conf$$.exe conf$$.file
28899 echo >conf$$.file
28900 if ln -s conf$$.file conf$$ 2>/dev/null; then
28901   # We could just check for DJGPP; but this test a) works b) is more generic
28902   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28903   if test -f conf$$.exe; then
28904     # Don't use ln at all; we don't have any links
28905     as_ln_s='cp -p'
28906   else
28907     as_ln_s='ln -s'
28908   fi
28909 elif ln conf$$.file conf$$ 2>/dev/null; then
28910   as_ln_s=ln
28911 else
28912   as_ln_s='cp -p'
28913 fi
28914 rm -f conf$$ conf$$.exe conf$$.file
28915
28916 as_executable_p="test -f"
28917
28918 # Support unset when possible.
28919 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28920   as_unset="unset"
28921 else
28922   as_unset="false"
28923 fi
28924
28925 # NLS nuisances.
28926 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28927 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28928 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28929 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28930 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28931 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28932 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28933 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28934
28935 # IFS
28936 # We need space, tab and new line, in precisely that order.
28937 as_nl='
28938 '
28939 IFS="   $as_nl"
28940
28941 # CDPATH.
28942 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28943
28944 exec 6>&1
28945
28946 _ACEOF
28947
28948 # Files that config.status was made for.
28949 if test -n "$ac_config_files"; then
28950   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
28951 fi
28952
28953 if test -n "$ac_config_headers"; then
28954   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
28955 fi
28956
28957 if test -n "$ac_config_links"; then
28958   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
28959 fi
28960
28961 if test -n "$ac_config_commands"; then
28962   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
28963 fi
28964
28965 cat >>"$CONFIG_STATUS" <<\EOF
28966
28967 ac_cs_usage="\
28968 \`$as_me' instantiates files from templates according to the
28969 current configuration.
28970
28971 Usage: $0 [OPTIONS] [FILE]...
28972
28973   -h, --help       print this help, then exit
28974   -V, --version    print version number, then exit
28975   -d, --debug      don't remove temporary files
28976       --recheck    update $as_me by reconfiguring in the same conditions
28977   --file=FILE[:TEMPLATE]
28978                    instantiate the configuration file FILE
28979   --header=FILE[:TEMPLATE]
28980                    instantiate the configuration header FILE
28981
28982 Configuration files:
28983 $config_files
28984
28985 Configuration headers:
28986 $config_headers
28987
28988 Configuration commands:
28989 $config_commands
28990
28991 Report bugs to <dickey@invisible-island.net>."
28992 EOF
28993
28994 cat >>"$CONFIG_STATUS" <<EOF
28995 ac_cs_version="\\
28996 config.status
28997 configured by $0, generated by GNU Autoconf 2.52.20210509,
28998   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28999
29000 Copyright 2003-2020,2021        Thomas E. Dickey
29001 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29002 Free Software Foundation, Inc.
29003 This config.status script is free software; the Free Software Foundation
29004 gives unlimited permission to copy, distribute and modify it."
29005 srcdir="$srcdir"
29006 INSTALL="$INSTALL"
29007 EOF
29008
29009 cat >>"$CONFIG_STATUS" <<\EOF
29010 # If no file are specified by the user, then we need to provide default
29011 # value.  By we need to know if files were specified by the user.
29012 ac_need_defaults=:
29013 while test $# != 0
29014 do
29015   case $1 in
29016   --*=*)
29017     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29018     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29019     shift
29020     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29021     shift
29022     ;;
29023   -*);;
29024   *) # This is not an option, so the user has probably given explicit
29025      # arguments.
29026      ac_need_defaults=false;;
29027   esac
29028
29029   case $1 in
29030   # Handling of the options.
29031 EOF
29032 cat >>"$CONFIG_STATUS" <<EOF
29033   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29034     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29035     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29036 EOF
29037 cat >>"$CONFIG_STATUS" <<\EOF
29038   --version | --vers* | -V )
29039     echo "$ac_cs_version"; exit 0 ;;
29040   --he | --h)
29041     # Conflict between --help and --header
29042     { { echo "$as_me:29042: error: ambiguous option: $1
29043 Try \`$0 --help' for more information." >&5
29044 echo "$as_me: error: ambiguous option: $1
29045 Try \`$0 --help' for more information." >&2;}
29046    { (exit 1); exit 1; }; };;
29047   --help | --hel | -h )
29048     echo "$ac_cs_usage"; exit 0 ;;
29049   --debug | --d* | -d )
29050     debug=: ;;
29051   --file | --fil | --fi | --f )
29052     shift
29053     CONFIG_FILES="$CONFIG_FILES $1"
29054     ac_need_defaults=false;;
29055   --header | --heade | --head | --hea )
29056     shift
29057     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29058     ac_need_defaults=false;;
29059
29060   # This is an error.
29061   -*) { { echo "$as_me:29061: error: unrecognized option: $1
29062 Try \`$0 --help' for more information." >&5
29063 echo "$as_me: error: unrecognized option: $1
29064 Try \`$0 --help' for more information." >&2;}
29065    { (exit 1); exit 1; }; } ;;
29066
29067   *) ac_config_targets="$ac_config_targets $1" ;;
29068
29069   esac
29070   shift
29071 done
29072
29073 exec 5>>config.log
29074 cat >&5 << _ACEOF
29075
29076 ## ----------------------- ##
29077 ## Running config.status.  ##
29078 ## ----------------------- ##
29079
29080 This file was extended by $as_me 2.52.20210509, executed with
29081   CONFIG_FILES    = $CONFIG_FILES
29082   CONFIG_HEADERS  = $CONFIG_HEADERS
29083   CONFIG_LINKS    = $CONFIG_LINKS
29084   CONFIG_COMMANDS = $CONFIG_COMMANDS
29085   > "$ac_cs_invocation"
29086 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29087
29088 _ACEOF
29089 EOF
29090
29091 cat >>"$CONFIG_STATUS" <<EOF
29092 #
29093 # INIT-COMMANDS section.
29094 #
29095
29096 ### Special initialization commands, used to pass information from the
29097 ### configuration-run into config.status
29098
29099 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29100 AWK="$AWK"
29101 CXX_NAME="$CXX_NAME"
29102 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29103 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29104 ECHO_LD="$ECHO_LD"
29105 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29106 FORM_NAME="$FORM_NAME"
29107 LDCONFIG="$LDCONFIG"
29108 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29109 LIB_NAME="$LIB_NAME"
29110 LIB_PREFIX="$LIB_PREFIX"
29111 LIB_SUBSETS="$LIB_SUBSETS"
29112 LIB_SUFFIX="$LIB_SUFFIX"
29113 LIB_TRACING="$LIB_TRACING"
29114 LN_S="$LN_S"
29115 MAKE_TERMINFO="$MAKE_TERMINFO"
29116 MENU_NAME="$MENU_NAME"
29117 NCURSES_MAJOR="$NCURSES_MAJOR"
29118 NCURSES_MINOR="$NCURSES_MINOR"
29119 NCURSES_OSPEED="$NCURSES_OSPEED"
29120 NCURSES_PATCH="$NCURSES_PATCH"
29121 PANEL_NAME="$PANEL_NAME"
29122 SRC_SUBDIRS="$SRC_SUBDIRS"
29123 TERMINFO="$TERMINFO"
29124 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29125 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29126 TICS_NAME="$TICS_NAME"
29127 TICS_SUFFIX="$TICS_SUFFIX"
29128 TIC_PATH="$TIC_PATH"
29129 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29130 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29131 TINFO_NAME="$TINFO_NAME"
29132 TINFO_SUFFIX="$TINFO_SUFFIX"
29133 UNALTERED_SYMS="$UNALTERED_SYMS"
29134 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29135 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29136 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29137 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29138 WILDCARD_SYMS="$WILDCARD_SYMS"
29139 WITH_CURSES_H="$with_curses_h"
29140 WITH_ECHO="${enable_echo:=yes}"
29141 WITH_OVERWRITE="$with_overwrite"
29142 cf_LIST_MODELS="$cf_list_models"
29143 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29144 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29145 cf_cv_abi_version="$cf_cv_abi_version"
29146 cf_cv_do_relink="$cf_cv_do_relink"
29147 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29148 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29149 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29150 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29151 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29152 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29153 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29154 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29155 cf_cv_rel_version="$cf_cv_rel_version"
29156 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29157 cf_cv_shared_soname='$cf_cv_shared_soname'
29158 cf_cv_shlib_version="$cf_cv_shlib_version"
29159 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29160 cf_cv_system_name="$cf_cv_system_name"
29161 cf_cv_term_driver="$with_term_driver"
29162 cf_with_ada="$cf_with_ada"
29163 cf_with_cxx_binding="$cf_with_cxx_binding"
29164 cf_with_db_install="$cf_with_db_install"
29165 cf_with_manpages="$cf_with_manpages"
29166 cf_with_tests="$cf_with_tests"
29167 host="$host"
29168 target="$target"
29169 with_shared_cxx="$with_shared_cxx"
29170
29171 EOF
29172
29173 cat >>"$CONFIG_STATUS" <<\EOF
29174 for ac_config_target in $ac_config_targets
29175 do
29176   case "$ac_config_target" in
29177   # Handling of arguments.
29178   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29179   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29180   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29181   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29182   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29183   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29184   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29185   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29186   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29187   *) { { echo "$as_me:29187: error: invalid argument: $ac_config_target" >&5
29188 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29189    { (exit 1); exit 1; }; };;
29190   esac
29191 done
29192
29193 # If the user did not use the arguments to specify the items to instantiate,
29194 # then the envvar interface is used.  Set only those that are not.
29195 # We use the long form for the default assignment because of an extremely
29196 # bizarre bug on SunOS 4.1.3.
29197 if "$ac_need_defaults"; then
29198   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29199   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29200   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29201 fi
29202
29203 # Create a temporary directory, and hook for its removal unless debugging.
29204 $debug ||
29205 {
29206   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29207   trap '{ (exit 1); exit 1; }' 1 2 13 15
29208 }
29209
29210 # Create a (secure) tmp directory for tmp files.
29211 : ${TMPDIR=/tmp}
29212 {
29213   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29214   test -n "$tmp" && test -d "$tmp"
29215 }  ||
29216 {
29217   tmp=$TMPDIR/cs$$-$RANDOM
29218   (umask 077 && mkdir $tmp)
29219 } ||
29220 {
29221    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29222    { (exit 1); exit 1; }
29223 }
29224
29225 EOF
29226
29227 cat >>"$CONFIG_STATUS" <<EOF
29228
29229 #
29230 # CONFIG_FILES section.
29231 #
29232
29233 # No need to generate the scripts if there are no CONFIG_FILES.
29234 # This happens for instance when ./config.status config.h
29235 if test -n "\$CONFIG_FILES"; then
29236   # Protect against being on the right side of a sed subst in config.status.
29237   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29238    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
29239 s,@SHELL@,$SHELL,;t t
29240 s,@exec_prefix@,$exec_prefix,;t t
29241 s,@prefix@,$prefix,;t t
29242 s,@program_transform_name@,$program_transform_name,;t t
29243 s,@bindir@,$bindir,;t t
29244 s,@sbindir@,$sbindir,;t t
29245 s,@libexecdir@,$libexecdir,;t t
29246 s,@datarootdir@,$datarootdir,;t t
29247 s,@datadir@,$datadir,;t t
29248 s,@sysconfdir@,$sysconfdir,;t t
29249 s,@sharedstatedir@,$sharedstatedir,;t t
29250 s,@localstatedir@,$localstatedir,;t t
29251 s,@runstatedir@,$runstatedir,;t t
29252 s,@libdir@,$libdir,;t t
29253 s,@includedir@,$includedir,;t t
29254 s,@oldincludedir@,$oldincludedir,;t t
29255 s,@infodir@,$infodir,;t t
29256 s,@mandir@,$mandir,;t t
29257 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29258 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29259 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29260 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29261 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29262 s,@build_alias@,$build_alias,;t t
29263 s,@host_alias@,$host_alias,;t t
29264 s,@target_alias@,$target_alias,;t t
29265 s,@ECHO_C@,$ECHO_C,;t t
29266 s,@ECHO_N@,$ECHO_N,;t t
29267 s,@ECHO_T@,$ECHO_T,;t t
29268 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29269 s,@DEFS@,$DEFS,;t t
29270 s,@LIBS@,$LIBS,;t t
29271 s,@top_builddir@,$top_builddir,;t t
29272 s,@GREP@,$GREP,;t t
29273 s,@EGREP@,$EGREP,;t t
29274 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29275 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29276 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29277 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29278 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29279 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29280 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29281 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29282 s,@VERSION@,$VERSION,;t t
29283 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29284 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29285 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29286 s,@PACKAGE@,$PACKAGE,;t t
29287 s,@build@,$build,;t t
29288 s,@build_cpu@,$build_cpu,;t t
29289 s,@build_vendor@,$build_vendor,;t t
29290 s,@build_os@,$build_os,;t t
29291 s,@host@,$host,;t t
29292 s,@host_cpu@,$host_cpu,;t t
29293 s,@host_vendor@,$host_vendor,;t t
29294 s,@host_os@,$host_os,;t t
29295 s,@target@,$target,;t t
29296 s,@target_cpu@,$target_cpu,;t t
29297 s,@target_vendor@,$target_vendor,;t t
29298 s,@target_os@,$target_os,;t t
29299 s,@FGREP@,$FGREP,;t t
29300 s,@CC@,$CC,;t t
29301 s,@CFLAGS@,$CFLAGS,;t t
29302 s,@LDFLAGS@,$LDFLAGS,;t t
29303 s,@CPPFLAGS@,$CPPFLAGS,;t t
29304 s,@ac_ct_CC@,$ac_ct_CC,;t t
29305 s,@EXEEXT@,$EXEEXT,;t t
29306 s,@OBJEXT@,$OBJEXT,;t t
29307 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29308 s,@CPP@,$CPP,;t t
29309 s,@LDCONFIG@,$LDCONFIG,;t t
29310 s,@CXX@,$CXX,;t t
29311 s,@CXXFLAGS@,$CXXFLAGS,;t t
29312 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29313 s,@AWK@,$AWK,;t t
29314 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29315 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29316 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29317 s,@LINT@,$LINT,;t t
29318 s,@LINT_OPTS@,$LINT_OPTS,;t t
29319 s,@LN_S@,$LN_S,;t t
29320 s,@cf_config_suffix@,$cf_config_suffix,;t t
29321 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29322 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29323 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29324 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29325 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29326 s,@SET_MAKE@,$SET_MAKE,;t t
29327 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29328 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29329 s,@CTAGS@,$CTAGS,;t t
29330 s,@ETAGS@,$ETAGS,;t t
29331 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29332 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29333 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29334 s,@RANLIB@,$RANLIB,;t t
29335 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29336 s,@LD@,$LD,;t t
29337 s,@ac_ct_LD@,$ac_ct_LD,;t t
29338 s,@AR@,$AR,;t t
29339 s,@ac_ct_AR@,$ac_ct_AR,;t t
29340 s,@NM@,$NM,;t t
29341 s,@ac_ct_NM@,$ac_ct_NM,;t t
29342 s,@ARFLAGS@,$ARFLAGS,;t t
29343 s,@DESTDIR@,$DESTDIR,;t t
29344 s,@BUILD_CC@,$BUILD_CC,;t t
29345 s,@BUILD_CPP@,$BUILD_CPP,;t t
29346 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29347 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29348 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29349 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29350 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29351 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29352 s,@cf_list_models@,$cf_list_models,;t t
29353 s,@ABI_VERSION@,$ABI_VERSION,;t t
29354 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29355 s,@LIBTOOL@,$LIBTOOL,;t t
29356 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29357 s,@LT_UNDEF@,$LT_UNDEF,;t t
29358 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29359 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29360 s,@LIB_CREATE@,$LIB_CREATE,;t t
29361 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29362 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29363 s,@LIB_PREP@,$LIB_PREP,;t t
29364 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29365 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29366 s,@LIB_LINK@,$LIB_LINK,;t t
29367 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29368 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29369 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29370 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29371 s,@TICS_NAME@,$TICS_NAME,;t t
29372 s,@TINFO_NAME@,$TINFO_NAME,;t t
29373 s,@LIB_NAME@,$LIB_NAME,;t t
29374 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29375 s,@CC_G_OPT@,$CC_G_OPT,;t t
29376 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29377 s,@LD_MODEL@,$LD_MODEL,;t t
29378 s,@shlibdir@,$shlibdir,;t t
29379 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29380 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29381 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29382 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29383 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29384 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29385 s,@LINK_PROGS@,$LINK_PROGS,;t t
29386 s,@LINK_TESTS@,$LINK_TESTS,;t t
29387 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29388 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29389 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29390 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29391 s,@RPATH_LIST@,$RPATH_LIST,;t t
29392 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29393 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29394 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29395 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29396 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29397 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29398 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29399 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29400 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29401 s,@TIC@,$TIC,;t t
29402 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29403 s,@INFOCMP@,$INFOCMP,;t t
29404 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29405 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29406 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29407 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29408 s,@XTERM_KBS@,$XTERM_KBS,;t t
29409 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29410 s,@TERMINFO@,$TERMINFO,;t t
29411 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29412 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29413 s,@TERMPATH@,$TERMPATH,;t t
29414 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29415 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29416 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29417 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29418 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29419 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29420 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29421 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29422 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29423 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29424 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29425 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29426 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29427 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29428 s,@RGB_PATH@,$RGB_PATH,;t t
29429 s,@no_x11_rgb@,$no_x11_rgb,;t t
29430 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29431 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29432 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29433 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29434 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29435 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29436 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29437 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29438 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29439 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29440 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29441 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29442 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29443 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29444 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29445 s,@PTHREAD@,$PTHREAD,;t t
29446 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29447 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29448 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29449 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29450 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29451 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29452 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29453 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29454 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29455 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29456 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29457 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29458 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29459 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29460 s,@ECHO_LT@,$ECHO_LT,;t t
29461 s,@ECHO_LD@,$ECHO_LD,;t t
29462 s,@RULE_CC@,$RULE_CC,;t t
29463 s,@SHOW_CC@,$SHOW_CC,;t t
29464 s,@ECHO_CC@,$ECHO_CC,;t t
29465 s,@ECHO_LINK@,$ECHO_LINK,;t t
29466 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29467 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29468 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29469 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29470 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29471 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29472 s,@ADAFLAGS@,$ADAFLAGS,;t t
29473 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29474 s,@ADA_TRACE@,$ADA_TRACE,;t t
29475 s,@MATH_LIB@,$MATH_LIB,;t t
29476 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29477 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29478 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29479 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29480 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29481 s,@TEST_LIBS@,$TEST_LIBS,;t t
29482 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29483 s,@CXXCPP@,$CXXCPP,;t t
29484 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29485 s,@CXX_AR@,$CXX_AR,;t t
29486 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29487 s,@CXXLIBS@,$CXXLIBS,;t t
29488 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29489 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29490 s,@M4_exists@,$M4_exists,;t t
29491 s,@cf_ada_make@,$cf_ada_make,;t t
29492 s,@cf_ada_config@,$cf_ada_config,;t t
29493 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29494 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29495 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29496 s,@cf_compile_generics@,$cf_compile_generics,;t t
29497 s,@cf_generic_objects@,$cf_generic_objects,;t t
29498 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29499 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29500 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29501 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29502 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29503 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29504 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29505 s,@cf_ada_package@,$cf_ada_package,;t t
29506 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29507 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29508 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29509 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29510 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29511 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29512 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29513 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29514 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29515 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29516 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29517 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29518 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29519 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29520 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29521 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29522 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29523 s,@TICS_LIBS@,$TICS_LIBS,;t t
29524 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29525 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29526 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29527 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29528 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29529 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29530 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29531 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29532 s,@includesubdir@,$includesubdir,;t t
29533 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29534 s,@TICS_LIST@,$TICS_LIST,;t t
29535 s,@TINFO_LIST@,$TINFO_LIST,;t t
29536 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29537 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29538 s,@FORM_NAME@,$FORM_NAME,;t t
29539 s,@MENU_NAME@,$MENU_NAME,;t t
29540 s,@PANEL_NAME@,$PANEL_NAME,;t t
29541 s,@CXX_NAME@,$CXX_NAME,;t t
29542 s,@TEST_ARGS@,$TEST_ARGS,;t t
29543 s,@TEST_DEPS@,$TEST_DEPS,;t t
29544 s,@TEST_ARG2@,$TEST_ARG2,;t t
29545 s,@TEST_DEP2@,$TEST_DEP2,;t t
29546 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29547 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29548 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29549 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29550 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29551 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29552 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29553 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29554 s,@cross_compiling@,$cross_compiling,;t t
29555 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29556 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29557 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29558 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29559 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29560 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29561 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29562 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29563 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29564 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29565 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29566 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29567 CEOF
29568
29569 EOF
29570
29571   cat >>"$CONFIG_STATUS" <<\EOF
29572   # Split the substitutions into bite-sized pieces for seds with
29573   # small command number limits, like on Digital OSF/1 and HP-UX.
29574   ac_max_sed_lines=48
29575   ac_sed_frag=1 # Number of current file.
29576   ac_beg=1 # First line for current file.
29577   ac_end=$ac_max_sed_lines # Line after last line for current file.
29578   ac_more_lines=:
29579   ac_sed_cmds=
29580   while "$ac_more_lines"; do
29581     if test "$ac_beg" -gt 1; then
29582       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29583     else
29584       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29585     fi
29586     if test ! -s $tmp/subs.frag; then
29587       ac_more_lines=false
29588     else
29589       # The purpose of the label and of the branching condition is to
29590       # speed up the sed processing (if there are no `@' at all, there
29591       # is no need to browse any of the substitutions).
29592       # These are the two extra sed commands mentioned above.
29593       (echo ':t
29594   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29595       # It is possible to make a multiline substitution using escaped newlines.
29596       # Ensure that we do not split the substitution between script fragments.
29597       ac_BEG=$ac_end
29598       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29599       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29600       if test -s $tmp/subs.next; then
29601         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29602         if test ! -s $tmp/subs.edit; then
29603           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29604           if test ! -s $tmp/subs.edit; then
29605             if test "$ac_beg" -gt 1; then
29606               ac_end=`expr "$ac_end" - 1`
29607               continue
29608             fi
29609           fi
29610         fi
29611       fi
29612
29613       if test -z "$ac_sed_cmds"; then
29614         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29615       else
29616         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29617       fi
29618       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29619       ac_beg=$ac_end
29620       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29621     fi
29622   done
29623   if test -z "$ac_sed_cmds"; then
29624     ac_sed_cmds=cat
29625   fi
29626 fi # test -n "$CONFIG_FILES"
29627
29628 EOF
29629 cat >>"$CONFIG_STATUS" <<\EOF
29630 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29631   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29632   case "$ac_file" in
29633   - | *:- | *:-:* ) # input from stdin
29634         cat >$tmp/stdin
29635         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29636         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29637   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29638         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29639   * )   ac_file_in=$ac_file.in ;;
29640   esac
29641
29642   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29643   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29644          X"$ac_file" : 'X\(//\)[^/]' \| \
29645          X"$ac_file" : 'X\(//\)$' \| \
29646          X"$ac_file" : 'X\(/\)' \| \
29647          .     : '\(.\)' 2>/dev/null ||
29648 echo X"$ac_file" |
29649     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29650           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29651           /^X\(\/\/\)$/{ s//\1/; q; }
29652           /^X\(\/\).*/{ s//\1/; q; }
29653           s/.*/./; q'`
29654   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29655     { case "$ac_dir" in
29656   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29657   *)                      as_incr_dir=.;;
29658 esac
29659 as_dummy="$ac_dir"
29660 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29661   case $as_mkdir_dir in
29662     # Skip DOS drivespec
29663     ?:) as_incr_dir=$as_mkdir_dir ;;
29664     *)
29665       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29666       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29667     ;;
29668   esac
29669 done; }
29670
29671     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29672     # A "../" for each directory in $ac_dir_suffix.
29673     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29674   else
29675     ac_dir_suffix= ac_dots=
29676   fi
29677
29678   case "$srcdir" in
29679   .)  ac_srcdir=.
29680       if test -z "$ac_dots"; then
29681          ac_top_srcdir=.
29682       else
29683          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29684       fi ;;
29685   [\\/]* | ?:[\\/]* )
29686       ac_srcdir="$srcdir$ac_dir_suffix";
29687       ac_top_srcdir="$srcdir" ;;
29688   *) # Relative path.
29689     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29690     ac_top_srcdir="$ac_dots$srcdir" ;;
29691   esac
29692
29693   case $INSTALL in
29694   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29695   *) ac_INSTALL=$ac_dots$INSTALL ;;
29696   esac
29697
29698   if test x"$ac_file" != x-; then
29699     { echo "$as_me:29699: creating $ac_file" >&5
29700 echo "$as_me: creating $ac_file" >&6;}
29701     rm -f "$ac_file"
29702   fi
29703   # Let's still pretend it is `configure' which instantiates (i.e., don't
29704   # use $as_me), people would be surprised to read:
29705   #    /* config.h.  Generated automatically by config.status.  */
29706   configure_input="Generated automatically from `echo $ac_file_in |
29707                                                  sed 's,.*/,,'` by configure."
29708
29709   # First look for the input files in the build tree, otherwise in the
29710   # src tree.
29711   ac_file_inputs=`IFS=:
29712     for f in $ac_file_in; do
29713       case $f in
29714       -) echo $tmp/stdin ;;
29715       [\\/$]*)
29716          # Absolute (can't be DOS-style, as IFS=:)
29717          test -f "$f" || { { echo "$as_me:29717: error: cannot find input file: $f" >&5
29718 echo "$as_me: error: cannot find input file: $f" >&2;}
29719    { (exit 1); exit 1; }; }
29720          echo $f;;
29721       *) # Relative
29722          if test -f "$f"; then
29723            # Build tree
29724            echo $f
29725          elif test -f "$srcdir/$f"; then
29726            # Source tree
29727            echo "$srcdir/$f"
29728          else
29729            # /dev/null tree
29730            { { echo "$as_me:29730: error: cannot find input file: $f" >&5
29731 echo "$as_me: error: cannot find input file: $f" >&2;}
29732    { (exit 1); exit 1; }; }
29733          fi;;
29734       esac
29735     done` || { (exit 1); exit 1; }
29736 EOF
29737 cat >>"$CONFIG_STATUS" <<\EOF
29738   ac_warn_datarootdir=no
29739   if test x"$ac_file" != x-; then
29740     for ac_item in $ac_file_inputs
29741     do
29742       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29743       if test -n "$ac_seen"; then
29744         ac_used=`grep '@datarootdir@' "$ac_item"`
29745         if test -z "$ac_used"; then
29746           { echo "$as_me:29746: WARNING: datarootdir was used implicitly but not set:
29747 $ac_seen" >&5
29748 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29749 $ac_seen" >&2;}
29750           ac_warn_datarootdir=yes
29751         fi
29752       fi
29753       ac_seen=`grep '${datarootdir}' "$ac_item"`
29754       if test -n "$ac_seen"; then
29755         { echo "$as_me:29755: WARNING: datarootdir was used explicitly but not set:
29756 $ac_seen" >&5
29757 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29758 $ac_seen" >&2;}
29759         ac_warn_datarootdir=yes
29760       fi
29761     done
29762   fi
29763
29764 if test "x$ac_warn_datarootdir" = xyes; then
29765   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29766 fi
29767
29768 EOF
29769 cat >>"$CONFIG_STATUS" <<EOF
29770   sed "$ac_vpsub
29771 $extrasub
29772 EOF
29773 cat >>"$CONFIG_STATUS" <<\EOF
29774 :t
29775 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29776 s,@configure_input@,$configure_input,;t t
29777 s,@srcdir@,$ac_srcdir,;t t
29778 s,@top_srcdir@,$ac_top_srcdir,;t t
29779 s,@INSTALL@,$ac_INSTALL,;t t
29780 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29781   rm -f $tmp/stdin
29782   if test x"$ac_file" != x-; then
29783     cp "$tmp/out" "$ac_file"
29784
29785     for ac_name in prefix exec_prefix datarootdir
29786     do
29787         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29788         if test -n "$ac_seen"; then
29789             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29790             if test -z "$ac_init"; then
29791               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29792               { echo "$as_me:29792: WARNING: Variable $ac_name is used but was not set:
29793 $ac_seen" >&5
29794 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29795 $ac_seen" >&2;}
29796             fi
29797         fi
29798     done
29799     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29800     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29801     if test -s $tmp/out; then
29802       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29803       { echo "$as_me:29803: WARNING: Some variables may not be substituted:
29804 $ac_seen" >&5
29805 echo "$as_me: WARNING: Some variables may not be substituted:
29806 $ac_seen" >&2;}
29807     fi
29808   else
29809     cat $tmp/out
29810   fi
29811   rm -f $tmp/out
29812
29813 done
29814 EOF
29815 cat >>"$CONFIG_STATUS" <<\EOF
29816
29817 #
29818 # CONFIG_HEADER section.
29819 #
29820
29821 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29822 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29823 #
29824 # ac_d sets the value in "#define NAME VALUE" lines.
29825 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29826 ac_dB='[        ].*$,\1#\2'
29827 ac_dC=' '
29828 ac_dD=',;t'
29829 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29830 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29831 ac_iB='\([      ]\),\1#\2define\3'
29832 ac_iC=' '
29833 ac_iD='\4,;t'
29834 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29835 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29836 ac_uB='$,\1#\2define\3'
29837 ac_uC=' '
29838 ac_uD=',;t'
29839
29840 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29841   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29842   case "$ac_file" in
29843   - | *:- | *:-:* ) # input from stdin
29844         cat >$tmp/stdin
29845         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29846         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29847   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29848         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29849   * )   ac_file_in=$ac_file.in ;;
29850   esac
29851
29852   test x"$ac_file" != x- && { echo "$as_me:29852: creating $ac_file" >&5
29853 echo "$as_me: creating $ac_file" >&6;}
29854
29855   # First look for the input files in the build tree, otherwise in the
29856   # src tree.
29857   ac_file_inputs=`IFS=:
29858     for f in $ac_file_in; do
29859       case $f in
29860       -) echo $tmp/stdin ;;
29861       [\\/$]*)
29862          # Absolute (can't be DOS-style, as IFS=:)
29863          test -f "$f" || { { echo "$as_me:29863: error: cannot find input file: $f" >&5
29864 echo "$as_me: error: cannot find input file: $f" >&2;}
29865    { (exit 1); exit 1; }; }
29866          echo $f;;
29867       *) # Relative
29868          if test -f "$f"; then
29869            # Build tree
29870            echo $f
29871          elif test -f "$srcdir/$f"; then
29872            # Source tree
29873            echo "$srcdir/$f"
29874          else
29875            # /dev/null tree
29876            { { echo "$as_me:29876: error: cannot find input file: $f" >&5
29877 echo "$as_me: error: cannot find input file: $f" >&2;}
29878    { (exit 1); exit 1; }; }
29879          fi;;
29880       esac
29881     done` || { (exit 1); exit 1; }
29882   # Remove the trailing spaces.
29883   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29884
29885 EOF
29886
29887 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29888 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29889 # be either 'cat' or 'sort'.
29890 cat confdefs.h | uniq >conftest.vals
29891
29892 # Break up conftest.vals because some shells have a limit on
29893 # the size of here documents, and old seds have small limits too.
29894
29895 rm -f conftest.tail
29896 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
29897 while grep . conftest.vals >/dev/null
29898 do
29899   # Write chunks of a limited-size here document to conftest.frag.
29900   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
29901   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
29902   echo 'CEOF' >> "$CONFIG_STATUS"
29903   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
29904   rm -f conftest.vals
29905   mv conftest.tail conftest.vals
29906 done
29907 rm -f conftest.vals
29908
29909 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29910 # marker @DEFS@.
29911 echo '  cat >> conftest.edit <<CEOF
29912 /@DEFS@/r conftest.frag
29913 /@DEFS@/d
29914 CEOF
29915 sed -f conftest.edit $tmp/in > $tmp/out
29916 rm -f $tmp/in
29917 mv $tmp/out $tmp/in
29918 rm -f conftest.edit conftest.frag
29919 ' >> "$CONFIG_STATUS"
29920
29921 cat >>"$CONFIG_STATUS" <<\EOF
29922   # Let's still pretend it is `configure' which instantiates (i.e., don't
29923   # use $as_me), people would be surprised to read:
29924   #    /* config.h.  Generated automatically by config.status.  */
29925   if test x"$ac_file" = x-; then
29926     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29927   else
29928     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29929   fi
29930   cat $tmp/in >>$tmp/config.h
29931   rm -f $tmp/in
29932   if test x"$ac_file" != x-; then
29933     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
29934       { echo "$as_me:29934: $ac_file is unchanged" >&5
29935 echo "$as_me: $ac_file is unchanged" >&6;}
29936     else
29937       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29938          X"$ac_file" : 'X\(//\)[^/]' \| \
29939          X"$ac_file" : 'X\(//\)$' \| \
29940          X"$ac_file" : 'X\(/\)' \| \
29941          .     : '\(.\)' 2>/dev/null ||
29942 echo X"$ac_file" |
29943     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29944           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29945           /^X\(\/\/\)$/{ s//\1/; q; }
29946           /^X\(\/\).*/{ s//\1/; q; }
29947           s/.*/./; q'`
29948       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29949         { case "$ac_dir" in
29950   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29951   *)                      as_incr_dir=.;;
29952 esac
29953 as_dummy="$ac_dir"
29954 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29955   case $as_mkdir_dir in
29956     # Skip DOS drivespec
29957     ?:) as_incr_dir=$as_mkdir_dir ;;
29958     *)
29959       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29960       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29961     ;;
29962   esac
29963 done; }
29964
29965       fi
29966       rm -f "$ac_file"
29967       mv "$tmp/config.h" "$ac_file"
29968     fi
29969   else
29970     cat $tmp/config.h
29971     rm -f $tmp/config.h
29972   fi
29973 done
29974 EOF
29975 cat >>"$CONFIG_STATUS" <<\EOF
29976 #
29977 # CONFIG_COMMANDS section.
29978 #
29979 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29980   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29981   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29982
29983   case "$ac_dest" in
29984     default )
29985 if test "x$cf_with_tests" != xno ; then
29986
29987 for cf_dir in test
29988 do
29989         if test ! -d "$srcdir/$cf_dir" ; then
29990                 continue
29991         elif test -f "$srcdir/$cf_dir/programs" ; then
29992                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
29993         fi
29994 done
29995
29996 fi
29997
29998 cf_prefix=$LIB_PREFIX
29999
30000 case "$cf_cv_shlib_version" in
30001 (cygdll|msysdll|mingw|msvcdll)
30002         TINFO_NAME=$TINFO_ARG_SUFFIX
30003         TINFO_SUFFIX=.dll
30004         ;;
30005 esac
30006
30007 if test -n "$TINFO_SUFFIX" ; then
30008         case "$TINFO_SUFFIX" in
30009         (tw*)
30010                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30011                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30012                 ;;
30013         (t*)
30014                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30015                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30016                 ;;
30017         (w*)
30018                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30019                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30020                 ;;
30021         esac
30022 fi
30023
30024 for cf_dir in $SRC_SUBDIRS
30025 do
30026         if test ! -d "$srcdir/$cf_dir" ; then
30027                 continue
30028         elif test -f "$srcdir/$cf_dir/modules" ; then
30029
30030                 SHARED_LIB=
30031                 Libs_To_Make=
30032                 cf_awk_program=
30033                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
30034                 then
30035                         cf_awk_program="$cf_awk_program\
30036 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
30037 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
30038 "
30039                 fi
30040
30041                 if test "x$WILDCARD_SYMS" = xno
30042                 then
30043                         cf_awk_program="$cf_awk_program\
30044 /[      ]_\\*;/ { skip=1; next; }\
30045 "
30046                 fi
30047
30048                 if test "x$cf_awk_program" != "x"
30049                 then
30050                         cat >>$cf_dir/Makefile <<CF_EOF
30051
30052 # Generated by CF_LIB_RULES
30053 resulting.map: $UNALTERED_SYMS
30054         $AWK 'BEGIN { skip = 1; last=""; } \
30055 $cf_awk_program \
30056 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30057  skip = 0; last = \$\$0; } \
30058 END { print last; }' < "$UNALTERED_SYMS" >\$@
30059
30060 distclean::
30061         rm -f resulting.map
30062 CF_EOF
30063                 fi
30064
30065                 for cf_item in $cf_LIST_MODELS
30066                 do
30067
30068         case X$cf_item in
30069         (Xlibtool)
30070                 cf_suffix='.la'
30071                 cf_depsuf=$cf_suffix
30072                 ;;
30073         (Xdebug)
30074                 case "$cf_cv_system_name" in
30075                 (*-msvc*)
30076                         cf_suffix='_g.lib'
30077                         ;;
30078                 (*)
30079                         cf_suffix='_g.a'
30080                         ;;
30081                 esac
30082                 cf_depsuf=$cf_suffix
30083                 ;;
30084         (Xprofile)
30085                 case "$cf_cv_system_name" in
30086                 (*-msvc*)
30087                         cf_suffix='_p.lib'
30088                         ;;
30089                 (*)
30090                         cf_suffix='_p.a'
30091                         ;;
30092                 esac
30093                 cf_depsuf=$cf_suffix
30094                 ;;
30095         (Xshared)
30096                 case "$cf_cv_system_name" in
30097                 (aix[5-7]*)
30098                         cf_suffix='.so'
30099                         cf_depsuf=$cf_suffix
30100                         ;;
30101                 (*-msvc*)
30102                         cf_suffix='.dll'
30103                         cf_depsuf='.dll.lib'
30104                         ;;
30105                 (cygwin*|msys*|mingw*)
30106                         cf_suffix='.dll'
30107                         cf_depsuf='.dll.a'
30108                         ;;
30109                 (darwin*)
30110                         cf_suffix='.dylib'
30111                         cf_depsuf=$cf_suffix
30112                         ;;
30113                 (hpux*)
30114                         case "$target" in
30115                         (ia64*)
30116                                 cf_suffix='.so'
30117                                 cf_depsuf=$cf_suffix
30118                                 ;;
30119                         (*)
30120                                 cf_suffix='.sl'
30121                                 cf_depsuf=$cf_suffix
30122                                 ;;
30123                         esac
30124                         ;;
30125                 (*)
30126                         cf_suffix='.so'
30127                         cf_depsuf=$cf_suffix
30128                         ;;
30129                 esac
30130                 ;;
30131         (*)
30132                 case "$target" in
30133                 (*-msvc*)
30134                         cf_suffix='.lib'
30135                         ;;
30136                 (*)
30137                         cf_suffix='.a'
30138                         ;;
30139                 esac
30140                 cf_depsuf=$cf_suffix
30141                 ;;
30142         esac
30143         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30144         then
30145                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30146                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30147         fi
30148
30149                         if test "$cf_dir" = "c++"
30150                         then
30151
30152 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30153
30154 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30155
30156                         else
30157
30158 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30159
30160 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30161
30162                         fi
30163                         test -z "$cf_libname" && cf_libname="$cf_dir"
30164                         if test "$cf_item" = shared ; then
30165                                 if test -n "${LIB_SUFFIX}"
30166                                 then
30167                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30168                                 else
30169                                         cf_shared_suffix="$cf_suffix"
30170                                 fi
30171                                 if test "$cf_cv_do_symlinks" = yes ; then
30172                                         cf_version_name=
30173
30174                                         case "$cf_cv_shlib_version" in
30175                                         (rel)
30176                                                 cf_version_name=REL_VERSION
30177                                                 ;;
30178                                         (abi)
30179                                                 cf_version_name=ABI_VERSION
30180                                                 ;;
30181                                         esac
30182
30183                                         if test -n "$cf_version_name"
30184                                         then
30185                                                 case "$cf_cv_system_name" in
30186                                                 (darwin*)
30187                                                         # "w", etc?
30188                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30189                                                         ;;
30190                                                 (*)
30191                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30192                                                         ;;
30193                                                 esac
30194                                         fi
30195                                         if test -n "${USE_LIB_SUFFIX}"
30196                                         then
30197                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30198                                         else
30199                                                 cf_shared_suffix="$cf_suffix"
30200                                         fi
30201                                 fi
30202                                 # cygwin needs import library, and has unique naming convention
30203                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30204                                 # use 'cyg' prefix for shared lib.
30205                                 case "$cf_cv_shlib_version" in
30206                                 (cygdll)
30207                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30208                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30209                                         ;;
30210                                 (msysdll)
30211                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30212                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30213                                         ;;
30214                                 (mingw)
30215                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30216                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30217                                         ;;
30218                                 (msvcdll)
30219                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30220                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30221                                         ;;
30222                                 (*)
30223                                         cf_add_lib=
30224                                         ;;
30225                                 esac
30226                                 if test -n "$cf_add_lib"
30227                                 then
30228                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30229                                         continue
30230                                 fi
30231                         fi
30232                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30233                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30234                 done
30235
30236                 if test "$cf_dir" = ncurses ; then
30237                         cf_subsets="$LIB_SUBSETS"
30238                         cf_r_parts="$cf_subsets"
30239                         cf_liblist="$Libs_To_Make"
30240
30241                         while test -n "$cf_r_parts"
30242                         do
30243                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30244                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30245                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30246                                         cf_add_lib=
30247                                         case "$cf_l_parts" in
30248                                         (*termlib*)
30249                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30250                                                 ;;
30251                                         (*ticlib*)
30252                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30253                                                 ;;
30254                                         (*)
30255                                                 break
30256                                                 ;;
30257                                         esac
30258                                         if test -n "$cf_add_lib"; then
30259                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30260                                         fi
30261                                 else
30262                                         break
30263                                 fi
30264                         done
30265                 else
30266                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30267                 fi
30268
30269                 if test "$cf_dir" = c++; then
30270                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30271                                 cf_list=
30272                                 for cf_item in $Libs_To_Make
30273                                 do
30274                                         case "$cf_item" in
30275                                         (*.a)
30276                                                 ;;
30277                                         (*)
30278                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30279                                                 ;;
30280                                         esac
30281                                         for cf_test in $cf_list
30282                                         do
30283                                                 if test "$cf_test" = "$cf_item"
30284                                                 then
30285                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30286                                                         cf_item=
30287                                                         break
30288                                                 fi
30289                                         done
30290                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30291                                 done
30292                                 Libs_To_Make="$cf_list"
30293                         fi
30294                 fi
30295
30296                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30297                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30298                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30299                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30300
30301                 $AWK -f "$srcdir/mk-0th.awk" \
30302                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30303                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30304
30305                 for cf_subset in $cf_subsets
30306                 do
30307                         cf_subdirs=
30308                         for cf_item in $cf_LIST_MODELS
30309                         do
30310
30311                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30312
30313 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30314
30315                         CXX_MODEL=$cf_ITEM
30316                         if test "$CXX_MODEL" = SHARED; then
30317                                 case "$cf_cv_shlib_version" in
30318                                 (cygdll|msysdll|mingw|msvcdll)
30319                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30320
30321 echo "${as_me:-configure}:30321: testing overriding CXX_MODEL to SHARED ..." 1>&5
30322
30323                                         with_shared_cxx=yes
30324                                         ;;
30325                                 (*)
30326                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30327                                         ;;
30328                                 esac
30329                         fi
30330
30331         case X$cf_item in
30332         (Xlibtool)
30333                 cf_suffix='.la'
30334                 cf_depsuf=$cf_suffix
30335                 ;;
30336         (Xdebug)
30337                 case "$cf_cv_system_name" in
30338                 (*-msvc*)
30339                         cf_suffix='_g.lib'
30340                         ;;
30341                 (*)
30342                         cf_suffix='_g.a'
30343                         ;;
30344                 esac
30345                 cf_depsuf=$cf_suffix
30346                 ;;
30347         (Xprofile)
30348                 case "$cf_cv_system_name" in
30349                 (*-msvc*)
30350                         cf_suffix='_p.lib'
30351                         ;;
30352                 (*)
30353                         cf_suffix='_p.a'
30354                         ;;
30355                 esac
30356                 cf_depsuf=$cf_suffix
30357                 ;;
30358         (Xshared)
30359                 case "$cf_cv_system_name" in
30360                 (aix[5-7]*)
30361                         cf_suffix='.so'
30362                         cf_depsuf=$cf_suffix
30363                         ;;
30364                 (*-msvc*)
30365                         cf_suffix='.dll'
30366                         cf_depsuf='.dll.lib'
30367                         ;;
30368                 (cygwin*|msys*|mingw*)
30369                         cf_suffix='.dll'
30370                         cf_depsuf='.dll.a'
30371                         ;;
30372                 (darwin*)
30373                         cf_suffix='.dylib'
30374                         cf_depsuf=$cf_suffix
30375                         ;;
30376                 (hpux*)
30377                         case "$target" in
30378                         (ia64*)
30379                                 cf_suffix='.so'
30380                                 cf_depsuf=$cf_suffix
30381                                 ;;
30382                         (*)
30383                                 cf_suffix='.sl'
30384                                 cf_depsuf=$cf_suffix
30385                                 ;;
30386                         esac
30387                         ;;
30388                 (*)
30389                         cf_suffix='.so'
30390                         cf_depsuf=$cf_suffix
30391                         ;;
30392                 esac
30393                 ;;
30394         (*)
30395                 case "$target" in
30396                 (*-msvc*)
30397                         cf_suffix='.lib'
30398                         ;;
30399                 (*)
30400                         cf_suffix='.a'
30401                         ;;
30402                 esac
30403                 cf_depsuf=$cf_suffix
30404                 ;;
30405         esac
30406         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30407         then
30408                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30409                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30410         fi
30411
30412         case $cf_item in
30413         (libtool) cf_subdir='obj_lo'  ;;
30414         (normal)  cf_subdir='objects' ;;
30415         (debug)   cf_subdir='obj_g' ;;
30416         (profile) cf_subdir='obj_p' ;;
30417         (shared)
30418                 case "$cf_cv_system_name" in
30419                 (cygwin|msys)
30420                         cf_subdir='objects' ;;
30421                 (*)
30422                         cf_subdir='obj_s' ;;
30423                 esac
30424         esac
30425
30426                         # Test for case where we build libtinfo with a different name.
30427                         cf_libname=$cf_dir
30428                         if test "$cf_dir" = ncurses ; then
30429                                 case "$cf_subset" in
30430                                 (*base*)
30431                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30432                                         ;;
30433                                 (*termlib*)
30434                                         cf_libname=$TINFO_LIB_SUFFIX
30435                                         ;;
30436                                 (ticlib*)
30437                                         cf_libname=$TICS_LIB_SUFFIX
30438                                         ;;
30439                                 esac
30440                         elif test "$cf_dir" = c++ ; then
30441
30442 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30443
30444 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30445
30446                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30447                         else
30448
30449 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30450
30451 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30452
30453                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30454                         fi
30455                         if test -n "${USE_ARG_SUFFIX}" ; then
30456                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30457                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30458                         fi
30459
30460                         # These dependencies really are for development, not
30461                         # builds, but they are useful in porting, too.
30462                         cf_depend="../include/ncurses_cfg.h"
30463                         if test "$srcdir" = "."; then
30464                                 cf_reldir="."
30465                         else
30466                                 cf_reldir="\${srcdir}"
30467                         fi
30468
30469                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30470                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30471                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30472                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30473                         fi
30474
30475                         cf_dir_suffix=
30476                         old_cf_suffix="$cf_suffix"
30477                         if test "$cf_cv_shlib_version_infix" = yes ; then
30478                         if test -n "$USE_LIB_SUFFIX" ; then
30479                                 case "$USE_LIB_SUFFIX" in
30480                                 (tw*)
30481                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30482                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30483                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30484                                         ;;
30485                                 (t*)
30486                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30487                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30488                                         cf_dir_suffix=t$EXTRA_SUFFIX
30489                                         ;;
30490                                 (w*)
30491                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30492                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30493                                         cf_dir_suffix=w$EXTRA_SUFFIX
30494                                         ;;
30495                                 (*)
30496                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30497                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30498                                         cf_dir_suffix=$EXTRA_SUFFIX
30499                                         ;;
30500                                 esac
30501                         fi
30502                         fi
30503
30504                         $AWK -f "$srcdir/mk-1st.awk" \
30505                                 name=${cf_libname}${cf_dir_suffix} \
30506                                 traces=$LIB_TRACING \
30507                                 MODEL=$cf_ITEM \
30508                                 CXX_MODEL=$CXX_MODEL \
30509                                 LIB_SUFFIX=$LIB_SUFFIX \
30510                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30511                                 make_phony="${cf_cv_make_PHONY:-no}" \
30512                                 model=$cf_subdir \
30513                                 prefix=$cf_prefix \
30514                                 suffix=$cf_suffix \
30515                                 subset=$cf_subset \
30516                                 driver=$cf_cv_term_driver \
30517                                 SymLink="$LN_S" \
30518                                 TermlibRoot=$TINFO_NAME \
30519                                 TermlibSuffix=$TINFO_SUFFIX \
30520                                 ShlibVer=$cf_cv_shlib_version \
30521                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30522                                 ReLink=${cf_cv_do_relink:-no} \
30523                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30524                                 DoLinks=$cf_cv_do_symlinks \
30525                                 rmSoLocs=$cf_cv_rm_so_locs \
30526                                 ldconfig="$LDCONFIG" \
30527                                 overwrite=$WITH_OVERWRITE \
30528                                 depend="$cf_depend" \
30529                                 host="$host" \
30530                                 libtool_version="$LIBTOOL_VERSION" \
30531                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30532
30533                         cf_suffix="$old_cf_suffix"
30534
30535                         for cf_subdir2 in $cf_subdirs lib
30536                         do
30537                                 test "$cf_subdir" = "$cf_subdir2" && break
30538                         done
30539                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30540                         $AWK -f "$srcdir/mk-2nd.awk" \
30541                                 name=$cf_dir \
30542                                 traces=$LIB_TRACING \
30543                                 MODEL=$cf_ITEM \
30544                                 model=$cf_subdir \
30545                                 subset=$cf_subset \
30546                                 srcdir=$srcdir \
30547                                 echo=$WITH_ECHO \
30548                                 crenames=$cf_cv_prog_CC_c_o \
30549                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30550                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30551                         cf_subdirs="$cf_subdirs $cf_subdir"
30552                         done
30553                 done
30554         fi
30555
30556         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30557 done
30558
30559 echo >> Makefile
30560 echo '# generated by CF_LIB_RULES' >> Makefile
30561
30562 if test "x$cf_cv_make_PHONY" = xyes ; then
30563         cat >> Makefile <<-CF_EOF
30564
30565         .PHONY :        libs
30566         .PHONY :        lintlib
30567         .PHONY :        install.includes
30568         .PHONY :        uninstall.includes
30569         .PHONY :        install.libs
30570         .PHONY :        uninstall.libs
30571 CF_EOF
30572 fi
30573
30574 for cf_dir in $SRC_SUBDIRS
30575 do
30576         if test ! -d "$srcdir/$cf_dir" ; then
30577                 continue
30578         fi
30579
30580         if test -f "$cf_dir/Makefile" ; then
30581                 case "$cf_dir" in
30582                 (Ada95)
30583                         echo 'libs \' >> Makefile
30584                         echo 'install.libs \' >> Makefile
30585                         echo 'uninstall.libs ::' >> Makefile
30586                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30587                         ;;
30588                 esac
30589         fi
30590
30591         if test -f "$srcdir/$cf_dir/modules" ; then
30592
30593                 if test "x$cf_cv_make_PHONY" = xyes ; then
30594                         cat >> Makefile <<-CF_EOF
30595
30596                         .PHONY :        install.$cf_dir
30597                         .PHONY :        uninstall.$cf_dir
30598 CF_EOF
30599                 fi
30600
30601                 echo >> Makefile
30602                 if test -f "$srcdir/$cf_dir/headers" ; then
30603 cat >> Makefile <<CF_EOF
30604 install.includes \\
30605 uninstall.includes \\
30606 CF_EOF
30607                 fi
30608
30609 cat >> Makefile <<CF_EOF
30610 lint \\
30611 libs \\
30612 lintlib \\
30613 install.libs \\
30614 uninstall.libs \\
30615 install.$cf_dir \\
30616 uninstall.$cf_dir ::
30617         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30618 CF_EOF
30619         elif test -f "$srcdir/$cf_dir/headers" ; then
30620 cat >> Makefile <<CF_EOF
30621
30622 libs \\
30623 install.libs \\
30624 uninstall.libs \\
30625 install.includes \\
30626 uninstall.includes ::
30627         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30628 CF_EOF
30629 fi
30630 done
30631
30632 if test "x$cf_cv_make_PHONY" = xyes ; then
30633         cat >> Makefile <<-CF_EOF
30634
30635         .PHONY :        install.data
30636         .PHONY :        uninstall.data
30637 CF_EOF
30638 fi
30639
30640 if test "x$cf_with_db_install" = xyes; then
30641 cat >> Makefile <<CF_EOF
30642
30643 install.libs uninstall.libs \\
30644 install.data uninstall.data ::
30645 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30646 CF_EOF
30647 else
30648 cat >> Makefile <<CF_EOF
30649
30650 install.libs uninstall.libs ::
30651         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30652 CF_EOF
30653 fi
30654
30655 if test "x$cf_with_manpages" = xyes; then
30656
30657 if test "x$cf_cv_make_PHONY" = xyes ; then
30658         cat >> Makefile <<-CF_EOF
30659
30660         .PHONY :        install.man
30661         .PHONY :        uninstall.man
30662 CF_EOF
30663 fi
30664
30665 cat >> Makefile <<CF_EOF
30666
30667 install.man \\
30668 uninstall.man ::
30669         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30670 CF_EOF
30671 fi
30672
30673 cat >> Makefile <<CF_EOF
30674
30675 distclean ::
30676         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30677         rm -f headers.sh headers.sed mk_shared_lib.sh
30678         rm -f edit_man.* man_alias.*
30679         rm -rf \${DIRS_TO_MAKE}
30680 CF_EOF
30681
30682 # Special case: tack's manpage lives in its own directory.
30683 if test "x$cf_with_manpages" = xyes; then
30684 if test "x$cf_with_tack" = "xyes"; then
30685 cat >> Makefile <<CF_EOF
30686
30687 install.man \\
30688 uninstall.man ::
30689         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30690 CF_EOF
30691 fi
30692 fi
30693
30694 rm -f headers.sed headers.sh
30695
30696 echo creating headers.sh
30697 cat >headers.sh <<CF_EOF
30698 #! $SHELL
30699 # This shell script is generated by the 'configure' script.  It is invoked in a
30700 # subdirectory of the build tree.  It generates a sed-script in the parent
30701 # directory that is used to adjust includes for header files that reside in a
30702 # subdirectory of /usr/include, etc.
30703 PRG=""
30704 while test \$# != 3
30705 do
30706 PRG="\$PRG \$1"; shift
30707 done
30708 DST=\$1
30709 REF=\$2
30710 SRC=\$3
30711 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30712 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30713 echo installing \$SRC in \$DST
30714 CF_EOF
30715
30716 if test "$WITH_CURSES_H" = yes; then
30717         cat >>headers.sh <<CF_EOF
30718 case \$DST in
30719 (/*/include/*)
30720         END=\`basename \$DST\`
30721         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30722         do
30723                 NAME=\`basename \$i\`
30724                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30725         done
30726         ;;
30727 (*)
30728         echo "" >> \$TMPSED
30729         ;;
30730 esac
30731 CF_EOF
30732
30733 else
30734         cat >>headers.sh <<CF_EOF
30735 case \$DST in
30736 (/*/include/*)
30737         END=\`basename \$DST\`
30738         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30739         do
30740                 NAME=\`basename \$i\`
30741                 if test "\$NAME" = "curses.h"
30742                 then
30743                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30744                         NAME=ncurses.h
30745                 fi
30746                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30747         done
30748         ;;
30749 (*)
30750         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30751         ;;
30752 esac
30753 CF_EOF
30754 fi
30755 cat >>headers.sh <<CF_EOF
30756 rm -f \$TMPSRC
30757 sed -f \$TMPSED \$SRC > \$TMPSRC
30758 NAME=\`basename \$SRC\`
30759 CF_EOF
30760 if test "$WITH_CURSES_H" != yes; then
30761         cat >>headers.sh <<CF_EOF
30762 test "\$NAME" = "curses.h" && NAME=ncurses.h
30763 CF_EOF
30764 fi
30765 cat >>headers.sh <<CF_EOF
30766 # Just in case someone gzip'd manpages, remove the conflicting copy.
30767 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30768
30769 eval \$PRG \$TMPSRC \$DST/\$NAME
30770 rm -f \$TMPSRC \$TMPSED
30771 CF_EOF
30772
30773 chmod 0755 headers.sh
30774
30775 for cf_dir in $SRC_SUBDIRS
30776 do
30777         if test ! -d "$srcdir/$cf_dir" ; then
30778                 continue
30779         fi
30780
30781         if test -f "$srcdir/$cf_dir/headers" ; then
30782                 $AWK -f "$srcdir/mk-hdr.awk" \
30783                         subset="$LIB_SUBSETS" \
30784                         compat="$WITH_CURSES_H" \
30785                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30786         fi
30787
30788         if test -f "$srcdir/$cf_dir/modules" ; then
30789                 if test "$cf_dir" != "c++" ; then
30790                         if test "x$cf_cv_make_PHONY" = xyes ; then
30791                                 cat >> $cf_dir/Makefile <<-CF_EOF
30792
30793                                 .PHONY :        depend
30794 CF_EOF
30795                         fi
30796
30797                         cat >>$cf_dir/Makefile <<"CF_EOF"
30798 depend : ${AUTO_SRC}
30799         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30800
30801 # DO NOT DELETE THIS LINE -- make depend depends on it.
30802 CF_EOF
30803                 fi
30804         fi
30805 done
30806
30807 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30808 if test -z "$USE_OLD_MAKERULES" ; then
30809         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30810 fi
30811 fi
30812  ;;
30813   esac
30814 done
30815 EOF
30816
30817 cat >>"$CONFIG_STATUS" <<\EOF
30818
30819 { (exit 0); exit 0; }
30820 EOF
30821 chmod +x "$CONFIG_STATUS"
30822 ac_clean_files=$ac_clean_files_save
30823
30824 # configure is writing to config.log, and then calls config.status.
30825 # config.status does its own redirection, appending to config.log.
30826 # Unfortunately, on DOS this fails, as config.log is still kept open
30827 # by configure, so config.status won't be able to write to it; its
30828 # output is simply discarded.  So we exec the FD to /dev/null,
30829 # effectively closing config.log, so it can be properly (re)opened and
30830 # appended to by config.status.  When coming back to configure, we
30831 # need to make the FD available again.
30832 if test "$no_create" != yes; then
30833   ac_cs_success=:
30834   exec 5>/dev/null
30835   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
30836   exec 5>>config.log
30837   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30838   # would make configure fail if this is the last instruction.
30839   "$ac_cs_success" || { (exit 1); exit 1; }
30840 fi
30841 ${MAKE:-make} preinstall