]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.3 - patch 20211021
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.736 .
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                 cf_path=$prefix
4166         else
4167                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
4168                 cf_search_path=`
4169                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | awk "\
4170 /^Scanning directory #[1-9][0-9]* '.*'$/{ \
4171         sub(\"^[^']*'\",\"\"); \
4172         sub(\"'.*\",\"\"); \
4173         printf \" %s\", \\$0; } \
4174 /trying path:/{
4175         sub(\"^.* trying path: \",\"\");
4176         sub(\" for no-such-package.*$\",\"\");
4177         printf \" %s\", \\$0;
4178 }
4179 { next; } \
4180 "`
4181         fi
4182
4183         if test -z "$cf_search_path"
4184         then
4185                 # If you don't like using the default architecture, you have to specify
4186                 # the intended library directory and corresponding compiler/linker
4187                 # options.
4188                 #
4189                 # This case allows for Debian's 2014-flavor of multiarch, along with
4190                 # the most common variations before that point.  Some other variants
4191                 # spell the directory differently, e.g., "pkg-config", and put it in
4192                 # unusual places.
4193                 #
4194                 # pkg-config has always been poorly standardized, which is ironic...
4195                 case x`(arch) 2>/dev/null` in
4196                 (*64)
4197                         cf_test_path="\
4198                                 $cf_path/lib/*64-linux-gnu \
4199                                 $cf_path/share \
4200                                 $cf_path/lib64 \
4201                                 $cf_path/lib32 \
4202                                 $cf_path/lib"
4203                         ;;
4204                 (*)
4205                         cf_test_path="\
4206                                 $cf_path/lib/*-linux-gnu \
4207                                 $cf_path/share \
4208                                 $cf_path/lib32 \
4209                                 $cf_path/lib \
4210                                 $cf_path/libdata"
4211                         ;;
4212                 esac
4213                 for cf_config in $cf_test_path
4214                 do
4215                         test -d "$cf_config/pkgconfig" && cf_search_path="$cf_search_path $cf_config/pkgconfig"
4216                 done
4217         fi
4218
4219         echo "$as_me:4219: result: $cf_search_path" >&5
4220 echo "${ECHO_T}$cf_search_path" >&6
4221
4222         ;;
4223 (*)
4224         ;;
4225 esac
4226
4227 echo "$as_me:4227: checking for first directory" >&5
4228 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4229 cf_pkg_config_path=none
4230 for cf_config in $cf_search_path
4231 do
4232         if test -d "$cf_config"
4233         then
4234                 cf_pkg_config_path=$cf_config
4235                 break
4236         fi
4237 done
4238 echo "$as_me:4238: result: $cf_pkg_config_path" >&5
4239 echo "${ECHO_T}$cf_pkg_config_path" >&6
4240
4241 if test "x$cf_pkg_config_path" != xnone ; then
4242         # limit this to the first directory found
4243         PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4244 fi
4245
4246 if test "x$PKG_CONFIG" != xnone
4247 then
4248         echo "$as_me:4248: checking if we should install .pc files for $PKG_CONFIG" >&5
4249 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4250 else
4251         echo "$as_me:4251: checking if we should install .pc files" >&5
4252 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4253 fi
4254
4255 # Check whether --enable-pc-files or --disable-pc-files was given.
4256 if test "${enable_pc_files+set}" = set; then
4257   enableval="$enable_pc_files"
4258   enable_pc_files=$enableval
4259 else
4260   enable_pc_files=no
4261 fi;
4262 echo "$as_me:4262: result: $enable_pc_files" >&5
4263 echo "${ECHO_T}$enable_pc_files" >&6
4264
4265 if test "x$enable_pc_files" != xno
4266 then
4267         MAKE_PC_FILES=
4268         case "x$PKG_CONFIG_LIBDIR" in
4269         (xno|xnone|xyes)
4270                 { echo "$as_me:4270: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4271 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4272                 ;;
4273         (*)
4274
4275 if test "x$prefix" != xNONE; then
4276         cf_path_syntax="$prefix"
4277 else
4278         cf_path_syntax="$ac_default_prefix"
4279 fi
4280
4281 case ".$PKG_CONFIG_LIBDIR" in
4282 (.\$\(*\)*|.\'*\'*)
4283         ;;
4284 (..|./*|.\\*)
4285         ;;
4286 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4287         ;;
4288 (.\$\{*prefix\}*|.\$\{*dir\}*)
4289         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4290         case ".$PKG_CONFIG_LIBDIR" in
4291         (.NONE/*)
4292                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4293                 ;;
4294         esac
4295         ;;
4296 (.no|.NONE/*)
4297         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4298         ;;
4299 (*)
4300         { { echo "$as_me:4300: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4301 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4302    { (exit 1); exit 1; }; }
4303         ;;
4304 esac
4305
4306                 ;;
4307         esac
4308 else
4309         MAKE_PC_FILES="#"
4310 fi
4311
4312 if test -z "$MAKE_PC_FILES"
4313 then
4314         echo "$as_me:4314: checking for suffix to add to pc-files" >&5
4315 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4316
4317 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4318 if test "${with_pc_suffix+set}" = set; then
4319   withval="$with_pc_suffix"
4320   case "x$withval" in
4321         (xyes|xno)
4322                 PC_MODULE_SUFFIX=
4323                 ;;
4324         (*)     PC_MODULE_SUFFIX="$withval"
4325                 ;;
4326         esac
4327 fi;
4328         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4329         echo "$as_me:4329: result: $PC_MODULE_SUFFIX" >&5
4330 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4331         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4332
4333 fi
4334
4335 echo "$as_me:4335: checking if we should assume mixed-case filenames" >&5
4336 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4337
4338 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4339 if test "${enable_mixed_case+set}" = set; then
4340   enableval="$enable_mixed_case"
4341   enable_mixedcase=$enableval
4342 else
4343   enable_mixedcase=auto
4344 fi;
4345 echo "$as_me:4345: result: $enable_mixedcase" >&5
4346 echo "${ECHO_T}$enable_mixedcase" >&6
4347 if test "$enable_mixedcase" = "auto" ; then
4348
4349 echo "$as_me:4349: checking if filesystem supports mixed-case filenames" >&5
4350 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4351 if test "${cf_cv_mixedcase+set}" = set; then
4352   echo $ECHO_N "(cached) $ECHO_C" >&6
4353 else
4354
4355 if test "$cross_compiling" = yes ; then
4356         case "$target_alias" in
4357         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4358                 cf_cv_mixedcase=no
4359                 ;;
4360         (*)
4361                 cf_cv_mixedcase=yes
4362                 ;;
4363         esac
4364 else
4365         rm -f conftest CONFTEST
4366         echo test >conftest
4367         if test -f CONFTEST ; then
4368                 cf_cv_mixedcase=no
4369         else
4370                 cf_cv_mixedcase=yes
4371         fi
4372         rm -f conftest CONFTEST
4373 fi
4374
4375 fi
4376 echo "$as_me:4376: result: $cf_cv_mixedcase" >&5
4377 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4378 test "$cf_cv_mixedcase" = yes &&
4379 cat >>confdefs.h <<\EOF
4380 #define MIXEDCASE_FILENAMES 1
4381 EOF
4382
4383 else
4384         cf_cv_mixedcase=$enable_mixedcase
4385         if test "x$enable_mixedcase" = "xyes" ; then
4386
4387 cat >>confdefs.h <<\EOF
4388 #define MIXEDCASE_FILENAMES 1
4389 EOF
4390
4391         fi
4392 fi
4393
4394 # do this after mixed-case option (tags/TAGS is not as important as tic).
4395 echo "$as_me:4395: checking whether ${MAKE-make} sets \${MAKE}" >&5
4396 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4397 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4398 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4399   echo $ECHO_N "(cached) $ECHO_C" >&6
4400 else
4401   cat >conftest.make <<\EOF
4402 all:
4403         @echo 'ac_maketemp="${MAKE}"'
4404 EOF
4405 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4406 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4407 if test -n "$ac_maketemp"; then
4408   eval ac_cv_prog_make_${ac_make}_set=yes
4409 else
4410   eval ac_cv_prog_make_${ac_make}_set=no
4411 fi
4412 rm -f conftest.make
4413 fi
4414 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4415   echo "$as_me:4415: result: yes" >&5
4416 echo "${ECHO_T}yes" >&6
4417   SET_MAKE=
4418 else
4419   echo "$as_me:4419: result: no" >&5
4420 echo "${ECHO_T}no" >&6
4421   SET_MAKE="MAKE=${MAKE-make}"
4422 fi
4423
4424 echo "$as_me:4424: checking for \".PHONY\" make-support" >&5
4425 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4426 if test "${cf_cv_make_PHONY+set}" = set; then
4427   echo $ECHO_N "(cached) $ECHO_C" >&6
4428 else
4429
4430         rm -rf conftest*
4431         (
4432                 mkdir conftest || exit 1
4433                 cd conftest
4434                 cat >makefile <<'CF_EOF'
4435 .PHONY: always
4436 DATA=0
4437 always: always.out
4438         @echo "** making $@ $(DATA)"
4439 once: once.out
4440         @echo "** making $@ $(DATA)"
4441 always.out:
4442         @echo "** making $@ $(DATA)"
4443         echo $(DATA) > $@
4444 once.out:
4445         @echo "** making $@ $(DATA)"
4446         echo $(DATA) > $@
4447 CF_EOF
4448                 for cf_data in 1 2 3
4449                 do
4450                         ${MAKE:-make} always DATA=$cf_data
4451                         ${MAKE:-make} once   DATA=$cf_data
4452                         ${MAKE:-make} -t always once
4453                         if test -f always ; then
4454                                 echo "no (case 1)" > ../conftest.tmp
4455                         elif test ! -f always.out ; then
4456                                 echo "no (case 2)" > ../conftest.tmp
4457                         elif test ! -f once.out ; then
4458                                 echo "no (case 3)" > ../conftest.tmp
4459                         elif ! cmp -s always.out once.out ; then
4460                                 echo "no (case 4)" > ../conftest.tmp
4461                                 diff always.out once.out
4462                         else
4463                                 cf_check="`cat always.out`"
4464                                 if test "x$cf_check" != "x$cf_data" ; then
4465                                         echo "no (case 5)" > ../conftest.tmp
4466                                 else
4467                                         echo yes > ../conftest.tmp
4468                                         rm -f ./*.out
4469                                         continue
4470                                 fi
4471                         fi
4472                         break
4473                 done
4474         ) >&5 2>&1
4475         cf_cv_make_PHONY="`cat conftest.tmp`"
4476         rm -rf conftest*
4477
4478 fi
4479 echo "$as_me:4479: result: $cf_cv_make_PHONY" >&5
4480 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4481 MAKE_NO_PHONY="#"
4482 MAKE_PHONY="#"
4483 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4484 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4485
4486 for ac_prog in exctags ctags
4487 do
4488   # Extract the first word of "$ac_prog", so it can be a program name with args.
4489 set dummy $ac_prog; ac_word=$2
4490 echo "$as_me:4490: checking for $ac_word" >&5
4491 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4492 if test "${ac_cv_prog_CTAGS+set}" = set; then
4493   echo $ECHO_N "(cached) $ECHO_C" >&6
4494 else
4495   if test -n "$CTAGS"; then
4496   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4497 else
4498   ac_save_IFS=$IFS; IFS=$ac_path_separator
4499 ac_dummy="$PATH"
4500 for ac_dir in $ac_dummy; do
4501   IFS=$ac_save_IFS
4502   test -z "$ac_dir" && ac_dir=.
4503   $as_executable_p "$ac_dir/$ac_word" || continue
4504 ac_cv_prog_CTAGS="$ac_prog"
4505 echo "$as_me:4505: found $ac_dir/$ac_word" >&5
4506 break
4507 done
4508
4509 fi
4510 fi
4511 CTAGS=$ac_cv_prog_CTAGS
4512 if test -n "$CTAGS"; then
4513   echo "$as_me:4513: result: $CTAGS" >&5
4514 echo "${ECHO_T}$CTAGS" >&6
4515 else
4516   echo "$as_me:4516: result: no" >&5
4517 echo "${ECHO_T}no" >&6
4518 fi
4519
4520   test -n "$CTAGS" && break
4521 done
4522
4523 for ac_prog in exetags etags
4524 do
4525   # Extract the first word of "$ac_prog", so it can be a program name with args.
4526 set dummy $ac_prog; ac_word=$2
4527 echo "$as_me:4527: checking for $ac_word" >&5
4528 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4529 if test "${ac_cv_prog_ETAGS+set}" = set; then
4530   echo $ECHO_N "(cached) $ECHO_C" >&6
4531 else
4532   if test -n "$ETAGS"; then
4533   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4534 else
4535   ac_save_IFS=$IFS; IFS=$ac_path_separator
4536 ac_dummy="$PATH"
4537 for ac_dir in $ac_dummy; do
4538   IFS=$ac_save_IFS
4539   test -z "$ac_dir" && ac_dir=.
4540   $as_executable_p "$ac_dir/$ac_word" || continue
4541 ac_cv_prog_ETAGS="$ac_prog"
4542 echo "$as_me:4542: found $ac_dir/$ac_word" >&5
4543 break
4544 done
4545
4546 fi
4547 fi
4548 ETAGS=$ac_cv_prog_ETAGS
4549 if test -n "$ETAGS"; then
4550   echo "$as_me:4550: result: $ETAGS" >&5
4551 echo "${ECHO_T}$ETAGS" >&6
4552 else
4553   echo "$as_me:4553: result: no" >&5
4554 echo "${ECHO_T}no" >&6
4555 fi
4556
4557   test -n "$ETAGS" && break
4558 done
4559
4560 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4561 set dummy ${CTAGS:-ctags}; ac_word=$2
4562 echo "$as_me:4562: checking for $ac_word" >&5
4563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4564 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4565   echo $ECHO_N "(cached) $ECHO_C" >&6
4566 else
4567   if test -n "$MAKE_LOWER_TAGS"; then
4568   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4569 else
4570   ac_save_IFS=$IFS; IFS=$ac_path_separator
4571 ac_dummy="$PATH"
4572 for ac_dir in $ac_dummy; do
4573   IFS=$ac_save_IFS
4574   test -z "$ac_dir" && ac_dir=.
4575   $as_executable_p "$ac_dir/$ac_word" || continue
4576 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4577 echo "$as_me:4577: found $ac_dir/$ac_word" >&5
4578 break
4579 done
4580
4581   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4582 fi
4583 fi
4584 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4585 if test -n "$MAKE_LOWER_TAGS"; then
4586   echo "$as_me:4586: result: $MAKE_LOWER_TAGS" >&5
4587 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4588 else
4589   echo "$as_me:4589: result: no" >&5
4590 echo "${ECHO_T}no" >&6
4591 fi
4592
4593 if test "$cf_cv_mixedcase" = yes ; then
4594         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4595 set dummy ${ETAGS:-etags}; ac_word=$2
4596 echo "$as_me:4596: checking for $ac_word" >&5
4597 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4598 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4599   echo $ECHO_N "(cached) $ECHO_C" >&6
4600 else
4601   if test -n "$MAKE_UPPER_TAGS"; then
4602   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4603 else
4604   ac_save_IFS=$IFS; IFS=$ac_path_separator
4605 ac_dummy="$PATH"
4606 for ac_dir in $ac_dummy; do
4607   IFS=$ac_save_IFS
4608   test -z "$ac_dir" && ac_dir=.
4609   $as_executable_p "$ac_dir/$ac_word" || continue
4610 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4611 echo "$as_me:4611: found $ac_dir/$ac_word" >&5
4612 break
4613 done
4614
4615   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4616 fi
4617 fi
4618 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4619 if test -n "$MAKE_UPPER_TAGS"; then
4620   echo "$as_me:4620: result: $MAKE_UPPER_TAGS" >&5
4621 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4622 else
4623   echo "$as_me:4623: result: no" >&5
4624 echo "${ECHO_T}no" >&6
4625 fi
4626
4627 else
4628         MAKE_UPPER_TAGS=no
4629 fi
4630
4631 if test "$MAKE_UPPER_TAGS" = yes ; then
4632         MAKE_UPPER_TAGS=
4633 else
4634         MAKE_UPPER_TAGS="#"
4635 fi
4636
4637 if test "$MAKE_LOWER_TAGS" = yes ; then
4638         MAKE_LOWER_TAGS=
4639 else
4640         MAKE_LOWER_TAGS="#"
4641 fi
4642
4643 echo "$as_me:4643: checking for makeflags variable" >&5
4644 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4645 if test "${cf_cv_makeflags+set}" = set; then
4646   echo $ECHO_N "(cached) $ECHO_C" >&6
4647 else
4648
4649         cf_cv_makeflags=''
4650         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4651         do
4652                 cat >cf_makeflags.tmp <<CF_EOF
4653 SHELL = $SHELL
4654 all :
4655         @ echo '.$cf_option'
4656 CF_EOF
4657                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4658                 case "$cf_result" in
4659                 (.*k|.*kw)
4660                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4661                         case "$cf_result" in
4662                         (.*CC=*)        cf_cv_makeflags=
4663                                 ;;
4664                         (*)     cf_cv_makeflags=$cf_option
4665                                 ;;
4666                         esac
4667                         break
4668                         ;;
4669                 (.-)
4670                         ;;
4671                 (*)
4672
4673 echo "${as_me:-configure}:4673: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4674
4675                         ;;
4676                 esac
4677         done
4678         rm -f cf_makeflags.tmp
4679
4680 fi
4681 echo "$as_me:4681: result: $cf_cv_makeflags" >&5
4682 echo "${ECHO_T}$cf_cv_makeflags" >&6
4683
4684 if test -n "$ac_tool_prefix"; then
4685   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4686 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4687 echo "$as_me:4687: checking for $ac_word" >&5
4688 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4689 if test "${ac_cv_prog_RANLIB+set}" = set; then
4690   echo $ECHO_N "(cached) $ECHO_C" >&6
4691 else
4692   if test -n "$RANLIB"; then
4693   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4694 else
4695   ac_save_IFS=$IFS; IFS=$ac_path_separator
4696 ac_dummy="$PATH"
4697 for ac_dir in $ac_dummy; do
4698   IFS=$ac_save_IFS
4699   test -z "$ac_dir" && ac_dir=.
4700   $as_executable_p "$ac_dir/$ac_word" || continue
4701 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4702 echo "$as_me:4702: found $ac_dir/$ac_word" >&5
4703 break
4704 done
4705
4706 fi
4707 fi
4708 RANLIB=$ac_cv_prog_RANLIB
4709 if test -n "$RANLIB"; then
4710   echo "$as_me:4710: result: $RANLIB" >&5
4711 echo "${ECHO_T}$RANLIB" >&6
4712 else
4713   echo "$as_me:4713: result: no" >&5
4714 echo "${ECHO_T}no" >&6
4715 fi
4716
4717 fi
4718 if test -z "$ac_cv_prog_RANLIB"; then
4719   ac_ct_RANLIB=$RANLIB
4720   # Extract the first word of "ranlib", so it can be a program name with args.
4721 set dummy ranlib; ac_word=$2
4722 echo "$as_me:4722: checking for $ac_word" >&5
4723 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4724 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4725   echo $ECHO_N "(cached) $ECHO_C" >&6
4726 else
4727   if test -n "$ac_ct_RANLIB"; then
4728   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4729 else
4730   ac_save_IFS=$IFS; IFS=$ac_path_separator
4731 ac_dummy="$PATH"
4732 for ac_dir in $ac_dummy; do
4733   IFS=$ac_save_IFS
4734   test -z "$ac_dir" && ac_dir=.
4735   $as_executable_p "$ac_dir/$ac_word" || continue
4736 ac_cv_prog_ac_ct_RANLIB="ranlib"
4737 echo "$as_me:4737: found $ac_dir/$ac_word" >&5
4738 break
4739 done
4740
4741   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4742 fi
4743 fi
4744 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4745 if test -n "$ac_ct_RANLIB"; then
4746   echo "$as_me:4746: result: $ac_ct_RANLIB" >&5
4747 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4748 else
4749   echo "$as_me:4749: result: no" >&5
4750 echo "${ECHO_T}no" >&6
4751 fi
4752
4753   RANLIB=$ac_ct_RANLIB
4754 else
4755   RANLIB="$ac_cv_prog_RANLIB"
4756 fi
4757
4758 if test -n "$ac_tool_prefix"; then
4759   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4760 set dummy ${ac_tool_prefix}ld; ac_word=$2
4761 echo "$as_me:4761: checking for $ac_word" >&5
4762 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4763 if test "${ac_cv_prog_LD+set}" = set; then
4764   echo $ECHO_N "(cached) $ECHO_C" >&6
4765 else
4766   if test -n "$LD"; then
4767   ac_cv_prog_LD="$LD" # Let the user override the test.
4768 else
4769   ac_save_IFS=$IFS; IFS=$ac_path_separator
4770 ac_dummy="$PATH"
4771 for ac_dir in $ac_dummy; do
4772   IFS=$ac_save_IFS
4773   test -z "$ac_dir" && ac_dir=.
4774   $as_executable_p "$ac_dir/$ac_word" || continue
4775 ac_cv_prog_LD="${ac_tool_prefix}ld"
4776 echo "$as_me:4776: found $ac_dir/$ac_word" >&5
4777 break
4778 done
4779
4780 fi
4781 fi
4782 LD=$ac_cv_prog_LD
4783 if test -n "$LD"; then
4784   echo "$as_me:4784: result: $LD" >&5
4785 echo "${ECHO_T}$LD" >&6
4786 else
4787   echo "$as_me:4787: result: no" >&5
4788 echo "${ECHO_T}no" >&6
4789 fi
4790
4791 fi
4792 if test -z "$ac_cv_prog_LD"; then
4793   ac_ct_LD=$LD
4794   # Extract the first word of "ld", so it can be a program name with args.
4795 set dummy ld; ac_word=$2
4796 echo "$as_me:4796: checking for $ac_word" >&5
4797 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4798 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4799   echo $ECHO_N "(cached) $ECHO_C" >&6
4800 else
4801   if test -n "$ac_ct_LD"; then
4802   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4803 else
4804   ac_save_IFS=$IFS; IFS=$ac_path_separator
4805 ac_dummy="$PATH"
4806 for ac_dir in $ac_dummy; do
4807   IFS=$ac_save_IFS
4808   test -z "$ac_dir" && ac_dir=.
4809   $as_executable_p "$ac_dir/$ac_word" || continue
4810 ac_cv_prog_ac_ct_LD="ld"
4811 echo "$as_me:4811: found $ac_dir/$ac_word" >&5
4812 break
4813 done
4814
4815   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4816 fi
4817 fi
4818 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4819 if test -n "$ac_ct_LD"; then
4820   echo "$as_me:4820: result: $ac_ct_LD" >&5
4821 echo "${ECHO_T}$ac_ct_LD" >&6
4822 else
4823   echo "$as_me:4823: result: no" >&5
4824 echo "${ECHO_T}no" >&6
4825 fi
4826
4827   LD=$ac_ct_LD
4828 else
4829   LD="$ac_cv_prog_LD"
4830 fi
4831
4832 if test -n "$ac_tool_prefix"; then
4833   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4834 set dummy ${ac_tool_prefix}ar; ac_word=$2
4835 echo "$as_me:4835: checking for $ac_word" >&5
4836 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4837 if test "${ac_cv_prog_AR+set}" = set; then
4838   echo $ECHO_N "(cached) $ECHO_C" >&6
4839 else
4840   if test -n "$AR"; then
4841   ac_cv_prog_AR="$AR" # Let the user override the test.
4842 else
4843   ac_save_IFS=$IFS; IFS=$ac_path_separator
4844 ac_dummy="$PATH"
4845 for ac_dir in $ac_dummy; do
4846   IFS=$ac_save_IFS
4847   test -z "$ac_dir" && ac_dir=.
4848   $as_executable_p "$ac_dir/$ac_word" || continue
4849 ac_cv_prog_AR="${ac_tool_prefix}ar"
4850 echo "$as_me:4850: found $ac_dir/$ac_word" >&5
4851 break
4852 done
4853
4854 fi
4855 fi
4856 AR=$ac_cv_prog_AR
4857 if test -n "$AR"; then
4858   echo "$as_me:4858: result: $AR" >&5
4859 echo "${ECHO_T}$AR" >&6
4860 else
4861   echo "$as_me:4861: result: no" >&5
4862 echo "${ECHO_T}no" >&6
4863 fi
4864
4865 fi
4866 if test -z "$ac_cv_prog_AR"; then
4867   ac_ct_AR=$AR
4868   # Extract the first word of "ar", so it can be a program name with args.
4869 set dummy ar; ac_word=$2
4870 echo "$as_me:4870: checking for $ac_word" >&5
4871 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4872 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4873   echo $ECHO_N "(cached) $ECHO_C" >&6
4874 else
4875   if test -n "$ac_ct_AR"; then
4876   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4877 else
4878   ac_save_IFS=$IFS; IFS=$ac_path_separator
4879 ac_dummy="$PATH"
4880 for ac_dir in $ac_dummy; do
4881   IFS=$ac_save_IFS
4882   test -z "$ac_dir" && ac_dir=.
4883   $as_executable_p "$ac_dir/$ac_word" || continue
4884 ac_cv_prog_ac_ct_AR="ar"
4885 echo "$as_me:4885: found $ac_dir/$ac_word" >&5
4886 break
4887 done
4888
4889   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4890 fi
4891 fi
4892 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4893 if test -n "$ac_ct_AR"; then
4894   echo "$as_me:4894: result: $ac_ct_AR" >&5
4895 echo "${ECHO_T}$ac_ct_AR" >&6
4896 else
4897   echo "$as_me:4897: result: no" >&5
4898 echo "${ECHO_T}no" >&6
4899 fi
4900
4901   AR=$ac_ct_AR
4902 else
4903   AR="$ac_cv_prog_AR"
4904 fi
4905
4906 if test -n "$ac_tool_prefix"; then
4907   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4908 set dummy ${ac_tool_prefix}nm; ac_word=$2
4909 echo "$as_me:4909: checking for $ac_word" >&5
4910 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4911 if test "${ac_cv_prog_NM+set}" = set; then
4912   echo $ECHO_N "(cached) $ECHO_C" >&6
4913 else
4914   if test -n "$NM"; then
4915   ac_cv_prog_NM="$NM" # Let the user override the test.
4916 else
4917   ac_save_IFS=$IFS; IFS=$ac_path_separator
4918 ac_dummy="$PATH"
4919 for ac_dir in $ac_dummy; do
4920   IFS=$ac_save_IFS
4921   test -z "$ac_dir" && ac_dir=.
4922   $as_executable_p "$ac_dir/$ac_word" || continue
4923 ac_cv_prog_NM="${ac_tool_prefix}nm"
4924 echo "$as_me:4924: found $ac_dir/$ac_word" >&5
4925 break
4926 done
4927
4928 fi
4929 fi
4930 NM=$ac_cv_prog_NM
4931 if test -n "$NM"; then
4932   echo "$as_me:4932: result: $NM" >&5
4933 echo "${ECHO_T}$NM" >&6
4934 else
4935   echo "$as_me:4935: result: no" >&5
4936 echo "${ECHO_T}no" >&6
4937 fi
4938
4939 fi
4940 if test -z "$ac_cv_prog_NM"; then
4941   ac_ct_NM=$NM
4942   # Extract the first word of "nm", so it can be a program name with args.
4943 set dummy nm; ac_word=$2
4944 echo "$as_me:4944: checking for $ac_word" >&5
4945 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4946 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4947   echo $ECHO_N "(cached) $ECHO_C" >&6
4948 else
4949   if test -n "$ac_ct_NM"; then
4950   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4951 else
4952   ac_save_IFS=$IFS; IFS=$ac_path_separator
4953 ac_dummy="$PATH"
4954 for ac_dir in $ac_dummy; do
4955   IFS=$ac_save_IFS
4956   test -z "$ac_dir" && ac_dir=.
4957   $as_executable_p "$ac_dir/$ac_word" || continue
4958 ac_cv_prog_ac_ct_NM="nm"
4959 echo "$as_me:4959: found $ac_dir/$ac_word" >&5
4960 break
4961 done
4962
4963   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4964 fi
4965 fi
4966 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4967 if test -n "$ac_ct_NM"; then
4968   echo "$as_me:4968: result: $ac_ct_NM" >&5
4969 echo "${ECHO_T}$ac_ct_NM" >&6
4970 else
4971   echo "$as_me:4971: result: no" >&5
4972 echo "${ECHO_T}no" >&6
4973 fi
4974
4975   NM=$ac_ct_NM
4976 else
4977   NM="$ac_cv_prog_NM"
4978 fi
4979
4980 if test -n "$ac_tool_prefix"; then
4981   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4982 set dummy ${ac_tool_prefix}ar; ac_word=$2
4983 echo "$as_me:4983: checking for $ac_word" >&5
4984 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4985 if test "${ac_cv_prog_AR+set}" = set; then
4986   echo $ECHO_N "(cached) $ECHO_C" >&6
4987 else
4988   if test -n "$AR"; then
4989   ac_cv_prog_AR="$AR" # Let the user override the test.
4990 else
4991   ac_save_IFS=$IFS; IFS=$ac_path_separator
4992 ac_dummy="$PATH"
4993 for ac_dir in $ac_dummy; do
4994   IFS=$ac_save_IFS
4995   test -z "$ac_dir" && ac_dir=.
4996   $as_executable_p "$ac_dir/$ac_word" || continue
4997 ac_cv_prog_AR="${ac_tool_prefix}ar"
4998 echo "$as_me:4998: found $ac_dir/$ac_word" >&5
4999 break
5000 done
5001
5002 fi
5003 fi
5004 AR=$ac_cv_prog_AR
5005 if test -n "$AR"; then
5006   echo "$as_me:5006: result: $AR" >&5
5007 echo "${ECHO_T}$AR" >&6
5008 else
5009   echo "$as_me:5009: result: no" >&5
5010 echo "${ECHO_T}no" >&6
5011 fi
5012
5013 fi
5014 if test -z "$ac_cv_prog_AR"; then
5015   ac_ct_AR=$AR
5016   # Extract the first word of "ar", so it can be a program name with args.
5017 set dummy ar; ac_word=$2
5018 echo "$as_me:5018: checking for $ac_word" >&5
5019 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5020 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5021   echo $ECHO_N "(cached) $ECHO_C" >&6
5022 else
5023   if test -n "$ac_ct_AR"; then
5024   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5025 else
5026   ac_save_IFS=$IFS; IFS=$ac_path_separator
5027 ac_dummy="$PATH"
5028 for ac_dir in $ac_dummy; do
5029   IFS=$ac_save_IFS
5030   test -z "$ac_dir" && ac_dir=.
5031   $as_executable_p "$ac_dir/$ac_word" || continue
5032 ac_cv_prog_ac_ct_AR="ar"
5033 echo "$as_me:5033: found $ac_dir/$ac_word" >&5
5034 break
5035 done
5036
5037   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5038 fi
5039 fi
5040 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5041 if test -n "$ac_ct_AR"; then
5042   echo "$as_me:5042: result: $ac_ct_AR" >&5
5043 echo "${ECHO_T}$ac_ct_AR" >&6
5044 else
5045   echo "$as_me:5045: result: no" >&5
5046 echo "${ECHO_T}no" >&6
5047 fi
5048
5049   AR=$ac_ct_AR
5050 else
5051   AR="$ac_cv_prog_AR"
5052 fi
5053
5054 echo "$as_me:5054: checking for options to update archives" >&5
5055 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5056 if test "${cf_cv_ar_flags+set}" = set; then
5057   echo $ECHO_N "(cached) $ECHO_C" >&6
5058 else
5059
5060         case "$cf_cv_system_name" in
5061         (*-msvc*)
5062                 cf_cv_ar_flags=''
5063                 cat >mk_static_lib.sh <<-EOF
5064                 #!$SHELL
5065                 MSVC_BIN="$AR"
5066                 out="\$1"
5067                 shift
5068                 exec \$MSVC_BIN -out:"\$out" \$@
5069                 EOF
5070                 chmod +x mk_static_lib.sh
5071                 AR=`pwd`/mk_static_lib.sh
5072                 ;;
5073         (*)
5074                 cf_cv_ar_flags=unknown
5075                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5076                 do
5077
5078                         # check if $ARFLAGS already contains this choice
5079                         if test "x$ARFLAGS" != "x" ; then
5080                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5081                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5082                                         cf_cv_ar_flags=
5083                                         break
5084                                 fi
5085                         fi
5086
5087                         rm -f "conftest.$ac_cv_objext"
5088                         rm -f conftest.a
5089
5090                         cat >"conftest.$ac_ext" <<EOF
5091 #line 5091 "configure"
5092 int     testdata[3] = { 123, 456, 789 };
5093 EOF
5094                         if { (eval echo "$as_me:5094: \"$ac_compile\"") >&5
5095   (eval $ac_compile) 2>&5
5096   ac_status=$?
5097   echo "$as_me:5097: \$? = $ac_status" >&5
5098   (exit "$ac_status"); } ; then
5099                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5100                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5101                                 if test -f conftest.a ; then
5102                                         cf_cv_ar_flags="$cf_ar_flags"
5103                                         break
5104                                 fi
5105                         else
5106                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5107
5108 echo "${as_me:-configure}:5108: testing cannot compile test-program ..." 1>&5
5109
5110                                 break
5111                         fi
5112                 done
5113                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5114                 ;;
5115         esac
5116
5117 fi
5118 echo "$as_me:5118: result: $cf_cv_ar_flags" >&5
5119 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5120
5121 if test -n "$ARFLAGS" ; then
5122         if test -n "$cf_cv_ar_flags" ; then
5123                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5124         fi
5125 else
5126         ARFLAGS=$cf_cv_ar_flags
5127 fi
5128
5129 echo "$as_me:5129: checking if you have specified an install-prefix" >&5
5130 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5131
5132 # Check whether --with-install-prefix or --without-install-prefix was given.
5133 if test "${with_install_prefix+set}" = set; then
5134   withval="$with_install_prefix"
5135   case "x$withval" in
5136         (xyes|xno)
5137                 ;;
5138         (*)     DESTDIR="$withval"
5139                 ;;
5140         esac
5141 fi;
5142 echo "$as_me:5142: result: $DESTDIR" >&5
5143 echo "${ECHO_T}$DESTDIR" >&6
5144
5145 ###############################################################################
5146
5147 # If we're cross-compiling, allow the user to override the tools and their
5148 # options.  The configure script is oriented toward identifying the host
5149 # compiler, etc., but we need a build compiler to generate parts of the source.
5150
5151 case "$cf_cv_system_name" in
5152 (*-msvc*)
5153         LDFLAGS="$LDFLAGS user32.lib"
5154         export LDFLAGS
5155         ;;
5156 esac
5157
5158 if test "$cross_compiling" = yes ; then
5159
5160         # defaults that we might want to override
5161         : ${BUILD_CFLAGS:=''}
5162         : ${BUILD_CPPFLAGS:=''}
5163         : ${BUILD_LDFLAGS:=''}
5164         : ${BUILD_LIBS:=''}
5165         : ${BUILD_EXEEXT:='$x'}
5166         : ${BUILD_OBJEXT:='o'}
5167
5168 # Check whether --with-build-cc or --without-build-cc was given.
5169 if test "${with_build_cc+set}" = set; then
5170   withval="$with_build_cc"
5171   BUILD_CC="$withval"
5172 else
5173   for ac_prog in gcc clang c99 c89 cc cl
5174 do
5175   # Extract the first word of "$ac_prog", so it can be a program name with args.
5176 set dummy $ac_prog; ac_word=$2
5177 echo "$as_me:5177: checking for $ac_word" >&5
5178 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5179 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5180   echo $ECHO_N "(cached) $ECHO_C" >&6
5181 else
5182   if test -n "$BUILD_CC"; then
5183   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5184 else
5185   ac_save_IFS=$IFS; IFS=$ac_path_separator
5186 ac_dummy="$PATH"
5187 for ac_dir in $ac_dummy; do
5188   IFS=$ac_save_IFS
5189   test -z "$ac_dir" && ac_dir=.
5190   $as_executable_p "$ac_dir/$ac_word" || continue
5191 ac_cv_prog_BUILD_CC="$ac_prog"
5192 echo "$as_me:5192: found $ac_dir/$ac_word" >&5
5193 break
5194 done
5195
5196 fi
5197 fi
5198 BUILD_CC=$ac_cv_prog_BUILD_CC
5199 if test -n "$BUILD_CC"; then
5200   echo "$as_me:5200: result: $BUILD_CC" >&5
5201 echo "${ECHO_T}$BUILD_CC" >&6
5202 else
5203   echo "$as_me:5203: result: no" >&5
5204 echo "${ECHO_T}no" >&6
5205 fi
5206
5207   test -n "$BUILD_CC" && break
5208 done
5209 test -n "$BUILD_CC" || BUILD_CC="none"
5210
5211 fi;
5212         echo "$as_me:5212: checking for native build C compiler" >&5
5213 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5214         echo "$as_me:5214: result: $BUILD_CC" >&5
5215 echo "${ECHO_T}$BUILD_CC" >&6
5216
5217         echo "$as_me:5217: checking for native build C preprocessor" >&5
5218 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5219
5220 # Check whether --with-build-cpp or --without-build-cpp was given.
5221 if test "${with_build_cpp+set}" = set; then
5222   withval="$with_build_cpp"
5223   BUILD_CPP="$withval"
5224 else
5225   BUILD_CPP='${BUILD_CC} -E'
5226 fi;
5227         echo "$as_me:5227: result: $BUILD_CPP" >&5
5228 echo "${ECHO_T}$BUILD_CPP" >&6
5229
5230         echo "$as_me:5230: checking for native build C flags" >&5
5231 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5232
5233 # Check whether --with-build-cflags or --without-build-cflags was given.
5234 if test "${with_build_cflags+set}" = set; then
5235   withval="$with_build_cflags"
5236   BUILD_CFLAGS="$withval"
5237 fi;
5238         echo "$as_me:5238: result: $BUILD_CFLAGS" >&5
5239 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5240
5241         echo "$as_me:5241: checking for native build C preprocessor-flags" >&5
5242 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5243
5244 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5245 if test "${with_build_cppflags+set}" = set; then
5246   withval="$with_build_cppflags"
5247   BUILD_CPPFLAGS="$withval"
5248 fi;
5249         echo "$as_me:5249: result: $BUILD_CPPFLAGS" >&5
5250 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5251
5252         echo "$as_me:5252: checking for native build linker-flags" >&5
5253 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5254
5255 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5256 if test "${with_build_ldflags+set}" = set; then
5257   withval="$with_build_ldflags"
5258   BUILD_LDFLAGS="$withval"
5259 fi;
5260         echo "$as_me:5260: result: $BUILD_LDFLAGS" >&5
5261 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5262
5263         echo "$as_me:5263: checking for native build linker-libraries" >&5
5264 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5265
5266 # Check whether --with-build-libs or --without-build-libs was given.
5267 if test "${with_build_libs+set}" = set; then
5268   withval="$with_build_libs"
5269   BUILD_LIBS="$withval"
5270 fi;
5271         echo "$as_me:5271: result: $BUILD_LIBS" >&5
5272 echo "${ECHO_T}$BUILD_LIBS" >&6
5273
5274         # this assumes we're on Unix.
5275         BUILD_EXEEXT=
5276         BUILD_OBJEXT=o
5277
5278         : ${BUILD_CC:='${CC}'}
5279
5280         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5281                 { { echo "$as_me:5281: error: Cross-build requires two compilers.
5282 Use --with-build-cc to specify the native compiler." >&5
5283 echo "$as_me: error: Cross-build requires two compilers.
5284 Use --with-build-cc to specify the native compiler." >&2;}
5285    { (exit 1); exit 1; }; }
5286         fi
5287
5288 else
5289         : ${BUILD_CC:='${CC}'}
5290         : ${BUILD_CPP:='${CPP}'}
5291         : ${BUILD_CFLAGS:='${CFLAGS}'}
5292         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5293         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5294         : ${BUILD_LIBS:='${LIBS}'}
5295         : ${BUILD_EXEEXT:='$x'}
5296         : ${BUILD_OBJEXT:='o'}
5297 fi
5298
5299 ###############################################################################
5300
5301 ### Options to allow the user to specify the set of libraries which are used.
5302 ### Use "--without-normal --with-shared" to allow the default model to be
5303 ### shared, for example.
5304 cf_list_models=""
5305
5306 echo "$as_me:5306: checking if libtool -version-number should be used" >&5
5307 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5308
5309 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5310 if test "${enable_libtool_version+set}" = set; then
5311   enableval="$enable_libtool_version"
5312   test "$enableval" != no && enableval=yes
5313         if test "$enableval" != "yes" ; then
5314     cf_libtool_version=no
5315         else
5316                 cf_libtool_version=yes
5317         fi
5318 else
5319   enableval=yes
5320         cf_libtool_version=yes
5321
5322 fi;
5323 echo "$as_me:5323: result: $cf_libtool_version" >&5
5324 echo "${ECHO_T}$cf_libtool_version" >&6
5325
5326 if test "$cf_libtool_version" = yes ; then
5327         LIBTOOL_VERSION="-version-number"
5328 else
5329         LIBTOOL_VERSION="-version-info"
5330         case "x$VERSION" in
5331         (x)
5332                 { echo "$as_me:5332: WARNING: VERSION was not set" >&5
5333 echo "$as_me: WARNING: VERSION was not set" >&2;}
5334                 ;;
5335         (x*.*.*)
5336                 ABI_VERSION="$VERSION"
5337                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5338
5339 echo "${as_me:-configure}:5339: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5340
5341                 ;;
5342         (x*:*:*)
5343                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5344                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5345
5346 echo "${as_me:-configure}:5346: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5347
5348                 ;;
5349         (*)
5350                 { echo "$as_me:5350: WARNING: unexpected VERSION value: $VERSION" >&5
5351 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5352                 ;;
5353         esac
5354 fi
5355
5356 LIBTOOL=
5357
5358 # common library maintenance symbols that are convenient for libtool scripts:
5359 LIB_CREATE='${AR} -cr'
5360 LIB_OBJECT='${OBJECTS}'
5361 LIB_SUFFIX=.a
5362 LIB_PREP="$RANLIB"
5363
5364 # symbols used to prop libtool up to enable it to determine what it should be
5365 # doing:
5366 LIB_CLEAN=
5367 LIB_COMPILE=
5368 LIB_LINK='${CC}'
5369 LIB_INSTALL=
5370 LIB_UNINSTALL=
5371
5372 echo "$as_me:5372: checking if you want to build libraries with libtool" >&5
5373 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5374
5375 # Check whether --with-libtool or --without-libtool was given.
5376 if test "${with_libtool+set}" = set; then
5377   withval="$with_libtool"
5378   with_libtool=$withval
5379 else
5380   with_libtool=no
5381 fi;
5382 echo "$as_me:5382: result: $with_libtool" >&5
5383 echo "${ECHO_T}$with_libtool" >&6
5384 if test "$with_libtool" != "no"; then
5385
5386         if test "$with_libtool" != "yes" ; then
5387
5388 if test "x$prefix" != xNONE; then
5389         cf_path_syntax="$prefix"
5390 else
5391         cf_path_syntax="$ac_default_prefix"
5392 fi
5393
5394 case ".$with_libtool" in
5395 (.\$\(*\)*|.\'*\'*)
5396         ;;
5397 (..|./*|.\\*)
5398         ;;
5399 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5400         ;;
5401 (.\$\{*prefix\}*|.\$\{*dir\}*)
5402         eval with_libtool="$with_libtool"
5403         case ".$with_libtool" in
5404         (.NONE/*)
5405                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5406                 ;;
5407         esac
5408         ;;
5409 (.no|.NONE/*)
5410         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5411         ;;
5412 (*)
5413         { { echo "$as_me:5413: error: expected a pathname, not \"$with_libtool\"" >&5
5414 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5415    { (exit 1); exit 1; }; }
5416         ;;
5417 esac
5418
5419                 LIBTOOL=$with_libtool
5420         else
5421                 if test -n "$ac_tool_prefix"; then
5422   for ac_prog in libtool glibtool
5423   do
5424     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5425 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5426 echo "$as_me:5426: checking for $ac_word" >&5
5427 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5428 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5429   echo $ECHO_N "(cached) $ECHO_C" >&6
5430 else
5431   if test -n "$LIBTOOL"; then
5432   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5433 else
5434   ac_save_IFS=$IFS; IFS=$ac_path_separator
5435 ac_dummy="$PATH"
5436 for ac_dir in $ac_dummy; do
5437   IFS=$ac_save_IFS
5438   test -z "$ac_dir" && ac_dir=.
5439   $as_executable_p "$ac_dir/$ac_word" || continue
5440 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5441 echo "$as_me:5441: found $ac_dir/$ac_word" >&5
5442 break
5443 done
5444
5445 fi
5446 fi
5447 LIBTOOL=$ac_cv_prog_LIBTOOL
5448 if test -n "$LIBTOOL"; then
5449   echo "$as_me:5449: result: $LIBTOOL" >&5
5450 echo "${ECHO_T}$LIBTOOL" >&6
5451 else
5452   echo "$as_me:5452: result: no" >&5
5453 echo "${ECHO_T}no" >&6
5454 fi
5455
5456     test -n "$LIBTOOL" && break
5457   done
5458 fi
5459 if test -z "$LIBTOOL"; then
5460   ac_ct_LIBTOOL=$LIBTOOL
5461   for ac_prog in libtool glibtool
5462 do
5463   # Extract the first word of "$ac_prog", so it can be a program name with args.
5464 set dummy $ac_prog; ac_word=$2
5465 echo "$as_me:5465: checking for $ac_word" >&5
5466 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5467 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5468   echo $ECHO_N "(cached) $ECHO_C" >&6
5469 else
5470   if test -n "$ac_ct_LIBTOOL"; then
5471   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5472 else
5473   ac_save_IFS=$IFS; IFS=$ac_path_separator
5474 ac_dummy="$PATH"
5475 for ac_dir in $ac_dummy; do
5476   IFS=$ac_save_IFS
5477   test -z "$ac_dir" && ac_dir=.
5478   $as_executable_p "$ac_dir/$ac_word" || continue
5479 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5480 echo "$as_me:5480: found $ac_dir/$ac_word" >&5
5481 break
5482 done
5483
5484 fi
5485 fi
5486 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5487 if test -n "$ac_ct_LIBTOOL"; then
5488   echo "$as_me:5488: result: $ac_ct_LIBTOOL" >&5
5489 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5490 else
5491   echo "$as_me:5491: result: no" >&5
5492 echo "${ECHO_T}no" >&6
5493 fi
5494
5495   test -n "$ac_ct_LIBTOOL" && break
5496 done
5497 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5498
5499   LIBTOOL=$ac_ct_LIBTOOL
5500 fi
5501
5502 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5503 then
5504         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.].*//'`
5505 else
5506         cf_cv_libtool_version=
5507 fi
5508 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5509
5510                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5511                 then
5512
5513 unset ac_cv_prog_ac_ct_LIBTOOL
5514 unset ac_ct_LIBTOOL
5515 unset LIBTOOL
5516
5517                         if test -n "$ac_tool_prefix"; then
5518   for ac_prog in glibtool
5519   do
5520     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5521 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5522 echo "$as_me:5522: checking for $ac_word" >&5
5523 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5524 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5525   echo $ECHO_N "(cached) $ECHO_C" >&6
5526 else
5527   if test -n "$LIBTOOL"; then
5528   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5529 else
5530   ac_save_IFS=$IFS; IFS=$ac_path_separator
5531 ac_dummy="$PATH"
5532 for ac_dir in $ac_dummy; do
5533   IFS=$ac_save_IFS
5534   test -z "$ac_dir" && ac_dir=.
5535   $as_executable_p "$ac_dir/$ac_word" || continue
5536 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5537 echo "$as_me:5537: found $ac_dir/$ac_word" >&5
5538 break
5539 done
5540
5541 fi
5542 fi
5543 LIBTOOL=$ac_cv_prog_LIBTOOL
5544 if test -n "$LIBTOOL"; then
5545   echo "$as_me:5545: result: $LIBTOOL" >&5
5546 echo "${ECHO_T}$LIBTOOL" >&6
5547 else
5548   echo "$as_me:5548: result: no" >&5
5549 echo "${ECHO_T}no" >&6
5550 fi
5551
5552     test -n "$LIBTOOL" && break
5553   done
5554 fi
5555 if test -z "$LIBTOOL"; then
5556   ac_ct_LIBTOOL=$LIBTOOL
5557   for ac_prog in glibtool
5558 do
5559   # Extract the first word of "$ac_prog", so it can be a program name with args.
5560 set dummy $ac_prog; ac_word=$2
5561 echo "$as_me:5561: checking for $ac_word" >&5
5562 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5563 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5564   echo $ECHO_N "(cached) $ECHO_C" >&6
5565 else
5566   if test -n "$ac_ct_LIBTOOL"; then
5567   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5568 else
5569   ac_save_IFS=$IFS; IFS=$ac_path_separator
5570 ac_dummy="$PATH"
5571 for ac_dir in $ac_dummy; do
5572   IFS=$ac_save_IFS
5573   test -z "$ac_dir" && ac_dir=.
5574   $as_executable_p "$ac_dir/$ac_word" || continue
5575 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5576 echo "$as_me:5576: found $ac_dir/$ac_word" >&5
5577 break
5578 done
5579
5580 fi
5581 fi
5582 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5583 if test -n "$ac_ct_LIBTOOL"; then
5584   echo "$as_me:5584: result: $ac_ct_LIBTOOL" >&5
5585 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5586 else
5587   echo "$as_me:5587: result: no" >&5
5588 echo "${ECHO_T}no" >&6
5589 fi
5590
5591   test -n "$ac_ct_LIBTOOL" && break
5592 done
5593 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5594
5595   LIBTOOL=$ac_ct_LIBTOOL
5596 fi
5597
5598 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5599 then
5600         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.].*//'`
5601 else
5602         cf_cv_libtool_version=
5603 fi
5604 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5605
5606                 fi
5607         fi
5608         if test -z "$LIBTOOL" ; then
5609                 { { echo "$as_me:5609: error: Cannot find libtool" >&5
5610 echo "$as_me: error: Cannot find libtool" >&2;}
5611    { (exit 1); exit 1; }; }
5612         fi
5613         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5614         LIB_OBJECT='${OBJECTS:.o=.lo}'
5615         LIB_SUFFIX=.la
5616         LIB_CLEAN='${LIBTOOL} --mode=clean'
5617         LIB_COMPILE='${LIBTOOL} --mode=compile'
5618         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5619         LIB_INSTALL='${LIBTOOL} --mode=install'
5620         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5621         LIB_PREP=:
5622
5623 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5624 then
5625         echo "$as_me:5625: checking version of $LIBTOOL" >&5
5626 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5627
5628 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5629 then
5630         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.].*//'`
5631 else
5632         cf_cv_libtool_version=
5633 fi
5634 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5635
5636         echo "$as_me:5636: result: $cf_cv_libtool_version" >&5
5637 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5638         if test -n "$cf_cv_libtool_version"
5639         then
5640                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5641                 case "x$cf_check_libtool_version" in
5642                 (*...GNU-libtool...*)
5643                         ;;
5644                 (*)
5645                         { { echo "$as_me:5645: error: This is not GNU libtool" >&5
5646 echo "$as_me: error: This is not GNU libtool" >&2;}
5647    { (exit 1); exit 1; }; }
5648                         ;;
5649                 esac
5650         else
5651                 { { echo "$as_me:5651: error: No version found for $LIBTOOL" >&5
5652 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5653    { (exit 1); exit 1; }; }
5654         fi
5655 else
5656         { { echo "$as_me:5656: error: GNU libtool has not been found" >&5
5657 echo "$as_me: error: GNU libtool has not been found" >&2;}
5658    { (exit 1); exit 1; }; }
5659 fi
5660
5661         # special hack to add -no-undefined (which libtool should do for itself)
5662         LT_UNDEF=
5663         case "$cf_cv_system_name" in
5664         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5665                 LT_UNDEF=-no-undefined
5666                 ;;
5667         esac
5668
5669         # special hack to add --tag option for C++ compiler
5670         case "$cf_cv_libtool_version" in
5671         (1.[5-9]*|[2-9].[0-9.a-z]*)
5672                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5673                 LIBTOOL="$LIBTOOL --tag=CC"
5674                 ;;
5675         (*)
5676                 LIBTOOL_CXX="$LIBTOOL"
5677                 ;;
5678         esac
5679 else
5680         LIBTOOL=""
5681         LIBTOOL_CXX=""
5682 fi
5683
5684 test -z "$LIBTOOL" && ECHO_LT=
5685
5686 if test "$with_libtool" != "no" ; then
5687
5688 cf_list_models="$cf_list_models libtool"
5689
5690 else
5691
5692 echo "$as_me:5692: checking if you want to build shared libraries" >&5
5693 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5694
5695 # Check whether --with-shared or --without-shared was given.
5696 if test "${with_shared+set}" = set; then
5697   withval="$with_shared"
5698   with_shared=$withval
5699 else
5700   with_shared=no
5701 fi;
5702 echo "$as_me:5702: result: $with_shared" >&5
5703 echo "${ECHO_T}$with_shared" >&6
5704 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5705
5706 echo "$as_me:5706: checking if you want to build static libraries" >&5
5707 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5708
5709 # Check whether --with-normal or --without-normal was given.
5710 if test "${with_normal+set}" = set; then
5711   withval="$with_normal"
5712   with_normal=$withval
5713 else
5714   with_normal=yes
5715 fi;
5716 echo "$as_me:5716: result: $with_normal" >&5
5717 echo "${ECHO_T}$with_normal" >&6
5718 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5719
5720 echo "$as_me:5720: checking if you want to build debug libraries" >&5
5721 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5722
5723 # Check whether --with-debug or --without-debug was given.
5724 if test "${with_debug+set}" = set; then
5725   withval="$with_debug"
5726   with_debug=$withval
5727 else
5728   with_debug=yes
5729 fi;
5730 echo "$as_me:5730: result: $with_debug" >&5
5731 echo "${ECHO_T}$with_debug" >&6
5732 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5733
5734 echo "$as_me:5734: checking if you want to build profiling libraries" >&5
5735 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5736
5737 # Check whether --with-profile or --without-profile was given.
5738 if test "${with_profile+set}" = set; then
5739   withval="$with_profile"
5740   with_profile=$withval
5741 else
5742   with_profile=no
5743 fi;
5744 echo "$as_me:5744: result: $with_profile" >&5
5745 echo "${ECHO_T}$with_profile" >&6
5746 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5747
5748 fi
5749
5750 if test "X$cf_with_cxx_binding" != Xno; then
5751 if test "x$with_shared" = "xyes"; then
5752 echo "$as_me:5752: checking if you want to build C++ shared libraries" >&5
5753 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5754
5755 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5756 if test "${with_cxx_shared+set}" = set; then
5757   withval="$with_cxx_shared"
5758   with_shared_cxx=$withval
5759 else
5760   with_shared_cxx=no
5761 fi;
5762 echo "$as_me:5762: result: $with_shared_cxx" >&5
5763 echo "${ECHO_T}$with_shared_cxx" >&6
5764 fi
5765 fi
5766
5767 ###############################################################################
5768
5769 echo "$as_me:5769: checking for specified models" >&5
5770 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5771 test -z "$cf_list_models" && cf_list_models=normal
5772 test "$with_libtool" != "no" && cf_list_models=libtool
5773 echo "$as_me:5773: result: $cf_list_models" >&5
5774 echo "${ECHO_T}$cf_list_models" >&6
5775
5776 ### Use the first model as the default, and save its suffix for use in building
5777 ### up test-applications.
5778 echo "$as_me:5778: checking for default model" >&5
5779 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5780 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5781 echo "$as_me:5781: result: $DFT_LWR_MODEL" >&5
5782 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5783
5784 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5785
5786 TICS_NAME=tic
5787
5788 TINFO_NAME=tinfo
5789
5790 LIB_NAME=ncurses
5791
5792 LIB_DIR=../lib
5793 LIB_2ND=../../lib
5794
5795 echo "$as_me:5795: checking if you want to have a library-prefix" >&5
5796 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5797
5798 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5799 if test "${with_lib_prefix+set}" = set; then
5800   withval="$with_lib_prefix"
5801   with_lib_prefix=$withval
5802 else
5803   with_lib_prefix=auto
5804 fi;
5805 echo "$as_me:5805: result: $with_lib_prefix" >&5
5806 echo "${ECHO_T}$with_lib_prefix" >&6
5807
5808 if test "$with_lib_prefix" = auto
5809 then
5810
5811         case "$cf_cv_system_name" in
5812         (OS/2*|os2*)
5813                 if test "$DFT_LWR_MODEL" = libtool; then
5814                         LIB_PREFIX='lib'
5815                 else
5816                         LIB_PREFIX=''
5817                 fi
5818                 ;;
5819         (*-msvc*)
5820                 LIB_PREFIX=''
5821                 ;;
5822         (*)     LIB_PREFIX='lib'
5823                 ;;
5824         esac
5825 cf_prefix=$LIB_PREFIX
5826
5827 elif test "$with_lib_prefix" = no
5828 then
5829         LIB_PREFIX=
5830 else
5831         LIB_PREFIX=$with_lib_prefix
5832 fi
5833
5834 LIB_SUFFIX=
5835
5836         echo "$as_me:5836: checking for PATH separator" >&5
5837 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5838         case "$cf_cv_system_name" in
5839         (os2*)  PATH_SEPARATOR=';'  ;;
5840         (*)     ${PATH_SEPARATOR:=':'}  ;;
5841         esac
5842
5843         echo "$as_me:5843: result: $PATH_SEPARATOR" >&5
5844 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5845
5846 ###############################################################################
5847
5848 echo "$as_me:5848: checking if you want to build a separate terminfo library" >&5
5849 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5850
5851 # Check whether --with-termlib or --without-termlib was given.
5852 if test "${with_termlib+set}" = set; then
5853   withval="$with_termlib"
5854   with_termlib=$withval
5855 else
5856   with_termlib=no
5857 fi;
5858 echo "$as_me:5858: result: $with_termlib" >&5
5859 echo "${ECHO_T}$with_termlib" >&6
5860
5861 echo "$as_me:5861: checking if you want to build a separate tic library" >&5
5862 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5863
5864 # Check whether --with-ticlib or --without-ticlib was given.
5865 if test "${with_ticlib+set}" = set; then
5866   withval="$with_ticlib"
5867   with_ticlib=$withval
5868 else
5869   with_ticlib=no
5870 fi;
5871 echo "$as_me:5871: result: $with_ticlib" >&5
5872 echo "${ECHO_T}$with_ticlib" >&6
5873
5874 if test X"$CC_G_OPT" = X"" ; then
5875         CC_G_OPT='-g'
5876         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5877 fi
5878
5879 if test X"$CXX_G_OPT" = X"" ; then
5880         CXX_G_OPT='-g'
5881         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5882 fi
5883
5884 echo "$as_me:5884: checking for default loader flags" >&5
5885 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5886 case "$DFT_LWR_MODEL" in
5887 (libtool) LD_MODEL=''   ;;
5888 (normal)  LD_MODEL=''   ;;
5889 (debug)   LD_MODEL=$CC_G_OPT ;;
5890 (profile) LD_MODEL='-pg';;
5891 (shared)  LD_MODEL=''   ;;
5892 esac
5893 echo "$as_me:5893: result: $LD_MODEL" >&5
5894 echo "${ECHO_T}$LD_MODEL" >&6
5895
5896 case "$DFT_LWR_MODEL" in
5897 (shared)
5898
5899 echo "$as_me:5899: checking if rpath option should be used" >&5
5900 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5901
5902 # Check whether --enable-rpath or --disable-rpath was given.
5903 if test "${enable_rpath+set}" = set; then
5904   enableval="$enable_rpath"
5905   cf_cv_enable_rpath=$enableval
5906 else
5907   cf_cv_enable_rpath=no
5908 fi;
5909 echo "$as_me:5909: result: $cf_cv_enable_rpath" >&5
5910 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5911
5912 echo "$as_me:5912: checking if shared libraries should be relinked during install" >&5
5913 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5914
5915 # Check whether --enable-relink or --disable-relink was given.
5916 if test "${enable_relink+set}" = set; then
5917   enableval="$enable_relink"
5918   cf_cv_do_relink=$enableval
5919 else
5920   cf_cv_do_relink=yes
5921 fi;
5922 echo "$as_me:5922: result: $cf_cv_do_relink" >&5
5923 echo "${ECHO_T}$cf_cv_do_relink" >&6
5924         ;;
5925 esac
5926
5927 # we will build libraries one-level down.
5928 rel_builddir=..
5929
5930 LD_RPATH_OPT=
5931 if test "x$cf_cv_enable_rpath" != xno
5932 then
5933         echo "$as_me:5933: checking for an rpath option" >&5
5934 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5935         case "$cf_cv_system_name" in
5936         (irix*)
5937                 if test "$GCC" = yes; then
5938                         LD_RPATH_OPT="-Wl,-rpath,"
5939                 else
5940                         LD_RPATH_OPT="-rpath "
5941                 fi
5942                 ;;
5943         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5944                 LD_RPATH_OPT="-Wl,-rpath,"
5945                 ;;
5946         (openbsd[2-9].*|mirbsd*)
5947                 LD_RPATH_OPT="-Wl,-rpath,"
5948                 ;;
5949         (dragonfly*)
5950                 LD_RPATH_OPT="-rpath "
5951                 ;;
5952         (netbsd*)
5953                 LD_RPATH_OPT="-Wl,-rpath,"
5954                 ;;
5955         (osf*|mls+*)
5956                 LD_RPATH_OPT="-rpath "
5957                 ;;
5958         (solaris2*)
5959                 LD_RPATH_OPT="-R"
5960                 ;;
5961         (*)
5962                 ;;
5963         esac
5964         echo "$as_me:5964: result: $LD_RPATH_OPT" >&5
5965 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5966
5967         case "x$LD_RPATH_OPT" in
5968         (x-R*)
5969                 echo "$as_me:5969: checking if we need a space after rpath option" >&5
5970 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5971                 cf_save_LIBS="$LIBS"
5972
5973 cf_add_libs="$LIBS"
5974 # reverse order
5975 cf_add_0lib=
5976 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5977 # filter duplicates
5978 for cf_add_1lib in $cf_add_0lib; do
5979         for cf_add_2lib in $cf_add_libs; do
5980                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5981                         cf_add_1lib=
5982                         break
5983                 fi
5984         done
5985         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5986 done
5987 LIBS="$cf_add_libs"
5988
5989                 cat >"conftest.$ac_ext" <<_ACEOF
5990 #line 5990 "configure"
5991 #include "confdefs.h"
5992
5993 int
5994 main (void)
5995 {
5996
5997   ;
5998   return 0;
5999 }
6000 _ACEOF
6001 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6002 if { (eval echo "$as_me:6002: \"$ac_link\"") >&5
6003   (eval $ac_link) 2>&5
6004   ac_status=$?
6005   echo "$as_me:6005: \$? = $ac_status" >&5
6006   (exit "$ac_status"); } &&
6007          { ac_try='test -s "conftest$ac_exeext"'
6008   { (eval echo "$as_me:6008: \"$ac_try\"") >&5
6009   (eval $ac_try) 2>&5
6010   ac_status=$?
6011   echo "$as_me:6011: \$? = $ac_status" >&5
6012   (exit "$ac_status"); }; }; then
6013   cf_rpath_space=no
6014 else
6015   echo "$as_me: failed program was:" >&5
6016 cat "conftest.$ac_ext" >&5
6017 cf_rpath_space=yes
6018 fi
6019 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6020                 LIBS="$cf_save_LIBS"
6021                 echo "$as_me:6021: result: $cf_rpath_space" >&5
6022 echo "${ECHO_T}$cf_rpath_space" >&6
6023                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6024                 ;;
6025         esac
6026 fi
6027
6028         RM_SHARED_OPTS=
6029         LOCAL_LDFLAGS=
6030         LOCAL_LDFLAGS2=
6031         LD_SHARED_OPTS=
6032         INSTALL_LIB="-m 644"
6033         : ${rel_builddir:=.}
6034
6035         shlibdir=$libdir
6036
6037         MAKE_DLLS="#"
6038
6039         cf_cv_do_symlinks=no
6040         cf_ld_rpath_opt=
6041         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6042
6043         echo "$as_me:6043: checking if release/abi version should be used for shared libs" >&5
6044 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6045
6046 # Check whether --with-shlib-version or --without-shlib-version was given.
6047 if test "${with_shlib_version+set}" = set; then
6048   withval="$with_shlib_version"
6049   test -z "$withval" && withval=auto
6050         case "$withval" in
6051         (yes)
6052                 cf_cv_shlib_version=auto
6053                 ;;
6054         (rel|abi|auto)
6055                 cf_cv_shlib_version=$withval
6056                 ;;
6057         (*)
6058                 echo "$as_me:6058: result: $withval" >&5
6059 echo "${ECHO_T}$withval" >&6
6060                 { { echo "$as_me:6060: error: option value must be one of: rel, abi, or auto" >&5
6061 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6062    { (exit 1); exit 1; }; }
6063                 ;;
6064         esac
6065
6066 else
6067   cf_cv_shlib_version=auto
6068 fi;
6069         echo "$as_me:6069: result: $cf_cv_shlib_version" >&5
6070 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6071
6072         cf_cv_rm_so_locs=no
6073         cf_try_cflags=
6074
6075         # Some less-capable ports of gcc support only -fpic
6076         CC_SHARED_OPTS=
6077
6078         cf_try_fPIC=no
6079         if test "$GCC" = yes
6080         then
6081                 cf_try_fPIC=yes
6082         else
6083                 case "$cf_cv_system_name" in
6084                 (*linux*)       # e.g., PGI compiler
6085                         cf_try_fPIC=yes
6086                         ;;
6087                 esac
6088         fi
6089
6090         if test "$cf_try_fPIC" = yes
6091         then
6092                 echo "$as_me:6092: checking which $CC option to use" >&5
6093 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6094                 cf_save_CFLAGS="$CFLAGS"
6095                 for CC_SHARED_OPTS in -fPIC -fpic ''
6096                 do
6097                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6098                         cat >"conftest.$ac_ext" <<_ACEOF
6099 #line 6099 "configure"
6100 #include "confdefs.h"
6101 #include <stdio.h>
6102 int
6103 main (void)
6104 {
6105 int x = 1
6106   ;
6107   return 0;
6108 }
6109 _ACEOF
6110 rm -f "conftest.$ac_objext"
6111 if { (eval echo "$as_me:6111: \"$ac_compile\"") >&5
6112   (eval $ac_compile) 2>&5
6113   ac_status=$?
6114   echo "$as_me:6114: \$? = $ac_status" >&5
6115   (exit "$ac_status"); } &&
6116          { ac_try='test -s "conftest.$ac_objext"'
6117   { (eval echo "$as_me:6117: \"$ac_try\"") >&5
6118   (eval $ac_try) 2>&5
6119   ac_status=$?
6120   echo "$as_me:6120: \$? = $ac_status" >&5
6121   (exit "$ac_status"); }; }; then
6122   break
6123 else
6124   echo "$as_me: failed program was:" >&5
6125 cat "conftest.$ac_ext" >&5
6126 fi
6127 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6128                 done
6129                 echo "$as_me:6129: result: $CC_SHARED_OPTS" >&5
6130 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6131                 CFLAGS="$cf_save_CFLAGS"
6132         fi
6133
6134         cf_cv_shlib_version_infix=no
6135
6136         case "$cf_cv_system_name" in
6137         (aix4.3-9*|aix[5-7]*)
6138                 if test "$GCC" = yes; then
6139                         CC_SHARED_OPTS='-Wl,-brtl'
6140                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6141                 else
6142                         CC_SHARED_OPTS='-brtl'
6143                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6144                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6145                 fi
6146                 ;;
6147         (beos*)
6148                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6149                 ;;
6150         (cygwin*)
6151                 CC_SHARED_OPTS=
6152                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6153                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6154                 cf_cv_shlib_version=cygdll
6155                 cf_cv_shlib_version_infix=cygdll
6156                 shlibdir=$bindir
6157                 MAKE_DLLS=
6158                 cat >mk_shared_lib.sh <<-CF_EOF
6159                 #!$SHELL
6160                 SHARED_LIB=\$1
6161                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6162                 shift
6163                 cat <<-EOF
6164                 Linking shared library
6165                 ** SHARED_LIB \$SHARED_LIB
6166                 ** IMPORT_LIB \$IMPORT_LIB
6167 EOF
6168                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6169 CF_EOF
6170                 chmod +x mk_shared_lib.sh
6171                 ;;
6172         (msys*)
6173                 CC_SHARED_OPTS=
6174                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6175                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6176                 cf_cv_shlib_version=msysdll
6177                 cf_cv_shlib_version_infix=msysdll
6178                 shlibdir=$bindir
6179                 MAKE_DLLS=
6180                 cat >mk_shared_lib.sh <<-CF_EOF
6181                 #!$SHELL
6182                 SHARED_LIB=\$1
6183                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6184                 shift
6185                 cat <<-EOF
6186                 Linking shared library
6187                 ** SHARED_LIB \$SHARED_LIB
6188                 ** IMPORT_LIB \$IMPORT_LIB
6189 EOF
6190                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6191 CF_EOF
6192                 chmod +x mk_shared_lib.sh
6193                 ;;
6194         (darwin*)
6195                 cf_try_cflags="no-cpp-precomp"
6196                 CC_SHARED_OPTS="-dynamic"
6197                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6198                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6199                 cf_cv_shlib_version_infix=yes
6200                 echo "$as_me:6200: checking if ld -search_paths_first works" >&5
6201 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6202 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6203   echo $ECHO_N "(cached) $ECHO_C" >&6
6204 else
6205
6206                         cf_save_LDFLAGS=$LDFLAGS
6207                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6208                         cat >"conftest.$ac_ext" <<_ACEOF
6209 #line 6209 "configure"
6210 #include "confdefs.h"
6211
6212 int
6213 main (void)
6214 {
6215 int i;
6216   ;
6217   return 0;
6218 }
6219 _ACEOF
6220 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6221 if { (eval echo "$as_me:6221: \"$ac_link\"") >&5
6222   (eval $ac_link) 2>&5
6223   ac_status=$?
6224   echo "$as_me:6224: \$? = $ac_status" >&5
6225   (exit "$ac_status"); } &&
6226          { ac_try='test -s "conftest$ac_exeext"'
6227   { (eval echo "$as_me:6227: \"$ac_try\"") >&5
6228   (eval $ac_try) 2>&5
6229   ac_status=$?
6230   echo "$as_me:6230: \$? = $ac_status" >&5
6231   (exit "$ac_status"); }; }; then
6232   cf_cv_ldflags_search_paths_first=yes
6233 else
6234   echo "$as_me: failed program was:" >&5
6235 cat "conftest.$ac_ext" >&5
6236 cf_cv_ldflags_search_paths_first=no
6237 fi
6238 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6239                                 LDFLAGS=$cf_save_LDFLAGS
6240 fi
6241 echo "$as_me:6241: result: $cf_cv_ldflags_search_paths_first" >&5
6242 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6243                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6244                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6245                 fi
6246                 ;;
6247         (haiku*)
6248
6249         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6250         if test "$cf_cv_shlib_version" = rel; then
6251                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6252         else
6253                 cf_cv_shared_soname='`basename $@`'
6254         fi
6255
6256                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6257                 ;;
6258         (hpux[7-8]*)
6259                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6260                 if test "$GCC" != yes; then
6261                         CC_SHARED_OPTS='+Z'
6262                 fi
6263                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6264                 INSTALL_LIB="-m 555"
6265                 ;;
6266         (hpux*)
6267                 # (tested with gcc 2.7.2 -- I don't have c89)
6268                 if test "$GCC" = yes; then
6269                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6270                 else
6271                         CC_SHARED_OPTS='+Z'
6272                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6273                 fi
6274                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6275                 # HP-UX shared libraries must be executable, and should be
6276                 # readonly to exploit a quirk in the memory manager.
6277                 INSTALL_LIB="-m 555"
6278                 ;;
6279         (interix*)
6280                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6281                 if test "$cf_cv_shlib_version" = rel; then
6282                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6283                 else
6284                         cf_shared_soname='`basename $@`'
6285                 fi
6286                 CC_SHARED_OPTS=
6287                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6288                 ;;
6289         (irix*)
6290                 if test "$cf_cv_enable_rpath" = yes ; then
6291                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6292                 fi
6293                 # tested with IRIX 5.2 and 'cc'.
6294                 if test "$GCC" != yes; then
6295                         CC_SHARED_OPTS='-KPIC'
6296                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6297                 else
6298                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6299                 fi
6300                 cf_cv_rm_so_locs=yes
6301                 ;;
6302         (linux*|gnu*|k*bsd*-gnu)
6303                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6304                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6305                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6306                 fi
6307                 if test "$cf_cv_enable_rpath" = yes ; then
6308                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6309                 fi
6310
6311         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6312         if test "$cf_cv_shlib_version" = rel; then
6313                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6314         else
6315                 cf_cv_shared_soname='`basename $@`'
6316         fi
6317
6318                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6319                 ;;
6320         (mingw*msvc*)
6321                 cf_cv_shlib_version=msvcdll
6322                 cf_cv_shlib_version_infix=msvcdll
6323                 shlibdir=$bindir
6324                 MAKE_DLLS=
6325                 if test "$DFT_LWR_MODEL" = "shared" ; then
6326                         LOCAL_LDFLAGS="-link -dll"
6327                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6328                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6329                 fi
6330                 CC_SHARED_OPTS=
6331                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6332                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6333                 cat >mk_shared_lib.sh <<-CF_EOF
6334                 #!$SHELL
6335                 SHARED_LIB=\$1
6336                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6337                 shift
6338                 my_ld=\$1
6339                 shift
6340                 cat <<-EOF
6341                 Linking shared library
6342                 ** SHARED LIB \$SHARED_LIB
6343                 ** IMPORT_LIB \$IMPORT_LIB
6344 EOF
6345                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6346                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6347                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6348 CF_EOF
6349                 chmod +x mk_shared_lib.sh
6350                 cat >mk_prog.sh <<-CF_EOF
6351                 #!$SHELL
6352                 shift
6353                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6354                 LD="$LD"
6355                 clopts=()
6356                 ldopts=("/subsystem:console")
6357                 libs=()
6358                 isdll=0
6359                 while test \$# -gt 0; do
6360                         case "\$1" in
6361                                 -link)
6362                                         # ignore -link argument
6363                                         ;;
6364                                 -M[TD] | -M[TD]d)
6365                                         # ignore runtime-library option
6366                                         ;;
6367                                 -dll)
6368                                         isdll=1
6369                                         ;;
6370                                 -W* | -w*)
6371                                         # ignore warnings
6372                                         ;;
6373                                 -D*)
6374                                         clopts+=("\$1")
6375                                         ;;
6376                                 -I*)
6377                                         clopts+=("\$1")
6378                                         ;;
6379                                 -l*)
6380                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6381                                         ;;
6382                                 -L*)
6383                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6384                                         ;;
6385                                 *.obj | *.o)
6386                                         ldopts+=("\$1")
6387                                         ;;
6388                                 -Wl,*)
6389                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6390                                                 ldopts+=("\${linkarg}")
6391                                         done
6392                                         ;;
6393                                 *.lib)
6394                                         ldopts+=("\$1")
6395                                         ;;
6396                                 -o)
6397                                         shift
6398                                         ldopts+=("-out:\$1")
6399                                         ;;
6400                                 *)
6401                                         clopts+=("\$1")
6402                                         ldopts+=("\$1")
6403                                         ;;
6404                         esac
6405                         shift
6406                 done
6407                 if [ "\$isdll" -ne 0 ]; then
6408                         for lib in \${libs[*]}; do
6409                                 ldopts+=("\$lib.dll.lib")
6410                         done
6411                 else
6412                         for lib in \${libs[*]}; do
6413                                 ldopts+=("\$lib.lib")
6414                         done
6415                 fi
6416                 cat <<-EOF
6417                 Creating program
6418                 ** ld options:   "\${ldopts[@]}"
6419 EOF
6420                 exec \$LD \${ldopts[@]}
6421 CF_EOF
6422                 chmod +x mk_prog.sh
6423                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6424                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6425                 ;;
6426         (mingw*)
6427                 cf_cv_shlib_version=mingw
6428                 cf_cv_shlib_version_infix=mingw
6429                 shlibdir=$bindir
6430                 MAKE_DLLS=
6431                 if test "$DFT_LWR_MODEL" = "shared" ; then
6432                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6433                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6434                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6435                 fi
6436                 CC_SHARED_OPTS=
6437                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6438                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6439                 cat >mk_shared_lib.sh <<-CF_EOF
6440                 #!$SHELL
6441                 SHARED_LIB=\$1
6442                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6443                 shift
6444                 cat <<-EOF
6445                 Linking shared library
6446                 ** SHARED_LIB \$SHARED_LIB
6447                 ** IMPORT_LIB \$IMPORT_LIB
6448 EOF
6449                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6450 CF_EOF
6451                 chmod +x mk_shared_lib.sh
6452                 ;;
6453         (openbsd[2-9].*|mirbsd*)
6454                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6455                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6456                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6457                 fi
6458                 if test "$cf_cv_enable_rpath" = yes ; then
6459                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6460                 fi
6461                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6462
6463         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6464         if test "$cf_cv_shlib_version" = rel; then
6465                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6466         else
6467                 cf_cv_shared_soname='`basename $@`'
6468         fi
6469
6470                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6471                 ;;
6472         (nskJ*)
6473                 CC_SHARED_OPTS=
6474                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6475                 ;;
6476         (nskL*)
6477                 CC_SHARED_OPTS=
6478                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6479                 ;;
6480         (nto-qnx*|openbsd*|freebsd[12].*)
6481                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6482                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6483                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6484                 ;;
6485         (dragonfly*|freebsd*)
6486                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6487                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6488                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6489                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6490                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6491                 fi
6492
6493         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6494         if test "$cf_cv_shlib_version" = rel; then
6495                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6496         else
6497                 cf_cv_shared_soname='`basename $@`'
6498         fi
6499
6500                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6501                 ;;
6502         (netbsd*)
6503                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6504                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6505                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6506                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6507                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6508                         if test "$cf_cv_shlib_version" = auto; then
6509                         if test -f /usr/libexec/ld.elf_so; then
6510                                 cf_cv_shlib_version=abi
6511                         else
6512                                 cf_cv_shlib_version=rel
6513                         fi
6514                         fi
6515
6516         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6517         if test "$cf_cv_shlib_version" = rel; then
6518                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6519         else
6520                 cf_cv_shared_soname='`basename $@`'
6521         fi
6522
6523                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6524                 else
6525                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6526                 fi
6527                 ;;
6528         (osf*|mls+*)
6529                 # tested with OSF/1 V3.2 and 'cc'
6530                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6531                 # link with shared libs).
6532                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6533                 case "$host_os" in
6534                 (osf4*)
6535                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6536                         ;;
6537                 esac
6538                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6539                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6540                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6541                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6542                 fi
6543                 cf_cv_rm_so_locs=yes
6544                 ;;
6545         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6546                 # tested with osr5.0.5
6547                 if test "$GCC" != yes; then
6548                         CC_SHARED_OPTS='-belf -KPIC'
6549                 fi
6550                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6551                 if test "$cf_cv_enable_rpath" = yes ; then
6552                         # only way is to set LD_RUN_PATH but no switch for it
6553                         RUN_PATH=$libdir
6554                 fi
6555                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6556                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6557                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6558                 ;;
6559         (sunos4*)
6560                 # tested with SunOS 4.1.1 and gcc 2.7.0
6561                 if test "$GCC" != yes; then
6562                         CC_SHARED_OPTS='-KPIC'
6563                 fi
6564                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6565                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6566                 ;;
6567         (solaris2*)
6568                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6569                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6570                 if test "$DFT_LWR_MODEL" = "shared" ; then
6571                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6572                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6573                 fi
6574                 if test "$cf_cv_enable_rpath" = yes ; then
6575                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6576                 fi
6577
6578         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6579         if test "$cf_cv_shlib_version" = rel; then
6580                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6581         else
6582                 cf_cv_shared_soname='`basename $@`'
6583         fi
6584
6585                 if test "$GCC" != yes; then
6586                         cf_save_CFLAGS="$CFLAGS"
6587                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6588                         do
6589                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6590                                 cat >"conftest.$ac_ext" <<_ACEOF
6591 #line 6591 "configure"
6592 #include "confdefs.h"
6593 #include <stdio.h>
6594 int
6595 main (void)
6596 {
6597 printf("Hello\\n");
6598   ;
6599   return 0;
6600 }
6601 _ACEOF
6602 rm -f "conftest.$ac_objext"
6603 if { (eval echo "$as_me:6603: \"$ac_compile\"") >&5
6604   (eval $ac_compile) 2>&5
6605   ac_status=$?
6606   echo "$as_me:6606: \$? = $ac_status" >&5
6607   (exit "$ac_status"); } &&
6608          { ac_try='test -s "conftest.$ac_objext"'
6609   { (eval echo "$as_me:6609: \"$ac_try\"") >&5
6610   (eval $ac_try) 2>&5
6611   ac_status=$?
6612   echo "$as_me:6612: \$? = $ac_status" >&5
6613   (exit "$ac_status"); }; }; then
6614   break
6615 else
6616   echo "$as_me: failed program was:" >&5
6617 cat "conftest.$ac_ext" >&5
6618 fi
6619 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6620                         done
6621                         CFLAGS="$cf_save_CFLAGS"
6622                         CC_SHARED_OPTS=$cf_shared_opts
6623                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6624                 else
6625                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6626                 fi
6627                 ;;
6628         (sysv5uw7*|unix_sv*)
6629                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6630                 if test "$GCC" != yes; then
6631                         CC_SHARED_OPTS='-KPIC'
6632                 fi
6633                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6634                 ;;
6635         (*)
6636                 CC_SHARED_OPTS='unknown'
6637                 MK_SHARED_LIB='echo unknown'
6638                 ;;
6639         esac
6640
6641         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6642         case "$cf_cv_shlib_version" in
6643         (rel|abi)
6644                 case "$MK_SHARED_LIB" in
6645                 (*'-o $@')
6646                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6647                         ;;
6648                 (*)
6649                         { echo "$as_me:6649: WARNING: ignored --with-shlib-version" >&5
6650 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6651                         ;;
6652                 esac
6653                 ;;
6654         esac
6655
6656         if test -n "$cf_try_cflags"
6657         then
6658 cat > conftest.$ac_ext <<EOF
6659 #line 6659 "${as_me:-configure}"
6660 #include <stdio.h>
6661 int main(int argc, char *argv[])
6662 {
6663         printf("hello\\n");
6664         return (argv[argc-1] == 0) ;
6665 }
6666 EOF
6667                 cf_save_CFLAGS="$CFLAGS"
6668                 for cf_opt in $cf_try_cflags
6669                 do
6670                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6671                         echo "$as_me:6671: checking if CFLAGS option -$cf_opt works" >&5
6672 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6673                         if { (eval echo "$as_me:6673: \"$ac_compile\"") >&5
6674   (eval $ac_compile) 2>&5
6675   ac_status=$?
6676   echo "$as_me:6676: \$? = $ac_status" >&5
6677   (exit "$ac_status"); }; then
6678                                 echo "$as_me:6678: result: yes" >&5
6679 echo "${ECHO_T}yes" >&6
6680                                 cf_save_CFLAGS="$CFLAGS"
6681                         else
6682                                 echo "$as_me:6682: result: no" >&5
6683 echo "${ECHO_T}no" >&6
6684                         fi
6685                 done
6686                 CFLAGS="$cf_save_CFLAGS"
6687         fi
6688
6689         # RPATH_LIST is a colon-separated list of directories
6690         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6691         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6692
6693         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6694
6695         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6696
6697 echo "${as_me:-configure}:6697: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6698
6699         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6700
6701 echo "${as_me:-configure}:6701: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6702
6703 for model in $cf_list_models ; do
6704         case "$model" in
6705         (libtool)
6706
6707 echo "$as_me:6707: checking for additional libtool options" >&5
6708 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6709
6710 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6711 if test "${with_libtool_opts+set}" = set; then
6712   withval="$with_libtool_opts"
6713   with_libtool_opts=$withval
6714 else
6715   with_libtool_opts=no
6716 fi;
6717 echo "$as_me:6717: result: $with_libtool_opts" >&5
6718 echo "${ECHO_T}$with_libtool_opts" >&6
6719
6720 case .$with_libtool_opts in
6721 (.yes|.no|.)
6722         ;;
6723 (*)
6724         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6725         ;;
6726 esac
6727
6728 echo "$as_me:6728: checking if exported-symbols file should be used" >&5
6729 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6730
6731 # Check whether --with-export-syms or --without-export-syms was given.
6732 if test "${with_export_syms+set}" = set; then
6733   withval="$with_export_syms"
6734   with_export_syms=$withval
6735 else
6736   with_export_syms=no
6737 fi;
6738 if test "x$with_export_syms" = xyes
6739 then
6740         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6741
6742 fi
6743 echo "$as_me:6743: result: $with_export_syms" >&5
6744 echo "${ECHO_T}$with_export_syms" >&6
6745 if test "x$with_export_syms" != xno
6746 then
6747         EXPORT_SYMS="-export-symbols $with_export_syms"
6748
6749 fi
6750
6751                 ;;
6752         (shared)
6753                 if test "$CC_SHARED_OPTS" = "unknown"; then
6754                         { { echo "$as_me:6754: error: Shared libraries are not supported in this version" >&5
6755 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6756    { (exit 1); exit 1; }; }
6757                 fi
6758                 # workaround for inept transition to PIE vs PIC...
6759                 echo "$as_me:6759: checking if current CFLAGS link properly" >&5
6760 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6761                 cat >"conftest.$ac_ext" <<_ACEOF
6762 #line 6762 "configure"
6763 #include "confdefs.h"
6764 #include <stdio.h>
6765 int
6766 main (void)
6767 {
6768 printf("Hello work\\n");
6769   ;
6770   return 0;
6771 }
6772 _ACEOF
6773 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6774 if { (eval echo "$as_me:6774: \"$ac_link\"") >&5
6775   (eval $ac_link) 2>&5
6776   ac_status=$?
6777   echo "$as_me:6777: \$? = $ac_status" >&5
6778   (exit "$ac_status"); } &&
6779          { ac_try='test -s "conftest$ac_exeext"'
6780   { (eval echo "$as_me:6780: \"$ac_try\"") >&5
6781   (eval $ac_try) 2>&5
6782   ac_status=$?
6783   echo "$as_me:6783: \$? = $ac_status" >&5
6784   (exit "$ac_status"); }; }; then
6785   cf_cflags_work=yes
6786 else
6787   echo "$as_me: failed program was:" >&5
6788 cat "conftest.$ac_ext" >&5
6789 cf_cflags_work=no
6790 fi
6791 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6792                 echo "$as_me:6792: result: $cf_cflags_work" >&5
6793 echo "${ECHO_T}$cf_cflags_work" >&6
6794                 if test "$cf_cflags_work" = no
6795                 then
6796                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6797
6798 echo "${as_me:-configure}:6798: testing try to work around by appending shared-options ..." 1>&5
6799
6800                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6801                 fi
6802
6803 echo "$as_me:6803: checking if versioned-symbols file should be used" >&5
6804 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6805
6806 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6807 if test "${with_versioned_syms+set}" = set; then
6808   withval="$with_versioned_syms"
6809   with_versioned_syms=$withval
6810 else
6811   with_versioned_syms=no
6812 fi;
6813 case "x$with_versioned_syms" in
6814 (xyes)
6815         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6816
6817         ;;
6818 (xno)
6819         ;;
6820 (x/*)
6821         test -f "$with_versioned_syms" || { { echo "$as_me:6821: error: expected a filename: $with_versioned_syms" >&5
6822 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6823    { (exit 1); exit 1; }; }
6824         ;;
6825 (*)
6826         test -f "$with_versioned_syms" || { { echo "$as_me:6826: error: expected a filename: $with_versioned_syms" >&5
6827 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6828    { (exit 1); exit 1; }; }
6829         with_versioned_syms=`pwd`/"$with_versioned_syms"
6830         ;;
6831 esac
6832 echo "$as_me:6832: result: $with_versioned_syms" >&5
6833 echo "${ECHO_T}$with_versioned_syms" >&6
6834
6835 RESULTING_SYMS=
6836 VERSIONED_SYMS=
6837 WILDCARD_SYMS=
6838
6839 if test "x$with_versioned_syms" != xno
6840 then
6841         RESULTING_SYMS=$with_versioned_syms
6842         case "x$MK_SHARED_LIB" in
6843         (*-Wl,*)
6844                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6845                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6846                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6847
6848 echo "${as_me:-configure}:6848: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6849
6850                 ;;
6851         (*-dy\ *)
6852                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6853                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6854                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6855
6856 echo "${as_me:-configure}:6856: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6857
6858                 ;;
6859         (*)
6860                 { echo "$as_me:6860: WARNING: this system does not support versioned-symbols" >&5
6861 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6862                 ;;
6863         esac
6864
6865         # Linux ld can selectively override scope, e.g., of symbols beginning with
6866         # "_" by first declaring some as global, and then using a wildcard to
6867         # declare the others as local.  Some other loaders cannot do this.  Check
6868         # by constructing a (very) simple shared library and inspecting its
6869         # symbols.
6870         if test "x$VERSIONED_SYMS" != "x"
6871         then
6872                 echo "$as_me:6872: checking if wildcards can be used to selectively omit symbols" >&5
6873 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6874                 WILDCARD_SYMS=no
6875
6876                 # make sources
6877                 rm -f conftest.*
6878
6879                 cat >conftest.ver <<EOF
6880 module_1.0 {
6881 global:
6882         globalf1;
6883 local:
6884         localf1;
6885 };
6886 module_2.0 {
6887 global:
6888         globalf2;
6889 local:
6890         localf2;
6891         _*;
6892 } module_1.0;
6893 submodule_1.0 {
6894 global:
6895         subglobalf1;
6896         _ismissing;
6897 local:
6898         sublocalf1;
6899 };
6900 submodule_2.0 {
6901 global:
6902         subglobalf2;
6903 local:
6904         sublocalf2;
6905         _*;
6906 } submodule_1.0;
6907 EOF
6908                 cat >conftest.$ac_ext <<EOF
6909 #line 6909 "configure"
6910 int     _ismissing(void) { return 1; }
6911 int     _localf1(void) { return 1; }
6912 int     _localf2(void) { return 2; }
6913 int     globalf1(void) { return 1; }
6914 int     globalf2(void) { return 2; }
6915 int     _sublocalf1(void) { return 1; }
6916 int     _sublocalf2(void) { return 2; }
6917 int     subglobalf1(void) { return 1; }
6918 int     subglobalf2(void) { return 2; }
6919 EOF
6920                 cat >conftest.mk <<EOF
6921 CC=${CC}
6922 CFLAGS=${CFLAGS}
6923 CPPFLAGS=${CPPFLAGS}
6924 LDFLAGS=${LDFLAGS}
6925 LIBS=${LIBS}
6926 VERSIONED_SYMS=${VERSIONED_SYMS}
6927 RESULTING_SYMS=conftest.ver
6928 MK_SHARED_LIB=${MK_SHARED_LIB}
6929 conftest.so: conftest.$ac_cv_objext
6930                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6931 EOF
6932
6933                 # compile source, make library
6934                 if make -f conftest.mk 2>&5 >/dev/null
6935                 then
6936                         # test for missing symbol in either Data or Text section
6937                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6938                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6939                 fi
6940                 echo "$as_me:6940: result: $WILDCARD_SYMS" >&5
6941 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6942                 rm -f conftest.*
6943         fi
6944 fi
6945
6946                 ;;
6947         esac
6948 done
6949
6950 ### Checks for special libraries, must be done up-front.
6951 SHLIB_LIST=""
6952
6953 echo "$as_me:6953: checking if you want to link with the GPM mouse library" >&5
6954 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6955
6956 # Check whether --with-gpm or --without-gpm was given.
6957 if test "${with_gpm+set}" = set; then
6958   withval="$with_gpm"
6959   with_gpm=$withval
6960 else
6961   with_gpm=maybe
6962 fi;
6963 echo "$as_me:6963: result: $with_gpm" >&5
6964 echo "${ECHO_T}$with_gpm" >&6
6965
6966 if test "$with_gpm" != no ; then
6967         echo "$as_me:6967: checking for gpm.h" >&5
6968 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6969 if test "${ac_cv_header_gpm_h+set}" = set; then
6970   echo $ECHO_N "(cached) $ECHO_C" >&6
6971 else
6972   cat >"conftest.$ac_ext" <<_ACEOF
6973 #line 6973 "configure"
6974 #include "confdefs.h"
6975 #include <gpm.h>
6976 _ACEOF
6977 if { (eval echo "$as_me:6977: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6978   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6979   ac_status=$?
6980   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6981   rm -f conftest.er1
6982   cat conftest.err >&5
6983   echo "$as_me:6983: \$? = $ac_status" >&5
6984   (exit "$ac_status"); } >/dev/null; then
6985   if test -s conftest.err; then
6986     ac_cpp_err=$ac_c_preproc_warn_flag
6987   else
6988     ac_cpp_err=
6989   fi
6990 else
6991   ac_cpp_err=yes
6992 fi
6993 if test -z "$ac_cpp_err"; then
6994   ac_cv_header_gpm_h=yes
6995 else
6996   echo "$as_me: failed program was:" >&5
6997   cat "conftest.$ac_ext" >&5
6998   ac_cv_header_gpm_h=no
6999 fi
7000 rm -f conftest.err "conftest.$ac_ext"
7001 fi
7002 echo "$as_me:7002: result: $ac_cv_header_gpm_h" >&5
7003 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7004 if test "$ac_cv_header_gpm_h" = yes; then
7005
7006 cat >>confdefs.h <<\EOF
7007 #define HAVE_GPM_H 1
7008 EOF
7009
7010                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7011                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7012
7013 echo "${as_me:-configure}:7013: testing assuming we really have GPM library ..." 1>&5
7014
7015 cat >>confdefs.h <<\EOF
7016 #define HAVE_LIBGPM 1
7017 EOF
7018
7019                         with_gpm=yes
7020                 else
7021                         echo "$as_me:7021: checking for Gpm_Open in -lgpm" >&5
7022 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7023 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7024   echo $ECHO_N "(cached) $ECHO_C" >&6
7025 else
7026   ac_check_lib_save_LIBS=$LIBS
7027 LIBS="-lgpm  $LIBS"
7028 cat >"conftest.$ac_ext" <<_ACEOF
7029 #line 7029 "configure"
7030 #include "confdefs.h"
7031
7032 /* Override any gcc2 internal prototype to avoid an error.  */
7033 #ifdef __cplusplus
7034 extern "C"
7035 #endif
7036 /* We use char because int might match the return type of a gcc2
7037    builtin and then its argument prototype would still apply.  */
7038 char Gpm_Open ();
7039 int
7040 main (void)
7041 {
7042 Gpm_Open ();
7043   ;
7044   return 0;
7045 }
7046 _ACEOF
7047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7048 if { (eval echo "$as_me:7048: \"$ac_link\"") >&5
7049   (eval $ac_link) 2>&5
7050   ac_status=$?
7051   echo "$as_me:7051: \$? = $ac_status" >&5
7052   (exit "$ac_status"); } &&
7053          { ac_try='test -s "conftest$ac_exeext"'
7054   { (eval echo "$as_me:7054: \"$ac_try\"") >&5
7055   (eval $ac_try) 2>&5
7056   ac_status=$?
7057   echo "$as_me:7057: \$? = $ac_status" >&5
7058   (exit "$ac_status"); }; }; then
7059   ac_cv_lib_gpm_Gpm_Open=yes
7060 else
7061   echo "$as_me: failed program was:" >&5
7062 cat "conftest.$ac_ext" >&5
7063 ac_cv_lib_gpm_Gpm_Open=no
7064 fi
7065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7066 LIBS=$ac_check_lib_save_LIBS
7067 fi
7068 echo "$as_me:7068: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7069 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7070 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7071   with_gpm=yes
7072 else
7073
7074                                 if test "$with_gpm" = maybe; then
7075                                         { echo "$as_me:7075: WARNING: Cannot link with GPM library" >&5
7076 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7077                                         with_gpm=no
7078                                 else
7079                                         { { echo "$as_me:7079: error: Cannot link with GPM library" >&5
7080 echo "$as_me: error: Cannot link with GPM library" >&2;}
7081    { (exit 1); exit 1; }; }
7082                                 fi
7083
7084 fi
7085
7086                 fi
7087
7088 else
7089
7090                 test "$with_gpm" != maybe && { echo "$as_me:7090: WARNING: Cannot find GPM header" >&5
7091 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7092                 with_gpm=no
7093
7094 fi
7095
7096 fi
7097
7098 if test "$with_gpm" != no ; then
7099         echo "$as_me:7099: checking if you want to load GPM dynamically" >&5
7100 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7101
7102 # Check whether --with-dlsym or --without-dlsym was given.
7103 if test "${with_dlsym+set}" = set; then
7104   withval="$with_dlsym"
7105   with_dlsym=$withval
7106 else
7107   with_dlsym=yes
7108 fi;
7109         echo "$as_me:7109: result: $with_dlsym" >&5
7110 echo "${ECHO_T}$with_dlsym" >&6
7111         if test "x$with_dlsym" = xyes ; then
7112
7113 cf_have_dlsym=no
7114 echo "$as_me:7114: checking for dlsym" >&5
7115 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7116 if test "${ac_cv_func_dlsym+set}" = set; then
7117   echo $ECHO_N "(cached) $ECHO_C" >&6
7118 else
7119   cat >"conftest.$ac_ext" <<_ACEOF
7120 #line 7120 "configure"
7121 #include "confdefs.h"
7122 #define dlsym autoconf_temporary
7123 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7124 #undef dlsym
7125
7126 #ifdef __cplusplus
7127 extern "C"
7128 #endif
7129
7130 /* We use char because int might match the return type of a gcc2
7131    builtin and then its argument prototype would still apply.  */
7132 char dlsym (void);
7133
7134 int
7135 main (void)
7136 {
7137
7138 /* The GNU C library defines stubs for functions which it implements
7139     to always fail with ENOSYS.  Some functions are actually named
7140     something starting with __ and the normal name is an alias.  */
7141 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7142 #error found stub for dlsym
7143 #endif
7144
7145         return dlsym ();
7146   ;
7147   return 0;
7148 }
7149 _ACEOF
7150 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7151 if { (eval echo "$as_me:7151: \"$ac_link\"") >&5
7152   (eval $ac_link) 2>&5
7153   ac_status=$?
7154   echo "$as_me:7154: \$? = $ac_status" >&5
7155   (exit "$ac_status"); } &&
7156          { ac_try='test -s "conftest$ac_exeext"'
7157   { (eval echo "$as_me:7157: \"$ac_try\"") >&5
7158   (eval $ac_try) 2>&5
7159   ac_status=$?
7160   echo "$as_me:7160: \$? = $ac_status" >&5
7161   (exit "$ac_status"); }; }; then
7162   ac_cv_func_dlsym=yes
7163 else
7164   echo "$as_me: failed program was:" >&5
7165 cat "conftest.$ac_ext" >&5
7166 ac_cv_func_dlsym=no
7167 fi
7168 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7169 fi
7170 echo "$as_me:7170: result: $ac_cv_func_dlsym" >&5
7171 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7172 if test "$ac_cv_func_dlsym" = yes; then
7173   cf_have_dlsym=yes
7174 else
7175
7176 cf_have_libdl=no
7177 echo "$as_me:7177: checking for dlsym in -ldl" >&5
7178 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7179 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7180   echo $ECHO_N "(cached) $ECHO_C" >&6
7181 else
7182   ac_check_lib_save_LIBS=$LIBS
7183 LIBS="-ldl  $LIBS"
7184 cat >"conftest.$ac_ext" <<_ACEOF
7185 #line 7185 "configure"
7186 #include "confdefs.h"
7187
7188 /* Override any gcc2 internal prototype to avoid an error.  */
7189 #ifdef __cplusplus
7190 extern "C"
7191 #endif
7192 /* We use char because int might match the return type of a gcc2
7193    builtin and then its argument prototype would still apply.  */
7194 char dlsym ();
7195 int
7196 main (void)
7197 {
7198 dlsym ();
7199   ;
7200   return 0;
7201 }
7202 _ACEOF
7203 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7204 if { (eval echo "$as_me:7204: \"$ac_link\"") >&5
7205   (eval $ac_link) 2>&5
7206   ac_status=$?
7207   echo "$as_me:7207: \$? = $ac_status" >&5
7208   (exit "$ac_status"); } &&
7209          { ac_try='test -s "conftest$ac_exeext"'
7210   { (eval echo "$as_me:7210: \"$ac_try\"") >&5
7211   (eval $ac_try) 2>&5
7212   ac_status=$?
7213   echo "$as_me:7213: \$? = $ac_status" >&5
7214   (exit "$ac_status"); }; }; then
7215   ac_cv_lib_dl_dlsym=yes
7216 else
7217   echo "$as_me: failed program was:" >&5
7218 cat "conftest.$ac_ext" >&5
7219 ac_cv_lib_dl_dlsym=no
7220 fi
7221 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7222 LIBS=$ac_check_lib_save_LIBS
7223 fi
7224 echo "$as_me:7224: result: $ac_cv_lib_dl_dlsym" >&5
7225 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7226 if test "$ac_cv_lib_dl_dlsym" = yes; then
7227
7228         cf_have_dlsym=yes
7229         cf_have_libdl=yes
7230 fi
7231
7232 fi
7233
7234 if test "$cf_have_dlsym" = yes ; then
7235         test "$cf_have_libdl" = yes && {
7236 cf_add_libs="$LIBS"
7237 # reverse order
7238 cf_add_0lib=
7239 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7240 # filter duplicates
7241 for cf_add_1lib in $cf_add_0lib; do
7242         for cf_add_2lib in $cf_add_libs; do
7243                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7244                         cf_add_1lib=
7245                         break
7246                 fi
7247         done
7248         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7249 done
7250 LIBS="$cf_add_libs"
7251  }
7252
7253         echo "$as_me:7253: checking whether able to link to dl*() functions" >&5
7254 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7255         cat >"conftest.$ac_ext" <<_ACEOF
7256 #line 7256 "configure"
7257 #include "confdefs.h"
7258 #include <dlfcn.h>
7259 int
7260 main (void)
7261 {
7262
7263                 void *obj;
7264                 if ((obj = dlopen("filename", 0)) != 0) {
7265                         if (dlsym(obj, "symbolname") == 0) {
7266                         dlclose(obj);
7267                         }
7268                 }
7269   ;
7270   return 0;
7271 }
7272 _ACEOF
7273 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7274 if { (eval echo "$as_me:7274: \"$ac_link\"") >&5
7275   (eval $ac_link) 2>&5
7276   ac_status=$?
7277   echo "$as_me:7277: \$? = $ac_status" >&5
7278   (exit "$ac_status"); } &&
7279          { ac_try='test -s "conftest$ac_exeext"'
7280   { (eval echo "$as_me:7280: \"$ac_try\"") >&5
7281   (eval $ac_try) 2>&5
7282   ac_status=$?
7283   echo "$as_me:7283: \$? = $ac_status" >&5
7284   (exit "$ac_status"); }; }; then
7285
7286 cat >>confdefs.h <<\EOF
7287 #define HAVE_LIBDL 1
7288 EOF
7289
7290 else
7291   echo "$as_me: failed program was:" >&5
7292 cat "conftest.$ac_ext" >&5
7293
7294                 { { echo "$as_me:7294: error: Cannot link test program for libdl" >&5
7295 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7296    { (exit 1); exit 1; }; }
7297 fi
7298 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7299         echo "$as_me:7299: result: ok" >&5
7300 echo "${ECHO_T}ok" >&6
7301 else
7302         { { echo "$as_me:7302: error: Cannot find dlsym function" >&5
7303 echo "$as_me: error: Cannot find dlsym function" >&2;}
7304    { (exit 1); exit 1; }; }
7305 fi
7306
7307                 if test "x$with_gpm" != xyes ; then
7308                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7309
7310 echo "${as_me:-configure}:7310: testing assuming soname for gpm is $with_gpm ..." 1>&5
7311
7312                         cf_cv_gpm_soname="$with_gpm"
7313                 else
7314
7315 echo "$as_me:7315: checking for soname of gpm library" >&5
7316 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7317 if test "${cf_cv_gpm_soname+set}" = set; then
7318   echo $ECHO_N "(cached) $ECHO_C" >&6
7319 else
7320
7321 cf_cv_gpm_soname=unknown
7322 if test "$cross_compiling" != yes ; then
7323 cat >conftest.$ac_ext <<CF_EOF
7324 #include <gpm.h>
7325 int main(void)
7326 {
7327 if (Gpm_Open(0,0)) Gpm_Close();
7328         ${cf_cv_main_return:-return}(0);
7329 }
7330 CF_EOF
7331 cf_save_LIBS="$LIBS"
7332
7333 cf_add_libs="$LIBS"
7334 # reverse order
7335 cf_add_0lib=
7336 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7337 # filter duplicates
7338 for cf_add_1lib in $cf_add_0lib; do
7339         for cf_add_2lib in $cf_add_libs; do
7340                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7341                         cf_add_1lib=
7342                         break
7343                 fi
7344         done
7345         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7346 done
7347 LIBS="$cf_add_libs"
7348
7349         if { (eval echo "$as_me:7349: \"$ac_compile\"") >&5
7350   (eval $ac_compile) 2>&5
7351   ac_status=$?
7352   echo "$as_me:7352: \$? = $ac_status" >&5
7353   (exit "$ac_status"); } ; then
7354                 if { (eval echo "$as_me:7354: \"$ac_link\"") >&5
7355   (eval $ac_link) 2>&5
7356   ac_status=$?
7357   echo "$as_me:7357: \$? = $ac_status" >&5
7358   (exit "$ac_status"); } ; then
7359                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7360                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7361                 fi
7362         fi
7363 rm -rf ./conftest*
7364 LIBS="$cf_save_LIBS"
7365 fi
7366
7367 fi
7368 echo "$as_me:7368: result: $cf_cv_gpm_soname" >&5
7369 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7370
7371                 fi
7372                 test "$cf_cv_gpm_soname" != "unknown" &&
7373 cat >>confdefs.h <<EOF
7374 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7375 EOF
7376
7377                 SHLIB_LIST="-ldl $SHLIB_LIST"
7378
7379 cf_add_libs="$PRIVATE_LIBS"
7380 # reverse order
7381 cf_add_0lib=
7382 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7383 # filter duplicates
7384 for cf_add_1lib in $cf_add_0lib; do
7385         for cf_add_2lib in $cf_add_libs; do
7386                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7387                         cf_add_1lib=
7388                         break
7389                 fi
7390         done
7391         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7392 done
7393 PRIVATE_LIBS="$cf_add_libs"
7394
7395         else
7396                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7397
7398 cf_add_libs="$TEST_LIBS"
7399 # reverse order
7400 cf_add_0lib=
7401 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7402 # filter duplicates
7403 for cf_add_1lib in $cf_add_0lib; do
7404         for cf_add_2lib in $cf_add_libs; do
7405                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7406                         cf_add_1lib=
7407                         break
7408                 fi
7409         done
7410         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7411 done
7412 TEST_LIBS="$cf_add_libs"
7413
7414 cf_add_libs="$PRIVATE_LIBS"
7415 # reverse order
7416 cf_add_0lib=
7417 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7418 # filter duplicates
7419 for cf_add_1lib in $cf_add_0lib; do
7420         for cf_add_2lib in $cf_add_libs; do
7421                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7422                         cf_add_1lib=
7423                         break
7424                 fi
7425         done
7426         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7427 done
7428 PRIVATE_LIBS="$cf_add_libs"
7429
7430         fi
7431
7432 cat >>confdefs.h <<\EOF
7433 #define HAVE_LIBGPM 1
7434 EOF
7435
7436 echo "$as_me:7436: checking for Gpm_Wgetch in -lgpm" >&5
7437 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7438 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7439   echo $ECHO_N "(cached) $ECHO_C" >&6
7440 else
7441   ac_check_lib_save_LIBS=$LIBS
7442 LIBS="-lgpm  $LIBS"
7443 cat >"conftest.$ac_ext" <<_ACEOF
7444 #line 7444 "configure"
7445 #include "confdefs.h"
7446
7447 /* Override any gcc2 internal prototype to avoid an error.  */
7448 #ifdef __cplusplus
7449 extern "C"
7450 #endif
7451 /* We use char because int might match the return type of a gcc2
7452    builtin and then its argument prototype would still apply.  */
7453 char Gpm_Wgetch ();
7454 int
7455 main (void)
7456 {
7457 Gpm_Wgetch ();
7458   ;
7459   return 0;
7460 }
7461 _ACEOF
7462 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7463 if { (eval echo "$as_me:7463: \"$ac_link\"") >&5
7464   (eval $ac_link) 2>&5
7465   ac_status=$?
7466   echo "$as_me:7466: \$? = $ac_status" >&5
7467   (exit "$ac_status"); } &&
7468          { ac_try='test -s "conftest$ac_exeext"'
7469   { (eval echo "$as_me:7469: \"$ac_try\"") >&5
7470   (eval $ac_try) 2>&5
7471   ac_status=$?
7472   echo "$as_me:7472: \$? = $ac_status" >&5
7473   (exit "$ac_status"); }; }; then
7474   ac_cv_lib_gpm_Gpm_Wgetch=yes
7475 else
7476   echo "$as_me: failed program was:" >&5
7477 cat "conftest.$ac_ext" >&5
7478 ac_cv_lib_gpm_Gpm_Wgetch=no
7479 fi
7480 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7481 LIBS=$ac_check_lib_save_LIBS
7482 fi
7483 echo "$as_me:7483: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7484 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7485 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7486
7487 echo "$as_me:7487: checking if GPM is weakly bound to curses library" >&5
7488 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7489 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7490   echo $ECHO_N "(cached) $ECHO_C" >&6
7491 else
7492
7493 cf_cv_check_gpm_wgetch=unknown
7494 if test "$cross_compiling" != yes ; then
7495
7496 cat >conftest.$ac_ext <<CF_EOF
7497 #include <gpm.h>
7498 int main(void)
7499 {
7500         Gpm_Wgetch();
7501         ${cf_cv_main_return:-return}(0);
7502 }
7503 CF_EOF
7504
7505         cf_save_LIBS="$LIBS"
7506         # This only works if we can look at the symbol table.  If a shared
7507         # library is stripped for install, we cannot use that.  So we're forced
7508         # to rely on the static library, noting that some packagers may not
7509         # include it.
7510         LIBS="-static -lgpm -dynamic $LIBS"
7511         if { (eval echo "$as_me:7511: \"$ac_compile\"") >&5
7512   (eval $ac_compile) 2>&5
7513   ac_status=$?
7514   echo "$as_me:7514: \$? = $ac_status" >&5
7515   (exit "$ac_status"); } ; then
7516                 if { (eval echo "$as_me:7516: \"$ac_link\"") >&5
7517   (eval $ac_link) 2>&5
7518   ac_status=$?
7519   echo "$as_me:7519: \$? = $ac_status" >&5
7520   (exit "$ac_status"); } ; then
7521                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7522                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7523                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7524                 fi
7525         fi
7526         rm -rf ./conftest*
7527         LIBS="$cf_save_LIBS"
7528 fi
7529
7530 fi
7531 echo "$as_me:7531: result: $cf_cv_check_gpm_wgetch" >&5
7532 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7533
7534 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7535         { echo "$as_me:7535: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7536 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7537 fi
7538
7539 fi
7540
7541 fi
7542
7543 echo "$as_me:7543: checking if you want to use PCRE2 for regular-expressions" >&5
7544 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7545
7546 # Check whether --with-pcre2 or --without-pcre2 was given.
7547 if test "${with_pcre2+set}" = set; then
7548   withval="$with_pcre2"
7549
7550 fi;
7551 test -z "$with_pcre2" && with_pcre2=no
7552 echo "$as_me:7552: result: $with_pcre2" >&5
7553 echo "${ECHO_T}$with_pcre2" >&6
7554
7555 if test "x$with_pcre2" != xno ; then
7556         cf_with_pcre2_ok=no
7557         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7558         do
7559
7560 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7561         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7562
7563 echo "${as_me:-configure}:7563: testing found package $cf_with_pcre2 ..." 1>&5
7564
7565         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7566         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7567         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7568
7569 echo "${as_me:-configure}:7569: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7570
7571         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7572
7573 echo "${as_me:-configure}:7573: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7574
7575 cf_fix_cppflags=no
7576 cf_new_cflags=
7577 cf_new_cppflags=
7578 cf_new_extra_cppflags=
7579
7580 for cf_add_cflags in $cf_pkgconfig_incs
7581 do
7582 case "$cf_fix_cppflags" in
7583 (no)
7584         case "$cf_add_cflags" in
7585         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7586                 case "$cf_add_cflags" in
7587                 (-D*)
7588                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7589
7590                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7591                                 && test -z "${cf_tst_cflags}" \
7592                                 && cf_fix_cppflags=yes
7593
7594                         if test "$cf_fix_cppflags" = yes ; then
7595
7596         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7597         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7598
7599                                 continue
7600                         elif test "${cf_tst_cflags}" = "\"'" ; then
7601
7602         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7603         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7604
7605                                 continue
7606                         fi
7607                         ;;
7608                 esac
7609                 case "$CPPFLAGS" in
7610                 (*$cf_add_cflags)
7611                         ;;
7612                 (*)
7613                         case "$cf_add_cflags" in
7614                         (-D*)
7615                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7616
7617 CPPFLAGS=`echo "$CPPFLAGS" | \
7618         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7619                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7620
7621                                 ;;
7622                         esac
7623
7624         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7625         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7626
7627                         ;;
7628                 esac
7629                 ;;
7630         (*)
7631
7632         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7633         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7634
7635                 ;;
7636         esac
7637         ;;
7638 (yes)
7639
7640         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7641         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7642
7643         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7644
7645         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7646                 && test -z "${cf_tst_cflags}" \
7647                 && cf_fix_cppflags=no
7648         ;;
7649 esac
7650 done
7651
7652 if test -n "$cf_new_cflags" ; then
7653
7654         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7655         CFLAGS="${CFLAGS}$cf_new_cflags"
7656
7657 fi
7658
7659 if test -n "$cf_new_cppflags" ; then
7660
7661         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7662         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7663
7664 fi
7665
7666 if test -n "$cf_new_extra_cppflags" ; then
7667
7668         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7669         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7670
7671 fi
7672
7673 cf_add_libs="$LIBS"
7674 # reverse order
7675 cf_add_0lib=
7676 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7677 # filter duplicates
7678 for cf_add_1lib in $cf_add_0lib; do
7679         for cf_add_2lib in $cf_add_libs; do
7680                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7681                         cf_add_1lib=
7682                         break
7683                 fi
7684         done
7685         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7686 done
7687 LIBS="$cf_add_libs"
7688
7689         cf_with_pcre2_ok=yes; break
7690 else
7691         cf_pkgconfig_incs=
7692         cf_pkgconfig_libs=
7693         :
7694 fi
7695
7696         done
7697         cf_with_pcre2_ok=yes || { { echo "$as_me:7697: error: Cannot find PCRE2 library" >&5
7698 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7699    { (exit 1); exit 1; }; }
7700
7701 cat >>confdefs.h <<\EOF
7702 #define HAVE_LIB_PCRE2 1
7703 EOF
7704
7705         # if pkgconfig gave no results, look for the libraries directly
7706         case "$LIBS" in
7707         (*pcre2-posix*|*pcreposix*)
7708                 ;;
7709         (*)
7710                 echo "$as_me:7710: checking for regcomp in -lpcre2-posix" >&5
7711 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7712 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7713   echo $ECHO_N "(cached) $ECHO_C" >&6
7714 else
7715   ac_check_lib_save_LIBS=$LIBS
7716 LIBS="-lpcre2-posix  $LIBS"
7717 cat >"conftest.$ac_ext" <<_ACEOF
7718 #line 7718 "configure"
7719 #include "confdefs.h"
7720
7721 /* Override any gcc2 internal prototype to avoid an error.  */
7722 #ifdef __cplusplus
7723 extern "C"
7724 #endif
7725 /* We use char because int might match the return type of a gcc2
7726    builtin and then its argument prototype would still apply.  */
7727 char regcomp ();
7728 int
7729 main (void)
7730 {
7731 regcomp ();
7732   ;
7733   return 0;
7734 }
7735 _ACEOF
7736 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7737 if { (eval echo "$as_me:7737: \"$ac_link\"") >&5
7738   (eval $ac_link) 2>&5
7739   ac_status=$?
7740   echo "$as_me:7740: \$? = $ac_status" >&5
7741   (exit "$ac_status"); } &&
7742          { ac_try='test -s "conftest$ac_exeext"'
7743   { (eval echo "$as_me:7743: \"$ac_try\"") >&5
7744   (eval $ac_try) 2>&5
7745   ac_status=$?
7746   echo "$as_me:7746: \$? = $ac_status" >&5
7747   (exit "$ac_status"); }; }; then
7748   ac_cv_lib_pcre2_posix_regcomp=yes
7749 else
7750   echo "$as_me: failed program was:" >&5
7751 cat "conftest.$ac_ext" >&5
7752 ac_cv_lib_pcre2_posix_regcomp=no
7753 fi
7754 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7755 LIBS=$ac_check_lib_save_LIBS
7756 fi
7757 echo "$as_me:7757: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7758 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7759 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7760
7761 cf_add_libs="$LIBS"
7762 # reverse order
7763 cf_add_0lib=
7764 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7765 # filter duplicates
7766 for cf_add_1lib in $cf_add_0lib; do
7767         for cf_add_2lib in $cf_add_libs; do
7768                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7769                         cf_add_1lib=
7770                         break
7771                 fi
7772         done
7773         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7774 done
7775 LIBS="$cf_add_libs"
7776
7777 else
7778   echo "$as_me:7778: checking for regcomp in -lpcreposix" >&5
7779 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7780 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7781   echo $ECHO_N "(cached) $ECHO_C" >&6
7782 else
7783   ac_check_lib_save_LIBS=$LIBS
7784 LIBS="-lpcreposix  $LIBS"
7785 cat >"conftest.$ac_ext" <<_ACEOF
7786 #line 7786 "configure"
7787 #include "confdefs.h"
7788
7789 /* Override any gcc2 internal prototype to avoid an error.  */
7790 #ifdef __cplusplus
7791 extern "C"
7792 #endif
7793 /* We use char because int might match the return type of a gcc2
7794    builtin and then its argument prototype would still apply.  */
7795 char regcomp ();
7796 int
7797 main (void)
7798 {
7799 regcomp ();
7800   ;
7801   return 0;
7802 }
7803 _ACEOF
7804 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7805 if { (eval echo "$as_me:7805: \"$ac_link\"") >&5
7806   (eval $ac_link) 2>&5
7807   ac_status=$?
7808   echo "$as_me:7808: \$? = $ac_status" >&5
7809   (exit "$ac_status"); } &&
7810          { ac_try='test -s "conftest$ac_exeext"'
7811   { (eval echo "$as_me:7811: \"$ac_try\"") >&5
7812   (eval $ac_try) 2>&5
7813   ac_status=$?
7814   echo "$as_me:7814: \$? = $ac_status" >&5
7815   (exit "$ac_status"); }; }; then
7816   ac_cv_lib_pcreposix_regcomp=yes
7817 else
7818   echo "$as_me: failed program was:" >&5
7819 cat "conftest.$ac_ext" >&5
7820 ac_cv_lib_pcreposix_regcomp=no
7821 fi
7822 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7823 LIBS=$ac_check_lib_save_LIBS
7824 fi
7825 echo "$as_me:7825: result: $ac_cv_lib_pcreposix_regcomp" >&5
7826 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7827 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7828
7829 cf_add_libs="$LIBS"
7830 # reverse order
7831 cf_add_0lib=
7832 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7833 # filter duplicates
7834 for cf_add_1lib in $cf_add_0lib; do
7835         for cf_add_2lib in $cf_add_libs; do
7836                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7837                         cf_add_1lib=
7838                         break
7839                 fi
7840         done
7841         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7842 done
7843 LIBS="$cf_add_libs"
7844
7845 else
7846   { { echo "$as_me:7846: error: Cannot find PCRE2 POSIX library" >&5
7847 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7848    { (exit 1); exit 1; }; }
7849 fi
7850
7851 fi
7852
7853                 ;;
7854         esac
7855
7856         # either way, check for the library header files
7857
7858 for ac_header in pcre2posix.h pcreposix.h
7859 do
7860 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7861 echo "$as_me:7861: checking for $ac_header" >&5
7862 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7863 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7864   echo $ECHO_N "(cached) $ECHO_C" >&6
7865 else
7866   cat >"conftest.$ac_ext" <<_ACEOF
7867 #line 7867 "configure"
7868 #include "confdefs.h"
7869 #include <$ac_header>
7870 _ACEOF
7871 if { (eval echo "$as_me:7871: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7872   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7873   ac_status=$?
7874   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7875   rm -f conftest.er1
7876   cat conftest.err >&5
7877   echo "$as_me:7877: \$? = $ac_status" >&5
7878   (exit "$ac_status"); } >/dev/null; then
7879   if test -s conftest.err; then
7880     ac_cpp_err=$ac_c_preproc_warn_flag
7881   else
7882     ac_cpp_err=
7883   fi
7884 else
7885   ac_cpp_err=yes
7886 fi
7887 if test -z "$ac_cpp_err"; then
7888   eval "$as_ac_Header=yes"
7889 else
7890   echo "$as_me: failed program was:" >&5
7891   cat "conftest.$ac_ext" >&5
7892   eval "$as_ac_Header=no"
7893 fi
7894 rm -f conftest.err "conftest.$ac_ext"
7895 fi
7896 echo "$as_me:7896: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7897 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7898 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7899   cat >>confdefs.h <<EOF
7900 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7901 EOF
7902
7903 fi
7904 done
7905
7906 for ac_func in PCRE2regcomp
7907 do
7908 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7909 echo "$as_me:7909: checking for $ac_func" >&5
7910 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7911 if eval "test \"\${$as_ac_var+set}\" = set"; then
7912   echo $ECHO_N "(cached) $ECHO_C" >&6
7913 else
7914   cat >"conftest.$ac_ext" <<_ACEOF
7915 #line 7915 "configure"
7916 #include "confdefs.h"
7917 #define $ac_func autoconf_temporary
7918 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7919 #undef $ac_func
7920
7921 #ifdef __cplusplus
7922 extern "C"
7923 #endif
7924
7925 /* We use char because int might match the return type of a gcc2
7926    builtin and then its argument prototype would still apply.  */
7927 char $ac_func (void);
7928
7929 int
7930 main (void)
7931 {
7932
7933 /* The GNU C library defines stubs for functions which it implements
7934     to always fail with ENOSYS.  Some functions are actually named
7935     something starting with __ and the normal name is an alias.  */
7936 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7937 #error found stub for $ac_func
7938 #endif
7939
7940         return $ac_func ();
7941   ;
7942   return 0;
7943 }
7944 _ACEOF
7945 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7946 if { (eval echo "$as_me:7946: \"$ac_link\"") >&5
7947   (eval $ac_link) 2>&5
7948   ac_status=$?
7949   echo "$as_me:7949: \$? = $ac_status" >&5
7950   (exit "$ac_status"); } &&
7951          { ac_try='test -s "conftest$ac_exeext"'
7952   { (eval echo "$as_me:7952: \"$ac_try\"") >&5
7953   (eval $ac_try) 2>&5
7954   ac_status=$?
7955   echo "$as_me:7955: \$? = $ac_status" >&5
7956   (exit "$ac_status"); }; }; then
7957   eval "$as_ac_var=yes"
7958 else
7959   echo "$as_me: failed program was:" >&5
7960 cat "conftest.$ac_ext" >&5
7961 eval "$as_ac_var=no"
7962 fi
7963 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7964 fi
7965 echo "$as_me:7965: result: `eval echo '${'"$as_ac_var"'}'`" >&5
7966 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
7967 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
7968   cat >>confdefs.h <<EOF
7969 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7970 EOF
7971
7972 fi
7973 done
7974
7975 fi
7976
7977 # not everyone has "test -c"
7978 if test -c /dev/sysmouse 2>/dev/null ; then
7979 echo "$as_me:7979: checking if you want to use sysmouse" >&5
7980 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7981
7982 # Check whether --with-sysmouse or --without-sysmouse was given.
7983 if test "${with_sysmouse+set}" = set; then
7984   withval="$with_sysmouse"
7985   cf_with_sysmouse=$withval
7986 else
7987   cf_with_sysmouse=maybe
7988 fi;
7989         if test "$cf_with_sysmouse" != no ; then
7990         cat >"conftest.$ac_ext" <<_ACEOF
7991 #line 7991 "configure"
7992 #include "confdefs.h"
7993
7994 #include <osreldate.h>
7995 #if (__FreeBSD_version >= 400017)
7996 #include <sys/consio.h>
7997 #include <sys/fbio.h>
7998 #else
7999 #include <machine/console.h>
8000 #endif
8001
8002 int
8003 main (void)
8004 {
8005
8006         struct mouse_info the_mouse;
8007         ioctl(0, CONS_MOUSECTL, &the_mouse);
8008
8009   ;
8010   return 0;
8011 }
8012 _ACEOF
8013 rm -f "conftest.$ac_objext"
8014 if { (eval echo "$as_me:8014: \"$ac_compile\"") >&5
8015   (eval $ac_compile) 2>&5
8016   ac_status=$?
8017   echo "$as_me:8017: \$? = $ac_status" >&5
8018   (exit "$ac_status"); } &&
8019          { ac_try='test -s "conftest.$ac_objext"'
8020   { (eval echo "$as_me:8020: \"$ac_try\"") >&5
8021   (eval $ac_try) 2>&5
8022   ac_status=$?
8023   echo "$as_me:8023: \$? = $ac_status" >&5
8024   (exit "$ac_status"); }; }; then
8025   cf_with_sysmouse=yes
8026 else
8027   echo "$as_me: failed program was:" >&5
8028 cat "conftest.$ac_ext" >&5
8029 cf_with_sysmouse=no
8030 fi
8031 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8032         fi
8033 echo "$as_me:8033: result: $cf_with_sysmouse" >&5
8034 echo "${ECHO_T}$cf_with_sysmouse" >&6
8035 test "$cf_with_sysmouse" = yes &&
8036 cat >>confdefs.h <<\EOF
8037 #define USE_SYSMOUSE 1
8038 EOF
8039
8040 fi
8041
8042 # pretend that ncurses==ncursesw==ncursest
8043 echo "$as_me:8043: checking if you want to disable library suffixes" >&5
8044 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8045
8046 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8047 if test "${enable_lib_suffixes+set}" = set; then
8048   enableval="$enable_lib_suffixes"
8049   test "$enableval" != no && enableval=yes
8050         if test "$enableval" != "yes" ; then
8051     disable_lib_suffixes=yes
8052         else
8053                 disable_lib_suffixes=no
8054         fi
8055 else
8056   enableval=yes
8057         disable_lib_suffixes=no
8058
8059 fi;
8060 echo "$as_me:8060: result: $disable_lib_suffixes" >&5
8061 echo "${ECHO_T}$disable_lib_suffixes" >&6
8062
8063 ### If we're building with rpath, try to link non-standard libs that way too.
8064 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8065
8066 echo "$as_me:8066: checking if rpath-hack should be disabled" >&5
8067 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8068
8069 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8070 if test "${enable_rpath_hack+set}" = set; then
8071   enableval="$enable_rpath_hack"
8072   test "$enableval" != no && enableval=yes
8073         if test "$enableval" != "yes" ; then
8074     enable_rpath_hack=no
8075         else
8076                 enable_rpath_hack=yes
8077         fi
8078 else
8079   enableval=yes
8080         enable_rpath_hack=yes
8081
8082 fi;
8083 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8084 echo "$as_me:8084: result: $cf_disable_rpath_hack" >&5
8085 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8086
8087 if test "$enable_rpath_hack" = yes ; then
8088
8089 echo "$as_me:8089: checking for updated LDFLAGS" >&5
8090 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8091 if test -n "$LD_RPATH_OPT" ; then
8092         echo "$as_me:8092: result: maybe" >&5
8093 echo "${ECHO_T}maybe" >&6
8094
8095         for ac_prog in ldd
8096 do
8097   # Extract the first word of "$ac_prog", so it can be a program name with args.
8098 set dummy $ac_prog; ac_word=$2
8099 echo "$as_me:8099: checking for $ac_word" >&5
8100 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8101 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8102   echo $ECHO_N "(cached) $ECHO_C" >&6
8103 else
8104   if test -n "$cf_ldd_prog"; then
8105   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8106 else
8107   ac_save_IFS=$IFS; IFS=$ac_path_separator
8108 ac_dummy="$PATH"
8109 for ac_dir in $ac_dummy; do
8110   IFS=$ac_save_IFS
8111   test -z "$ac_dir" && ac_dir=.
8112   $as_executable_p "$ac_dir/$ac_word" || continue
8113 ac_cv_prog_cf_ldd_prog="$ac_prog"
8114 echo "$as_me:8114: found $ac_dir/$ac_word" >&5
8115 break
8116 done
8117
8118 fi
8119 fi
8120 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8121 if test -n "$cf_ldd_prog"; then
8122   echo "$as_me:8122: result: $cf_ldd_prog" >&5
8123 echo "${ECHO_T}$cf_ldd_prog" >&6
8124 else
8125   echo "$as_me:8125: result: no" >&5
8126 echo "${ECHO_T}no" >&6
8127 fi
8128
8129   test -n "$cf_ldd_prog" && break
8130 done
8131 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8132
8133         cf_rpath_list="/usr/lib /lib"
8134         if test "$cf_ldd_prog" != no
8135         then
8136                 cf_rpath_oops=
8137
8138 cat >"conftest.$ac_ext" <<_ACEOF
8139 #line 8139 "configure"
8140 #include "confdefs.h"
8141 #include <stdio.h>
8142 int
8143 main (void)
8144 {
8145 printf("Hello");
8146   ;
8147   return 0;
8148 }
8149 _ACEOF
8150 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8151 if { (eval echo "$as_me:8151: \"$ac_link\"") >&5
8152   (eval $ac_link) 2>&5
8153   ac_status=$?
8154   echo "$as_me:8154: \$? = $ac_status" >&5
8155   (exit "$ac_status"); } &&
8156          { ac_try='test -s "conftest$ac_exeext"'
8157   { (eval echo "$as_me:8157: \"$ac_try\"") >&5
8158   (eval $ac_try) 2>&5
8159   ac_status=$?
8160   echo "$as_me:8160: \$? = $ac_status" >&5
8161   (exit "$ac_status"); }; }; then
8162   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8163                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8164 else
8165   echo "$as_me: failed program was:" >&5
8166 cat "conftest.$ac_ext" >&5
8167 fi
8168 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8169
8170                 # If we passed the link-test, but get a "not found" on a given library,
8171                 # this could be due to inept reconfiguration of gcc to make it only
8172                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8173                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8174                 # /usr/local libraries.
8175                 if test -n "$cf_rpath_oops"
8176                 then
8177                         for cf_rpath_src in $cf_rpath_oops
8178                         do
8179                                 for cf_rpath_dir in \
8180                                         /usr/local \
8181                                         /usr/pkg \
8182                                         /opt/sfw
8183                                 do
8184                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8185                                         then
8186                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8187
8188 echo "${as_me:-configure}:8188: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8189
8190                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8191                                                 break
8192                                         fi
8193                                 done
8194                         done
8195                 fi
8196         fi
8197
8198         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8199
8200 echo "${as_me:-configure}:8200: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8201
8202 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8203
8204 echo "${as_me:-configure}:8204: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8205
8206 cf_rpath_dst=
8207 for cf_rpath_src in $LDFLAGS
8208 do
8209         case "$cf_rpath_src" in
8210         (-L*)
8211
8212                 # check if this refers to a directory which we will ignore
8213                 cf_rpath_skip=no
8214                 if test -n "$cf_rpath_list"
8215                 then
8216                         for cf_rpath_item in $cf_rpath_list
8217                         do
8218                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8219                                 then
8220                                         cf_rpath_skip=yes
8221                                         break
8222                                 fi
8223                         done
8224                 fi
8225
8226                 if test "$cf_rpath_skip" = no
8227                 then
8228                         # transform the option
8229                         if test "$LD_RPATH_OPT" = "-R " ; then
8230                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8231                         else
8232                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8233                         fi
8234
8235                         # if we have not already added this, add it now
8236                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8237                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8238                         then
8239                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8240
8241 echo "${as_me:-configure}:8241: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8242
8243                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8244                         fi
8245                 fi
8246                 ;;
8247         esac
8248         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8249 done
8250 LDFLAGS=$cf_rpath_dst
8251
8252 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8253
8254 echo "${as_me:-configure}:8254: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8255
8256 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8257
8258 echo "${as_me:-configure}:8258: testing ...checking LIBS $LIBS ..." 1>&5
8259
8260 cf_rpath_dst=
8261 for cf_rpath_src in $LIBS
8262 do
8263         case "$cf_rpath_src" in
8264         (-L*)
8265
8266                 # check if this refers to a directory which we will ignore
8267                 cf_rpath_skip=no
8268                 if test -n "$cf_rpath_list"
8269                 then
8270                         for cf_rpath_item in $cf_rpath_list
8271                         do
8272                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8273                                 then
8274                                         cf_rpath_skip=yes
8275                                         break
8276                                 fi
8277                         done
8278                 fi
8279
8280                 if test "$cf_rpath_skip" = no
8281                 then
8282                         # transform the option
8283                         if test "$LD_RPATH_OPT" = "-R " ; then
8284                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8285                         else
8286                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8287                         fi
8288
8289                         # if we have not already added this, add it now
8290                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8291                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8292                         then
8293                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8294
8295 echo "${as_me:-configure}:8295: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8296
8297                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8298                         fi
8299                 fi
8300                 ;;
8301         esac
8302         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8303 done
8304 LIBS=$cf_rpath_dst
8305
8306 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8307
8308 echo "${as_me:-configure}:8308: testing ...checked LIBS $LIBS ..." 1>&5
8309
8310         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8311
8312 echo "${as_me:-configure}:8312: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8313
8314 else
8315         echo "$as_me:8315: result: no" >&5
8316 echo "${ECHO_T}no" >&6
8317 fi
8318
8319 fi
8320
8321 fi
8322
8323 ### Depending on the system, someone may use rpath to build ncurses but not
8324 # want users of the package to rely upon that feature.  Give those people an
8325 # option to suppress that detail from EXTRA_LDFLAGS.
8326 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8327 if test -n "$EXTRA_PKG_LDFLAGS"
8328 then
8329         echo "$as_me:8329: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8330 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8331
8332 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8333 if test "${enable_pkg_ldflags+set}" = set; then
8334   enableval="$enable_pkg_ldflags"
8335   test "$enableval" != no && enableval=yes
8336         if test "$enableval" != "yes" ; then
8337     disable_pkg_ldflags=yes
8338         else
8339                 disable_pkg_ldflags=no
8340         fi
8341 else
8342   enableval=yes
8343         disable_pkg_ldflags=no
8344
8345 fi;
8346         echo "$as_me:8346: result: $disable_pkg_ldflags" >&5
8347 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8348         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8349 fi
8350
8351 ###############################################################################
8352
8353 ###     use option --with-extra-suffix to append suffix to headers and libraries
8354 echo "$as_me:8354: checking if you wish to append extra suffix to header/library paths" >&5
8355 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8356 EXTRA_SUFFIX=
8357
8358 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8359 if test "${with_extra_suffix+set}" = set; then
8360   withval="$with_extra_suffix"
8361   case x$withval in
8362         (xno)
8363                 ;;
8364         (xyes|x)
8365                 EXTRA_SUFFIX=$cf_cv_abi_version
8366                 ;;
8367         (*)
8368                 EXTRA_SUFFIX=$withval
8369                 ;;
8370         esac
8371
8372 fi;
8373 echo "$as_me:8373: result: $EXTRA_SUFFIX" >&5
8374 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8375
8376 ###     use option --disable-overwrite to leave out the link to -lcurses
8377 echo "$as_me:8377: checking if you wish to install ncurses overwriting curses" >&5
8378 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8379
8380 # Check whether --enable-overwrite or --disable-overwrite was given.
8381 if test "${enable_overwrite+set}" = set; then
8382   enableval="$enable_overwrite"
8383   with_overwrite=$enableval
8384 else
8385   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8386 fi;
8387 echo "$as_me:8387: result: $with_overwrite" >&5
8388 echo "${ECHO_T}$with_overwrite" >&6
8389
8390 echo "$as_me:8390: checking if external terminfo-database is used" >&5
8391 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8392
8393 # Check whether --enable-database or --disable-database was given.
8394 if test "${enable_database+set}" = set; then
8395   enableval="$enable_database"
8396   use_database=$enableval
8397 else
8398   use_database=yes
8399 fi;
8400 echo "$as_me:8400: result: $use_database" >&5
8401 echo "${ECHO_T}$use_database" >&6
8402
8403 case "$host_os" in
8404 (os2*)
8405         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8406         ;;
8407 (*)
8408         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8409         ;;
8410 esac
8411
8412 NCURSES_USE_DATABASE=0
8413 if test "$use_database" != no ; then
8414         NCURSES_USE_DATABASE=1
8415
8416         echo "$as_me:8416: checking which terminfo source-file will be installed" >&5
8417 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8418
8419 # Check whether --with-database or --without-database was given.
8420 if test "${with_database+set}" = set; then
8421   withval="$with_database"
8422   TERMINFO_SRC=$withval
8423 fi;
8424         echo "$as_me:8424: result: $TERMINFO_SRC" >&5
8425 echo "${ECHO_T}$TERMINFO_SRC" >&6
8426
8427         echo "$as_me:8427: checking whether to use hashed database instead of directory/tree" >&5
8428 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8429
8430 # Check whether --with-hashed-db or --without-hashed-db was given.
8431 if test "${with_hashed_db+set}" = set; then
8432   withval="$with_hashed_db"
8433
8434 else
8435   with_hashed_db=no
8436 fi;
8437         echo "$as_me:8437: result: $with_hashed_db" >&5
8438 echo "${ECHO_T}$with_hashed_db" >&6
8439 else
8440         with_hashed_db=no
8441 fi
8442
8443 echo "$as_me:8443: checking for list of fallback descriptions" >&5
8444 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8445
8446 # Check whether --with-fallbacks or --without-fallbacks was given.
8447 if test "${with_fallbacks+set}" = set; then
8448   withval="$with_fallbacks"
8449   with_fallback=$withval
8450 else
8451   with_fallback=
8452 fi;
8453 echo "$as_me:8453: result: $with_fallback" >&5
8454 echo "${ECHO_T}$with_fallback" >&6
8455
8456 case ".$with_fallback" in
8457 (.|.no)
8458         FALLBACK_LIST=
8459         ;;
8460 (.yes)
8461         { echo "$as_me:8461: WARNING: expected a list of terminal descriptions" >&5
8462 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8463         ;;
8464 (*)
8465         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8466         ;;
8467 esac
8468
8469 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8470 # tree for generating the terminal descriptions that will be compiled into the
8471 # library.  If your toolchain is old, it may not handle current terminal
8472 # databases.  Use configure-options to point to the tools which will be used,
8473 # rather than the first ones found on the $PATH.
8474 if test -n "$ac_tool_prefix"; then
8475   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8476 set dummy ${ac_tool_prefix}tic; ac_word=$2
8477 echo "$as_me:8477: checking for $ac_word" >&5
8478 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8479 if test "${ac_cv_prog_TIC+set}" = set; then
8480   echo $ECHO_N "(cached) $ECHO_C" >&6
8481 else
8482   if test -n "$TIC"; then
8483   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8484 else
8485   ac_save_IFS=$IFS; IFS=$ac_path_separator
8486 ac_dummy="$PATH"
8487 for ac_dir in $ac_dummy; do
8488   IFS=$ac_save_IFS
8489   test -z "$ac_dir" && ac_dir=.
8490   $as_executable_p "$ac_dir/$ac_word" || continue
8491 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8492 echo "$as_me:8492: found $ac_dir/$ac_word" >&5
8493 break
8494 done
8495
8496 fi
8497 fi
8498 TIC=$ac_cv_prog_TIC
8499 if test -n "$TIC"; then
8500   echo "$as_me:8500: result: $TIC" >&5
8501 echo "${ECHO_T}$TIC" >&6
8502 else
8503   echo "$as_me:8503: result: no" >&5
8504 echo "${ECHO_T}no" >&6
8505 fi
8506
8507 fi
8508 if test -z "$ac_cv_prog_TIC"; then
8509   ac_ct_TIC=$TIC
8510   # Extract the first word of "tic", so it can be a program name with args.
8511 set dummy tic; ac_word=$2
8512 echo "$as_me:8512: checking for $ac_word" >&5
8513 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8514 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8515   echo $ECHO_N "(cached) $ECHO_C" >&6
8516 else
8517   if test -n "$ac_ct_TIC"; then
8518   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8519 else
8520   ac_save_IFS=$IFS; IFS=$ac_path_separator
8521 ac_dummy="$PATH"
8522 for ac_dir in $ac_dummy; do
8523   IFS=$ac_save_IFS
8524   test -z "$ac_dir" && ac_dir=.
8525   $as_executable_p "$ac_dir/$ac_word" || continue
8526 ac_cv_prog_ac_ct_TIC="tic"
8527 echo "$as_me:8527: found $ac_dir/$ac_word" >&5
8528 break
8529 done
8530
8531 fi
8532 fi
8533 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8534 if test -n "$ac_ct_TIC"; then
8535   echo "$as_me:8535: result: $ac_ct_TIC" >&5
8536 echo "${ECHO_T}$ac_ct_TIC" >&6
8537 else
8538   echo "$as_me:8538: result: no" >&5
8539 echo "${ECHO_T}no" >&6
8540 fi
8541
8542   TIC=$ac_ct_TIC
8543 else
8544   TIC="$ac_cv_prog_TIC"
8545 fi
8546
8547 if test -n "$ac_tool_prefix"; then
8548   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8549 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8550 echo "$as_me:8550: checking for $ac_word" >&5
8551 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8552 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8553   echo $ECHO_N "(cached) $ECHO_C" >&6
8554 else
8555   if test -n "$INFOCMP"; then
8556   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8557 else
8558   ac_save_IFS=$IFS; IFS=$ac_path_separator
8559 ac_dummy="$PATH"
8560 for ac_dir in $ac_dummy; do
8561   IFS=$ac_save_IFS
8562   test -z "$ac_dir" && ac_dir=.
8563   $as_executable_p "$ac_dir/$ac_word" || continue
8564 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8565 echo "$as_me:8565: found $ac_dir/$ac_word" >&5
8566 break
8567 done
8568
8569 fi
8570 fi
8571 INFOCMP=$ac_cv_prog_INFOCMP
8572 if test -n "$INFOCMP"; then
8573   echo "$as_me:8573: result: $INFOCMP" >&5
8574 echo "${ECHO_T}$INFOCMP" >&6
8575 else
8576   echo "$as_me:8576: result: no" >&5
8577 echo "${ECHO_T}no" >&6
8578 fi
8579
8580 fi
8581 if test -z "$ac_cv_prog_INFOCMP"; then
8582   ac_ct_INFOCMP=$INFOCMP
8583   # Extract the first word of "infocmp", so it can be a program name with args.
8584 set dummy infocmp; ac_word=$2
8585 echo "$as_me:8585: checking for $ac_word" >&5
8586 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8587 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8588   echo $ECHO_N "(cached) $ECHO_C" >&6
8589 else
8590   if test -n "$ac_ct_INFOCMP"; then
8591   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8592 else
8593   ac_save_IFS=$IFS; IFS=$ac_path_separator
8594 ac_dummy="$PATH"
8595 for ac_dir in $ac_dummy; do
8596   IFS=$ac_save_IFS
8597   test -z "$ac_dir" && ac_dir=.
8598   $as_executable_p "$ac_dir/$ac_word" || continue
8599 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8600 echo "$as_me:8600: found $ac_dir/$ac_word" >&5
8601 break
8602 done
8603
8604 fi
8605 fi
8606 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8607 if test -n "$ac_ct_INFOCMP"; then
8608   echo "$as_me:8608: result: $ac_ct_INFOCMP" >&5
8609 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8610 else
8611   echo "$as_me:8611: result: no" >&5
8612 echo "${ECHO_T}no" >&6
8613 fi
8614
8615   INFOCMP=$ac_ct_INFOCMP
8616 else
8617   INFOCMP="$ac_cv_prog_INFOCMP"
8618 fi
8619
8620 if test -n "$FALLBACK_LIST"
8621 then
8622
8623 # Check whether --with-tic-path or --without-tic-path was given.
8624 if test "${with_tic_path+set}" = set; then
8625   withval="$with_tic_path"
8626   echo "$as_me:8626: checking for tic program for fallbacks" >&5
8627 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8628                 TIC=$withval
8629                 echo "$as_me:8629: result: $TIC" >&5
8630 echo "${ECHO_T}$TIC" >&6
8631
8632 if test "x$prefix" != xNONE; then
8633         cf_path_syntax="$prefix"
8634 else
8635         cf_path_syntax="$ac_default_prefix"
8636 fi
8637
8638 case ".$TIC" in
8639 (.\$\(*\)*|.\'*\'*)
8640         ;;
8641 (..|./*|.\\*)
8642         ;;
8643 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8644         ;;
8645 (.\$\{*prefix\}*|.\$\{*dir\}*)
8646         eval TIC="$TIC"
8647         case ".$TIC" in
8648         (.NONE/*)
8649                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8650                 ;;
8651         esac
8652         ;;
8653 (.no|.NONE/*)
8654         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8655         ;;
8656 (*)
8657         { { echo "$as_me:8657: error: expected a pathname, not \"$TIC\"" >&5
8658 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8659    { (exit 1); exit 1; }; }
8660         ;;
8661 esac
8662
8663 else
8664
8665 test -z "$TIC" && TIC="tic"
8666 for ac_prog in $TIC tic
8667 do
8668   # Extract the first word of "$ac_prog", so it can be a program name with args.
8669 set dummy $ac_prog; ac_word=$2
8670 echo "$as_me:8670: checking for $ac_word" >&5
8671 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8672 if test "${ac_cv_path_TIC+set}" = set; then
8673   echo $ECHO_N "(cached) $ECHO_C" >&6
8674 else
8675   case $TIC in
8676   [\\/]* | ?:[\\/]*)
8677   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8678   ;;
8679   *)
8680   ac_save_IFS=$IFS; IFS=$ac_path_separator
8681 ac_dummy="$PATH:/usr/local/ncurses/bin"
8682 for ac_dir in $ac_dummy; do
8683   IFS=$ac_save_IFS
8684   test -z "$ac_dir" && ac_dir=.
8685   if $as_executable_p "$ac_dir/$ac_word"; then
8686    ac_cv_path_TIC="$ac_dir/$ac_word"
8687    echo "$as_me:8687: found $ac_dir/$ac_word" >&5
8688    break
8689 fi
8690 done
8691
8692   ;;
8693 esac
8694 fi
8695 TIC=$ac_cv_path_TIC
8696
8697 if test -n "$TIC"; then
8698   echo "$as_me:8698: result: $TIC" >&5
8699 echo "${ECHO_T}$TIC" >&6
8700 else
8701   echo "$as_me:8701: result: no" >&5
8702 echo "${ECHO_T}no" >&6
8703 fi
8704
8705   test -n "$TIC" && break
8706 done
8707 test -n "$TIC" || TIC="$TIC"
8708
8709 cf_path_prog=""
8710 cf_path_args=""
8711 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8712 for cf_temp in $ac_cv_path_TIC
8713 do
8714         if test -z "$cf_path_prog" ; then
8715                 if test "$with_full_paths" = yes ; then
8716
8717 if test "x$prefix" != xNONE; then
8718         cf_path_syntax="$prefix"
8719 else
8720         cf_path_syntax="$ac_default_prefix"
8721 fi
8722
8723 case ".$cf_temp" in
8724 (.\$\(*\)*|.\'*\'*)
8725         ;;
8726 (..|./*|.\\*)
8727         ;;
8728 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8729         ;;
8730 (.\$\{*prefix\}*|.\$\{*dir\}*)
8731         eval cf_temp="$cf_temp"
8732         case ".$cf_temp" in
8733         (.NONE/*)
8734                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8735                 ;;
8736         esac
8737         ;;
8738 (.no|.NONE/*)
8739         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8740         ;;
8741 (*)
8742         break
8743         ;;
8744 esac
8745
8746                         cf_path_prog="$cf_temp"
8747                 else
8748                         cf_path_prog="`basename "$cf_temp"`"
8749                 fi
8750         elif test -z "$cf_path_args" ; then
8751                 cf_path_args="$cf_temp"
8752         else
8753                 cf_path_args="$cf_path_args $cf_temp"
8754         fi
8755 done
8756 IFS="$cf_save_ifs"
8757
8758 if test -n "$cf_path_prog" ; then
8759
8760 echo "${as_me:-configure}:8760: testing defining path for ${cf_path_prog} ..." 1>&5
8761
8762 cat >>confdefs.h <<EOF
8763 #define TIC_PATH "$cf_path_prog"
8764 EOF
8765
8766         test -n "$cf_path_args" &&
8767 cat >>confdefs.h <<EOF
8768 #define TIC_ARGS "$cf_path_args"
8769 EOF
8770
8771 fi
8772
8773                 if test -z "$TIC"
8774                 then
8775                         { echo "$as_me:8775: WARNING: no tic program found for fallbacks" >&5
8776 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8777                 fi
8778
8779 fi;
8780
8781 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8782 if test "${with_infocmp_path+set}" = set; then
8783   withval="$with_infocmp_path"
8784   echo "$as_me:8784: checking for infocmp program for fallbacks" >&5
8785 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8786                 INFOCMP=$withval
8787                 echo "$as_me:8787: result: $INFOCMP" >&5
8788 echo "${ECHO_T}$INFOCMP" >&6
8789
8790 if test "x$prefix" != xNONE; then
8791         cf_path_syntax="$prefix"
8792 else
8793         cf_path_syntax="$ac_default_prefix"
8794 fi
8795
8796 case ".$INFOCMP" in
8797 (.\$\(*\)*|.\'*\'*)
8798         ;;
8799 (..|./*|.\\*)
8800         ;;
8801 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8802         ;;
8803 (.\$\{*prefix\}*|.\$\{*dir\}*)
8804         eval INFOCMP="$INFOCMP"
8805         case ".$INFOCMP" in
8806         (.NONE/*)
8807                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8808                 ;;
8809         esac
8810         ;;
8811 (.no|.NONE/*)
8812         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8813         ;;
8814 (*)
8815         { { echo "$as_me:8815: error: expected a pathname, not \"$INFOCMP\"" >&5
8816 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8817    { (exit 1); exit 1; }; }
8818         ;;
8819 esac
8820
8821 else
8822
8823 test -z "$INFOCMP" && INFOCMP="infocmp"
8824 for ac_prog in $INFOCMP infocmp
8825 do
8826   # Extract the first word of "$ac_prog", so it can be a program name with args.
8827 set dummy $ac_prog; ac_word=$2
8828 echo "$as_me:8828: checking for $ac_word" >&5
8829 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8830 if test "${ac_cv_path_INFOCMP+set}" = set; then
8831   echo $ECHO_N "(cached) $ECHO_C" >&6
8832 else
8833   case $INFOCMP in
8834   [\\/]* | ?:[\\/]*)
8835   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8836   ;;
8837   *)
8838   ac_save_IFS=$IFS; IFS=$ac_path_separator
8839 ac_dummy="$PATH:/usr/local/ncurses/bin"
8840 for ac_dir in $ac_dummy; do
8841   IFS=$ac_save_IFS
8842   test -z "$ac_dir" && ac_dir=.
8843   if $as_executable_p "$ac_dir/$ac_word"; then
8844    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8845    echo "$as_me:8845: found $ac_dir/$ac_word" >&5
8846    break
8847 fi
8848 done
8849
8850   ;;
8851 esac
8852 fi
8853 INFOCMP=$ac_cv_path_INFOCMP
8854
8855 if test -n "$INFOCMP"; then
8856   echo "$as_me:8856: result: $INFOCMP" >&5
8857 echo "${ECHO_T}$INFOCMP" >&6
8858 else
8859   echo "$as_me:8859: result: no" >&5
8860 echo "${ECHO_T}no" >&6
8861 fi
8862
8863   test -n "$INFOCMP" && break
8864 done
8865 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8866
8867 cf_path_prog=""
8868 cf_path_args=""
8869 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8870 for cf_temp in $ac_cv_path_INFOCMP
8871 do
8872         if test -z "$cf_path_prog" ; then
8873                 if test "$with_full_paths" = yes ; then
8874
8875 if test "x$prefix" != xNONE; then
8876         cf_path_syntax="$prefix"
8877 else
8878         cf_path_syntax="$ac_default_prefix"
8879 fi
8880
8881 case ".$cf_temp" in
8882 (.\$\(*\)*|.\'*\'*)
8883         ;;
8884 (..|./*|.\\*)
8885         ;;
8886 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8887         ;;
8888 (.\$\{*prefix\}*|.\$\{*dir\}*)
8889         eval cf_temp="$cf_temp"
8890         case ".$cf_temp" in
8891         (.NONE/*)
8892                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8893                 ;;
8894         esac
8895         ;;
8896 (.no|.NONE/*)
8897         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8898         ;;
8899 (*)
8900         break
8901         ;;
8902 esac
8903
8904                         cf_path_prog="$cf_temp"
8905                 else
8906                         cf_path_prog="`basename "$cf_temp"`"
8907                 fi
8908         elif test -z "$cf_path_args" ; then
8909                 cf_path_args="$cf_temp"
8910         else
8911                 cf_path_args="$cf_path_args $cf_temp"
8912         fi
8913 done
8914 IFS="$cf_save_ifs"
8915
8916 if test -n "$cf_path_prog" ; then
8917
8918 echo "${as_me:-configure}:8918: testing defining path for ${cf_path_prog} ..." 1>&5
8919
8920 cat >>confdefs.h <<EOF
8921 #define INFOCMP_PATH "$cf_path_prog"
8922 EOF
8923
8924         test -n "$cf_path_args" &&
8925 cat >>confdefs.h <<EOF
8926 #define INFOCMP_ARGS "$cf_path_args"
8927 EOF
8928
8929 fi
8930
8931                 if test -z "$INFOCMP"
8932                 then
8933                         { echo "$as_me:8933: WARNING: no infocmp program found for fallbacks" >&5
8934 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8935                 fi
8936
8937 fi;
8938
8939         test -z "$TIC" && FALLBACK_LIST=
8940         test -z "$INFOCMP" && FALLBACK_LIST=
8941         if test -z "$FALLBACK_LIST"
8942         then
8943                 { echo "$as_me:8943: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8944 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8945         fi
8946 fi
8947
8948 USE_FALLBACKS=
8949 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8950
8951 echo "$as_me:8951: checking if you want modern xterm or antique" >&5
8952 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8953
8954 # Check whether --with-xterm-new or --without-xterm-new was given.
8955 if test "${with_xterm_new+set}" = set; then
8956   withval="$with_xterm_new"
8957   with_xterm_new=$withval
8958 else
8959   with_xterm_new=yes
8960 fi;
8961 case "$with_xterm_new" in
8962 (no) with_xterm_new=xterm-old;;
8963 (*)      with_xterm_new=xterm-new;;
8964 esac
8965 echo "$as_me:8965: result: $with_xterm_new" >&5
8966 echo "${ECHO_T}$with_xterm_new" >&6
8967 WHICH_XTERM=$with_xterm_new
8968
8969 echo "$as_me:8969: checking if xterm backspace sends BS or DEL" >&5
8970 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8971
8972 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8973 if test "${with_xterm_kbs+set}" = set; then
8974   withval="$with_xterm_kbs"
8975   with_xterm_kbs=$withval
8976 else
8977   with_xterm_kbs=BS
8978 fi;
8979 case x$with_xterm_kbs in
8980 (xyes|xno|xBS|xbs|x8)
8981         with_xterm_kbs=BS
8982         ;;
8983 (xDEL|xdel|x127)
8984         with_xterm_kbs=DEL
8985         ;;
8986 (*)
8987         with_xterm_kbs=$withval
8988         ;;
8989 esac
8990 echo "$as_me:8990: result: $with_xterm_kbs" >&5
8991 echo "${ECHO_T}$with_xterm_kbs" >&6
8992 XTERM_KBS=$with_xterm_kbs
8993
8994 MAKE_TERMINFO=
8995 if test "$use_database" = no ; then
8996         TERMINFO="${datadir}/terminfo"
8997         MAKE_TERMINFO="#"
8998 else
8999
9000 echo "$as_me:9000: checking for list of terminfo directories" >&5
9001 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9002
9003 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9004 if test "${with_terminfo_dirs+set}" = set; then
9005   withval="$with_terminfo_dirs"
9006
9007 else
9008   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9009 fi;
9010 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9011 cf_dst_path=
9012 for cf_src_path in $withval
9013 do
9014
9015 if test "x$prefix" != xNONE; then
9016         cf_path_syntax="$prefix"
9017 else
9018         cf_path_syntax="$ac_default_prefix"
9019 fi
9020
9021 case ".$cf_src_path" in
9022 (.\$\(*\)*|.\'*\'*)
9023         ;;
9024 (..|./*|.\\*)
9025         ;;
9026 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9027         ;;
9028 (.\$\{*prefix\}*|.\$\{*dir\}*)
9029         eval cf_src_path="$cf_src_path"
9030         case ".$cf_src_path" in
9031         (.NONE/*)
9032                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9033                 ;;
9034         esac
9035         ;;
9036 (.no|.NONE/*)
9037         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9038         ;;
9039 (*)
9040         { { echo "$as_me:9040: error: expected a pathname, not \"$cf_src_path\"" >&5
9041 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9042    { (exit 1); exit 1; }; }
9043         ;;
9044 esac
9045
9046   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9047   cf_dst_path="${cf_dst_path}${cf_src_path}"
9048 done
9049 IFS="$ac_save_ifs"
9050
9051 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9052 # so we have to check/work around.  We do prefer the result of "eval"...
9053 eval cf_dst_eval="$cf_dst_path"
9054 case "x$cf_dst_eval" in
9055 (xNONE*)
9056         TERMINFO_DIRS=$cf_dst_path
9057         ;;
9058 (*)
9059         TERMINFO_DIRS="$cf_dst_eval"
9060         ;;
9061 esac
9062
9063 echo "$as_me:9063: result: $TERMINFO_DIRS" >&5
9064 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9065 test -n "$TERMINFO_DIRS" &&
9066 cat >>confdefs.h <<EOF
9067 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9068 EOF
9069
9070 case "x$TERMINFO" in
9071 x???:*)
9072         { echo "$as_me:9072: WARNING: ignoring non-directory/file TERMINFO value" >&5
9073 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9074         unset TERMINFO
9075         ;;
9076 esac
9077
9078 echo "$as_me:9078: checking for default terminfo directory" >&5
9079 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9080
9081 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9082 if test "${with_default_terminfo_dir+set}" = set; then
9083   withval="$with_default_terminfo_dir"
9084
9085 else
9086   withval="${TERMINFO:-${datadir}/terminfo}"
9087 fi; if test -n "${datadir}/terminfo" ; then
9088
9089 if test "x$prefix" != xNONE; then
9090         cf_path_syntax="$prefix"
9091 else
9092         cf_path_syntax="$ac_default_prefix"
9093 fi
9094
9095 case ".$withval" in
9096 (.\$\(*\)*|.\'*\'*)
9097         ;;
9098 (..|./*|.\\*)
9099         ;;
9100 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9101         ;;
9102 (.\$\{*prefix\}*|.\$\{*dir\}*)
9103         eval withval="$withval"
9104         case ".$withval" in
9105         (.NONE/*)
9106                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9107                 ;;
9108         esac
9109         ;;
9110 (.no|.NONE/*)
9111         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9112         ;;
9113 (*)
9114         { { echo "$as_me:9114: error: expected a pathname, not \"$withval\"" >&5
9115 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9116    { (exit 1); exit 1; }; }
9117         ;;
9118 esac
9119
9120 fi
9121 eval TERMINFO="$withval"
9122
9123 echo "$as_me:9123: result: $TERMINFO" >&5
9124 echo "${ECHO_T}$TERMINFO" >&6
9125
9126 cat >>confdefs.h <<EOF
9127 #define TERMINFO "$TERMINFO"
9128 EOF
9129
9130 fi
9131
9132 ###     use option --disable-big-core to make tic run on small machines
9133 ###     We need 4Mb, check if we can allocate 50% more than that.
9134 echo "$as_me:9134: checking if big-core option selected" >&5
9135 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9136
9137 # Check whether --enable-big-core or --disable-big-core was given.
9138 if test "${enable_big_core+set}" = set; then
9139   enableval="$enable_big_core"
9140   with_big_core=$enableval
9141 else
9142   if test "$cross_compiling" = yes; then
9143   with_big_core=no
9144 else
9145   cat >"conftest.$ac_ext" <<_ACEOF
9146 #line 9146 "configure"
9147 #include "confdefs.h"
9148
9149 #include <stdlib.h>
9150 #include <string.h>
9151 int main() {
9152         unsigned long n = 6000000L;
9153         char *s = malloc(n);
9154         if (s != 0)
9155                 s[0] = s[n-1] = 0;
9156         ${cf_cv_main_return:-return}(s == 0);
9157 }
9158 _ACEOF
9159 rm -f "conftest$ac_exeext"
9160 if { (eval echo "$as_me:9160: \"$ac_link\"") >&5
9161   (eval $ac_link) 2>&5
9162   ac_status=$?
9163   echo "$as_me:9163: \$? = $ac_status" >&5
9164   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9165   { (eval echo "$as_me:9165: \"$ac_try\"") >&5
9166   (eval $ac_try) 2>&5
9167   ac_status=$?
9168   echo "$as_me:9168: \$? = $ac_status" >&5
9169   (exit "$ac_status"); }; }; then
9170   with_big_core=yes
9171 else
9172   echo "$as_me: program exited with status $ac_status" >&5
9173 echo "$as_me: failed program was:" >&5
9174 cat "conftest.$ac_ext" >&5
9175 with_big_core=no
9176 fi
9177 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9178 fi
9179 fi;
9180 echo "$as_me:9180: result: $with_big_core" >&5
9181 echo "${ECHO_T}$with_big_core" >&6
9182 test "x$with_big_core" = "xyes" &&
9183 cat >>confdefs.h <<\EOF
9184 #define HAVE_BIG_CORE 1
9185 EOF
9186
9187 ### ISO C only guarantees 512-char strings, we have tables which load faster
9188 ### when constructed using "big" strings.  More than the C compiler, the awk
9189 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9190 echo "$as_me:9190: checking if big-strings option selected" >&5
9191 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9192
9193 # Check whether --enable-big-strings or --disable-big-strings was given.
9194 if test "${enable_big_strings+set}" = set; then
9195   enableval="$enable_big_strings"
9196   with_big_strings=$enableval
9197 else
9198
9199         case x$AWK in
9200         (x)
9201                 eval with_big_strings=no
9202                 ;;
9203         (*)
9204                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9205                         | $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
9206                         eval with_big_strings=yes
9207                 else
9208                         eval with_big_strings=no
9209                 fi
9210                 ;;
9211         esac
9212
9213 fi;
9214 echo "$as_me:9214: result: $with_big_strings" >&5
9215 echo "${ECHO_T}$with_big_strings" >&6
9216
9217 USE_BIG_STRINGS=0
9218 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9219
9220 ###     use option --enable-termcap to compile in the termcap fallback support
9221 echo "$as_me:9221: checking if you want termcap-fallback support" >&5
9222 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9223
9224 # Check whether --enable-termcap or --disable-termcap was given.
9225 if test "${enable_termcap+set}" = set; then
9226   enableval="$enable_termcap"
9227   with_termcap=$enableval
9228 else
9229   with_termcap=no
9230 fi;
9231 echo "$as_me:9231: result: $with_termcap" >&5
9232 echo "${ECHO_T}$with_termcap" >&6
9233
9234 NCURSES_USE_TERMCAP=0
9235 if test "x$with_termcap" != "xyes" ; then
9236         if test "$use_database" = no ; then
9237                 if test -z "$with_fallback" ; then
9238                         { { echo "$as_me:9238: error: You have disabled the database w/o specifying fallbacks" >&5
9239 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9240    { (exit 1); exit 1; }; }
9241                 fi
9242         fi
9243
9244 cat >>confdefs.h <<\EOF
9245 #define PURE_TERMINFO 1
9246 EOF
9247
9248 else
9249
9250         if test "$with_ticlib" != no ; then
9251                 { { echo "$as_me:9251: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9252 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9253    { (exit 1); exit 1; }; }
9254         fi
9255
9256         NCURSES_USE_TERMCAP=1
9257         echo "$as_me:9257: checking for list of termcap files" >&5
9258 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9259
9260 # Check whether --with-termpath or --without-termpath was given.
9261 if test "${with_termpath+set}" = set; then
9262   withval="$with_termpath"
9263
9264 else
9265   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9266 fi;
9267 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9268 cf_dst_path=
9269 for cf_src_path in $withval
9270 do
9271
9272 if test "x$prefix" != xNONE; then
9273         cf_path_syntax="$prefix"
9274 else
9275         cf_path_syntax="$ac_default_prefix"
9276 fi
9277
9278 case ".$cf_src_path" in
9279 (.\$\(*\)*|.\'*\'*)
9280         ;;
9281 (..|./*|.\\*)
9282         ;;
9283 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9284         ;;
9285 (.\$\{*prefix\}*|.\$\{*dir\}*)
9286         eval cf_src_path="$cf_src_path"
9287         case ".$cf_src_path" in
9288         (.NONE/*)
9289                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9290                 ;;
9291         esac
9292         ;;
9293 (.no|.NONE/*)
9294         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9295         ;;
9296 (*)
9297         { { echo "$as_me:9297: error: expected a pathname, not \"$cf_src_path\"" >&5
9298 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9299    { (exit 1); exit 1; }; }
9300         ;;
9301 esac
9302
9303   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9304   cf_dst_path="${cf_dst_path}${cf_src_path}"
9305 done
9306 IFS="$ac_save_ifs"
9307
9308 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9309 # so we have to check/work around.  We do prefer the result of "eval"...
9310 eval cf_dst_eval="$cf_dst_path"
9311 case "x$cf_dst_eval" in
9312 (xNONE*)
9313         TERMPATH=$cf_dst_path
9314         ;;
9315 (*)
9316         TERMPATH="$cf_dst_eval"
9317         ;;
9318 esac
9319
9320         echo "$as_me:9320: result: $TERMPATH" >&5
9321 echo "${ECHO_T}$TERMPATH" >&6
9322         test -n "$TERMPATH" &&
9323 cat >>confdefs.h <<EOF
9324 #define TERMPATH "$TERMPATH"
9325 EOF
9326
9327         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9328         echo "$as_me:9328: checking if fast termcap-loader is needed" >&5
9329 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9330
9331 # Check whether --enable-getcap or --disable-getcap was given.
9332 if test "${enable_getcap+set}" = set; then
9333   enableval="$enable_getcap"
9334   with_getcap=$enableval
9335 else
9336   with_getcap=no
9337 fi;
9338         echo "$as_me:9338: result: $with_getcap" >&5
9339 echo "${ECHO_T}$with_getcap" >&6
9340         test "x$with_getcap" = "xyes" &&
9341 cat >>confdefs.h <<\EOF
9342 #define USE_GETCAP 1
9343 EOF
9344
9345         echo "$as_me:9345: checking if translated termcaps will be cached in ~/.terminfo" >&5
9346 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9347
9348 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9349 if test "${enable_getcap_cache+set}" = set; then
9350   enableval="$enable_getcap_cache"
9351   with_getcap_cache=$enableval
9352 else
9353   with_getcap_cache=no
9354 fi;
9355         echo "$as_me:9355: result: $with_getcap_cache" >&5
9356 echo "${ECHO_T}$with_getcap_cache" >&6
9357         test "x$with_getcap_cache" = "xyes" &&
9358 cat >>confdefs.h <<\EOF
9359 #define USE_GETCAP_CACHE 1
9360 EOF
9361
9362 fi
9363
9364 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9365 echo "$as_me:9365: checking if ~/.terminfo is wanted" >&5
9366 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9367
9368 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9369 if test "${enable_home_terminfo+set}" = set; then
9370   enableval="$enable_home_terminfo"
9371   with_home_terminfo=$enableval
9372 else
9373   with_home_terminfo=yes
9374 fi;
9375 echo "$as_me:9375: result: $with_home_terminfo" >&5
9376 echo "${ECHO_T}$with_home_terminfo" >&6
9377 test "x$with_home_terminfo" = "xyes" &&
9378 cat >>confdefs.h <<\EOF
9379 #define USE_HOME_TERMINFO 1
9380 EOF
9381
9382 echo "$as_me:9382: checking if you want to permit root to use ncurses environment variables" >&5
9383 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9384
9385 # Check whether --enable-root-environ or --disable-root-environ was given.
9386 if test "${enable_root_environ+set}" = set; then
9387   enableval="$enable_root_environ"
9388   with_root_environ=$enableval
9389 else
9390   with_root_environ=yes
9391 fi;
9392 echo "$as_me:9392: result: $with_root_environ" >&5
9393 echo "${ECHO_T}$with_root_environ" >&6
9394 test "x$with_root_environ" = xyes &&
9395 cat >>confdefs.h <<\EOF
9396 #define USE_ROOT_ENVIRON 1
9397 EOF
9398
9399 echo "$as_me:9399: checking if you want to permit setuid programs to access all files" >&5
9400 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9401
9402 # Check whether --enable-root-environ or --disable-root-environ was given.
9403 if test "${enable_root_environ+set}" = set; then
9404   enableval="$enable_root_environ"
9405   with_root_access=$enableval
9406 else
9407   with_root_access=yes
9408 fi;
9409 echo "$as_me:9409: result: $with_root_access" >&5
9410 echo "${ECHO_T}$with_root_access" >&6
9411 test "x$with_root_access" = xyes &&
9412 cat >>confdefs.h <<\EOF
9413 #define USE_ROOT_ACCESS 1
9414 EOF
9415
9416 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9417 ###   to reduce storage requirements for the terminfo database.
9418
9419 for ac_header in \
9420 unistd.h \
9421
9422 do
9423 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9424 echo "$as_me:9424: checking for $ac_header" >&5
9425 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9426 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9427   echo $ECHO_N "(cached) $ECHO_C" >&6
9428 else
9429   cat >"conftest.$ac_ext" <<_ACEOF
9430 #line 9430 "configure"
9431 #include "confdefs.h"
9432 #include <$ac_header>
9433 _ACEOF
9434 if { (eval echo "$as_me:9434: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9435   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9436   ac_status=$?
9437   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9438   rm -f conftest.er1
9439   cat conftest.err >&5
9440   echo "$as_me:9440: \$? = $ac_status" >&5
9441   (exit "$ac_status"); } >/dev/null; then
9442   if test -s conftest.err; then
9443     ac_cpp_err=$ac_c_preproc_warn_flag
9444   else
9445     ac_cpp_err=
9446   fi
9447 else
9448   ac_cpp_err=yes
9449 fi
9450 if test -z "$ac_cpp_err"; then
9451   eval "$as_ac_Header=yes"
9452 else
9453   echo "$as_me: failed program was:" >&5
9454   cat "conftest.$ac_ext" >&5
9455   eval "$as_ac_Header=no"
9456 fi
9457 rm -f conftest.err "conftest.$ac_ext"
9458 fi
9459 echo "$as_me:9459: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9460 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9461 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9462   cat >>confdefs.h <<EOF
9463 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9464 EOF
9465
9466 fi
9467 done
9468
9469 for ac_func in \
9470         remove \
9471         unlink
9472 do
9473 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9474 echo "$as_me:9474: checking for $ac_func" >&5
9475 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9476 if eval "test \"\${$as_ac_var+set}\" = set"; then
9477   echo $ECHO_N "(cached) $ECHO_C" >&6
9478 else
9479   cat >"conftest.$ac_ext" <<_ACEOF
9480 #line 9480 "configure"
9481 #include "confdefs.h"
9482 #define $ac_func autoconf_temporary
9483 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9484 #undef $ac_func
9485
9486 #ifdef __cplusplus
9487 extern "C"
9488 #endif
9489
9490 /* We use char because int might match the return type of a gcc2
9491    builtin and then its argument prototype would still apply.  */
9492 char $ac_func (void);
9493
9494 int
9495 main (void)
9496 {
9497
9498 /* The GNU C library defines stubs for functions which it implements
9499     to always fail with ENOSYS.  Some functions are actually named
9500     something starting with __ and the normal name is an alias.  */
9501 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9502 #error found stub for $ac_func
9503 #endif
9504
9505         return $ac_func ();
9506   ;
9507   return 0;
9508 }
9509 _ACEOF
9510 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9511 if { (eval echo "$as_me:9511: \"$ac_link\"") >&5
9512   (eval $ac_link) 2>&5
9513   ac_status=$?
9514   echo "$as_me:9514: \$? = $ac_status" >&5
9515   (exit "$ac_status"); } &&
9516          { ac_try='test -s "conftest$ac_exeext"'
9517   { (eval echo "$as_me:9517: \"$ac_try\"") >&5
9518   (eval $ac_try) 2>&5
9519   ac_status=$?
9520   echo "$as_me:9520: \$? = $ac_status" >&5
9521   (exit "$ac_status"); }; }; then
9522   eval "$as_ac_var=yes"
9523 else
9524   echo "$as_me: failed program was:" >&5
9525 cat "conftest.$ac_ext" >&5
9526 eval "$as_ac_var=no"
9527 fi
9528 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9529 fi
9530 echo "$as_me:9530: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9531 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9532 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9533   cat >>confdefs.h <<EOF
9534 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9535 EOF
9536
9537 fi
9538 done
9539
9540 if test "$cross_compiling" = yes ; then
9541
9542 for ac_func in \
9543                 link \
9544                 symlink
9545 do
9546 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9547 echo "$as_me:9547: checking for $ac_func" >&5
9548 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9549 if eval "test \"\${$as_ac_var+set}\" = set"; then
9550   echo $ECHO_N "(cached) $ECHO_C" >&6
9551 else
9552   cat >"conftest.$ac_ext" <<_ACEOF
9553 #line 9553 "configure"
9554 #include "confdefs.h"
9555 #define $ac_func autoconf_temporary
9556 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9557 #undef $ac_func
9558
9559 #ifdef __cplusplus
9560 extern "C"
9561 #endif
9562
9563 /* We use char because int might match the return type of a gcc2
9564    builtin and then its argument prototype would still apply.  */
9565 char $ac_func (void);
9566
9567 int
9568 main (void)
9569 {
9570
9571 /* The GNU C library defines stubs for functions which it implements
9572     to always fail with ENOSYS.  Some functions are actually named
9573     something starting with __ and the normal name is an alias.  */
9574 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9575 #error found stub for $ac_func
9576 #endif
9577
9578         return $ac_func ();
9579   ;
9580   return 0;
9581 }
9582 _ACEOF
9583 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9584 if { (eval echo "$as_me:9584: \"$ac_link\"") >&5
9585   (eval $ac_link) 2>&5
9586   ac_status=$?
9587   echo "$as_me:9587: \$? = $ac_status" >&5
9588   (exit "$ac_status"); } &&
9589          { ac_try='test -s "conftest$ac_exeext"'
9590   { (eval echo "$as_me:9590: \"$ac_try\"") >&5
9591   (eval $ac_try) 2>&5
9592   ac_status=$?
9593   echo "$as_me:9593: \$? = $ac_status" >&5
9594   (exit "$ac_status"); }; }; then
9595   eval "$as_ac_var=yes"
9596 else
9597   echo "$as_me: failed program was:" >&5
9598 cat "conftest.$ac_ext" >&5
9599 eval "$as_ac_var=no"
9600 fi
9601 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9602 fi
9603 echo "$as_me:9603: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9604 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9605 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9606   cat >>confdefs.h <<EOF
9607 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9608 EOF
9609
9610 fi
9611 done
9612
9613 else
9614         echo "$as_me:9614: checking if link/symlink functions work" >&5
9615 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9616 if test "${cf_cv_link_funcs+set}" = set; then
9617   echo $ECHO_N "(cached) $ECHO_C" >&6
9618 else
9619
9620                 cf_cv_link_funcs=
9621                 for cf_func in link symlink ; do
9622                         if test "$cross_compiling" = yes; then
9623
9624                         eval 'ac_cv_func_'$cf_func'=error'
9625 else
9626   cat >"conftest.$ac_ext" <<_ACEOF
9627 #line 9627 "configure"
9628 #include "confdefs.h"
9629
9630 #include <stdio.h>
9631 #include <sys/types.h>
9632 #include <sys/stat.h>
9633 #ifdef HAVE_UNISTD_H
9634 #include <unistd.h>
9635 #endif
9636 int main(void)
9637 {
9638         int fail = 0;
9639         char *src = "conftest.tmp";
9640         char *dst = "conftest.chk";
9641         struct stat src_sb, dst_sb;
9642         FILE *fp = fopen(src, "w");
9643         if (fp == 0) { fail = 3; } else {
9644                 fclose(fp); stat(src, &src_sb);
9645                 if ($cf_func(src, dst) < 0) {
9646                         fail = 1;
9647                 } else if (stat(dst, &dst_sb) < 0) {
9648                         fail = 2;
9649                 } else {
9650                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9651                         if (diff < 0) diff = -diff;
9652                         if (diff > 2) fail = 3;
9653                 }
9654         }
9655 #ifdef HAVE_UNLINK
9656         unlink(dst); unlink(src);
9657 #else
9658         remove(dst); remove(src);
9659 #endif
9660         ${cf_cv_main_return:-return} (fail);
9661 }
9662
9663 _ACEOF
9664 rm -f "conftest$ac_exeext"
9665 if { (eval echo "$as_me:9665: \"$ac_link\"") >&5
9666   (eval $ac_link) 2>&5
9667   ac_status=$?
9668   echo "$as_me:9668: \$? = $ac_status" >&5
9669   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9670   { (eval echo "$as_me:9670: \"$ac_try\"") >&5
9671   (eval $ac_try) 2>&5
9672   ac_status=$?
9673   echo "$as_me:9673: \$? = $ac_status" >&5
9674   (exit "$ac_status"); }; }; then
9675
9676                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9677                         eval 'ac_cv_func_'$cf_func'=yes'
9678 else
9679   echo "$as_me: program exited with status $ac_status" >&5
9680 echo "$as_me: failed program was:" >&5
9681 cat "conftest.$ac_ext" >&5
9682
9683                         eval 'ac_cv_func_'$cf_func'=no'
9684 fi
9685 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9686 fi
9687                 done
9688                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9689
9690 fi
9691 echo "$as_me:9691: result: $cf_cv_link_funcs" >&5
9692 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9693         test "$ac_cv_func_link"    = yes &&
9694 cat >>confdefs.h <<\EOF
9695 #define HAVE_LINK 1
9696 EOF
9697
9698         test "$ac_cv_func_symlink" = yes &&
9699 cat >>confdefs.h <<\EOF
9700 #define HAVE_SYMLINK 1
9701 EOF
9702
9703 fi
9704
9705 with_links=no
9706 with_symlinks=no
9707
9708 # soft links (symbolic links) are useful for some systems where hard links do
9709 # not work, or to make it simpler to copy terminfo trees around.
9710 if test "x$ac_cv_func_symlink" = xyes ; then
9711         echo "$as_me:9711: checking if tic should use symbolic links" >&5
9712 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9713
9714 # Check whether --enable-symlinks or --disable-symlinks was given.
9715 if test "${enable_symlinks+set}" = set; then
9716   enableval="$enable_symlinks"
9717   with_symlinks=$enableval
9718 else
9719   with_symlinks=no
9720 fi;
9721         echo "$as_me:9721: result: $with_symlinks" >&5
9722 echo "${ECHO_T}$with_symlinks" >&6
9723 fi
9724
9725 # If we have hard links and did not choose to use soft links instead, there is
9726 # no reason to make this choice optional - use the hard links.
9727 if test "$with_symlinks" = no ; then
9728         echo "$as_me:9728: checking if tic should use hard links" >&5
9729 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9730         if test "x$ac_cv_func_link" = xyes ; then
9731                 with_links=yes
9732         else
9733                 with_links=no
9734         fi
9735         echo "$as_me:9735: result: $with_links" >&5
9736 echo "${ECHO_T}$with_links" >&6
9737 fi
9738
9739 test "x$with_links" = xyes &&
9740 cat >>confdefs.h <<\EOF
9741 #define USE_LINKS 1
9742 EOF
9743
9744 test "x$with_symlinks" = xyes &&
9745 cat >>confdefs.h <<\EOF
9746 #define USE_SYMLINKS 1
9747 EOF
9748
9749 ###   use option --enable-broken-linker to force on use of broken-linker support
9750
9751 echo "$as_me:9751: checking if you want broken-linker support code" >&5
9752 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9753
9754 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9755 if test "${enable_broken_linker+set}" = set; then
9756   enableval="$enable_broken_linker"
9757   with_broken_linker=$enableval
9758 else
9759   with_broken_linker=no
9760 fi;
9761 echo "$as_me:9761: result: $with_broken_linker" >&5
9762 echo "${ECHO_T}$with_broken_linker" >&6
9763
9764 : "${BROKEN_LINKER:=0}"
9765 if test "x$with_broken_linker" = xyes ; then
9766
9767 cat >>confdefs.h <<\EOF
9768 #define BROKEN_LINKER 1
9769 EOF
9770
9771         BROKEN_LINKER=1
9772 fi
9773
9774 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9775 echo "$as_me:9775: checking if tputs should process BSD-style prefix padding" >&5
9776 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9777
9778 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9779 if test "${enable_bsdpad+set}" = set; then
9780   enableval="$enable_bsdpad"
9781   with_bsdpad=$enableval
9782 else
9783   with_bsdpad=no
9784 fi;
9785 echo "$as_me:9785: result: $with_bsdpad" >&5
9786 echo "${ECHO_T}$with_bsdpad" >&6
9787 test "x$with_bsdpad" = xyes &&
9788 cat >>confdefs.h <<\EOF
9789 #define BSD_TPUTS 1
9790 EOF
9791
9792 ###   use option --enable-widec to turn on use of wide-character support
9793 NCURSES_CH_T=chtype
9794 NCURSES_LIBUTF8=0
9795
9796 NEED_WCHAR_H=0
9797 NCURSES_MBSTATE_T=0
9798 NCURSES_WCHAR_T=0
9799 NCURSES_WINT_T=0
9800
9801 # Check to define _XOPEN_SOURCE "automatically"
9802 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9803
9804 echo "$as_me:9804: checking if the POSIX test-macros are already defined" >&5
9805 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9806 if test "${cf_cv_posix_visible+set}" = set; then
9807   echo $ECHO_N "(cached) $ECHO_C" >&6
9808 else
9809
9810 cat >"conftest.$ac_ext" <<_ACEOF
9811 #line 9811 "configure"
9812 #include "confdefs.h"
9813 #include <stdio.h>
9814 int
9815 main (void)
9816 {
9817
9818 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9819         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9820         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9821         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9822 #error conflicting symbols found
9823 #endif
9824
9825   ;
9826   return 0;
9827 }
9828 _ACEOF
9829 rm -f "conftest.$ac_objext"
9830 if { (eval echo "$as_me:9830: \"$ac_compile\"") >&5
9831   (eval $ac_compile) 2>&5
9832   ac_status=$?
9833   echo "$as_me:9833: \$? = $ac_status" >&5
9834   (exit "$ac_status"); } &&
9835          { ac_try='test -s "conftest.$ac_objext"'
9836   { (eval echo "$as_me:9836: \"$ac_try\"") >&5
9837   (eval $ac_try) 2>&5
9838   ac_status=$?
9839   echo "$as_me:9839: \$? = $ac_status" >&5
9840   (exit "$ac_status"); }; }; then
9841   cf_cv_posix_visible=no
9842 else
9843   echo "$as_me: failed program was:" >&5
9844 cat "conftest.$ac_ext" >&5
9845 cf_cv_posix_visible=yes
9846 fi
9847 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9848
9849 fi
9850 echo "$as_me:9850: result: $cf_cv_posix_visible" >&5
9851 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9852
9853 if test "$cf_cv_posix_visible" = no; then
9854
9855 cf_XOPEN_SOURCE=600
9856 cf_POSIX_C_SOURCE=199506L
9857 cf_xopen_source=
9858
9859 case "$host_os" in
9860 (aix[4-7]*)
9861         cf_xopen_source="-D_ALL_SOURCE"
9862         ;;
9863 (msys)
9864         cf_XOPEN_SOURCE=600
9865         ;;
9866 (darwin[0-8].*)
9867         cf_xopen_source="-D_APPLE_C_SOURCE"
9868         ;;
9869 (darwin*)
9870         cf_xopen_source="-D_DARWIN_C_SOURCE"
9871         cf_XOPEN_SOURCE=
9872         ;;
9873 (freebsd*|dragonfly*|midnightbsd*)
9874         # 5.x headers associate
9875         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9876         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9877         cf_POSIX_C_SOURCE=200112L
9878         cf_XOPEN_SOURCE=600
9879         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9880         ;;
9881 (hpux11*)
9882         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9883         ;;
9884 (hpux*)
9885         cf_xopen_source="-D_HPUX_SOURCE"
9886         ;;
9887 (irix[56].*)
9888         cf_xopen_source="-D_SGI_SOURCE"
9889         cf_XOPEN_SOURCE=
9890         ;;
9891 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9892
9893 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9894
9895 echo "$as_me:9895: checking if this is the GNU C library" >&5
9896 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9897 if test "${cf_cv_gnu_library+set}" = set; then
9898   echo $ECHO_N "(cached) $ECHO_C" >&6
9899 else
9900
9901 cat >"conftest.$ac_ext" <<_ACEOF
9902 #line 9902 "configure"
9903 #include "confdefs.h"
9904 #include <sys/types.h>
9905 int
9906 main (void)
9907 {
9908
9909         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9910                 return 0;
9911         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9912                 return 0;
9913         #else
9914         #       error not GNU C library
9915         #endif
9916   ;
9917   return 0;
9918 }
9919 _ACEOF
9920 rm -f "conftest.$ac_objext"
9921 if { (eval echo "$as_me:9921: \"$ac_compile\"") >&5
9922   (eval $ac_compile) 2>&5
9923   ac_status=$?
9924   echo "$as_me:9924: \$? = $ac_status" >&5
9925   (exit "$ac_status"); } &&
9926          { ac_try='test -s "conftest.$ac_objext"'
9927   { (eval echo "$as_me:9927: \"$ac_try\"") >&5
9928   (eval $ac_try) 2>&5
9929   ac_status=$?
9930   echo "$as_me:9930: \$? = $ac_status" >&5
9931   (exit "$ac_status"); }; }; then
9932   cf_cv_gnu_library=yes
9933 else
9934   echo "$as_me: failed program was:" >&5
9935 cat "conftest.$ac_ext" >&5
9936 cf_cv_gnu_library=no
9937 fi
9938 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9939
9940 fi
9941 echo "$as_me:9941: result: $cf_cv_gnu_library" >&5
9942 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9943
9944 if test x$cf_cv_gnu_library = xyes; then
9945
9946         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9947         # was changed to help a little.  newlib incorporated the change about 4
9948         # years later.
9949         echo "$as_me:9949: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9950 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9951 if test "${cf_cv_gnu_library_219+set}" = set; then
9952   echo $ECHO_N "(cached) $ECHO_C" >&6
9953 else
9954
9955                 cf_save="$CPPFLAGS"
9956
9957         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9958         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9959
9960                 cat >"conftest.$ac_ext" <<_ACEOF
9961 #line 9961 "configure"
9962 #include "confdefs.h"
9963 #include <sys/types.h>
9964 int
9965 main (void)
9966 {
9967
9968                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9969                                 return 0;
9970                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9971                                 return 0;
9972                         #else
9973                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9974                         #endif
9975   ;
9976   return 0;
9977 }
9978 _ACEOF
9979 rm -f "conftest.$ac_objext"
9980 if { (eval echo "$as_me:9980: \"$ac_compile\"") >&5
9981   (eval $ac_compile) 2>&5
9982   ac_status=$?
9983   echo "$as_me:9983: \$? = $ac_status" >&5
9984   (exit "$ac_status"); } &&
9985          { ac_try='test -s "conftest.$ac_objext"'
9986   { (eval echo "$as_me:9986: \"$ac_try\"") >&5
9987   (eval $ac_try) 2>&5
9988   ac_status=$?
9989   echo "$as_me:9989: \$? = $ac_status" >&5
9990   (exit "$ac_status"); }; }; then
9991   cf_cv_gnu_library_219=yes
9992 else
9993   echo "$as_me: failed program was:" >&5
9994 cat "conftest.$ac_ext" >&5
9995 cf_cv_gnu_library_219=no
9996 fi
9997 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9998                 CPPFLAGS="$cf_save"
9999
10000 fi
10001 echo "$as_me:10001: result: $cf_cv_gnu_library_219" >&5
10002 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10003
10004         if test "x$cf_cv_gnu_library_219" = xyes; then
10005                 cf_save="$CPPFLAGS"
10006                 echo "$as_me:10006: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10007 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10008 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10009   echo $ECHO_N "(cached) $ECHO_C" >&6
10010 else
10011
10012 cf_fix_cppflags=no
10013 cf_new_cflags=
10014 cf_new_cppflags=
10015 cf_new_extra_cppflags=
10016
10017 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10018 do
10019 case "$cf_fix_cppflags" in
10020 (no)
10021         case "$cf_add_cflags" in
10022         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10023                 case "$cf_add_cflags" in
10024                 (-D*)
10025                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10026
10027                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10028                                 && test -z "${cf_tst_cflags}" \
10029                                 && cf_fix_cppflags=yes
10030
10031                         if test "$cf_fix_cppflags" = yes ; then
10032
10033         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10034         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10035
10036                                 continue
10037                         elif test "${cf_tst_cflags}" = "\"'" ; then
10038
10039         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10040         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10041
10042                                 continue
10043                         fi
10044                         ;;
10045                 esac
10046                 case "$CPPFLAGS" in
10047                 (*$cf_add_cflags)
10048                         ;;
10049                 (*)
10050                         case "$cf_add_cflags" in
10051                         (-D*)
10052                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10053
10054 CPPFLAGS=`echo "$CPPFLAGS" | \
10055         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10056                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10057
10058                                 ;;
10059                         esac
10060
10061         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10062         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10063
10064                         ;;
10065                 esac
10066                 ;;
10067         (*)
10068
10069         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10070         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10071
10072                 ;;
10073         esac
10074         ;;
10075 (yes)
10076
10077         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10078         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10079
10080         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10081
10082         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10083                 && test -z "${cf_tst_cflags}" \
10084                 && cf_fix_cppflags=no
10085         ;;
10086 esac
10087 done
10088
10089 if test -n "$cf_new_cflags" ; then
10090
10091         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10092         CFLAGS="${CFLAGS}$cf_new_cflags"
10093
10094 fi
10095
10096 if test -n "$cf_new_cppflags" ; then
10097
10098         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10099         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10100
10101 fi
10102
10103 if test -n "$cf_new_extra_cppflags" ; then
10104
10105         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10106         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10107
10108 fi
10109
10110                         cat >"conftest.$ac_ext" <<_ACEOF
10111 #line 10111 "configure"
10112 #include "confdefs.h"
10113
10114                                 #include <limits.h>
10115                                 #include <sys/types.h>
10116
10117 int
10118 main (void)
10119 {
10120
10121                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10122                                         return 0;
10123                                 #else
10124                                 #       error GNU C library is too old
10125                                 #endif
10126   ;
10127   return 0;
10128 }
10129 _ACEOF
10130 rm -f "conftest.$ac_objext"
10131 if { (eval echo "$as_me:10131: \"$ac_compile\"") >&5
10132   (eval $ac_compile) 2>&5
10133   ac_status=$?
10134   echo "$as_me:10134: \$? = $ac_status" >&5
10135   (exit "$ac_status"); } &&
10136          { ac_try='test -s "conftest.$ac_objext"'
10137   { (eval echo "$as_me:10137: \"$ac_try\"") >&5
10138   (eval $ac_try) 2>&5
10139   ac_status=$?
10140   echo "$as_me:10140: \$? = $ac_status" >&5
10141   (exit "$ac_status"); }; }; then
10142   cf_cv_gnu_dftsrc_219=yes
10143 else
10144   echo "$as_me: failed program was:" >&5
10145 cat "conftest.$ac_ext" >&5
10146 cf_cv_gnu_dftsrc_219=no
10147 fi
10148 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10149
10150 fi
10151 echo "$as_me:10151: result: $cf_cv_gnu_dftsrc_219" >&5
10152 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10153                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10154         else
10155                 cf_cv_gnu_dftsrc_219=maybe
10156         fi
10157
10158         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10159
10160                 echo "$as_me:10160: checking if we must define _GNU_SOURCE" >&5
10161 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10162 if test "${cf_cv_gnu_source+set}" = set; then
10163   echo $ECHO_N "(cached) $ECHO_C" >&6
10164 else
10165
10166                 cat >"conftest.$ac_ext" <<_ACEOF
10167 #line 10167 "configure"
10168 #include "confdefs.h"
10169 #include <sys/types.h>
10170 int
10171 main (void)
10172 {
10173
10174                         #ifndef _XOPEN_SOURCE
10175                         #error  expected _XOPEN_SOURCE to be defined
10176                         #endif
10177   ;
10178   return 0;
10179 }
10180 _ACEOF
10181 rm -f "conftest.$ac_objext"
10182 if { (eval echo "$as_me:10182: \"$ac_compile\"") >&5
10183   (eval $ac_compile) 2>&5
10184   ac_status=$?
10185   echo "$as_me:10185: \$? = $ac_status" >&5
10186   (exit "$ac_status"); } &&
10187          { ac_try='test -s "conftest.$ac_objext"'
10188   { (eval echo "$as_me:10188: \"$ac_try\"") >&5
10189   (eval $ac_try) 2>&5
10190   ac_status=$?
10191   echo "$as_me:10191: \$? = $ac_status" >&5
10192   (exit "$ac_status"); }; }; then
10193   cf_cv_gnu_source=no
10194 else
10195   echo "$as_me: failed program was:" >&5
10196 cat "conftest.$ac_ext" >&5
10197 cf_save="$CPPFLAGS"
10198
10199 cf_fix_cppflags=no
10200 cf_new_cflags=
10201 cf_new_cppflags=
10202 cf_new_extra_cppflags=
10203
10204 for cf_add_cflags in -D_GNU_SOURCE
10205 do
10206 case "$cf_fix_cppflags" in
10207 (no)
10208         case "$cf_add_cflags" in
10209         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10210                 case "$cf_add_cflags" in
10211                 (-D*)
10212                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10213
10214                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10215                                 && test -z "${cf_tst_cflags}" \
10216                                 && cf_fix_cppflags=yes
10217
10218                         if test "$cf_fix_cppflags" = yes ; then
10219
10220         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10221         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10222
10223                                 continue
10224                         elif test "${cf_tst_cflags}" = "\"'" ; then
10225
10226         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10227         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10228
10229                                 continue
10230                         fi
10231                         ;;
10232                 esac
10233                 case "$CPPFLAGS" in
10234                 (*$cf_add_cflags)
10235                         ;;
10236                 (*)
10237                         case "$cf_add_cflags" in
10238                         (-D*)
10239                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10240
10241 CPPFLAGS=`echo "$CPPFLAGS" | \
10242         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10243                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10244
10245                                 ;;
10246                         esac
10247
10248         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10249         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10250
10251                         ;;
10252                 esac
10253                 ;;
10254         (*)
10255
10256         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10257         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10258
10259                 ;;
10260         esac
10261         ;;
10262 (yes)
10263
10264         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10265         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10266
10267         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10268
10269         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10270                 && test -z "${cf_tst_cflags}" \
10271                 && cf_fix_cppflags=no
10272         ;;
10273 esac
10274 done
10275
10276 if test -n "$cf_new_cflags" ; then
10277
10278         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10279         CFLAGS="${CFLAGS}$cf_new_cflags"
10280
10281 fi
10282
10283 if test -n "$cf_new_cppflags" ; then
10284
10285         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10286         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10287
10288 fi
10289
10290 if test -n "$cf_new_extra_cppflags" ; then
10291
10292         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10293         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10294
10295 fi
10296
10297                          cat >"conftest.$ac_ext" <<_ACEOF
10298 #line 10298 "configure"
10299 #include "confdefs.h"
10300 #include <sys/types.h>
10301 int
10302 main (void)
10303 {
10304
10305                                 #ifdef _XOPEN_SOURCE
10306                                 #error  expected _XOPEN_SOURCE to be undefined
10307                                 #endif
10308   ;
10309   return 0;
10310 }
10311 _ACEOF
10312 rm -f "conftest.$ac_objext"
10313 if { (eval echo "$as_me:10313: \"$ac_compile\"") >&5
10314   (eval $ac_compile) 2>&5
10315   ac_status=$?
10316   echo "$as_me:10316: \$? = $ac_status" >&5
10317   (exit "$ac_status"); } &&
10318          { ac_try='test -s "conftest.$ac_objext"'
10319   { (eval echo "$as_me:10319: \"$ac_try\"") >&5
10320   (eval $ac_try) 2>&5
10321   ac_status=$?
10322   echo "$as_me:10322: \$? = $ac_status" >&5
10323   (exit "$ac_status"); }; }; then
10324   cf_cv_gnu_source=no
10325 else
10326   echo "$as_me: failed program was:" >&5
10327 cat "conftest.$ac_ext" >&5
10328 cf_cv_gnu_source=yes
10329 fi
10330 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10331                         CPPFLAGS="$cf_save"
10332
10333 fi
10334 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10335
10336 fi
10337 echo "$as_me:10337: result: $cf_cv_gnu_source" >&5
10338 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10339
10340                 if test "$cf_cv_gnu_source" = yes
10341                 then
10342                 echo "$as_me:10342: checking if we should also define _DEFAULT_SOURCE" >&5
10343 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10344 if test "${cf_cv_default_source+set}" = set; then
10345   echo $ECHO_N "(cached) $ECHO_C" >&6
10346 else
10347
10348         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10349         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10350
10351                         cat >"conftest.$ac_ext" <<_ACEOF
10352 #line 10352 "configure"
10353 #include "confdefs.h"
10354 #include <sys/types.h>
10355 int
10356 main (void)
10357 {
10358
10359                                 #ifdef _DEFAULT_SOURCE
10360                                 #error  expected _DEFAULT_SOURCE to be undefined
10361                                 #endif
10362   ;
10363   return 0;
10364 }
10365 _ACEOF
10366 rm -f "conftest.$ac_objext"
10367 if { (eval echo "$as_me:10367: \"$ac_compile\"") >&5
10368   (eval $ac_compile) 2>&5
10369   ac_status=$?
10370   echo "$as_me:10370: \$? = $ac_status" >&5
10371   (exit "$ac_status"); } &&
10372          { ac_try='test -s "conftest.$ac_objext"'
10373   { (eval echo "$as_me:10373: \"$ac_try\"") >&5
10374   (eval $ac_try) 2>&5
10375   ac_status=$?
10376   echo "$as_me:10376: \$? = $ac_status" >&5
10377   (exit "$ac_status"); }; }; then
10378   cf_cv_default_source=no
10379 else
10380   echo "$as_me: failed program was:" >&5
10381 cat "conftest.$ac_ext" >&5
10382 cf_cv_default_source=yes
10383 fi
10384 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10385
10386 fi
10387 echo "$as_me:10387: result: $cf_cv_default_source" >&5
10388 echo "${ECHO_T}$cf_cv_default_source" >&6
10389                         if test "$cf_cv_default_source" = yes
10390                         then
10391
10392         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10393         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10394
10395                         fi
10396                 fi
10397         fi
10398
10399 fi
10400
10401         ;;
10402 (minix*)
10403         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10404         ;;
10405 (mirbsd*)
10406         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10407         cf_XOPEN_SOURCE=
10408
10409 if test "$cf_cv_posix_visible" = no; then
10410
10411 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10412
10413 cf_save_CFLAGS="$CFLAGS"
10414 cf_save_CPPFLAGS="$CPPFLAGS"
10415
10416 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10417         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10418                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10419
10420 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10421         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10422                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10423
10424 echo "$as_me:10424: checking if we should define _POSIX_C_SOURCE" >&5
10425 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10426 if test "${cf_cv_posix_c_source+set}" = set; then
10427   echo $ECHO_N "(cached) $ECHO_C" >&6
10428 else
10429
10430 echo "${as_me:-configure}:10430: testing if the symbol is already defined go no further ..." 1>&5
10431
10432         cat >"conftest.$ac_ext" <<_ACEOF
10433 #line 10433 "configure"
10434 #include "confdefs.h"
10435 #include <sys/types.h>
10436 int
10437 main (void)
10438 {
10439
10440 #ifndef _POSIX_C_SOURCE
10441 make an error
10442 #endif
10443   ;
10444   return 0;
10445 }
10446 _ACEOF
10447 rm -f "conftest.$ac_objext"
10448 if { (eval echo "$as_me:10448: \"$ac_compile\"") >&5
10449   (eval $ac_compile) 2>&5
10450   ac_status=$?
10451   echo "$as_me:10451: \$? = $ac_status" >&5
10452   (exit "$ac_status"); } &&
10453          { ac_try='test -s "conftest.$ac_objext"'
10454   { (eval echo "$as_me:10454: \"$ac_try\"") >&5
10455   (eval $ac_try) 2>&5
10456   ac_status=$?
10457   echo "$as_me:10457: \$? = $ac_status" >&5
10458   (exit "$ac_status"); }; }; then
10459   cf_cv_posix_c_source=no
10460 else
10461   echo "$as_me: failed program was:" >&5
10462 cat "conftest.$ac_ext" >&5
10463 cf_want_posix_source=no
10464          case .$cf_POSIX_C_SOURCE in
10465          (.[12]??*)
10466                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10467                 ;;
10468          (.2)
10469                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10470                 cf_want_posix_source=yes
10471                 ;;
10472          (.*)
10473                 cf_want_posix_source=yes
10474                 ;;
10475          esac
10476          if test "$cf_want_posix_source" = yes ; then
10477                 cat >"conftest.$ac_ext" <<_ACEOF
10478 #line 10478 "configure"
10479 #include "confdefs.h"
10480 #include <sys/types.h>
10481 int
10482 main (void)
10483 {
10484
10485 #ifdef _POSIX_SOURCE
10486 make an error
10487 #endif
10488   ;
10489   return 0;
10490 }
10491 _ACEOF
10492 rm -f "conftest.$ac_objext"
10493 if { (eval echo "$as_me:10493: \"$ac_compile\"") >&5
10494   (eval $ac_compile) 2>&5
10495   ac_status=$?
10496   echo "$as_me:10496: \$? = $ac_status" >&5
10497   (exit "$ac_status"); } &&
10498          { ac_try='test -s "conftest.$ac_objext"'
10499   { (eval echo "$as_me:10499: \"$ac_try\"") >&5
10500   (eval $ac_try) 2>&5
10501   ac_status=$?
10502   echo "$as_me:10502: \$? = $ac_status" >&5
10503   (exit "$ac_status"); }; }; then
10504   :
10505 else
10506   echo "$as_me: failed program was:" >&5
10507 cat "conftest.$ac_ext" >&5
10508 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10509 fi
10510 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10511          fi
10512
10513 echo "${as_me:-configure}:10513: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10514
10515          CFLAGS="$cf_trim_CFLAGS"
10516          CPPFLAGS="$cf_trim_CPPFLAGS"
10517
10518         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10519         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10520
10521 echo "${as_me:-configure}:10521: testing if the second compile does not leave our definition intact error ..." 1>&5
10522
10523          cat >"conftest.$ac_ext" <<_ACEOF
10524 #line 10524 "configure"
10525 #include "confdefs.h"
10526 #include <sys/types.h>
10527 int
10528 main (void)
10529 {
10530
10531 #ifndef _POSIX_C_SOURCE
10532 make an error
10533 #endif
10534   ;
10535   return 0;
10536 }
10537 _ACEOF
10538 rm -f "conftest.$ac_objext"
10539 if { (eval echo "$as_me:10539: \"$ac_compile\"") >&5
10540   (eval $ac_compile) 2>&5
10541   ac_status=$?
10542   echo "$as_me:10542: \$? = $ac_status" >&5
10543   (exit "$ac_status"); } &&
10544          { ac_try='test -s "conftest.$ac_objext"'
10545   { (eval echo "$as_me:10545: \"$ac_try\"") >&5
10546   (eval $ac_try) 2>&5
10547   ac_status=$?
10548   echo "$as_me:10548: \$? = $ac_status" >&5
10549   (exit "$ac_status"); }; }; then
10550   :
10551 else
10552   echo "$as_me: failed program was:" >&5
10553 cat "conftest.$ac_ext" >&5
10554 cf_cv_posix_c_source=no
10555 fi
10556 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10557          CFLAGS="$cf_save_CFLAGS"
10558          CPPFLAGS="$cf_save_CPPFLAGS"
10559
10560 fi
10561 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10562
10563 fi
10564 echo "$as_me:10564: result: $cf_cv_posix_c_source" >&5
10565 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10566
10567 if test "$cf_cv_posix_c_source" != no ; then
10568         CFLAGS="$cf_trim_CFLAGS"
10569         CPPFLAGS="$cf_trim_CPPFLAGS"
10570
10571 cf_fix_cppflags=no
10572 cf_new_cflags=
10573 cf_new_cppflags=
10574 cf_new_extra_cppflags=
10575
10576 for cf_add_cflags in $cf_cv_posix_c_source
10577 do
10578 case "$cf_fix_cppflags" in
10579 (no)
10580         case "$cf_add_cflags" in
10581         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10582                 case "$cf_add_cflags" in
10583                 (-D*)
10584                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10585
10586                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10587                                 && test -z "${cf_tst_cflags}" \
10588                                 && cf_fix_cppflags=yes
10589
10590                         if test "$cf_fix_cppflags" = yes ; then
10591
10592         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10593         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10594
10595                                 continue
10596                         elif test "${cf_tst_cflags}" = "\"'" ; then
10597
10598         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10599         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10600
10601                                 continue
10602                         fi
10603                         ;;
10604                 esac
10605                 case "$CPPFLAGS" in
10606                 (*$cf_add_cflags)
10607                         ;;
10608                 (*)
10609                         case "$cf_add_cflags" in
10610                         (-D*)
10611                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10612
10613 CPPFLAGS=`echo "$CPPFLAGS" | \
10614         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10615                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10616
10617                                 ;;
10618                         esac
10619
10620         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10621         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10622
10623                         ;;
10624                 esac
10625                 ;;
10626         (*)
10627
10628         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10629         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10630
10631                 ;;
10632         esac
10633         ;;
10634 (yes)
10635
10636         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10637         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10638
10639         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10640
10641         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10642                 && test -z "${cf_tst_cflags}" \
10643                 && cf_fix_cppflags=no
10644         ;;
10645 esac
10646 done
10647
10648 if test -n "$cf_new_cflags" ; then
10649
10650         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10651         CFLAGS="${CFLAGS}$cf_new_cflags"
10652
10653 fi
10654
10655 if test -n "$cf_new_cppflags" ; then
10656
10657         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10658         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10659
10660 fi
10661
10662 if test -n "$cf_new_extra_cppflags" ; then
10663
10664         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10665         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10666
10667 fi
10668
10669 fi
10670
10671 fi # cf_cv_posix_visible
10672
10673         ;;
10674 (netbsd*)
10675         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10676         ;;
10677 (openbsd[6-9]*)
10678         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10679         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10680         # Abusing the conformance level is a workaround.
10681         { echo "$as_me:10681: WARNING: this system does not provide usable locale support" >&5
10682 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10683         cf_xopen_source="-D_BSD_SOURCE"
10684         cf_XOPEN_SOURCE=700
10685         ;;
10686 (openbsd[4-5]*)
10687         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10688         cf_xopen_source="-D_BSD_SOURCE"
10689         cf_XOPEN_SOURCE=600
10690         ;;
10691 (openbsd*)
10692         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10693         ;;
10694 (osf[45]*)
10695         cf_xopen_source="-D_OSF_SOURCE"
10696         ;;
10697 (nto-qnx*)
10698         cf_xopen_source="-D_QNX_SOURCE"
10699         ;;
10700 (sco*)
10701         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10702         ;;
10703 (solaris2.*)
10704         cf_xopen_source="-D__EXTENSIONS__"
10705         cf_cv_xopen_source=broken
10706         ;;
10707 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10708         cf_XOPEN_SOURCE=
10709         cf_POSIX_C_SOURCE=
10710         ;;
10711 (*)
10712
10713 echo "$as_me:10713: checking if we should define _XOPEN_SOURCE" >&5
10714 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10715 if test "${cf_cv_xopen_source+set}" = set; then
10716   echo $ECHO_N "(cached) $ECHO_C" >&6
10717 else
10718
10719         cat >"conftest.$ac_ext" <<_ACEOF
10720 #line 10720 "configure"
10721 #include "confdefs.h"
10722
10723 #include <stdlib.h>
10724 #include <string.h>
10725 #include <sys/types.h>
10726
10727 int
10728 main (void)
10729 {
10730
10731 #ifndef _XOPEN_SOURCE
10732 make an error
10733 #endif
10734   ;
10735   return 0;
10736 }
10737 _ACEOF
10738 rm -f "conftest.$ac_objext"
10739 if { (eval echo "$as_me:10739: \"$ac_compile\"") >&5
10740   (eval $ac_compile) 2>&5
10741   ac_status=$?
10742   echo "$as_me:10742: \$? = $ac_status" >&5
10743   (exit "$ac_status"); } &&
10744          { ac_try='test -s "conftest.$ac_objext"'
10745   { (eval echo "$as_me:10745: \"$ac_try\"") >&5
10746   (eval $ac_try) 2>&5
10747   ac_status=$?
10748   echo "$as_me:10748: \$? = $ac_status" >&5
10749   (exit "$ac_status"); }; }; then
10750   cf_cv_xopen_source=no
10751 else
10752   echo "$as_me: failed program was:" >&5
10753 cat "conftest.$ac_ext" >&5
10754 cf_save="$CPPFLAGS"
10755
10756         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10757         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10758
10759          cat >"conftest.$ac_ext" <<_ACEOF
10760 #line 10760 "configure"
10761 #include "confdefs.h"
10762
10763 #include <stdlib.h>
10764 #include <string.h>
10765 #include <sys/types.h>
10766
10767 int
10768 main (void)
10769 {
10770
10771 #ifdef _XOPEN_SOURCE
10772 make an error
10773 #endif
10774   ;
10775   return 0;
10776 }
10777 _ACEOF
10778 rm -f "conftest.$ac_objext"
10779 if { (eval echo "$as_me:10779: \"$ac_compile\"") >&5
10780   (eval $ac_compile) 2>&5
10781   ac_status=$?
10782   echo "$as_me:10782: \$? = $ac_status" >&5
10783   (exit "$ac_status"); } &&
10784          { ac_try='test -s "conftest.$ac_objext"'
10785   { (eval echo "$as_me:10785: \"$ac_try\"") >&5
10786   (eval $ac_try) 2>&5
10787   ac_status=$?
10788   echo "$as_me:10788: \$? = $ac_status" >&5
10789   (exit "$ac_status"); }; }; then
10790   cf_cv_xopen_source=no
10791 else
10792   echo "$as_me: failed program was:" >&5
10793 cat "conftest.$ac_ext" >&5
10794 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10795 fi
10796 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10797         CPPFLAGS="$cf_save"
10798
10799 fi
10800 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10801
10802 fi
10803 echo "$as_me:10803: result: $cf_cv_xopen_source" >&5
10804 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10805
10806 if test "$cf_cv_xopen_source" != no ; then
10807
10808 CFLAGS=`echo "$CFLAGS" | \
10809         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10810                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10811
10812 CPPFLAGS=`echo "$CPPFLAGS" | \
10813         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10814                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10815
10816         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10817
10818 for cf_add_cflags in $cf_temp_xopen_source
10819 do
10820         case "x$cf_add_cflags" in
10821         (x-[DU]*)
10822
10823 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10824 while true
10825 do
10826         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'`
10827         test "$CFLAGS" != "$cf_old_cflag" || break
10828
10829         CFLAGS="$cf_old_cflag"
10830 done
10831
10832 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10833 while true
10834 do
10835         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'`
10836         test "$CPPFLAGS" != "$cf_old_cflag" || break
10837
10838         CPPFLAGS="$cf_old_cflag"
10839 done
10840
10841                 ;;
10842         esac
10843
10844 cf_fix_cppflags=no
10845 cf_new_cflags=
10846 cf_new_cppflags=
10847 cf_new_extra_cppflags=
10848
10849 for cf_add_cflags in $cf_add_cflags
10850 do
10851 case "$cf_fix_cppflags" in
10852 (no)
10853         case "$cf_add_cflags" in
10854         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10855                 case "$cf_add_cflags" in
10856                 (-D*)
10857                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10858
10859                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10860                                 && test -z "${cf_tst_cflags}" \
10861                                 && cf_fix_cppflags=yes
10862
10863                         if test "$cf_fix_cppflags" = yes ; then
10864
10865         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10866         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10867
10868                                 continue
10869                         elif test "${cf_tst_cflags}" = "\"'" ; then
10870
10871         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10872         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10873
10874                                 continue
10875                         fi
10876                         ;;
10877                 esac
10878                 case "$CPPFLAGS" in
10879                 (*$cf_add_cflags)
10880                         ;;
10881                 (*)
10882                         case "$cf_add_cflags" in
10883                         (-D*)
10884                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10885
10886 CPPFLAGS=`echo "$CPPFLAGS" | \
10887         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10888                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10889
10890                                 ;;
10891                         esac
10892
10893         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10894         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10895
10896                         ;;
10897                 esac
10898                 ;;
10899         (*)
10900
10901         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10902         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10903
10904                 ;;
10905         esac
10906         ;;
10907 (yes)
10908
10909         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10910         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10911
10912         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10913
10914         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10915                 && test -z "${cf_tst_cflags}" \
10916                 && cf_fix_cppflags=no
10917         ;;
10918 esac
10919 done
10920
10921 if test -n "$cf_new_cflags" ; then
10922
10923         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10924         CFLAGS="${CFLAGS}$cf_new_cflags"
10925
10926 fi
10927
10928 if test -n "$cf_new_cppflags" ; then
10929
10930         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10931         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10932
10933 fi
10934
10935 if test -n "$cf_new_extra_cppflags" ; then
10936
10937         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10938         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10939
10940 fi
10941
10942 done
10943
10944 fi
10945
10946 if test "$cf_cv_posix_visible" = no; then
10947
10948 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10949
10950 cf_save_CFLAGS="$CFLAGS"
10951 cf_save_CPPFLAGS="$CPPFLAGS"
10952
10953 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10954         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10955                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10956
10957 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10958         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10959                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10960
10961 echo "$as_me:10961: checking if we should define _POSIX_C_SOURCE" >&5
10962 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10963 if test "${cf_cv_posix_c_source+set}" = set; then
10964   echo $ECHO_N "(cached) $ECHO_C" >&6
10965 else
10966
10967 echo "${as_me:-configure}:10967: testing if the symbol is already defined go no further ..." 1>&5
10968
10969         cat >"conftest.$ac_ext" <<_ACEOF
10970 #line 10970 "configure"
10971 #include "confdefs.h"
10972 #include <sys/types.h>
10973 int
10974 main (void)
10975 {
10976
10977 #ifndef _POSIX_C_SOURCE
10978 make an error
10979 #endif
10980   ;
10981   return 0;
10982 }
10983 _ACEOF
10984 rm -f "conftest.$ac_objext"
10985 if { (eval echo "$as_me:10985: \"$ac_compile\"") >&5
10986   (eval $ac_compile) 2>&5
10987   ac_status=$?
10988   echo "$as_me:10988: \$? = $ac_status" >&5
10989   (exit "$ac_status"); } &&
10990          { ac_try='test -s "conftest.$ac_objext"'
10991   { (eval echo "$as_me:10991: \"$ac_try\"") >&5
10992   (eval $ac_try) 2>&5
10993   ac_status=$?
10994   echo "$as_me:10994: \$? = $ac_status" >&5
10995   (exit "$ac_status"); }; }; then
10996   cf_cv_posix_c_source=no
10997 else
10998   echo "$as_me: failed program was:" >&5
10999 cat "conftest.$ac_ext" >&5
11000 cf_want_posix_source=no
11001          case .$cf_POSIX_C_SOURCE in
11002          (.[12]??*)
11003                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11004                 ;;
11005          (.2)
11006                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11007                 cf_want_posix_source=yes
11008                 ;;
11009          (.*)
11010                 cf_want_posix_source=yes
11011                 ;;
11012          esac
11013          if test "$cf_want_posix_source" = yes ; then
11014                 cat >"conftest.$ac_ext" <<_ACEOF
11015 #line 11015 "configure"
11016 #include "confdefs.h"
11017 #include <sys/types.h>
11018 int
11019 main (void)
11020 {
11021
11022 #ifdef _POSIX_SOURCE
11023 make an error
11024 #endif
11025   ;
11026   return 0;
11027 }
11028 _ACEOF
11029 rm -f "conftest.$ac_objext"
11030 if { (eval echo "$as_me:11030: \"$ac_compile\"") >&5
11031   (eval $ac_compile) 2>&5
11032   ac_status=$?
11033   echo "$as_me:11033: \$? = $ac_status" >&5
11034   (exit "$ac_status"); } &&
11035          { ac_try='test -s "conftest.$ac_objext"'
11036   { (eval echo "$as_me:11036: \"$ac_try\"") >&5
11037   (eval $ac_try) 2>&5
11038   ac_status=$?
11039   echo "$as_me:11039: \$? = $ac_status" >&5
11040   (exit "$ac_status"); }; }; then
11041   :
11042 else
11043   echo "$as_me: failed program was:" >&5
11044 cat "conftest.$ac_ext" >&5
11045 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11046 fi
11047 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11048          fi
11049
11050 echo "${as_me:-configure}:11050: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11051
11052          CFLAGS="$cf_trim_CFLAGS"
11053          CPPFLAGS="$cf_trim_CPPFLAGS"
11054
11055         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11056         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11057
11058 echo "${as_me:-configure}:11058: testing if the second compile does not leave our definition intact error ..." 1>&5
11059
11060          cat >"conftest.$ac_ext" <<_ACEOF
11061 #line 11061 "configure"
11062 #include "confdefs.h"
11063 #include <sys/types.h>
11064 int
11065 main (void)
11066 {
11067
11068 #ifndef _POSIX_C_SOURCE
11069 make an error
11070 #endif
11071   ;
11072   return 0;
11073 }
11074 _ACEOF
11075 rm -f "conftest.$ac_objext"
11076 if { (eval echo "$as_me:11076: \"$ac_compile\"") >&5
11077   (eval $ac_compile) 2>&5
11078   ac_status=$?
11079   echo "$as_me:11079: \$? = $ac_status" >&5
11080   (exit "$ac_status"); } &&
11081          { ac_try='test -s "conftest.$ac_objext"'
11082   { (eval echo "$as_me:11082: \"$ac_try\"") >&5
11083   (eval $ac_try) 2>&5
11084   ac_status=$?
11085   echo "$as_me:11085: \$? = $ac_status" >&5
11086   (exit "$ac_status"); }; }; then
11087   :
11088 else
11089   echo "$as_me: failed program was:" >&5
11090 cat "conftest.$ac_ext" >&5
11091 cf_cv_posix_c_source=no
11092 fi
11093 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11094          CFLAGS="$cf_save_CFLAGS"
11095          CPPFLAGS="$cf_save_CPPFLAGS"
11096
11097 fi
11098 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11099
11100 fi
11101 echo "$as_me:11101: result: $cf_cv_posix_c_source" >&5
11102 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11103
11104 if test "$cf_cv_posix_c_source" != no ; then
11105         CFLAGS="$cf_trim_CFLAGS"
11106         CPPFLAGS="$cf_trim_CPPFLAGS"
11107
11108 cf_fix_cppflags=no
11109 cf_new_cflags=
11110 cf_new_cppflags=
11111 cf_new_extra_cppflags=
11112
11113 for cf_add_cflags in $cf_cv_posix_c_source
11114 do
11115 case "$cf_fix_cppflags" in
11116 (no)
11117         case "$cf_add_cflags" in
11118         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11119                 case "$cf_add_cflags" in
11120                 (-D*)
11121                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11122
11123                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11124                                 && test -z "${cf_tst_cflags}" \
11125                                 && cf_fix_cppflags=yes
11126
11127                         if test "$cf_fix_cppflags" = yes ; then
11128
11129         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11130         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11131
11132                                 continue
11133                         elif test "${cf_tst_cflags}" = "\"'" ; then
11134
11135         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11136         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11137
11138                                 continue
11139                         fi
11140                         ;;
11141                 esac
11142                 case "$CPPFLAGS" in
11143                 (*$cf_add_cflags)
11144                         ;;
11145                 (*)
11146                         case "$cf_add_cflags" in
11147                         (-D*)
11148                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11149
11150 CPPFLAGS=`echo "$CPPFLAGS" | \
11151         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11152                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11153
11154                                 ;;
11155                         esac
11156
11157         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11158         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11159
11160                         ;;
11161                 esac
11162                 ;;
11163         (*)
11164
11165         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11166         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11167
11168                 ;;
11169         esac
11170         ;;
11171 (yes)
11172
11173         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11174         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11175
11176         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11177
11178         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11179                 && test -z "${cf_tst_cflags}" \
11180                 && cf_fix_cppflags=no
11181         ;;
11182 esac
11183 done
11184
11185 if test -n "$cf_new_cflags" ; then
11186
11187         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11188         CFLAGS="${CFLAGS}$cf_new_cflags"
11189
11190 fi
11191
11192 if test -n "$cf_new_cppflags" ; then
11193
11194         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11195         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11196
11197 fi
11198
11199 if test -n "$cf_new_extra_cppflags" ; then
11200
11201         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11202         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11203
11204 fi
11205
11206 fi
11207
11208 fi # cf_cv_posix_visible
11209
11210         ;;
11211 esac
11212
11213 if test -n "$cf_xopen_source" ; then
11214
11215 for cf_add_cflags in $cf_xopen_source
11216 do
11217         case "x$cf_add_cflags" in
11218         (x-[DU]*)
11219
11220 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11221 while true
11222 do
11223         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'`
11224         test "$CFLAGS" != "$cf_old_cflag" || break
11225         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11226
11227 echo "${as_me:-configure}:11227: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11228
11229         CFLAGS="$cf_old_cflag"
11230 done
11231
11232 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11233 while true
11234 do
11235         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'`
11236         test "$CPPFLAGS" != "$cf_old_cflag" || break
11237         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11238
11239 echo "${as_me:-configure}:11239: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11240
11241         CPPFLAGS="$cf_old_cflag"
11242 done
11243
11244                 ;;
11245         esac
11246
11247 cf_fix_cppflags=no
11248 cf_new_cflags=
11249 cf_new_cppflags=
11250 cf_new_extra_cppflags=
11251
11252 for cf_add_cflags in $cf_add_cflags
11253 do
11254 case "$cf_fix_cppflags" in
11255 (no)
11256         case "$cf_add_cflags" in
11257         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11258                 case "$cf_add_cflags" in
11259                 (-D*)
11260                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11261
11262                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11263                                 && test -z "${cf_tst_cflags}" \
11264                                 && cf_fix_cppflags=yes
11265
11266                         if test "$cf_fix_cppflags" = yes ; then
11267
11268         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11269         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11270
11271                                 continue
11272                         elif test "${cf_tst_cflags}" = "\"'" ; then
11273
11274         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11275         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11276
11277                                 continue
11278                         fi
11279                         ;;
11280                 esac
11281                 case "$CPPFLAGS" in
11282                 (*$cf_add_cflags)
11283                         ;;
11284                 (*)
11285                         case "$cf_add_cflags" in
11286                         (-D*)
11287                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11288
11289 CPPFLAGS=`echo "$CPPFLAGS" | \
11290         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11291                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11292
11293                                 ;;
11294                         esac
11295
11296         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11297         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11298
11299                         ;;
11300                 esac
11301                 ;;
11302         (*)
11303
11304         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11305         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11306
11307                 ;;
11308         esac
11309         ;;
11310 (yes)
11311
11312         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11313         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11314
11315         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11316
11317         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11318                 && test -z "${cf_tst_cflags}" \
11319                 && cf_fix_cppflags=no
11320         ;;
11321 esac
11322 done
11323
11324 if test -n "$cf_new_cflags" ; then
11325         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11326
11327 echo "${as_me:-configure}:11327: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11328
11329         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11330         CFLAGS="${CFLAGS}$cf_new_cflags"
11331
11332 fi
11333
11334 if test -n "$cf_new_cppflags" ; then
11335         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11336
11337 echo "${as_me:-configure}:11337: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11338
11339         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11340         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11341
11342 fi
11343
11344 if test -n "$cf_new_extra_cppflags" ; then
11345         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11346
11347 echo "${as_me:-configure}:11347: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11348
11349         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11350         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11351
11352 fi
11353
11354 done
11355
11356 fi
11357
11358 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11359         echo "$as_me:11359: checking if _XOPEN_SOURCE really is set" >&5
11360 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11361         cat >"conftest.$ac_ext" <<_ACEOF
11362 #line 11362 "configure"
11363 #include "confdefs.h"
11364 #include <stdlib.h>
11365 int
11366 main (void)
11367 {
11368
11369 #ifndef _XOPEN_SOURCE
11370 make an error
11371 #endif
11372   ;
11373   return 0;
11374 }
11375 _ACEOF
11376 rm -f "conftest.$ac_objext"
11377 if { (eval echo "$as_me:11377: \"$ac_compile\"") >&5
11378   (eval $ac_compile) 2>&5
11379   ac_status=$?
11380   echo "$as_me:11380: \$? = $ac_status" >&5
11381   (exit "$ac_status"); } &&
11382          { ac_try='test -s "conftest.$ac_objext"'
11383   { (eval echo "$as_me:11383: \"$ac_try\"") >&5
11384   (eval $ac_try) 2>&5
11385   ac_status=$?
11386   echo "$as_me:11386: \$? = $ac_status" >&5
11387   (exit "$ac_status"); }; }; then
11388   cf_XOPEN_SOURCE_set=yes
11389 else
11390   echo "$as_me: failed program was:" >&5
11391 cat "conftest.$ac_ext" >&5
11392 cf_XOPEN_SOURCE_set=no
11393 fi
11394 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11395         echo "$as_me:11395: result: $cf_XOPEN_SOURCE_set" >&5
11396 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11397         if test "$cf_XOPEN_SOURCE_set" = yes
11398         then
11399                 cat >"conftest.$ac_ext" <<_ACEOF
11400 #line 11400 "configure"
11401 #include "confdefs.h"
11402 #include <stdlib.h>
11403 int
11404 main (void)
11405 {
11406
11407 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11408 make an error
11409 #endif
11410   ;
11411   return 0;
11412 }
11413 _ACEOF
11414 rm -f "conftest.$ac_objext"
11415 if { (eval echo "$as_me:11415: \"$ac_compile\"") >&5
11416   (eval $ac_compile) 2>&5
11417   ac_status=$?
11418   echo "$as_me:11418: \$? = $ac_status" >&5
11419   (exit "$ac_status"); } &&
11420          { ac_try='test -s "conftest.$ac_objext"'
11421   { (eval echo "$as_me:11421: \"$ac_try\"") >&5
11422   (eval $ac_try) 2>&5
11423   ac_status=$?
11424   echo "$as_me:11424: \$? = $ac_status" >&5
11425   (exit "$ac_status"); }; }; then
11426   cf_XOPEN_SOURCE_set_ok=yes
11427 else
11428   echo "$as_me: failed program was:" >&5
11429 cat "conftest.$ac_ext" >&5
11430 cf_XOPEN_SOURCE_set_ok=no
11431 fi
11432 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11433                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11434                 then
11435                         { echo "$as_me:11435: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11436 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11437                 fi
11438         else
11439
11440 echo "$as_me:11440: checking if we should define _XOPEN_SOURCE" >&5
11441 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11442 if test "${cf_cv_xopen_source+set}" = set; then
11443   echo $ECHO_N "(cached) $ECHO_C" >&6
11444 else
11445
11446         cat >"conftest.$ac_ext" <<_ACEOF
11447 #line 11447 "configure"
11448 #include "confdefs.h"
11449
11450 #include <stdlib.h>
11451 #include <string.h>
11452 #include <sys/types.h>
11453
11454 int
11455 main (void)
11456 {
11457
11458 #ifndef _XOPEN_SOURCE
11459 make an error
11460 #endif
11461   ;
11462   return 0;
11463 }
11464 _ACEOF
11465 rm -f "conftest.$ac_objext"
11466 if { (eval echo "$as_me:11466: \"$ac_compile\"") >&5
11467   (eval $ac_compile) 2>&5
11468   ac_status=$?
11469   echo "$as_me:11469: \$? = $ac_status" >&5
11470   (exit "$ac_status"); } &&
11471          { ac_try='test -s "conftest.$ac_objext"'
11472   { (eval echo "$as_me:11472: \"$ac_try\"") >&5
11473   (eval $ac_try) 2>&5
11474   ac_status=$?
11475   echo "$as_me:11475: \$? = $ac_status" >&5
11476   (exit "$ac_status"); }; }; then
11477   cf_cv_xopen_source=no
11478 else
11479   echo "$as_me: failed program was:" >&5
11480 cat "conftest.$ac_ext" >&5
11481 cf_save="$CPPFLAGS"
11482
11483         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11484         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11485
11486          cat >"conftest.$ac_ext" <<_ACEOF
11487 #line 11487 "configure"
11488 #include "confdefs.h"
11489
11490 #include <stdlib.h>
11491 #include <string.h>
11492 #include <sys/types.h>
11493
11494 int
11495 main (void)
11496 {
11497
11498 #ifdef _XOPEN_SOURCE
11499 make an error
11500 #endif
11501   ;
11502   return 0;
11503 }
11504 _ACEOF
11505 rm -f "conftest.$ac_objext"
11506 if { (eval echo "$as_me:11506: \"$ac_compile\"") >&5
11507   (eval $ac_compile) 2>&5
11508   ac_status=$?
11509   echo "$as_me:11509: \$? = $ac_status" >&5
11510   (exit "$ac_status"); } &&
11511          { ac_try='test -s "conftest.$ac_objext"'
11512   { (eval echo "$as_me:11512: \"$ac_try\"") >&5
11513   (eval $ac_try) 2>&5
11514   ac_status=$?
11515   echo "$as_me:11515: \$? = $ac_status" >&5
11516   (exit "$ac_status"); }; }; then
11517   cf_cv_xopen_source=no
11518 else
11519   echo "$as_me: failed program was:" >&5
11520 cat "conftest.$ac_ext" >&5
11521 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11522 fi
11523 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11524         CPPFLAGS="$cf_save"
11525
11526 fi
11527 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11528
11529 fi
11530 echo "$as_me:11530: result: $cf_cv_xopen_source" >&5
11531 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11532
11533 if test "$cf_cv_xopen_source" != no ; then
11534
11535 CFLAGS=`echo "$CFLAGS" | \
11536         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11537                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11538
11539 CPPFLAGS=`echo "$CPPFLAGS" | \
11540         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11541                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11542
11543         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11544
11545 for cf_add_cflags in $cf_temp_xopen_source
11546 do
11547         case "x$cf_add_cflags" in
11548         (x-[DU]*)
11549
11550 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11551 while true
11552 do
11553         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'`
11554         test "$CFLAGS" != "$cf_old_cflag" || break
11555
11556         CFLAGS="$cf_old_cflag"
11557 done
11558
11559 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11560 while true
11561 do
11562         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'`
11563         test "$CPPFLAGS" != "$cf_old_cflag" || break
11564
11565         CPPFLAGS="$cf_old_cflag"
11566 done
11567
11568                 ;;
11569         esac
11570
11571 cf_fix_cppflags=no
11572 cf_new_cflags=
11573 cf_new_cppflags=
11574 cf_new_extra_cppflags=
11575
11576 for cf_add_cflags in $cf_add_cflags
11577 do
11578 case "$cf_fix_cppflags" in
11579 (no)
11580         case "$cf_add_cflags" in
11581         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11582                 case "$cf_add_cflags" in
11583                 (-D*)
11584                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11585
11586                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11587                                 && test -z "${cf_tst_cflags}" \
11588                                 && cf_fix_cppflags=yes
11589
11590                         if test "$cf_fix_cppflags" = yes ; then
11591
11592         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11593         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11594
11595                                 continue
11596                         elif test "${cf_tst_cflags}" = "\"'" ; then
11597
11598         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11599         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11600
11601                                 continue
11602                         fi
11603                         ;;
11604                 esac
11605                 case "$CPPFLAGS" in
11606                 (*$cf_add_cflags)
11607                         ;;
11608                 (*)
11609                         case "$cf_add_cflags" in
11610                         (-D*)
11611                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11612
11613 CPPFLAGS=`echo "$CPPFLAGS" | \
11614         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11615                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11616
11617                                 ;;
11618                         esac
11619
11620         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11621         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11622
11623                         ;;
11624                 esac
11625                 ;;
11626         (*)
11627
11628         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11629         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11630
11631                 ;;
11632         esac
11633         ;;
11634 (yes)
11635
11636         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11637         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11638
11639         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11640
11641         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11642                 && test -z "${cf_tst_cflags}" \
11643                 && cf_fix_cppflags=no
11644         ;;
11645 esac
11646 done
11647
11648 if test -n "$cf_new_cflags" ; then
11649
11650         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11651         CFLAGS="${CFLAGS}$cf_new_cflags"
11652
11653 fi
11654
11655 if test -n "$cf_new_cppflags" ; then
11656
11657         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11658         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11659
11660 fi
11661
11662 if test -n "$cf_new_extra_cppflags" ; then
11663
11664         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11665         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11666
11667 fi
11668
11669 done
11670
11671 fi
11672
11673         fi
11674 fi
11675 fi # cf_cv_posix_visible
11676
11677 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11678
11679 # Work around breakage on OS X
11680
11681 echo "$as_me:11681: checking if SIGWINCH is defined" >&5
11682 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11683 if test "${cf_cv_define_sigwinch+set}" = set; then
11684   echo $ECHO_N "(cached) $ECHO_C" >&6
11685 else
11686
11687         cat >"conftest.$ac_ext" <<_ACEOF
11688 #line 11688 "configure"
11689 #include "confdefs.h"
11690
11691 #include <sys/types.h>
11692 #include <sys/signal.h>
11693
11694 int
11695 main (void)
11696 {
11697 int x = SIGWINCH; (void)x
11698   ;
11699   return 0;
11700 }
11701 _ACEOF
11702 rm -f "conftest.$ac_objext"
11703 if { (eval echo "$as_me:11703: \"$ac_compile\"") >&5
11704   (eval $ac_compile) 2>&5
11705   ac_status=$?
11706   echo "$as_me:11706: \$? = $ac_status" >&5
11707   (exit "$ac_status"); } &&
11708          { ac_try='test -s "conftest.$ac_objext"'
11709   { (eval echo "$as_me:11709: \"$ac_try\"") >&5
11710   (eval $ac_try) 2>&5
11711   ac_status=$?
11712   echo "$as_me:11712: \$? = $ac_status" >&5
11713   (exit "$ac_status"); }; }; then
11714   cf_cv_define_sigwinch=yes
11715 else
11716   echo "$as_me: failed program was:" >&5
11717 cat "conftest.$ac_ext" >&5
11718 cat >"conftest.$ac_ext" <<_ACEOF
11719 #line 11719 "configure"
11720 #include "confdefs.h"
11721
11722 #undef _XOPEN_SOURCE
11723 #undef _POSIX_SOURCE
11724 #undef _POSIX_C_SOURCE
11725 #include <sys/types.h>
11726 #include <sys/signal.h>
11727
11728 int
11729 main (void)
11730 {
11731 int x = SIGWINCH; (void)x
11732   ;
11733   return 0;
11734 }
11735 _ACEOF
11736 rm -f "conftest.$ac_objext"
11737 if { (eval echo "$as_me:11737: \"$ac_compile\"") >&5
11738   (eval $ac_compile) 2>&5
11739   ac_status=$?
11740   echo "$as_me:11740: \$? = $ac_status" >&5
11741   (exit "$ac_status"); } &&
11742          { ac_try='test -s "conftest.$ac_objext"'
11743   { (eval echo "$as_me:11743: \"$ac_try\"") >&5
11744   (eval $ac_try) 2>&5
11745   ac_status=$?
11746   echo "$as_me:11746: \$? = $ac_status" >&5
11747   (exit "$ac_status"); }; }; then
11748   cf_cv_define_sigwinch=maybe
11749 else
11750   echo "$as_me: failed program was:" >&5
11751 cat "conftest.$ac_ext" >&5
11752 cf_cv_define_sigwinch=no
11753 fi
11754 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11755
11756 fi
11757 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11758
11759 fi
11760 echo "$as_me:11760: result: $cf_cv_define_sigwinch" >&5
11761 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11762
11763 if test "$cf_cv_define_sigwinch" = maybe ; then
11764 echo "$as_me:11764: checking for actual SIGWINCH definition" >&5
11765 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11766 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11767   echo $ECHO_N "(cached) $ECHO_C" >&6
11768 else
11769
11770 cf_cv_fixup_sigwinch=unknown
11771 cf_sigwinch=32
11772 while test "$cf_sigwinch" != 1
11773 do
11774         cat >"conftest.$ac_ext" <<_ACEOF
11775 #line 11775 "configure"
11776 #include "confdefs.h"
11777
11778 #undef _XOPEN_SOURCE
11779 #undef _POSIX_SOURCE
11780 #undef _POSIX_C_SOURCE
11781 #include <sys/types.h>
11782 #include <sys/signal.h>
11783
11784 int
11785 main (void)
11786 {
11787
11788 #if SIGWINCH != $cf_sigwinch
11789 make an error
11790 #endif
11791 int x = SIGWINCH; (void)x
11792   ;
11793   return 0;
11794 }
11795 _ACEOF
11796 rm -f "conftest.$ac_objext"
11797 if { (eval echo "$as_me:11797: \"$ac_compile\"") >&5
11798   (eval $ac_compile) 2>&5
11799   ac_status=$?
11800   echo "$as_me:11800: \$? = $ac_status" >&5
11801   (exit "$ac_status"); } &&
11802          { ac_try='test -s "conftest.$ac_objext"'
11803   { (eval echo "$as_me:11803: \"$ac_try\"") >&5
11804   (eval $ac_try) 2>&5
11805   ac_status=$?
11806   echo "$as_me:11806: \$? = $ac_status" >&5
11807   (exit "$ac_status"); }; }; then
11808   cf_cv_fixup_sigwinch=$cf_sigwinch
11809          break
11810 else
11811   echo "$as_me: failed program was:" >&5
11812 cat "conftest.$ac_ext" >&5
11813 fi
11814 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11815
11816 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11817 done
11818
11819 fi
11820 echo "$as_me:11820: result: $cf_cv_fixup_sigwinch" >&5
11821 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11822
11823         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11824                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11825         fi
11826 fi
11827
11828 # Checks for CODESET support.
11829
11830 echo "$as_me:11830: checking for nl_langinfo and CODESET" >&5
11831 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11832 if test "${am_cv_langinfo_codeset+set}" = set; then
11833   echo $ECHO_N "(cached) $ECHO_C" >&6
11834 else
11835   cat >"conftest.$ac_ext" <<_ACEOF
11836 #line 11836 "configure"
11837 #include "confdefs.h"
11838 #include <langinfo.h>
11839 int
11840 main (void)
11841 {
11842 char* cs = nl_langinfo(CODESET); (void)cs
11843   ;
11844   return 0;
11845 }
11846 _ACEOF
11847 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11848 if { (eval echo "$as_me:11848: \"$ac_link\"") >&5
11849   (eval $ac_link) 2>&5
11850   ac_status=$?
11851   echo "$as_me:11851: \$? = $ac_status" >&5
11852   (exit "$ac_status"); } &&
11853          { ac_try='test -s "conftest$ac_exeext"'
11854   { (eval echo "$as_me:11854: \"$ac_try\"") >&5
11855   (eval $ac_try) 2>&5
11856   ac_status=$?
11857   echo "$as_me:11857: \$? = $ac_status" >&5
11858   (exit "$ac_status"); }; }; then
11859   am_cv_langinfo_codeset=yes
11860 else
11861   echo "$as_me: failed program was:" >&5
11862 cat "conftest.$ac_ext" >&5
11863 am_cv_langinfo_codeset=no
11864 fi
11865 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11866
11867 fi
11868 echo "$as_me:11868: result: $am_cv_langinfo_codeset" >&5
11869 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11870         if test "$am_cv_langinfo_codeset" = yes; then
11871
11872 cat >>confdefs.h <<\EOF
11873 #define HAVE_LANGINFO_CODESET 1
11874 EOF
11875
11876         fi
11877
11878 # use these variables to work around a defect in gcc's fixincludes.
11879 NCURSES_OK_WCHAR_T=
11880 NCURSES_OK_WINT_T=
11881
11882 echo "$as_me:11882: checking if you want wide-character code" >&5
11883 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11884
11885 # Check whether --enable-widec or --disable-widec was given.
11886 if test "${enable_widec+set}" = set; then
11887   enableval="$enable_widec"
11888   with_widec=$enableval
11889 else
11890   with_widec=no
11891 fi;
11892 echo "$as_me:11892: result: $with_widec" >&5
11893 echo "${ECHO_T}$with_widec" >&6
11894
11895 NCURSES_WCWIDTH_GRAPHICS=1
11896
11897 if test "x$with_widec" = xyes ; then
11898         if test "x$disable_lib_suffixes" = xno ; then
11899                 LIB_SUFFIX="w${LIB_SUFFIX}"
11900         fi
11901
11902 cat >>confdefs.h <<\EOF
11903 #define USE_WIDEC_SUPPORT 1
11904 EOF
11905
11906 cat >>confdefs.h <<\EOF
11907 #define NCURSES_WIDECHAR 1
11908 EOF
11909
11910 for ac_header in \
11911 wchar.h \
11912 wctype.h \
11913
11914 do
11915 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11916 echo "$as_me:11916: checking for $ac_header" >&5
11917 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11918 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11919   echo $ECHO_N "(cached) $ECHO_C" >&6
11920 else
11921   cat >"conftest.$ac_ext" <<_ACEOF
11922 #line 11922 "configure"
11923 #include "confdefs.h"
11924 #include <$ac_header>
11925 _ACEOF
11926 if { (eval echo "$as_me:11926: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11927   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11928   ac_status=$?
11929   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11930   rm -f conftest.er1
11931   cat conftest.err >&5
11932   echo "$as_me:11932: \$? = $ac_status" >&5
11933   (exit "$ac_status"); } >/dev/null; then
11934   if test -s conftest.err; then
11935     ac_cpp_err=$ac_c_preproc_warn_flag
11936   else
11937     ac_cpp_err=
11938   fi
11939 else
11940   ac_cpp_err=yes
11941 fi
11942 if test -z "$ac_cpp_err"; then
11943   eval "$as_ac_Header=yes"
11944 else
11945   echo "$as_me: failed program was:" >&5
11946   cat "conftest.$ac_ext" >&5
11947   eval "$as_ac_Header=no"
11948 fi
11949 rm -f conftest.err "conftest.$ac_ext"
11950 fi
11951 echo "$as_me:11951: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11952 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11953 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11954   cat >>confdefs.h <<EOF
11955 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11956 EOF
11957
11958 fi
11959 done
11960
11961 echo "$as_me:11961: checking if wchar.h can be used as is" >&5
11962 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11963 if test "${cf_cv_wchar_h_okay+set}" = set; then
11964   echo $ECHO_N "(cached) $ECHO_C" >&6
11965 else
11966
11967 cat >"conftest.$ac_ext" <<_ACEOF
11968 #line 11968 "configure"
11969 #include "confdefs.h"
11970
11971 #include <stdlib.h>
11972 #ifdef HAVE_WCHAR_H
11973 #include <wchar.h>
11974 #endif
11975 #ifdef HAVE_WCTYPE_H
11976 #include <wctype.h>
11977 #endif
11978
11979 int
11980 main (void)
11981 {
11982
11983         wint_t foo = 0;
11984         int bar = iswpunct(foo)
11985   ;
11986   return 0;
11987 }
11988 _ACEOF
11989 rm -f "conftest.$ac_objext"
11990 if { (eval echo "$as_me:11990: \"$ac_compile\"") >&5
11991   (eval $ac_compile) 2>&5
11992   ac_status=$?
11993   echo "$as_me:11993: \$? = $ac_status" >&5
11994   (exit "$ac_status"); } &&
11995          { ac_try='test -s "conftest.$ac_objext"'
11996   { (eval echo "$as_me:11996: \"$ac_try\"") >&5
11997   (eval $ac_try) 2>&5
11998   ac_status=$?
11999   echo "$as_me:11999: \$? = $ac_status" >&5
12000   (exit "$ac_status"); }; }; then
12001   cf_cv_wchar_h_okay=yes
12002 else
12003   echo "$as_me: failed program was:" >&5
12004 cat "conftest.$ac_ext" >&5
12005 cf_cv_wchar_h_okay=no
12006 fi
12007 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12008 fi
12009 echo "$as_me:12009: result: $cf_cv_wchar_h_okay" >&5
12010 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12011
12012 if test "$cf_cv_wchar_h_okay" = no
12013 then
12014
12015 echo "$as_me:12015: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12016 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12017 cat >"conftest.$ac_ext" <<_ACEOF
12018 #line 12018 "configure"
12019 #include "confdefs.h"
12020 #include <sys/types.h>
12021
12022 int
12023 main (void)
12024 {
12025
12026 #ifndef _XOPEN_SOURCE_EXTENDED
12027 make an error
12028 #endif
12029   ;
12030   return 0;
12031 }
12032 _ACEOF
12033 rm -f "conftest.$ac_objext"
12034 if { (eval echo "$as_me:12034: \"$ac_compile\"") >&5
12035   (eval $ac_compile) 2>&5
12036   ac_status=$?
12037   echo "$as_me:12037: \$? = $ac_status" >&5
12038   (exit "$ac_status"); } &&
12039          { ac_try='test -s "conftest.$ac_objext"'
12040   { (eval echo "$as_me:12040: \"$ac_try\"") >&5
12041   (eval $ac_try) 2>&5
12042   ac_status=$?
12043   echo "$as_me:12043: \$? = $ac_status" >&5
12044   (exit "$ac_status"); }; }; then
12045   cf_result=no
12046 else
12047   echo "$as_me: failed program was:" >&5
12048 cat "conftest.$ac_ext" >&5
12049 cf_result=yes
12050 fi
12051 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12052 echo "$as_me:12052: result: $cf_result" >&5
12053 echo "${ECHO_T}$cf_result" >&6
12054
12055 if test "$cf_result" = yes ; then
12056         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12057 elif test "x" != "x" ; then
12058         echo "$as_me:12058: checking checking for compatible value versus " >&5
12059 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12060         cat >"conftest.$ac_ext" <<_ACEOF
12061 #line 12061 "configure"
12062 #include "confdefs.h"
12063 #include <sys/types.h>
12064
12065 int
12066 main (void)
12067 {
12068
12069 #if _XOPEN_SOURCE_EXTENDED- < 0
12070 make an error
12071 #endif
12072   ;
12073   return 0;
12074 }
12075 _ACEOF
12076 rm -f "conftest.$ac_objext"
12077 if { (eval echo "$as_me:12077: \"$ac_compile\"") >&5
12078   (eval $ac_compile) 2>&5
12079   ac_status=$?
12080   echo "$as_me:12080: \$? = $ac_status" >&5
12081   (exit "$ac_status"); } &&
12082          { ac_try='test -s "conftest.$ac_objext"'
12083   { (eval echo "$as_me:12083: \"$ac_try\"") >&5
12084   (eval $ac_try) 2>&5
12085   ac_status=$?
12086   echo "$as_me:12086: \$? = $ac_status" >&5
12087   (exit "$ac_status"); }; }; then
12088   cf_result=yes
12089 else
12090   echo "$as_me: failed program was:" >&5
12091 cat "conftest.$ac_ext" >&5
12092 cf_result=no
12093 fi
12094 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12095         echo "$as_me:12095: result: $cf_result" >&5
12096 echo "${ECHO_T}$cf_result" >&6
12097         if test "$cf_result" = no ; then
12098                 # perhaps we can override it - try...
12099                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12100         fi
12101 fi
12102
12103 fi
12104
12105 echo "$as_me:12105: checking if wcwidth agrees graphics are single-width" >&5
12106 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12107 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12108   echo $ECHO_N "(cached) $ECHO_C" >&6
12109 else
12110
12111 cat >conftest.in <<CF_EOF
12112 -       VT100 symbols
12113 0x250c  upper left corner
12114 0x2514  lower left corner
12115 0x2510  upper right corner
12116 0x2518  lower right corner
12117 0x251c  tee pointing left
12118 0x2524  tee pointing right
12119 0x2534  tee pointing up
12120 0x252c  tee pointing down
12121 0x2500  horizontal line
12122 0x2502  vertical line
12123 0x253c  large plus or crossover
12124 0x23ba  scan line 1
12125 0x23bd  scan line 9
12126 0x25c6  diamond
12127 0x2592  checker board (stipple)
12128 0x00b0  degree symbol
12129 0x00b1  plus/minus
12130 0x00b7  bullet
12131 -       Teletype 5410v1 symbols
12132 0x2190  arrow pointing left
12133 0x2192  arrow pointing right
12134 0x2193  arrow pointing down
12135 0x2191  arrow pointing up
12136 0x2592  board of squares
12137 0x2603  lantern symbol
12138 0x25ae  solid square block
12139 -       these defaults were invented for ncurses
12140 0x23bb  scan line 3
12141 0x23bc  scan line 7
12142 0x2264  less-than-or-equal-to
12143 0x2265  greater-than-or-equal-to
12144 0x03c0  greek pi
12145 0x2260  not-equal
12146 0x00a3  pound-sterling symbol
12147 -       thick-line-drawing
12148 0x250f  upper left corner
12149 0x2517  lower left corner
12150 0x2513  upper right corner
12151 0x251b  lower right corner
12152 0x2523  tee pointing left
12153 0x252b  tee pointing right
12154 0x253b  tee pointing up
12155 0x2533  tee pointing down
12156 0x2501  horizontal line
12157 0x2503  vertical line
12158 0x254b  large plus or crossover
12159 -       double-line-drawing
12160 0x2554  upper left corner
12161 0x255a  lower left corner
12162 0x2557  upper right corner
12163 0x255d  lower right corner
12164 0x2563  tee pointing left
12165 0x2560  tee pointing right
12166 0x2569  tee pointing up
12167 0x2566  tee pointing down
12168 0x2550  horizontal line
12169 0x2551  vertical line
12170 0x256c  large plus or crossover
12171 CF_EOF
12172 if test "$cross_compiling" = yes; then
12173   cf_cv_wcwidth_graphics=unknown
12174 else
12175   cat >"conftest.$ac_ext" <<_ACEOF
12176 #line 12176 "configure"
12177 #include "confdefs.h"
12178
12179 #include <locale.h>
12180 #include <stdio.h>
12181 #include <wchar.h>
12182
12183 #define MY_LEN 80
12184
12185 int
12186 main(void)
12187 {
12188         FILE *fp;
12189         int value;
12190         char buffer[MY_LEN + 1];
12191         char notes[MY_LEN + 1];
12192         int totals = 0;
12193         int passed = 0;
12194
12195         if (setlocale(LC_ALL, "en_US.UTF8") ||
12196                 setlocale(LC_ALL, "en_US.UTF-8") ||
12197                 setlocale(LC_ALL, "en_US.utf8") ||
12198                 setlocale(LC_ALL, "en_US.utf-8")) {
12199                 if ((fp = fopen("conftest.in", "r")) != 0) {
12200                         while (fgets(buffer, MY_LEN, fp) != 0) {
12201                                 if (*buffer == '-') {
12202                                         fprintf(stderr, "\\t%s", buffer);
12203                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12204                                         ++totals;
12205                                         if (wcwidth(value) == 1)
12206                                                 ++passed;
12207                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12208                                 } else {
12209                                         fprintf(stderr, "?\\t%s", buffer);
12210                                 }
12211                         }
12212                 }
12213         }
12214         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12215         return (totals == passed) ? 0 : 1;
12216 }
12217
12218 _ACEOF
12219 rm -f "conftest$ac_exeext"
12220 if { (eval echo "$as_me:12220: \"$ac_link\"") >&5
12221   (eval $ac_link) 2>&5
12222   ac_status=$?
12223   echo "$as_me:12223: \$? = $ac_status" >&5
12224   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12225   { (eval echo "$as_me:12225: \"$ac_try\"") >&5
12226   (eval $ac_try) 2>&5
12227   ac_status=$?
12228   echo "$as_me:12228: \$? = $ac_status" >&5
12229   (exit "$ac_status"); }; }; then
12230   cf_cv_wcwidth_graphics=yes
12231 else
12232   echo "$as_me: program exited with status $ac_status" >&5
12233 echo "$as_me: failed program was:" >&5
12234 cat "conftest.$ac_ext" >&5
12235 cf_cv_wcwidth_graphics=no
12236 fi
12237 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12238 fi
12239
12240 fi
12241 echo "$as_me:12241: result: $cf_cv_wcwidth_graphics" >&5
12242 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12243
12244         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12245
12246         # with_overwrite=no
12247         NCURSES_CH_T=cchar_t
12248
12249 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12250 do
12251 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12252 echo "$as_me:12252: checking for $ac_func" >&5
12253 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12254 if eval "test \"\${$as_ac_var+set}\" = set"; then
12255   echo $ECHO_N "(cached) $ECHO_C" >&6
12256 else
12257   cat >"conftest.$ac_ext" <<_ACEOF
12258 #line 12258 "configure"
12259 #include "confdefs.h"
12260 #define $ac_func autoconf_temporary
12261 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12262 #undef $ac_func
12263
12264 #ifdef __cplusplus
12265 extern "C"
12266 #endif
12267
12268 /* We use char because int might match the return type of a gcc2
12269    builtin and then its argument prototype would still apply.  */
12270 char $ac_func (void);
12271
12272 int
12273 main (void)
12274 {
12275
12276 /* The GNU C library defines stubs for functions which it implements
12277     to always fail with ENOSYS.  Some functions are actually named
12278     something starting with __ and the normal name is an alias.  */
12279 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12280 #error found stub for $ac_func
12281 #endif
12282
12283         return $ac_func ();
12284   ;
12285   return 0;
12286 }
12287 _ACEOF
12288 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12289 if { (eval echo "$as_me:12289: \"$ac_link\"") >&5
12290   (eval $ac_link) 2>&5
12291   ac_status=$?
12292   echo "$as_me:12292: \$? = $ac_status" >&5
12293   (exit "$ac_status"); } &&
12294          { ac_try='test -s "conftest$ac_exeext"'
12295   { (eval echo "$as_me:12295: \"$ac_try\"") >&5
12296   (eval $ac_try) 2>&5
12297   ac_status=$?
12298   echo "$as_me:12298: \$? = $ac_status" >&5
12299   (exit "$ac_status"); }; }; then
12300   eval "$as_ac_var=yes"
12301 else
12302   echo "$as_me: failed program was:" >&5
12303 cat "conftest.$ac_ext" >&5
12304 eval "$as_ac_var=no"
12305 fi
12306 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12307 fi
12308 echo "$as_me:12308: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12309 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12310 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12311   cat >>confdefs.h <<EOF
12312 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12313 EOF
12314
12315 fi
12316 done
12317
12318         if test "x$ac_cv_func_putwc" != xyes ; then
12319
12320 for ac_header in wchar.h
12321 do
12322 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12323 echo "$as_me:12323: checking for $ac_header" >&5
12324 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12325 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12326   echo $ECHO_N "(cached) $ECHO_C" >&6
12327 else
12328   cat >"conftest.$ac_ext" <<_ACEOF
12329 #line 12329 "configure"
12330 #include "confdefs.h"
12331 #include <$ac_header>
12332 _ACEOF
12333 if { (eval echo "$as_me:12333: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12334   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12335   ac_status=$?
12336   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12337   rm -f conftest.er1
12338   cat conftest.err >&5
12339   echo "$as_me:12339: \$? = $ac_status" >&5
12340   (exit "$ac_status"); } >/dev/null; then
12341   if test -s conftest.err; then
12342     ac_cpp_err=$ac_c_preproc_warn_flag
12343   else
12344     ac_cpp_err=
12345   fi
12346 else
12347   ac_cpp_err=yes
12348 fi
12349 if test -z "$ac_cpp_err"; then
12350   eval "$as_ac_Header=yes"
12351 else
12352   echo "$as_me: failed program was:" >&5
12353   cat "conftest.$ac_ext" >&5
12354   eval "$as_ac_Header=no"
12355 fi
12356 rm -f conftest.err "conftest.$ac_ext"
12357 fi
12358 echo "$as_me:12358: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12359 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12360 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12361   cat >>confdefs.h <<EOF
12362 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12363 EOF
12364
12365 fi
12366 done
12367
12368 echo "$as_me:12368: checking for multibyte character support" >&5
12369 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12370 if test "${cf_cv_utf8_lib+set}" = set; then
12371   echo $ECHO_N "(cached) $ECHO_C" >&6
12372 else
12373
12374         cf_save_LIBS="$LIBS"
12375         cat >"conftest.$ac_ext" <<_ACEOF
12376 #line 12376 "configure"
12377 #include "confdefs.h"
12378
12379 #include <stdlib.h>
12380 #include <stdio.h>
12381 #ifdef HAVE_WCHAR_H
12382 #include <wchar.h>
12383 #endif
12384
12385 int
12386 main (void)
12387 {
12388 putwc(0,0);
12389   ;
12390   return 0;
12391 }
12392 _ACEOF
12393 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12394 if { (eval echo "$as_me:12394: \"$ac_link\"") >&5
12395   (eval $ac_link) 2>&5
12396   ac_status=$?
12397   echo "$as_me:12397: \$? = $ac_status" >&5
12398   (exit "$ac_status"); } &&
12399          { ac_try='test -s "conftest$ac_exeext"'
12400   { (eval echo "$as_me:12400: \"$ac_try\"") >&5
12401   (eval $ac_try) 2>&5
12402   ac_status=$?
12403   echo "$as_me:12403: \$? = $ac_status" >&5
12404   (exit "$ac_status"); }; }; then
12405   cf_cv_utf8_lib=yes
12406 else
12407   echo "$as_me: failed program was:" >&5
12408 cat "conftest.$ac_ext" >&5
12409
12410 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12411 # will be set on completion of the AC_TRY_LINK below.
12412 cf_cv_header_path_utf8=
12413 cf_cv_library_path_utf8=
12414
12415 echo "${as_me:-configure}:12415: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12416
12417 cf_save_LIBS="$LIBS"
12418
12419 cat >"conftest.$ac_ext" <<_ACEOF
12420 #line 12420 "configure"
12421 #include "confdefs.h"
12422
12423 #include <libutf8.h>
12424 int
12425 main (void)
12426 {
12427 putwc(0,0);
12428   ;
12429   return 0;
12430 }
12431 _ACEOF
12432 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12433 if { (eval echo "$as_me:12433: \"$ac_link\"") >&5
12434   (eval $ac_link) 2>&5
12435   ac_status=$?
12436   echo "$as_me:12436: \$? = $ac_status" >&5
12437   (exit "$ac_status"); } &&
12438          { ac_try='test -s "conftest$ac_exeext"'
12439   { (eval echo "$as_me:12439: \"$ac_try\"") >&5
12440   (eval $ac_try) 2>&5
12441   ac_status=$?
12442   echo "$as_me:12442: \$? = $ac_status" >&5
12443   (exit "$ac_status"); }; }; then
12444
12445         cf_cv_find_linkage_utf8=yes
12446         cf_cv_header_path_utf8=/usr/include
12447         cf_cv_library_path_utf8=/usr/lib
12448
12449 else
12450   echo "$as_me: failed program was:" >&5
12451 cat "conftest.$ac_ext" >&5
12452
12453 LIBS="-lutf8  $cf_save_LIBS"
12454
12455 cat >"conftest.$ac_ext" <<_ACEOF
12456 #line 12456 "configure"
12457 #include "confdefs.h"
12458
12459 #include <libutf8.h>
12460 int
12461 main (void)
12462 {
12463 putwc(0,0);
12464   ;
12465   return 0;
12466 }
12467 _ACEOF
12468 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12469 if { (eval echo "$as_me:12469: \"$ac_link\"") >&5
12470   (eval $ac_link) 2>&5
12471   ac_status=$?
12472   echo "$as_me:12472: \$? = $ac_status" >&5
12473   (exit "$ac_status"); } &&
12474          { ac_try='test -s "conftest$ac_exeext"'
12475   { (eval echo "$as_me:12475: \"$ac_try\"") >&5
12476   (eval $ac_try) 2>&5
12477   ac_status=$?
12478   echo "$as_me:12478: \$? = $ac_status" >&5
12479   (exit "$ac_status"); }; }; then
12480
12481         cf_cv_find_linkage_utf8=yes
12482         cf_cv_header_path_utf8=/usr/include
12483         cf_cv_library_path_utf8=/usr/lib
12484         cf_cv_library_file_utf8="-lutf8"
12485
12486 else
12487   echo "$as_me: failed program was:" >&5
12488 cat "conftest.$ac_ext" >&5
12489
12490         cf_cv_find_linkage_utf8=no
12491         LIBS="$cf_save_LIBS"
12492
12493         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12494
12495 echo "${as_me:-configure}:12495: testing find linkage for utf8 library ..." 1>&5
12496
12497 echo "${as_me:-configure}:12497: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12498
12499         cf_save_CPPFLAGS="$CPPFLAGS"
12500         cf_test_CPPFLAGS="$CPPFLAGS"
12501
12502 cf_search=
12503
12504 # collect the current set of include-directories from compiler flags
12505 cf_header_path_list=""
12506 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12507         for cf_header_path in $CPPFLAGS $CFLAGS
12508         do
12509                 case "$cf_header_path" in
12510                 (-I*)
12511                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12512
12513 test "x$cf_header_path" != "xNONE" && \
12514 test -d "$cf_header_path" && \
12515  {
12516         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12517         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12518         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12519         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12520         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12521         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12522 }
12523
12524                         cf_header_path_list="$cf_header_path_list $cf_search"
12525                         ;;
12526                 esac
12527         done
12528 fi
12529
12530 # add the variations for the package we are looking for
12531
12532 cf_search=
12533
12534 test "x$prefix" != "xNONE" && \
12535 test -d "$prefix" && \
12536  {
12537         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12538         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12539         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12540         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12541         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12542         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12543 }
12544
12545 for cf_subdir_prefix in \
12546         /usr \
12547         /usr/local \
12548         /usr/pkg \
12549         /opt \
12550         /opt/local \
12551         $HOME
12552 do
12553
12554 test "x$cf_subdir_prefix" != "x$prefix" && \
12555 test -d "$cf_subdir_prefix" && \
12556 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12557         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12558         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12559         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12560         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12561         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12562         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12563 }
12564
12565 done
12566
12567 test "$includedir" != NONE && \
12568 test "$includedir" != "/usr/include" && \
12569 test -d "$includedir" && {
12570         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12571         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12572 }
12573
12574 test "$oldincludedir" != NONE && \
12575 test "$oldincludedir" != "/usr/include" && \
12576 test -d "$oldincludedir" && {
12577         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12578         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12579 }
12580
12581 cf_search="$cf_search $cf_header_path_list"
12582
12583         for cf_cv_header_path_utf8 in $cf_search
12584         do
12585                 if test -d "$cf_cv_header_path_utf8" ; then
12586                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12587
12588 echo "${as_me:-configure}:12588: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12589
12590                         CPPFLAGS="$cf_save_CPPFLAGS"
12591
12592         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12593         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12594
12595                         cat >"conftest.$ac_ext" <<_ACEOF
12596 #line 12596 "configure"
12597 #include "confdefs.h"
12598
12599 #include <libutf8.h>
12600 int
12601 main (void)
12602 {
12603 putwc(0,0);
12604   ;
12605   return 0;
12606 }
12607 _ACEOF
12608 rm -f "conftest.$ac_objext"
12609 if { (eval echo "$as_me:12609: \"$ac_compile\"") >&5
12610   (eval $ac_compile) 2>&5
12611   ac_status=$?
12612   echo "$as_me:12612: \$? = $ac_status" >&5
12613   (exit "$ac_status"); } &&
12614          { ac_try='test -s "conftest.$ac_objext"'
12615   { (eval echo "$as_me:12615: \"$ac_try\"") >&5
12616   (eval $ac_try) 2>&5
12617   ac_status=$?
12618   echo "$as_me:12618: \$? = $ac_status" >&5
12619   (exit "$ac_status"); }; }; then
12620
12621                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12622
12623 echo "${as_me:-configure}:12623: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12624
12625                                 cf_cv_find_linkage_utf8=maybe
12626                                 cf_test_CPPFLAGS="$CPPFLAGS"
12627                                 break
12628 else
12629   echo "$as_me: failed program was:" >&5
12630 cat "conftest.$ac_ext" >&5
12631
12632                                 CPPFLAGS="$cf_save_CPPFLAGS"
12633
12634 fi
12635 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12636                 fi
12637         done
12638
12639         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12640
12641 echo "${as_me:-configure}:12641: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12642
12643                 cf_save_LIBS="$LIBS"
12644                 cf_save_LDFLAGS="$LDFLAGS"
12645
12646                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12647
12648 cf_search=
12649 cf_library_path_list=""
12650 if test -n "${LDFLAGS}${LIBS}" ; then
12651         for cf_library_path in $LDFLAGS $LIBS
12652         do
12653                 case "$cf_library_path" in
12654                 (-L*)
12655                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12656
12657 test "x$cf_library_path" != "xNONE" && \
12658 test -d "$cf_library_path" && \
12659  {
12660         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12661         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12662         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12663         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12664         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12665         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12666 }
12667
12668                         cf_library_path_list="$cf_library_path_list $cf_search"
12669                         ;;
12670                 esac
12671         done
12672 fi
12673
12674 cf_search=
12675
12676 test "x$prefix" != "xNONE" && \
12677 test -d "$prefix" && \
12678  {
12679         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12680         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12681         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12682         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12683         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12684         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12685 }
12686
12687 for cf_subdir_prefix in \
12688         /usr \
12689         /usr/local \
12690         /usr/pkg \
12691         /opt \
12692         /opt/local \
12693         $HOME
12694 do
12695
12696 test "x$cf_subdir_prefix" != "x$prefix" && \
12697 test -d "$cf_subdir_prefix" && \
12698 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12699         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12700         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12701         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12702         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12703         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12704         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12705 }
12706
12707 done
12708
12709 cf_search="$cf_library_path_list $cf_search"
12710
12711                         for cf_cv_library_path_utf8 in $cf_search
12712                         do
12713                                 if test -d "$cf_cv_library_path_utf8" ; then
12714                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12715
12716 echo "${as_me:-configure}:12716: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12717
12718                                         CPPFLAGS="$cf_test_CPPFLAGS"
12719                                         LIBS="-lutf8  $cf_save_LIBS"
12720                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12721                                         cat >"conftest.$ac_ext" <<_ACEOF
12722 #line 12722 "configure"
12723 #include "confdefs.h"
12724
12725 #include <libutf8.h>
12726 int
12727 main (void)
12728 {
12729 putwc(0,0);
12730   ;
12731   return 0;
12732 }
12733 _ACEOF
12734 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12735 if { (eval echo "$as_me:12735: \"$ac_link\"") >&5
12736   (eval $ac_link) 2>&5
12737   ac_status=$?
12738   echo "$as_me:12738: \$? = $ac_status" >&5
12739   (exit "$ac_status"); } &&
12740          { ac_try='test -s "conftest$ac_exeext"'
12741   { (eval echo "$as_me:12741: \"$ac_try\"") >&5
12742   (eval $ac_try) 2>&5
12743   ac_status=$?
12744   echo "$as_me:12744: \$? = $ac_status" >&5
12745   (exit "$ac_status"); }; }; then
12746
12747                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12748
12749 echo "${as_me:-configure}:12749: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12750
12751                                         cf_cv_find_linkage_utf8=yes
12752                                         cf_cv_library_file_utf8="-lutf8"
12753                                         break
12754 else
12755   echo "$as_me: failed program was:" >&5
12756 cat "conftest.$ac_ext" >&5
12757
12758                                         CPPFLAGS="$cf_save_CPPFLAGS"
12759                                         LIBS="$cf_save_LIBS"
12760                                         LDFLAGS="$cf_save_LDFLAGS"
12761
12762 fi
12763 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12764                                 fi
12765                         done
12766                         CPPFLAGS="$cf_save_CPPFLAGS"
12767                         LDFLAGS="$cf_save_LDFLAGS"
12768                 fi
12769
12770         else
12771                 cf_cv_find_linkage_utf8=no
12772         fi
12773
12774 fi
12775 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12776
12777 fi
12778 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12779
12780 LIBS="$cf_save_LIBS"
12781
12782 if test "$cf_cv_find_linkage_utf8" = yes ; then
12783 cf_cv_utf8_lib=add-on
12784 else
12785 cf_cv_utf8_lib=no
12786 fi
12787
12788 fi
12789 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12790 fi
12791 echo "$as_me:12791: result: $cf_cv_utf8_lib" >&5
12792 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12793
12794 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12795 # ncurses/ncursesw:
12796 if test "$cf_cv_utf8_lib" = "add-on" ; then
12797
12798 cat >>confdefs.h <<\EOF
12799 #define HAVE_LIBUTF8_H 1
12800 EOF
12801
12802 if test -n "$cf_cv_header_path_utf8" ; then
12803   for cf_add_incdir in $cf_cv_header_path_utf8
12804   do
12805         while test "$cf_add_incdir" != /usr/include
12806         do
12807           if test -d "$cf_add_incdir"
12808           then
12809                 cf_have_incdir=no
12810                 if test -n "$CFLAGS$CPPFLAGS" ; then
12811                   # a loop is needed to ensure we can add subdirs of existing dirs
12812                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12813                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12814                           cf_have_incdir=yes; break
12815                         fi
12816                   done
12817                 fi
12818
12819                 if test "$cf_have_incdir" = no ; then
12820                   if test "$cf_add_incdir" = /usr/local/include ; then
12821                         if test "$GCC" = yes
12822                         then
12823                           cf_save_CPPFLAGS=$CPPFLAGS
12824
12825         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12826         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12827
12828                           cat >"conftest.$ac_ext" <<_ACEOF
12829 #line 12829 "configure"
12830 #include "confdefs.h"
12831 #include <stdio.h>
12832 int
12833 main (void)
12834 {
12835 printf("Hello")
12836   ;
12837   return 0;
12838 }
12839 _ACEOF
12840 rm -f "conftest.$ac_objext"
12841 if { (eval echo "$as_me:12841: \"$ac_compile\"") >&5
12842   (eval $ac_compile) 2>&5
12843   ac_status=$?
12844   echo "$as_me:12844: \$? = $ac_status" >&5
12845   (exit "$ac_status"); } &&
12846          { ac_try='test -s "conftest.$ac_objext"'
12847   { (eval echo "$as_me:12847: \"$ac_try\"") >&5
12848   (eval $ac_try) 2>&5
12849   ac_status=$?
12850   echo "$as_me:12850: \$? = $ac_status" >&5
12851   (exit "$ac_status"); }; }; then
12852   :
12853 else
12854   echo "$as_me: failed program was:" >&5
12855 cat "conftest.$ac_ext" >&5
12856 cf_have_incdir=yes
12857 fi
12858 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12859                           CPPFLAGS=$cf_save_CPPFLAGS
12860                         fi
12861                   fi
12862                 fi
12863
12864                 if test "$cf_have_incdir" = no ; then
12865                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12866
12867 echo "${as_me:-configure}:12867: testing adding $cf_add_incdir to include-path ..." 1>&5
12868
12869                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12870
12871                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12872                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12873                   cf_add_incdir="$cf_top_incdir"
12874                 else
12875                   break
12876                 fi
12877           else
12878                 break
12879           fi
12880         done
12881   done
12882 fi
12883
12884 if test -n "$cf_cv_library_path_utf8" ; then
12885         for cf_add_libdir in $cf_cv_library_path_utf8
12886         do
12887                 if test "$cf_add_libdir" = /usr/lib ; then
12888                         :
12889                 elif test -d "$cf_add_libdir"
12890                 then
12891                         cf_have_libdir=no
12892                         if test -n "$LDFLAGS$LIBS" ; then
12893                                 # a loop is needed to ensure we can add subdirs of existing dirs
12894                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12895                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12896                                                 cf_have_libdir=yes; break
12897                                         fi
12898                                 done
12899                         fi
12900                         if test "$cf_have_libdir" = no ; then
12901                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12902
12903 echo "${as_me:-configure}:12903: testing adding $cf_add_libdir to library-path ..." 1>&5
12904
12905                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12906                         fi
12907                 fi
12908         done
12909 fi
12910
12911 cf_add_libs="$LIBS"
12912 # reverse order
12913 cf_add_0lib=
12914 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12915 # filter duplicates
12916 for cf_add_1lib in $cf_add_0lib; do
12917         for cf_add_2lib in $cf_add_libs; do
12918                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12919                         cf_add_1lib=
12920                         break
12921                 fi
12922         done
12923         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12924 done
12925 LIBS="$cf_add_libs"
12926
12927 fi
12928
12929                 if test "$cf_cv_utf8_lib" != no ; then
12930                         NCURSES_LIBUTF8=1
12931                 fi
12932         fi
12933
12934 # This is needed on Tru64 5.0 to declare mbstate_t
12935 echo "$as_me:12935: checking if we must include wchar.h to declare mbstate_t" >&5
12936 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12937 if test "${cf_cv_mbstate_t+set}" = set; then
12938   echo $ECHO_N "(cached) $ECHO_C" >&6
12939 else
12940
12941 cat >"conftest.$ac_ext" <<_ACEOF
12942 #line 12942 "configure"
12943 #include "confdefs.h"
12944
12945 #include <stdlib.h>
12946 #include <stdarg.h>
12947 #include <stdio.h>
12948 #ifdef HAVE_LIBUTF8_H
12949 #include <libutf8.h>
12950 #endif
12951 int
12952 main (void)
12953 {
12954 mbstate_t state
12955   ;
12956   return 0;
12957 }
12958 _ACEOF
12959 rm -f "conftest.$ac_objext"
12960 if { (eval echo "$as_me:12960: \"$ac_compile\"") >&5
12961   (eval $ac_compile) 2>&5
12962   ac_status=$?
12963   echo "$as_me:12963: \$? = $ac_status" >&5
12964   (exit "$ac_status"); } &&
12965          { ac_try='test -s "conftest.$ac_objext"'
12966   { (eval echo "$as_me:12966: \"$ac_try\"") >&5
12967   (eval $ac_try) 2>&5
12968   ac_status=$?
12969   echo "$as_me:12969: \$? = $ac_status" >&5
12970   (exit "$ac_status"); }; }; then
12971   cf_cv_mbstate_t=no
12972 else
12973   echo "$as_me: failed program was:" >&5
12974 cat "conftest.$ac_ext" >&5
12975 cat >"conftest.$ac_ext" <<_ACEOF
12976 #line 12976 "configure"
12977 #include "confdefs.h"
12978
12979 #include <stdlib.h>
12980 #include <stdarg.h>
12981 #include <stdio.h>
12982 #include <wchar.h>
12983 #ifdef HAVE_LIBUTF8_H
12984 #include <libutf8.h>
12985 #endif
12986 int
12987 main (void)
12988 {
12989 mbstate_t value
12990   ;
12991   return 0;
12992 }
12993 _ACEOF
12994 rm -f "conftest.$ac_objext"
12995 if { (eval echo "$as_me:12995: \"$ac_compile\"") >&5
12996   (eval $ac_compile) 2>&5
12997   ac_status=$?
12998   echo "$as_me:12998: \$? = $ac_status" >&5
12999   (exit "$ac_status"); } &&
13000          { ac_try='test -s "conftest.$ac_objext"'
13001   { (eval echo "$as_me:13001: \"$ac_try\"") >&5
13002   (eval $ac_try) 2>&5
13003   ac_status=$?
13004   echo "$as_me:13004: \$? = $ac_status" >&5
13005   (exit "$ac_status"); }; }; then
13006   cf_cv_mbstate_t=yes
13007 else
13008   echo "$as_me: failed program was:" >&5
13009 cat "conftest.$ac_ext" >&5
13010 cf_cv_mbstate_t=unknown
13011 fi
13012 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13013 fi
13014 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13015 fi
13016 echo "$as_me:13016: result: $cf_cv_mbstate_t" >&5
13017 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13018
13019 if test "$cf_cv_mbstate_t" = yes ; then
13020
13021 cat >>confdefs.h <<\EOF
13022 #define NEED_WCHAR_H 1
13023 EOF
13024
13025         NEED_WCHAR_H=1
13026 fi
13027
13028 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13029 if test "$cf_cv_mbstate_t" = unknown ; then
13030         NCURSES_MBSTATE_T=1
13031 fi
13032
13033 # This is needed on Tru64 5.0 to declare wchar_t
13034 echo "$as_me:13034: checking if we must include wchar.h to declare wchar_t" >&5
13035 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13036 if test "${cf_cv_wchar_t+set}" = set; then
13037   echo $ECHO_N "(cached) $ECHO_C" >&6
13038 else
13039
13040 cat >"conftest.$ac_ext" <<_ACEOF
13041 #line 13041 "configure"
13042 #include "confdefs.h"
13043
13044 #include <stdlib.h>
13045 #include <stdarg.h>
13046 #include <stdio.h>
13047 #ifdef HAVE_LIBUTF8_H
13048 #include <libutf8.h>
13049 #endif
13050 int
13051 main (void)
13052 {
13053 wchar_t state
13054   ;
13055   return 0;
13056 }
13057 _ACEOF
13058 rm -f "conftest.$ac_objext"
13059 if { (eval echo "$as_me:13059: \"$ac_compile\"") >&5
13060   (eval $ac_compile) 2>&5
13061   ac_status=$?
13062   echo "$as_me:13062: \$? = $ac_status" >&5
13063   (exit "$ac_status"); } &&
13064          { ac_try='test -s "conftest.$ac_objext"'
13065   { (eval echo "$as_me:13065: \"$ac_try\"") >&5
13066   (eval $ac_try) 2>&5
13067   ac_status=$?
13068   echo "$as_me:13068: \$? = $ac_status" >&5
13069   (exit "$ac_status"); }; }; then
13070   cf_cv_wchar_t=no
13071 else
13072   echo "$as_me: failed program was:" >&5
13073 cat "conftest.$ac_ext" >&5
13074 cat >"conftest.$ac_ext" <<_ACEOF
13075 #line 13075 "configure"
13076 #include "confdefs.h"
13077
13078 #include <stdlib.h>
13079 #include <stdarg.h>
13080 #include <stdio.h>
13081 #include <wchar.h>
13082 #ifdef HAVE_LIBUTF8_H
13083 #include <libutf8.h>
13084 #endif
13085 int
13086 main (void)
13087 {
13088 wchar_t value
13089   ;
13090   return 0;
13091 }
13092 _ACEOF
13093 rm -f "conftest.$ac_objext"
13094 if { (eval echo "$as_me:13094: \"$ac_compile\"") >&5
13095   (eval $ac_compile) 2>&5
13096   ac_status=$?
13097   echo "$as_me:13097: \$? = $ac_status" >&5
13098   (exit "$ac_status"); } &&
13099          { ac_try='test -s "conftest.$ac_objext"'
13100   { (eval echo "$as_me:13100: \"$ac_try\"") >&5
13101   (eval $ac_try) 2>&5
13102   ac_status=$?
13103   echo "$as_me:13103: \$? = $ac_status" >&5
13104   (exit "$ac_status"); }; }; then
13105   cf_cv_wchar_t=yes
13106 else
13107   echo "$as_me: failed program was:" >&5
13108 cat "conftest.$ac_ext" >&5
13109 cf_cv_wchar_t=unknown
13110 fi
13111 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13112 fi
13113 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13114 fi
13115 echo "$as_me:13115: result: $cf_cv_wchar_t" >&5
13116 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13117
13118 if test "$cf_cv_wchar_t" = yes ; then
13119
13120 cat >>confdefs.h <<\EOF
13121 #define NEED_WCHAR_H 1
13122 EOF
13123
13124         NEED_WCHAR_H=1
13125 fi
13126
13127 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13128 if test "$cf_cv_wchar_t" = unknown ; then
13129         NCURSES_WCHAR_T=1
13130 fi
13131
13132 # if we find wchar_t in either place, use substitution to provide a fallback.
13133 if test "$cf_cv_wchar_t" != unknown ; then
13134         NCURSES_OK_WCHAR_T=1
13135 fi
13136
13137 # This is needed on Tru64 5.0 to declare wint_t
13138 echo "$as_me:13138: checking if we must include wchar.h to declare wint_t" >&5
13139 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13140 if test "${cf_cv_wint_t+set}" = set; then
13141   echo $ECHO_N "(cached) $ECHO_C" >&6
13142 else
13143
13144 cat >"conftest.$ac_ext" <<_ACEOF
13145 #line 13145 "configure"
13146 #include "confdefs.h"
13147
13148 #include <stdlib.h>
13149 #include <stdarg.h>
13150 #include <stdio.h>
13151 #ifdef HAVE_LIBUTF8_H
13152 #include <libutf8.h>
13153 #endif
13154 int
13155 main (void)
13156 {
13157 wint_t state
13158   ;
13159   return 0;
13160 }
13161 _ACEOF
13162 rm -f "conftest.$ac_objext"
13163 if { (eval echo "$as_me:13163: \"$ac_compile\"") >&5
13164   (eval $ac_compile) 2>&5
13165   ac_status=$?
13166   echo "$as_me:13166: \$? = $ac_status" >&5
13167   (exit "$ac_status"); } &&
13168          { ac_try='test -s "conftest.$ac_objext"'
13169   { (eval echo "$as_me:13169: \"$ac_try\"") >&5
13170   (eval $ac_try) 2>&5
13171   ac_status=$?
13172   echo "$as_me:13172: \$? = $ac_status" >&5
13173   (exit "$ac_status"); }; }; then
13174   cf_cv_wint_t=no
13175 else
13176   echo "$as_me: failed program was:" >&5
13177 cat "conftest.$ac_ext" >&5
13178 cat >"conftest.$ac_ext" <<_ACEOF
13179 #line 13179 "configure"
13180 #include "confdefs.h"
13181
13182 #include <stdlib.h>
13183 #include <stdarg.h>
13184 #include <stdio.h>
13185 #include <wchar.h>
13186 #ifdef HAVE_LIBUTF8_H
13187 #include <libutf8.h>
13188 #endif
13189 int
13190 main (void)
13191 {
13192 wint_t value
13193   ;
13194   return 0;
13195 }
13196 _ACEOF
13197 rm -f "conftest.$ac_objext"
13198 if { (eval echo "$as_me:13198: \"$ac_compile\"") >&5
13199   (eval $ac_compile) 2>&5
13200   ac_status=$?
13201   echo "$as_me:13201: \$? = $ac_status" >&5
13202   (exit "$ac_status"); } &&
13203          { ac_try='test -s "conftest.$ac_objext"'
13204   { (eval echo "$as_me:13204: \"$ac_try\"") >&5
13205   (eval $ac_try) 2>&5
13206   ac_status=$?
13207   echo "$as_me:13207: \$? = $ac_status" >&5
13208   (exit "$ac_status"); }; }; then
13209   cf_cv_wint_t=yes
13210 else
13211   echo "$as_me: failed program was:" >&5
13212 cat "conftest.$ac_ext" >&5
13213 cf_cv_wint_t=unknown
13214 fi
13215 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13216 fi
13217 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13218 fi
13219 echo "$as_me:13219: result: $cf_cv_wint_t" >&5
13220 echo "${ECHO_T}$cf_cv_wint_t" >&6
13221
13222 if test "$cf_cv_wint_t" = yes ; then
13223
13224 cat >>confdefs.h <<\EOF
13225 #define NEED_WCHAR_H 1
13226 EOF
13227
13228         NEED_WCHAR_H=1
13229 fi
13230
13231 # if we do not find wint_t in either place, use substitution to provide a fallback.
13232 if test "$cf_cv_wint_t" = unknown ; then
13233         NCURSES_WINT_T=1
13234 fi
13235
13236 # if we find wint_t in either place, use substitution to provide a fallback.
13237 if test "$cf_cv_wint_t" != unknown ; then
13238         NCURSES_OK_WINT_T=1
13239 fi
13240
13241         if test "$NCURSES_MBSTATE_T" != 0; then
13242
13243 cat >>confdefs.h <<\EOF
13244 #define NEED_MBSTATE_T_DEF 1
13245 EOF
13246
13247         fi
13248 fi
13249
13250 ###   use option --disable-lp64 to allow long chtype
13251 echo "$as_me:13251: checking whether to enable _LP64 definition in curses.h" >&5
13252 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13253
13254 # Check whether --enable-lp64 or --disable-lp64 was given.
13255 if test "${enable_lp64+set}" = set; then
13256   enableval="$enable_lp64"
13257   with_lp64=$enableval
13258 else
13259   with_lp64=$cf_dft_with_lp64
13260 fi;
13261 echo "$as_me:13261: result: $with_lp64" >&5
13262 echo "${ECHO_T}$with_lp64" >&6
13263
13264 if test "x$with_lp64" = xyes ; then
13265         cf_cv_enable_lp64=1
13266 else
13267         cf_cv_enable_lp64=0
13268 fi
13269
13270 # Check whether --enable-largefile or --disable-largefile was given.
13271 if test "${enable_largefile+set}" = set; then
13272   enableval="$enable_largefile"
13273
13274 fi;
13275 if test "$enable_largefile" != no; then
13276
13277   echo "$as_me:13277: checking for special C compiler options needed for large files" >&5
13278 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13279 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13280   echo $ECHO_N "(cached) $ECHO_C" >&6
13281 else
13282   ac_cv_sys_largefile_CC=no
13283      if test "$GCC" != yes; then
13284        ac_save_CC=$CC
13285        while :; do
13286          # IRIX 6.2 and later do not support large files by default,
13287          # so use the C compiler's -n32 option if that helps.
13288          cat >"conftest.$ac_ext" <<_ACEOF
13289 #line 13289 "configure"
13290 #include "confdefs.h"
13291 #include <sys/types.h>
13292  /* Check that off_t can represent 2**63 - 1 correctly.
13293     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13294     since some C++ compilers masquerading as C compilers
13295     incorrectly reject 9223372036854775807.  */
13296 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13297   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13298                        && LARGE_OFF_T % 2147483647 == 1)
13299                       ? 1 : -1];
13300 int
13301 main (void)
13302 {
13303
13304   ;
13305   return 0;
13306 }
13307 _ACEOF
13308          rm -f "conftest.$ac_objext"
13309 if { (eval echo "$as_me:13309: \"$ac_compile\"") >&5
13310   (eval $ac_compile) 2>&5
13311   ac_status=$?
13312   echo "$as_me:13312: \$? = $ac_status" >&5
13313   (exit "$ac_status"); } &&
13314          { ac_try='test -s "conftest.$ac_objext"'
13315   { (eval echo "$as_me:13315: \"$ac_try\"") >&5
13316   (eval $ac_try) 2>&5
13317   ac_status=$?
13318   echo "$as_me:13318: \$? = $ac_status" >&5
13319   (exit "$ac_status"); }; }; then
13320   break
13321 else
13322   echo "$as_me: failed program was:" >&5
13323 cat "conftest.$ac_ext" >&5
13324 fi
13325 rm -f "conftest.$ac_objext"
13326          CC="$CC -n32"
13327          rm -f "conftest.$ac_objext"
13328 if { (eval echo "$as_me:13328: \"$ac_compile\"") >&5
13329   (eval $ac_compile) 2>&5
13330   ac_status=$?
13331   echo "$as_me:13331: \$? = $ac_status" >&5
13332   (exit "$ac_status"); } &&
13333          { ac_try='test -s "conftest.$ac_objext"'
13334   { (eval echo "$as_me:13334: \"$ac_try\"") >&5
13335   (eval $ac_try) 2>&5
13336   ac_status=$?
13337   echo "$as_me:13337: \$? = $ac_status" >&5
13338   (exit "$ac_status"); }; }; then
13339   ac_cv_sys_largefile_CC=' -n32'; break
13340 else
13341   echo "$as_me: failed program was:" >&5
13342 cat "conftest.$ac_ext" >&5
13343 fi
13344 rm -f "conftest.$ac_objext"
13345          break
13346        done
13347        CC=$ac_save_CC
13348        rm -f "conftest.$ac_ext"
13349     fi
13350 fi
13351 echo "$as_me:13351: result: $ac_cv_sys_largefile_CC" >&5
13352 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13353   if test "$ac_cv_sys_largefile_CC" != no; then
13354     CC=$CC$ac_cv_sys_largefile_CC
13355   fi
13356
13357   echo "$as_me:13357: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13358 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13359 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13360   echo $ECHO_N "(cached) $ECHO_C" >&6
13361 else
13362   while :; do
13363   ac_cv_sys_file_offset_bits=no
13364   cat >"conftest.$ac_ext" <<_ACEOF
13365 #line 13365 "configure"
13366 #include "confdefs.h"
13367 #include <sys/types.h>
13368  /* Check that off_t can represent 2**63 - 1 correctly.
13369     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13370     since some C++ compilers masquerading as C compilers
13371     incorrectly reject 9223372036854775807.  */
13372 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13373   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13374                        && LARGE_OFF_T % 2147483647 == 1)
13375                       ? 1 : -1];
13376 int
13377 main (void)
13378 {
13379
13380   ;
13381   return 0;
13382 }
13383 _ACEOF
13384 rm -f "conftest.$ac_objext"
13385 if { (eval echo "$as_me:13385: \"$ac_compile\"") >&5
13386   (eval $ac_compile) 2>&5
13387   ac_status=$?
13388   echo "$as_me:13388: \$? = $ac_status" >&5
13389   (exit "$ac_status"); } &&
13390          { ac_try='test -s "conftest.$ac_objext"'
13391   { (eval echo "$as_me:13391: \"$ac_try\"") >&5
13392   (eval $ac_try) 2>&5
13393   ac_status=$?
13394   echo "$as_me:13394: \$? = $ac_status" >&5
13395   (exit "$ac_status"); }; }; then
13396   break
13397 else
13398   echo "$as_me: failed program was:" >&5
13399 cat "conftest.$ac_ext" >&5
13400 fi
13401 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13402   cat >"conftest.$ac_ext" <<_ACEOF
13403 #line 13403 "configure"
13404 #include "confdefs.h"
13405 #define _FILE_OFFSET_BITS 64
13406 #include <sys/types.h>
13407  /* Check that off_t can represent 2**63 - 1 correctly.
13408     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13409     since some C++ compilers masquerading as C compilers
13410     incorrectly reject 9223372036854775807.  */
13411 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13412   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13413                        && LARGE_OFF_T % 2147483647 == 1)
13414                       ? 1 : -1];
13415 int
13416 main (void)
13417 {
13418
13419   ;
13420   return 0;
13421 }
13422 _ACEOF
13423 rm -f "conftest.$ac_objext"
13424 if { (eval echo "$as_me:13424: \"$ac_compile\"") >&5
13425   (eval $ac_compile) 2>&5
13426   ac_status=$?
13427   echo "$as_me:13427: \$? = $ac_status" >&5
13428   (exit "$ac_status"); } &&
13429          { ac_try='test -s "conftest.$ac_objext"'
13430   { (eval echo "$as_me:13430: \"$ac_try\"") >&5
13431   (eval $ac_try) 2>&5
13432   ac_status=$?
13433   echo "$as_me:13433: \$? = $ac_status" >&5
13434   (exit "$ac_status"); }; }; then
13435   ac_cv_sys_file_offset_bits=64; break
13436 else
13437   echo "$as_me: failed program was:" >&5
13438 cat "conftest.$ac_ext" >&5
13439 fi
13440 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13441   break
13442 done
13443 fi
13444 echo "$as_me:13444: result: $ac_cv_sys_file_offset_bits" >&5
13445 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13446 if test "$ac_cv_sys_file_offset_bits" != no; then
13447
13448 cat >>confdefs.h <<EOF
13449 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13450 EOF
13451
13452 fi
13453 rm -rf conftest*
13454   echo "$as_me:13454: checking for _LARGE_FILES value needed for large files" >&5
13455 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13456 if test "${ac_cv_sys_large_files+set}" = set; then
13457   echo $ECHO_N "(cached) $ECHO_C" >&6
13458 else
13459   while :; do
13460   ac_cv_sys_large_files=no
13461   cat >"conftest.$ac_ext" <<_ACEOF
13462 #line 13462 "configure"
13463 #include "confdefs.h"
13464 #include <sys/types.h>
13465  /* Check that off_t can represent 2**63 - 1 correctly.
13466     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13467     since some C++ compilers masquerading as C compilers
13468     incorrectly reject 9223372036854775807.  */
13469 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13470   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13471                        && LARGE_OFF_T % 2147483647 == 1)
13472                       ? 1 : -1];
13473 int
13474 main (void)
13475 {
13476
13477   ;
13478   return 0;
13479 }
13480 _ACEOF
13481 rm -f "conftest.$ac_objext"
13482 if { (eval echo "$as_me:13482: \"$ac_compile\"") >&5
13483   (eval $ac_compile) 2>&5
13484   ac_status=$?
13485   echo "$as_me:13485: \$? = $ac_status" >&5
13486   (exit "$ac_status"); } &&
13487          { ac_try='test -s "conftest.$ac_objext"'
13488   { (eval echo "$as_me:13488: \"$ac_try\"") >&5
13489   (eval $ac_try) 2>&5
13490   ac_status=$?
13491   echo "$as_me:13491: \$? = $ac_status" >&5
13492   (exit "$ac_status"); }; }; then
13493   break
13494 else
13495   echo "$as_me: failed program was:" >&5
13496 cat "conftest.$ac_ext" >&5
13497 fi
13498 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13499   cat >"conftest.$ac_ext" <<_ACEOF
13500 #line 13500 "configure"
13501 #include "confdefs.h"
13502 #define _LARGE_FILES 1
13503 #include <sys/types.h>
13504  /* Check that off_t can represent 2**63 - 1 correctly.
13505     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13506     since some C++ compilers masquerading as C compilers
13507     incorrectly reject 9223372036854775807.  */
13508 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13509   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13510                        && LARGE_OFF_T % 2147483647 == 1)
13511                       ? 1 : -1];
13512 int
13513 main (void)
13514 {
13515
13516   ;
13517   return 0;
13518 }
13519 _ACEOF
13520 rm -f "conftest.$ac_objext"
13521 if { (eval echo "$as_me:13521: \"$ac_compile\"") >&5
13522   (eval $ac_compile) 2>&5
13523   ac_status=$?
13524   echo "$as_me:13524: \$? = $ac_status" >&5
13525   (exit "$ac_status"); } &&
13526          { ac_try='test -s "conftest.$ac_objext"'
13527   { (eval echo "$as_me:13527: \"$ac_try\"") >&5
13528   (eval $ac_try) 2>&5
13529   ac_status=$?
13530   echo "$as_me:13530: \$? = $ac_status" >&5
13531   (exit "$ac_status"); }; }; then
13532   ac_cv_sys_large_files=1; break
13533 else
13534   echo "$as_me: failed program was:" >&5
13535 cat "conftest.$ac_ext" >&5
13536 fi
13537 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13538   break
13539 done
13540 fi
13541 echo "$as_me:13541: result: $ac_cv_sys_large_files" >&5
13542 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13543 if test "$ac_cv_sys_large_files" != no; then
13544
13545 cat >>confdefs.h <<EOF
13546 #define _LARGE_FILES $ac_cv_sys_large_files
13547 EOF
13548
13549 fi
13550 rm -rf conftest*
13551 fi
13552
13553         if test "$enable_largefile" != no ; then
13554         echo "$as_me:13554: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13555 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13556 if test "${ac_cv_sys_largefile_source+set}" = set; then
13557   echo $ECHO_N "(cached) $ECHO_C" >&6
13558 else
13559   while :; do
13560   ac_cv_sys_largefile_source=no
13561   cat >"conftest.$ac_ext" <<_ACEOF
13562 #line 13562 "configure"
13563 #include "confdefs.h"
13564 #include <stdio.h>
13565 int
13566 main (void)
13567 {
13568 return !fseeko;
13569   ;
13570   return 0;
13571 }
13572 _ACEOF
13573 rm -f "conftest.$ac_objext"
13574 if { (eval echo "$as_me:13574: \"$ac_compile\"") >&5
13575   (eval $ac_compile) 2>&5
13576   ac_status=$?
13577   echo "$as_me:13577: \$? = $ac_status" >&5
13578   (exit "$ac_status"); } &&
13579          { ac_try='test -s "conftest.$ac_objext"'
13580   { (eval echo "$as_me:13580: \"$ac_try\"") >&5
13581   (eval $ac_try) 2>&5
13582   ac_status=$?
13583   echo "$as_me:13583: \$? = $ac_status" >&5
13584   (exit "$ac_status"); }; }; then
13585   break
13586 else
13587   echo "$as_me: failed program was:" >&5
13588 cat "conftest.$ac_ext" >&5
13589 fi
13590 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13591   cat >"conftest.$ac_ext" <<_ACEOF
13592 #line 13592 "configure"
13593 #include "confdefs.h"
13594 #define _LARGEFILE_SOURCE 1
13595 #include <stdio.h>
13596 int
13597 main (void)
13598 {
13599 return !fseeko;
13600   ;
13601   return 0;
13602 }
13603 _ACEOF
13604 rm -f "conftest.$ac_objext"
13605 if { (eval echo "$as_me:13605: \"$ac_compile\"") >&5
13606   (eval $ac_compile) 2>&5
13607   ac_status=$?
13608   echo "$as_me:13608: \$? = $ac_status" >&5
13609   (exit "$ac_status"); } &&
13610          { ac_try='test -s "conftest.$ac_objext"'
13611   { (eval echo "$as_me:13611: \"$ac_try\"") >&5
13612   (eval $ac_try) 2>&5
13613   ac_status=$?
13614   echo "$as_me:13614: \$? = $ac_status" >&5
13615   (exit "$ac_status"); }; }; then
13616   ac_cv_sys_largefile_source=1; break
13617 else
13618   echo "$as_me: failed program was:" >&5
13619 cat "conftest.$ac_ext" >&5
13620 fi
13621 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13622   break
13623 done
13624 fi
13625 echo "$as_me:13625: result: $ac_cv_sys_largefile_source" >&5
13626 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13627 if test "$ac_cv_sys_largefile_source" != no; then
13628
13629 cat >>confdefs.h <<EOF
13630 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13631 EOF
13632
13633 fi
13634 rm -rf conftest*
13635
13636 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13637 # in glibc 2.1.3, but that breaks too many other things.
13638 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13639 echo "$as_me:13639: checking for fseeko" >&5
13640 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13641 if test "${ac_cv_func_fseeko+set}" = set; then
13642   echo $ECHO_N "(cached) $ECHO_C" >&6
13643 else
13644   cat >"conftest.$ac_ext" <<_ACEOF
13645 #line 13645 "configure"
13646 #include "confdefs.h"
13647 #include <stdio.h>
13648 int
13649 main (void)
13650 {
13651 return fseeko && fseeko (stdin, 0, 0);
13652   ;
13653   return 0;
13654 }
13655 _ACEOF
13656 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13657 if { (eval echo "$as_me:13657: \"$ac_link\"") >&5
13658   (eval $ac_link) 2>&5
13659   ac_status=$?
13660   echo "$as_me:13660: \$? = $ac_status" >&5
13661   (exit "$ac_status"); } &&
13662          { ac_try='test -s "conftest$ac_exeext"'
13663   { (eval echo "$as_me:13663: \"$ac_try\"") >&5
13664   (eval $ac_try) 2>&5
13665   ac_status=$?
13666   echo "$as_me:13666: \$? = $ac_status" >&5
13667   (exit "$ac_status"); }; }; then
13668   ac_cv_func_fseeko=yes
13669 else
13670   echo "$as_me: failed program was:" >&5
13671 cat "conftest.$ac_ext" >&5
13672 ac_cv_func_fseeko=no
13673 fi
13674 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13675 fi
13676 echo "$as_me:13676: result: $ac_cv_func_fseeko" >&5
13677 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13678 if test $ac_cv_func_fseeko = yes; then
13679
13680 cat >>confdefs.h <<\EOF
13681 #define HAVE_FSEEKO 1
13682 EOF
13683
13684 fi
13685
13686         # Normally we would collect these definitions in the config.h,
13687         # but (like _XOPEN_SOURCE), some environments rely on having these
13688         # defined before any of the system headers are included.  Another
13689         # case comes up with C++, e.g., on AIX the compiler compiles the
13690         # header files by themselves before looking at the body files it is
13691         # told to compile.  For ncurses, those header files do not include
13692         # the config.h
13693         if test "$ac_cv_sys_large_files" != no
13694         then
13695
13696         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13697         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13698
13699         fi
13700         if test "$ac_cv_sys_largefile_source" != no
13701         then
13702
13703         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13704         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13705
13706         fi
13707         if test "$ac_cv_sys_file_offset_bits" != no
13708         then
13709
13710         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13711         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13712
13713         fi
13714
13715         echo "$as_me:13715: checking whether to use struct dirent64" >&5
13716 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13717 if test "${cf_cv_struct_dirent64+set}" = set; then
13718   echo $ECHO_N "(cached) $ECHO_C" >&6
13719 else
13720
13721                 cat >"conftest.$ac_ext" <<_ACEOF
13722 #line 13722 "configure"
13723 #include "confdefs.h"
13724
13725 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13726 #include <sys/types.h>
13727 #include <dirent.h>
13728
13729 int
13730 main (void)
13731 {
13732
13733                 /* if transitional largefile support is setup, this is true */
13734                 extern struct dirent64 * readdir(DIR *);
13735                 struct dirent64 *x = readdir((DIR *)0);
13736                 struct dirent *y = readdir((DIR *)0);
13737                 int z = x - y;
13738                 (void)z;
13739
13740   ;
13741   return 0;
13742 }
13743 _ACEOF
13744 rm -f "conftest.$ac_objext"
13745 if { (eval echo "$as_me:13745: \"$ac_compile\"") >&5
13746   (eval $ac_compile) 2>&5
13747   ac_status=$?
13748   echo "$as_me:13748: \$? = $ac_status" >&5
13749   (exit "$ac_status"); } &&
13750          { ac_try='test -s "conftest.$ac_objext"'
13751   { (eval echo "$as_me:13751: \"$ac_try\"") >&5
13752   (eval $ac_try) 2>&5
13753   ac_status=$?
13754   echo "$as_me:13754: \$? = $ac_status" >&5
13755   (exit "$ac_status"); }; }; then
13756   cf_cv_struct_dirent64=yes
13757 else
13758   echo "$as_me: failed program was:" >&5
13759 cat "conftest.$ac_ext" >&5
13760 cf_cv_struct_dirent64=no
13761 fi
13762 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13763
13764 fi
13765 echo "$as_me:13765: result: $cf_cv_struct_dirent64" >&5
13766 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13767         test "$cf_cv_struct_dirent64" = yes &&
13768 cat >>confdefs.h <<\EOF
13769 #define HAVE_STRUCT_DIRENT64 1
13770 EOF
13771
13772         fi
13773
13774 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13775 echo "$as_me:13775: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13776 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13777
13778 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13779 if test "${enable_tparm_varargs+set}" = set; then
13780   enableval="$enable_tparm_varargs"
13781   with_tparm_varargs=$enableval
13782 else
13783   with_tparm_varargs=yes
13784 fi;
13785 echo "$as_me:13785: result: $with_tparm_varargs" >&5
13786 echo "${ECHO_T}$with_tparm_varargs" >&6
13787 NCURSES_TPARM_VARARGS=0
13788 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13789
13790 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13791 if test "$with_ticlib" != no ; then
13792 echo "$as_me:13792: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13793 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13794
13795 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13796 if test "${enable_tic_depends+set}" = set; then
13797   enableval="$enable_tic_depends"
13798   with_tic_depends=$enableval
13799 else
13800   with_tic_depends=yes
13801 fi;
13802 echo "$as_me:13802: result: $with_tic_depends" >&5
13803 echo "${ECHO_T}$with_tic_depends" >&6
13804 else
13805         with_tic_depends=no
13806 fi
13807
13808 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
13809 echo "$as_me:13809: checking if you want to enable wattr* macros" >&5
13810 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
13811
13812 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13813 if test "${enable_wattr_macros+set}" = set; then
13814   enableval="$enable_wattr_macros"
13815   with_wattr_macros=$enableval
13816 else
13817   with_wattr_macros=no
13818 fi;
13819 if [ "x$with_wattr_macros" != xyes ]; then
13820         NCURSES_WATTR_MACROS=0
13821         echo "$as_me:13821: result: no" >&5
13822 echo "${ECHO_T}no" >&6
13823 else
13824         NCURSES_WATTR_MACROS=1
13825         echo "$as_me:13825: result: yes" >&5
13826 echo "${ECHO_T}yes" >&6
13827 fi
13828
13829 echo "$as_me:13829: checking for X11 rgb file" >&5
13830 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13831
13832 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13833 if test "${with_x11_rgb+set}" = set; then
13834   withval="$with_x11_rgb"
13835   RGB_PATH=$withval
13836 else
13837   RGB_PATH=auto
13838 fi;
13839
13840 if test "x$RGB_PATH" = xauto
13841 then
13842         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13843         for cf_path in \
13844                 /opt/local/share/X11/rgb.txt \
13845                 /opt/X11/share/X11/rgb.txt \
13846                 /usr/share/X11/rgb.txt \
13847                 /usr/X11/share/X11/rgb.txt \
13848                 /usr/X11/lib/X11/rgb.txt \
13849                 /usr/lib/X11/rgb.txt \
13850                 /etc/X11/rgb.txt \
13851                 /usr/pkg/lib/X11/rgb.txt \
13852                 /usr/X11R7/lib/X11/rgb.txt \
13853                 /usr/X11R6/lib/X11/rgb.txt \
13854                 /usr/X11R5/lib/X11/rgb.txt \
13855                 /usr/X11R4/lib/X11/rgb.txt \
13856                 /usr/local/lib/X11/rgb.txt \
13857                 /usr/local/share/X11/rgb.txt \
13858                 /usr/lib64/X11/rgb.txt
13859         do
13860                 if test -f "$cf_path" ; then
13861                         RGB_PATH="$cf_path"
13862                         break
13863                 fi
13864         done
13865 else
13866         cf_path=$RGB_PATH
13867
13868 if test "x$prefix" != xNONE; then
13869         cf_path_syntax="$prefix"
13870 else
13871         cf_path_syntax="$ac_default_prefix"
13872 fi
13873
13874 case ".$cf_path" in
13875 (.\$\(*\)*|.\'*\'*)
13876         ;;
13877 (..|./*|.\\*)
13878         ;;
13879 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13880         ;;
13881 (.\$\{*prefix\}*|.\$\{*dir\}*)
13882         eval cf_path="$cf_path"
13883         case ".$cf_path" in
13884         (.NONE/*)
13885                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13886                 ;;
13887         esac
13888         ;;
13889 (.no|.NONE/*)
13890         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13891         ;;
13892 (*)
13893         { { echo "$as_me:13893: error: expected a pathname, not \"$cf_path\"" >&5
13894 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13895    { (exit 1); exit 1; }; }
13896         ;;
13897 esac
13898
13899 fi
13900
13901 echo "$as_me:13901: result: $RGB_PATH" >&5
13902 echo "${ECHO_T}$RGB_PATH" >&6
13903
13904 cat >>confdefs.h <<EOF
13905 #define RGB_PATH "$cf_path"
13906 EOF
13907
13908 no_x11_rgb=
13909 if test "$RGB_PATH" = no
13910 then
13911         no_x11_rgb="#"
13912 fi
13913
13914 ###   use option --with-bool to override bool's type
13915 echo "$as_me:13915: checking for type of bool" >&5
13916 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13917
13918 # Check whether --with-bool or --without-bool was given.
13919 if test "${with_bool+set}" = set; then
13920   withval="$with_bool"
13921   NCURSES_BOOL="$withval"
13922 else
13923   NCURSES_BOOL=auto
13924 fi;
13925 echo "$as_me:13925: result: $NCURSES_BOOL" >&5
13926 echo "${ECHO_T}$NCURSES_BOOL" >&6
13927
13928 echo "$as_me:13928: checking for alternate terminal capabilities file" >&5
13929 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13930
13931 # Check whether --with-caps or --without-caps was given.
13932 if test "${with_caps+set}" = set; then
13933   withval="$with_caps"
13934   TERMINFO_CAPS=Caps.$withval
13935 else
13936   TERMINFO_CAPS=Caps
13937 fi;
13938 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13939 echo "$as_me:13939: result: $TERMINFO_CAPS" >&5
13940 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13941
13942 ###   use option --with-chtype to override chtype's type
13943 echo "$as_me:13943: checking for type of chtype" >&5
13944 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13945
13946 # Check whether --with-chtype or --without-chtype was given.
13947 if test "${with_chtype+set}" = set; then
13948   withval="$with_chtype"
13949   NCURSES_CHTYPE="$withval"
13950 else
13951   NCURSES_CHTYPE=$cf_dft_chtype
13952 fi;
13953 echo "$as_me:13953: result: $NCURSES_CHTYPE" >&5
13954 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13955
13956 ###   use option --with-ospeed to override ospeed's type
13957 echo "$as_me:13957: checking for type of ospeed" >&5
13958 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13959
13960 # Check whether --with-ospeed or --without-ospeed was given.
13961 if test "${with_ospeed+set}" = set; then
13962   withval="$with_ospeed"
13963   NCURSES_OSPEED="$withval"
13964 else
13965   NCURSES_OSPEED=short
13966 fi;
13967 echo "$as_me:13967: result: $NCURSES_OSPEED" >&5
13968 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13969
13970 ###   use option --with-mmask-t to override mmask_t's type
13971 echo "$as_me:13971: checking for type of mmask_t" >&5
13972 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13973
13974 # Check whether --with-mmask-t or --without-mmask-t was given.
13975 if test "${with_mmask_t+set}" = set; then
13976   withval="$with_mmask_t"
13977   NCURSES_MMASK_T="$withval"
13978 else
13979   NCURSES_MMASK_T=$cf_dft_mmask_t
13980 fi;
13981 echo "$as_me:13981: result: $NCURSES_MMASK_T" >&5
13982 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13983
13984 ###   use option --with-ccharw-max to override CCHARW_MAX size
13985 echo "$as_me:13985: checking for size CCHARW_MAX" >&5
13986 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13987
13988 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13989 if test "${with_ccharw_max+set}" = set; then
13990   withval="$with_ccharw_max"
13991   NCURSES_CCHARW_MAX="$withval"
13992 else
13993   NCURSES_CCHARW_MAX=5
13994 fi;
13995 echo "$as_me:13995: result: $NCURSES_CCHARW_MAX" >&5
13996 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13997
13998 echo "$as_me:13998: checking for ANSI C header files" >&5
13999 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14000 if test "${ac_cv_header_stdc+set}" = set; then
14001   echo $ECHO_N "(cached) $ECHO_C" >&6
14002 else
14003   cat >"conftest.$ac_ext" <<_ACEOF
14004 #line 14004 "configure"
14005 #include "confdefs.h"
14006 #include <stdlib.h>
14007 #include <stdarg.h>
14008 #include <string.h>
14009 #include <float.h>
14010
14011 _ACEOF
14012 if { (eval echo "$as_me:14012: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14013   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14014   ac_status=$?
14015   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14016   rm -f conftest.er1
14017   cat conftest.err >&5
14018   echo "$as_me:14018: \$? = $ac_status" >&5
14019   (exit "$ac_status"); } >/dev/null; then
14020   if test -s conftest.err; then
14021     ac_cpp_err=$ac_c_preproc_warn_flag
14022   else
14023     ac_cpp_err=
14024   fi
14025 else
14026   ac_cpp_err=yes
14027 fi
14028 if test -z "$ac_cpp_err"; then
14029   ac_cv_header_stdc=yes
14030 else
14031   echo "$as_me: failed program was:" >&5
14032   cat "conftest.$ac_ext" >&5
14033   ac_cv_header_stdc=no
14034 fi
14035 rm -f conftest.err "conftest.$ac_ext"
14036
14037 if test $ac_cv_header_stdc = yes; then
14038   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14039   cat >"conftest.$ac_ext" <<_ACEOF
14040 #line 14040 "configure"
14041 #include "confdefs.h"
14042 #include <string.h>
14043
14044 _ACEOF
14045 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14046   $EGREP "memchr" >/dev/null 2>&1; then
14047   :
14048 else
14049   ac_cv_header_stdc=no
14050 fi
14051 rm -rf conftest*
14052
14053 fi
14054
14055 if test $ac_cv_header_stdc = yes; then
14056   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14057   cat >"conftest.$ac_ext" <<_ACEOF
14058 #line 14058 "configure"
14059 #include "confdefs.h"
14060 #include <stdlib.h>
14061
14062 _ACEOF
14063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14064   $EGREP "free" >/dev/null 2>&1; then
14065   :
14066 else
14067   ac_cv_header_stdc=no
14068 fi
14069 rm -rf conftest*
14070
14071 fi
14072
14073 if test $ac_cv_header_stdc = yes; then
14074   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14075   if test "$cross_compiling" = yes; then
14076   :
14077 else
14078   cat >"conftest.$ac_ext" <<_ACEOF
14079 #line 14079 "configure"
14080 #include "confdefs.h"
14081 #include <ctype.h>
14082 #if ((' ' & 0x0FF) == 0x020)
14083 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14084 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14085 #else
14086 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14087                      || ('j' <= (c) && (c) <= 'r') \
14088                      || ('s' <= (c) && (c) <= 'z'))
14089 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14090 #endif
14091
14092 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14093 int
14094 main (void)
14095 {
14096   int i;
14097   for (i = 0; i < 256; i++)
14098     if (XOR (islower (i), ISLOWER (i))
14099         || toupper (i) != TOUPPER (i))
14100       $ac_main_return(2);
14101   $ac_main_return (0);
14102 }
14103 _ACEOF
14104 rm -f "conftest$ac_exeext"
14105 if { (eval echo "$as_me:14105: \"$ac_link\"") >&5
14106   (eval $ac_link) 2>&5
14107   ac_status=$?
14108   echo "$as_me:14108: \$? = $ac_status" >&5
14109   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14110   { (eval echo "$as_me:14110: \"$ac_try\"") >&5
14111   (eval $ac_try) 2>&5
14112   ac_status=$?
14113   echo "$as_me:14113: \$? = $ac_status" >&5
14114   (exit "$ac_status"); }; }; then
14115   :
14116 else
14117   echo "$as_me: program exited with status $ac_status" >&5
14118 echo "$as_me: failed program was:" >&5
14119 cat "conftest.$ac_ext" >&5
14120 ac_cv_header_stdc=no
14121 fi
14122 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14123 fi
14124 fi
14125 fi
14126 echo "$as_me:14126: result: $ac_cv_header_stdc" >&5
14127 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14128 if test $ac_cv_header_stdc = yes; then
14129
14130 cat >>confdefs.h <<\EOF
14131 #define STDC_HEADERS 1
14132 EOF
14133
14134 fi
14135
14136 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14137
14138 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14139                   inttypes.h stdint.h unistd.h
14140 do
14141 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14142 echo "$as_me:14142: checking for $ac_header" >&5
14143 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14144 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14145   echo $ECHO_N "(cached) $ECHO_C" >&6
14146 else
14147   cat >"conftest.$ac_ext" <<_ACEOF
14148 #line 14148 "configure"
14149 #include "confdefs.h"
14150 $ac_includes_default
14151 #include <$ac_header>
14152 _ACEOF
14153 rm -f "conftest.$ac_objext"
14154 if { (eval echo "$as_me:14154: \"$ac_compile\"") >&5
14155   (eval $ac_compile) 2>&5
14156   ac_status=$?
14157   echo "$as_me:14157: \$? = $ac_status" >&5
14158   (exit "$ac_status"); } &&
14159          { ac_try='test -s "conftest.$ac_objext"'
14160   { (eval echo "$as_me:14160: \"$ac_try\"") >&5
14161   (eval $ac_try) 2>&5
14162   ac_status=$?
14163   echo "$as_me:14163: \$? = $ac_status" >&5
14164   (exit "$ac_status"); }; }; then
14165   eval "$as_ac_Header=yes"
14166 else
14167   echo "$as_me: failed program was:" >&5
14168 cat "conftest.$ac_ext" >&5
14169 eval "$as_ac_Header=no"
14170 fi
14171 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14172 fi
14173 echo "$as_me:14173: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14174 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14175 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14176   cat >>confdefs.h <<EOF
14177 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14178 EOF
14179
14180 fi
14181 done
14182
14183 echo "$as_me:14183: checking for signed char" >&5
14184 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14185 if test "${ac_cv_type_signed_char+set}" = set; then
14186   echo $ECHO_N "(cached) $ECHO_C" >&6
14187 else
14188   cat >"conftest.$ac_ext" <<_ACEOF
14189 #line 14189 "configure"
14190 #include "confdefs.h"
14191 $ac_includes_default
14192 int
14193 main (void)
14194 {
14195 if ((signed char *) 0)
14196   return 0;
14197 if (sizeof (signed char))
14198   return 0;
14199   ;
14200   return 0;
14201 }
14202 _ACEOF
14203 rm -f "conftest.$ac_objext"
14204 if { (eval echo "$as_me:14204: \"$ac_compile\"") >&5
14205   (eval $ac_compile) 2>&5
14206   ac_status=$?
14207   echo "$as_me:14207: \$? = $ac_status" >&5
14208   (exit "$ac_status"); } &&
14209          { ac_try='test -s "conftest.$ac_objext"'
14210   { (eval echo "$as_me:14210: \"$ac_try\"") >&5
14211   (eval $ac_try) 2>&5
14212   ac_status=$?
14213   echo "$as_me:14213: \$? = $ac_status" >&5
14214   (exit "$ac_status"); }; }; then
14215   ac_cv_type_signed_char=yes
14216 else
14217   echo "$as_me: failed program was:" >&5
14218 cat "conftest.$ac_ext" >&5
14219 ac_cv_type_signed_char=no
14220 fi
14221 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14222 fi
14223 echo "$as_me:14223: result: $ac_cv_type_signed_char" >&5
14224 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14225
14226 echo "$as_me:14226: checking size of signed char" >&5
14227 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14228 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14229   echo $ECHO_N "(cached) $ECHO_C" >&6
14230 else
14231   if test "$ac_cv_type_signed_char" = yes; then
14232   if test "$cross_compiling" = yes; then
14233   # Depending upon the size, compute the lo and hi bounds.
14234 cat >"conftest.$ac_ext" <<_ACEOF
14235 #line 14235 "configure"
14236 #include "confdefs.h"
14237 $ac_includes_default
14238 int
14239 main (void)
14240 {
14241 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14242   ;
14243   return 0;
14244 }
14245 _ACEOF
14246 rm -f "conftest.$ac_objext"
14247 if { (eval echo "$as_me:14247: \"$ac_compile\"") >&5
14248   (eval $ac_compile) 2>&5
14249   ac_status=$?
14250   echo "$as_me:14250: \$? = $ac_status" >&5
14251   (exit "$ac_status"); } &&
14252          { ac_try='test -s "conftest.$ac_objext"'
14253   { (eval echo "$as_me:14253: \"$ac_try\"") >&5
14254   (eval $ac_try) 2>&5
14255   ac_status=$?
14256   echo "$as_me:14256: \$? = $ac_status" >&5
14257   (exit "$ac_status"); }; }; then
14258   ac_lo=0 ac_mid=0
14259   while :; do
14260     cat >"conftest.$ac_ext" <<_ACEOF
14261 #line 14261 "configure"
14262 #include "confdefs.h"
14263 $ac_includes_default
14264 int
14265 main (void)
14266 {
14267 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14268   ;
14269   return 0;
14270 }
14271 _ACEOF
14272 rm -f "conftest.$ac_objext"
14273 if { (eval echo "$as_me:14273: \"$ac_compile\"") >&5
14274   (eval $ac_compile) 2>&5
14275   ac_status=$?
14276   echo "$as_me:14276: \$? = $ac_status" >&5
14277   (exit "$ac_status"); } &&
14278          { ac_try='test -s "conftest.$ac_objext"'
14279   { (eval echo "$as_me:14279: \"$ac_try\"") >&5
14280   (eval $ac_try) 2>&5
14281   ac_status=$?
14282   echo "$as_me:14282: \$? = $ac_status" >&5
14283   (exit "$ac_status"); }; }; then
14284   ac_hi=$ac_mid; break
14285 else
14286   echo "$as_me: failed program was:" >&5
14287 cat "conftest.$ac_ext" >&5
14288 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14289 fi
14290 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14291   done
14292 else
14293   echo "$as_me: failed program was:" >&5
14294 cat "conftest.$ac_ext" >&5
14295 ac_hi=-1 ac_mid=-1
14296   while :; do
14297     cat >"conftest.$ac_ext" <<_ACEOF
14298 #line 14298 "configure"
14299 #include "confdefs.h"
14300 $ac_includes_default
14301 int
14302 main (void)
14303 {
14304 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14305   ;
14306   return 0;
14307 }
14308 _ACEOF
14309 rm -f "conftest.$ac_objext"
14310 if { (eval echo "$as_me:14310: \"$ac_compile\"") >&5
14311   (eval $ac_compile) 2>&5
14312   ac_status=$?
14313   echo "$as_me:14313: \$? = $ac_status" >&5
14314   (exit "$ac_status"); } &&
14315          { ac_try='test -s "conftest.$ac_objext"'
14316   { (eval echo "$as_me:14316: \"$ac_try\"") >&5
14317   (eval $ac_try) 2>&5
14318   ac_status=$?
14319   echo "$as_me:14319: \$? = $ac_status" >&5
14320   (exit "$ac_status"); }; }; then
14321   ac_lo=$ac_mid; break
14322 else
14323   echo "$as_me: failed program was:" >&5
14324 cat "conftest.$ac_ext" >&5
14325 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14326 fi
14327 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14328   done
14329 fi
14330 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14331 # Binary search between lo and hi bounds.
14332 while test "x$ac_lo" != "x$ac_hi"; do
14333   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14334   cat >"conftest.$ac_ext" <<_ACEOF
14335 #line 14335 "configure"
14336 #include "confdefs.h"
14337 $ac_includes_default
14338 int
14339 main (void)
14340 {
14341 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14342   ;
14343   return 0;
14344 }
14345 _ACEOF
14346 rm -f "conftest.$ac_objext"
14347 if { (eval echo "$as_me:14347: \"$ac_compile\"") >&5
14348   (eval $ac_compile) 2>&5
14349   ac_status=$?
14350   echo "$as_me:14350: \$? = $ac_status" >&5
14351   (exit "$ac_status"); } &&
14352          { ac_try='test -s "conftest.$ac_objext"'
14353   { (eval echo "$as_me:14353: \"$ac_try\"") >&5
14354   (eval $ac_try) 2>&5
14355   ac_status=$?
14356   echo "$as_me:14356: \$? = $ac_status" >&5
14357   (exit "$ac_status"); }; }; then
14358   ac_hi=$ac_mid
14359 else
14360   echo "$as_me: failed program was:" >&5
14361 cat "conftest.$ac_ext" >&5
14362 ac_lo=`expr "$ac_mid" + 1`
14363 fi
14364 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14365 done
14366 ac_cv_sizeof_signed_char=$ac_lo
14367 else
14368   if test "$cross_compiling" = yes; then
14369   { { echo "$as_me:14369: error: cannot run test program while cross compiling" >&5
14370 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14371    { (exit 1); exit 1; }; }
14372 else
14373   cat >"conftest.$ac_ext" <<_ACEOF
14374 #line 14374 "configure"
14375 #include "confdefs.h"
14376 $ac_includes_default
14377 int
14378 main (void)
14379 {
14380 FILE *f = fopen ("conftest.val", "w");
14381 if (!f)
14382   $ac_main_return (1);
14383 fprintf (f, "%ld", (long)(sizeof (signed char)));
14384 fclose (f);
14385   ;
14386   return 0;
14387 }
14388 _ACEOF
14389 rm -f "conftest$ac_exeext"
14390 if { (eval echo "$as_me:14390: \"$ac_link\"") >&5
14391   (eval $ac_link) 2>&5
14392   ac_status=$?
14393   echo "$as_me:14393: \$? = $ac_status" >&5
14394   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14395   { (eval echo "$as_me:14395: \"$ac_try\"") >&5
14396   (eval $ac_try) 2>&5
14397   ac_status=$?
14398   echo "$as_me:14398: \$? = $ac_status" >&5
14399   (exit "$ac_status"); }; }; then
14400   ac_cv_sizeof_signed_char=`cat conftest.val`
14401 else
14402   echo "$as_me: program exited with status $ac_status" >&5
14403 echo "$as_me: failed program was:" >&5
14404 cat "conftest.$ac_ext" >&5
14405 fi
14406 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14407 fi
14408 fi
14409 rm -f conftest.val
14410 else
14411   ac_cv_sizeof_signed_char=0
14412 fi
14413 fi
14414 echo "$as_me:14414: result: $ac_cv_sizeof_signed_char" >&5
14415 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14416 cat >>confdefs.h <<EOF
14417 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14418 EOF
14419
14420 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14421         NCURSES_SBOOL="signed char"
14422 else
14423         NCURSES_SBOOL="char"
14424 fi
14425 echo "$as_me:14425: checking if you want to use signed Boolean array in term.h" >&5
14426 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14427
14428 # Check whether --enable-signed-char or --disable-signed-char was given.
14429 if test "${enable_signed_char+set}" = set; then
14430   enableval="$enable_signed_char"
14431   with_signed_char=$enableval
14432 else
14433   with_signed_char=no
14434 fi;
14435 echo "$as_me:14435: result: $with_signed_char" >&5
14436 echo "${ECHO_T}$with_signed_char" >&6
14437 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14438
14439 ###   use option --with-tparm-arg to override tparm's argument type
14440 echo "$as_me:14440: checking for type of tparm args" >&5
14441 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14442
14443 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14444 if test "${with_tparm_arg+set}" = set; then
14445   withval="$with_tparm_arg"
14446   NCURSES_TPARM_ARG="$withval"
14447 else
14448   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14449 fi;
14450 echo "$as_me:14450: result: $NCURSES_TPARM_ARG" >&5
14451 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14452
14453 ### Enable compiling-in rcs id's
14454 echo "$as_me:14454: checking if RCS identifiers should be compiled-in" >&5
14455 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14456
14457 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14458 if test "${with_rcs_ids+set}" = set; then
14459   withval="$with_rcs_ids"
14460   with_rcs_ids=$withval
14461 else
14462   with_rcs_ids=no
14463 fi;
14464 echo "$as_me:14464: result: $with_rcs_ids" >&5
14465 echo "${ECHO_T}$with_rcs_ids" >&6
14466 test "x$with_rcs_ids" = xyes &&
14467 cat >>confdefs.h <<\EOF
14468 #define USE_RCS_IDS 1
14469 EOF
14470
14471 ###############################################################################
14472
14473 echo "$as_me:14473: checking format of man-pages" >&5
14474 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14475
14476 # Check whether --with-manpage-format or --without-manpage-format was given.
14477 if test "${with_manpage_format+set}" = set; then
14478   withval="$with_manpage_format"
14479   MANPAGE_FORMAT=$withval
14480 else
14481   MANPAGE_FORMAT=unknown
14482 fi;
14483
14484 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14485 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14486
14487 cf_unknown=
14488
14489 case "$MANPAGE_FORMAT" in
14490 (unknown)
14491         if test -z "$MANPATH" ; then
14492                 MANPATH="/usr/man:/usr/share/man"
14493         fi
14494
14495         # look for the 'date' man-page (it is most likely to be installed!)
14496         MANPAGE_FORMAT=
14497         cf_preform="no"
14498         cf_catonly="yes"
14499         cf_example="date"
14500
14501         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14502         for cf_dir in $MANPATH; do
14503                 test -z "$cf_dir" && cf_dir=/usr/man
14504                 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
14505                 do
14506                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14507                         if test "x$cf_test" = "x$cf_name" ; then
14508
14509                                 case "$cf_name" in
14510                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14511                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14512                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14513                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14514                                 esac
14515
14516                                 case "$cf_name" in
14517                                 ($cf_dir/man*)
14518                                         cf_catonly=no
14519                                         ;;
14520                                 ($cf_dir/cat*)
14521                                         cf_preform=yes
14522                                         ;;
14523                                 esac
14524                                 break
14525                         fi
14526
14527                         # if we found a match in either man* or cat*, stop looking
14528                         if test -n "$MANPAGE_FORMAT" ; then
14529                                 cf_found=no
14530                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14531                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14532                                 case "$cf_name" in
14533                                 ($cf_dir/cat*)
14534                                         cf_found=yes
14535                                         ;;
14536                                 esac
14537                                 test "$cf_found" = yes && break
14538                         fi
14539                 done
14540                 # only check the first directory in $MANPATH where we find manpages
14541                 if test -n "$MANPAGE_FORMAT" ; then
14542                         break
14543                 fi
14544         done
14545         # if we did not find the example, just assume it is normal
14546         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14547         IFS="$ac_save_ifs"
14548         ;;
14549 (*)
14550         for cf_option in $MANPAGE_FORMAT; do
14551         case "$cf_option" in
14552         (gzip|compress|BSDI|normal|formatted|catonly)
14553                 ;;
14554         (*)
14555                 cf_unknown="$cf_unknown $cf_option"
14556                 ;;
14557         esac
14558         done
14559         ;;
14560 esac
14561
14562 echo "$as_me:14562: result: $MANPAGE_FORMAT" >&5
14563 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14564 if test -n "$cf_unknown" ; then
14565         { echo "$as_me:14565: WARNING: Unexpected manpage-format $cf_unknown" >&5
14566 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14567 fi
14568
14569 echo "$as_me:14569: checking for manpage renaming" >&5
14570 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14571
14572 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14573 if test "${with_manpage_renames+set}" = set; then
14574   withval="$with_manpage_renames"
14575   MANPAGE_RENAMES=$withval
14576 else
14577   MANPAGE_RENAMES=yes
14578 fi;
14579
14580 case ".$MANPAGE_RENAMES" in
14581 (.no)
14582         ;;
14583 (.|.yes)
14584         # Debian 'man' program?
14585         if test -f /etc/debian_version ; then
14586                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14587         else
14588                 MANPAGE_RENAMES=no
14589         fi
14590         ;;
14591 esac
14592
14593 if test "$MANPAGE_RENAMES" != no ; then
14594         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14595                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14596         elif test ! -f "$MANPAGE_RENAMES" ; then
14597                 { { echo "$as_me:14597: error: not a filename: $MANPAGE_RENAMES" >&5
14598 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14599    { (exit 1); exit 1; }; }
14600         fi
14601
14602         test ! -d man && mkdir man
14603
14604         # Construct a sed-script to perform renaming within man-pages
14605         if test -n "$MANPAGE_RENAMES" ; then
14606                 test ! -d man && mkdir man
14607                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14608         fi
14609 fi
14610
14611 echo "$as_me:14611: result: $MANPAGE_RENAMES" >&5
14612 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14613
14614 echo "$as_me:14614: checking if manpage aliases will be installed" >&5
14615 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14616
14617 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14618 if test "${with_manpage_aliases+set}" = set; then
14619   withval="$with_manpage_aliases"
14620   MANPAGE_ALIASES=$withval
14621 else
14622   MANPAGE_ALIASES=yes
14623 fi;
14624
14625 echo "$as_me:14625: result: $MANPAGE_ALIASES" >&5
14626 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14627
14628 case "x$LN_S" in
14629 (xln*)
14630         cf_use_symlinks=yes
14631         ;;
14632 (*)
14633         cf_use_symlinks=no
14634         ;;
14635 esac
14636
14637 MANPAGE_SYMLINKS=no
14638 if test "$MANPAGE_ALIASES" = yes ; then
14639 echo "$as_me:14639: checking if manpage symlinks should be used" >&5
14640 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14641
14642 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14643 if test "${with_manpage_symlinks+set}" = set; then
14644   withval="$with_manpage_symlinks"
14645   MANPAGE_SYMLINKS=$withval
14646 else
14647   MANPAGE_SYMLINKS=$cf_use_symlinks
14648 fi;
14649
14650 if test "$$cf_use_symlinks" = no; then
14651 if test "$MANPAGE_SYMLINKS" = yes ; then
14652         { echo "$as_me:14652: WARNING: cannot make symlinks" >&5
14653 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14654         MANPAGE_SYMLINKS=no
14655 fi
14656 fi
14657
14658 echo "$as_me:14658: result: $MANPAGE_SYMLINKS" >&5
14659 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14660 fi
14661
14662 echo "$as_me:14662: checking for manpage tbl" >&5
14663 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14664
14665 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14666 if test "${with_manpage_tbl+set}" = set; then
14667   withval="$with_manpage_tbl"
14668   MANPAGE_TBL=$withval
14669 else
14670   MANPAGE_TBL=no
14671 fi;
14672
14673 echo "$as_me:14673: result: $MANPAGE_TBL" >&5
14674 echo "${ECHO_T}$MANPAGE_TBL" >&6
14675
14676 if test "$prefix" = "NONE" ; then
14677         cf_prefix="$ac_default_prefix"
14678 else
14679         cf_prefix="$prefix"
14680 fi
14681
14682 case "$MANPAGE_FORMAT" in
14683 (*catonly*)
14684         cf_format=yes
14685         cf_inboth=no
14686         ;;
14687 (*formatted*)
14688         cf_format=yes
14689         cf_inboth=yes
14690         ;;
14691 (*)
14692         cf_format=no
14693         cf_inboth=no
14694         ;;
14695 esac
14696
14697 test ! -d man && mkdir man
14698
14699 cf_so_strip=
14700 cf_compress=
14701 case "$MANPAGE_FORMAT" in
14702 (*compress*)
14703         cf_so_strip="Z"
14704         cf_compress=compress
14705         ;;
14706 (*gzip*)
14707         cf_so_strip="gz"
14708         cf_compress=gzip
14709         ;;
14710 esac
14711
14712 cf_edit_man=./edit_man.sh
14713 cf_man_alias=`pwd`/man_alias.sed
14714
14715 cat >$cf_edit_man <<CF_EOF
14716 #! $SHELL
14717 # this script is generated by the configure-script CF_MAN_PAGES macro.
14718
14719 prefix="$cf_prefix"
14720 datarootdir="$datarootdir"
14721 datadir="$datadir"
14722
14723 NCURSES_MAJOR="$NCURSES_MAJOR"
14724 NCURSES_MINOR="$NCURSES_MINOR"
14725 NCURSES_PATCH="$NCURSES_PATCH"
14726
14727 NCURSES_OSPEED="$NCURSES_OSPEED"
14728 TERMINFO="$TERMINFO"
14729
14730 INSTALL="$INSTALL"
14731 INSTALL_DATA="$INSTALL_DATA"
14732
14733 transform="$program_transform_name"
14734
14735 TMP=\${TMPDIR:=/tmp}/man\$\$
14736 trap "rm -f \$TMP" 0 1 2 3 15
14737
14738 form=\$1
14739 shift || exit 1
14740
14741 verb=\$1
14742 shift || exit 1
14743
14744 mandir=\$1
14745 shift || exit 1
14746
14747 srcdir=\$1
14748 top_srcdir=\$srcdir/..
14749 shift || exit 1
14750
14751 if test "\$form" = normal ; then
14752         if test "$cf_format" = yes ; then
14753         if test "$cf_inboth" = no ; then
14754                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14755                 exit $?
14756         fi
14757         fi
14758         cf_subdir=\$mandir/man
14759         cf_tables=$MANPAGE_TBL
14760 else
14761         cf_subdir=\$mandir/cat
14762         cf_tables=yes
14763 fi
14764
14765 # process the list of source-files
14766 for i in "\$@" ; do
14767 case \$i in
14768 (*.orig|*.rej) ;;
14769 (*.[0-9]*)
14770         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14771         if test "\$verb" = installing ; then
14772         if test ! -d "\$cf_subdir\${section}" ; then
14773                 mkdir -p "\$cf_subdir\$section"
14774         fi
14775         fi
14776
14777         # replace variables in man page
14778         if test ! -f "$cf_man_alias" ; then
14779 cat >>$cf_man_alias <<-CF_EOF2
14780                 s,@DATADIR@,\$datadir,g
14781                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14782                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14783                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14784                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14785                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14786                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14787 CF_EOF
14788
14789         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14790         do
14791                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14792                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14793 cat >>$cf_edit_man <<-CF_EOF
14794                 s,@$cf_NAME@,$cf_name,g
14795 CF_EOF
14796         done
14797
14798 cat >>$cf_edit_man <<CF_EOF
14799 CF_EOF2
14800                 echo "...made $cf_man_alias"
14801         fi
14802
14803         aliases=
14804         cf_source=\`basename "\$i"\`
14805         inalias=\$cf_source
14806         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14807         if test ! -f "\$inalias" ; then
14808                 echo ".. skipped \$cf_source"
14809                 continue
14810         fi
14811 CF_EOF
14812
14813 if test "$MANPAGE_ALIASES" != no ; then
14814 cat >>$cf_edit_man <<CF_EOF
14815         nCurses=ignore.3x
14816         test "$with_curses_h" = yes && nCurses=ncurses.3x
14817         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14818 CF_EOF
14819 fi
14820
14821 if test "$MANPAGE_RENAMES" = no ; then
14822 cat >>$cf_edit_man <<CF_EOF
14823         # perform program transformations for section 1 man pages
14824         if test \$section = 1 ; then
14825                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14826         else
14827                 cf_target=\$cf_subdir\${section}/\$cf_source
14828         fi
14829 CF_EOF
14830 else
14831 cat >>$cf_edit_man <<CF_EOF
14832         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14833         if test -z "\$cf_target" ; then
14834                 echo "? missing rename for \$cf_source"
14835                 cf_target="\$cf_source"
14836         fi
14837         cf_target="\$cf_subdir\${section}/\${cf_target}"
14838
14839 CF_EOF
14840 fi
14841
14842 cat >>$cf_edit_man <<CF_EOF
14843         sed     -f "$cf_man_alias" \\
14844 CF_EOF
14845
14846 if test -f "$MANPAGE_RENAMES" ; then
14847 cat >>$cf_edit_man <<CF_EOF
14848                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14849 CF_EOF
14850 else
14851 cat >>$cf_edit_man <<CF_EOF
14852                 < "\$i" >\$TMP
14853 CF_EOF
14854 fi
14855
14856 cat >>$cf_edit_man <<CF_EOF
14857 if test \$cf_tables = yes ; then
14858         tbl \$TMP >\$TMP.out
14859         mv \$TMP.out \$TMP
14860 fi
14861 CF_EOF
14862
14863 if test "$with_overwrite" != yes ; then
14864 cat >>$cf_edit_man <<CF_EOF
14865         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14866         mv \$TMP.out \$TMP
14867 CF_EOF
14868 fi
14869
14870 if test "$with_curses_h" != yes ; then
14871 cat >>$cf_edit_man <<CF_EOF
14872         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14873         mv \$TMP.out \$TMP
14874 CF_EOF
14875 fi
14876
14877 cat >>$cf_edit_man <<CF_EOF
14878         if test "\$form" = format ; then
14879                 nroff -man \$TMP >\$TMP.out
14880                 mv \$TMP.out \$TMP
14881         fi
14882 CF_EOF
14883
14884 if test -n "$cf_compress" ; then
14885 cat >>$cf_edit_man <<CF_EOF
14886         if test "\$verb" = installing ; then
14887         if ( "$cf_compress" -f \$TMP )
14888         then
14889                 mv \$TMP.$cf_so_strip \$TMP
14890         fi
14891         fi
14892         cf_target="\$cf_target.$cf_so_strip"
14893 CF_EOF
14894 fi
14895
14896 case "$MANPAGE_FORMAT" in
14897 (*BSDI*)
14898 cat >>$cf_edit_man <<CF_EOF
14899         if test "\$form" = format ; then
14900                 # BSDI installs only .0 suffixes in the cat directories
14901                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14902         fi
14903 CF_EOF
14904   ;;
14905 esac
14906
14907 cat >>$cf_edit_man <<CF_EOF
14908         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14909         if test "\$verb" = installing ; then
14910                 echo "\$verb \$cf_target"
14911                 \$INSTALL_DATA \$TMP "\$cf_target"
14912                 test -d "\$cf_subdir\${section}" &&
14913                 test -n "\$aliases" && (
14914                         cd "\$cf_subdir\${section}" && (
14915                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14916                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14917                                 cf_target=\`basename "\$cf_target"\`
14918                                 for cf_alias in \$aliases
14919                                 do
14920                                         if test "\$section" = 1 ; then
14921                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14922                                         fi
14923
14924                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14925                                                 if test -f "\$cf_alias\${suffix}" ; then
14926                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14927                                                         then
14928                                                                 continue
14929                                                         fi
14930                                                 fi
14931                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14932 CF_EOF
14933 case "x$LN_S" in
14934 (*-f)
14935 cat >>$cf_edit_man <<CF_EOF
14936                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14937 CF_EOF
14938         ;;
14939 (*)
14940 cat >>$cf_edit_man <<CF_EOF
14941                                                 rm -f "\$cf_alias\${suffix}"
14942                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14943 CF_EOF
14944         ;;
14945 esac
14946 cat >>$cf_edit_man <<CF_EOF
14947                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14948                                                 echo ".so \$cf_source" >\$TMP
14949 CF_EOF
14950 if test -n "$cf_compress" ; then
14951 cat >>$cf_edit_man <<CF_EOF
14952                                                 if test -n "$cf_so_strip" ; then
14953                                                         "$cf_compress" -f \$TMP
14954                                                         mv \$TMP.$cf_so_strip \$TMP
14955                                                 fi
14956 CF_EOF
14957 fi
14958 cat >>$cf_edit_man <<CF_EOF
14959                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14960                                                 rm -f "\$cf_alias\${suffix}"
14961                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14962                                         fi
14963                                 done
14964                         )
14965                 )
14966         elif test "\$verb" = removing ; then
14967                 test -f "\$cf_target" && (
14968                         echo "\$verb \$cf_target"
14969                         rm -f "\$cf_target"
14970                 )
14971                 test -d "\$cf_subdir\${section}" &&
14972                 test -n "\$aliases" && (
14973                         cd "\$cf_subdir\${section}" && (
14974                                 for cf_alias in \$aliases
14975                                 do
14976                                         if test "\$section" = 1 ; then
14977                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14978                                         fi
14979
14980                                         echo ".. \$verb alias \$cf_alias\${suffix}"
14981                                         rm -f "\$cf_alias\${suffix}"
14982                                 done
14983                         )
14984                 )
14985         else
14986 #               echo ".hy 0"
14987                 cat \$TMP
14988         fi
14989         ;;
14990 esac
14991 done
14992
14993 if test "$cf_inboth" = yes ; then
14994 if test "\$form" != format ; then
14995         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14996 fi
14997 fi
14998
14999 exit 0
15000 CF_EOF
15001 chmod 755 "$cf_edit_man"
15002
15003 ###############################################################################
15004
15005 ### Note that some functions (such as const) are normally disabled anyway.
15006 echo "$as_me:15006: checking if you want to build with function extensions" >&5
15007 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15008
15009 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15010 if test "${enable_ext_funcs+set}" = set; then
15011   enableval="$enable_ext_funcs"
15012   with_ext_funcs=$enableval
15013 else
15014   with_ext_funcs=yes
15015 fi;
15016 echo "$as_me:15016: result: $with_ext_funcs" >&5
15017 echo "${ECHO_T}$with_ext_funcs" >&6
15018 if test "x$with_ext_funcs" = xyes ; then
15019         NCURSES_EXT_FUNCS=1
15020
15021 cat >>confdefs.h <<\EOF
15022 #define NCURSES_EXT_FUNCS 1
15023 EOF
15024
15025 cat >>confdefs.h <<\EOF
15026 #define HAVE_ASSUME_DEFAULT_COLORS 1
15027 EOF
15028
15029 cat >>confdefs.h <<\EOF
15030 #define HAVE_CURSES_VERSION 1
15031 EOF
15032
15033 cat >>confdefs.h <<\EOF
15034 #define HAVE_HAS_KEY 1
15035 EOF
15036
15037 cat >>confdefs.h <<\EOF
15038 #define HAVE_RESIZETERM 1
15039 EOF
15040
15041 cat >>confdefs.h <<\EOF
15042 #define HAVE_RESIZE_TERM 1
15043 EOF
15044
15045 cat >>confdefs.h <<\EOF
15046 #define HAVE_TERM_ENTRY_H 1
15047 EOF
15048
15049 cat >>confdefs.h <<\EOF
15050 #define HAVE_USE_DEFAULT_COLORS 1
15051 EOF
15052
15053 cat >>confdefs.h <<\EOF
15054 #define HAVE_USE_EXTENDED_NAMES 1
15055 EOF
15056
15057 cat >>confdefs.h <<\EOF
15058 #define HAVE_USE_SCREEN 1
15059 EOF
15060
15061 cat >>confdefs.h <<\EOF
15062 #define HAVE_USE_WINDOW 1
15063 EOF
15064
15065 cat >>confdefs.h <<\EOF
15066 #define HAVE_WRESIZE 1
15067 EOF
15068
15069         GENERATED_EXT_FUNCS=generated
15070         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15071 else
15072         NCURSES_EXT_FUNCS=0
15073         GENERATED_EXT_FUNCS=
15074 fi
15075
15076 echo "$as_me:15076: checking if you want to build with SCREEN extensions" >&5
15077 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15078
15079 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15080 if test "${enable_sp_funcs+set}" = set; then
15081   enableval="$enable_sp_funcs"
15082   with_sp_funcs=$enableval
15083 else
15084   with_sp_funcs=$cf_dft_ext_spfuncs
15085 fi;
15086 echo "$as_me:15086: result: $with_sp_funcs" >&5
15087 echo "${ECHO_T}$with_sp_funcs" >&6
15088 if test "x$with_sp_funcs" = xyes ; then
15089         NCURSES_SP_FUNCS=1
15090
15091 cat >>confdefs.h <<\EOF
15092 #define NCURSES_SP_FUNCS 1
15093 EOF
15094
15095 cat >>confdefs.h <<\EOF
15096 #define HAVE_TPUTS_SP 1
15097 EOF
15098
15099         GENERATED_SP_FUNCS=generated
15100 else
15101         NCURSES_SP_FUNCS=0
15102         GENERATED_SP_FUNCS=
15103 fi
15104
15105 echo "$as_me:15105: checking if you want to build with terminal-driver" >&5
15106 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15107
15108 # Check whether --enable-term-driver or --disable-term-driver was given.
15109 if test "${enable_term_driver+set}" = set; then
15110   enableval="$enable_term_driver"
15111   with_term_driver=$enableval
15112 else
15113   with_term_driver=no
15114 fi;
15115 echo "$as_me:15115: result: $with_term_driver" >&5
15116 echo "${ECHO_T}$with_term_driver" >&6
15117 if test "x$with_term_driver" = xyes ; then
15118
15119 cat >>confdefs.h <<\EOF
15120 #define USE_TERM_DRIVER 1
15121 EOF
15122
15123         if test "x$with_termlib" != xno ; then
15124                 { { echo "$as_me:15124: error: The term-driver option conflicts with the termlib option" >&5
15125 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15126    { (exit 1); exit 1; }; }
15127         fi
15128         if test "x$with_sp_funcs" != xyes ; then
15129                 { { echo "$as_me:15129: error: The term-driver option relies upon sp-funcs" >&5
15130 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15131    { (exit 1); exit 1; }; }
15132         fi
15133 fi
15134
15135 ###   use option --enable-const to turn on use of const beyond that in XSI.
15136 echo "$as_me:15136: checking for extended use of const keyword" >&5
15137 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15138
15139 # Check whether --enable-const or --disable-const was given.
15140 if test "${enable_const+set}" = set; then
15141   enableval="$enable_const"
15142   with_ext_const=$enableval
15143 else
15144   with_ext_const=$cf_dft_ext_const
15145 fi;
15146 echo "$as_me:15146: result: $with_ext_const" >&5
15147 echo "${ECHO_T}$with_ext_const" >&6
15148 NCURSES_CONST='/*nothing*/'
15149 if test "x$with_ext_const" = xyes ; then
15150         NCURSES_CONST=const
15151 fi
15152
15153 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15154 echo "$as_me:15154: checking if you want to use extended colors" >&5
15155 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15156
15157 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15158 if test "${enable_ext_colors+set}" = set; then
15159   enableval="$enable_ext_colors"
15160   with_ext_colors=$enableval
15161 else
15162   with_ext_colors=$cf_dft_ext_colors
15163 fi;
15164 echo "$as_me:15164: result: $with_ext_colors" >&5
15165 echo "${ECHO_T}$with_ext_colors" >&6
15166 NCURSES_EXT_COLORS=0
15167 if test "x$with_ext_colors" = xyes ; then
15168         if test "x$with_widec" != xyes ; then
15169                 { echo "$as_me:15169: WARNING: This option applies only to wide-character library" >&5
15170 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15171         else
15172                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15173
15174 if test "${with_abi_version+set}" != set; then
15175         case "$cf_cv_rel_version" in
15176         (5.*)
15177                 cf_cv_rel_version=6.0
15178                 cf_cv_abi_version=6
15179                 { echo "$as_me:15179: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15180 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15181                 ;;
15182         esac
15183 fi
15184
15185                 NCURSES_EXT_COLORS=1
15186
15187 cat >>confdefs.h <<\EOF
15188 #define NCURSES_EXT_COLORS 1
15189 EOF
15190
15191 cat >>confdefs.h <<\EOF
15192 #define HAVE_ALLOC_PAIR 1
15193 EOF
15194
15195 cat >>confdefs.h <<\EOF
15196 #define HAVE_INIT_EXTENDED_COLOR 1
15197 EOF
15198
15199 cat >>confdefs.h <<\EOF
15200 #define HAVE_RESET_COLOR_PAIRS 1
15201 EOF
15202
15203         fi
15204 fi
15205
15206 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15207 echo "$as_me:15207: checking if you want to use extended mouse encoding" >&5
15208 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15209
15210 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15211 if test "${enable_ext_mouse+set}" = set; then
15212   enableval="$enable_ext_mouse"
15213   with_ext_mouse=$enableval
15214 else
15215   with_ext_mouse=$cf_dft_ext_mouse
15216 fi;
15217 echo "$as_me:15217: result: $with_ext_mouse" >&5
15218 echo "${ECHO_T}$with_ext_mouse" >&6
15219 NCURSES_MOUSE_VERSION=1
15220 if test "x$with_ext_mouse" = xyes ; then
15221         NCURSES_MOUSE_VERSION=2
15222
15223 if test "${with_abi_version+set}" != set; then
15224         case "$cf_cv_rel_version" in
15225         (5.*)
15226                 cf_cv_rel_version=6.0
15227                 cf_cv_abi_version=6
15228                 { echo "$as_me:15228: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15229 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15230                 ;;
15231         esac
15232 fi
15233
15234 fi
15235
15236 ###   use option --enable-ext-putwin to turn on extended screendumps
15237 echo "$as_me:15237: checking if you want to use extended putwin/screendump" >&5
15238 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15239
15240 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15241 if test "${enable_ext_putwin+set}" = set; then
15242   enableval="$enable_ext_putwin"
15243   with_ext_putwin=$enableval
15244 else
15245   with_ext_putwin=$cf_dft_ext_putwin
15246 fi;
15247 echo "$as_me:15247: result: $with_ext_putwin" >&5
15248 echo "${ECHO_T}$with_ext_putwin" >&6
15249 if test "x$with_ext_putwin" = xyes ; then
15250
15251 cat >>confdefs.h <<\EOF
15252 #define NCURSES_EXT_PUTWIN 1
15253 EOF
15254
15255 fi
15256
15257 echo "$as_me:15257: checking if you want \$NCURSES_NO_PADDING code" >&5
15258 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15259
15260 # Check whether --enable-no-padding or --disable-no-padding was given.
15261 if test "${enable_no_padding+set}" = set; then
15262   enableval="$enable_no_padding"
15263   with_no_padding=$enableval
15264 else
15265   with_no_padding=$with_ext_funcs
15266 fi;
15267 echo "$as_me:15267: result: $with_no_padding" >&5
15268 echo "${ECHO_T}$with_no_padding" >&6
15269 test "x$with_no_padding" = xyes &&
15270 cat >>confdefs.h <<\EOF
15271 #define NCURSES_NO_PADDING 1
15272 EOF
15273
15274 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15275 echo "$as_me:15275: checking if you want SIGWINCH handler" >&5
15276 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15277
15278 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15279 if test "${enable_sigwinch+set}" = set; then
15280   enableval="$enable_sigwinch"
15281   with_sigwinch=$enableval
15282 else
15283   with_sigwinch=$with_ext_funcs
15284 fi;
15285 echo "$as_me:15285: result: $with_sigwinch" >&5
15286 echo "${ECHO_T}$with_sigwinch" >&6
15287 test "x$with_sigwinch" = xyes &&
15288 cat >>confdefs.h <<\EOF
15289 #define USE_SIGWINCH 1
15290 EOF
15291
15292 ###   use option --enable-tcap-names to allow user to define new capabilities
15293 echo "$as_me:15293: checking if you want user-definable terminal capabilities like termcap" >&5
15294 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15295
15296 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15297 if test "${enable_tcap_names+set}" = set; then
15298   enableval="$enable_tcap_names"
15299   with_tcap_names=$enableval
15300 else
15301   with_tcap_names=$with_ext_funcs
15302 fi;
15303 echo "$as_me:15303: result: $with_tcap_names" >&5
15304 echo "${ECHO_T}$with_tcap_names" >&6
15305 NCURSES_XNAMES=0
15306 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15307
15308 ##############################################################################
15309
15310 echo "$as_me:15310: checking if you want to link with the pthread library" >&5
15311 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15312
15313 # Check whether --with-pthread or --without-pthread was given.
15314 if test "${with_pthread+set}" = set; then
15315   withval="$with_pthread"
15316   with_pthread=$withval
15317 else
15318   with_pthread=no
15319 fi;
15320 echo "$as_me:15320: result: $with_pthread" >&5
15321 echo "${ECHO_T}$with_pthread" >&6
15322
15323 if test "$with_pthread" != no ; then
15324         echo "$as_me:15324: checking for pthread.h" >&5
15325 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15326 if test "${ac_cv_header_pthread_h+set}" = set; then
15327   echo $ECHO_N "(cached) $ECHO_C" >&6
15328 else
15329   cat >"conftest.$ac_ext" <<_ACEOF
15330 #line 15330 "configure"
15331 #include "confdefs.h"
15332 #include <pthread.h>
15333 _ACEOF
15334 if { (eval echo "$as_me:15334: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15335   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15336   ac_status=$?
15337   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15338   rm -f conftest.er1
15339   cat conftest.err >&5
15340   echo "$as_me:15340: \$? = $ac_status" >&5
15341   (exit "$ac_status"); } >/dev/null; then
15342   if test -s conftest.err; then
15343     ac_cpp_err=$ac_c_preproc_warn_flag
15344   else
15345     ac_cpp_err=
15346   fi
15347 else
15348   ac_cpp_err=yes
15349 fi
15350 if test -z "$ac_cpp_err"; then
15351   ac_cv_header_pthread_h=yes
15352 else
15353   echo "$as_me: failed program was:" >&5
15354   cat "conftest.$ac_ext" >&5
15355   ac_cv_header_pthread_h=no
15356 fi
15357 rm -f conftest.err "conftest.$ac_ext"
15358 fi
15359 echo "$as_me:15359: result: $ac_cv_header_pthread_h" >&5
15360 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15361 if test "$ac_cv_header_pthread_h" = yes; then
15362
15363 cat >>confdefs.h <<\EOF
15364 #define HAVE_PTHREADS_H 1
15365 EOF
15366
15367         for cf_lib_pthread in pthread c_r
15368         do
15369             echo "$as_me:15369: checking if we can link with the $cf_lib_pthread library" >&5
15370 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15371             cf_save_LIBS="$LIBS"
15372
15373 cf_add_libs="$LIBS"
15374 # reverse order
15375 cf_add_0lib=
15376 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15377 # filter duplicates
15378 for cf_add_1lib in $cf_add_0lib; do
15379         for cf_add_2lib in $cf_add_libs; do
15380                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15381                         cf_add_1lib=
15382                         break
15383                 fi
15384         done
15385         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15386 done
15387 LIBS="$cf_add_libs"
15388
15389             cat >"conftest.$ac_ext" <<_ACEOF
15390 #line 15390 "configure"
15391 #include "confdefs.h"
15392
15393 #include <pthread.h>
15394
15395 int
15396 main (void)
15397 {
15398
15399                 int rc = pthread_create(0,0,0,0);
15400                 int r2 = pthread_mutexattr_settype(0, 0);
15401
15402   ;
15403   return 0;
15404 }
15405 _ACEOF
15406 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15407 if { (eval echo "$as_me:15407: \"$ac_link\"") >&5
15408   (eval $ac_link) 2>&5
15409   ac_status=$?
15410   echo "$as_me:15410: \$? = $ac_status" >&5
15411   (exit "$ac_status"); } &&
15412          { ac_try='test -s "conftest$ac_exeext"'
15413   { (eval echo "$as_me:15413: \"$ac_try\"") >&5
15414   (eval $ac_try) 2>&5
15415   ac_status=$?
15416   echo "$as_me:15416: \$? = $ac_status" >&5
15417   (exit "$ac_status"); }; }; then
15418   with_pthread=yes
15419 else
15420   echo "$as_me: failed program was:" >&5
15421 cat "conftest.$ac_ext" >&5
15422 with_pthread=no
15423 fi
15424 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15425             LIBS="$cf_save_LIBS"
15426             echo "$as_me:15426: result: $with_pthread" >&5
15427 echo "${ECHO_T}$with_pthread" >&6
15428             test "$with_pthread" = yes && break
15429         done
15430
15431         if test "$with_pthread" = yes ; then
15432
15433 cf_add_libs="$LIBS"
15434 # reverse order
15435 cf_add_0lib=
15436 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15437 # filter duplicates
15438 for cf_add_1lib in $cf_add_0lib; do
15439         for cf_add_2lib in $cf_add_libs; do
15440                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15441                         cf_add_1lib=
15442                         break
15443                 fi
15444         done
15445         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15446 done
15447 LIBS="$cf_add_libs"
15448
15449 cat >>confdefs.h <<\EOF
15450 #define HAVE_LIBPTHREADS 1
15451 EOF
15452
15453         else
15454             { { echo "$as_me:15454: error: Cannot link with pthread library" >&5
15455 echo "$as_me: error: Cannot link with pthread library" >&2;}
15456    { (exit 1); exit 1; }; }
15457         fi
15458
15459 fi
15460
15461 fi
15462
15463 if test "x$with_pthread" != xno; then
15464         echo "$as_me:15464: checking for pthread_kill" >&5
15465 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15466 if test "${ac_cv_func_pthread_kill+set}" = set; then
15467   echo $ECHO_N "(cached) $ECHO_C" >&6
15468 else
15469   cat >"conftest.$ac_ext" <<_ACEOF
15470 #line 15470 "configure"
15471 #include "confdefs.h"
15472 #define pthread_kill autoconf_temporary
15473 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15474 #undef pthread_kill
15475
15476 #ifdef __cplusplus
15477 extern "C"
15478 #endif
15479
15480 /* We use char because int might match the return type of a gcc2
15481    builtin and then its argument prototype would still apply.  */
15482 char pthread_kill (void);
15483
15484 int
15485 main (void)
15486 {
15487
15488 /* The GNU C library defines stubs for functions which it implements
15489     to always fail with ENOSYS.  Some functions are actually named
15490     something starting with __ and the normal name is an alias.  */
15491 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15492 #error found stub for pthread_kill
15493 #endif
15494
15495         return pthread_kill ();
15496   ;
15497   return 0;
15498 }
15499 _ACEOF
15500 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15501 if { (eval echo "$as_me:15501: \"$ac_link\"") >&5
15502   (eval $ac_link) 2>&5
15503   ac_status=$?
15504   echo "$as_me:15504: \$? = $ac_status" >&5
15505   (exit "$ac_status"); } &&
15506          { ac_try='test -s "conftest$ac_exeext"'
15507   { (eval echo "$as_me:15507: \"$ac_try\"") >&5
15508   (eval $ac_try) 2>&5
15509   ac_status=$?
15510   echo "$as_me:15510: \$? = $ac_status" >&5
15511   (exit "$ac_status"); }; }; then
15512   ac_cv_func_pthread_kill=yes
15513 else
15514   echo "$as_me: failed program was:" >&5
15515 cat "conftest.$ac_ext" >&5
15516 ac_cv_func_pthread_kill=no
15517 fi
15518 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15519 fi
15520 echo "$as_me:15520: result: $ac_cv_func_pthread_kill" >&5
15521 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15522 if test "$ac_cv_func_pthread_kill" = yes; then
15523
15524                 echo "$as_me:15524: checking if you want to allow EINTR in wgetch with pthreads" >&5
15525 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15526
15527 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15528 if test "${enable_pthreads_eintr+set}" = set; then
15529   enableval="$enable_pthreads_eintr"
15530   use_pthreads_eintr=$enableval
15531 else
15532   use_pthreads_eintr=no
15533 fi;
15534                 echo "$as_me:15534: result: $use_pthreads_eintr" >&5
15535 echo "${ECHO_T}$use_pthreads_eintr" >&6
15536                 if test "x$use_pthreads_eintr" = xyes ; then
15537
15538 cat >>confdefs.h <<\EOF
15539 #define USE_PTHREADS_EINTR 1
15540 EOF
15541
15542                 fi
15543 fi
15544
15545         echo "$as_me:15545: checking if you want to use weak-symbols for pthreads" >&5
15546 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15547
15548 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15549 if test "${enable_weak_symbols+set}" = set; then
15550   enableval="$enable_weak_symbols"
15551   use_weak_symbols=$enableval
15552 else
15553   use_weak_symbols=no
15554 fi;
15555         echo "$as_me:15555: result: $use_weak_symbols" >&5
15556 echo "${ECHO_T}$use_weak_symbols" >&6
15557         if test "x$use_weak_symbols" = xyes ; then
15558
15559 echo "$as_me:15559: checking if $CC supports weak symbols" >&5
15560 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15561 if test "${cf_cv_weak_symbols+set}" = set; then
15562   echo $ECHO_N "(cached) $ECHO_C" >&6
15563 else
15564
15565 cat >"conftest.$ac_ext" <<_ACEOF
15566 #line 15566 "configure"
15567 #include "confdefs.h"
15568
15569 #include <stdio.h>
15570 int
15571 main (void)
15572 {
15573
15574 #if defined(__GNUC__)
15575 #  if defined __USE_ISOC99
15576 #    define _cat_pragma(exp)    _Pragma(#exp)
15577 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15578 #  else
15579 #    define _weak_pragma(exp)
15580 #  endif
15581 #  define _declare(name)        __extension__ extern __typeof__(name) name
15582 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15583 #endif
15584
15585 weak_symbol(fopen);
15586
15587   ;
15588   return 0;
15589 }
15590 _ACEOF
15591 rm -f "conftest.$ac_objext"
15592 if { (eval echo "$as_me:15592: \"$ac_compile\"") >&5
15593   (eval $ac_compile) 2>&5
15594   ac_status=$?
15595   echo "$as_me:15595: \$? = $ac_status" >&5
15596   (exit "$ac_status"); } &&
15597          { ac_try='test -s "conftest.$ac_objext"'
15598   { (eval echo "$as_me:15598: \"$ac_try\"") >&5
15599   (eval $ac_try) 2>&5
15600   ac_status=$?
15601   echo "$as_me:15601: \$? = $ac_status" >&5
15602   (exit "$ac_status"); }; }; then
15603   cf_cv_weak_symbols=yes
15604 else
15605   echo "$as_me: failed program was:" >&5
15606 cat "conftest.$ac_ext" >&5
15607 cf_cv_weak_symbols=no
15608 fi
15609 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15610
15611 fi
15612 echo "$as_me:15612: result: $cf_cv_weak_symbols" >&5
15613 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15614
15615         else
15616                 cf_cv_weak_symbols=no
15617         fi
15618
15619         if test "x$cf_cv_weak_symbols" = xyes ; then
15620
15621 cat >>confdefs.h <<\EOF
15622 #define USE_WEAK_SYMBOLS 1
15623 EOF
15624
15625         fi
15626 fi
15627
15628 PTHREAD=
15629 if test "x$with_pthread" = "xyes" ; then
15630
15631 cat >>confdefs.h <<\EOF
15632 #define USE_PTHREADS 1
15633 EOF
15634
15635         enable_reentrant=yes
15636         if test "x$cf_cv_weak_symbols" = xyes ; then
15637                 PTHREAD=-lpthread
15638
15639 cf_add_libs="$PRIVATE_LIBS"
15640 # reverse order
15641 cf_add_0lib=
15642 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15643 # filter duplicates
15644 for cf_add_1lib in $cf_add_0lib; do
15645         for cf_add_2lib in $cf_add_libs; do
15646                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15647                         cf_add_1lib=
15648                         break
15649                 fi
15650         done
15651         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15652 done
15653 PRIVATE_LIBS="$cf_add_libs"
15654
15655         fi
15656 fi
15657
15658 # Reentrant code has to be opaque; there's little advantage to making ncurses
15659 # opaque outside of that, so there is no --enable-opaque option.  We can use
15660 # this option without --with-pthreads, but this will be always set for
15661 # pthreads.
15662 echo "$as_me:15662: checking if you want reentrant code" >&5
15663 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15664
15665 # Check whether --enable-reentrant or --disable-reentrant was given.
15666 if test "${enable_reentrant+set}" = set; then
15667   enableval="$enable_reentrant"
15668   with_reentrant=$enableval
15669 else
15670   with_reentrant=no
15671 fi;
15672 echo "$as_me:15672: result: $with_reentrant" >&5
15673 echo "${ECHO_T}$with_reentrant" >&6
15674 if test "x$with_reentrant" = xyes ; then
15675         cf_cv_enable_reentrant=1
15676         cf_cv_enable_opaque="NCURSES_INTERNALS"
15677         NCURSES_SIZE_T=int
15678         if test "x$cf_cv_weak_symbols" = xyes ; then
15679
15680 # remove pthread library from $LIBS
15681 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15682
15683 cf_add_libs="$TEST_LIBS"
15684 # reverse order
15685 cf_add_0lib=
15686 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15687 # filter duplicates
15688 for cf_add_1lib in $cf_add_0lib; do
15689         for cf_add_2lib in $cf_add_libs; do
15690                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15691                         cf_add_1lib=
15692                         break
15693                 fi
15694         done
15695         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15696 done
15697 TEST_LIBS="$cf_add_libs"
15698
15699 cf_add_libs="$TEST_LIBS2"
15700 # reverse order
15701 cf_add_0lib=
15702 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15703 # filter duplicates
15704 for cf_add_1lib in $cf_add_0lib; do
15705         for cf_add_2lib in $cf_add_libs; do
15706                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15707                         cf_add_1lib=
15708                         break
15709                 fi
15710         done
15711         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15712 done
15713 TEST_LIBS2="$cf_add_libs"
15714
15715 cf_add_libs="$PRIVATE_LIBS"
15716 # reverse order
15717 cf_add_0lib=
15718 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15719 # filter duplicates
15720 for cf_add_1lib in $cf_add_0lib; do
15721         for cf_add_2lib in $cf_add_libs; do
15722                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15723                         cf_add_1lib=
15724                         break
15725                 fi
15726         done
15727         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15728 done
15729 PRIVATE_LIBS="$cf_add_libs"
15730
15731         else
15732                 # when not using weak symbols but with_reentrant,
15733                 # add 't' to the library suffix on all platforms
15734                 # except cygwin, where we only do that if ALSO
15735                 # compiling with full thread support.
15736                 case "$host" in
15737                 (*cygwin* | *msys*)
15738                         if test "$with_pthread" = "yes" ; then
15739                                 if test "x$disable_lib_suffixes" = "xno" ; then
15740                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15741                                 fi
15742                         fi ;;
15743                 (*)
15744                         if test "x$disable_lib_suffixes" = "xno" ; then
15745                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15746                         fi
15747                         ;;
15748                 esac
15749         fi
15750
15751 cat >>confdefs.h <<\EOF
15752 #define USE_REENTRANT 1
15753 EOF
15754
15755 if test "${with_abi_version+set}" != set; then
15756         case "$cf_cv_rel_version" in
15757         (5.*)
15758                 cf_cv_rel_version=6.0
15759                 cf_cv_abi_version=6
15760                 { echo "$as_me:15760: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15761 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15762                 ;;
15763         esac
15764 fi
15765
15766 else
15767         cf_cv_enable_reentrant=0
15768         cf_cv_enable_opaque="NCURSES_OPAQUE"
15769         NCURSES_SIZE_T=short
15770 fi
15771
15772 echo "$as_me:15772: checking if you want opaque curses-library structures" >&5
15773 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15774
15775 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15776 if test "${enable_opaque_curses+set}" = set; then
15777   enableval="$enable_opaque_curses"
15778   test "$enableval" != yes && enableval=no
15779         if test "$enableval" != "no" ; then
15780     enable_opaque_curses=yes
15781         else
15782
15783          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15784          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15785
15786         fi
15787 else
15788   enableval=no
15789
15790          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15791          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15792
15793 fi;
15794 echo "$as_me:15794: result: $enable_opaque_curses" >&5
15795 echo "${ECHO_T}$enable_opaque_curses" >&6
15796
15797 test "$cf_cv_enable_reentrant" = 1 && \
15798 test "$enable_opaque_curses" = no && \
15799 { { echo "$as_me:15799: error: reentrant configuration requires opaque library" >&5
15800 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15801    { (exit 1); exit 1; }; }
15802
15803 echo "$as_me:15803: checking if you want opaque form-library structures" >&5
15804 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15805
15806 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15807 if test "${enable_opaque_form+set}" = set; then
15808   enableval="$enable_opaque_form"
15809   enable_opaque_form=yes
15810 else
15811   enable_opaque_form=no
15812 fi;
15813 echo "$as_me:15813: result: $enable_opaque_form" >&5
15814 echo "${ECHO_T}$enable_opaque_form" >&6
15815
15816 echo "$as_me:15816: checking if you want opaque menu-library structures" >&5
15817 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15818
15819 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15820 if test "${enable_opaque_menu+set}" = set; then
15821   enableval="$enable_opaque_menu"
15822   enable_opaque_menu=yes
15823 else
15824   enable_opaque_menu=no
15825 fi;
15826 echo "$as_me:15826: result: $enable_opaque_menu" >&5
15827 echo "${ECHO_T}$enable_opaque_menu" >&6
15828
15829 echo "$as_me:15829: checking if you want opaque panel-library structures" >&5
15830 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15831
15832 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15833 if test "${enable_opaque_panel+set}" = set; then
15834   enableval="$enable_opaque_panel"
15835   enable_opaque_panel=yes
15836 else
15837   enable_opaque_panel=no
15838 fi;
15839 echo "$as_me:15839: result: $enable_opaque_panel" >&5
15840 echo "${ECHO_T}$enable_opaque_panel" >&6
15841
15842 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15843 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15844 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15845 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15846
15847 ### Allow using a different wrap-prefix
15848 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15849         echo "$as_me:15849: checking for prefix used to wrap public variables" >&5
15850 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15851
15852 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15853 if test "${with_wrap_prefix+set}" = set; then
15854   withval="$with_wrap_prefix"
15855   NCURSES_WRAP_PREFIX=$withval
15856 else
15857   NCURSES_WRAP_PREFIX=_nc_
15858 fi;
15859         echo "$as_me:15859: result: $NCURSES_WRAP_PREFIX" >&5
15860 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15861 else
15862         NCURSES_WRAP_PREFIX=_nc_
15863 fi
15864
15865 cat >>confdefs.h <<EOF
15866 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15867 EOF
15868
15869 ###############################################################################
15870 # These options are relatively safe to experiment with.
15871
15872 echo "$as_me:15872: checking if you want all development code" >&5
15873 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15874
15875 # Check whether --with-develop or --without-develop was given.
15876 if test "${with_develop+set}" = set; then
15877   withval="$with_develop"
15878   with_develop=$withval
15879 else
15880   with_develop=no
15881 fi;
15882 echo "$as_me:15882: result: $with_develop" >&5
15883 echo "${ECHO_T}$with_develop" >&6
15884
15885 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15886 echo "$as_me:15886: checking if you want hard-tabs code" >&5
15887 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15888
15889 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15890 if test "${enable_hard_tabs+set}" = set; then
15891   enableval="$enable_hard_tabs"
15892
15893 else
15894   enable_hard_tabs=$with_develop
15895 fi;
15896 echo "$as_me:15896: result: $enable_hard_tabs" >&5
15897 echo "${ECHO_T}$enable_hard_tabs" >&6
15898 test "x$enable_hard_tabs" = xyes &&
15899 cat >>confdefs.h <<\EOF
15900 #define USE_HARD_TABS 1
15901 EOF
15902
15903 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15904 echo "$as_me:15904: checking if you want limited support for xmc" >&5
15905 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15906
15907 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15908 if test "${enable_xmc_glitch+set}" = set; then
15909   enableval="$enable_xmc_glitch"
15910
15911 else
15912   enable_xmc_glitch=$with_develop
15913 fi;
15914 echo "$as_me:15914: result: $enable_xmc_glitch" >&5
15915 echo "${ECHO_T}$enable_xmc_glitch" >&6
15916 test "x$enable_xmc_glitch" = xyes &&
15917 cat >>confdefs.h <<\EOF
15918 #define USE_XMC_SUPPORT 1
15919 EOF
15920
15921 ###############################################################################
15922 # These are just experimental, probably should not be in a package:
15923
15924 echo "$as_me:15924: checking if you do not want to assume colors are white-on-black" >&5
15925 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15926
15927 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15928 if test "${enable_assumed_color+set}" = set; then
15929   enableval="$enable_assumed_color"
15930   with_assumed_color=$enableval
15931 else
15932   with_assumed_color=yes
15933 fi;
15934 echo "$as_me:15934: result: $with_assumed_color" >&5
15935 echo "${ECHO_T}$with_assumed_color" >&6
15936 test "x$with_assumed_color" = xyes &&
15937 cat >>confdefs.h <<\EOF
15938 #define USE_ASSUMED_COLOR 1
15939 EOF
15940
15941 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15942 echo "$as_me:15942: checking if you want hashmap scrolling-optimization code" >&5
15943 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15944
15945 # Check whether --enable-hashmap or --disable-hashmap was given.
15946 if test "${enable_hashmap+set}" = set; then
15947   enableval="$enable_hashmap"
15948   with_hashmap=$enableval
15949 else
15950   with_hashmap=yes
15951 fi;
15952 echo "$as_me:15952: result: $with_hashmap" >&5
15953 echo "${ECHO_T}$with_hashmap" >&6
15954 test "x$with_hashmap" = xyes &&
15955 cat >>confdefs.h <<\EOF
15956 #define USE_HASHMAP 1
15957 EOF
15958
15959 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15960 echo "$as_me:15960: checking if you want colorfgbg code" >&5
15961 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15962
15963 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15964 if test "${enable_colorfgbg+set}" = set; then
15965   enableval="$enable_colorfgbg"
15966   with_colorfgbg=$enableval
15967 else
15968   with_colorfgbg=no
15969 fi;
15970 echo "$as_me:15970: result: $with_colorfgbg" >&5
15971 echo "${ECHO_T}$with_colorfgbg" >&6
15972 test "x$with_colorfgbg" = xyes &&
15973 cat >>confdefs.h <<\EOF
15974 #define USE_COLORFGBG 1
15975 EOF
15976
15977 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15978 echo "$as_me:15978: checking if you want to use gcc -fvisibility option" >&5
15979 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15980
15981 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15982 if test "${enable_fvisibility+set}" = set; then
15983   enableval="$enable_fvisibility"
15984   cf_with_fvisibility=$enableval
15985 else
15986   cf_with_fvisibility=no
15987 fi;
15988 echo "$as_me:15988: result: $cf_with_fvisibility" >&5
15989 echo "${ECHO_T}$cf_with_fvisibility" >&6
15990
15991 NCURSES_IMPEXP=
15992 NCURSES_CXX_IMPEXP=
15993 if test "x$cf_with_fvisibility" = xyes; then
15994
15995 echo "$as_me:15995: checking if $CC -fvisibility=hidden option works" >&5
15996 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15997 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15998   echo $ECHO_N "(cached) $ECHO_C" >&6
15999 else
16000
16001     cf_save_cflags="$CFLAGS"
16002     CFLAGS="$CFLAGS -fvisibility=hidden"
16003     cat >"conftest.$ac_ext" <<_ACEOF
16004 #line 16004 "configure"
16005 #include "confdefs.h"
16006
16007 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16008
16009 int
16010 main (void)
16011 {
16012
16013         if (somefunc()) return 1;
16014
16015   ;
16016   return 0;
16017 }
16018 _ACEOF
16019 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16020 if { (eval echo "$as_me:16020: \"$ac_link\"") >&5
16021   (eval $ac_link) 2>&5
16022   ac_status=$?
16023   echo "$as_me:16023: \$? = $ac_status" >&5
16024   (exit "$ac_status"); } &&
16025          { ac_try='test -s "conftest$ac_exeext"'
16026   { (eval echo "$as_me:16026: \"$ac_try\"") >&5
16027   (eval $ac_try) 2>&5
16028   ac_status=$?
16029   echo "$as_me:16029: \$? = $ac_status" >&5
16030   (exit "$ac_status"); }; }; then
16031   cf_cv_fvisibility_hidden=yes
16032 else
16033   echo "$as_me: failed program was:" >&5
16034 cat "conftest.$ac_ext" >&5
16035 cf_cv_fvisibility_hidden=no
16036 fi
16037 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16038     CFLAGS=$cf_save_cflags
16039
16040 fi
16041 echo "$as_me:16041: result: $cf_cv_fvisibility_hidden" >&5
16042 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16043
16044         if test "x$cf_cv_fvisibility_hidden" = xyes
16045         then
16046
16047 cf_fix_cppflags=no
16048 cf_new_cflags=
16049 cf_new_cppflags=
16050 cf_new_extra_cppflags=
16051
16052 for cf_add_cflags in -fvisibility=hidden
16053 do
16054 case "$cf_fix_cppflags" in
16055 (no)
16056         case "$cf_add_cflags" in
16057         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16058                 case "$cf_add_cflags" in
16059                 (-D*)
16060                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16061
16062                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16063                                 && test -z "${cf_tst_cflags}" \
16064                                 && cf_fix_cppflags=yes
16065
16066                         if test "$cf_fix_cppflags" = yes ; then
16067
16068         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16069         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16070
16071                                 continue
16072                         elif test "${cf_tst_cflags}" = "\"'" ; then
16073
16074         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16075         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16076
16077                                 continue
16078                         fi
16079                         ;;
16080                 esac
16081                 case "$CPPFLAGS" in
16082                 (*$cf_add_cflags)
16083                         ;;
16084                 (*)
16085                         case "$cf_add_cflags" in
16086                         (-D*)
16087                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16088
16089 CPPFLAGS=`echo "$CPPFLAGS" | \
16090         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16091                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16092
16093                                 ;;
16094                         esac
16095
16096         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16097         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16098
16099                         ;;
16100                 esac
16101                 ;;
16102         (*)
16103
16104         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16105         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16106
16107                 ;;
16108         esac
16109         ;;
16110 (yes)
16111
16112         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16113         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16114
16115         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16116
16117         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16118                 && test -z "${cf_tst_cflags}" \
16119                 && cf_fix_cppflags=no
16120         ;;
16121 esac
16122 done
16123
16124 if test -n "$cf_new_cflags" ; then
16125
16126         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16127         CFLAGS="${CFLAGS}$cf_new_cflags"
16128
16129 fi
16130
16131 if test -n "$cf_new_cppflags" ; then
16132
16133         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16134         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16135
16136 fi
16137
16138 if test -n "$cf_new_extra_cppflags" ; then
16139
16140         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16141         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16142
16143 fi
16144
16145                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16146         fi
16147         if test -n "$CXX"
16148         then
16149                 ac_ext=cc
16150 ac_cpp='$CXXCPP $CPPFLAGS'
16151 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16152 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16153 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16154 ac_main_return="return"
16155
16156 echo "$as_me:16156: checking if $CXX -fvisibility=hidden option works" >&5
16157 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16158 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16159   echo $ECHO_N "(cached) $ECHO_C" >&6
16160 else
16161
16162     cf_save_cflags="$CXXFLAGS"
16163     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16164     cat >"conftest.$ac_ext" <<_ACEOF
16165 #line 16165 "configure"
16166 #include "confdefs.h"
16167
16168 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16169
16170 int
16171 main (void)
16172 {
16173
16174         if (somefunc()) return 1;
16175
16176   ;
16177   return 0;
16178 }
16179 _ACEOF
16180 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16181 if { (eval echo "$as_me:16181: \"$ac_link\"") >&5
16182   (eval $ac_link) 2>&5
16183   ac_status=$?
16184   echo "$as_me:16184: \$? = $ac_status" >&5
16185   (exit "$ac_status"); } &&
16186          { ac_try='test -s "conftest$ac_exeext"'
16187   { (eval echo "$as_me:16187: \"$ac_try\"") >&5
16188   (eval $ac_try) 2>&5
16189   ac_status=$?
16190   echo "$as_me:16190: \$? = $ac_status" >&5
16191   (exit "$ac_status"); }; }; then
16192   cf_cv_fvisibility_hidden2=yes
16193 else
16194   echo "$as_me: failed program was:" >&5
16195 cat "conftest.$ac_ext" >&5
16196 cf_cv_fvisibility_hidden2=no
16197 fi
16198 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16199     CXXFLAGS=$cf_save_cflags
16200
16201 fi
16202 echo "$as_me:16202: result: $cf_cv_fvisibility_hidden2" >&5
16203 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16204
16205                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16206                 then
16207
16208 cf_save_CXXFLAGS="$CFLAGS"
16209 CFLAGS="$CXXFLAGS"
16210
16211 cf_fix_cppflags=no
16212 cf_new_cflags=
16213 cf_new_cppflags=
16214 cf_new_extra_cppflags=
16215
16216 for cf_add_cflags in -fvisibility=hidden
16217 do
16218 case "$cf_fix_cppflags" in
16219 (no)
16220         case "$cf_add_cflags" in
16221         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16222                 case "$cf_add_cflags" in
16223                 (-D*)
16224                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16225
16226                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16227                                 && test -z "${cf_tst_cflags}" \
16228                                 && cf_fix_cppflags=yes
16229
16230                         if test "$cf_fix_cppflags" = yes ; then
16231
16232         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16233         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16234
16235                                 continue
16236                         elif test "${cf_tst_cflags}" = "\"'" ; then
16237
16238         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16239         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16240
16241                                 continue
16242                         fi
16243                         ;;
16244                 esac
16245                 case "$CPPFLAGS" in
16246                 (*$cf_add_cflags)
16247                         ;;
16248                 (*)
16249                         case "$cf_add_cflags" in
16250                         (-D*)
16251                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16252
16253 CPPFLAGS=`echo "$CPPFLAGS" | \
16254         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16255                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16256
16257                                 ;;
16258                         esac
16259
16260         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16261         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16262
16263                         ;;
16264                 esac
16265                 ;;
16266         (*)
16267
16268         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16269         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16270
16271                 ;;
16272         esac
16273         ;;
16274 (yes)
16275
16276         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16277         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16278
16279         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16280
16281         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16282                 && test -z "${cf_tst_cflags}" \
16283                 && cf_fix_cppflags=no
16284         ;;
16285 esac
16286 done
16287
16288 if test -n "$cf_new_cflags" ; then
16289
16290         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16291         CFLAGS="${CFLAGS}$cf_new_cflags"
16292
16293 fi
16294
16295 if test -n "$cf_new_cppflags" ; then
16296
16297         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16298         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16299
16300 fi
16301
16302 if test -n "$cf_new_extra_cppflags" ; then
16303
16304         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16305         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16306
16307 fi
16308
16309 CXXFLAGS="$CFLAGS"
16310 CFLAGS="$cf_save_CXXFLAGS"
16311
16312                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16313                 fi
16314                 ac_ext=c
16315 ac_cpp='$CPP $CPPFLAGS'
16316 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16317 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16318 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16319 ac_main_return="return"
16320
16321         fi
16322 fi
16323
16324 ###   use option --enable-interop to turn on use of bindings used for interop
16325 echo "$as_me:16325: checking if you want interop bindings" >&5
16326 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16327
16328 # Check whether --enable-interop or --disable-interop was given.
16329 if test "${enable_interop+set}" = set; then
16330   enableval="$enable_interop"
16331   with_exp_interop=$enableval
16332 else
16333   with_exp_interop=$cf_dft_interop
16334 fi;
16335 echo "$as_me:16335: result: $with_exp_interop" >&5
16336 echo "${ECHO_T}$with_exp_interop" >&6
16337
16338 NCURSES_INTEROP_FUNCS=0
16339 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16340
16341 echo "$as_me:16341: checking if you want experimental safe-sprintf code" >&5
16342 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16343
16344 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16345 if test "${enable_safe_sprintf+set}" = set; then
16346   enableval="$enable_safe_sprintf"
16347   with_safe_sprintf=$enableval
16348 else
16349   with_safe_sprintf=no
16350 fi;
16351 echo "$as_me:16351: result: $with_safe_sprintf" >&5
16352 echo "${ECHO_T}$with_safe_sprintf" >&6
16353
16354 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16355 # when hashmap is used scroll hints are useless
16356 if test "$with_hashmap" = no ; then
16357 echo "$as_me:16357: checking if you want to experiment without scrolling-hints code" >&5
16358 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16359
16360 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16361 if test "${enable_scroll_hints+set}" = set; then
16362   enableval="$enable_scroll_hints"
16363   with_scroll_hints=$enableval
16364 else
16365   with_scroll_hints=yes
16366 fi;
16367 echo "$as_me:16367: result: $with_scroll_hints" >&5
16368 echo "${ECHO_T}$with_scroll_hints" >&6
16369 test "x$with_scroll_hints" = xyes &&
16370 cat >>confdefs.h <<\EOF
16371 #define USE_SCROLL_HINTS 1
16372 EOF
16373
16374 fi
16375
16376 echo "$as_me:16376: checking if you want wgetch-events code" >&5
16377 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16378
16379 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16380 if test "${enable_wgetch_events+set}" = set; then
16381   enableval="$enable_wgetch_events"
16382   with_wgetch_events=$enableval
16383 else
16384   with_wgetch_events=no
16385 fi;
16386 echo "$as_me:16386: result: $with_wgetch_events" >&5
16387 echo "${ECHO_T}$with_wgetch_events" >&6
16388 if test "x$with_wgetch_events" = xyes ; then
16389
16390 cat >>confdefs.h <<\EOF
16391 #define NCURSES_WGETCH_EVENTS 1
16392 EOF
16393
16394         NCURSES_WGETCH_EVENTS=1
16395 else
16396         NCURSES_WGETCH_EVENTS=0
16397 fi
16398
16399 case "$cf_cv_system_name" in
16400 (*mingw32*|*mingw64*|*-msvc*)
16401         echo "$as_me:16401: checking if you want experimental-Windows driver" >&5
16402 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16403
16404 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16405 if test "${enable_exp_win32+set}" = set; then
16406   enableval="$enable_exp_win32"
16407   with_exp_win32=$enableval
16408 else
16409   with_exp_win32=no
16410 fi;
16411         echo "$as_me:16411: result: $with_exp_win32" >&5
16412 echo "${ECHO_T}$with_exp_win32" >&6
16413         if test "x$with_exp_win32" = xyes
16414         then
16415
16416 cat >>confdefs.h <<\EOF
16417 #define EXP_WIN32_DRIVER 1
16418 EOF
16419
16420                 EXP_WIN32_DRIVER=1
16421                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16422         else
16423                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16424                 EXP_WIN32_DRIVER=0
16425         fi
16426         ;;
16427 (*)
16428         EXP_WIN32_DRIVER=0
16429         INTERNALS_HDR=
16430         ;;
16431 esac
16432
16433 ###############################################################################
16434
16435 ###     use option --disable-echo to suppress full display compiling commands
16436
16437 echo "$as_me:16437: checking if you want to see long compiling messages" >&5
16438 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16439
16440 # Check whether --enable-echo or --disable-echo was given.
16441 if test "${enable_echo+set}" = set; then
16442   enableval="$enable_echo"
16443   test "$enableval" != no && enableval=yes
16444         if test "$enableval" != "yes" ; then
16445
16446         ECHO_LT='--silent'
16447         ECHO_LD='@echo linking $@;'
16448         RULE_CC='@echo compiling $<'
16449         SHOW_CC='@echo compiling $@'
16450         ECHO_CC='@'
16451
16452         else
16453
16454         ECHO_LT=''
16455         ECHO_LD=''
16456         RULE_CC=''
16457         SHOW_CC=''
16458         ECHO_CC=''
16459
16460         fi
16461 else
16462   enableval=yes
16463
16464         ECHO_LT=''
16465         ECHO_LD=''
16466         RULE_CC=''
16467         SHOW_CC=''
16468         ECHO_CC=''
16469
16470 fi;
16471 echo "$as_me:16471: result: $enableval" >&5
16472 echo "${ECHO_T}$enableval" >&6
16473
16474 if test "x$enable_echo" = xyes; then
16475         ECHO_LINK=
16476 else
16477         ECHO_LINK='@ echo linking $@ ... ;'
16478         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16479         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16480 fi
16481
16482 # --disable-stripping is used for debugging
16483
16484 echo "$as_me:16484: checking if you want to install stripped executables" >&5
16485 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16486
16487 # Check whether --enable-stripping or --disable-stripping was given.
16488 if test "${enable_stripping+set}" = set; then
16489   enableval="$enable_stripping"
16490   test "$enableval" != no && enableval=yes
16491         if test "$enableval" != "yes" ; then
16492     enable_stripping=no
16493         else
16494                 enable_stripping=yes
16495         fi
16496 else
16497   enableval=yes
16498         enable_stripping=yes
16499
16500 fi;
16501 echo "$as_me:16501: result: $enable_stripping" >&5
16502 echo "${ECHO_T}$enable_stripping" >&6
16503
16504 if test "$enable_stripping" = yes
16505 then
16506         INSTALL_OPT_S="-s"
16507 else
16508         INSTALL_OPT_S=
16509 fi
16510
16511 : "${INSTALL:=install}"
16512 echo "$as_me:16512: checking if install accepts -p option" >&5
16513 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16514 if test "${cf_cv_install_p+set}" = set; then
16515   echo $ECHO_N "(cached) $ECHO_C" >&6
16516 else
16517
16518         rm -rf ./conftest*
16519         date >conftest.in
16520         mkdir conftest.out
16521         sleep 3
16522         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16523         then
16524                 if test -f conftest.out/conftest.in
16525                 then
16526                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16527                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16528                         if test -s conftest.err
16529                         then
16530                                 cf_cv_install_p=no
16531                         else
16532                                 cf_cv_install_p=yes
16533                         fi
16534                 else
16535                         cf_cv_install_p=no
16536                 fi
16537         else
16538                 cf_cv_install_p=no
16539         fi
16540         rm -rf ./conftest*
16541
16542 fi
16543 echo "$as_me:16543: result: $cf_cv_install_p" >&5
16544 echo "${ECHO_T}$cf_cv_install_p" >&6
16545
16546 echo "$as_me:16546: checking if install needs to be told about ownership" >&5
16547 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16548 case `$ac_config_guess` in
16549 (*minix)
16550         with_install_o=yes
16551         ;;
16552 (*)
16553         with_install_o=no
16554         ;;
16555 esac
16556
16557 echo "$as_me:16557: result: $with_install_o" >&5
16558 echo "${ECHO_T}$with_install_o" >&6
16559 if test "x$with_install_o" = xyes
16560 then
16561         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'`"
16562 else
16563         INSTALL_OPT_O=
16564 fi
16565
16566 # If we're avoiding relinking of shared libraries during install, that is to
16567 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16568 # the install program has "-p" (for preserving timestamps).
16569 cf_cv_do_reranlib=yes
16570 if test "x$cf_cv_install_p" = xyes
16571 then
16572         if test "x$cf_cv_do_relink" != xyes
16573         then
16574                 cf_cv_do_reranlib=no
16575                 INSTALL_OPT_P="-p"
16576                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16577         fi
16578 fi
16579
16580 ###     use option --enable-warnings to turn on all gcc warnings
16581
16582 echo "$as_me:16582: checking if you want to use C11 _Noreturn feature" >&5
16583 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16584
16585 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16586 if test "${enable_stdnoreturn+set}" = set; then
16587   enableval="$enable_stdnoreturn"
16588   test "$enableval" != yes && enableval=no
16589         if test "$enableval" != "no" ; then
16590     enable_stdnoreturn=yes
16591         else
16592                 enable_stdnoreturn=no
16593         fi
16594 else
16595   enableval=no
16596         enable_stdnoreturn=no
16597
16598 fi;
16599 echo "$as_me:16599: result: $enable_stdnoreturn" >&5
16600 echo "${ECHO_T}$enable_stdnoreturn" >&6
16601
16602 if test $enable_stdnoreturn = yes; then
16603 echo "$as_me:16603: checking for C11 _Noreturn feature" >&5
16604 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16605 if test "${cf_cv_c11_noreturn+set}" = set; then
16606   echo $ECHO_N "(cached) $ECHO_C" >&6
16607 else
16608   cat >"conftest.$ac_ext" <<_ACEOF
16609 #line 16609 "configure"
16610 #include "confdefs.h"
16611
16612 #include <stdio.h>
16613 #include <stdlib.h>
16614 #include <stdnoreturn.h>
16615 static _Noreturn void giveup(void) { exit(0); }
16616
16617 int
16618 main (void)
16619 {
16620 if (feof(stdin)) giveup()
16621   ;
16622   return 0;
16623 }
16624 _ACEOF
16625 rm -f "conftest.$ac_objext"
16626 if { (eval echo "$as_me:16626: \"$ac_compile\"") >&5
16627   (eval $ac_compile) 2>&5
16628   ac_status=$?
16629   echo "$as_me:16629: \$? = $ac_status" >&5
16630   (exit "$ac_status"); } &&
16631          { ac_try='test -s "conftest.$ac_objext"'
16632   { (eval echo "$as_me:16632: \"$ac_try\"") >&5
16633   (eval $ac_try) 2>&5
16634   ac_status=$?
16635   echo "$as_me:16635: \$? = $ac_status" >&5
16636   (exit "$ac_status"); }; }; then
16637   cf_cv_c11_noreturn=yes
16638 else
16639   echo "$as_me: failed program was:" >&5
16640 cat "conftest.$ac_ext" >&5
16641 cf_cv_c11_noreturn=no
16642 fi
16643 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16644
16645 fi
16646 echo "$as_me:16646: result: $cf_cv_c11_noreturn" >&5
16647 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16648 else
16649         cf_cv_c11_noreturn=no,
16650 fi
16651
16652 if test "$cf_cv_c11_noreturn" = yes; then
16653
16654 cat >>confdefs.h <<\EOF
16655 #define HAVE_STDNORETURN_H 1
16656 EOF
16657
16658 cat >>confdefs.h <<EOF
16659 #define STDC_NORETURN _Noreturn
16660 EOF
16661
16662         HAVE_STDNORETURN_H=1
16663 else
16664         HAVE_STDNORETURN_H=0
16665 fi
16666
16667 if test "$GCC" = yes || test "$GXX" = yes
16668 then
16669
16670 if test "$GCC" = yes || test "$GXX" = yes
16671 then
16672         case $CFLAGS in
16673         (*-Werror=*)
16674                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16675
16676 echo "${as_me:-configure}:16676: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16677
16678                 cf_temp_flags=
16679                 for cf_temp_scan in $CFLAGS
16680                 do
16681                         case "x$cf_temp_scan" in
16682                         (x-Werror=*)
16683
16684         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16685         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16686
16687                                 ;;
16688                         (*)
16689
16690         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16691         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16692
16693                                 ;;
16694                         esac
16695                 done
16696                 CFLAGS="$cf_temp_flags"
16697                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16698
16699 echo "${as_me:-configure}:16699: testing ... fixed $CFLAGS ..." 1>&5
16700
16701                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16702
16703 echo "${as_me:-configure}:16703: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16704
16705                 ;;
16706         esac
16707 fi
16708
16709 if test "$GCC" = yes || test "$GXX" = yes
16710 then
16711         case $CPPFLAGS in
16712         (*-Werror=*)
16713                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16714
16715 echo "${as_me:-configure}:16715: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16716
16717                 cf_temp_flags=
16718                 for cf_temp_scan in $CPPFLAGS
16719                 do
16720                         case "x$cf_temp_scan" in
16721                         (x-Werror=*)
16722
16723         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16724         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16725
16726                                 ;;
16727                         (*)
16728
16729         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16730         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16731
16732                                 ;;
16733                         esac
16734                 done
16735                 CPPFLAGS="$cf_temp_flags"
16736                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16737
16738 echo "${as_me:-configure}:16738: testing ... fixed $CPPFLAGS ..." 1>&5
16739
16740                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16741
16742 echo "${as_me:-configure}:16742: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16743
16744                 ;;
16745         esac
16746 fi
16747
16748 if test "$GCC" = yes || test "$GXX" = yes
16749 then
16750         case $LDFLAGS in
16751         (*-Werror=*)
16752                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16753
16754 echo "${as_me:-configure}:16754: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16755
16756                 cf_temp_flags=
16757                 for cf_temp_scan in $LDFLAGS
16758                 do
16759                         case "x$cf_temp_scan" in
16760                         (x-Werror=*)
16761
16762         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16763         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16764
16765                                 ;;
16766                         (*)
16767
16768         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16769         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16770
16771                                 ;;
16772                         esac
16773                 done
16774                 LDFLAGS="$cf_temp_flags"
16775                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16776
16777 echo "${as_me:-configure}:16777: testing ... fixed $LDFLAGS ..." 1>&5
16778
16779                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16780
16781 echo "${as_me:-configure}:16781: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16782
16783                 ;;
16784         esac
16785 fi
16786
16787 echo "$as_me:16787: checking if you want to turn on gcc warnings" >&5
16788 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16789
16790 # Check whether --enable-warnings or --disable-warnings was given.
16791 if test "${enable_warnings+set}" = set; then
16792   enableval="$enable_warnings"
16793   test "$enableval" != yes && enableval=no
16794         if test "$enableval" != "no" ; then
16795     enable_warnings=yes
16796         else
16797                 enable_warnings=no
16798         fi
16799 else
16800   enableval=no
16801         enable_warnings=no
16802
16803 fi;
16804 echo "$as_me:16804: result: $enable_warnings" >&5
16805 echo "${ECHO_T}$enable_warnings" >&6
16806 if test "$enable_warnings" = "yes"
16807 then
16808
16809 if test "x$have_x" = xyes; then
16810
16811 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16812 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16813 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16814 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16815 for cf_X_CFLAGS in $X_CFLAGS
16816 do
16817         case "x$cf_X_CFLAGS" in
16818         x-[IUD]*)
16819                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16820                 ;;
16821         *)
16822                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16823                 ;;
16824         esac
16825 done
16826
16827 cat >"conftest.$ac_ext" <<_ACEOF
16828 #line 16828 "configure"
16829 #include "confdefs.h"
16830
16831 #include <stdlib.h>
16832 #include <X11/Intrinsic.h>
16833
16834 int
16835 main (void)
16836 {
16837 String foo = malloc(1); free((void*)foo)
16838   ;
16839   return 0;
16840 }
16841 _ACEOF
16842 rm -f "conftest.$ac_objext"
16843 if { (eval echo "$as_me:16843: \"$ac_compile\"") >&5
16844   (eval $ac_compile) 2>&5
16845   ac_status=$?
16846   echo "$as_me:16846: \$? = $ac_status" >&5
16847   (exit "$ac_status"); } &&
16848          { ac_try='test -s "conftest.$ac_objext"'
16849   { (eval echo "$as_me:16849: \"$ac_try\"") >&5
16850   (eval $ac_try) 2>&5
16851   ac_status=$?
16852   echo "$as_me:16852: \$? = $ac_status" >&5
16853   (exit "$ac_status"); }; }; then
16854
16855 echo "$as_me:16855: checking for X11/Xt const-feature" >&5
16856 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16857 if test "${cf_cv_const_x_string+set}" = set; then
16858   echo $ECHO_N "(cached) $ECHO_C" >&6
16859 else
16860
16861         cat >"conftest.$ac_ext" <<_ACEOF
16862 #line 16862 "configure"
16863 #include "confdefs.h"
16864
16865 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16866 #undef  XTSTRINGDEFINES /* X11R5 and later */
16867 #include <stdlib.h>
16868 #include <X11/Intrinsic.h>
16869
16870 int
16871 main (void)
16872 {
16873 String foo = malloc(1); *foo = 0
16874   ;
16875   return 0;
16876 }
16877 _ACEOF
16878 rm -f "conftest.$ac_objext"
16879 if { (eval echo "$as_me:16879: \"$ac_compile\"") >&5
16880   (eval $ac_compile) 2>&5
16881   ac_status=$?
16882   echo "$as_me:16882: \$? = $ac_status" >&5
16883   (exit "$ac_status"); } &&
16884          { ac_try='test -s "conftest.$ac_objext"'
16885   { (eval echo "$as_me:16885: \"$ac_try\"") >&5
16886   (eval $ac_try) 2>&5
16887   ac_status=$?
16888   echo "$as_me:16888: \$? = $ac_status" >&5
16889   (exit "$ac_status"); }; }; then
16890
16891                         cf_cv_const_x_string=no
16892
16893 else
16894   echo "$as_me: failed program was:" >&5
16895 cat "conftest.$ac_ext" >&5
16896
16897                         cf_cv_const_x_string=yes
16898
16899 fi
16900 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16901
16902 fi
16903 echo "$as_me:16903: result: $cf_cv_const_x_string" >&5
16904 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16905
16906 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16907 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16908 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16909
16910 case "$cf_cv_const_x_string" in
16911 (no)
16912
16913         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16914         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16915
16916         ;;
16917 (*)
16918
16919         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16920         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16921
16922         ;;
16923 esac
16924
16925 else
16926   echo "$as_me: failed program was:" >&5
16927 cat "conftest.$ac_ext" >&5
16928 fi
16929 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16930  fi
16931 cat > "conftest.$ac_ext" <<EOF
16932 #line 16932 "${as_me:-configure}"
16933 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16934 EOF
16935 if test "$INTEL_COMPILER" = yes
16936 then
16937 # The "-wdXXX" options suppress warnings:
16938 # remark #1419: external declaration in primary source file
16939 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16940 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16941 # remark #193: zero used for undefined preprocessing identifier
16942 # remark #593: variable "curs_sb_left_arrow" was set but never used
16943 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16944 # remark #869: parameter "tw" was never referenced
16945 # remark #981: operands are evaluated in unspecified order
16946 # warning #279: controlling expression is constant
16947
16948         { echo "$as_me:16948: checking for $CC warning options..." >&5
16949 echo "$as_me: checking for $CC warning options..." >&6;}
16950         cf_save_CFLAGS="$CFLAGS"
16951         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16952         for cf_opt in \
16953                 wd1419 \
16954                 wd1683 \
16955                 wd1684 \
16956                 wd193 \
16957                 wd593 \
16958                 wd279 \
16959                 wd810 \
16960                 wd869 \
16961                 wd981
16962         do
16963                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16964                 if { (eval echo "$as_me:16964: \"$ac_compile\"") >&5
16965   (eval $ac_compile) 2>&5
16966   ac_status=$?
16967   echo "$as_me:16967: \$? = $ac_status" >&5
16968   (exit "$ac_status"); }; then
16969                         test -n "$verbose" && echo "$as_me:16969: result: ... -$cf_opt" >&5
16970 echo "${ECHO_T}... -$cf_opt" >&6
16971                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16972                 fi
16973         done
16974         CFLAGS="$cf_save_CFLAGS"
16975 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16976 then
16977         { echo "$as_me:16977: checking for $CC warning options..." >&5
16978 echo "$as_me: checking for $CC warning options..." >&6;}
16979         cf_save_CFLAGS="$CFLAGS"
16980         cf_warn_CONST=""
16981         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16982         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16983         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16984         for cf_opt in W Wall \
16985                 Wbad-function-cast \
16986                 Wcast-align \
16987                 Wcast-qual \
16988                 Wdeclaration-after-statement \
16989                 Wextra \
16990                 Winline \
16991                 Wmissing-declarations \
16992                 Wmissing-prototypes \
16993                 Wnested-externs \
16994                 Wpointer-arith \
16995                 Wshadow \
16996                 Wstrict-prototypes \
16997                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16998         do
16999                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17000                 if { (eval echo "$as_me:17000: \"$ac_compile\"") >&5
17001   (eval $ac_compile) 2>&5
17002   ac_status=$?
17003   echo "$as_me:17003: \$? = $ac_status" >&5
17004   (exit "$ac_status"); }; then
17005                         test -n "$verbose" && echo "$as_me:17005: result: ... -$cf_opt" >&5
17006 echo "${ECHO_T}... -$cf_opt" >&6
17007                         case "$cf_opt" in
17008                         (Winline)
17009                                 case "$GCC_VERSION" in
17010                                 ([34].*)
17011                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17012
17013 echo "${as_me:-configure}:17013: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17014
17015                                         continue;;
17016                                 esac
17017                                 ;;
17018                         (Wpointer-arith)
17019                                 case "$GCC_VERSION" in
17020                                 ([12].*)
17021                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17022
17023 echo "${as_me:-configure}:17023: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17024
17025                                         continue;;
17026                                 esac
17027                                 ;;
17028                         esac
17029                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17030                 fi
17031         done
17032         CFLAGS="$cf_save_CFLAGS"
17033 fi
17034 rm -rf ./conftest*
17035
17036 fi
17037
17038 if test "$GCC" = yes || test "$GXX" = yes
17039 then
17040 cat > conftest.i <<EOF
17041 #ifndef GCC_PRINTF
17042 #define GCC_PRINTF 0
17043 #endif
17044 #ifndef GCC_SCANF
17045 #define GCC_SCANF 0
17046 #endif
17047 #ifndef GCC_NORETURN
17048 #define GCC_NORETURN /* nothing */
17049 #endif
17050 #ifndef GCC_UNUSED
17051 #define GCC_UNUSED /* nothing */
17052 #endif
17053 EOF
17054 if test "$GCC" = yes
17055 then
17056         { echo "$as_me:17056: checking for $CC __attribute__ directives..." >&5
17057 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17058 cat > "conftest.$ac_ext" <<EOF
17059 #line 17059 "${as_me:-configure}"
17060 #include "confdefs.h"
17061 #include "conftest.h"
17062 #include "conftest.i"
17063 #if     GCC_PRINTF
17064 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17065 #else
17066 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17067 #endif
17068 #if     GCC_SCANF
17069 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17070 #else
17071 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17072 #endif
17073 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17074 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17075 extern GCC_NORETURN void foo(void);
17076 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17077 EOF
17078         cf_printf_attribute=no
17079         cf_scanf_attribute=no
17080         for cf_attribute in scanf printf unused noreturn
17081         do
17082
17083 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17084
17085                 cf_directive="__attribute__(($cf_attribute))"
17086                 echo "checking for $CC $cf_directive" 1>&5
17087
17088                 case "$cf_attribute" in
17089                 (printf)
17090                         cf_printf_attribute=yes
17091                         cat >conftest.h <<EOF
17092 #define GCC_$cf_ATTRIBUTE 1
17093 EOF
17094                         ;;
17095                 (scanf)
17096                         cf_scanf_attribute=yes
17097                         cat >conftest.h <<EOF
17098 #define GCC_$cf_ATTRIBUTE 1
17099 EOF
17100                         ;;
17101                 (*)
17102                         cat >conftest.h <<EOF
17103 #define GCC_$cf_ATTRIBUTE $cf_directive
17104 EOF
17105                         ;;
17106                 esac
17107
17108                 if { (eval echo "$as_me:17108: \"$ac_compile\"") >&5
17109   (eval $ac_compile) 2>&5
17110   ac_status=$?
17111   echo "$as_me:17111: \$? = $ac_status" >&5
17112   (exit "$ac_status"); }; then
17113                         test -n "$verbose" && echo "$as_me:17113: result: ... $cf_attribute" >&5
17114 echo "${ECHO_T}... $cf_attribute" >&6
17115                         cat conftest.h >>confdefs.h
17116                         case "$cf_attribute" in
17117                         (noreturn)
17118
17119 cat >>confdefs.h <<EOF
17120 #define GCC_NORETURN $cf_directive
17121 EOF
17122
17123                                 ;;
17124                         (printf)
17125                                 cf_value='/* nothing */'
17126                                 if test "$cf_printf_attribute" != no ; then
17127                                         cf_value='__attribute__((format(printf,fmt,var)))'
17128
17129 cat >>confdefs.h <<\EOF
17130 #define GCC_PRINTF 1
17131 EOF
17132
17133                                 fi
17134
17135 cat >>confdefs.h <<EOF
17136 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17137 EOF
17138
17139                                 ;;
17140                         (scanf)
17141                                 cf_value='/* nothing */'
17142                                 if test "$cf_scanf_attribute" != no ; then
17143                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17144
17145 cat >>confdefs.h <<\EOF
17146 #define GCC_SCANF 1
17147 EOF
17148
17149                                 fi
17150
17151 cat >>confdefs.h <<EOF
17152 #define GCC_SCANFLIKE(fmt,var) $cf_value
17153 EOF
17154
17155                                 ;;
17156                         (unused)
17157
17158 cat >>confdefs.h <<EOF
17159 #define GCC_UNUSED $cf_directive
17160 EOF
17161
17162                                 ;;
17163                         esac
17164                 fi
17165         done
17166 else
17167         ${FGREP-fgrep} define conftest.i >>confdefs.h
17168 fi
17169 rm -rf ./conftest*
17170 fi
17171
17172 fi
17173
17174 if test "x$enable_warnings" = "xyes"; then
17175
17176         ADAFLAGS="$ADAFLAGS -gnatg"
17177
17178         if test "x$cf_with_cxx" = xyes ; then
17179
17180 INTEL_CPLUSPLUS=no
17181
17182 if test "$GCC" = yes ; then
17183         case "$host_os" in
17184         (linux*|gnu*)
17185                 echo "$as_me:17185: checking if this is really Intel C++ compiler" >&5
17186 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17187                 cf_save_CFLAGS="$CXXFLAGS"
17188                 CXXFLAGS="$CXXFLAGS -no-gcc"
17189                 cat >"conftest.$ac_ext" <<_ACEOF
17190 #line 17190 "configure"
17191 #include "confdefs.h"
17192
17193 int
17194 main (void)
17195 {
17196
17197 #ifdef __INTEL_COMPILER
17198 #else
17199 make an error
17200 #endif
17201
17202   ;
17203   return 0;
17204 }
17205 _ACEOF
17206 rm -f "conftest.$ac_objext"
17207 if { (eval echo "$as_me:17207: \"$ac_compile\"") >&5
17208   (eval $ac_compile) 2>&5
17209   ac_status=$?
17210   echo "$as_me:17210: \$? = $ac_status" >&5
17211   (exit "$ac_status"); } &&
17212          { ac_try='test -s "conftest.$ac_objext"'
17213   { (eval echo "$as_me:17213: \"$ac_try\"") >&5
17214   (eval $ac_try) 2>&5
17215   ac_status=$?
17216   echo "$as_me:17216: \$? = $ac_status" >&5
17217   (exit "$ac_status"); }; }; then
17218   INTEL_CPLUSPLUS=yes
17219 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17220
17221 else
17222   echo "$as_me: failed program was:" >&5
17223 cat "conftest.$ac_ext" >&5
17224 fi
17225 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17226                 CXXFLAGS="$cf_save_CFLAGS"
17227                 echo "$as_me:17227: result: $INTEL_CPLUSPLUS" >&5
17228 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17229                 ;;
17230         esac
17231 fi
17232
17233 CLANG_CPLUSPLUS=no
17234
17235 if test "$GCC" = yes ; then
17236         echo "$as_me:17236: checking if this is really Clang C++ compiler" >&5
17237 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17238         cf_save_CFLAGS="$CXXFLAGS"
17239         cat >"conftest.$ac_ext" <<_ACEOF
17240 #line 17240 "configure"
17241 #include "confdefs.h"
17242
17243 int
17244 main (void)
17245 {
17246
17247 #ifdef __clang__
17248 #else
17249 make an error
17250 #endif
17251
17252   ;
17253   return 0;
17254 }
17255 _ACEOF
17256 rm -f "conftest.$ac_objext"
17257 if { (eval echo "$as_me:17257: \"$ac_compile\"") >&5
17258   (eval $ac_compile) 2>&5
17259   ac_status=$?
17260   echo "$as_me:17260: \$? = $ac_status" >&5
17261   (exit "$ac_status"); } &&
17262          { ac_try='test -s "conftest.$ac_objext"'
17263   { (eval echo "$as_me:17263: \"$ac_try\"") >&5
17264   (eval $ac_try) 2>&5
17265   ac_status=$?
17266   echo "$as_me:17266: \$? = $ac_status" >&5
17267   (exit "$ac_status"); }; }; then
17268   CLANG_CPLUSPLUS=yes
17269
17270 else
17271   echo "$as_me: failed program was:" >&5
17272 cat "conftest.$ac_ext" >&5
17273 fi
17274 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17275         CXXFLAGS="$cf_save_CFLAGS"
17276         echo "$as_me:17276: result: $CLANG_CPLUSPLUS" >&5
17277 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17278 fi
17279
17280 CLANG_VERSION=none
17281
17282 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17283         case "$CC" in
17284         (c[1-9][0-9]|*/c[1-9][0-9])
17285                 { echo "$as_me:17285: WARNING: replacing broken compiler alias $CC" >&5
17286 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17287                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17288                 CC=clang
17289                 ;;
17290         esac
17291
17292         echo "$as_me:17292: checking version of $CC" >&5
17293 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17294         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.].*//'`"
17295         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17296         echo "$as_me:17296: result: $CLANG_VERSION" >&5
17297 echo "${ECHO_T}$CLANG_VERSION" >&6
17298
17299         for cf_clang_opt in \
17300                 -Qunused-arguments \
17301                 -Wno-error=implicit-function-declaration
17302         do
17303                 echo "$as_me:17303: checking if option $cf_clang_opt works" >&5
17304 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17305                 cf_save_CFLAGS="$CFLAGS"
17306                 CFLAGS="$CFLAGS $cf_clang_opt"
17307                 cat >"conftest.$ac_ext" <<_ACEOF
17308 #line 17308 "configure"
17309 #include "confdefs.h"
17310
17311                         #include <stdio.h>
17312 int
17313 main (void)
17314 {
17315
17316                         printf("hello!\\n");
17317   ;
17318   return 0;
17319 }
17320 _ACEOF
17321 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17322 if { (eval echo "$as_me:17322: \"$ac_link\"") >&5
17323   (eval $ac_link) 2>&5
17324   ac_status=$?
17325   echo "$as_me:17325: \$? = $ac_status" >&5
17326   (exit "$ac_status"); } &&
17327          { ac_try='test -s "conftest$ac_exeext"'
17328   { (eval echo "$as_me:17328: \"$ac_try\"") >&5
17329   (eval $ac_try) 2>&5
17330   ac_status=$?
17331   echo "$as_me:17331: \$? = $ac_status" >&5
17332   (exit "$ac_status"); }; }; then
17333
17334                         cf_clang_optok=yes
17335 else
17336   echo "$as_me: failed program was:" >&5
17337 cat "conftest.$ac_ext" >&5
17338
17339                         cf_clang_optok=no
17340 fi
17341 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17342                 echo "$as_me:17342: result: $cf_clang_optok" >&5
17343 echo "${ECHO_T}$cf_clang_optok" >&6
17344                 CFLAGS="$cf_save_CFLAGS"
17345                 if test "$cf_clang_optok" = yes; then
17346                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17347
17348 echo "${as_me:-configure}:17348: testing adding option $cf_clang_opt ..." 1>&5
17349
17350         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17351         CFLAGS="${CFLAGS}$cf_clang_opt"
17352
17353                 fi
17354         done
17355 fi
17356
17357 ac_ext=cc
17358 ac_cpp='$CXXCPP $CPPFLAGS'
17359 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17360 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17361 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17362 ac_main_return="return"
17363
17364 cat > conftest.$ac_ext <<EOF
17365 #line 17365 "configure"
17366 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17367 EOF
17368
17369 if test "$INTEL_CPLUSPLUS" = yes
17370 then
17371 # The "-wdXXX" options suppress warnings:
17372 # remark #1419: external declaration in primary source file
17373 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17374 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17375 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17376 # remark #193: zero used for undefined preprocessing identifier
17377 # remark #593: variable "curs_sb_left_arrow" was set but never used
17378 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17379 # remark #869: parameter "tw" was never referenced
17380 # remark #981: operands are evaluated in unspecified order
17381 # warning #269: invalid format string conversion
17382
17383         { echo "$as_me:17383: checking for $CC warning options..." >&5
17384 echo "$as_me: checking for $CC warning options..." >&6;}
17385         cf_save_CXXFLAGS="$CXXFLAGS"
17386         EXTRA_CXXFLAGS="-Wall"
17387         for cf_opt in \
17388                 wd1419 \
17389                 wd1682 \
17390                 wd1683 \
17391                 wd1684 \
17392                 wd193 \
17393                 wd279 \
17394                 wd593 \
17395                 wd810 \
17396                 wd869 \
17397                 wd981
17398         do
17399                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17400                 if { (eval echo "$as_me:17400: \"$ac_compile\"") >&5
17401   (eval $ac_compile) 2>&5
17402   ac_status=$?
17403   echo "$as_me:17403: \$? = $ac_status" >&5
17404   (exit "$ac_status"); }; then
17405                         test -n "$verbose" && echo "$as_me:17405: result: ... -$cf_opt" >&5
17406 echo "${ECHO_T}... -$cf_opt" >&6
17407                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17408                 fi
17409         done
17410         CXXFLAGS="$cf_save_CXXFLAGS"
17411
17412 elif test "$GXX" = yes
17413 then
17414         { echo "$as_me:17414: checking for $CXX warning options..." >&5
17415 echo "$as_me: checking for $CXX warning options..." >&6;}
17416         cf_save_CXXFLAGS="$CXXFLAGS"
17417         EXTRA_CXXFLAGS="-W -Wall"
17418         cf_gxx_extra_warnings=""
17419         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17420         case "$GXX_VERSION" in
17421         ([1-2].*)
17422                 ;;
17423         (*)
17424                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17425                 ;;
17426         esac
17427         for cf_opt in \
17428                 Wabi \
17429                 fabi-version=0 \
17430                 Wextra \
17431                 Wignored-qualifiers \
17432                 Wlogical-op \
17433                 Woverloaded-virtual \
17434                 Wsign-promo \
17435                 Wsynth \
17436                 Wold-style-cast \
17437                 Wcast-align \
17438                 Wcast-qual \
17439                 Wpointer-arith \
17440                 Wshadow \
17441                 Wundef $cf_gxx_extra_warnings Wno-unused
17442         do
17443                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17444                 if { (eval echo "$as_me:17444: \"$ac_compile\"") >&5
17445   (eval $ac_compile) 2>&5
17446   ac_status=$?
17447   echo "$as_me:17447: \$? = $ac_status" >&5
17448   (exit "$ac_status"); }; then
17449                         test -n "$verbose" && echo "$as_me:17449: result: ... -$cf_opt" >&5
17450 echo "${ECHO_T}... -$cf_opt" >&6
17451                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17452                 else
17453                         test -n "$verbose" && echo "$as_me:17453: result: ... no -$cf_opt" >&5
17454 echo "${ECHO_T}... no -$cf_opt" >&6
17455                 fi
17456         done
17457         CXXFLAGS="$cf_save_CXXFLAGS"
17458 fi
17459
17460 rm -rf ./conftest*
17461 ac_ext=c
17462 ac_cpp='$CPP $CPPFLAGS'
17463 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17464 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17465 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17466 ac_main_return="return"
17467
17468         fi
17469 fi
17470
17471 echo "$as_me:17471: checking if you want to work around bogus compiler/loader warnings" >&5
17472 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17473
17474 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17475 if test "${enable_string_hacks+set}" = set; then
17476   enableval="$enable_string_hacks"
17477   enable_string_hacks=$enableval
17478 else
17479   enable_string_hacks=no
17480 fi;
17481 echo "$as_me:17481: result: $enable_string_hacks" >&5
17482 echo "${ECHO_T}$enable_string_hacks" >&6
17483
17484 if test "x$enable_string_hacks" = "xyes"; then
17485
17486 cat >>confdefs.h <<\EOF
17487 #define USE_STRING_HACKS 1
17488 EOF
17489
17490         { echo "$as_me:17490: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17491 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17492         echo "$as_me:17492: checking for strlcat" >&5
17493 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17494 if test "${ac_cv_func_strlcat+set}" = set; then
17495   echo $ECHO_N "(cached) $ECHO_C" >&6
17496 else
17497   cat >"conftest.$ac_ext" <<_ACEOF
17498 #line 17498 "configure"
17499 #include "confdefs.h"
17500 #define strlcat autoconf_temporary
17501 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17502 #undef strlcat
17503
17504 #ifdef __cplusplus
17505 extern "C"
17506 #endif
17507
17508 /* We use char because int might match the return type of a gcc2
17509    builtin and then its argument prototype would still apply.  */
17510 char strlcat (void);
17511
17512 int
17513 main (void)
17514 {
17515
17516 /* The GNU C library defines stubs for functions which it implements
17517     to always fail with ENOSYS.  Some functions are actually named
17518     something starting with __ and the normal name is an alias.  */
17519 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17520 #error found stub for strlcat
17521 #endif
17522
17523         return strlcat ();
17524   ;
17525   return 0;
17526 }
17527 _ACEOF
17528 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17529 if { (eval echo "$as_me:17529: \"$ac_link\"") >&5
17530   (eval $ac_link) 2>&5
17531   ac_status=$?
17532   echo "$as_me:17532: \$? = $ac_status" >&5
17533   (exit "$ac_status"); } &&
17534          { ac_try='test -s "conftest$ac_exeext"'
17535   { (eval echo "$as_me:17535: \"$ac_try\"") >&5
17536   (eval $ac_try) 2>&5
17537   ac_status=$?
17538   echo "$as_me:17538: \$? = $ac_status" >&5
17539   (exit "$ac_status"); }; }; then
17540   ac_cv_func_strlcat=yes
17541 else
17542   echo "$as_me: failed program was:" >&5
17543 cat "conftest.$ac_ext" >&5
17544 ac_cv_func_strlcat=no
17545 fi
17546 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17547 fi
17548 echo "$as_me:17548: result: $ac_cv_func_strlcat" >&5
17549 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17550 if test "$ac_cv_func_strlcat" = yes; then
17551
17552 cat >>confdefs.h <<\EOF
17553 #define HAVE_STRLCAT 1
17554 EOF
17555
17556 else
17557
17558                 echo "$as_me:17558: checking for strlcat in -lbsd" >&5
17559 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17560 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17561   echo $ECHO_N "(cached) $ECHO_C" >&6
17562 else
17563   ac_check_lib_save_LIBS=$LIBS
17564 LIBS="-lbsd  $LIBS"
17565 cat >"conftest.$ac_ext" <<_ACEOF
17566 #line 17566 "configure"
17567 #include "confdefs.h"
17568
17569 /* Override any gcc2 internal prototype to avoid an error.  */
17570 #ifdef __cplusplus
17571 extern "C"
17572 #endif
17573 /* We use char because int might match the return type of a gcc2
17574    builtin and then its argument prototype would still apply.  */
17575 char strlcat ();
17576 int
17577 main (void)
17578 {
17579 strlcat ();
17580   ;
17581   return 0;
17582 }
17583 _ACEOF
17584 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17585 if { (eval echo "$as_me:17585: \"$ac_link\"") >&5
17586   (eval $ac_link) 2>&5
17587   ac_status=$?
17588   echo "$as_me:17588: \$? = $ac_status" >&5
17589   (exit "$ac_status"); } &&
17590          { ac_try='test -s "conftest$ac_exeext"'
17591   { (eval echo "$as_me:17591: \"$ac_try\"") >&5
17592   (eval $ac_try) 2>&5
17593   ac_status=$?
17594   echo "$as_me:17594: \$? = $ac_status" >&5
17595   (exit "$ac_status"); }; }; then
17596   ac_cv_lib_bsd_strlcat=yes
17597 else
17598   echo "$as_me: failed program was:" >&5
17599 cat "conftest.$ac_ext" >&5
17600 ac_cv_lib_bsd_strlcat=no
17601 fi
17602 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17603 LIBS=$ac_check_lib_save_LIBS
17604 fi
17605 echo "$as_me:17605: result: $ac_cv_lib_bsd_strlcat" >&5
17606 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17607 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17608
17609 cf_add_libs="$LIBS"
17610 # reverse order
17611 cf_add_0lib=
17612 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17613 # filter duplicates
17614 for cf_add_1lib in $cf_add_0lib; do
17615         for cf_add_2lib in $cf_add_libs; do
17616                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17617                         cf_add_1lib=
17618                         break
17619                 fi
17620         done
17621         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17622 done
17623 LIBS="$cf_add_libs"
17624
17625 for ac_header in bsd/string.h
17626 do
17627 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17628 echo "$as_me:17628: checking for $ac_header" >&5
17629 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17630 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17631   echo $ECHO_N "(cached) $ECHO_C" >&6
17632 else
17633   cat >"conftest.$ac_ext" <<_ACEOF
17634 #line 17634 "configure"
17635 #include "confdefs.h"
17636 #include <$ac_header>
17637 _ACEOF
17638 if { (eval echo "$as_me:17638: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17639   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17640   ac_status=$?
17641   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17642   rm -f conftest.er1
17643   cat conftest.err >&5
17644   echo "$as_me:17644: \$? = $ac_status" >&5
17645   (exit "$ac_status"); } >/dev/null; then
17646   if test -s conftest.err; then
17647     ac_cpp_err=$ac_c_preproc_warn_flag
17648   else
17649     ac_cpp_err=
17650   fi
17651 else
17652   ac_cpp_err=yes
17653 fi
17654 if test -z "$ac_cpp_err"; then
17655   eval "$as_ac_Header=yes"
17656 else
17657   echo "$as_me: failed program was:" >&5
17658   cat "conftest.$ac_ext" >&5
17659   eval "$as_ac_Header=no"
17660 fi
17661 rm -f conftest.err "conftest.$ac_ext"
17662 fi
17663 echo "$as_me:17663: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17664 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17665 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17666   cat >>confdefs.h <<EOF
17667 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17668 EOF
17669
17670 fi
17671 done
17672
17673 cat >>confdefs.h <<\EOF
17674 #define HAVE_STRLCAT 1
17675 EOF
17676
17677 fi
17678
17679 fi
17680
17681 for ac_func in strlcpy snprintf
17682 do
17683 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17684 echo "$as_me:17684: checking for $ac_func" >&5
17685 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17686 if eval "test \"\${$as_ac_var+set}\" = set"; then
17687   echo $ECHO_N "(cached) $ECHO_C" >&6
17688 else
17689   cat >"conftest.$ac_ext" <<_ACEOF
17690 #line 17690 "configure"
17691 #include "confdefs.h"
17692 #define $ac_func autoconf_temporary
17693 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17694 #undef $ac_func
17695
17696 #ifdef __cplusplus
17697 extern "C"
17698 #endif
17699
17700 /* We use char because int might match the return type of a gcc2
17701    builtin and then its argument prototype would still apply.  */
17702 char $ac_func (void);
17703
17704 int
17705 main (void)
17706 {
17707
17708 /* The GNU C library defines stubs for functions which it implements
17709     to always fail with ENOSYS.  Some functions are actually named
17710     something starting with __ and the normal name is an alias.  */
17711 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17712 #error found stub for $ac_func
17713 #endif
17714
17715         return $ac_func ();
17716   ;
17717   return 0;
17718 }
17719 _ACEOF
17720 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17721 if { (eval echo "$as_me:17721: \"$ac_link\"") >&5
17722   (eval $ac_link) 2>&5
17723   ac_status=$?
17724   echo "$as_me:17724: \$? = $ac_status" >&5
17725   (exit "$ac_status"); } &&
17726          { ac_try='test -s "conftest$ac_exeext"'
17727   { (eval echo "$as_me:17727: \"$ac_try\"") >&5
17728   (eval $ac_try) 2>&5
17729   ac_status=$?
17730   echo "$as_me:17730: \$? = $ac_status" >&5
17731   (exit "$ac_status"); }; }; then
17732   eval "$as_ac_var=yes"
17733 else
17734   echo "$as_me: failed program was:" >&5
17735 cat "conftest.$ac_ext" >&5
17736 eval "$as_ac_var=no"
17737 fi
17738 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17739 fi
17740 echo "$as_me:17740: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17741 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17742 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17743   cat >>confdefs.h <<EOF
17744 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17745 EOF
17746
17747 fi
17748 done
17749
17750 fi
17751
17752 ###     use option --enable-assertions to turn on generation of assertion code
17753 echo "$as_me:17753: checking if you want to enable runtime assertions" >&5
17754 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17755
17756 # Check whether --enable-assertions or --disable-assertions was given.
17757 if test "${enable_assertions+set}" = set; then
17758   enableval="$enable_assertions"
17759   with_assertions=$enableval
17760 else
17761   with_assertions=no
17762 fi;
17763 echo "$as_me:17763: result: $with_assertions" >&5
17764 echo "${ECHO_T}$with_assertions" >&6
17765 if test -n "$GCC"
17766 then
17767         if test "$with_assertions" = no
17768         then
17769                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17770         else
17771
17772         ADAFLAGS="$ADAFLAGS -gnata"
17773
17774         fi
17775 fi
17776
17777 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17778
17779 echo "$as_me:17779: checking if you want to use dmalloc for testing" >&5
17780 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17781
17782 # Check whether --with-dmalloc or --without-dmalloc was given.
17783 if test "${with_dmalloc+set}" = set; then
17784   withval="$with_dmalloc"
17785   case "x$withval" in
17786         (x|xno) ;;
17787         (*)
17788                 : "${with_cflags:=-g}"
17789                 : "${enable_leaks:=no}"
17790                 with_dmalloc=yes
17791
17792 cat >>confdefs.h <<EOF
17793 #define USE_DMALLOC 1
17794 EOF
17795
17796                 ;;
17797         esac
17798 else
17799   with_dmalloc=
17800 fi;
17801 echo "$as_me:17801: result: ${with_dmalloc:-no}" >&5
17802 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17803
17804 case ".$with_cflags" in
17805 (.*-g*)
17806         case .$CFLAGS in
17807         (.*-g*)
17808                 ;;
17809         (*)
17810
17811 cf_fix_cppflags=no
17812 cf_new_cflags=
17813 cf_new_cppflags=
17814 cf_new_extra_cppflags=
17815
17816 for cf_add_cflags in -g
17817 do
17818 case "$cf_fix_cppflags" in
17819 (no)
17820         case "$cf_add_cflags" in
17821         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17822                 case "$cf_add_cflags" in
17823                 (-D*)
17824                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17825
17826                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17827                                 && test -z "${cf_tst_cflags}" \
17828                                 && cf_fix_cppflags=yes
17829
17830                         if test "$cf_fix_cppflags" = yes ; then
17831
17832         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17833         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17834
17835                                 continue
17836                         elif test "${cf_tst_cflags}" = "\"'" ; then
17837
17838         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17839         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17840
17841                                 continue
17842                         fi
17843                         ;;
17844                 esac
17845                 case "$CPPFLAGS" in
17846                 (*$cf_add_cflags)
17847                         ;;
17848                 (*)
17849                         case "$cf_add_cflags" in
17850                         (-D*)
17851                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17852
17853 CPPFLAGS=`echo "$CPPFLAGS" | \
17854         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17855                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17856
17857                                 ;;
17858                         esac
17859
17860         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17861         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17862
17863                         ;;
17864                 esac
17865                 ;;
17866         (*)
17867
17868         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17869         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17870
17871                 ;;
17872         esac
17873         ;;
17874 (yes)
17875
17876         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17877         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17878
17879         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17880
17881         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17882                 && test -z "${cf_tst_cflags}" \
17883                 && cf_fix_cppflags=no
17884         ;;
17885 esac
17886 done
17887
17888 if test -n "$cf_new_cflags" ; then
17889
17890         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17891         CFLAGS="${CFLAGS}$cf_new_cflags"
17892
17893 fi
17894
17895 if test -n "$cf_new_cppflags" ; then
17896
17897         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17898         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17899
17900 fi
17901
17902 if test -n "$cf_new_extra_cppflags" ; then
17903
17904         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17905         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17906
17907 fi
17908
17909                 ;;
17910         esac
17911         ;;
17912 esac
17913
17914 if test "$with_dmalloc" = yes ; then
17915         echo "$as_me:17915: checking for dmalloc.h" >&5
17916 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17917 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17918   echo $ECHO_N "(cached) $ECHO_C" >&6
17919 else
17920   cat >"conftest.$ac_ext" <<_ACEOF
17921 #line 17921 "configure"
17922 #include "confdefs.h"
17923 #include <dmalloc.h>
17924 _ACEOF
17925 if { (eval echo "$as_me:17925: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17926   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17927   ac_status=$?
17928   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17929   rm -f conftest.er1
17930   cat conftest.err >&5
17931   echo "$as_me:17931: \$? = $ac_status" >&5
17932   (exit "$ac_status"); } >/dev/null; then
17933   if test -s conftest.err; then
17934     ac_cpp_err=$ac_c_preproc_warn_flag
17935   else
17936     ac_cpp_err=
17937   fi
17938 else
17939   ac_cpp_err=yes
17940 fi
17941 if test -z "$ac_cpp_err"; then
17942   ac_cv_header_dmalloc_h=yes
17943 else
17944   echo "$as_me: failed program was:" >&5
17945   cat "conftest.$ac_ext" >&5
17946   ac_cv_header_dmalloc_h=no
17947 fi
17948 rm -f conftest.err "conftest.$ac_ext"
17949 fi
17950 echo "$as_me:17950: result: $ac_cv_header_dmalloc_h" >&5
17951 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17952 if test "$ac_cv_header_dmalloc_h" = yes; then
17953
17954 echo "$as_me:17954: checking for dmalloc_debug in -ldmalloc" >&5
17955 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17956 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17957   echo $ECHO_N "(cached) $ECHO_C" >&6
17958 else
17959   ac_check_lib_save_LIBS=$LIBS
17960 LIBS="-ldmalloc  $LIBS"
17961 cat >"conftest.$ac_ext" <<_ACEOF
17962 #line 17962 "configure"
17963 #include "confdefs.h"
17964
17965 /* Override any gcc2 internal prototype to avoid an error.  */
17966 #ifdef __cplusplus
17967 extern "C"
17968 #endif
17969 /* We use char because int might match the return type of a gcc2
17970    builtin and then its argument prototype would still apply.  */
17971 char dmalloc_debug ();
17972 int
17973 main (void)
17974 {
17975 dmalloc_debug ();
17976   ;
17977   return 0;
17978 }
17979 _ACEOF
17980 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17981 if { (eval echo "$as_me:17981: \"$ac_link\"") >&5
17982   (eval $ac_link) 2>&5
17983   ac_status=$?
17984   echo "$as_me:17984: \$? = $ac_status" >&5
17985   (exit "$ac_status"); } &&
17986          { ac_try='test -s "conftest$ac_exeext"'
17987   { (eval echo "$as_me:17987: \"$ac_try\"") >&5
17988   (eval $ac_try) 2>&5
17989   ac_status=$?
17990   echo "$as_me:17990: \$? = $ac_status" >&5
17991   (exit "$ac_status"); }; }; then
17992   ac_cv_lib_dmalloc_dmalloc_debug=yes
17993 else
17994   echo "$as_me: failed program was:" >&5
17995 cat "conftest.$ac_ext" >&5
17996 ac_cv_lib_dmalloc_dmalloc_debug=no
17997 fi
17998 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17999 LIBS=$ac_check_lib_save_LIBS
18000 fi
18001 echo "$as_me:18001: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18002 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18003 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18004   cat >>confdefs.h <<EOF
18005 #define HAVE_LIBDMALLOC 1
18006 EOF
18007
18008   LIBS="-ldmalloc $LIBS"
18009
18010 fi
18011
18012 fi
18013
18014 fi
18015
18016 echo "$as_me:18016: checking if you want to use dbmalloc for testing" >&5
18017 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18018
18019 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18020 if test "${with_dbmalloc+set}" = set; then
18021   withval="$with_dbmalloc"
18022   case "x$withval" in
18023         (x|xno) ;;
18024         (*)
18025                 : "${with_cflags:=-g}"
18026                 : "${enable_leaks:=no}"
18027                 with_dbmalloc=yes
18028
18029 cat >>confdefs.h <<EOF
18030 #define USE_DBMALLOC 1
18031 EOF
18032
18033                 ;;
18034         esac
18035 else
18036   with_dbmalloc=
18037 fi;
18038 echo "$as_me:18038: result: ${with_dbmalloc:-no}" >&5
18039 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18040
18041 case ".$with_cflags" in
18042 (.*-g*)
18043         case .$CFLAGS in
18044         (.*-g*)
18045                 ;;
18046         (*)
18047
18048 cf_fix_cppflags=no
18049 cf_new_cflags=
18050 cf_new_cppflags=
18051 cf_new_extra_cppflags=
18052
18053 for cf_add_cflags in -g
18054 do
18055 case "$cf_fix_cppflags" in
18056 (no)
18057         case "$cf_add_cflags" in
18058         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18059                 case "$cf_add_cflags" in
18060                 (-D*)
18061                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18062
18063                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18064                                 && test -z "${cf_tst_cflags}" \
18065                                 && cf_fix_cppflags=yes
18066
18067                         if test "$cf_fix_cppflags" = yes ; then
18068
18069         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18070         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18071
18072                                 continue
18073                         elif test "${cf_tst_cflags}" = "\"'" ; then
18074
18075         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18076         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18077
18078                                 continue
18079                         fi
18080                         ;;
18081                 esac
18082                 case "$CPPFLAGS" in
18083                 (*$cf_add_cflags)
18084                         ;;
18085                 (*)
18086                         case "$cf_add_cflags" in
18087                         (-D*)
18088                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18089
18090 CPPFLAGS=`echo "$CPPFLAGS" | \
18091         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18092                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18093
18094                                 ;;
18095                         esac
18096
18097         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18098         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18099
18100                         ;;
18101                 esac
18102                 ;;
18103         (*)
18104
18105         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18106         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18107
18108                 ;;
18109         esac
18110         ;;
18111 (yes)
18112
18113         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18114         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18115
18116         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18117
18118         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18119                 && test -z "${cf_tst_cflags}" \
18120                 && cf_fix_cppflags=no
18121         ;;
18122 esac
18123 done
18124
18125 if test -n "$cf_new_cflags" ; then
18126
18127         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18128         CFLAGS="${CFLAGS}$cf_new_cflags"
18129
18130 fi
18131
18132 if test -n "$cf_new_cppflags" ; then
18133
18134         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18135         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18136
18137 fi
18138
18139 if test -n "$cf_new_extra_cppflags" ; then
18140
18141         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18142         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18143
18144 fi
18145
18146                 ;;
18147         esac
18148         ;;
18149 esac
18150
18151 if test "$with_dbmalloc" = yes ; then
18152         echo "$as_me:18152: checking for dbmalloc.h" >&5
18153 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18154 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18155   echo $ECHO_N "(cached) $ECHO_C" >&6
18156 else
18157   cat >"conftest.$ac_ext" <<_ACEOF
18158 #line 18158 "configure"
18159 #include "confdefs.h"
18160 #include <dbmalloc.h>
18161 _ACEOF
18162 if { (eval echo "$as_me:18162: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18163   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18164   ac_status=$?
18165   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18166   rm -f conftest.er1
18167   cat conftest.err >&5
18168   echo "$as_me:18168: \$? = $ac_status" >&5
18169   (exit "$ac_status"); } >/dev/null; then
18170   if test -s conftest.err; then
18171     ac_cpp_err=$ac_c_preproc_warn_flag
18172   else
18173     ac_cpp_err=
18174   fi
18175 else
18176   ac_cpp_err=yes
18177 fi
18178 if test -z "$ac_cpp_err"; then
18179   ac_cv_header_dbmalloc_h=yes
18180 else
18181   echo "$as_me: failed program was:" >&5
18182   cat "conftest.$ac_ext" >&5
18183   ac_cv_header_dbmalloc_h=no
18184 fi
18185 rm -f conftest.err "conftest.$ac_ext"
18186 fi
18187 echo "$as_me:18187: result: $ac_cv_header_dbmalloc_h" >&5
18188 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18189 if test "$ac_cv_header_dbmalloc_h" = yes; then
18190
18191 echo "$as_me:18191: checking for debug_malloc in -ldbmalloc" >&5
18192 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18193 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18194   echo $ECHO_N "(cached) $ECHO_C" >&6
18195 else
18196   ac_check_lib_save_LIBS=$LIBS
18197 LIBS="-ldbmalloc  $LIBS"
18198 cat >"conftest.$ac_ext" <<_ACEOF
18199 #line 18199 "configure"
18200 #include "confdefs.h"
18201
18202 /* Override any gcc2 internal prototype to avoid an error.  */
18203 #ifdef __cplusplus
18204 extern "C"
18205 #endif
18206 /* We use char because int might match the return type of a gcc2
18207    builtin and then its argument prototype would still apply.  */
18208 char debug_malloc ();
18209 int
18210 main (void)
18211 {
18212 debug_malloc ();
18213   ;
18214   return 0;
18215 }
18216 _ACEOF
18217 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18218 if { (eval echo "$as_me:18218: \"$ac_link\"") >&5
18219   (eval $ac_link) 2>&5
18220   ac_status=$?
18221   echo "$as_me:18221: \$? = $ac_status" >&5
18222   (exit "$ac_status"); } &&
18223          { ac_try='test -s "conftest$ac_exeext"'
18224   { (eval echo "$as_me:18224: \"$ac_try\"") >&5
18225   (eval $ac_try) 2>&5
18226   ac_status=$?
18227   echo "$as_me:18227: \$? = $ac_status" >&5
18228   (exit "$ac_status"); }; }; then
18229   ac_cv_lib_dbmalloc_debug_malloc=yes
18230 else
18231   echo "$as_me: failed program was:" >&5
18232 cat "conftest.$ac_ext" >&5
18233 ac_cv_lib_dbmalloc_debug_malloc=no
18234 fi
18235 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18236 LIBS=$ac_check_lib_save_LIBS
18237 fi
18238 echo "$as_me:18238: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18239 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18240 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18241   cat >>confdefs.h <<EOF
18242 #define HAVE_LIBDBMALLOC 1
18243 EOF
18244
18245   LIBS="-ldbmalloc $LIBS"
18246
18247 fi
18248
18249 fi
18250
18251 fi
18252
18253 echo "$as_me:18253: checking if you want to use valgrind for testing" >&5
18254 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18255
18256 # Check whether --with-valgrind or --without-valgrind was given.
18257 if test "${with_valgrind+set}" = set; then
18258   withval="$with_valgrind"
18259   case "x$withval" in
18260         (x|xno) ;;
18261         (*)
18262                 : "${with_cflags:=-g}"
18263                 : "${enable_leaks:=no}"
18264                 with_valgrind=yes
18265
18266 cat >>confdefs.h <<EOF
18267 #define USE_VALGRIND 1
18268 EOF
18269
18270                 ;;
18271         esac
18272 else
18273   with_valgrind=
18274 fi;
18275 echo "$as_me:18275: result: ${with_valgrind:-no}" >&5
18276 echo "${ECHO_T}${with_valgrind:-no}" >&6
18277
18278 case ".$with_cflags" in
18279 (.*-g*)
18280         case .$CFLAGS in
18281         (.*-g*)
18282                 ;;
18283         (*)
18284
18285 cf_fix_cppflags=no
18286 cf_new_cflags=
18287 cf_new_cppflags=
18288 cf_new_extra_cppflags=
18289
18290 for cf_add_cflags in -g
18291 do
18292 case "$cf_fix_cppflags" in
18293 (no)
18294         case "$cf_add_cflags" in
18295         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18296                 case "$cf_add_cflags" in
18297                 (-D*)
18298                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18299
18300                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18301                                 && test -z "${cf_tst_cflags}" \
18302                                 && cf_fix_cppflags=yes
18303
18304                         if test "$cf_fix_cppflags" = yes ; then
18305
18306         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18307         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18308
18309                                 continue
18310                         elif test "${cf_tst_cflags}" = "\"'" ; then
18311
18312         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18313         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18314
18315                                 continue
18316                         fi
18317                         ;;
18318                 esac
18319                 case "$CPPFLAGS" in
18320                 (*$cf_add_cflags)
18321                         ;;
18322                 (*)
18323                         case "$cf_add_cflags" in
18324                         (-D*)
18325                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18326
18327 CPPFLAGS=`echo "$CPPFLAGS" | \
18328         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18329                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18330
18331                                 ;;
18332                         esac
18333
18334         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18335         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18336
18337                         ;;
18338                 esac
18339                 ;;
18340         (*)
18341
18342         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18343         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18344
18345                 ;;
18346         esac
18347         ;;
18348 (yes)
18349
18350         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18351         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18352
18353         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18354
18355         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18356                 && test -z "${cf_tst_cflags}" \
18357                 && cf_fix_cppflags=no
18358         ;;
18359 esac
18360 done
18361
18362 if test -n "$cf_new_cflags" ; then
18363
18364         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18365         CFLAGS="${CFLAGS}$cf_new_cflags"
18366
18367 fi
18368
18369 if test -n "$cf_new_cppflags" ; then
18370
18371         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18372         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18373
18374 fi
18375
18376 if test -n "$cf_new_extra_cppflags" ; then
18377
18378         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18379         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18380
18381 fi
18382
18383                 ;;
18384         esac
18385         ;;
18386 esac
18387
18388 echo "$as_me:18388: checking if you want to perform memory-leak testing" >&5
18389 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18390
18391 # Check whether --enable-leaks or --disable-leaks was given.
18392 if test "${enable_leaks+set}" = set; then
18393   enableval="$enable_leaks"
18394   enable_leaks=$enableval
18395 else
18396   enable_leaks=yes
18397 fi;
18398 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18399 echo "$as_me:18399: result: $with_no_leaks" >&5
18400 echo "${ECHO_T}$with_no_leaks" >&6
18401
18402 if test "$enable_leaks" = no ; then
18403
18404 cat >>confdefs.h <<\EOF
18405 #define NO_LEAKS 1
18406 EOF
18407
18408 cat >>confdefs.h <<\EOF
18409 #define YY_NO_LEAKS 1
18410 EOF
18411
18412 fi
18413
18414 cat >>confdefs.h <<\EOF
18415 #define HAVE_NC_ALLOC_H 1
18416 EOF
18417
18418 ###     use option --enable-expanded to generate certain macros as functions
18419
18420 # Check whether --enable-expanded or --disable-expanded was given.
18421 if test "${enable_expanded+set}" = set; then
18422   enableval="$enable_expanded"
18423   test "x$enableval" = xyes &&
18424 cat >>confdefs.h <<\EOF
18425 #define NCURSES_EXPANDED 1
18426 EOF
18427
18428 fi;
18429
18430 ###     use option --disable-macros to suppress macros in favor of functions
18431
18432 # Check whether --enable-macros or --disable-macros was given.
18433 if test "${enable_macros+set}" = set; then
18434   enableval="$enable_macros"
18435   test "$enableval" = no &&
18436 cat >>confdefs.h <<\EOF
18437 #define NCURSES_NOMACROS 1
18438 EOF
18439
18440 fi;
18441
18442 # Normally we only add trace() to the debug-library.  Allow this to be
18443 # extended to all models of the ncurses library:
18444 cf_all_traces=no
18445 case "$CFLAGS $CPPFLAGS" in
18446 (*-DTRACE*)
18447         cf_all_traces=yes
18448         ;;
18449 esac
18450
18451 echo "$as_me:18451: checking whether to add trace feature to all models" >&5
18452 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18453
18454 # Check whether --with-trace or --without-trace was given.
18455 if test "${with_trace+set}" = set; then
18456   withval="$with_trace"
18457   cf_with_trace=$withval
18458 else
18459   cf_with_trace=$cf_all_traces
18460 fi;
18461 echo "$as_me:18461: result: $cf_with_trace" >&5
18462 echo "${ECHO_T}$cf_with_trace" >&6
18463
18464 if test "x$cf_with_trace" = xyes ; then
18465         LIB_TRACING=all
18466         ADA_TRACE=TRUE
18467
18468 cf_fix_cppflags=no
18469 cf_new_cflags=
18470 cf_new_cppflags=
18471 cf_new_extra_cppflags=
18472
18473 for cf_add_cflags in -DTRACE
18474 do
18475 case "$cf_fix_cppflags" in
18476 (no)
18477         case "$cf_add_cflags" in
18478         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18479                 case "$cf_add_cflags" in
18480                 (-D*)
18481                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18482
18483                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18484                                 && test -z "${cf_tst_cflags}" \
18485                                 && cf_fix_cppflags=yes
18486
18487                         if test "$cf_fix_cppflags" = yes ; then
18488
18489         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18490         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18491
18492                                 continue
18493                         elif test "${cf_tst_cflags}" = "\"'" ; then
18494
18495         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18496         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18497
18498                                 continue
18499                         fi
18500                         ;;
18501                 esac
18502                 case "$CPPFLAGS" in
18503                 (*$cf_add_cflags)
18504                         ;;
18505                 (*)
18506                         case "$cf_add_cflags" in
18507                         (-D*)
18508                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18509
18510 CPPFLAGS=`echo "$CPPFLAGS" | \
18511         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18512                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18513
18514                                 ;;
18515                         esac
18516
18517         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18518         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18519
18520                         ;;
18521                 esac
18522                 ;;
18523         (*)
18524
18525         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18526         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18527
18528                 ;;
18529         esac
18530         ;;
18531 (yes)
18532
18533         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18534         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18535
18536         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18537
18538         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18539                 && test -z "${cf_tst_cflags}" \
18540                 && cf_fix_cppflags=no
18541         ;;
18542 esac
18543 done
18544
18545 if test -n "$cf_new_cflags" ; then
18546
18547         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18548         CFLAGS="${CFLAGS}$cf_new_cflags"
18549
18550 fi
18551
18552 if test -n "$cf_new_cppflags" ; then
18553
18554         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18555         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18556
18557 fi
18558
18559 if test -n "$cf_new_extra_cppflags" ; then
18560
18561         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18562         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18563
18564 fi
18565
18566 cat >>confdefs.h <<\EOF
18567 #define HAVE__TRACEF 1
18568 EOF
18569
18570 else
18571         LIB_TRACING=DEBUG
18572         ADA_TRACE=FALSE
18573 fi
18574
18575 echo "$as_me:18575: checking if we want to use GNAT projects" >&5
18576 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18577
18578 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18579 if test "${enable_gnat_projects+set}" = set; then
18580   enableval="$enable_gnat_projects"
18581   test "$enableval" != no && enableval=yes
18582         if test "$enableval" != "yes" ; then
18583     enable_gnat_projects=no
18584         else
18585                 enable_gnat_projects=yes
18586         fi
18587 else
18588   enableval=yes
18589         enable_gnat_projects=yes
18590
18591 fi;
18592 echo "$as_me:18592: result: $enable_gnat_projects" >&5
18593 echo "${ECHO_T}$enable_gnat_projects" >&6
18594
18595 ###     Checks for libraries.
18596 case "$cf_cv_system_name" in
18597 (*mingw32*|*mingw64*)
18598         if test "x$with_exp_win32" = xyes ; then
18599         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18600         else
18601         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18602         fi
18603         # Note: WINVER may be a problem with Windows 10
18604         ;;
18605 (*)
18606 echo "$as_me:18606: checking for gettimeofday" >&5
18607 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18608 if test "${ac_cv_func_gettimeofday+set}" = set; then
18609   echo $ECHO_N "(cached) $ECHO_C" >&6
18610 else
18611   cat >"conftest.$ac_ext" <<_ACEOF
18612 #line 18612 "configure"
18613 #include "confdefs.h"
18614 #define gettimeofday autoconf_temporary
18615 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18616 #undef gettimeofday
18617
18618 #ifdef __cplusplus
18619 extern "C"
18620 #endif
18621
18622 /* We use char because int might match the return type of a gcc2
18623    builtin and then its argument prototype would still apply.  */
18624 char gettimeofday (void);
18625
18626 int
18627 main (void)
18628 {
18629
18630 /* The GNU C library defines stubs for functions which it implements
18631     to always fail with ENOSYS.  Some functions are actually named
18632     something starting with __ and the normal name is an alias.  */
18633 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18634 #error found stub for gettimeofday
18635 #endif
18636
18637         return gettimeofday ();
18638   ;
18639   return 0;
18640 }
18641 _ACEOF
18642 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18643 if { (eval echo "$as_me:18643: \"$ac_link\"") >&5
18644   (eval $ac_link) 2>&5
18645   ac_status=$?
18646   echo "$as_me:18646: \$? = $ac_status" >&5
18647   (exit "$ac_status"); } &&
18648          { ac_try='test -s "conftest$ac_exeext"'
18649   { (eval echo "$as_me:18649: \"$ac_try\"") >&5
18650   (eval $ac_try) 2>&5
18651   ac_status=$?
18652   echo "$as_me:18652: \$? = $ac_status" >&5
18653   (exit "$ac_status"); }; }; then
18654   ac_cv_func_gettimeofday=yes
18655 else
18656   echo "$as_me: failed program was:" >&5
18657 cat "conftest.$ac_ext" >&5
18658 ac_cv_func_gettimeofday=no
18659 fi
18660 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18661 fi
18662 echo "$as_me:18662: result: $ac_cv_func_gettimeofday" >&5
18663 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18664 if test "$ac_cv_func_gettimeofday" = yes; then
18665
18666 cat >>confdefs.h <<\EOF
18667 #define HAVE_GETTIMEOFDAY 1
18668 EOF
18669
18670 else
18671
18672 echo "$as_me:18672: checking for gettimeofday in -lbsd" >&5
18673 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18674 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18675   echo $ECHO_N "(cached) $ECHO_C" >&6
18676 else
18677   ac_check_lib_save_LIBS=$LIBS
18678 LIBS="-lbsd  $LIBS"
18679 cat >"conftest.$ac_ext" <<_ACEOF
18680 #line 18680 "configure"
18681 #include "confdefs.h"
18682
18683 /* Override any gcc2 internal prototype to avoid an error.  */
18684 #ifdef __cplusplus
18685 extern "C"
18686 #endif
18687 /* We use char because int might match the return type of a gcc2
18688    builtin and then its argument prototype would still apply.  */
18689 char gettimeofday ();
18690 int
18691 main (void)
18692 {
18693 gettimeofday ();
18694   ;
18695   return 0;
18696 }
18697 _ACEOF
18698 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18699 if { (eval echo "$as_me:18699: \"$ac_link\"") >&5
18700   (eval $ac_link) 2>&5
18701   ac_status=$?
18702   echo "$as_me:18702: \$? = $ac_status" >&5
18703   (exit "$ac_status"); } &&
18704          { ac_try='test -s "conftest$ac_exeext"'
18705   { (eval echo "$as_me:18705: \"$ac_try\"") >&5
18706   (eval $ac_try) 2>&5
18707   ac_status=$?
18708   echo "$as_me:18708: \$? = $ac_status" >&5
18709   (exit "$ac_status"); }; }; then
18710   ac_cv_lib_bsd_gettimeofday=yes
18711 else
18712   echo "$as_me: failed program was:" >&5
18713 cat "conftest.$ac_ext" >&5
18714 ac_cv_lib_bsd_gettimeofday=no
18715 fi
18716 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18717 LIBS=$ac_check_lib_save_LIBS
18718 fi
18719 echo "$as_me:18719: result: $ac_cv_lib_bsd_gettimeofday" >&5
18720 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18721 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18722
18723 cat >>confdefs.h <<\EOF
18724 #define HAVE_GETTIMEOFDAY 1
18725 EOF
18726
18727 cf_add_libs="$LIBS"
18728 # reverse order
18729 cf_add_0lib=
18730 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18731 # filter duplicates
18732 for cf_add_1lib in $cf_add_0lib; do
18733         for cf_add_2lib in $cf_add_libs; do
18734                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18735                         cf_add_1lib=
18736                         break
18737                 fi
18738         done
18739         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18740 done
18741 LIBS="$cf_add_libs"
18742
18743 fi
18744
18745 fi
18746         ;;
18747 esac
18748
18749 echo "$as_me:18749: checking if -lm needed for math functions" >&5
18750 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18751 if test "${cf_cv_need_libm+set}" = set; then
18752   echo $ECHO_N "(cached) $ECHO_C" >&6
18753 else
18754
18755         cat >"conftest.$ac_ext" <<_ACEOF
18756 #line 18756 "configure"
18757 #include "confdefs.h"
18758
18759         #include <stdio.h>
18760         #include <stdlib.h>
18761         #include <math.h>
18762
18763 int
18764 main (void)
18765 {
18766 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18767   ;
18768   return 0;
18769 }
18770 _ACEOF
18771 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18772 if { (eval echo "$as_me:18772: \"$ac_link\"") >&5
18773   (eval $ac_link) 2>&5
18774   ac_status=$?
18775   echo "$as_me:18775: \$? = $ac_status" >&5
18776   (exit "$ac_status"); } &&
18777          { ac_try='test -s "conftest$ac_exeext"'
18778   { (eval echo "$as_me:18778: \"$ac_try\"") >&5
18779   (eval $ac_try) 2>&5
18780   ac_status=$?
18781   echo "$as_me:18781: \$? = $ac_status" >&5
18782   (exit "$ac_status"); }; }; then
18783   cf_cv_need_libm=no
18784 else
18785   echo "$as_me: failed program was:" >&5
18786 cat "conftest.$ac_ext" >&5
18787 cf_cv_need_libm=yes
18788 fi
18789 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18790 fi
18791 echo "$as_me:18791: result: $cf_cv_need_libm" >&5
18792 echo "${ECHO_T}$cf_cv_need_libm" >&6
18793 if test "$cf_cv_need_libm" = yes
18794 then
18795 MATH_LIB=-lm
18796 fi
18797
18798 ###     Checks for header files.
18799 echo "$as_me:18799: checking for ANSI C header files" >&5
18800 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18801 if test "${ac_cv_header_stdc+set}" = set; then
18802   echo $ECHO_N "(cached) $ECHO_C" >&6
18803 else
18804   cat >"conftest.$ac_ext" <<_ACEOF
18805 #line 18805 "configure"
18806 #include "confdefs.h"
18807 #include <stdlib.h>
18808 #include <stdarg.h>
18809 #include <string.h>
18810 #include <float.h>
18811
18812 _ACEOF
18813 if { (eval echo "$as_me:18813: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18814   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18815   ac_status=$?
18816   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18817   rm -f conftest.er1
18818   cat conftest.err >&5
18819   echo "$as_me:18819: \$? = $ac_status" >&5
18820   (exit "$ac_status"); } >/dev/null; then
18821   if test -s conftest.err; then
18822     ac_cpp_err=$ac_c_preproc_warn_flag
18823   else
18824     ac_cpp_err=
18825   fi
18826 else
18827   ac_cpp_err=yes
18828 fi
18829 if test -z "$ac_cpp_err"; then
18830   ac_cv_header_stdc=yes
18831 else
18832   echo "$as_me: failed program was:" >&5
18833   cat "conftest.$ac_ext" >&5
18834   ac_cv_header_stdc=no
18835 fi
18836 rm -f conftest.err "conftest.$ac_ext"
18837
18838 if test $ac_cv_header_stdc = yes; then
18839   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18840   cat >"conftest.$ac_ext" <<_ACEOF
18841 #line 18841 "configure"
18842 #include "confdefs.h"
18843 #include <string.h>
18844
18845 _ACEOF
18846 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18847   $EGREP "memchr" >/dev/null 2>&1; then
18848   :
18849 else
18850   ac_cv_header_stdc=no
18851 fi
18852 rm -rf conftest*
18853
18854 fi
18855
18856 if test $ac_cv_header_stdc = yes; then
18857   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18858   cat >"conftest.$ac_ext" <<_ACEOF
18859 #line 18859 "configure"
18860 #include "confdefs.h"
18861 #include <stdlib.h>
18862
18863 _ACEOF
18864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18865   $EGREP "free" >/dev/null 2>&1; then
18866   :
18867 else
18868   ac_cv_header_stdc=no
18869 fi
18870 rm -rf conftest*
18871
18872 fi
18873
18874 if test $ac_cv_header_stdc = yes; then
18875   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18876   if test "$cross_compiling" = yes; then
18877   :
18878 else
18879   cat >"conftest.$ac_ext" <<_ACEOF
18880 #line 18880 "configure"
18881 #include "confdefs.h"
18882 #include <ctype.h>
18883 #if ((' ' & 0x0FF) == 0x020)
18884 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18885 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18886 #else
18887 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18888                      || ('j' <= (c) && (c) <= 'r') \
18889                      || ('s' <= (c) && (c) <= 'z'))
18890 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18891 #endif
18892
18893 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18894 int
18895 main (void)
18896 {
18897   int i;
18898   for (i = 0; i < 256; i++)
18899     if (XOR (islower (i), ISLOWER (i))
18900         || toupper (i) != TOUPPER (i))
18901       $ac_main_return(2);
18902   $ac_main_return (0);
18903 }
18904 _ACEOF
18905 rm -f "conftest$ac_exeext"
18906 if { (eval echo "$as_me:18906: \"$ac_link\"") >&5
18907   (eval $ac_link) 2>&5
18908   ac_status=$?
18909   echo "$as_me:18909: \$? = $ac_status" >&5
18910   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18911   { (eval echo "$as_me:18911: \"$ac_try\"") >&5
18912   (eval $ac_try) 2>&5
18913   ac_status=$?
18914   echo "$as_me:18914: \$? = $ac_status" >&5
18915   (exit "$ac_status"); }; }; then
18916   :
18917 else
18918   echo "$as_me: program exited with status $ac_status" >&5
18919 echo "$as_me: failed program was:" >&5
18920 cat "conftest.$ac_ext" >&5
18921 ac_cv_header_stdc=no
18922 fi
18923 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18924 fi
18925 fi
18926 fi
18927 echo "$as_me:18927: result: $ac_cv_header_stdc" >&5
18928 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18929 if test $ac_cv_header_stdc = yes; then
18930
18931 cat >>confdefs.h <<\EOF
18932 #define STDC_HEADERS 1
18933 EOF
18934
18935 fi
18936
18937 ac_header_dirent=no
18938 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18939   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18940 echo "$as_me:18940: checking for $ac_hdr that defines DIR" >&5
18941 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18942 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18943   echo $ECHO_N "(cached) $ECHO_C" >&6
18944 else
18945   cat >"conftest.$ac_ext" <<_ACEOF
18946 #line 18946 "configure"
18947 #include "confdefs.h"
18948 #include <sys/types.h>
18949 #include <$ac_hdr>
18950
18951 int
18952 main (void)
18953 {
18954 if ((DIR *) 0)
18955 return 0;
18956   ;
18957   return 0;
18958 }
18959 _ACEOF
18960 rm -f "conftest.$ac_objext"
18961 if { (eval echo "$as_me:18961: \"$ac_compile\"") >&5
18962   (eval $ac_compile) 2>&5
18963   ac_status=$?
18964   echo "$as_me:18964: \$? = $ac_status" >&5
18965   (exit "$ac_status"); } &&
18966          { ac_try='test -s "conftest.$ac_objext"'
18967   { (eval echo "$as_me:18967: \"$ac_try\"") >&5
18968   (eval $ac_try) 2>&5
18969   ac_status=$?
18970   echo "$as_me:18970: \$? = $ac_status" >&5
18971   (exit "$ac_status"); }; }; then
18972   eval "$as_ac_Header=yes"
18973 else
18974   echo "$as_me: failed program was:" >&5
18975 cat "conftest.$ac_ext" >&5
18976 eval "$as_ac_Header=no"
18977 fi
18978 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18979 fi
18980 echo "$as_me:18980: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18981 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18982 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18983   cat >>confdefs.h <<EOF
18984 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18985 EOF
18986
18987 ac_header_dirent=$ac_hdr; break
18988 fi
18989
18990 done
18991 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18992 if test $ac_header_dirent = dirent.h; then
18993   echo "$as_me:18993: checking for opendir in -ldir" >&5
18994 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18995 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18996   echo $ECHO_N "(cached) $ECHO_C" >&6
18997 else
18998   ac_check_lib_save_LIBS=$LIBS
18999 LIBS="-ldir  $LIBS"
19000 cat >"conftest.$ac_ext" <<_ACEOF
19001 #line 19001 "configure"
19002 #include "confdefs.h"
19003
19004 /* Override any gcc2 internal prototype to avoid an error.  */
19005 #ifdef __cplusplus
19006 extern "C"
19007 #endif
19008 /* We use char because int might match the return type of a gcc2
19009    builtin and then its argument prototype would still apply.  */
19010 char opendir ();
19011 int
19012 main (void)
19013 {
19014 opendir ();
19015   ;
19016   return 0;
19017 }
19018 _ACEOF
19019 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19020 if { (eval echo "$as_me:19020: \"$ac_link\"") >&5
19021   (eval $ac_link) 2>&5
19022   ac_status=$?
19023   echo "$as_me:19023: \$? = $ac_status" >&5
19024   (exit "$ac_status"); } &&
19025          { ac_try='test -s "conftest$ac_exeext"'
19026   { (eval echo "$as_me:19026: \"$ac_try\"") >&5
19027   (eval $ac_try) 2>&5
19028   ac_status=$?
19029   echo "$as_me:19029: \$? = $ac_status" >&5
19030   (exit "$ac_status"); }; }; then
19031   ac_cv_lib_dir_opendir=yes
19032 else
19033   echo "$as_me: failed program was:" >&5
19034 cat "conftest.$ac_ext" >&5
19035 ac_cv_lib_dir_opendir=no
19036 fi
19037 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19038 LIBS=$ac_check_lib_save_LIBS
19039 fi
19040 echo "$as_me:19040: result: $ac_cv_lib_dir_opendir" >&5
19041 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
19042 if test "$ac_cv_lib_dir_opendir" = yes; then
19043   LIBS="$LIBS -ldir"
19044 fi
19045
19046 else
19047   echo "$as_me:19047: checking for opendir in -lx" >&5
19048 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
19049 if test "${ac_cv_lib_x_opendir+set}" = set; then
19050   echo $ECHO_N "(cached) $ECHO_C" >&6
19051 else
19052   ac_check_lib_save_LIBS=$LIBS
19053 LIBS="-lx  $LIBS"
19054 cat >"conftest.$ac_ext" <<_ACEOF
19055 #line 19055 "configure"
19056 #include "confdefs.h"
19057
19058 /* Override any gcc2 internal prototype to avoid an error.  */
19059 #ifdef __cplusplus
19060 extern "C"
19061 #endif
19062 /* We use char because int might match the return type of a gcc2
19063    builtin and then its argument prototype would still apply.  */
19064 char opendir ();
19065 int
19066 main (void)
19067 {
19068 opendir ();
19069   ;
19070   return 0;
19071 }
19072 _ACEOF
19073 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19074 if { (eval echo "$as_me:19074: \"$ac_link\"") >&5
19075   (eval $ac_link) 2>&5
19076   ac_status=$?
19077   echo "$as_me:19077: \$? = $ac_status" >&5
19078   (exit "$ac_status"); } &&
19079          { ac_try='test -s "conftest$ac_exeext"'
19080   { (eval echo "$as_me:19080: \"$ac_try\"") >&5
19081   (eval $ac_try) 2>&5
19082   ac_status=$?
19083   echo "$as_me:19083: \$? = $ac_status" >&5
19084   (exit "$ac_status"); }; }; then
19085   ac_cv_lib_x_opendir=yes
19086 else
19087   echo "$as_me: failed program was:" >&5
19088 cat "conftest.$ac_ext" >&5
19089 ac_cv_lib_x_opendir=no
19090 fi
19091 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19092 LIBS=$ac_check_lib_save_LIBS
19093 fi
19094 echo "$as_me:19094: result: $ac_cv_lib_x_opendir" >&5
19095 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
19096 if test "$ac_cv_lib_x_opendir" = yes; then
19097   LIBS="$LIBS -lx"
19098 fi
19099
19100 fi
19101
19102 echo "$as_me:19102: checking whether time.h and sys/time.h may both be included" >&5
19103 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19104 if test "${ac_cv_header_time+set}" = set; then
19105   echo $ECHO_N "(cached) $ECHO_C" >&6
19106 else
19107   cat >"conftest.$ac_ext" <<_ACEOF
19108 #line 19108 "configure"
19109 #include "confdefs.h"
19110 #include <sys/types.h>
19111 #include <sys/time.h>
19112 #include <time.h>
19113
19114 int
19115 main (void)
19116 {
19117 if ((struct tm *) 0)
19118 return 0;
19119   ;
19120   return 0;
19121 }
19122 _ACEOF
19123 rm -f "conftest.$ac_objext"
19124 if { (eval echo "$as_me:19124: \"$ac_compile\"") >&5
19125   (eval $ac_compile) 2>&5
19126   ac_status=$?
19127   echo "$as_me:19127: \$? = $ac_status" >&5
19128   (exit "$ac_status"); } &&
19129          { ac_try='test -s "conftest.$ac_objext"'
19130   { (eval echo "$as_me:19130: \"$ac_try\"") >&5
19131   (eval $ac_try) 2>&5
19132   ac_status=$?
19133   echo "$as_me:19133: \$? = $ac_status" >&5
19134   (exit "$ac_status"); }; }; then
19135   ac_cv_header_time=yes
19136 else
19137   echo "$as_me: failed program was:" >&5
19138 cat "conftest.$ac_ext" >&5
19139 ac_cv_header_time=no
19140 fi
19141 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19142 fi
19143 echo "$as_me:19143: result: $ac_cv_header_time" >&5
19144 echo "${ECHO_T}$ac_cv_header_time" >&6
19145 if test $ac_cv_header_time = yes; then
19146
19147 cat >>confdefs.h <<\EOF
19148 #define TIME_WITH_SYS_TIME 1
19149 EOF
19150
19151 fi
19152
19153 cf_regex_func=no
19154 cf_regex_libs=
19155 case "$host_os" in
19156 (mingw*)
19157         # -lsystre -ltre -lintl -liconv
19158         echo "$as_me:19158: checking for regcomp in -lsystre" >&5
19159 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19160 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19161   echo $ECHO_N "(cached) $ECHO_C" >&6
19162 else
19163   ac_check_lib_save_LIBS=$LIBS
19164 LIBS="-lsystre  $LIBS"
19165 cat >"conftest.$ac_ext" <<_ACEOF
19166 #line 19166 "configure"
19167 #include "confdefs.h"
19168
19169 /* Override any gcc2 internal prototype to avoid an error.  */
19170 #ifdef __cplusplus
19171 extern "C"
19172 #endif
19173 /* We use char because int might match the return type of a gcc2
19174    builtin and then its argument prototype would still apply.  */
19175 char regcomp ();
19176 int
19177 main (void)
19178 {
19179 regcomp ();
19180   ;
19181   return 0;
19182 }
19183 _ACEOF
19184 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19185 if { (eval echo "$as_me:19185: \"$ac_link\"") >&5
19186   (eval $ac_link) 2>&5
19187   ac_status=$?
19188   echo "$as_me:19188: \$? = $ac_status" >&5
19189   (exit "$ac_status"); } &&
19190          { ac_try='test -s "conftest$ac_exeext"'
19191   { (eval echo "$as_me:19191: \"$ac_try\"") >&5
19192   (eval $ac_try) 2>&5
19193   ac_status=$?
19194   echo "$as_me:19194: \$? = $ac_status" >&5
19195   (exit "$ac_status"); }; }; then
19196   ac_cv_lib_systre_regcomp=yes
19197 else
19198   echo "$as_me: failed program was:" >&5
19199 cat "conftest.$ac_ext" >&5
19200 ac_cv_lib_systre_regcomp=no
19201 fi
19202 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19203 LIBS=$ac_check_lib_save_LIBS
19204 fi
19205 echo "$as_me:19205: result: $ac_cv_lib_systre_regcomp" >&5
19206 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19207 if test "$ac_cv_lib_systre_regcomp" = yes; then
19208
19209                 echo "$as_me:19209: checking for libiconv_open in -liconv" >&5
19210 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19211 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19212   echo $ECHO_N "(cached) $ECHO_C" >&6
19213 else
19214   ac_check_lib_save_LIBS=$LIBS
19215 LIBS="-liconv  $LIBS"
19216 cat >"conftest.$ac_ext" <<_ACEOF
19217 #line 19217 "configure"
19218 #include "confdefs.h"
19219
19220 /* Override any gcc2 internal prototype to avoid an error.  */
19221 #ifdef __cplusplus
19222 extern "C"
19223 #endif
19224 /* We use char because int might match the return type of a gcc2
19225    builtin and then its argument prototype would still apply.  */
19226 char libiconv_open ();
19227 int
19228 main (void)
19229 {
19230 libiconv_open ();
19231   ;
19232   return 0;
19233 }
19234 _ACEOF
19235 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19236 if { (eval echo "$as_me:19236: \"$ac_link\"") >&5
19237   (eval $ac_link) 2>&5
19238   ac_status=$?
19239   echo "$as_me:19239: \$? = $ac_status" >&5
19240   (exit "$ac_status"); } &&
19241          { ac_try='test -s "conftest$ac_exeext"'
19242   { (eval echo "$as_me:19242: \"$ac_try\"") >&5
19243   (eval $ac_try) 2>&5
19244   ac_status=$?
19245   echo "$as_me:19245: \$? = $ac_status" >&5
19246   (exit "$ac_status"); }; }; then
19247   ac_cv_lib_iconv_libiconv_open=yes
19248 else
19249   echo "$as_me: failed program was:" >&5
19250 cat "conftest.$ac_ext" >&5
19251 ac_cv_lib_iconv_libiconv_open=no
19252 fi
19253 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19254 LIBS=$ac_check_lib_save_LIBS
19255 fi
19256 echo "$as_me:19256: result: $ac_cv_lib_iconv_libiconv_open" >&5
19257 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19258 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19259
19260 cf_add_libs="$LIBS"
19261 # reverse order
19262 cf_add_0lib=
19263 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19264 # filter duplicates
19265 for cf_add_1lib in $cf_add_0lib; do
19266         for cf_add_2lib in $cf_add_libs; do
19267                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19268                         cf_add_1lib=
19269                         break
19270                 fi
19271         done
19272         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19273 done
19274 LIBS="$cf_add_libs"
19275
19276 fi
19277
19278                 echo "$as_me:19278: checking for libintl_gettext in -lintl" >&5
19279 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19280 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19281   echo $ECHO_N "(cached) $ECHO_C" >&6
19282 else
19283   ac_check_lib_save_LIBS=$LIBS
19284 LIBS="-lintl  $LIBS"
19285 cat >"conftest.$ac_ext" <<_ACEOF
19286 #line 19286 "configure"
19287 #include "confdefs.h"
19288
19289 /* Override any gcc2 internal prototype to avoid an error.  */
19290 #ifdef __cplusplus
19291 extern "C"
19292 #endif
19293 /* We use char because int might match the return type of a gcc2
19294    builtin and then its argument prototype would still apply.  */
19295 char libintl_gettext ();
19296 int
19297 main (void)
19298 {
19299 libintl_gettext ();
19300   ;
19301   return 0;
19302 }
19303 _ACEOF
19304 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19305 if { (eval echo "$as_me:19305: \"$ac_link\"") >&5
19306   (eval $ac_link) 2>&5
19307   ac_status=$?
19308   echo "$as_me:19308: \$? = $ac_status" >&5
19309   (exit "$ac_status"); } &&
19310          { ac_try='test -s "conftest$ac_exeext"'
19311   { (eval echo "$as_me:19311: \"$ac_try\"") >&5
19312   (eval $ac_try) 2>&5
19313   ac_status=$?
19314   echo "$as_me:19314: \$? = $ac_status" >&5
19315   (exit "$ac_status"); }; }; then
19316   ac_cv_lib_intl_libintl_gettext=yes
19317 else
19318   echo "$as_me: failed program was:" >&5
19319 cat "conftest.$ac_ext" >&5
19320 ac_cv_lib_intl_libintl_gettext=no
19321 fi
19322 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19323 LIBS=$ac_check_lib_save_LIBS
19324 fi
19325 echo "$as_me:19325: result: $ac_cv_lib_intl_libintl_gettext" >&5
19326 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19327 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19328
19329 cf_add_libs="$LIBS"
19330 # reverse order
19331 cf_add_0lib=
19332 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19333 # filter duplicates
19334 for cf_add_1lib in $cf_add_0lib; do
19335         for cf_add_2lib in $cf_add_libs; do
19336                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19337                         cf_add_1lib=
19338                         break
19339                 fi
19340         done
19341         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19342 done
19343 LIBS="$cf_add_libs"
19344
19345 fi
19346
19347                 echo "$as_me:19347: checking for tre_regcomp in -ltre" >&5
19348 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19349 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19350   echo $ECHO_N "(cached) $ECHO_C" >&6
19351 else
19352   ac_check_lib_save_LIBS=$LIBS
19353 LIBS="-ltre  $LIBS"
19354 cat >"conftest.$ac_ext" <<_ACEOF
19355 #line 19355 "configure"
19356 #include "confdefs.h"
19357
19358 /* Override any gcc2 internal prototype to avoid an error.  */
19359 #ifdef __cplusplus
19360 extern "C"
19361 #endif
19362 /* We use char because int might match the return type of a gcc2
19363    builtin and then its argument prototype would still apply.  */
19364 char tre_regcomp ();
19365 int
19366 main (void)
19367 {
19368 tre_regcomp ();
19369   ;
19370   return 0;
19371 }
19372 _ACEOF
19373 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19374 if { (eval echo "$as_me:19374: \"$ac_link\"") >&5
19375   (eval $ac_link) 2>&5
19376   ac_status=$?
19377   echo "$as_me:19377: \$? = $ac_status" >&5
19378   (exit "$ac_status"); } &&
19379          { ac_try='test -s "conftest$ac_exeext"'
19380   { (eval echo "$as_me:19380: \"$ac_try\"") >&5
19381   (eval $ac_try) 2>&5
19382   ac_status=$?
19383   echo "$as_me:19383: \$? = $ac_status" >&5
19384   (exit "$ac_status"); }; }; then
19385   ac_cv_lib_tre_tre_regcomp=yes
19386 else
19387   echo "$as_me: failed program was:" >&5
19388 cat "conftest.$ac_ext" >&5
19389 ac_cv_lib_tre_tre_regcomp=no
19390 fi
19391 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19392 LIBS=$ac_check_lib_save_LIBS
19393 fi
19394 echo "$as_me:19394: result: $ac_cv_lib_tre_tre_regcomp" >&5
19395 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19396 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19397
19398 cf_add_libs="$LIBS"
19399 # reverse order
19400 cf_add_0lib=
19401 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19402 # filter duplicates
19403 for cf_add_1lib in $cf_add_0lib; do
19404         for cf_add_2lib in $cf_add_libs; do
19405                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19406                         cf_add_1lib=
19407                         break
19408                 fi
19409         done
19410         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19411 done
19412 LIBS="$cf_add_libs"
19413
19414 fi
19415
19416 cf_add_libs="$LIBS"
19417 # reverse order
19418 cf_add_0lib=
19419 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19420 # filter duplicates
19421 for cf_add_1lib in $cf_add_0lib; do
19422         for cf_add_2lib in $cf_add_libs; do
19423                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19424                         cf_add_1lib=
19425                         break
19426                 fi
19427         done
19428         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19429 done
19430 LIBS="$cf_add_libs"
19431
19432                 cf_regex_func=regcomp
19433
19434 else
19435
19436                 echo "$as_me:19436: checking for regcomp in -lgnurx" >&5
19437 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19438 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19439   echo $ECHO_N "(cached) $ECHO_C" >&6
19440 else
19441   ac_check_lib_save_LIBS=$LIBS
19442 LIBS="-lgnurx  $LIBS"
19443 cat >"conftest.$ac_ext" <<_ACEOF
19444 #line 19444 "configure"
19445 #include "confdefs.h"
19446
19447 /* Override any gcc2 internal prototype to avoid an error.  */
19448 #ifdef __cplusplus
19449 extern "C"
19450 #endif
19451 /* We use char because int might match the return type of a gcc2
19452    builtin and then its argument prototype would still apply.  */
19453 char regcomp ();
19454 int
19455 main (void)
19456 {
19457 regcomp ();
19458   ;
19459   return 0;
19460 }
19461 _ACEOF
19462 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19463 if { (eval echo "$as_me:19463: \"$ac_link\"") >&5
19464   (eval $ac_link) 2>&5
19465   ac_status=$?
19466   echo "$as_me:19466: \$? = $ac_status" >&5
19467   (exit "$ac_status"); } &&
19468          { ac_try='test -s "conftest$ac_exeext"'
19469   { (eval echo "$as_me:19469: \"$ac_try\"") >&5
19470   (eval $ac_try) 2>&5
19471   ac_status=$?
19472   echo "$as_me:19472: \$? = $ac_status" >&5
19473   (exit "$ac_status"); }; }; then
19474   ac_cv_lib_gnurx_regcomp=yes
19475 else
19476   echo "$as_me: failed program was:" >&5
19477 cat "conftest.$ac_ext" >&5
19478 ac_cv_lib_gnurx_regcomp=no
19479 fi
19480 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19481 LIBS=$ac_check_lib_save_LIBS
19482 fi
19483 echo "$as_me:19483: result: $ac_cv_lib_gnurx_regcomp" >&5
19484 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19485 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19486
19487 cf_add_libs="$LIBS"
19488 # reverse order
19489 cf_add_0lib=
19490 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19491 # filter duplicates
19492 for cf_add_1lib in $cf_add_0lib; do
19493         for cf_add_2lib in $cf_add_libs; do
19494                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19495                         cf_add_1lib=
19496                         break
19497                 fi
19498         done
19499         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19500 done
19501 LIBS="$cf_add_libs"
19502
19503                         cf_regex_func=regcomp
19504 fi
19505
19506 fi
19507
19508         ;;
19509 (*)
19510         cf_regex_libs="regex re"
19511         echo "$as_me:19511: checking for regcomp" >&5
19512 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19513 if test "${ac_cv_func_regcomp+set}" = set; then
19514   echo $ECHO_N "(cached) $ECHO_C" >&6
19515 else
19516   cat >"conftest.$ac_ext" <<_ACEOF
19517 #line 19517 "configure"
19518 #include "confdefs.h"
19519 #define regcomp autoconf_temporary
19520 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19521 #undef regcomp
19522
19523 #ifdef __cplusplus
19524 extern "C"
19525 #endif
19526
19527 /* We use char because int might match the return type of a gcc2
19528    builtin and then its argument prototype would still apply.  */
19529 char regcomp (void);
19530
19531 int
19532 main (void)
19533 {
19534
19535 /* The GNU C library defines stubs for functions which it implements
19536     to always fail with ENOSYS.  Some functions are actually named
19537     something starting with __ and the normal name is an alias.  */
19538 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19539 #error found stub for regcomp
19540 #endif
19541
19542         return regcomp ();
19543   ;
19544   return 0;
19545 }
19546 _ACEOF
19547 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19548 if { (eval echo "$as_me:19548: \"$ac_link\"") >&5
19549   (eval $ac_link) 2>&5
19550   ac_status=$?
19551   echo "$as_me:19551: \$? = $ac_status" >&5
19552   (exit "$ac_status"); } &&
19553          { ac_try='test -s "conftest$ac_exeext"'
19554   { (eval echo "$as_me:19554: \"$ac_try\"") >&5
19555   (eval $ac_try) 2>&5
19556   ac_status=$?
19557   echo "$as_me:19557: \$? = $ac_status" >&5
19558   (exit "$ac_status"); }; }; then
19559   ac_cv_func_regcomp=yes
19560 else
19561   echo "$as_me: failed program was:" >&5
19562 cat "conftest.$ac_ext" >&5
19563 ac_cv_func_regcomp=no
19564 fi
19565 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19566 fi
19567 echo "$as_me:19567: result: $ac_cv_func_regcomp" >&5
19568 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19569 if test "$ac_cv_func_regcomp" = yes; then
19570   cf_regex_func=regcomp
19571 else
19572
19573                 for cf_regex_lib in $cf_regex_libs
19574                 do
19575                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19576 echo "$as_me:19576: checking for regcomp in -l$cf_regex_lib" >&5
19577 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19578 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19579   echo $ECHO_N "(cached) $ECHO_C" >&6
19580 else
19581   ac_check_lib_save_LIBS=$LIBS
19582 LIBS="-l$cf_regex_lib  $LIBS"
19583 cat >"conftest.$ac_ext" <<_ACEOF
19584 #line 19584 "configure"
19585 #include "confdefs.h"
19586
19587 /* Override any gcc2 internal prototype to avoid an error.  */
19588 #ifdef __cplusplus
19589 extern "C"
19590 #endif
19591 /* We use char because int might match the return type of a gcc2
19592    builtin and then its argument prototype would still apply.  */
19593 char regcomp ();
19594 int
19595 main (void)
19596 {
19597 regcomp ();
19598   ;
19599   return 0;
19600 }
19601 _ACEOF
19602 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19603 if { (eval echo "$as_me:19603: \"$ac_link\"") >&5
19604   (eval $ac_link) 2>&5
19605   ac_status=$?
19606   echo "$as_me:19606: \$? = $ac_status" >&5
19607   (exit "$ac_status"); } &&
19608          { ac_try='test -s "conftest$ac_exeext"'
19609   { (eval echo "$as_me:19609: \"$ac_try\"") >&5
19610   (eval $ac_try) 2>&5
19611   ac_status=$?
19612   echo "$as_me:19612: \$? = $ac_status" >&5
19613   (exit "$ac_status"); }; }; then
19614   eval "$as_ac_Lib=yes"
19615 else
19616   echo "$as_me: failed program was:" >&5
19617 cat "conftest.$ac_ext" >&5
19618 eval "$as_ac_Lib=no"
19619 fi
19620 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19621 LIBS=$ac_check_lib_save_LIBS
19622 fi
19623 echo "$as_me:19623: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19624 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19625 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19626
19627 cf_add_libs="$LIBS"
19628 # reverse order
19629 cf_add_0lib=
19630 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19631 # filter duplicates
19632 for cf_add_1lib in $cf_add_0lib; do
19633         for cf_add_2lib in $cf_add_libs; do
19634                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19635                         cf_add_1lib=
19636                         break
19637                 fi
19638         done
19639         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19640 done
19641 LIBS="$cf_add_libs"
19642
19643                                         cf_regex_func=regcomp
19644                                         break
19645 fi
19646
19647                 done
19648
19649 fi
19650
19651         ;;
19652 esac
19653
19654 if test "$cf_regex_func" = no ; then
19655         echo "$as_me:19655: checking for compile" >&5
19656 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19657 if test "${ac_cv_func_compile+set}" = set; then
19658   echo $ECHO_N "(cached) $ECHO_C" >&6
19659 else
19660   cat >"conftest.$ac_ext" <<_ACEOF
19661 #line 19661 "configure"
19662 #include "confdefs.h"
19663 #define compile autoconf_temporary
19664 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19665 #undef compile
19666
19667 #ifdef __cplusplus
19668 extern "C"
19669 #endif
19670
19671 /* We use char because int might match the return type of a gcc2
19672    builtin and then its argument prototype would still apply.  */
19673 char compile (void);
19674
19675 int
19676 main (void)
19677 {
19678
19679 /* The GNU C library defines stubs for functions which it implements
19680     to always fail with ENOSYS.  Some functions are actually named
19681     something starting with __ and the normal name is an alias.  */
19682 #if defined (__stub_compile) || defined (__stub___compile)
19683 #error found stub for compile
19684 #endif
19685
19686         return compile ();
19687   ;
19688   return 0;
19689 }
19690 _ACEOF
19691 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19692 if { (eval echo "$as_me:19692: \"$ac_link\"") >&5
19693   (eval $ac_link) 2>&5
19694   ac_status=$?
19695   echo "$as_me:19695: \$? = $ac_status" >&5
19696   (exit "$ac_status"); } &&
19697          { ac_try='test -s "conftest$ac_exeext"'
19698   { (eval echo "$as_me:19698: \"$ac_try\"") >&5
19699   (eval $ac_try) 2>&5
19700   ac_status=$?
19701   echo "$as_me:19701: \$? = $ac_status" >&5
19702   (exit "$ac_status"); }; }; then
19703   ac_cv_func_compile=yes
19704 else
19705   echo "$as_me: failed program was:" >&5
19706 cat "conftest.$ac_ext" >&5
19707 ac_cv_func_compile=no
19708 fi
19709 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19710 fi
19711 echo "$as_me:19711: result: $ac_cv_func_compile" >&5
19712 echo "${ECHO_T}$ac_cv_func_compile" >&6
19713 if test "$ac_cv_func_compile" = yes; then
19714   cf_regex_func=compile
19715 else
19716
19717                 echo "$as_me:19717: checking for compile in -lgen" >&5
19718 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19719 if test "${ac_cv_lib_gen_compile+set}" = set; then
19720   echo $ECHO_N "(cached) $ECHO_C" >&6
19721 else
19722   ac_check_lib_save_LIBS=$LIBS
19723 LIBS="-lgen  $LIBS"
19724 cat >"conftest.$ac_ext" <<_ACEOF
19725 #line 19725 "configure"
19726 #include "confdefs.h"
19727
19728 /* Override any gcc2 internal prototype to avoid an error.  */
19729 #ifdef __cplusplus
19730 extern "C"
19731 #endif
19732 /* We use char because int might match the return type of a gcc2
19733    builtin and then its argument prototype would still apply.  */
19734 char compile ();
19735 int
19736 main (void)
19737 {
19738 compile ();
19739   ;
19740   return 0;
19741 }
19742 _ACEOF
19743 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19744 if { (eval echo "$as_me:19744: \"$ac_link\"") >&5
19745   (eval $ac_link) 2>&5
19746   ac_status=$?
19747   echo "$as_me:19747: \$? = $ac_status" >&5
19748   (exit "$ac_status"); } &&
19749          { ac_try='test -s "conftest$ac_exeext"'
19750   { (eval echo "$as_me:19750: \"$ac_try\"") >&5
19751   (eval $ac_try) 2>&5
19752   ac_status=$?
19753   echo "$as_me:19753: \$? = $ac_status" >&5
19754   (exit "$ac_status"); }; }; then
19755   ac_cv_lib_gen_compile=yes
19756 else
19757   echo "$as_me: failed program was:" >&5
19758 cat "conftest.$ac_ext" >&5
19759 ac_cv_lib_gen_compile=no
19760 fi
19761 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19762 LIBS=$ac_check_lib_save_LIBS
19763 fi
19764 echo "$as_me:19764: result: $ac_cv_lib_gen_compile" >&5
19765 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19766 if test "$ac_cv_lib_gen_compile" = yes; then
19767
19768 cf_add_libs="$LIBS"
19769 # reverse order
19770 cf_add_0lib=
19771 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19772 # filter duplicates
19773 for cf_add_1lib in $cf_add_0lib; do
19774         for cf_add_2lib in $cf_add_libs; do
19775                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19776                         cf_add_1lib=
19777                         break
19778                 fi
19779         done
19780         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19781 done
19782 LIBS="$cf_add_libs"
19783
19784                                 cf_regex_func=compile
19785 fi
19786
19787 fi
19788
19789 fi
19790
19791 if test "$cf_regex_func" = no ; then
19792         { echo "$as_me:19792: WARNING: cannot find regular expression library" >&5
19793 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19794 fi
19795
19796 echo "$as_me:19796: checking for regular-expression headers" >&5
19797 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19798 if test "${cf_cv_regex_hdrs+set}" = set; then
19799   echo $ECHO_N "(cached) $ECHO_C" >&6
19800 else
19801
19802 cf_cv_regex_hdrs=no
19803 case "$cf_regex_func" in
19804 (compile)
19805         for cf_regex_hdr in regexp.h regexpr.h
19806         do
19807                 cat >"conftest.$ac_ext" <<_ACEOF
19808 #line 19808 "configure"
19809 #include "confdefs.h"
19810 #include <$cf_regex_hdr>
19811 int
19812 main (void)
19813 {
19814
19815                         char *p = compile("", "", "", 0);
19816                         int x = step("", "");
19817                         (void)p;
19818                         (void)x;
19819
19820   ;
19821   return 0;
19822 }
19823 _ACEOF
19824 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19825 if { (eval echo "$as_me:19825: \"$ac_link\"") >&5
19826   (eval $ac_link) 2>&5
19827   ac_status=$?
19828   echo "$as_me:19828: \$? = $ac_status" >&5
19829   (exit "$ac_status"); } &&
19830          { ac_try='test -s "conftest$ac_exeext"'
19831   { (eval echo "$as_me:19831: \"$ac_try\"") >&5
19832   (eval $ac_try) 2>&5
19833   ac_status=$?
19834   echo "$as_me:19834: \$? = $ac_status" >&5
19835   (exit "$ac_status"); }; }; then
19836
19837                         cf_cv_regex_hdrs=$cf_regex_hdr
19838                         break
19839
19840 else
19841   echo "$as_me: failed program was:" >&5
19842 cat "conftest.$ac_ext" >&5
19843 fi
19844 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19845         done
19846         ;;
19847 (*)
19848         for cf_regex_hdr in regex.h
19849         do
19850                 cat >"conftest.$ac_ext" <<_ACEOF
19851 #line 19851 "configure"
19852 #include "confdefs.h"
19853 #include <sys/types.h>
19854 #include <$cf_regex_hdr>
19855 int
19856 main (void)
19857 {
19858
19859                         regex_t *p = 0;
19860                         int x = regcomp(p, "", 0);
19861                         int y = regexec(p, "", 0, 0, 0);
19862                         (void)x;
19863                         (void)y;
19864                         regfree(p);
19865
19866   ;
19867   return 0;
19868 }
19869 _ACEOF
19870 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19871 if { (eval echo "$as_me:19871: \"$ac_link\"") >&5
19872   (eval $ac_link) 2>&5
19873   ac_status=$?
19874   echo "$as_me:19874: \$? = $ac_status" >&5
19875   (exit "$ac_status"); } &&
19876          { ac_try='test -s "conftest$ac_exeext"'
19877   { (eval echo "$as_me:19877: \"$ac_try\"") >&5
19878   (eval $ac_try) 2>&5
19879   ac_status=$?
19880   echo "$as_me:19880: \$? = $ac_status" >&5
19881   (exit "$ac_status"); }; }; then
19882
19883                         cf_cv_regex_hdrs=$cf_regex_hdr
19884                         break
19885
19886 else
19887   echo "$as_me: failed program was:" >&5
19888 cat "conftest.$ac_ext" >&5
19889 fi
19890 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19891         done
19892         ;;
19893 esac
19894
19895 fi
19896 echo "$as_me:19896: result: $cf_cv_regex_hdrs" >&5
19897 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19898
19899 case "$cf_cv_regex_hdrs" in
19900         (no)            { echo "$as_me:19900: WARNING: no regular expression header found" >&5
19901 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19902         (regex.h)
19903 cat >>confdefs.h <<\EOF
19904 #define HAVE_REGEX_H_FUNCS 1
19905 EOF
19906  ;;
19907         (regexp.h)
19908 cat >>confdefs.h <<\EOF
19909 #define HAVE_REGEXP_H_FUNCS 1
19910 EOF
19911  ;;
19912         (regexpr.h)
19913 cat >>confdefs.h <<\EOF
19914 #define HAVE_REGEXPR_H_FUNCS 1
19915 EOF
19916  ;;
19917 esac
19918
19919 for ac_header in \
19920 fcntl.h \
19921 getopt.h \
19922 limits.h \
19923 locale.h \
19924 math.h \
19925 poll.h \
19926 sys/ioctl.h \
19927 sys/param.h \
19928 sys/poll.h \
19929 sys/select.h \
19930 sys/time.h \
19931 sys/times.h \
19932 ttyent.h \
19933 unistd.h \
19934 wctype.h \
19935
19936 do
19937 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19938 echo "$as_me:19938: checking for $ac_header" >&5
19939 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19940 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19941   echo $ECHO_N "(cached) $ECHO_C" >&6
19942 else
19943   cat >"conftest.$ac_ext" <<_ACEOF
19944 #line 19944 "configure"
19945 #include "confdefs.h"
19946 #include <$ac_header>
19947 _ACEOF
19948 if { (eval echo "$as_me:19948: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19949   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19950   ac_status=$?
19951   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19952   rm -f conftest.er1
19953   cat conftest.err >&5
19954   echo "$as_me:19954: \$? = $ac_status" >&5
19955   (exit "$ac_status"); } >/dev/null; then
19956   if test -s conftest.err; then
19957     ac_cpp_err=$ac_c_preproc_warn_flag
19958   else
19959     ac_cpp_err=
19960   fi
19961 else
19962   ac_cpp_err=yes
19963 fi
19964 if test -z "$ac_cpp_err"; then
19965   eval "$as_ac_Header=yes"
19966 else
19967   echo "$as_me: failed program was:" >&5
19968   cat "conftest.$ac_ext" >&5
19969   eval "$as_ac_Header=no"
19970 fi
19971 rm -f conftest.err "conftest.$ac_ext"
19972 fi
19973 echo "$as_me:19973: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19974 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19975 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19976   cat >>confdefs.h <<EOF
19977 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19978 EOF
19979
19980 fi
19981 done
19982
19983 for ac_header in unistd.h getopt.h
19984 do
19985 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19986 echo "$as_me:19986: checking for $ac_header" >&5
19987 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19988 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19989   echo $ECHO_N "(cached) $ECHO_C" >&6
19990 else
19991   cat >"conftest.$ac_ext" <<_ACEOF
19992 #line 19992 "configure"
19993 #include "confdefs.h"
19994 #include <$ac_header>
19995 _ACEOF
19996 if { (eval echo "$as_me:19996: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19997   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19998   ac_status=$?
19999   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20000   rm -f conftest.er1
20001   cat conftest.err >&5
20002   echo "$as_me:20002: \$? = $ac_status" >&5
20003   (exit "$ac_status"); } >/dev/null; then
20004   if test -s conftest.err; then
20005     ac_cpp_err=$ac_c_preproc_warn_flag
20006   else
20007     ac_cpp_err=
20008   fi
20009 else
20010   ac_cpp_err=yes
20011 fi
20012 if test -z "$ac_cpp_err"; then
20013   eval "$as_ac_Header=yes"
20014 else
20015   echo "$as_me: failed program was:" >&5
20016   cat "conftest.$ac_ext" >&5
20017   eval "$as_ac_Header=no"
20018 fi
20019 rm -f conftest.err "conftest.$ac_ext"
20020 fi
20021 echo "$as_me:20021: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20022 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20023 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20024   cat >>confdefs.h <<EOF
20025 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20026 EOF
20027
20028 fi
20029 done
20030
20031 echo "$as_me:20031: checking for header declaring getopt variables" >&5
20032 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20033 if test "${cf_cv_getopt_header+set}" = set; then
20034   echo $ECHO_N "(cached) $ECHO_C" >&6
20035 else
20036
20037 cf_cv_getopt_header=none
20038 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20039 do
20040 cat >"conftest.$ac_ext" <<_ACEOF
20041 #line 20041 "configure"
20042 #include "confdefs.h"
20043
20044 #include <$cf_header>
20045 int
20046 main (void)
20047 {
20048 int x = optind; char *y = optarg; (void)x; (void)y
20049   ;
20050   return 0;
20051 }
20052 _ACEOF
20053 rm -f "conftest.$ac_objext"
20054 if { (eval echo "$as_me:20054: \"$ac_compile\"") >&5
20055   (eval $ac_compile) 2>&5
20056   ac_status=$?
20057   echo "$as_me:20057: \$? = $ac_status" >&5
20058   (exit "$ac_status"); } &&
20059          { ac_try='test -s "conftest.$ac_objext"'
20060   { (eval echo "$as_me:20060: \"$ac_try\"") >&5
20061   (eval $ac_try) 2>&5
20062   ac_status=$?
20063   echo "$as_me:20063: \$? = $ac_status" >&5
20064   (exit "$ac_status"); }; }; then
20065   cf_cv_getopt_header=$cf_header
20066  break
20067 else
20068   echo "$as_me: failed program was:" >&5
20069 cat "conftest.$ac_ext" >&5
20070 fi
20071 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20072 done
20073
20074 fi
20075 echo "$as_me:20075: result: $cf_cv_getopt_header" >&5
20076 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20077 if test "$cf_cv_getopt_header" != none ; then
20078
20079 cat >>confdefs.h <<\EOF
20080 #define HAVE_GETOPT_HEADER 1
20081 EOF
20082
20083 fi
20084 if test "$cf_cv_getopt_header" = getopt.h ; then
20085
20086 cat >>confdefs.h <<\EOF
20087 #define NEED_GETOPT_H 1
20088 EOF
20089
20090 fi
20091
20092 echo "$as_me:20092: checking if external environ is declared" >&5
20093 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20094 if test "${cf_cv_dcl_environ+set}" = set; then
20095   echo $ECHO_N "(cached) $ECHO_C" >&6
20096 else
20097
20098     cat >"conftest.$ac_ext" <<_ACEOF
20099 #line 20099 "configure"
20100 #include "confdefs.h"
20101
20102 #ifdef HAVE_STDLIB_H
20103 #include <stdlib.h>
20104 #endif
20105 #include <unistd.h>
20106 int
20107 main (void)
20108 {
20109 int x = (int) environ
20110   ;
20111   return 0;
20112 }
20113 _ACEOF
20114 rm -f "conftest.$ac_objext"
20115 if { (eval echo "$as_me:20115: \"$ac_compile\"") >&5
20116   (eval $ac_compile) 2>&5
20117   ac_status=$?
20118   echo "$as_me:20118: \$? = $ac_status" >&5
20119   (exit "$ac_status"); } &&
20120          { ac_try='test -s "conftest.$ac_objext"'
20121   { (eval echo "$as_me:20121: \"$ac_try\"") >&5
20122   (eval $ac_try) 2>&5
20123   ac_status=$?
20124   echo "$as_me:20124: \$? = $ac_status" >&5
20125   (exit "$ac_status"); }; }; then
20126   cf_cv_dcl_environ=yes
20127 else
20128   echo "$as_me: failed program was:" >&5
20129 cat "conftest.$ac_ext" >&5
20130 cf_cv_dcl_environ=no
20131 fi
20132 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20133
20134 fi
20135 echo "$as_me:20135: result: $cf_cv_dcl_environ" >&5
20136 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20137
20138 if test "$cf_cv_dcl_environ" = no ; then
20139
20140 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20141
20142     cat >>confdefs.h <<EOF
20143 #define $cf_result 1
20144 EOF
20145
20146 fi
20147
20148 # It's possible (for near-UNIX clones) that the data doesn't exist
20149
20150 echo "$as_me:20150: checking if external environ exists" >&5
20151 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20152 if test "${cf_cv_have_environ+set}" = set; then
20153   echo $ECHO_N "(cached) $ECHO_C" >&6
20154 else
20155
20156         cat >"conftest.$ac_ext" <<_ACEOF
20157 #line 20157 "configure"
20158 #include "confdefs.h"
20159
20160 #undef environ
20161 extern int environ;
20162
20163 int
20164 main (void)
20165 {
20166 environ = 2
20167   ;
20168   return 0;
20169 }
20170 _ACEOF
20171 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20172 if { (eval echo "$as_me:20172: \"$ac_link\"") >&5
20173   (eval $ac_link) 2>&5
20174   ac_status=$?
20175   echo "$as_me:20175: \$? = $ac_status" >&5
20176   (exit "$ac_status"); } &&
20177          { ac_try='test -s "conftest$ac_exeext"'
20178   { (eval echo "$as_me:20178: \"$ac_try\"") >&5
20179   (eval $ac_try) 2>&5
20180   ac_status=$?
20181   echo "$as_me:20181: \$? = $ac_status" >&5
20182   (exit "$ac_status"); }; }; then
20183   cf_cv_have_environ=yes
20184 else
20185   echo "$as_me: failed program was:" >&5
20186 cat "conftest.$ac_ext" >&5
20187 cf_cv_have_environ=no
20188 fi
20189 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20190
20191 fi
20192 echo "$as_me:20192: result: $cf_cv_have_environ" >&5
20193 echo "${ECHO_T}$cf_cv_have_environ" >&6
20194
20195 if test "$cf_cv_have_environ" = yes ; then
20196
20197 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20198
20199         cat >>confdefs.h <<EOF
20200 #define $cf_result 1
20201 EOF
20202
20203 fi
20204
20205 echo "$as_me:20205: checking for getenv" >&5
20206 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20207 if test "${ac_cv_func_getenv+set}" = set; then
20208   echo $ECHO_N "(cached) $ECHO_C" >&6
20209 else
20210   cat >"conftest.$ac_ext" <<_ACEOF
20211 #line 20211 "configure"
20212 #include "confdefs.h"
20213 #define getenv autoconf_temporary
20214 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20215 #undef getenv
20216
20217 #ifdef __cplusplus
20218 extern "C"
20219 #endif
20220
20221 /* We use char because int might match the return type of a gcc2
20222    builtin and then its argument prototype would still apply.  */
20223 char getenv (void);
20224
20225 int
20226 main (void)
20227 {
20228
20229 /* The GNU C library defines stubs for functions which it implements
20230     to always fail with ENOSYS.  Some functions are actually named
20231     something starting with __ and the normal name is an alias.  */
20232 #if defined (__stub_getenv) || defined (__stub___getenv)
20233 #error found stub for getenv
20234 #endif
20235
20236         return getenv ();
20237   ;
20238   return 0;
20239 }
20240 _ACEOF
20241 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20242 if { (eval echo "$as_me:20242: \"$ac_link\"") >&5
20243   (eval $ac_link) 2>&5
20244   ac_status=$?
20245   echo "$as_me:20245: \$? = $ac_status" >&5
20246   (exit "$ac_status"); } &&
20247          { ac_try='test -s "conftest$ac_exeext"'
20248   { (eval echo "$as_me:20248: \"$ac_try\"") >&5
20249   (eval $ac_try) 2>&5
20250   ac_status=$?
20251   echo "$as_me:20251: \$? = $ac_status" >&5
20252   (exit "$ac_status"); }; }; then
20253   ac_cv_func_getenv=yes
20254 else
20255   echo "$as_me: failed program was:" >&5
20256 cat "conftest.$ac_ext" >&5
20257 ac_cv_func_getenv=no
20258 fi
20259 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20260 fi
20261 echo "$as_me:20261: result: $ac_cv_func_getenv" >&5
20262 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20263
20264 for ac_func in putenv setenv strdup
20265 do
20266 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20267 echo "$as_me:20267: checking for $ac_func" >&5
20268 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20269 if eval "test \"\${$as_ac_var+set}\" = set"; then
20270   echo $ECHO_N "(cached) $ECHO_C" >&6
20271 else
20272   cat >"conftest.$ac_ext" <<_ACEOF
20273 #line 20273 "configure"
20274 #include "confdefs.h"
20275 #define $ac_func autoconf_temporary
20276 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20277 #undef $ac_func
20278
20279 #ifdef __cplusplus
20280 extern "C"
20281 #endif
20282
20283 /* We use char because int might match the return type of a gcc2
20284    builtin and then its argument prototype would still apply.  */
20285 char $ac_func (void);
20286
20287 int
20288 main (void)
20289 {
20290
20291 /* The GNU C library defines stubs for functions which it implements
20292     to always fail with ENOSYS.  Some functions are actually named
20293     something starting with __ and the normal name is an alias.  */
20294 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20295 #error found stub for $ac_func
20296 #endif
20297
20298         return $ac_func ();
20299   ;
20300   return 0;
20301 }
20302 _ACEOF
20303 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20304 if { (eval echo "$as_me:20304: \"$ac_link\"") >&5
20305   (eval $ac_link) 2>&5
20306   ac_status=$?
20307   echo "$as_me:20307: \$? = $ac_status" >&5
20308   (exit "$ac_status"); } &&
20309          { ac_try='test -s "conftest$ac_exeext"'
20310   { (eval echo "$as_me:20310: \"$ac_try\"") >&5
20311   (eval $ac_try) 2>&5
20312   ac_status=$?
20313   echo "$as_me:20313: \$? = $ac_status" >&5
20314   (exit "$ac_status"); }; }; then
20315   eval "$as_ac_var=yes"
20316 else
20317   echo "$as_me: failed program was:" >&5
20318 cat "conftest.$ac_ext" >&5
20319 eval "$as_ac_var=no"
20320 fi
20321 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20322 fi
20323 echo "$as_me:20323: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20324 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20325 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20326   cat >>confdefs.h <<EOF
20327 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20328 EOF
20329
20330 fi
20331 done
20332
20333 echo "$as_me:20333: checking if getenv returns consistent values" >&5
20334 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20335 if test "${cf_cv_consistent_getenv+set}" = set; then
20336   echo $ECHO_N "(cached) $ECHO_C" >&6
20337 else
20338
20339 if test "$cross_compiling" = yes; then
20340   cf_cv_consistent_getenv=unknown
20341 else
20342   cat >"conftest.$ac_ext" <<_ACEOF
20343 #line 20343 "configure"
20344 #include "confdefs.h"
20345
20346 #include <stdlib.h>
20347 #include <unistd.h>
20348 #include <stdio.h>
20349 #include <string.h>
20350 #include <sys/types.h>
20351
20352 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20353 extern char **environ;  /* POSIX, but some systems are not... */
20354 #endif
20355
20356 #if defined(HAVE_STRDUP)
20357 #define str_alloc(s) strdup(s)
20358 #else
20359 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20360 #endif
20361
20362 static void set_value(const char *name, const char *value)
20363 {
20364 #if defined(HAVE_SETENV)
20365         setenv(name, value, 1);
20366 #elif defined(HAVE_PUTENV)
20367         char buffer[1024];
20368         sprintf(buffer, "%s=%s", name, value);
20369         putenv(str_alloc(buffer));
20370 #else
20371 #error neither putenv/setenv found
20372 #endif
20373 }
20374 int main(void)
20375 {
20376         int pass;
20377         size_t numenv, limit, j;
20378         char **mynames;
20379         char **myvalues;
20380         char **mypointer;
20381         char *equals;
20382         for (numenv = 0; environ[numenv]; ++numenv) ;
20383         limit = numenv + 10;
20384         mynames = (char **) calloc(limit + 1, sizeof(char *));
20385         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20386         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20387 #if defined(HAVE_ENVIRON)
20388         for (j = 0; environ[j]; ++j) {
20389                 mynames[j] = str_alloc(environ[j]);
20390                 equals = strchr(mynames[j], '=');
20391                 if (equals != 0) {
20392                         *equals++ = '\\0';
20393                         myvalues[j] = str_alloc(equals);
20394                 } else {
20395                         myvalues[j] = str_alloc("");
20396                 }
20397         }
20398 #endif
20399         for (j = numenv; j < limit; ++j) {
20400                 char name[80];
20401                 char value[80];
20402                 size_t found;
20403                 size_t k = 0;
20404                 do {
20405                         size_t jk;
20406                         found = 0;
20407                         sprintf(name, "TERM%lu", (unsigned long) k);
20408                         for (jk = 0; jk < j; ++jk) {
20409                                 if (!strcmp(name, mynames[jk])) {
20410                                         found = 1;
20411                                         ++k;
20412                                         break;
20413                                 }
20414                         }
20415                 } while (found);
20416                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20417                 set_value(name, value);
20418                 mynames[j] = str_alloc(name);
20419                 myvalues[j] = str_alloc(value);
20420         }
20421         for (pass = 0; pass < 3; ++pass) {
20422                 for (j = 0; j < limit; ++j) {
20423                         char *value = getenv(mynames[j]);
20424                         if (pass) {
20425                                 if (value == 0) {
20426                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20427                                         ${cf_cv_main_return:-return}(1);
20428                                 } else if (value != mypointer[j]) {
20429                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20430                                         ${cf_cv_main_return:-return}(1);
20431                                 } else if (strcmp(value, myvalues[j])) {
20432                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20433                                         ${cf_cv_main_return:-return}(1);
20434                                 }
20435                         } else {
20436                                 size_t k;
20437                                 mypointer[j] = value;
20438                                 for (k = 0; k < j; ++k) {
20439                                         if (mypointer[j] == mypointer[k]) {
20440                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20441                                                 ${cf_cv_main_return:-return}(1);
20442                                         }
20443                                 }
20444                         }
20445                 }
20446         }
20447         ${cf_cv_main_return:-return}(0);
20448 }
20449
20450 _ACEOF
20451 rm -f "conftest$ac_exeext"
20452 if { (eval echo "$as_me:20452: \"$ac_link\"") >&5
20453   (eval $ac_link) 2>&5
20454   ac_status=$?
20455   echo "$as_me:20455: \$? = $ac_status" >&5
20456   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20457   { (eval echo "$as_me:20457: \"$ac_try\"") >&5
20458   (eval $ac_try) 2>&5
20459   ac_status=$?
20460   echo "$as_me:20460: \$? = $ac_status" >&5
20461   (exit "$ac_status"); }; }; then
20462   cf_cv_consistent_getenv=yes
20463 else
20464   echo "$as_me: program exited with status $ac_status" >&5
20465 echo "$as_me: failed program was:" >&5
20466 cat "conftest.$ac_ext" >&5
20467 cf_cv_consistent_getenv=no
20468 fi
20469 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20470 fi
20471
20472 fi
20473 echo "$as_me:20473: result: $cf_cv_consistent_getenv" >&5
20474 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20475
20476 if test "x$cf_cv_consistent_getenv" = xno
20477 then
20478
20479 cat >>confdefs.h <<\EOF
20480 #define HAVE_CONSISTENT_GETENV 1
20481 EOF
20482
20483 fi
20484
20485 if test "x$cf_cv_consistent_getenv" = xno && \
20486         test "x$cf_with_trace" = xyes
20487 then
20488         { echo "$as_me:20488: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20489 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20490 fi
20491
20492 echo "$as_me:20492: checking if sys/time.h works with sys/select.h" >&5
20493 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20494 if test "${cf_cv_sys_time_select+set}" = set; then
20495   echo $ECHO_N "(cached) $ECHO_C" >&6
20496 else
20497
20498 cat >"conftest.$ac_ext" <<_ACEOF
20499 #line 20499 "configure"
20500 #include "confdefs.h"
20501
20502 #include <sys/types.h>
20503 #ifdef HAVE_SYS_TIME_H
20504 #include <sys/time.h>
20505 #endif
20506 #ifdef HAVE_SYS_SELECT_H
20507 #include <sys/select.h>
20508 #endif
20509
20510 int
20511 main (void)
20512 {
20513
20514   ;
20515   return 0;
20516 }
20517 _ACEOF
20518 rm -f "conftest.$ac_objext"
20519 if { (eval echo "$as_me:20519: \"$ac_compile\"") >&5
20520   (eval $ac_compile) 2>&5
20521   ac_status=$?
20522   echo "$as_me:20522: \$? = $ac_status" >&5
20523   (exit "$ac_status"); } &&
20524          { ac_try='test -s "conftest.$ac_objext"'
20525   { (eval echo "$as_me:20525: \"$ac_try\"") >&5
20526   (eval $ac_try) 2>&5
20527   ac_status=$?
20528   echo "$as_me:20528: \$? = $ac_status" >&5
20529   (exit "$ac_status"); }; }; then
20530   cf_cv_sys_time_select=yes
20531 else
20532   echo "$as_me: failed program was:" >&5
20533 cat "conftest.$ac_ext" >&5
20534 cf_cv_sys_time_select=no
20535 fi
20536 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20537
20538 fi
20539
20540 echo "$as_me:20540: result: $cf_cv_sys_time_select" >&5
20541 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20542 test "$cf_cv_sys_time_select" = yes &&
20543 cat >>confdefs.h <<\EOF
20544 #define HAVE_SYS_TIME_SELECT 1
20545 EOF
20546
20547 ###     checks for compiler characteristics
20548 ac_ext=c
20549 ac_cpp='$CPP $CPPFLAGS'
20550 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20551 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20552 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20553 ac_main_return="return"
20554
20555 echo "$as_me:20555: checking for an ANSI C-conforming const" >&5
20556 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20557 if test "${ac_cv_c_const+set}" = set; then
20558   echo $ECHO_N "(cached) $ECHO_C" >&6
20559 else
20560   cat >"conftest.$ac_ext" <<_ACEOF
20561 #line 20561 "configure"
20562 #include "confdefs.h"
20563
20564 int
20565 main (void)
20566 {
20567 /* FIXME: Include the comments suggested by Paul. */
20568 #ifndef __cplusplus
20569   /* Ultrix mips cc rejects this.  */
20570   typedef int charset[2];
20571   const charset x;
20572   /* SunOS 4.1.1 cc rejects this.  */
20573   char const *const *ccp;
20574   char **p;
20575   /* NEC SVR4.0.2 mips cc rejects this.  */
20576   struct point {int x, y;};
20577   static struct point const zero = {0,0};
20578   /* AIX XL C 1.02.0.0 rejects this.
20579      It does not let you subtract one const X* pointer from another in
20580      an arm of an if-expression whose if-part is not a constant
20581      expression */
20582   const char *g = "string";
20583   ccp = &g + (g ? g-g : 0);
20584   /* HPUX 7.0 cc rejects these. */
20585   ++ccp;
20586   p = (char**) ccp;
20587   ccp = (char const *const *) p;
20588   { /* SCO 3.2v4 cc rejects this.  */
20589     char *t;
20590     char const *s = 0 ? (char *) 0 : (char const *) 0;
20591
20592     *t++ = 0;
20593   }
20594   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20595     int x[] = {25, 17};
20596     const int *foo = &x[0];
20597     ++foo;
20598   }
20599   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20600     typedef const int *iptr;
20601     iptr p = 0;
20602     ++p;
20603   }
20604   { /* AIX XL C 1.02.0.0 rejects this saying
20605        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20606     struct s { int j; const int *ap[3]; };
20607     struct s *b; b->j = 5;
20608   }
20609   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20610     const int foo = 10;
20611   }
20612 #endif
20613
20614   ;
20615   return 0;
20616 }
20617 _ACEOF
20618 rm -f "conftest.$ac_objext"
20619 if { (eval echo "$as_me:20619: \"$ac_compile\"") >&5
20620   (eval $ac_compile) 2>&5
20621   ac_status=$?
20622   echo "$as_me:20622: \$? = $ac_status" >&5
20623   (exit "$ac_status"); } &&
20624          { ac_try='test -s "conftest.$ac_objext"'
20625   { (eval echo "$as_me:20625: \"$ac_try\"") >&5
20626   (eval $ac_try) 2>&5
20627   ac_status=$?
20628   echo "$as_me:20628: \$? = $ac_status" >&5
20629   (exit "$ac_status"); }; }; then
20630   ac_cv_c_const=yes
20631 else
20632   echo "$as_me: failed program was:" >&5
20633 cat "conftest.$ac_ext" >&5
20634 ac_cv_c_const=no
20635 fi
20636 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20637 fi
20638 echo "$as_me:20638: result: $ac_cv_c_const" >&5
20639 echo "${ECHO_T}$ac_cv_c_const" >&6
20640 if test $ac_cv_c_const = no; then
20641
20642 cat >>confdefs.h <<\EOF
20643 #define const
20644 EOF
20645
20646 fi
20647
20648 echo "$as_me:20648: checking for inline" >&5
20649 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20650 if test "${ac_cv_c_inline+set}" = set; then
20651   echo $ECHO_N "(cached) $ECHO_C" >&6
20652 else
20653   ac_cv_c_inline=no
20654 for ac_kw in inline __inline__ __inline; do
20655   cat >"conftest.$ac_ext" <<_ACEOF
20656 #line 20656 "configure"
20657 #include "confdefs.h"
20658 #ifndef __cplusplus
20659 static $ac_kw int static_foo () {return 0; }
20660 $ac_kw int foo () {return 0; }
20661 #endif
20662
20663 _ACEOF
20664 rm -f "conftest.$ac_objext"
20665 if { (eval echo "$as_me:20665: \"$ac_compile\"") >&5
20666   (eval $ac_compile) 2>&5
20667   ac_status=$?
20668   echo "$as_me:20668: \$? = $ac_status" >&5
20669   (exit "$ac_status"); } &&
20670          { ac_try='test -s "conftest.$ac_objext"'
20671   { (eval echo "$as_me:20671: \"$ac_try\"") >&5
20672   (eval $ac_try) 2>&5
20673   ac_status=$?
20674   echo "$as_me:20674: \$? = $ac_status" >&5
20675   (exit "$ac_status"); }; }; then
20676   ac_cv_c_inline=$ac_kw; break
20677 else
20678   echo "$as_me: failed program was:" >&5
20679 cat "conftest.$ac_ext" >&5
20680 fi
20681 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20682 done
20683
20684 fi
20685 echo "$as_me:20685: result: $ac_cv_c_inline" >&5
20686 echo "${ECHO_T}$ac_cv_c_inline" >&6
20687 case $ac_cv_c_inline in
20688   inline | yes) ;;
20689   no)
20690 cat >>confdefs.h <<\EOF
20691 #define inline
20692 EOF
20693  ;;
20694   *)  cat >>confdefs.h <<EOF
20695 #define inline $ac_cv_c_inline
20696 EOF
20697  ;;
20698 esac
20699
20700 NCURSES_INLINE=
20701 if test "$ac_cv_c_inline" != no ; then
20702         NCURSES_INLINE=inline
20703         if test "$INTEL_COMPILER" = yes
20704         then
20705                 :
20706         elif test "$CLANG_COMPILER" = yes
20707         then
20708                 :
20709         elif test "$GCC" = yes
20710         then
20711                 echo "$as_me:20711: checking if $CC supports options to tune inlining" >&5
20712 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20713 if test "${cf_cv_gcc_inline+set}" = set; then
20714   echo $ECHO_N "(cached) $ECHO_C" >&6
20715 else
20716
20717                 cf_save_CFLAGS=$CFLAGS
20718                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20719                 cat >"conftest.$ac_ext" <<_ACEOF
20720 #line 20720 "configure"
20721 #include "confdefs.h"
20722 inline int foo(void) { return 1; }
20723 int
20724 main (void)
20725 {
20726 ${cf_cv_main_return:-return} foo()
20727   ;
20728   return 0;
20729 }
20730 _ACEOF
20731 rm -f "conftest.$ac_objext"
20732 if { (eval echo "$as_me:20732: \"$ac_compile\"") >&5
20733   (eval $ac_compile) 2>&5
20734   ac_status=$?
20735   echo "$as_me:20735: \$? = $ac_status" >&5
20736   (exit "$ac_status"); } &&
20737          { ac_try='test -s "conftest.$ac_objext"'
20738   { (eval echo "$as_me:20738: \"$ac_try\"") >&5
20739   (eval $ac_try) 2>&5
20740   ac_status=$?
20741   echo "$as_me:20741: \$? = $ac_status" >&5
20742   (exit "$ac_status"); }; }; then
20743   cf_cv_gcc_inline=yes
20744 else
20745   echo "$as_me: failed program was:" >&5
20746 cat "conftest.$ac_ext" >&5
20747 cf_cv_gcc_inline=no
20748 fi
20749 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20750                 CFLAGS=$cf_save_CFLAGS
20751
20752 fi
20753 echo "$as_me:20753: result: $cf_cv_gcc_inline" >&5
20754 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20755                 if test "$cf_cv_gcc_inline" = yes ; then
20756
20757 cf_fix_cppflags=no
20758 cf_new_cflags=
20759 cf_new_cppflags=
20760 cf_new_extra_cppflags=
20761
20762 for cf_add_cflags in --param max-inline-insns-single=1200
20763 do
20764 case "$cf_fix_cppflags" in
20765 (no)
20766         case "$cf_add_cflags" in
20767         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20768                 case "$cf_add_cflags" in
20769                 (-D*)
20770                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20771
20772                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20773                                 && test -z "${cf_tst_cflags}" \
20774                                 && cf_fix_cppflags=yes
20775
20776                         if test "$cf_fix_cppflags" = yes ; then
20777
20778         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20779         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20780
20781                                 continue
20782                         elif test "${cf_tst_cflags}" = "\"'" ; then
20783
20784         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20785         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20786
20787                                 continue
20788                         fi
20789                         ;;
20790                 esac
20791                 case "$CPPFLAGS" in
20792                 (*$cf_add_cflags)
20793                         ;;
20794                 (*)
20795                         case "$cf_add_cflags" in
20796                         (-D*)
20797                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20798
20799 CPPFLAGS=`echo "$CPPFLAGS" | \
20800         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20801                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20802
20803                                 ;;
20804                         esac
20805
20806         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20807         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20808
20809                         ;;
20810                 esac
20811                 ;;
20812         (*)
20813
20814         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20815         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20816
20817                 ;;
20818         esac
20819         ;;
20820 (yes)
20821
20822         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20823         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20824
20825         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20826
20827         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20828                 && test -z "${cf_tst_cflags}" \
20829                 && cf_fix_cppflags=no
20830         ;;
20831 esac
20832 done
20833
20834 if test -n "$cf_new_cflags" ; then
20835
20836         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20837         CFLAGS="${CFLAGS}$cf_new_cflags"
20838
20839 fi
20840
20841 if test -n "$cf_new_cppflags" ; then
20842
20843         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20844         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20845
20846 fi
20847
20848 if test -n "$cf_new_extra_cppflags" ; then
20849
20850         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20851         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20852
20853 fi
20854
20855                 fi
20856         fi
20857 fi
20858
20859 echo "$as_me:20859: checking for signal global datatype" >&5
20860 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20861 if test "${cf_cv_sig_atomic_t+set}" = set; then
20862   echo $ECHO_N "(cached) $ECHO_C" >&6
20863 else
20864
20865         for cf_type in \
20866                 "volatile sig_atomic_t" \
20867                 "sig_atomic_t" \
20868                 "int"
20869         do
20870         cat >"conftest.$ac_ext" <<_ACEOF
20871 #line 20871 "configure"
20872 #include "confdefs.h"
20873
20874 #include <sys/types.h>
20875 #include <signal.h>
20876 #include <stdio.h>
20877
20878 extern $cf_type x;
20879 $cf_type x;
20880 static void handler(int sig)
20881 {
20882         (void)sig;
20883         x = 5;
20884 }
20885 int
20886 main (void)
20887 {
20888 signal(SIGINT, handler);
20889                  x = 1
20890   ;
20891   return 0;
20892 }
20893 _ACEOF
20894 rm -f "conftest.$ac_objext"
20895 if { (eval echo "$as_me:20895: \"$ac_compile\"") >&5
20896   (eval $ac_compile) 2>&5
20897   ac_status=$?
20898   echo "$as_me:20898: \$? = $ac_status" >&5
20899   (exit "$ac_status"); } &&
20900          { ac_try='test -s "conftest.$ac_objext"'
20901   { (eval echo "$as_me:20901: \"$ac_try\"") >&5
20902   (eval $ac_try) 2>&5
20903   ac_status=$?
20904   echo "$as_me:20904: \$? = $ac_status" >&5
20905   (exit "$ac_status"); }; }; then
20906   cf_cv_sig_atomic_t=$cf_type
20907 else
20908   echo "$as_me: failed program was:" >&5
20909 cat "conftest.$ac_ext" >&5
20910 cf_cv_sig_atomic_t=no
20911 fi
20912 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20913                 test "$cf_cv_sig_atomic_t" != no && break
20914         done
20915
20916 fi
20917
20918 echo "$as_me:20918: result: $cf_cv_sig_atomic_t" >&5
20919 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
20920 test "$cf_cv_sig_atomic_t" != no &&
20921 cat >>confdefs.h <<EOF
20922 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
20923 EOF
20924
20925 if test "$NCURSES_CHTYPE" = auto ; then
20926
20927 echo "$as_me:20927: checking for type of chtype" >&5
20928 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
20929 if test "${cf_cv_typeof_chtype+set}" = set; then
20930   echo $ECHO_N "(cached) $ECHO_C" >&6
20931 else
20932
20933                 if test "$cross_compiling" = yes; then
20934   cf_cv_typeof_chtype=long
20935 else
20936   cat >"conftest.$ac_ext" <<_ACEOF
20937 #line 20937 "configure"
20938 #include "confdefs.h"
20939
20940 #define WANT_BITS 31
20941 #include <stdio.h>
20942 int main(void)
20943 {
20944         FILE *fp = fopen("cf_test.out", "w");
20945         if (fp != 0) {
20946                 char *result = "long";
20947                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
20948                         int n;
20949                         unsigned int x, y;
20950                         for (n = 0; n < WANT_BITS; n++) {
20951                                 x = (1 << n);
20952                                 y = (x >> n);
20953                                 if (y != 1 || x == 0) {
20954                                         x = 0;
20955                                         break;
20956                                 }
20957                         }
20958                         /*
20959                          * If x is nonzero, an int is big enough for the bits
20960                          * that we want.
20961                          */
20962                         result = (x != 0) ? "int" : "long";
20963                 }
20964                 fputs(result, fp);
20965                 fclose(fp);
20966         }
20967         ${cf_cv_main_return:-return}(0);
20968 }
20969
20970 _ACEOF
20971 rm -f "conftest$ac_exeext"
20972 if { (eval echo "$as_me:20972: \"$ac_link\"") >&5
20973   (eval $ac_link) 2>&5
20974   ac_status=$?
20975   echo "$as_me:20975: \$? = $ac_status" >&5
20976   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20977   { (eval echo "$as_me:20977: \"$ac_try\"") >&5
20978   (eval $ac_try) 2>&5
20979   ac_status=$?
20980   echo "$as_me:20980: \$? = $ac_status" >&5
20981   (exit "$ac_status"); }; }; then
20982   cf_cv_typeof_chtype=`cat cf_test.out`
20983 else
20984   echo "$as_me: program exited with status $ac_status" >&5
20985 echo "$as_me: failed program was:" >&5
20986 cat "conftest.$ac_ext" >&5
20987 cf_cv_typeof_chtype=long
20988 fi
20989 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20990 fi
20991                 rm -f cf_test.out
20992
20993 fi
20994
20995 echo "$as_me:20995: result: $cf_cv_typeof_chtype" >&5
20996 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
20997
20998 cat >>confdefs.h <<EOF
20999 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21000 EOF
21001
21002 else
21003         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21004 fi
21005 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21006
21007 echo "$as_me:21007: checking if unsigned literals are legal" >&5
21008 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21009 if test "${cf_cv_unsigned_literals+set}" = set; then
21010   echo $ECHO_N "(cached) $ECHO_C" >&6
21011 else
21012
21013         cat >"conftest.$ac_ext" <<_ACEOF
21014 #line 21014 "configure"
21015 #include "confdefs.h"
21016
21017 int
21018 main (void)
21019 {
21020 long x = 1L + 1UL + 1U + 1
21021   ;
21022   return 0;
21023 }
21024 _ACEOF
21025 rm -f "conftest.$ac_objext"
21026 if { (eval echo "$as_me:21026: \"$ac_compile\"") >&5
21027   (eval $ac_compile) 2>&5
21028   ac_status=$?
21029   echo "$as_me:21029: \$? = $ac_status" >&5
21030   (exit "$ac_status"); } &&
21031          { ac_try='test -s "conftest.$ac_objext"'
21032   { (eval echo "$as_me:21032: \"$ac_try\"") >&5
21033   (eval $ac_try) 2>&5
21034   ac_status=$?
21035   echo "$as_me:21035: \$? = $ac_status" >&5
21036   (exit "$ac_status"); }; }; then
21037   cf_cv_unsigned_literals=yes
21038 else
21039   echo "$as_me: failed program was:" >&5
21040 cat "conftest.$ac_ext" >&5
21041 cf_cv_unsigned_literals=no
21042 fi
21043 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21044
21045 fi
21046
21047 echo "$as_me:21047: result: $cf_cv_unsigned_literals" >&5
21048 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21049
21050 cf_cv_1UL="1"
21051 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21052 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21053
21054 if test "$NCURSES_MMASK_T" = auto ; then
21055         cf_cv_typeof_mmask_t=long
21056 else
21057         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21058 fi
21059 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21060
21061 ###     Checks for external-data
21062
21063 echo "$as_me:21063: checking if external errno is declared" >&5
21064 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21065 if test "${cf_cv_dcl_errno+set}" = set; then
21066   echo $ECHO_N "(cached) $ECHO_C" >&6
21067 else
21068
21069         cat >"conftest.$ac_ext" <<_ACEOF
21070 #line 21070 "configure"
21071 #include "confdefs.h"
21072
21073 #ifdef HAVE_STDLIB_H
21074 #include <stdlib.h>
21075 #endif
21076 #include <stdio.h>
21077 #include <sys/types.h>
21078 #include <errno.h>
21079 int
21080 main (void)
21081 {
21082 int x = (int) errno; (void)x
21083   ;
21084   return 0;
21085 }
21086 _ACEOF
21087 rm -f "conftest.$ac_objext"
21088 if { (eval echo "$as_me:21088: \"$ac_compile\"") >&5
21089   (eval $ac_compile) 2>&5
21090   ac_status=$?
21091   echo "$as_me:21091: \$? = $ac_status" >&5
21092   (exit "$ac_status"); } &&
21093          { ac_try='test -s "conftest.$ac_objext"'
21094   { (eval echo "$as_me:21094: \"$ac_try\"") >&5
21095   (eval $ac_try) 2>&5
21096   ac_status=$?
21097   echo "$as_me:21097: \$? = $ac_status" >&5
21098   (exit "$ac_status"); }; }; then
21099   cf_cv_dcl_errno=yes
21100 else
21101   echo "$as_me: failed program was:" >&5
21102 cat "conftest.$ac_ext" >&5
21103 cf_cv_dcl_errno=no
21104 fi
21105 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21106
21107 fi
21108 echo "$as_me:21108: result: $cf_cv_dcl_errno" >&5
21109 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21110
21111 if test "$cf_cv_dcl_errno" = no ; then
21112
21113 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21114
21115         cat >>confdefs.h <<EOF
21116 #define $cf_result 1
21117 EOF
21118
21119 fi
21120
21121 # It's possible (for near-UNIX clones) that the data doesn't exist
21122
21123 echo "$as_me:21123: checking if external errno exists" >&5
21124 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21125 if test "${cf_cv_have_errno+set}" = set; then
21126   echo $ECHO_N "(cached) $ECHO_C" >&6
21127 else
21128
21129         cat >"conftest.$ac_ext" <<_ACEOF
21130 #line 21130 "configure"
21131 #include "confdefs.h"
21132
21133 #undef errno
21134 extern int errno;
21135
21136 int
21137 main (void)
21138 {
21139 errno = 2
21140   ;
21141   return 0;
21142 }
21143 _ACEOF
21144 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21145 if { (eval echo "$as_me:21145: \"$ac_link\"") >&5
21146   (eval $ac_link) 2>&5
21147   ac_status=$?
21148   echo "$as_me:21148: \$? = $ac_status" >&5
21149   (exit "$ac_status"); } &&
21150          { ac_try='test -s "conftest$ac_exeext"'
21151   { (eval echo "$as_me:21151: \"$ac_try\"") >&5
21152   (eval $ac_try) 2>&5
21153   ac_status=$?
21154   echo "$as_me:21154: \$? = $ac_status" >&5
21155   (exit "$ac_status"); }; }; then
21156   cf_cv_have_errno=yes
21157 else
21158   echo "$as_me: failed program was:" >&5
21159 cat "conftest.$ac_ext" >&5
21160 cf_cv_have_errno=no
21161 fi
21162 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21163
21164 fi
21165 echo "$as_me:21165: result: $cf_cv_have_errno" >&5
21166 echo "${ECHO_T}$cf_cv_have_errno" >&6
21167
21168 if test "$cf_cv_have_errno" = yes ; then
21169
21170 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21171
21172         cat >>confdefs.h <<EOF
21173 #define $cf_result 1
21174 EOF
21175
21176 fi
21177
21178 echo "$as_me:21178: checking if data-only library module links" >&5
21179 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21180 if test "${cf_cv_link_dataonly+set}" = set; then
21181   echo $ECHO_N "(cached) $ECHO_C" >&6
21182 else
21183
21184         rm -f conftest.a
21185         cat >conftest.$ac_ext <<EOF
21186 #line 21186 "configure"
21187 int     testdata[3] = { 123, 456, 789 };
21188 EOF
21189         if { (eval echo "$as_me:21189: \"$ac_compile\"") >&5
21190   (eval $ac_compile) 2>&5
21191   ac_status=$?
21192   echo "$as_me:21192: \$? = $ac_status" >&5
21193   (exit "$ac_status"); } ; then
21194                 mv conftest.o data.o && \
21195                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21196         fi
21197         rm -f conftest.$ac_ext data.o
21198         cat >conftest.$ac_ext <<EOF
21199 #line 21199 "configure"
21200 int     testfunc(void)
21201 {
21202 #if defined(NeXT)
21203         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21204 #else
21205         extern int testdata[3];
21206         return testdata[0] == 123
21207            &&  testdata[1] == 456
21208            &&  testdata[2] == 789;
21209 #endif
21210 }
21211 EOF
21212         if { (eval echo "$as_me:21212: \"$ac_compile\"") >&5
21213   (eval $ac_compile) 2>&5
21214   ac_status=$?
21215   echo "$as_me:21215: \$? = $ac_status" >&5
21216   (exit "$ac_status"); }; then
21217                 mv conftest.o func.o && \
21218                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21219         fi
21220         rm -f conftest.$ac_ext func.o
21221         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21222         cf_saveLIBS="$LIBS"
21223         LIBS="conftest.a $LIBS"
21224         if test "$cross_compiling" = yes; then
21225   cf_cv_link_dataonly=unknown
21226 else
21227   cat >"conftest.$ac_ext" <<_ACEOF
21228 #line 21228 "configure"
21229 #include "confdefs.h"
21230
21231         int main(void)
21232         {
21233                 extern int testfunc();
21234                 ${cf_cv_main_return:-return} (!testfunc());
21235         }
21236
21237 _ACEOF
21238 rm -f "conftest$ac_exeext"
21239 if { (eval echo "$as_me:21239: \"$ac_link\"") >&5
21240   (eval $ac_link) 2>&5
21241   ac_status=$?
21242   echo "$as_me:21242: \$? = $ac_status" >&5
21243   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21244   { (eval echo "$as_me:21244: \"$ac_try\"") >&5
21245   (eval $ac_try) 2>&5
21246   ac_status=$?
21247   echo "$as_me:21247: \$? = $ac_status" >&5
21248   (exit "$ac_status"); }; }; then
21249   cf_cv_link_dataonly=yes
21250 else
21251   echo "$as_me: program exited with status $ac_status" >&5
21252 echo "$as_me: failed program was:" >&5
21253 cat "conftest.$ac_ext" >&5
21254 cf_cv_link_dataonly=no
21255 fi
21256 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21257 fi
21258         LIBS="$cf_saveLIBS"
21259
21260 fi
21261
21262 echo "$as_me:21262: result: $cf_cv_link_dataonly" >&5
21263 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21264
21265 if test "$cf_cv_link_dataonly" = no ; then
21266
21267 cat >>confdefs.h <<\EOF
21268 #define BROKEN_LINKER 1
21269 EOF
21270
21271         BROKEN_LINKER=1
21272 fi
21273
21274 ###     Checks for library functions.
21275
21276 for ac_func in \
21277 getcwd \
21278 getegid \
21279 geteuid \
21280 getopt \
21281 getttynam \
21282 issetugid \
21283 localeconv \
21284 poll \
21285 putenv \
21286 remove \
21287 select \
21288 setbuf \
21289 setbuffer \
21290 setenv \
21291 setfsuid \
21292 setvbuf \
21293 sigaction \
21294 sigvec \
21295 snprintf \
21296 strdup \
21297 strstr \
21298 sysconf \
21299 tcgetpgrp \
21300 times \
21301 tsearch \
21302 vsnprintf \
21303
21304 do
21305 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21306 echo "$as_me:21306: checking for $ac_func" >&5
21307 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21308 if eval "test \"\${$as_ac_var+set}\" = set"; then
21309   echo $ECHO_N "(cached) $ECHO_C" >&6
21310 else
21311   cat >"conftest.$ac_ext" <<_ACEOF
21312 #line 21312 "configure"
21313 #include "confdefs.h"
21314 #define $ac_func autoconf_temporary
21315 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21316 #undef $ac_func
21317
21318 #ifdef __cplusplus
21319 extern "C"
21320 #endif
21321
21322 /* We use char because int might match the return type of a gcc2
21323    builtin and then its argument prototype would still apply.  */
21324 char $ac_func (void);
21325
21326 int
21327 main (void)
21328 {
21329
21330 /* The GNU C library defines stubs for functions which it implements
21331     to always fail with ENOSYS.  Some functions are actually named
21332     something starting with __ and the normal name is an alias.  */
21333 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21334 #error found stub for $ac_func
21335 #endif
21336
21337         return $ac_func ();
21338   ;
21339   return 0;
21340 }
21341 _ACEOF
21342 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21343 if { (eval echo "$as_me:21343: \"$ac_link\"") >&5
21344   (eval $ac_link) 2>&5
21345   ac_status=$?
21346   echo "$as_me:21346: \$? = $ac_status" >&5
21347   (exit "$ac_status"); } &&
21348          { ac_try='test -s "conftest$ac_exeext"'
21349   { (eval echo "$as_me:21349: \"$ac_try\"") >&5
21350   (eval $ac_try) 2>&5
21351   ac_status=$?
21352   echo "$as_me:21352: \$? = $ac_status" >&5
21353   (exit "$ac_status"); }; }; then
21354   eval "$as_ac_var=yes"
21355 else
21356   echo "$as_me: failed program was:" >&5
21357 cat "conftest.$ac_ext" >&5
21358 eval "$as_ac_var=no"
21359 fi
21360 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21361 fi
21362 echo "$as_me:21362: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21363 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21364 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21365   cat >>confdefs.h <<EOF
21366 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21367 EOF
21368
21369 fi
21370 done
21371
21372 if test "x$ac_cv_func_getopt" = xno && \
21373    test "x$cf_with_progs$cf_with_tests" != xnono; then
21374         { { echo "$as_me:21374: error: getopt is required for building programs" >&5
21375 echo "$as_me: error: getopt is required for building programs" >&2;}
21376    { (exit 1); exit 1; }; }
21377 fi
21378
21379 if test "x$with_safe_sprintf" = xyes
21380 then
21381         if test "x$ac_cv_func_vsnprintf" = xyes
21382         then
21383                 { echo "$as_me:21383: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21384 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21385         else
21386
21387 cat >>confdefs.h <<\EOF
21388 #define USE_SAFE_SPRINTF 1
21389 EOF
21390
21391         fi
21392 fi
21393
21394 if test "x$with_getcap" = "xyes" ; then
21395
21396 echo "$as_me:21396: checking for terminal-capability database functions" >&5
21397 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21398 if test "${cf_cv_cgetent+set}" = set; then
21399   echo $ECHO_N "(cached) $ECHO_C" >&6
21400 else
21401
21402 cat >"conftest.$ac_ext" <<_ACEOF
21403 #line 21403 "configure"
21404 #include "confdefs.h"
21405
21406 #include <stdlib.h>
21407 int
21408 main (void)
21409 {
21410
21411         char temp[128];
21412         char *buf = temp;
21413         char *db_array = temp;
21414         cgetent(&buf, &db_array, "vt100");
21415         cgetcap(buf, "tc", '=');
21416         cgetmatch(buf, "tc");
21417
21418   ;
21419   return 0;
21420 }
21421 _ACEOF
21422 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21423 if { (eval echo "$as_me:21423: \"$ac_link\"") >&5
21424   (eval $ac_link) 2>&5
21425   ac_status=$?
21426   echo "$as_me:21426: \$? = $ac_status" >&5
21427   (exit "$ac_status"); } &&
21428          { ac_try='test -s "conftest$ac_exeext"'
21429   { (eval echo "$as_me:21429: \"$ac_try\"") >&5
21430   (eval $ac_try) 2>&5
21431   ac_status=$?
21432   echo "$as_me:21432: \$? = $ac_status" >&5
21433   (exit "$ac_status"); }; }; then
21434   cf_cv_cgetent=yes
21435 else
21436   echo "$as_me: failed program was:" >&5
21437 cat "conftest.$ac_ext" >&5
21438 cf_cv_cgetent=no
21439 fi
21440 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21441
21442 fi
21443 echo "$as_me:21443: result: $cf_cv_cgetent" >&5
21444 echo "${ECHO_T}$cf_cv_cgetent" >&6
21445
21446 if test "$cf_cv_cgetent" = yes
21447 then
21448
21449 cat >>confdefs.h <<\EOF
21450 #define HAVE_BSD_CGETENT 1
21451 EOF
21452
21453 echo "$as_me:21453: checking if cgetent uses const parameter" >&5
21454 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21455 if test "${cf_cv_cgetent_const+set}" = set; then
21456   echo $ECHO_N "(cached) $ECHO_C" >&6
21457 else
21458
21459 cat >"conftest.$ac_ext" <<_ACEOF
21460 #line 21460 "configure"
21461 #include "confdefs.h"
21462
21463 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21464 #include <stdlib.h>
21465 int
21466 main (void)
21467 {
21468
21469         char temp[128];
21470         char *buf = temp;
21471 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21472         const char *db_array = temp;
21473         cgetent(&buf, &db_array, "vt100");
21474 #endif
21475         cgetcap(buf, "tc", '=');
21476         cgetmatch(buf, "tc");
21477
21478   ;
21479   return 0;
21480 }
21481 _ACEOF
21482 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21483 if { (eval echo "$as_me:21483: \"$ac_link\"") >&5
21484   (eval $ac_link) 2>&5
21485   ac_status=$?
21486   echo "$as_me:21486: \$? = $ac_status" >&5
21487   (exit "$ac_status"); } &&
21488          { ac_try='test -s "conftest$ac_exeext"'
21489   { (eval echo "$as_me:21489: \"$ac_try\"") >&5
21490   (eval $ac_try) 2>&5
21491   ac_status=$?
21492   echo "$as_me:21492: \$? = $ac_status" >&5
21493   (exit "$ac_status"); }; }; then
21494   cf_cv_cgetent_const=yes
21495 else
21496   echo "$as_me: failed program was:" >&5
21497 cat "conftest.$ac_ext" >&5
21498 cf_cv_cgetent_const=no
21499 fi
21500 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21501
21502 fi
21503 echo "$as_me:21503: result: $cf_cv_cgetent_const" >&5
21504 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21505         if test "$cf_cv_cgetent_const" = yes
21506         then
21507
21508 cat >>confdefs.h <<EOF
21509 #define CGETENT_CONST const
21510 EOF
21511
21512         fi
21513 fi
21514
21515 fi
21516
21517 echo "$as_me:21517: checking for isascii" >&5
21518 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21519 if test "${cf_cv_have_isascii+set}" = set; then
21520   echo $ECHO_N "(cached) $ECHO_C" >&6
21521 else
21522
21523         cat >"conftest.$ac_ext" <<_ACEOF
21524 #line 21524 "configure"
21525 #include "confdefs.h"
21526 #include <ctype.h>
21527 int
21528 main (void)
21529 {
21530 int x = isascii(' ')
21531   ;
21532   return 0;
21533 }
21534 _ACEOF
21535 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21536 if { (eval echo "$as_me:21536: \"$ac_link\"") >&5
21537   (eval $ac_link) 2>&5
21538   ac_status=$?
21539   echo "$as_me:21539: \$? = $ac_status" >&5
21540   (exit "$ac_status"); } &&
21541          { ac_try='test -s "conftest$ac_exeext"'
21542   { (eval echo "$as_me:21542: \"$ac_try\"") >&5
21543   (eval $ac_try) 2>&5
21544   ac_status=$?
21545   echo "$as_me:21545: \$? = $ac_status" >&5
21546   (exit "$ac_status"); }; }; then
21547   cf_cv_have_isascii=yes
21548 else
21549   echo "$as_me: failed program was:" >&5
21550 cat "conftest.$ac_ext" >&5
21551 cf_cv_have_isascii=no
21552 fi
21553 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21554
21555 fi
21556 echo "$as_me:21556: result: $cf_cv_have_isascii" >&5
21557 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21558 test "$cf_cv_have_isascii" = yes &&
21559 cat >>confdefs.h <<\EOF
21560 #define HAVE_ISASCII 1
21561 EOF
21562
21563 if test "$ac_cv_func_sigaction" = yes; then
21564 echo "$as_me:21564: checking whether sigaction needs _POSIX_SOURCE" >&5
21565 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21566 cat >"conftest.$ac_ext" <<_ACEOF
21567 #line 21567 "configure"
21568 #include "confdefs.h"
21569
21570 #include <sys/types.h>
21571 #include <signal.h>
21572 int
21573 main (void)
21574 {
21575 struct sigaction act
21576   ;
21577   return 0;
21578 }
21579 _ACEOF
21580 rm -f "conftest.$ac_objext"
21581 if { (eval echo "$as_me:21581: \"$ac_compile\"") >&5
21582   (eval $ac_compile) 2>&5
21583   ac_status=$?
21584   echo "$as_me:21584: \$? = $ac_status" >&5
21585   (exit "$ac_status"); } &&
21586          { ac_try='test -s "conftest.$ac_objext"'
21587   { (eval echo "$as_me:21587: \"$ac_try\"") >&5
21588   (eval $ac_try) 2>&5
21589   ac_status=$?
21590   echo "$as_me:21590: \$? = $ac_status" >&5
21591   (exit "$ac_status"); }; }; then
21592   sigact_bad=no
21593 else
21594   echo "$as_me: failed program was:" >&5
21595 cat "conftest.$ac_ext" >&5
21596
21597 cat >"conftest.$ac_ext" <<_ACEOF
21598 #line 21598 "configure"
21599 #include "confdefs.h"
21600
21601 #define _POSIX_SOURCE
21602 #include <sys/types.h>
21603 #include <signal.h>
21604 int
21605 main (void)
21606 {
21607 struct sigaction act
21608   ;
21609   return 0;
21610 }
21611 _ACEOF
21612 rm -f "conftest.$ac_objext"
21613 if { (eval echo "$as_me:21613: \"$ac_compile\"") >&5
21614   (eval $ac_compile) 2>&5
21615   ac_status=$?
21616   echo "$as_me:21616: \$? = $ac_status" >&5
21617   (exit "$ac_status"); } &&
21618          { ac_try='test -s "conftest.$ac_objext"'
21619   { (eval echo "$as_me:21619: \"$ac_try\"") >&5
21620   (eval $ac_try) 2>&5
21621   ac_status=$?
21622   echo "$as_me:21622: \$? = $ac_status" >&5
21623   (exit "$ac_status"); }; }; then
21624   sigact_bad=yes
21625
21626 cat >>confdefs.h <<\EOF
21627 #define _POSIX_SOURCE 1
21628 EOF
21629
21630 else
21631   echo "$as_me: failed program was:" >&5
21632 cat "conftest.$ac_ext" >&5
21633 sigact_bad=unknown
21634 fi
21635 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21636 fi
21637 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21638 echo "$as_me:21638: result: $sigact_bad" >&5
21639 echo "${ECHO_T}$sigact_bad" >&6
21640 fi
21641
21642 echo "$as_me:21642: checking if nanosleep really works" >&5
21643 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21644 if test "${cf_cv_func_nanosleep+set}" = set; then
21645   echo $ECHO_N "(cached) $ECHO_C" >&6
21646 else
21647
21648 if test "$cross_compiling" = yes; then
21649   cf_cv_func_nanosleep=unknown
21650 else
21651   cat >"conftest.$ac_ext" <<_ACEOF
21652 #line 21652 "configure"
21653 #include "confdefs.h"
21654
21655 #include <stdio.h>
21656 #include <errno.h>
21657 #include <time.h>
21658
21659 #ifdef HAVE_SYS_TIME_H
21660 #include <sys/time.h>
21661 #endif
21662
21663 int main(void) {
21664         struct timespec ts1, ts2;
21665         int code;
21666         ts1.tv_sec  = 0;
21667         ts1.tv_nsec = 750000000;
21668         ts2.tv_sec  = 0;
21669         ts2.tv_nsec = 0;
21670         errno = 0;
21671         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21672         ${cf_cv_main_return:-return}(code != 0);
21673 }
21674
21675 _ACEOF
21676 rm -f "conftest$ac_exeext"
21677 if { (eval echo "$as_me:21677: \"$ac_link\"") >&5
21678   (eval $ac_link) 2>&5
21679   ac_status=$?
21680   echo "$as_me:21680: \$? = $ac_status" >&5
21681   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21682   { (eval echo "$as_me:21682: \"$ac_try\"") >&5
21683   (eval $ac_try) 2>&5
21684   ac_status=$?
21685   echo "$as_me:21685: \$? = $ac_status" >&5
21686   (exit "$ac_status"); }; }; then
21687   cf_cv_func_nanosleep=yes
21688 else
21689   echo "$as_me: program exited with status $ac_status" >&5
21690 echo "$as_me: failed program was:" >&5
21691 cat "conftest.$ac_ext" >&5
21692 cf_cv_func_nanosleep=no
21693 fi
21694 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21695 fi
21696 fi
21697 echo "$as_me:21697: result: $cf_cv_func_nanosleep" >&5
21698 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21699
21700 test "$cf_cv_func_nanosleep" = "yes" &&
21701 cat >>confdefs.h <<\EOF
21702 #define HAVE_NANOSLEEP 1
21703 EOF
21704
21705 for ac_header in \
21706 termio.h \
21707 termios.h \
21708 unistd.h \
21709 sys/ioctl.h \
21710 sys/termio.h \
21711
21712 do
21713 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21714 echo "$as_me:21714: checking for $ac_header" >&5
21715 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21716 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21717   echo $ECHO_N "(cached) $ECHO_C" >&6
21718 else
21719   cat >"conftest.$ac_ext" <<_ACEOF
21720 #line 21720 "configure"
21721 #include "confdefs.h"
21722 #include <$ac_header>
21723 _ACEOF
21724 if { (eval echo "$as_me:21724: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21725   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21726   ac_status=$?
21727   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21728   rm -f conftest.er1
21729   cat conftest.err >&5
21730   echo "$as_me:21730: \$? = $ac_status" >&5
21731   (exit "$ac_status"); } >/dev/null; then
21732   if test -s conftest.err; then
21733     ac_cpp_err=$ac_c_preproc_warn_flag
21734   else
21735     ac_cpp_err=
21736   fi
21737 else
21738   ac_cpp_err=yes
21739 fi
21740 if test -z "$ac_cpp_err"; then
21741   eval "$as_ac_Header=yes"
21742 else
21743   echo "$as_me: failed program was:" >&5
21744   cat "conftest.$ac_ext" >&5
21745   eval "$as_ac_Header=no"
21746 fi
21747 rm -f conftest.err "conftest.$ac_ext"
21748 fi
21749 echo "$as_me:21749: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21750 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21751 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21752   cat >>confdefs.h <<EOF
21753 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21754 EOF
21755
21756 fi
21757 done
21758
21759 if test "$ac_cv_header_termios_h" = yes ; then
21760         case "$CFLAGS $CPPFLAGS" in
21761         (*-D_POSIX_SOURCE*)
21762                 termios_bad=dunno ;;
21763         (*)     termios_bad=maybe ;;
21764         esac
21765         if test "$termios_bad" = maybe ; then
21766         echo "$as_me:21766: checking whether termios.h needs _POSIX_SOURCE" >&5
21767 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21768         cat >"conftest.$ac_ext" <<_ACEOF
21769 #line 21769 "configure"
21770 #include "confdefs.h"
21771 #include <termios.h>
21772 int
21773 main (void)
21774 {
21775 struct termios foo; int x = foo.c_iflag = 1; (void)x
21776   ;
21777   return 0;
21778 }
21779 _ACEOF
21780 rm -f "conftest.$ac_objext"
21781 if { (eval echo "$as_me:21781: \"$ac_compile\"") >&5
21782   (eval $ac_compile) 2>&5
21783   ac_status=$?
21784   echo "$as_me:21784: \$? = $ac_status" >&5
21785   (exit "$ac_status"); } &&
21786          { ac_try='test -s "conftest.$ac_objext"'
21787   { (eval echo "$as_me:21787: \"$ac_try\"") >&5
21788   (eval $ac_try) 2>&5
21789   ac_status=$?
21790   echo "$as_me:21790: \$? = $ac_status" >&5
21791   (exit "$ac_status"); }; }; then
21792   termios_bad=no
21793 else
21794   echo "$as_me: failed program was:" >&5
21795 cat "conftest.$ac_ext" >&5
21796
21797                 cat >"conftest.$ac_ext" <<_ACEOF
21798 #line 21798 "configure"
21799 #include "confdefs.h"
21800
21801 #define _POSIX_SOURCE
21802 #include <termios.h>
21803 int
21804 main (void)
21805 {
21806 struct termios foo; int x = foo.c_iflag = 2; (void)x
21807   ;
21808   return 0;
21809 }
21810 _ACEOF
21811 rm -f "conftest.$ac_objext"
21812 if { (eval echo "$as_me:21812: \"$ac_compile\"") >&5
21813   (eval $ac_compile) 2>&5
21814   ac_status=$?
21815   echo "$as_me:21815: \$? = $ac_status" >&5
21816   (exit "$ac_status"); } &&
21817          { ac_try='test -s "conftest.$ac_objext"'
21818   { (eval echo "$as_me:21818: \"$ac_try\"") >&5
21819   (eval $ac_try) 2>&5
21820   ac_status=$?
21821   echo "$as_me:21821: \$? = $ac_status" >&5
21822   (exit "$ac_status"); }; }; then
21823   termios_bad=unknown
21824 else
21825   echo "$as_me: failed program was:" >&5
21826 cat "conftest.$ac_ext" >&5
21827 termios_bad=yes
21828 cat >>confdefs.h <<\EOF
21829 #define _POSIX_SOURCE 1
21830 EOF
21831
21832 fi
21833 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21834
21835 fi
21836 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21837         echo "$as_me:21837: result: $termios_bad" >&5
21838 echo "${ECHO_T}$termios_bad" >&6
21839         fi
21840 fi
21841
21842 echo "$as_me:21842: checking for tcgetattr" >&5
21843 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21844 if test "${cf_cv_have_tcgetattr+set}" = set; then
21845   echo $ECHO_N "(cached) $ECHO_C" >&6
21846 else
21847
21848 cat >"conftest.$ac_ext" <<_ACEOF
21849 #line 21849 "configure"
21850 #include "confdefs.h"
21851
21852 #include <sys/types.h>
21853 #ifdef HAVE_UNISTD_H
21854 #include <unistd.h>
21855 #endif
21856 #ifdef HAVE_TERMIOS_H
21857 #include <termios.h>
21858 #define TTY struct termios
21859 #else
21860 #ifdef HAVE_TERMIO_H
21861 #include <termio.h>
21862 #define TTY struct termio
21863 #endif
21864 #endif
21865
21866 int
21867 main (void)
21868 {
21869
21870 TTY foo;
21871 tcgetattr(1, &foo);
21872   ;
21873   return 0;
21874 }
21875 _ACEOF
21876 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21877 if { (eval echo "$as_me:21877: \"$ac_link\"") >&5
21878   (eval $ac_link) 2>&5
21879   ac_status=$?
21880   echo "$as_me:21880: \$? = $ac_status" >&5
21881   (exit "$ac_status"); } &&
21882          { ac_try='test -s "conftest$ac_exeext"'
21883   { (eval echo "$as_me:21883: \"$ac_try\"") >&5
21884   (eval $ac_try) 2>&5
21885   ac_status=$?
21886   echo "$as_me:21886: \$? = $ac_status" >&5
21887   (exit "$ac_status"); }; }; then
21888   cf_cv_have_tcgetattr=yes
21889 else
21890   echo "$as_me: failed program was:" >&5
21891 cat "conftest.$ac_ext" >&5
21892 cf_cv_have_tcgetattr=no
21893 fi
21894 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21895 fi
21896 echo "$as_me:21896: result: $cf_cv_have_tcgetattr" >&5
21897 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
21898 test "$cf_cv_have_tcgetattr" = yes &&
21899 cat >>confdefs.h <<\EOF
21900 #define HAVE_TCGETATTR 1
21901 EOF
21902
21903 echo "$as_me:21903: checking for vsscanf function or workaround" >&5
21904 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
21905 if test "${cf_cv_func_vsscanf+set}" = set; then
21906   echo $ECHO_N "(cached) $ECHO_C" >&6
21907 else
21908
21909 cat >"conftest.$ac_ext" <<_ACEOF
21910 #line 21910 "configure"
21911 #include "confdefs.h"
21912
21913 #include <stdarg.h>
21914 #include <stdio.h>
21915 int
21916 main (void)
21917 {
21918
21919         va_list ap;
21920         vsscanf("from", "%d", ap)
21921   ;
21922   return 0;
21923 }
21924 _ACEOF
21925 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21926 if { (eval echo "$as_me:21926: \"$ac_link\"") >&5
21927   (eval $ac_link) 2>&5
21928   ac_status=$?
21929   echo "$as_me:21929: \$? = $ac_status" >&5
21930   (exit "$ac_status"); } &&
21931          { ac_try='test -s "conftest$ac_exeext"'
21932   { (eval echo "$as_me:21932: \"$ac_try\"") >&5
21933   (eval $ac_try) 2>&5
21934   ac_status=$?
21935   echo "$as_me:21935: \$? = $ac_status" >&5
21936   (exit "$ac_status"); }; }; then
21937   cf_cv_func_vsscanf=vsscanf
21938 else
21939   echo "$as_me: failed program was:" >&5
21940 cat "conftest.$ac_ext" >&5
21941
21942 cat >"conftest.$ac_ext" <<_ACEOF
21943 #line 21943 "configure"
21944 #include "confdefs.h"
21945
21946 #include <stdarg.h>
21947 #include <stdio.h>
21948 int
21949 main (void)
21950 {
21951
21952         FILE strbuf;
21953         char *str = "from";
21954
21955         strbuf._flag = _IOREAD;
21956         strbuf._ptr = strbuf._base = (unsigned char *) str;
21957         strbuf._cnt = strlen(str);
21958         strbuf._file = _NFILE;
21959         return (vfscanf(&strbuf, "%d", ap))
21960   ;
21961   return 0;
21962 }
21963 _ACEOF
21964 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21965 if { (eval echo "$as_me:21965: \"$ac_link\"") >&5
21966   (eval $ac_link) 2>&5
21967   ac_status=$?
21968   echo "$as_me:21968: \$? = $ac_status" >&5
21969   (exit "$ac_status"); } &&
21970          { ac_try='test -s "conftest$ac_exeext"'
21971   { (eval echo "$as_me:21971: \"$ac_try\"") >&5
21972   (eval $ac_try) 2>&5
21973   ac_status=$?
21974   echo "$as_me:21974: \$? = $ac_status" >&5
21975   (exit "$ac_status"); }; }; then
21976   cf_cv_func_vsscanf=vfscanf
21977 else
21978   echo "$as_me: failed program was:" >&5
21979 cat "conftest.$ac_ext" >&5
21980
21981 cat >"conftest.$ac_ext" <<_ACEOF
21982 #line 21982 "configure"
21983 #include "confdefs.h"
21984
21985 #include <stdarg.h>
21986 #include <stdio.h>
21987 int
21988 main (void)
21989 {
21990
21991         FILE strbuf;
21992         char *str = "from";
21993
21994         strbuf._flag = _IOREAD;
21995         strbuf._ptr = strbuf._base = (unsigned char *) str;
21996         strbuf._cnt = strlen(str);
21997         strbuf._file = _NFILE;
21998         return (_doscan(&strbuf, "%d", ap))
21999   ;
22000   return 0;
22001 }
22002 _ACEOF
22003 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22004 if { (eval echo "$as_me:22004: \"$ac_link\"") >&5
22005   (eval $ac_link) 2>&5
22006   ac_status=$?
22007   echo "$as_me:22007: \$? = $ac_status" >&5
22008   (exit "$ac_status"); } &&
22009          { ac_try='test -s "conftest$ac_exeext"'
22010   { (eval echo "$as_me:22010: \"$ac_try\"") >&5
22011   (eval $ac_try) 2>&5
22012   ac_status=$?
22013   echo "$as_me:22013: \$? = $ac_status" >&5
22014   (exit "$ac_status"); }; }; then
22015   cf_cv_func_vsscanf=_doscan
22016 else
22017   echo "$as_me: failed program was:" >&5
22018 cat "conftest.$ac_ext" >&5
22019
22020 cf_cv_func_vsscanf=no
22021 fi
22022 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22023 fi
22024 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22025 fi
22026 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22027 fi
22028 echo "$as_me:22028: result: $cf_cv_func_vsscanf" >&5
22029 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22030
22031 case "$cf_cv_func_vsscanf" in
22032 (vsscanf)
22033 cat >>confdefs.h <<\EOF
22034 #define HAVE_VSSCANF 1
22035 EOF
22036 ;;
22037 (vfscanf)
22038 cat >>confdefs.h <<\EOF
22039 #define HAVE_VFSCANF 1
22040 EOF
22041 ;;
22042 (_doscan)
22043 cat >>confdefs.h <<\EOF
22044 #define HAVE__DOSCAN 1
22045 EOF
22046 ;;
22047 esac
22048
22049 for ac_header in \
22050 unistd.h \
22051
22052 do
22053 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22054 echo "$as_me:22054: checking for $ac_header" >&5
22055 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22056 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22057   echo $ECHO_N "(cached) $ECHO_C" >&6
22058 else
22059   cat >"conftest.$ac_ext" <<_ACEOF
22060 #line 22060 "configure"
22061 #include "confdefs.h"
22062 #include <$ac_header>
22063 _ACEOF
22064 if { (eval echo "$as_me:22064: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22065   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22066   ac_status=$?
22067   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22068   rm -f conftest.er1
22069   cat conftest.err >&5
22070   echo "$as_me:22070: \$? = $ac_status" >&5
22071   (exit "$ac_status"); } >/dev/null; then
22072   if test -s conftest.err; then
22073     ac_cpp_err=$ac_c_preproc_warn_flag
22074   else
22075     ac_cpp_err=
22076   fi
22077 else
22078   ac_cpp_err=yes
22079 fi
22080 if test -z "$ac_cpp_err"; then
22081   eval "$as_ac_Header=yes"
22082 else
22083   echo "$as_me: failed program was:" >&5
22084   cat "conftest.$ac_ext" >&5
22085   eval "$as_ac_Header=no"
22086 fi
22087 rm -f conftest.err "conftest.$ac_ext"
22088 fi
22089 echo "$as_me:22089: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22090 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22091 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22092   cat >>confdefs.h <<EOF
22093 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22094 EOF
22095
22096 fi
22097 done
22098
22099 echo "$as_me:22099: checking for working mkstemp" >&5
22100 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22101 if test "${cf_cv_func_mkstemp+set}" = set; then
22102   echo $ECHO_N "(cached) $ECHO_C" >&6
22103 else
22104
22105 rm -rf ./conftest*
22106 if test "$cross_compiling" = yes; then
22107   cf_cv_func_mkstemp=maybe
22108 else
22109   cat >"conftest.$ac_ext" <<_ACEOF
22110 #line 22110 "configure"
22111 #include "confdefs.h"
22112
22113 #include <sys/types.h>
22114 #ifdef HAVE_UNISTD_H
22115 #include <unistd.h>
22116 #endif
22117 #include <stdlib.h>
22118 #include <stdio.h>
22119 #include <string.h>
22120 #include <sys/stat.h>
22121 int main(void)
22122 {
22123         char *tmpl = "conftestXXXXXX";
22124         char name[2][80];
22125         int n;
22126         int result = 0;
22127         int fd;
22128         struct stat sb;
22129
22130         umask(077);
22131         for (n = 0; n < 2; ++n) {
22132                 strcpy(name[n], tmpl);
22133                 if ((fd = mkstemp(name[n])) >= 0) {
22134                         if (!strcmp(name[n], tmpl)
22135                          || stat(name[n], &sb) != 0
22136                          || (sb.st_mode & S_IFMT) != S_IFREG
22137                          || (sb.st_mode & 077) != 0) {
22138                                 result = 1;
22139                         }
22140                         close(fd);
22141                 }
22142         }
22143         if (result == 0
22144          && !strcmp(name[0], name[1]))
22145                 result = 1;
22146         ${cf_cv_main_return:-return}(result);
22147 }
22148
22149 _ACEOF
22150 rm -f "conftest$ac_exeext"
22151 if { (eval echo "$as_me:22151: \"$ac_link\"") >&5
22152   (eval $ac_link) 2>&5
22153   ac_status=$?
22154   echo "$as_me:22154: \$? = $ac_status" >&5
22155   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22156   { (eval echo "$as_me:22156: \"$ac_try\"") >&5
22157   (eval $ac_try) 2>&5
22158   ac_status=$?
22159   echo "$as_me:22159: \$? = $ac_status" >&5
22160   (exit "$ac_status"); }; }; then
22161   cf_cv_func_mkstemp=yes
22162
22163 else
22164   echo "$as_me: program exited with status $ac_status" >&5
22165 echo "$as_me: failed program was:" >&5
22166 cat "conftest.$ac_ext" >&5
22167 cf_cv_func_mkstemp=no
22168
22169 fi
22170 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22171 fi
22172
22173 fi
22174 echo "$as_me:22174: result: $cf_cv_func_mkstemp" >&5
22175 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22176 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22177         echo "$as_me:22177: checking for mkstemp" >&5
22178 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22179 if test "${ac_cv_func_mkstemp+set}" = set; then
22180   echo $ECHO_N "(cached) $ECHO_C" >&6
22181 else
22182   cat >"conftest.$ac_ext" <<_ACEOF
22183 #line 22183 "configure"
22184 #include "confdefs.h"
22185 #define mkstemp autoconf_temporary
22186 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22187 #undef mkstemp
22188
22189 #ifdef __cplusplus
22190 extern "C"
22191 #endif
22192
22193 /* We use char because int might match the return type of a gcc2
22194    builtin and then its argument prototype would still apply.  */
22195 char mkstemp (void);
22196
22197 int
22198 main (void)
22199 {
22200
22201 /* The GNU C library defines stubs for functions which it implements
22202     to always fail with ENOSYS.  Some functions are actually named
22203     something starting with __ and the normal name is an alias.  */
22204 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22205 #error found stub for mkstemp
22206 #endif
22207
22208         return mkstemp ();
22209   ;
22210   return 0;
22211 }
22212 _ACEOF
22213 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22214 if { (eval echo "$as_me:22214: \"$ac_link\"") >&5
22215   (eval $ac_link) 2>&5
22216   ac_status=$?
22217   echo "$as_me:22217: \$? = $ac_status" >&5
22218   (exit "$ac_status"); } &&
22219          { ac_try='test -s "conftest$ac_exeext"'
22220   { (eval echo "$as_me:22220: \"$ac_try\"") >&5
22221   (eval $ac_try) 2>&5
22222   ac_status=$?
22223   echo "$as_me:22223: \$? = $ac_status" >&5
22224   (exit "$ac_status"); }; }; then
22225   ac_cv_func_mkstemp=yes
22226 else
22227   echo "$as_me: failed program was:" >&5
22228 cat "conftest.$ac_ext" >&5
22229 ac_cv_func_mkstemp=no
22230 fi
22231 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22232 fi
22233 echo "$as_me:22233: result: $ac_cv_func_mkstemp" >&5
22234 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22235
22236 fi
22237 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22238
22239 cat >>confdefs.h <<\EOF
22240 #define HAVE_MKSTEMP 1
22241 EOF
22242
22243 fi
22244
22245 # setup for prototype of fallback for vsscanf()
22246
22247 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22248         HAVE_VSSCANF=1
22249 else
22250         HAVE_VSSCANF=0
22251 fi
22252
22253 if test "x$cross_compiling" = xyes ; then
22254         { echo "$as_me:22254: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22255 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22256 else
22257         echo "$as_me:22257: checking whether setvbuf arguments are reversed" >&5
22258 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22259 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22260   echo $ECHO_N "(cached) $ECHO_C" >&6
22261 else
22262   if test "$cross_compiling" = yes; then
22263   { { echo "$as_me:22263: error: cannot run test program while cross compiling" >&5
22264 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22265    { (exit 1); exit 1; }; }
22266 else
22267   cat >"conftest.$ac_ext" <<_ACEOF
22268 #line 22268 "configure"
22269 #include "confdefs.h"
22270 #include <stdio.h>
22271 /* If setvbuf has the reversed format, exit 0. */
22272 int
22273 main (void)
22274 {
22275   /* This call has the arguments reversed.
22276      A reversed system may check and see that the address of main
22277      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22278   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22279     $ac_main_return(1);
22280   putc('\r', stdout);
22281   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22282 }
22283 _ACEOF
22284 rm -f "conftest$ac_exeext"
22285 if { (eval echo "$as_me:22285: \"$ac_link\"") >&5
22286   (eval $ac_link) 2>&5
22287   ac_status=$?
22288   echo "$as_me:22288: \$? = $ac_status" >&5
22289   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22290   { (eval echo "$as_me:22290: \"$ac_try\"") >&5
22291   (eval $ac_try) 2>&5
22292   ac_status=$?
22293   echo "$as_me:22293: \$? = $ac_status" >&5
22294   (exit "$ac_status"); }; }; then
22295   ac_cv_func_setvbuf_reversed=yes
22296 else
22297   echo "$as_me: program exited with status $ac_status" >&5
22298 echo "$as_me: failed program was:" >&5
22299 cat "conftest.$ac_ext" >&5
22300 ac_cv_func_setvbuf_reversed=no
22301 fi
22302 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22303 fi
22304 rm -f core ./core.* ./*.core
22305 fi
22306 echo "$as_me:22306: result: $ac_cv_func_setvbuf_reversed" >&5
22307 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22308 if test $ac_cv_func_setvbuf_reversed = yes; then
22309
22310 cat >>confdefs.h <<\EOF
22311 #define SETVBUF_REVERSED 1
22312 EOF
22313
22314 fi
22315
22316 fi
22317 echo "$as_me:22317: checking for intptr_t" >&5
22318 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22319 if test "${ac_cv_type_intptr_t+set}" = set; then
22320   echo $ECHO_N "(cached) $ECHO_C" >&6
22321 else
22322   cat >"conftest.$ac_ext" <<_ACEOF
22323 #line 22323 "configure"
22324 #include "confdefs.h"
22325 $ac_includes_default
22326 int
22327 main (void)
22328 {
22329 if ((intptr_t *) 0)
22330   return 0;
22331 if (sizeof (intptr_t))
22332   return 0;
22333   ;
22334   return 0;
22335 }
22336 _ACEOF
22337 rm -f "conftest.$ac_objext"
22338 if { (eval echo "$as_me:22338: \"$ac_compile\"") >&5
22339   (eval $ac_compile) 2>&5
22340   ac_status=$?
22341   echo "$as_me:22341: \$? = $ac_status" >&5
22342   (exit "$ac_status"); } &&
22343          { ac_try='test -s "conftest.$ac_objext"'
22344   { (eval echo "$as_me:22344: \"$ac_try\"") >&5
22345   (eval $ac_try) 2>&5
22346   ac_status=$?
22347   echo "$as_me:22347: \$? = $ac_status" >&5
22348   (exit "$ac_status"); }; }; then
22349   ac_cv_type_intptr_t=yes
22350 else
22351   echo "$as_me: failed program was:" >&5
22352 cat "conftest.$ac_ext" >&5
22353 ac_cv_type_intptr_t=no
22354 fi
22355 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22356 fi
22357 echo "$as_me:22357: result: $ac_cv_type_intptr_t" >&5
22358 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22359 if test "$ac_cv_type_intptr_t" = yes; then
22360   :
22361 else
22362
22363 cat >>confdefs.h <<EOF
22364 #define intptr_t long
22365 EOF
22366
22367 fi
22368
22369 echo "$as_me:22369: checking for ssize_t" >&5
22370 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22371 if test "${ac_cv_type_ssize_t+set}" = set; then
22372   echo $ECHO_N "(cached) $ECHO_C" >&6
22373 else
22374   cat >"conftest.$ac_ext" <<_ACEOF
22375 #line 22375 "configure"
22376 #include "confdefs.h"
22377 $ac_includes_default
22378 int
22379 main (void)
22380 {
22381 if ((ssize_t *) 0)
22382   return 0;
22383 if (sizeof (ssize_t))
22384   return 0;
22385   ;
22386   return 0;
22387 }
22388 _ACEOF
22389 rm -f "conftest.$ac_objext"
22390 if { (eval echo "$as_me:22390: \"$ac_compile\"") >&5
22391   (eval $ac_compile) 2>&5
22392   ac_status=$?
22393   echo "$as_me:22393: \$? = $ac_status" >&5
22394   (exit "$ac_status"); } &&
22395          { ac_try='test -s "conftest.$ac_objext"'
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_type_ssize_t=yes
22402 else
22403   echo "$as_me: failed program was:" >&5
22404 cat "conftest.$ac_ext" >&5
22405 ac_cv_type_ssize_t=no
22406 fi
22407 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22408 fi
22409 echo "$as_me:22409: result: $ac_cv_type_ssize_t" >&5
22410 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22411 if test "$ac_cv_type_ssize_t" = yes; then
22412   :
22413 else
22414
22415 cat >>confdefs.h <<EOF
22416 #define ssize_t int
22417 EOF
22418
22419 fi
22420
22421 echo "$as_me:22421: checking for type sigaction_t" >&5
22422 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22423 if test "${cf_cv_type_sigaction+set}" = set; then
22424   echo $ECHO_N "(cached) $ECHO_C" >&6
22425 else
22426
22427         cat >"conftest.$ac_ext" <<_ACEOF
22428 #line 22428 "configure"
22429 #include "confdefs.h"
22430
22431 #include <signal.h>
22432 int
22433 main (void)
22434 {
22435 sigaction_t x
22436   ;
22437   return 0;
22438 }
22439 _ACEOF
22440 rm -f "conftest.$ac_objext"
22441 if { (eval echo "$as_me:22441: \"$ac_compile\"") >&5
22442   (eval $ac_compile) 2>&5
22443   ac_status=$?
22444   echo "$as_me:22444: \$? = $ac_status" >&5
22445   (exit "$ac_status"); } &&
22446          { ac_try='test -s "conftest.$ac_objext"'
22447   { (eval echo "$as_me:22447: \"$ac_try\"") >&5
22448   (eval $ac_try) 2>&5
22449   ac_status=$?
22450   echo "$as_me:22450: \$? = $ac_status" >&5
22451   (exit "$ac_status"); }; }; then
22452   cf_cv_type_sigaction=yes
22453 else
22454   echo "$as_me: failed program was:" >&5
22455 cat "conftest.$ac_ext" >&5
22456 cf_cv_type_sigaction=no
22457 fi
22458 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22459 fi
22460
22461 echo "$as_me:22461: result: $cf_cv_type_sigaction" >&5
22462 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22463 test "$cf_cv_type_sigaction" = yes &&
22464 cat >>confdefs.h <<\EOF
22465 #define HAVE_TYPE_SIGACTION 1
22466 EOF
22467
22468 echo "$as_me:22468: checking declaration of size-change" >&5
22469 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22470 if test "${cf_cv_sizechange+set}" = set; then
22471   echo $ECHO_N "(cached) $ECHO_C" >&6
22472 else
22473
22474         cf_cv_sizechange=unknown
22475         cf_save_CPPFLAGS="$CPPFLAGS"
22476
22477 for cf_opts in "" "NEED_PTEM_H"
22478 do
22479
22480         CPPFLAGS="$cf_save_CPPFLAGS"
22481         if test -n "$cf_opts"
22482         then
22483
22484         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22485         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22486
22487         fi
22488         cat >"conftest.$ac_ext" <<_ACEOF
22489 #line 22489 "configure"
22490 #include "confdefs.h"
22491 #include <sys/types.h>
22492 #ifdef HAVE_TERMIOS_H
22493 #include <termios.h>
22494 #else
22495 #ifdef HAVE_TERMIO_H
22496 #include <termio.h>
22497 #endif
22498 #endif
22499
22500 #ifdef NEED_PTEM_H
22501 /* This is a workaround for SCO:  they neglected to define struct winsize in
22502  * termios.h -- it is only in termio.h and ptem.h
22503  */
22504 #include <sys/stream.h>
22505 #include <sys/ptem.h>
22506 #endif
22507
22508 #ifdef HAVE_SYS_IOCTL_H
22509 #include <sys/ioctl.h>
22510 #endif
22511
22512 int
22513 main (void)
22514 {
22515
22516 #ifdef TIOCGSIZE
22517         struct ttysize win;     /* SunOS 3.0... */
22518         int y = win.ts_lines = 2;
22519         int x = win.ts_cols = 1;
22520         (void)y;
22521         (void)x;
22522 #else
22523 #ifdef TIOCGWINSZ
22524         struct winsize win;     /* everything else */
22525         int y = win.ws_row = 2;
22526         int x = win.ws_col = 1;
22527         (void)y;
22528         (void)x;
22529 #else
22530         no TIOCGSIZE or TIOCGWINSZ
22531 #endif /* TIOCGWINSZ */
22532 #endif /* TIOCGSIZE */
22533
22534   ;
22535   return 0;
22536 }
22537 _ACEOF
22538 rm -f "conftest.$ac_objext"
22539 if { (eval echo "$as_me:22539: \"$ac_compile\"") >&5
22540   (eval $ac_compile) 2>&5
22541   ac_status=$?
22542   echo "$as_me:22542: \$? = $ac_status" >&5
22543   (exit "$ac_status"); } &&
22544          { ac_try='test -s "conftest.$ac_objext"'
22545   { (eval echo "$as_me:22545: \"$ac_try\"") >&5
22546   (eval $ac_try) 2>&5
22547   ac_status=$?
22548   echo "$as_me:22548: \$? = $ac_status" >&5
22549   (exit "$ac_status"); }; }; then
22550   cf_cv_sizechange=yes
22551 else
22552   echo "$as_me: failed program was:" >&5
22553 cat "conftest.$ac_ext" >&5
22554 cf_cv_sizechange=no
22555 fi
22556 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22557
22558         CPPFLAGS="$cf_save_CPPFLAGS"
22559         if test "$cf_cv_sizechange" = yes ; then
22560                 echo "size-change succeeded ($cf_opts)" >&5
22561                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22562                 break
22563         fi
22564 done
22565
22566 fi
22567 echo "$as_me:22567: result: $cf_cv_sizechange" >&5
22568 echo "${ECHO_T}$cf_cv_sizechange" >&6
22569 if test "$cf_cv_sizechange" != no ; then
22570
22571 cat >>confdefs.h <<\EOF
22572 #define HAVE_SIZECHANGE 1
22573 EOF
22574
22575         case "$cf_cv_sizechange" in
22576         (NEED*)
22577                 cat >>confdefs.h <<EOF
22578 #define $cf_cv_sizechange  1
22579 EOF
22580
22581                 ;;
22582         esac
22583 fi
22584
22585 echo "$as_me:22585: checking for memmove" >&5
22586 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22587 if test "${ac_cv_func_memmove+set}" = set; then
22588   echo $ECHO_N "(cached) $ECHO_C" >&6
22589 else
22590   cat >"conftest.$ac_ext" <<_ACEOF
22591 #line 22591 "configure"
22592 #include "confdefs.h"
22593 #define memmove autoconf_temporary
22594 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22595 #undef memmove
22596
22597 #ifdef __cplusplus
22598 extern "C"
22599 #endif
22600
22601 /* We use char because int might match the return type of a gcc2
22602    builtin and then its argument prototype would still apply.  */
22603 char memmove (void);
22604
22605 int
22606 main (void)
22607 {
22608
22609 /* The GNU C library defines stubs for functions which it implements
22610     to always fail with ENOSYS.  Some functions are actually named
22611     something starting with __ and the normal name is an alias.  */
22612 #if defined (__stub_memmove) || defined (__stub___memmove)
22613 #error found stub for memmove
22614 #endif
22615
22616         return memmove ();
22617   ;
22618   return 0;
22619 }
22620 _ACEOF
22621 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22622 if { (eval echo "$as_me:22622: \"$ac_link\"") >&5
22623   (eval $ac_link) 2>&5
22624   ac_status=$?
22625   echo "$as_me:22625: \$? = $ac_status" >&5
22626   (exit "$ac_status"); } &&
22627          { ac_try='test -s "conftest$ac_exeext"'
22628   { (eval echo "$as_me:22628: \"$ac_try\"") >&5
22629   (eval $ac_try) 2>&5
22630   ac_status=$?
22631   echo "$as_me:22631: \$? = $ac_status" >&5
22632   (exit "$ac_status"); }; }; then
22633   ac_cv_func_memmove=yes
22634 else
22635   echo "$as_me: failed program was:" >&5
22636 cat "conftest.$ac_ext" >&5
22637 ac_cv_func_memmove=no
22638 fi
22639 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22640 fi
22641 echo "$as_me:22641: result: $ac_cv_func_memmove" >&5
22642 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22643 if test "$ac_cv_func_memmove" = yes; then
22644   :
22645 else
22646
22647 echo "$as_me:22647: checking for bcopy" >&5
22648 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22649 if test "${ac_cv_func_bcopy+set}" = set; then
22650   echo $ECHO_N "(cached) $ECHO_C" >&6
22651 else
22652   cat >"conftest.$ac_ext" <<_ACEOF
22653 #line 22653 "configure"
22654 #include "confdefs.h"
22655 #define bcopy autoconf_temporary
22656 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22657 #undef bcopy
22658
22659 #ifdef __cplusplus
22660 extern "C"
22661 #endif
22662
22663 /* We use char because int might match the return type of a gcc2
22664    builtin and then its argument prototype would still apply.  */
22665 char bcopy (void);
22666
22667 int
22668 main (void)
22669 {
22670
22671 /* The GNU C library defines stubs for functions which it implements
22672     to always fail with ENOSYS.  Some functions are actually named
22673     something starting with __ and the normal name is an alias.  */
22674 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22675 #error found stub for bcopy
22676 #endif
22677
22678         return bcopy ();
22679   ;
22680   return 0;
22681 }
22682 _ACEOF
22683 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22684 if { (eval echo "$as_me:22684: \"$ac_link\"") >&5
22685   (eval $ac_link) 2>&5
22686   ac_status=$?
22687   echo "$as_me:22687: \$? = $ac_status" >&5
22688   (exit "$ac_status"); } &&
22689          { ac_try='test -s "conftest$ac_exeext"'
22690   { (eval echo "$as_me:22690: \"$ac_try\"") >&5
22691   (eval $ac_try) 2>&5
22692   ac_status=$?
22693   echo "$as_me:22693: \$? = $ac_status" >&5
22694   (exit "$ac_status"); }; }; then
22695   ac_cv_func_bcopy=yes
22696 else
22697   echo "$as_me: failed program was:" >&5
22698 cat "conftest.$ac_ext" >&5
22699 ac_cv_func_bcopy=no
22700 fi
22701 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22702 fi
22703 echo "$as_me:22703: result: $ac_cv_func_bcopy" >&5
22704 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22705 if test "$ac_cv_func_bcopy" = yes; then
22706
22707         echo "$as_me:22707: checking if bcopy does overlapping moves" >&5
22708 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22709 if test "${cf_cv_good_bcopy+set}" = set; then
22710   echo $ECHO_N "(cached) $ECHO_C" >&6
22711 else
22712
22713                 if test "$cross_compiling" = yes; then
22714   cf_cv_good_bcopy=unknown
22715 else
22716   cat >"conftest.$ac_ext" <<_ACEOF
22717 #line 22717 "configure"
22718 #include "confdefs.h"
22719
22720 int main(void) {
22721         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22722         char temp[40];
22723         bcopy(data, temp, sizeof(data));
22724         bcopy(temp+10, temp, 15);
22725         bcopy(temp+5, temp+15, 10);
22726         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22727 }
22728
22729 _ACEOF
22730 rm -f "conftest$ac_exeext"
22731 if { (eval echo "$as_me:22731: \"$ac_link\"") >&5
22732   (eval $ac_link) 2>&5
22733   ac_status=$?
22734   echo "$as_me:22734: \$? = $ac_status" >&5
22735   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22736   { (eval echo "$as_me:22736: \"$ac_try\"") >&5
22737   (eval $ac_try) 2>&5
22738   ac_status=$?
22739   echo "$as_me:22739: \$? = $ac_status" >&5
22740   (exit "$ac_status"); }; }; then
22741   cf_cv_good_bcopy=yes
22742 else
22743   echo "$as_me: program exited with status $ac_status" >&5
22744 echo "$as_me: failed program was:" >&5
22745 cat "conftest.$ac_ext" >&5
22746 cf_cv_good_bcopy=no
22747 fi
22748 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22749 fi
22750
22751 fi
22752 echo "$as_me:22752: result: $cf_cv_good_bcopy" >&5
22753 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22754
22755 else
22756   cf_cv_good_bcopy=no
22757 fi
22758
22759         if test "$cf_cv_good_bcopy" = yes ; then
22760
22761 cat >>confdefs.h <<\EOF
22762 #define USE_OK_BCOPY 1
22763 EOF
22764
22765         else
22766
22767 cat >>confdefs.h <<\EOF
22768 #define USE_MY_MEMMOVE 1
22769 EOF
22770
22771         fi
22772
22773 fi
22774
22775 tty >/dev/null 2>&1 || {
22776 for ac_func in posix_openpt
22777 do
22778 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22779 echo "$as_me:22779: checking for $ac_func" >&5
22780 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22781 if eval "test \"\${$as_ac_var+set}\" = set"; then
22782   echo $ECHO_N "(cached) $ECHO_C" >&6
22783 else
22784   cat >"conftest.$ac_ext" <<_ACEOF
22785 #line 22785 "configure"
22786 #include "confdefs.h"
22787 #define $ac_func autoconf_temporary
22788 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22789 #undef $ac_func
22790
22791 #ifdef __cplusplus
22792 extern "C"
22793 #endif
22794
22795 /* We use char because int might match the return type of a gcc2
22796    builtin and then its argument prototype would still apply.  */
22797 char $ac_func (void);
22798
22799 int
22800 main (void)
22801 {
22802
22803 /* The GNU C library defines stubs for functions which it implements
22804     to always fail with ENOSYS.  Some functions are actually named
22805     something starting with __ and the normal name is an alias.  */
22806 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22807 #error found stub for $ac_func
22808 #endif
22809
22810         return $ac_func ();
22811   ;
22812   return 0;
22813 }
22814 _ACEOF
22815 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22816 if { (eval echo "$as_me:22816: \"$ac_link\"") >&5
22817   (eval $ac_link) 2>&5
22818   ac_status=$?
22819   echo "$as_me:22819: \$? = $ac_status" >&5
22820   (exit "$ac_status"); } &&
22821          { ac_try='test -s "conftest$ac_exeext"'
22822   { (eval echo "$as_me:22822: \"$ac_try\"") >&5
22823   (eval $ac_try) 2>&5
22824   ac_status=$?
22825   echo "$as_me:22825: \$? = $ac_status" >&5
22826   (exit "$ac_status"); }; }; then
22827   eval "$as_ac_var=yes"
22828 else
22829   echo "$as_me: failed program was:" >&5
22830 cat "conftest.$ac_ext" >&5
22831 eval "$as_ac_var=no"
22832 fi
22833 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22834 fi
22835 echo "$as_me:22835: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22836 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22837 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22838   cat >>confdefs.h <<EOF
22839 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22840 EOF
22841
22842 fi
22843 done
22844  }
22845 echo "$as_me:22845: checking if poll really works" >&5
22846 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22847 if test "${cf_cv_working_poll+set}" = set; then
22848   echo $ECHO_N "(cached) $ECHO_C" >&6
22849 else
22850
22851 if test "$cross_compiling" = yes; then
22852   cf_cv_working_poll=unknown
22853 else
22854   cat >"conftest.$ac_ext" <<_ACEOF
22855 #line 22855 "configure"
22856 #include "confdefs.h"
22857
22858 #include <stdlib.h>
22859 #include <stdio.h>
22860 #include <unistd.h>
22861 #include <fcntl.h>
22862 #ifdef HAVE_POLL_H
22863 #include <poll.h>
22864 #else
22865 #include <sys/poll.h>
22866 #endif
22867 int main(void) {
22868         struct pollfd myfds;
22869         int ret;
22870
22871         /* check for Darwin bug with respect to "devices" */
22872         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22873         if (myfds.fd < 0)
22874                 myfds.fd = 0;
22875         myfds.events = POLLIN;
22876         myfds.revents = 0;
22877
22878         ret = poll(&myfds, 1, 100);
22879
22880         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22881                 ret = -1;
22882         } else {
22883                 int fd = 0;
22884                 if (!isatty(fd)) {
22885                         fd = open("/dev/tty", 2);       /* O_RDWR */
22886                 }
22887 #ifdef HAVE_POSIX_OPENPT
22888                 if (fd < 0) {
22889                         fd = posix_openpt(O_RDWR);
22890                 }
22891 #endif
22892
22893                 if (fd >= 0) {
22894                         /* also check with standard input */
22895                         myfds.fd = fd;
22896                         myfds.events = POLLIN;
22897                         myfds.revents = 0;
22898                         ret = poll(&myfds, 1, 100);
22899                 } else {
22900                         ret = -1;
22901                 }
22902         }
22903         ${cf_cv_main_return:-return}(ret < 0);
22904 }
22905 _ACEOF
22906 rm -f "conftest$ac_exeext"
22907 if { (eval echo "$as_me:22907: \"$ac_link\"") >&5
22908   (eval $ac_link) 2>&5
22909   ac_status=$?
22910   echo "$as_me:22910: \$? = $ac_status" >&5
22911   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22912   { (eval echo "$as_me:22912: \"$ac_try\"") >&5
22913   (eval $ac_try) 2>&5
22914   ac_status=$?
22915   echo "$as_me:22915: \$? = $ac_status" >&5
22916   (exit "$ac_status"); }; }; then
22917   cf_cv_working_poll=yes
22918 else
22919   echo "$as_me: program exited with status $ac_status" >&5
22920 echo "$as_me: failed program was:" >&5
22921 cat "conftest.$ac_ext" >&5
22922 cf_cv_working_poll=no
22923 fi
22924 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22925 fi
22926 fi
22927 echo "$as_me:22927: result: $cf_cv_working_poll" >&5
22928 echo "${ECHO_T}$cf_cv_working_poll" >&6
22929 test "$cf_cv_working_poll" = "yes" &&
22930 cat >>confdefs.h <<\EOF
22931 #define HAVE_WORKING_POLL 1
22932 EOF
22933
22934 echo "$as_me:22934: checking for va_copy" >&5
22935 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
22936 if test "${cf_cv_have_va_copy+set}" = set; then
22937   echo $ECHO_N "(cached) $ECHO_C" >&6
22938 else
22939
22940 cat >"conftest.$ac_ext" <<_ACEOF
22941 #line 22941 "configure"
22942 #include "confdefs.h"
22943
22944 #include <stdarg.h>
22945
22946 int
22947 main (void)
22948 {
22949
22950         static va_list dst;
22951         static va_list src;
22952         va_copy(dst, src)
22953   ;
22954   return 0;
22955 }
22956 _ACEOF
22957 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22958 if { (eval echo "$as_me:22958: \"$ac_link\"") >&5
22959   (eval $ac_link) 2>&5
22960   ac_status=$?
22961   echo "$as_me:22961: \$? = $ac_status" >&5
22962   (exit "$ac_status"); } &&
22963          { ac_try='test -s "conftest$ac_exeext"'
22964   { (eval echo "$as_me:22964: \"$ac_try\"") >&5
22965   (eval $ac_try) 2>&5
22966   ac_status=$?
22967   echo "$as_me:22967: \$? = $ac_status" >&5
22968   (exit "$ac_status"); }; }; then
22969   cf_cv_have_va_copy=yes
22970 else
22971   echo "$as_me: failed program was:" >&5
22972 cat "conftest.$ac_ext" >&5
22973 cf_cv_have_va_copy=no
22974 fi
22975 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22976 fi
22977 echo "$as_me:22977: result: $cf_cv_have_va_copy" >&5
22978 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
22979
22980 if test "$cf_cv_have_va_copy" = yes;
22981 then
22982
22983 cat >>confdefs.h <<\EOF
22984 #define HAVE_VA_COPY 1
22985 EOF
22986
22987 else # !cf_cv_have_va_copy
22988
22989 echo "$as_me:22989: checking for __va_copy" >&5
22990 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
22991 if test "${cf_cv_have___va_copy+set}" = set; then
22992   echo $ECHO_N "(cached) $ECHO_C" >&6
22993 else
22994
22995 cat >"conftest.$ac_ext" <<_ACEOF
22996 #line 22996 "configure"
22997 #include "confdefs.h"
22998
22999 #include <stdarg.h>
23000
23001 int
23002 main (void)
23003 {
23004
23005         static va_list dst;
23006         static va_list src;
23007         __va_copy(dst, src)
23008   ;
23009   return 0;
23010 }
23011 _ACEOF
23012 rm -f "conftest.$ac_objext" "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"); } &&
23018          { ac_try='test -s "conftest$ac_exeext"'
23019   { (eval echo "$as_me:23019: \"$ac_try\"") >&5
23020   (eval $ac_try) 2>&5
23021   ac_status=$?
23022   echo "$as_me:23022: \$? = $ac_status" >&5
23023   (exit "$ac_status"); }; }; then
23024   cf_cv_have___va_copy=yes
23025 else
23026   echo "$as_me: failed program was:" >&5
23027 cat "conftest.$ac_ext" >&5
23028 cf_cv_have___va_copy=no
23029 fi
23030 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23031 fi
23032 echo "$as_me:23032: result: $cf_cv_have___va_copy" >&5
23033 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23034
23035 if test "$cf_cv_have___va_copy" = yes
23036 then
23037
23038 cat >>confdefs.h <<\EOF
23039 #define HAVE___VA_COPY 1
23040 EOF
23041
23042 else # !cf_cv_have___va_copy
23043
23044 echo "$as_me:23044: checking for __builtin_va_copy" >&5
23045 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23046 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23047   echo $ECHO_N "(cached) $ECHO_C" >&6
23048 else
23049
23050 cat >"conftest.$ac_ext" <<_ACEOF
23051 #line 23051 "configure"
23052 #include "confdefs.h"
23053
23054 #include <stdarg.h>
23055
23056 int
23057 main (void)
23058 {
23059
23060         static va_list dst;
23061         static va_list src;
23062         __builtin_va_copy(dst, src)
23063   ;
23064   return 0;
23065 }
23066 _ACEOF
23067 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23068 if { (eval echo "$as_me:23068: \"$ac_link\"") >&5
23069   (eval $ac_link) 2>&5
23070   ac_status=$?
23071   echo "$as_me:23071: \$? = $ac_status" >&5
23072   (exit "$ac_status"); } &&
23073          { ac_try='test -s "conftest$ac_exeext"'
23074   { (eval echo "$as_me:23074: \"$ac_try\"") >&5
23075   (eval $ac_try) 2>&5
23076   ac_status=$?
23077   echo "$as_me:23077: \$? = $ac_status" >&5
23078   (exit "$ac_status"); }; }; then
23079   cf_cv_have___builtin_va_copy=yes
23080 else
23081   echo "$as_me: failed program was:" >&5
23082 cat "conftest.$ac_ext" >&5
23083 cf_cv_have___builtin_va_copy=no
23084 fi
23085 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23086 fi
23087 echo "$as_me:23087: result: $cf_cv_have___builtin_va_copy" >&5
23088 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23089
23090 test "$cf_cv_have___builtin_va_copy" = yes &&
23091
23092 cat >>confdefs.h <<\EOF
23093 #define HAVE___BUILTIN_VA_COPY 1
23094 EOF
23095
23096 fi # cf_cv_have___va_copy
23097
23098 fi # cf_cv_have_va_copy
23099
23100 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23101 (*yes*)
23102         ;;
23103
23104 (*)
23105         echo "$as_me:23105: checking if we can simply copy va_list" >&5
23106 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23107 if test "${cf_cv_pointer_va_list+set}" = set; then
23108   echo $ECHO_N "(cached) $ECHO_C" >&6
23109 else
23110
23111 cat >"conftest.$ac_ext" <<_ACEOF
23112 #line 23112 "configure"
23113 #include "confdefs.h"
23114
23115 #include <stdarg.h>
23116
23117 int
23118 main (void)
23119 {
23120
23121         va_list dst;
23122         va_list src;
23123         dst = src
23124   ;
23125   return 0;
23126 }
23127 _ACEOF
23128 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23129 if { (eval echo "$as_me:23129: \"$ac_link\"") >&5
23130   (eval $ac_link) 2>&5
23131   ac_status=$?
23132   echo "$as_me:23132: \$? = $ac_status" >&5
23133   (exit "$ac_status"); } &&
23134          { ac_try='test -s "conftest$ac_exeext"'
23135   { (eval echo "$as_me:23135: \"$ac_try\"") >&5
23136   (eval $ac_try) 2>&5
23137   ac_status=$?
23138   echo "$as_me:23138: \$? = $ac_status" >&5
23139   (exit "$ac_status"); }; }; then
23140   cf_cv_pointer_va_list=yes
23141 else
23142   echo "$as_me: failed program was:" >&5
23143 cat "conftest.$ac_ext" >&5
23144 cf_cv_pointer_va_list=no
23145 fi
23146 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23147 fi
23148 echo "$as_me:23148: result: $cf_cv_pointer_va_list" >&5
23149 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23150
23151         if test "$cf_cv_pointer_va_list" = no
23152         then
23153                 echo "$as_me:23153: checking if we can copy va_list indirectly" >&5
23154 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23155 if test "${cf_cv_array_va_list+set}" = set; then
23156   echo $ECHO_N "(cached) $ECHO_C" >&6
23157 else
23158
23159 cat >"conftest.$ac_ext" <<_ACEOF
23160 #line 23160 "configure"
23161 #include "confdefs.h"
23162
23163 #include <stdarg.h>
23164
23165 int
23166 main (void)
23167 {
23168
23169         va_list dst;
23170         va_list src;
23171         *dst = *src
23172   ;
23173   return 0;
23174 }
23175 _ACEOF
23176 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23177 if { (eval echo "$as_me:23177: \"$ac_link\"") >&5
23178   (eval $ac_link) 2>&5
23179   ac_status=$?
23180   echo "$as_me:23180: \$? = $ac_status" >&5
23181   (exit "$ac_status"); } &&
23182          { ac_try='test -s "conftest$ac_exeext"'
23183   { (eval echo "$as_me:23183: \"$ac_try\"") >&5
23184   (eval $ac_try) 2>&5
23185   ac_status=$?
23186   echo "$as_me:23186: \$? = $ac_status" >&5
23187   (exit "$ac_status"); }; }; then
23188   cf_cv_array_va_list=yes
23189 else
23190   echo "$as_me: failed program was:" >&5
23191 cat "conftest.$ac_ext" >&5
23192 cf_cv_array_va_list=no
23193 fi
23194 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23195 fi
23196 echo "$as_me:23196: result: $cf_cv_array_va_list" >&5
23197 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23198                 test "$cf_cv_array_va_list" = yes &&
23199 cat >>confdefs.h <<\EOF
23200 #define ARRAY_VA_LIST 1
23201 EOF
23202
23203         fi
23204         ;;
23205 esac
23206
23207 echo "$as_me:23207: checking for pid_t" >&5
23208 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23209 if test "${ac_cv_type_pid_t+set}" = set; then
23210   echo $ECHO_N "(cached) $ECHO_C" >&6
23211 else
23212   cat >"conftest.$ac_ext" <<_ACEOF
23213 #line 23213 "configure"
23214 #include "confdefs.h"
23215 $ac_includes_default
23216 int
23217 main (void)
23218 {
23219 if ((pid_t *) 0)
23220   return 0;
23221 if (sizeof (pid_t))
23222   return 0;
23223   ;
23224   return 0;
23225 }
23226 _ACEOF
23227 rm -f "conftest.$ac_objext"
23228 if { (eval echo "$as_me:23228: \"$ac_compile\"") >&5
23229   (eval $ac_compile) 2>&5
23230   ac_status=$?
23231   echo "$as_me:23231: \$? = $ac_status" >&5
23232   (exit "$ac_status"); } &&
23233          { ac_try='test -s "conftest.$ac_objext"'
23234   { (eval echo "$as_me:23234: \"$ac_try\"") >&5
23235   (eval $ac_try) 2>&5
23236   ac_status=$?
23237   echo "$as_me:23237: \$? = $ac_status" >&5
23238   (exit "$ac_status"); }; }; then
23239   ac_cv_type_pid_t=yes
23240 else
23241   echo "$as_me: failed program was:" >&5
23242 cat "conftest.$ac_ext" >&5
23243 ac_cv_type_pid_t=no
23244 fi
23245 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23246 fi
23247 echo "$as_me:23247: result: $ac_cv_type_pid_t" >&5
23248 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23249 if test "$ac_cv_type_pid_t" = yes; then
23250   :
23251 else
23252
23253 cat >>confdefs.h <<EOF
23254 #define pid_t int
23255 EOF
23256
23257 fi
23258
23259 for ac_header in unistd.h vfork.h
23260 do
23261 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23262 echo "$as_me:23262: checking for $ac_header" >&5
23263 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23264 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23265   echo $ECHO_N "(cached) $ECHO_C" >&6
23266 else
23267   cat >"conftest.$ac_ext" <<_ACEOF
23268 #line 23268 "configure"
23269 #include "confdefs.h"
23270 #include <$ac_header>
23271 _ACEOF
23272 if { (eval echo "$as_me:23272: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23273   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23274   ac_status=$?
23275   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23276   rm -f conftest.er1
23277   cat conftest.err >&5
23278   echo "$as_me:23278: \$? = $ac_status" >&5
23279   (exit "$ac_status"); } >/dev/null; then
23280   if test -s conftest.err; then
23281     ac_cpp_err=$ac_c_preproc_warn_flag
23282   else
23283     ac_cpp_err=
23284   fi
23285 else
23286   ac_cpp_err=yes
23287 fi
23288 if test -z "$ac_cpp_err"; then
23289   eval "$as_ac_Header=yes"
23290 else
23291   echo "$as_me: failed program was:" >&5
23292   cat "conftest.$ac_ext" >&5
23293   eval "$as_ac_Header=no"
23294 fi
23295 rm -f conftest.err "conftest.$ac_ext"
23296 fi
23297 echo "$as_me:23297: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23298 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23299 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23300   cat >>confdefs.h <<EOF
23301 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23302 EOF
23303
23304 fi
23305 done
23306
23307 for ac_func in fork vfork
23308 do
23309 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23310 echo "$as_me:23310: checking for $ac_func" >&5
23311 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23312 if eval "test \"\${$as_ac_var+set}\" = set"; then
23313   echo $ECHO_N "(cached) $ECHO_C" >&6
23314 else
23315   cat >"conftest.$ac_ext" <<_ACEOF
23316 #line 23316 "configure"
23317 #include "confdefs.h"
23318 #define $ac_func autoconf_temporary
23319 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23320 #undef $ac_func
23321
23322 #ifdef __cplusplus
23323 extern "C"
23324 #endif
23325
23326 /* We use char because int might match the return type of a gcc2
23327    builtin and then its argument prototype would still apply.  */
23328 char $ac_func (void);
23329
23330 int
23331 main (void)
23332 {
23333
23334 /* The GNU C library defines stubs for functions which it implements
23335     to always fail with ENOSYS.  Some functions are actually named
23336     something starting with __ and the normal name is an alias.  */
23337 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23338 #error found stub for $ac_func
23339 #endif
23340
23341         return $ac_func ();
23342   ;
23343   return 0;
23344 }
23345 _ACEOF
23346 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23347 if { (eval echo "$as_me:23347: \"$ac_link\"") >&5
23348   (eval $ac_link) 2>&5
23349   ac_status=$?
23350   echo "$as_me:23350: \$? = $ac_status" >&5
23351   (exit "$ac_status"); } &&
23352          { ac_try='test -s "conftest$ac_exeext"'
23353   { (eval echo "$as_me:23353: \"$ac_try\"") >&5
23354   (eval $ac_try) 2>&5
23355   ac_status=$?
23356   echo "$as_me:23356: \$? = $ac_status" >&5
23357   (exit "$ac_status"); }; }; then
23358   eval "$as_ac_var=yes"
23359 else
23360   echo "$as_me: failed program was:" >&5
23361 cat "conftest.$ac_ext" >&5
23362 eval "$as_ac_var=no"
23363 fi
23364 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23365 fi
23366 echo "$as_me:23366: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23367 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23368 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23369   cat >>confdefs.h <<EOF
23370 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23371 EOF
23372
23373 fi
23374 done
23375
23376 ac_cv_func_fork_works=$ac_cv_func_fork
23377 if test "x$ac_cv_func_fork" = xyes; then
23378   echo "$as_me:23378: checking for working fork" >&5
23379 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23380 if test "${ac_cv_func_fork_works+set}" = set; then
23381   echo $ECHO_N "(cached) $ECHO_C" >&6
23382 else
23383   if test "$cross_compiling" = yes; then
23384   ac_cv_func_fork_works=cross
23385 else
23386   cat >"conftest.$ac_ext" <<_ACEOF
23387 /* By Rüdiger Kuhlmann. */
23388       #include <sys/types.h>
23389       #if HAVE_UNISTD_H
23390       # include <unistd.h>
23391       #endif
23392       /* Some systems only have a dummy stub for fork() */
23393       int main (void)
23394       {
23395         if (fork() < 0)
23396           $ac_main_return (1);
23397         $ac_main_return (0);
23398       }
23399 _ACEOF
23400 rm -f "conftest$ac_exeext"
23401 if { (eval echo "$as_me:23401: \"$ac_link\"") >&5
23402   (eval $ac_link) 2>&5
23403   ac_status=$?
23404   echo "$as_me:23404: \$? = $ac_status" >&5
23405   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23406   { (eval echo "$as_me:23406: \"$ac_try\"") >&5
23407   (eval $ac_try) 2>&5
23408   ac_status=$?
23409   echo "$as_me:23409: \$? = $ac_status" >&5
23410   (exit "$ac_status"); }; }; then
23411   ac_cv_func_fork_works=yes
23412 else
23413   echo "$as_me: program exited with status $ac_status" >&5
23414 echo "$as_me: failed program was:" >&5
23415 cat "conftest.$ac_ext" >&5
23416 ac_cv_func_fork_works=no
23417 fi
23418 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23419 fi
23420 fi
23421 echo "$as_me:23421: result: $ac_cv_func_fork_works" >&5
23422 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23423
23424 fi
23425 if test "x$ac_cv_func_fork_works" = xcross; then
23426   case $host in
23427     *-*-amigaos* | *-*-msdosdjgpp*)
23428       # Override, as these systems have only a dummy fork() stub
23429       ac_cv_func_fork_works=no
23430       ;;
23431     *)
23432       ac_cv_func_fork_works=yes
23433       ;;
23434   esac
23435   { echo "$as_me:23435: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23436 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23437 fi
23438 ac_cv_func_vfork_works=$ac_cv_func_vfork
23439 if test "x$ac_cv_func_vfork" = xyes; then
23440   echo "$as_me:23440: checking for working vfork" >&5
23441 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23442 if test "${ac_cv_func_vfork_works+set}" = set; then
23443   echo $ECHO_N "(cached) $ECHO_C" >&6
23444 else
23445   if test "$cross_compiling" = yes; then
23446   ac_cv_func_vfork_works=cross
23447 else
23448   cat >"conftest.$ac_ext" <<_ACEOF
23449 #line 23449 "configure"
23450 #include "confdefs.h"
23451 /* Thanks to Paul Eggert for this test.  */
23452 #include <stdio.h>
23453 #include <sys/types.h>
23454 #include <sys/stat.h>
23455 #if HAVE_UNISTD_H
23456 # include <unistd.h>
23457 #endif
23458 #if HAVE_VFORK_H
23459 # include <vfork.h>
23460 #endif
23461 /* On some sparc systems, changes by the child to local and incoming
23462    argument registers are propagated back to the parent.  The compiler
23463    is told about this with #include <vfork.h>, but some compilers
23464    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23465    static variable whose address is put into a register that is
23466    clobbered by the vfork.  */
23467 static
23468 #ifdef __cplusplus
23469 sparc_address_test (int arg)
23470 # else
23471 sparc_address_test (arg) int arg;
23472 #endif
23473 {
23474   static pid_t child;
23475   if (!child) {
23476     child = vfork ();
23477     if (child < 0) {
23478       perror ("vfork");
23479       _exit(2);
23480     }
23481     if (!child) {
23482       arg = getpid();
23483       write(-1, "", 0);
23484       _exit (arg);
23485     }
23486   }
23487 }
23488
23489 int
23490 main (void)
23491 {
23492   pid_t parent = getpid ();
23493   pid_t child;
23494
23495   sparc_address_test ();
23496
23497   child = vfork ();
23498
23499   if (child == 0) {
23500     /* Here is another test for sparc vfork register problems.  This
23501        test uses lots of local variables, at least as many local
23502        variables as main has allocated so far including compiler
23503        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23504        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23505        reuse the register of parent for one of the local variables,
23506        since it will think that parent can't possibly be used any more
23507        in this routine.  Assigning to the local variable will thus
23508        munge parent in the parent process.  */
23509     pid_t
23510       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23511       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23512     /* Convince the compiler that p..p7 are live; otherwise, it might
23513        use the same hardware register for all 8 local variables.  */
23514     if (p != p1 || p != p2 || p != p3 || p != p4
23515         || p != p5 || p != p6 || p != p7)
23516       _exit(1);
23517
23518     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23519        from child file descriptors.  If the child closes a descriptor
23520        before it execs or exits, this munges the parent's descriptor
23521        as well.  Test for this by closing stdout in the child.  */
23522     _exit(close(fileno(stdout)) != 0);
23523   } else {
23524     int status;
23525     struct stat st;
23526
23527     while (wait(&status) != child)
23528       ;
23529     $ac_main_return(
23530          /* Was there some problem with vforking?  */
23531          child < 0
23532
23533          /* Did the child fail?  (This shouldn't happen.)  */
23534          || status
23535
23536          /* Did the vfork/compiler bug occur?  */
23537          || parent != getpid()
23538
23539          /* Did the file descriptor bug occur?  */
23540          || fstat(fileno(stdout), &st) != 0
23541          );
23542   }
23543 }
23544 _ACEOF
23545 rm -f "conftest$ac_exeext"
23546 if { (eval echo "$as_me:23546: \"$ac_link\"") >&5
23547   (eval $ac_link) 2>&5
23548   ac_status=$?
23549   echo "$as_me:23549: \$? = $ac_status" >&5
23550   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23551   { (eval echo "$as_me:23551: \"$ac_try\"") >&5
23552   (eval $ac_try) 2>&5
23553   ac_status=$?
23554   echo "$as_me:23554: \$? = $ac_status" >&5
23555   (exit "$ac_status"); }; }; then
23556   ac_cv_func_vfork_works=yes
23557 else
23558   echo "$as_me: program exited with status $ac_status" >&5
23559 echo "$as_me: failed program was:" >&5
23560 cat "conftest.$ac_ext" >&5
23561 ac_cv_func_vfork_works=no
23562 fi
23563 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23564 fi
23565 fi
23566 echo "$as_me:23566: result: $ac_cv_func_vfork_works" >&5
23567 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23568
23569 fi;
23570 if test "x$ac_cv_func_fork_works" = xcross; then
23571   ac_cv_func_vfork_works=ac_cv_func_vfork
23572   { echo "$as_me:23572: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23573 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23574 fi
23575
23576 if test "x$ac_cv_func_vfork_works" = xyes; then
23577
23578 cat >>confdefs.h <<\EOF
23579 #define HAVE_WORKING_VFORK 1
23580 EOF
23581
23582 else
23583
23584 cat >>confdefs.h <<\EOF
23585 #define vfork fork
23586 EOF
23587
23588 fi
23589 if test "x$ac_cv_func_fork_works" = xyes; then
23590
23591 cat >>confdefs.h <<\EOF
23592 #define HAVE_WORKING_FORK 1
23593 EOF
23594
23595 fi
23596
23597 echo "$as_me:23597: checking if fopen accepts explicit binary mode" >&5
23598 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23599 if test "${cf_cv_fopen_bin_r+set}" = set; then
23600   echo $ECHO_N "(cached) $ECHO_C" >&6
23601 else
23602
23603         if test "$cross_compiling" = yes; then
23604   cf_cv_fopen_bin_r=unknown
23605 else
23606   cat >"conftest.$ac_ext" <<_ACEOF
23607 #line 23607 "configure"
23608 #include "confdefs.h"
23609
23610 #include <stdio.h>
23611 int main(void) {
23612         FILE *fp = fopen("conftest.tmp", "wb");
23613         int rc = 0;
23614         if (fp != 0) {
23615                 int p, q;
23616                 for (p = 0; p < 256; ++p) {
23617                         fputc(p, fp);
23618                 }
23619                 fclose(fp);
23620                 fp = fopen("conftest.tmp", "rb");
23621                 if (fp != 0) {
23622                         for (p = 0; p < 256; ++p) {
23623                                 q = fgetc(fp);
23624                                 if (q != p) {
23625                                         rc = 1;
23626                                         break;
23627                                 }
23628                         }
23629                 } else {
23630                         rc = 1;
23631                 }
23632         } else {
23633                 rc = 1;
23634         }
23635         ${cf_cv_main_return:-return} (rc);
23636 }
23637
23638 _ACEOF
23639 rm -f "conftest$ac_exeext"
23640 if { (eval echo "$as_me:23640: \"$ac_link\"") >&5
23641   (eval $ac_link) 2>&5
23642   ac_status=$?
23643   echo "$as_me:23643: \$? = $ac_status" >&5
23644   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23645   { (eval echo "$as_me:23645: \"$ac_try\"") >&5
23646   (eval $ac_try) 2>&5
23647   ac_status=$?
23648   echo "$as_me:23648: \$? = $ac_status" >&5
23649   (exit "$ac_status"); }; }; then
23650   cf_cv_fopen_bin_r=yes
23651 else
23652   echo "$as_me: program exited with status $ac_status" >&5
23653 echo "$as_me: failed program was:" >&5
23654 cat "conftest.$ac_ext" >&5
23655 cf_cv_fopen_bin_r=no
23656 fi
23657 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23658 fi
23659
23660 fi
23661 echo "$as_me:23661: result: $cf_cv_fopen_bin_r" >&5
23662 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23663 test "x$cf_cv_fopen_bin_r" != xno &&
23664 cat >>confdefs.h <<\EOF
23665 #define USE_FOPEN_BIN_R 1
23666 EOF
23667
23668 # special check for test/ditto.c
23669
23670 echo "$as_me:23670: checking for openpty in -lutil" >&5
23671 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23672 if test "${ac_cv_lib_util_openpty+set}" = set; then
23673   echo $ECHO_N "(cached) $ECHO_C" >&6
23674 else
23675   ac_check_lib_save_LIBS=$LIBS
23676 LIBS="-lutil  $LIBS"
23677 cat >"conftest.$ac_ext" <<_ACEOF
23678 #line 23678 "configure"
23679 #include "confdefs.h"
23680
23681 /* Override any gcc2 internal prototype to avoid an error.  */
23682 #ifdef __cplusplus
23683 extern "C"
23684 #endif
23685 /* We use char because int might match the return type of a gcc2
23686    builtin and then its argument prototype would still apply.  */
23687 char openpty ();
23688 int
23689 main (void)
23690 {
23691 openpty ();
23692   ;
23693   return 0;
23694 }
23695 _ACEOF
23696 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23697 if { (eval echo "$as_me:23697: \"$ac_link\"") >&5
23698   (eval $ac_link) 2>&5
23699   ac_status=$?
23700   echo "$as_me:23700: \$? = $ac_status" >&5
23701   (exit "$ac_status"); } &&
23702          { ac_try='test -s "conftest$ac_exeext"'
23703   { (eval echo "$as_me:23703: \"$ac_try\"") >&5
23704   (eval $ac_try) 2>&5
23705   ac_status=$?
23706   echo "$as_me:23706: \$? = $ac_status" >&5
23707   (exit "$ac_status"); }; }; then
23708   ac_cv_lib_util_openpty=yes
23709 else
23710   echo "$as_me: failed program was:" >&5
23711 cat "conftest.$ac_ext" >&5
23712 ac_cv_lib_util_openpty=no
23713 fi
23714 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23715 LIBS=$ac_check_lib_save_LIBS
23716 fi
23717 echo "$as_me:23717: result: $ac_cv_lib_util_openpty" >&5
23718 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23719 if test "$ac_cv_lib_util_openpty" = yes; then
23720   cf_cv_lib_util=yes
23721 else
23722   cf_cv_lib_util=no
23723 fi
23724
23725 echo "$as_me:23725: checking for openpty header" >&5
23726 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23727 if test "${cf_cv_func_openpty+set}" = set; then
23728   echo $ECHO_N "(cached) $ECHO_C" >&6
23729 else
23730
23731         cf_save_LIBS="$LIBS"
23732         test "$cf_cv_lib_util" = yes && {
23733 cf_add_libs="$LIBS"
23734 # reverse order
23735 cf_add_0lib=
23736 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23737 # filter duplicates
23738 for cf_add_1lib in $cf_add_0lib; do
23739         for cf_add_2lib in $cf_add_libs; do
23740                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23741                         cf_add_1lib=
23742                         break
23743                 fi
23744         done
23745         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23746 done
23747 LIBS="$cf_add_libs"
23748  }
23749         for cf_header in pty.h libutil.h util.h
23750         do
23751         cat >"conftest.$ac_ext" <<_ACEOF
23752 #line 23752 "configure"
23753 #include "confdefs.h"
23754
23755 #include <$cf_header>
23756
23757 int
23758 main (void)
23759 {
23760
23761         int x = openpty((int *)0, (int *)0, (char *)0,
23762                                    (struct termios *)0, (struct winsize *)0);
23763
23764   ;
23765   return 0;
23766 }
23767 _ACEOF
23768 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23769 if { (eval echo "$as_me:23769: \"$ac_link\"") >&5
23770   (eval $ac_link) 2>&5
23771   ac_status=$?
23772   echo "$as_me:23772: \$? = $ac_status" >&5
23773   (exit "$ac_status"); } &&
23774          { ac_try='test -s "conftest$ac_exeext"'
23775   { (eval echo "$as_me:23775: \"$ac_try\"") >&5
23776   (eval $ac_try) 2>&5
23777   ac_status=$?
23778   echo "$as_me:23778: \$? = $ac_status" >&5
23779   (exit "$ac_status"); }; }; then
23780
23781                 cf_cv_func_openpty=$cf_header
23782                 break
23783
23784 else
23785   echo "$as_me: failed program was:" >&5
23786 cat "conftest.$ac_ext" >&5
23787
23788                 cf_cv_func_openpty=no
23789
23790 fi
23791 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23792         done
23793         LIBS="$cf_save_LIBS"
23794
23795 fi
23796 echo "$as_me:23796: result: $cf_cv_func_openpty" >&5
23797 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23798
23799 if test "$cf_cv_func_openpty" != no ; then
23800
23801 cat >>confdefs.h <<EOF
23802 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23803 EOF
23804
23805 cat >>confdefs.h <<\EOF
23806 #define USE_XTERM_PTY 1
23807 EOF
23808
23809         if test "x$cf_cv_lib_util" = xyes ; then
23810
23811 cf_add_libs="$TEST_LIBS"
23812 # reverse order
23813 cf_add_0lib=
23814 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23815 # filter duplicates
23816 for cf_add_1lib in $cf_add_0lib; do
23817         for cf_add_2lib in $cf_add_libs; do
23818                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23819                         cf_add_1lib=
23820                         break
23821                 fi
23822         done
23823         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23824 done
23825 TEST_LIBS="$cf_add_libs"
23826
23827         fi
23828 fi
23829
23830 if test "$with_hashed_db" != no ; then
23831
23832 cat >>confdefs.h <<\EOF
23833 #define USE_HASHED_DB 1
23834 EOF
23835
23836 case $with_hashed_db in
23837 (yes|*able*)
23838         ;;
23839 (*)
23840         if test -d "$with_hashed_db" ; then
23841
23842 if test -n "$with_hashed_db/include" ; then
23843   for cf_add_incdir in $with_hashed_db/include
23844   do
23845         while test "$cf_add_incdir" != /usr/include
23846         do
23847           if test -d "$cf_add_incdir"
23848           then
23849                 cf_have_incdir=no
23850                 if test -n "$CFLAGS$CPPFLAGS" ; then
23851                   # a loop is needed to ensure we can add subdirs of existing dirs
23852                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23853                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23854                           cf_have_incdir=yes; break
23855                         fi
23856                   done
23857                 fi
23858
23859                 if test "$cf_have_incdir" = no ; then
23860                   if test "$cf_add_incdir" = /usr/local/include ; then
23861                         if test "$GCC" = yes
23862                         then
23863                           cf_save_CPPFLAGS=$CPPFLAGS
23864
23865         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23866         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23867
23868                           cat >"conftest.$ac_ext" <<_ACEOF
23869 #line 23869 "configure"
23870 #include "confdefs.h"
23871 #include <stdio.h>
23872 int
23873 main (void)
23874 {
23875 printf("Hello")
23876   ;
23877   return 0;
23878 }
23879 _ACEOF
23880 rm -f "conftest.$ac_objext"
23881 if { (eval echo "$as_me:23881: \"$ac_compile\"") >&5
23882   (eval $ac_compile) 2>&5
23883   ac_status=$?
23884   echo "$as_me:23884: \$? = $ac_status" >&5
23885   (exit "$ac_status"); } &&
23886          { ac_try='test -s "conftest.$ac_objext"'
23887   { (eval echo "$as_me:23887: \"$ac_try\"") >&5
23888   (eval $ac_try) 2>&5
23889   ac_status=$?
23890   echo "$as_me:23890: \$? = $ac_status" >&5
23891   (exit "$ac_status"); }; }; then
23892   :
23893 else
23894   echo "$as_me: failed program was:" >&5
23895 cat "conftest.$ac_ext" >&5
23896 cf_have_incdir=yes
23897 fi
23898 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23899                           CPPFLAGS=$cf_save_CPPFLAGS
23900                         fi
23901                   fi
23902                 fi
23903
23904                 if test "$cf_have_incdir" = no ; then
23905                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23906
23907 echo "${as_me:-configure}:23907: testing adding $cf_add_incdir to include-path ..." 1>&5
23908
23909                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23910
23911                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23912                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23913                   cf_add_incdir="$cf_top_incdir"
23914                 else
23915                   break
23916                 fi
23917           else
23918                 break
23919           fi
23920         done
23921   done
23922 fi
23923
23924 if test -n "$with_hashed_db/lib" ; then
23925         for cf_add_libdir in $with_hashed_db/lib
23926         do
23927                 if test "$cf_add_libdir" = /usr/lib ; then
23928                         :
23929                 elif test -d "$cf_add_libdir"
23930                 then
23931                         cf_have_libdir=no
23932                         if test -n "$LDFLAGS$LIBS" ; then
23933                                 # a loop is needed to ensure we can add subdirs of existing dirs
23934                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23935                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23936                                                 cf_have_libdir=yes; break
23937                                         fi
23938                                 done
23939                         fi
23940                         if test "$cf_have_libdir" = no ; then
23941                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23942
23943 echo "${as_me:-configure}:23943: testing adding $cf_add_libdir to library-path ..." 1>&5
23944
23945                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23946                         fi
23947                 fi
23948         done
23949 fi
23950
23951         else
23952                 case "$with_hashed_db" in
23953                 (./*|../*|/*)
23954                         { echo "$as_me:23954: WARNING: no such directory $with_hashed_db" >&5
23955 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
23956                         ;;
23957                 (*)
23958
23959 cf_search=
23960
23961 test "x$prefix" != "xNONE" && \
23962 test -d "$prefix" && \
23963  {
23964         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
23965         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
23966         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
23967         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
23968         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
23969         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
23970 }
23971
23972 for cf_subdir_prefix in \
23973         /usr \
23974         /usr/local \
23975         /usr/pkg \
23976         /opt \
23977         /opt/local \
23978         $HOME
23979 do
23980
23981 test "x$cf_subdir_prefix" != "x$prefix" && \
23982 test -d "$cf_subdir_prefix" && \
23983 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23984         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
23985         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
23986         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
23987         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
23988         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
23989         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"
23990 }
23991
23992 done
23993
23994         for cf_item in $cf_search
23995         do
23996                 case "$cf_item" in
23997                 (*/$with_hashed_db)
23998
23999 if test -n "$cf_item" ; then
24000   for cf_add_incdir in $cf_item
24001   do
24002         while test "$cf_add_incdir" != /usr/include
24003         do
24004           if test -d "$cf_add_incdir"
24005           then
24006                 cf_have_incdir=no
24007                 if test -n "$CFLAGS$CPPFLAGS" ; then
24008                   # a loop is needed to ensure we can add subdirs of existing dirs
24009                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24010                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24011                           cf_have_incdir=yes; break
24012                         fi
24013                   done
24014                 fi
24015
24016                 if test "$cf_have_incdir" = no ; then
24017                   if test "$cf_add_incdir" = /usr/local/include ; then
24018                         if test "$GCC" = yes
24019                         then
24020                           cf_save_CPPFLAGS=$CPPFLAGS
24021
24022         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24023         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24024
24025                           cat >"conftest.$ac_ext" <<_ACEOF
24026 #line 24026 "configure"
24027 #include "confdefs.h"
24028 #include <stdio.h>
24029 int
24030 main (void)
24031 {
24032 printf("Hello")
24033   ;
24034   return 0;
24035 }
24036 _ACEOF
24037 rm -f "conftest.$ac_objext"
24038 if { (eval echo "$as_me:24038: \"$ac_compile\"") >&5
24039   (eval $ac_compile) 2>&5
24040   ac_status=$?
24041   echo "$as_me:24041: \$? = $ac_status" >&5
24042   (exit "$ac_status"); } &&
24043          { ac_try='test -s "conftest.$ac_objext"'
24044   { (eval echo "$as_me:24044: \"$ac_try\"") >&5
24045   (eval $ac_try) 2>&5
24046   ac_status=$?
24047   echo "$as_me:24047: \$? = $ac_status" >&5
24048   (exit "$ac_status"); }; }; then
24049   :
24050 else
24051   echo "$as_me: failed program was:" >&5
24052 cat "conftest.$ac_ext" >&5
24053 cf_have_incdir=yes
24054 fi
24055 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24056                           CPPFLAGS=$cf_save_CPPFLAGS
24057                         fi
24058                   fi
24059                 fi
24060
24061                 if test "$cf_have_incdir" = no ; then
24062                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24063
24064 echo "${as_me:-configure}:24064: testing adding $cf_add_incdir to include-path ..." 1>&5
24065
24066                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24067
24068                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24069                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24070                   cf_add_incdir="$cf_top_incdir"
24071                 else
24072                   break
24073                 fi
24074           else
24075                 break
24076           fi
24077         done
24078   done
24079 fi
24080
24081                         ;;
24082                 esac
24083         done
24084
24085 cf_search=
24086
24087 test "x$prefix" != "xNONE" && \
24088 test -d "$prefix" && \
24089  {
24090         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24091         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24092         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24093         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24094         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24095         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24096 }
24097
24098 for cf_subdir_prefix in \
24099         /usr \
24100         /usr/local \
24101         /usr/pkg \
24102         /opt \
24103         /opt/local \
24104         $HOME
24105 do
24106
24107 test "x$cf_subdir_prefix" != "x$prefix" && \
24108 test -d "$cf_subdir_prefix" && \
24109 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24110         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24111         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24112         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24113         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24114         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24115         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"
24116 }
24117
24118 done
24119
24120         for cf_item in $cf_search
24121         do
24122                 case "$cf_item" in
24123                 (*/$with_hashed_db)
24124
24125 if test -n "$cf_item" ; then
24126         for cf_add_libdir in $cf_item
24127         do
24128                 if test "$cf_add_libdir" = /usr/lib ; then
24129                         :
24130                 elif test -d "$cf_add_libdir"
24131                 then
24132                         cf_have_libdir=no
24133                         if test -n "$LDFLAGS$LIBS" ; then
24134                                 # a loop is needed to ensure we can add subdirs of existing dirs
24135                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24136                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24137                                                 cf_have_libdir=yes; break
24138                                         fi
24139                                 done
24140                         fi
24141                         if test "$cf_have_libdir" = no ; then
24142                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24143
24144 echo "${as_me:-configure}:24144: testing adding $cf_add_libdir to library-path ..." 1>&5
24145
24146                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24147                         fi
24148                 fi
24149         done
24150 fi
24151
24152                         ;;
24153                 esac
24154         done
24155
24156                         ;;
24157                 esac
24158         fi
24159 esac
24160
24161 echo "$as_me:24161: checking for db.h" >&5
24162 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24163 if test "${ac_cv_header_db_h+set}" = set; then
24164   echo $ECHO_N "(cached) $ECHO_C" >&6
24165 else
24166   cat >"conftest.$ac_ext" <<_ACEOF
24167 #line 24167 "configure"
24168 #include "confdefs.h"
24169 #include <db.h>
24170 _ACEOF
24171 if { (eval echo "$as_me:24171: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24172   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24173   ac_status=$?
24174   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24175   rm -f conftest.er1
24176   cat conftest.err >&5
24177   echo "$as_me:24177: \$? = $ac_status" >&5
24178   (exit "$ac_status"); } >/dev/null; then
24179   if test -s conftest.err; then
24180     ac_cpp_err=$ac_c_preproc_warn_flag
24181   else
24182     ac_cpp_err=
24183   fi
24184 else
24185   ac_cpp_err=yes
24186 fi
24187 if test -z "$ac_cpp_err"; then
24188   ac_cv_header_db_h=yes
24189 else
24190   echo "$as_me: failed program was:" >&5
24191   cat "conftest.$ac_ext" >&5
24192   ac_cv_header_db_h=no
24193 fi
24194 rm -f conftest.err "conftest.$ac_ext"
24195 fi
24196 echo "$as_me:24196: result: $ac_cv_header_db_h" >&5
24197 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24198 if test "$ac_cv_header_db_h" = yes; then
24199
24200 echo "$as_me:24200: checking for version of db" >&5
24201 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24202 if test "${cf_cv_hashed_db_version+set}" = set; then
24203   echo $ECHO_N "(cached) $ECHO_C" >&6
24204 else
24205
24206 cf_cv_hashed_db_version=unknown
24207
24208 for cf_db_version in 1 2 3 4 5 6
24209 do
24210
24211 echo "${as_me:-configure}:24211: testing checking for db version $cf_db_version ..." 1>&5
24212
24213         cat >"conftest.$ac_ext" <<_ACEOF
24214 #line 24214 "configure"
24215 #include "confdefs.h"
24216
24217 $ac_includes_default
24218 #include <db.h>
24219
24220 #ifdef DB_VERSION_MAJOR
24221         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24222 #if $cf_db_version == DB_VERSION_MAJOR
24223         /* ok */
24224 #else
24225         make an error
24226 #endif
24227 #else
24228 #if $cf_db_version == 1
24229         /* ok: assuming this is DB 1.8.5 */
24230 #else
24231         make an error
24232 #endif
24233 #endif
24234
24235 int
24236 main (void)
24237 {
24238 DBT *foo = 0
24239   ;
24240   return 0;
24241 }
24242 _ACEOF
24243 rm -f "conftest.$ac_objext"
24244 if { (eval echo "$as_me:24244: \"$ac_compile\"") >&5
24245   (eval $ac_compile) 2>&5
24246   ac_status=$?
24247   echo "$as_me:24247: \$? = $ac_status" >&5
24248   (exit "$ac_status"); } &&
24249          { ac_try='test -s "conftest.$ac_objext"'
24250   { (eval echo "$as_me:24250: \"$ac_try\"") >&5
24251   (eval $ac_try) 2>&5
24252   ac_status=$?
24253   echo "$as_me:24253: \$? = $ac_status" >&5
24254   (exit "$ac_status"); }; }; then
24255
24256         cf_cv_hashed_db_version=$cf_db_version
24257         break
24258
24259 else
24260   echo "$as_me: failed program was:" >&5
24261 cat "conftest.$ac_ext" >&5
24262 fi
24263 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24264 done
24265
24266 fi
24267 echo "$as_me:24267: result: $cf_cv_hashed_db_version" >&5
24268 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24269
24270 if test "$cf_cv_hashed_db_version" = unknown ; then
24271         { { echo "$as_me:24271: error: Cannot determine version of db" >&5
24272 echo "$as_me: error: Cannot determine version of db" >&2;}
24273    { (exit 1); exit 1; }; }
24274 else
24275
24276 echo "$as_me:24276: checking for db libraries" >&5
24277 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24278 if test "${cf_cv_hashed_db_libs+set}" = set; then
24279   echo $ECHO_N "(cached) $ECHO_C" >&6
24280 else
24281
24282 cf_cv_hashed_db_libs=unknown
24283 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24284 do
24285         cf_save_libs="$LIBS"
24286         if test -n "$cf_db_libs"; then
24287
24288 cf_add_libs="$LIBS"
24289 # reverse order
24290 cf_add_0lib=
24291 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24292 # filter duplicates
24293 for cf_add_1lib in $cf_add_0lib; do
24294         for cf_add_2lib in $cf_add_libs; do
24295                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24296                         cf_add_1lib=
24297                         break
24298                 fi
24299         done
24300         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24301 done
24302 LIBS="$cf_add_libs"
24303
24304         fi
24305
24306 echo "${as_me:-configure}:24306: testing checking for library $cf_db_libs ..." 1>&5
24307
24308         cat >"conftest.$ac_ext" <<_ACEOF
24309 #line 24309 "configure"
24310 #include "confdefs.h"
24311
24312 $ac_includes_default
24313 #include <db.h>
24314
24315 int
24316 main (void)
24317 {
24318
24319         char *path = "/tmp/foo";
24320 #ifdef DB_VERSION_MAJOR
24321 #if DB_VERSION_MAJOR >= 4
24322         DB *result = 0;
24323         db_create(&result, NULL, 0);
24324         result->open(result,
24325                 NULL,
24326                 path,
24327                 path,
24328                 DB_HASH,
24329                 DB_CREATE,
24330                 0644);
24331 #elif DB_VERSION_MAJOR >= 3
24332         DB *result = 0;
24333         db_create(&result, NULL, 0);
24334         result->open(result,
24335                 path,
24336                 path,
24337                 DB_HASH,
24338                 DB_CREATE,
24339                 0644);
24340 #elif DB_VERSION_MAJOR >= 2
24341         DB *result = 0;
24342         db_open(path,
24343                 DB_HASH,
24344                 DB_CREATE,
24345                 0644,
24346                 (DB_ENV *) 0,
24347                 (DB_INFO *) 0,
24348                 &result);
24349 #endif /* DB_VERSION_MAJOR */
24350 #else
24351         DB *result = dbopen(path,
24352                      2,
24353                      0644,
24354                      DB_HASH,
24355                      0);
24356 #endif
24357         ${cf_cv_main_return:-return}(result != 0)
24358
24359   ;
24360   return 0;
24361 }
24362 _ACEOF
24363 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24364 if { (eval echo "$as_me:24364: \"$ac_link\"") >&5
24365   (eval $ac_link) 2>&5
24366   ac_status=$?
24367   echo "$as_me:24367: \$? = $ac_status" >&5
24368   (exit "$ac_status"); } &&
24369          { ac_try='test -s "conftest$ac_exeext"'
24370   { (eval echo "$as_me:24370: \"$ac_try\"") >&5
24371   (eval $ac_try) 2>&5
24372   ac_status=$?
24373   echo "$as_me:24373: \$? = $ac_status" >&5
24374   (exit "$ac_status"); }; }; then
24375
24376         if test -n "$cf_db_libs" ; then
24377                 cf_cv_hashed_db_libs=$cf_db_libs
24378         else
24379                 cf_cv_hashed_db_libs=default
24380         fi
24381         LIBS="$cf_save_libs"
24382         break
24383
24384 else
24385   echo "$as_me: failed program was:" >&5
24386 cat "conftest.$ac_ext" >&5
24387 fi
24388 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24389         LIBS="$cf_save_libs"
24390 done
24391
24392 fi
24393 echo "$as_me:24393: result: $cf_cv_hashed_db_libs" >&5
24394 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24395
24396         if test "$cf_cv_hashed_db_libs" = unknown ; then
24397                 { { echo "$as_me:24397: error: Cannot determine library for db" >&5
24398 echo "$as_me: error: Cannot determine library for db" >&2;}
24399    { (exit 1); exit 1; }; }
24400         elif test "$cf_cv_hashed_db_libs" != default ; then
24401
24402 cf_add_libs="$LIBS"
24403 # reverse order
24404 cf_add_0lib=
24405 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24406 # filter duplicates
24407 for cf_add_1lib in $cf_add_0lib; do
24408         for cf_add_2lib in $cf_add_libs; do
24409                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24410                         cf_add_1lib=
24411                         break
24412                 fi
24413         done
24414         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24415 done
24416 LIBS="$cf_add_libs"
24417
24418         fi
24419 fi
24420
24421 else
24422
24423         { { echo "$as_me:24423: error: Cannot find db.h" >&5
24424 echo "$as_me: error: Cannot find db.h" >&2;}
24425    { (exit 1); exit 1; }; }
24426
24427 fi
24428
24429 fi
24430
24431 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24432         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24433         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24434 fi
24435
24436 # Just in case, check if the C compiler has a bool type.
24437
24438 echo "$as_me:24438: checking if we should include stdbool.h" >&5
24439 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24440
24441 if test "${cf_cv_header_stdbool_h+set}" = set; then
24442   echo $ECHO_N "(cached) $ECHO_C" >&6
24443 else
24444
24445         cat >"conftest.$ac_ext" <<_ACEOF
24446 #line 24446 "configure"
24447 #include "confdefs.h"
24448
24449 int
24450 main (void)
24451 {
24452 bool foo = false
24453   ;
24454   return 0;
24455 }
24456 _ACEOF
24457 rm -f "conftest.$ac_objext"
24458 if { (eval echo "$as_me:24458: \"$ac_compile\"") >&5
24459   (eval $ac_compile) 2>&5
24460   ac_status=$?
24461   echo "$as_me:24461: \$? = $ac_status" >&5
24462   (exit "$ac_status"); } &&
24463          { ac_try='test -s "conftest.$ac_objext"'
24464   { (eval echo "$as_me:24464: \"$ac_try\"") >&5
24465   (eval $ac_try) 2>&5
24466   ac_status=$?
24467   echo "$as_me:24467: \$? = $ac_status" >&5
24468   (exit "$ac_status"); }; }; then
24469   cf_cv_header_stdbool_h=0
24470 else
24471   echo "$as_me: failed program was:" >&5
24472 cat "conftest.$ac_ext" >&5
24473 cat >"conftest.$ac_ext" <<_ACEOF
24474 #line 24474 "configure"
24475 #include "confdefs.h"
24476
24477 #ifndef __BEOS__
24478 #include <stdbool.h>
24479 #endif
24480
24481 int
24482 main (void)
24483 {
24484 bool foo = false
24485   ;
24486   return 0;
24487 }
24488 _ACEOF
24489 rm -f "conftest.$ac_objext"
24490 if { (eval echo "$as_me:24490: \"$ac_compile\"") >&5
24491   (eval $ac_compile) 2>&5
24492   ac_status=$?
24493   echo "$as_me:24493: \$? = $ac_status" >&5
24494   (exit "$ac_status"); } &&
24495          { ac_try='test -s "conftest.$ac_objext"'
24496   { (eval echo "$as_me:24496: \"$ac_try\"") >&5
24497   (eval $ac_try) 2>&5
24498   ac_status=$?
24499   echo "$as_me:24499: \$? = $ac_status" >&5
24500   (exit "$ac_status"); }; }; then
24501   cf_cv_header_stdbool_h=1
24502 else
24503   echo "$as_me: failed program was:" >&5
24504 cat "conftest.$ac_ext" >&5
24505 cf_cv_header_stdbool_h=0
24506 fi
24507 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24508 fi
24509 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24510 fi
24511
24512 if test "$cf_cv_header_stdbool_h" = 1
24513 then    echo "$as_me:24513: result: yes" >&5
24514 echo "${ECHO_T}yes" >&6
24515 else    echo "$as_me:24515: result: no" >&5
24516 echo "${ECHO_T}no" >&6
24517 fi
24518
24519 echo "$as_me:24519: checking for builtin bool type" >&5
24520 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24521
24522 if test "${cf_cv_cc_bool_type+set}" = set; then
24523   echo $ECHO_N "(cached) $ECHO_C" >&6
24524 else
24525
24526         cat >"conftest.$ac_ext" <<_ACEOF
24527 #line 24527 "configure"
24528 #include "confdefs.h"
24529
24530 #include <stdio.h>
24531 #include <sys/types.h>
24532
24533 int
24534 main (void)
24535 {
24536 bool x = false
24537   ;
24538   return 0;
24539 }
24540 _ACEOF
24541 rm -f "conftest.$ac_objext"
24542 if { (eval echo "$as_me:24542: \"$ac_compile\"") >&5
24543   (eval $ac_compile) 2>&5
24544   ac_status=$?
24545   echo "$as_me:24545: \$? = $ac_status" >&5
24546   (exit "$ac_status"); } &&
24547          { ac_try='test -s "conftest.$ac_objext"'
24548   { (eval echo "$as_me:24548: \"$ac_try\"") >&5
24549   (eval $ac_try) 2>&5
24550   ac_status=$?
24551   echo "$as_me:24551: \$? = $ac_status" >&5
24552   (exit "$ac_status"); }; }; then
24553   cf_cv_cc_bool_type=1
24554 else
24555   echo "$as_me: failed program was:" >&5
24556 cat "conftest.$ac_ext" >&5
24557 cf_cv_cc_bool_type=0
24558 fi
24559 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24560
24561 fi
24562
24563 if test "$cf_cv_cc_bool_type" = 1
24564 then    echo "$as_me:24564: result: yes" >&5
24565 echo "${ECHO_T}yes" >&6
24566 else    echo "$as_me:24566: result: no" >&5
24567 echo "${ECHO_T}no" >&6
24568 fi
24569
24570 # Check for C++ compiler characteristics (and ensure that it's there!)
24571 if test -n "$CXX" ; then
24572         ac_ext=cc
24573 ac_cpp='$CXXCPP $CPPFLAGS'
24574 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24575 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24576 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24577 ac_main_return="return"
24578
24579 if test -n "$GXX" ; then
24580
24581         cf_save="$LIBS"
24582         LIBS="$LIBS $CXXLIBS"
24583         echo "$as_me:24583: checking if we already have C++ library" >&5
24584 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24585         cat >"conftest.$ac_ext" <<_ACEOF
24586 #line 24586 "configure"
24587 #include "confdefs.h"
24588
24589                         #include <iostream>
24590 int
24591 main (void)
24592 {
24593
24594                         std::cout << "Hello World!" << std::endl;
24595   ;
24596   return 0;
24597 }
24598 _ACEOF
24599 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24600 if { (eval echo "$as_me:24600: \"$ac_link\"") >&5
24601   (eval $ac_link) 2>&5
24602   ac_status=$?
24603   echo "$as_me:24603: \$? = $ac_status" >&5
24604   (exit "$ac_status"); } &&
24605          { ac_try='test -s "conftest$ac_exeext"'
24606   { (eval echo "$as_me:24606: \"$ac_try\"") >&5
24607   (eval $ac_try) 2>&5
24608   ac_status=$?
24609   echo "$as_me:24609: \$? = $ac_status" >&5
24610   (exit "$ac_status"); }; }; then
24611   cf_have_libstdcpp=yes
24612 else
24613   echo "$as_me: failed program was:" >&5
24614 cat "conftest.$ac_ext" >&5
24615 cf_have_libstdcpp=no
24616 fi
24617 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24618         echo "$as_me:24618: result: $cf_have_libstdcpp" >&5
24619 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24620         LIBS="$cf_save"
24621
24622         if test "$cf_have_libstdcpp" != yes
24623         then
24624                 case "$cf_cv_system_name" in
24625                 (os2*)
24626                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24627                                 cf_stdcpp_libname=stdcpp
24628                         else
24629                                 cf_stdcpp_libname=stdc++
24630                         fi
24631                         ;;
24632                 (*)
24633                         cf_stdcpp_libname=stdc++
24634                         ;;
24635                 esac
24636
24637                 echo "$as_me:24637: checking for library $cf_stdcpp_libname" >&5
24638 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24639 if test "${cf_cv_libstdcpp+set}" = set; then
24640   echo $ECHO_N "(cached) $ECHO_C" >&6
24641 else
24642
24643                         cf_save="$LIBS"
24644                         LIBS="$LIBS $CXXLIBS"
24645
24646 cf_add_libs="$LIBS"
24647 # reverse order
24648 cf_add_0lib=
24649 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24650 # filter duplicates
24651 for cf_add_1lib in $cf_add_0lib; do
24652         for cf_add_2lib in $cf_add_libs; do
24653                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24654                         cf_add_1lib=
24655                         break
24656                 fi
24657         done
24658         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24659 done
24660 LIBS="$cf_add_libs"
24661
24662                 cat >"conftest.$ac_ext" <<_ACEOF
24663 #line 24663 "configure"
24664 #include "confdefs.h"
24665
24666                                 #include <iostream>
24667 int
24668 main (void)
24669 {
24670
24671                                 std::cout << "Hello World!" << std::endl;
24672   ;
24673   return 0;
24674 }
24675 _ACEOF
24676 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24677 if { (eval echo "$as_me:24677: \"$ac_link\"") >&5
24678   (eval $ac_link) 2>&5
24679   ac_status=$?
24680   echo "$as_me:24680: \$? = $ac_status" >&5
24681   (exit "$ac_status"); } &&
24682          { ac_try='test -s "conftest$ac_exeext"'
24683   { (eval echo "$as_me:24683: \"$ac_try\"") >&5
24684   (eval $ac_try) 2>&5
24685   ac_status=$?
24686   echo "$as_me:24686: \$? = $ac_status" >&5
24687   (exit "$ac_status"); }; }; then
24688   cf_cv_libstdcpp=yes
24689 else
24690   echo "$as_me: failed program was:" >&5
24691 cat "conftest.$ac_ext" >&5
24692 cf_cv_libstdcpp=no
24693 fi
24694 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24695                         LIBS="$cf_save"
24696
24697 fi
24698 echo "$as_me:24698: result: $cf_cv_libstdcpp" >&5
24699 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24700                 test "$cf_cv_libstdcpp" = yes && {
24701 cf_add_libs="$CXXLIBS"
24702 # reverse order
24703 cf_add_0lib=
24704 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24705 # filter duplicates
24706 for cf_add_1lib in $cf_add_0lib; do
24707         for cf_add_2lib in $cf_add_libs; do
24708                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24709                         cf_add_1lib=
24710                         break
24711                 fi
24712         done
24713         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24714 done
24715 CXXLIBS="$cf_add_libs"
24716  }
24717         fi
24718 fi
24719
24720         echo "$as_me:24720: checking whether $CXX understands -c and -o together" >&5
24721 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24722 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24723   echo $ECHO_N "(cached) $ECHO_C" >&6
24724 else
24725
24726 cat > conftest.$ac_ext <<CF_EOF
24727 int main(void)
24728 {
24729         ${cf_cv_main_return:-return}(0);
24730 }
24731 CF_EOF
24732 # We do the test twice because some compilers refuse to overwrite an
24733 # existing .o file with -o, though they will create one.
24734 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24735 if { (eval echo "$as_me:24735: \"$ac_try\"") >&5
24736   (eval $ac_try) 2>&5
24737   ac_status=$?
24738   echo "$as_me:24738: \$? = $ac_status" >&5
24739   (exit "$ac_status"); } &&
24740   test -f conftest2.$ac_objext && { (eval echo "$as_me:24740: \"$ac_try\"") >&5
24741   (eval $ac_try) 2>&5
24742   ac_status=$?
24743   echo "$as_me:24743: \$? = $ac_status" >&5
24744   (exit "$ac_status"); };
24745 then
24746   eval cf_cv_prog_CXX_c_o=yes
24747 else
24748   eval cf_cv_prog_CXX_c_o=no
24749 fi
24750 rm -rf ./conftest*
24751
24752 fi
24753 if test "$cf_cv_prog_CXX_c_o" = yes; then
24754   echo "$as_me:24754: result: yes" >&5
24755 echo "${ECHO_T}yes" >&6
24756 else
24757   echo "$as_me:24757: result: no" >&5
24758 echo "${ECHO_T}no" >&6
24759 fi
24760
24761         case "$GXX_VERSION" in
24762         (1.*|2.[0-6]*|[1-9][0-9].*)
24763                 cf_cxx_library=yes
24764                 ;;
24765         (*-2.7*|2.7*)
24766
24767 cf_cxx_library=unknown
24768 case "$cf_cv_system_name" in
24769 (os2*)
24770         cf_gpp_libname=gpp
24771         ;;
24772 (*)
24773         cf_gpp_libname=g++
24774         ;;
24775 esac
24776 if test "$GXX" = yes; then
24777         echo "$as_me:24777: checking for lib$cf_gpp_libname" >&5
24778 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24779         cf_save="$LIBS"
24780
24781 cf_add_libs="$LIBS"
24782 # reverse order
24783 cf_add_0lib=
24784 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24785 # filter duplicates
24786 for cf_add_1lib in $cf_add_0lib; do
24787         for cf_add_2lib in $cf_add_libs; do
24788                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24789                         cf_add_1lib=
24790                         break
24791                 fi
24792         done
24793         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24794 done
24795 LIBS="$cf_add_libs"
24796
24797         cat >"conftest.$ac_ext" <<_ACEOF
24798 #line 24798 "configure"
24799 #include "confdefs.h"
24800
24801 #include <$cf_gpp_libname/builtin.h>
24802
24803 int
24804 main (void)
24805 {
24806 two_arg_error_handler_t foo2 = lib_error_handler
24807   ;
24808   return 0;
24809 }
24810 _ACEOF
24811 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24812 if { (eval echo "$as_me:24812: \"$ac_link\"") >&5
24813   (eval $ac_link) 2>&5
24814   ac_status=$?
24815   echo "$as_me:24815: \$? = $ac_status" >&5
24816   (exit "$ac_status"); } &&
24817          { ac_try='test -s "conftest$ac_exeext"'
24818   { (eval echo "$as_me:24818: \"$ac_try\"") >&5
24819   (eval $ac_try) 2>&5
24820   ac_status=$?
24821   echo "$as_me:24821: \$? = $ac_status" >&5
24822   (exit "$ac_status"); }; }; then
24823   cf_cxx_library=yes
24824
24825 cf_add_libs="$CXXLIBS"
24826 # reverse order
24827 cf_add_0lib=
24828 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24829 # filter duplicates
24830 for cf_add_1lib in $cf_add_0lib; do
24831         for cf_add_2lib in $cf_add_libs; do
24832                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24833                         cf_add_1lib=
24834                         break
24835                 fi
24836         done
24837         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24838 done
24839 CXXLIBS="$cf_add_libs"
24840
24841          if test "$cf_gpp_libname" = cpp ; then
24842
24843 cat >>confdefs.h <<\EOF
24844 #define HAVE_GPP_BUILTIN_H 1
24845 EOF
24846
24847          else
24848
24849 cat >>confdefs.h <<\EOF
24850 #define HAVE_GXX_BUILTIN_H 1
24851 EOF
24852
24853          fi
24854 else
24855   echo "$as_me: failed program was:" >&5
24856 cat "conftest.$ac_ext" >&5
24857 cat >"conftest.$ac_ext" <<_ACEOF
24858 #line 24858 "configure"
24859 #include "confdefs.h"
24860
24861 #include <builtin.h>
24862
24863 int
24864 main (void)
24865 {
24866 two_arg_error_handler_t foo2 = lib_error_handler
24867   ;
24868   return 0;
24869 }
24870 _ACEOF
24871 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24872 if { (eval echo "$as_me:24872: \"$ac_link\"") >&5
24873   (eval $ac_link) 2>&5
24874   ac_status=$?
24875   echo "$as_me:24875: \$? = $ac_status" >&5
24876   (exit "$ac_status"); } &&
24877          { ac_try='test -s "conftest$ac_exeext"'
24878   { (eval echo "$as_me:24878: \"$ac_try\"") >&5
24879   (eval $ac_try) 2>&5
24880   ac_status=$?
24881   echo "$as_me:24881: \$? = $ac_status" >&5
24882   (exit "$ac_status"); }; }; then
24883   cf_cxx_library=yes
24884
24885 cf_add_libs="$CXXLIBS"
24886 # reverse order
24887 cf_add_0lib=
24888 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24889 # filter duplicates
24890 for cf_add_1lib in $cf_add_0lib; do
24891         for cf_add_2lib in $cf_add_libs; do
24892                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24893                         cf_add_1lib=
24894                         break
24895                 fi
24896         done
24897         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24898 done
24899 CXXLIBS="$cf_add_libs"
24900
24901 cat >>confdefs.h <<\EOF
24902 #define HAVE_BUILTIN_H 1
24903 EOF
24904
24905 else
24906   echo "$as_me: failed program was:" >&5
24907 cat "conftest.$ac_ext" >&5
24908 cf_cxx_library=no
24909 fi
24910 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24911 fi
24912 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24913         LIBS="$cf_save"
24914         echo "$as_me:24914: result: $cf_cxx_library" >&5
24915 echo "${ECHO_T}$cf_cxx_library" >&6
24916 fi
24917
24918                 ;;
24919         (*)
24920                 cf_cxx_library=no
24921                 ;;
24922         esac
24923
24924         ac_ext=cc
24925 ac_cpp='$CXXCPP $CPPFLAGS'
24926 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24927 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24928 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24929 ac_main_return="return"
24930 echo "$as_me:24930: checking how to run the C++ preprocessor" >&5
24931 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
24932 if test -z "$CXXCPP"; then
24933   if test "${ac_cv_prog_CXXCPP+set}" = set; then
24934   echo $ECHO_N "(cached) $ECHO_C" >&6
24935 else
24936       # Double quotes because CXXCPP needs to be expanded
24937     for CXXCPP in "$CXX -E" "/lib/cpp"
24938     do
24939       ac_preproc_ok=false
24940 for ac_cxx_preproc_warn_flag in '' yes
24941 do
24942   # Use a header file that comes with gcc, so configuring glibc
24943   # with a fresh cross-compiler works.
24944   # On the NeXT, cc -E runs the code through the compiler's parser,
24945   # not just through cpp. "Syntax error" is here to catch this case.
24946   cat >"conftest.$ac_ext" <<_ACEOF
24947 #line 24947 "configure"
24948 #include "confdefs.h"
24949 #include <assert.h>
24950                      Syntax error
24951 _ACEOF
24952 if { (eval echo "$as_me:24952: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24953   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24954   ac_status=$?
24955   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24956   rm -f conftest.er1
24957   cat conftest.err >&5
24958   echo "$as_me:24958: \$? = $ac_status" >&5
24959   (exit "$ac_status"); } >/dev/null; then
24960   if test -s conftest.err; then
24961     ac_cpp_err=$ac_cxx_preproc_warn_flag
24962   else
24963     ac_cpp_err=
24964   fi
24965 else
24966   ac_cpp_err=yes
24967 fi
24968 if test -z "$ac_cpp_err"; then
24969   :
24970 else
24971   echo "$as_me: failed program was:" >&5
24972   cat "conftest.$ac_ext" >&5
24973   # Broken: fails on valid input.
24974 continue
24975 fi
24976 rm -f conftest.err "conftest.$ac_ext"
24977
24978   # OK, works on sane cases.  Now check whether non-existent headers
24979   # can be detected and how.
24980   cat >"conftest.$ac_ext" <<_ACEOF
24981 #line 24981 "configure"
24982 #include "confdefs.h"
24983 #include <ac_nonexistent.h>
24984 _ACEOF
24985 if { (eval echo "$as_me:24985: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24986   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24987   ac_status=$?
24988   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24989   rm -f conftest.er1
24990   cat conftest.err >&5
24991   echo "$as_me:24991: \$? = $ac_status" >&5
24992   (exit "$ac_status"); } >/dev/null; then
24993   if test -s conftest.err; then
24994     ac_cpp_err=$ac_cxx_preproc_warn_flag
24995   else
24996     ac_cpp_err=
24997   fi
24998 else
24999   ac_cpp_err=yes
25000 fi
25001 if test -z "$ac_cpp_err"; then
25002   # Broken: success on invalid input.
25003 continue
25004 else
25005   echo "$as_me: failed program was:" >&5
25006   cat "conftest.$ac_ext" >&5
25007   # Passes both tests.
25008 ac_preproc_ok=:
25009 break
25010 fi
25011 rm -f conftest.err "conftest.$ac_ext"
25012
25013 done
25014 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25015 rm -f conftest.err "conftest.$ac_ext"
25016 if $ac_preproc_ok; then
25017   break
25018 fi
25019
25020     done
25021     ac_cv_prog_CXXCPP=$CXXCPP
25022
25023 fi
25024   CXXCPP=$ac_cv_prog_CXXCPP
25025 else
25026   ac_cv_prog_CXXCPP=$CXXCPP
25027 fi
25028 echo "$as_me:25028: result: $CXXCPP" >&5
25029 echo "${ECHO_T}$CXXCPP" >&6
25030 ac_preproc_ok=false
25031 for ac_cxx_preproc_warn_flag in '' yes
25032 do
25033   # Use a header file that comes with gcc, so configuring glibc
25034   # with a fresh cross-compiler works.
25035   # On the NeXT, cc -E runs the code through the compiler's parser,
25036   # not just through cpp. "Syntax error" is here to catch this case.
25037   cat >"conftest.$ac_ext" <<_ACEOF
25038 #line 25038 "configure"
25039 #include "confdefs.h"
25040 #include <assert.h>
25041                      Syntax error
25042 _ACEOF
25043 if { (eval echo "$as_me:25043: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25044   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25045   ac_status=$?
25046   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25047   rm -f conftest.er1
25048   cat conftest.err >&5
25049   echo "$as_me:25049: \$? = $ac_status" >&5
25050   (exit "$ac_status"); } >/dev/null; then
25051   if test -s conftest.err; then
25052     ac_cpp_err=$ac_cxx_preproc_warn_flag
25053   else
25054     ac_cpp_err=
25055   fi
25056 else
25057   ac_cpp_err=yes
25058 fi
25059 if test -z "$ac_cpp_err"; then
25060   :
25061 else
25062   echo "$as_me: failed program was:" >&5
25063   cat "conftest.$ac_ext" >&5
25064   # Broken: fails on valid input.
25065 continue
25066 fi
25067 rm -f conftest.err "conftest.$ac_ext"
25068
25069   # OK, works on sane cases.  Now check whether non-existent headers
25070   # can be detected and how.
25071   cat >"conftest.$ac_ext" <<_ACEOF
25072 #line 25072 "configure"
25073 #include "confdefs.h"
25074 #include <ac_nonexistent.h>
25075 _ACEOF
25076 if { (eval echo "$as_me:25076: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25077   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25078   ac_status=$?
25079   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25080   rm -f conftest.er1
25081   cat conftest.err >&5
25082   echo "$as_me:25082: \$? = $ac_status" >&5
25083   (exit "$ac_status"); } >/dev/null; then
25084   if test -s conftest.err; then
25085     ac_cpp_err=$ac_cxx_preproc_warn_flag
25086   else
25087     ac_cpp_err=
25088   fi
25089 else
25090   ac_cpp_err=yes
25091 fi
25092 if test -z "$ac_cpp_err"; then
25093   # Broken: success on invalid input.
25094 continue
25095 else
25096   echo "$as_me: failed program was:" >&5
25097   cat "conftest.$ac_ext" >&5
25098   # Passes both tests.
25099 ac_preproc_ok=:
25100 break
25101 fi
25102 rm -f conftest.err "conftest.$ac_ext"
25103
25104 done
25105 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25106 rm -f conftest.err "conftest.$ac_ext"
25107 if $ac_preproc_ok; then
25108   :
25109 else
25110   { { echo "$as_me:25110: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25111 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25112    { (exit 1); exit 1; }; }
25113 fi
25114
25115 ac_ext=cc
25116 ac_cpp='$CXXCPP $CPPFLAGS'
25117 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25118 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25119 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25120 ac_main_return="return"
25121
25122 for ac_header in typeinfo
25123 do
25124 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25125 echo "$as_me:25125: checking for $ac_header" >&5
25126 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25127 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25128   echo $ECHO_N "(cached) $ECHO_C" >&6
25129 else
25130   cat >"conftest.$ac_ext" <<_ACEOF
25131 #line 25131 "configure"
25132 #include "confdefs.h"
25133 #include <$ac_header>
25134 _ACEOF
25135 if { (eval echo "$as_me:25135: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25136   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25137   ac_status=$?
25138   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25139   rm -f conftest.er1
25140   cat conftest.err >&5
25141   echo "$as_me:25141: \$? = $ac_status" >&5
25142   (exit "$ac_status"); } >/dev/null; then
25143   if test -s conftest.err; then
25144     ac_cpp_err=$ac_cxx_preproc_warn_flag
25145   else
25146     ac_cpp_err=
25147   fi
25148 else
25149   ac_cpp_err=yes
25150 fi
25151 if test -z "$ac_cpp_err"; then
25152   eval "$as_ac_Header=yes"
25153 else
25154   echo "$as_me: failed program was:" >&5
25155   cat "conftest.$ac_ext" >&5
25156   eval "$as_ac_Header=no"
25157 fi
25158 rm -f conftest.err "conftest.$ac_ext"
25159 fi
25160 echo "$as_me:25160: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25161 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25162 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25163   cat >>confdefs.h <<EOF
25164 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25165 EOF
25166
25167 fi
25168 done
25169
25170 for ac_header in iostream
25171 do
25172 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25173 echo "$as_me:25173: checking for $ac_header" >&5
25174 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25175 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25176   echo $ECHO_N "(cached) $ECHO_C" >&6
25177 else
25178   cat >"conftest.$ac_ext" <<_ACEOF
25179 #line 25179 "configure"
25180 #include "confdefs.h"
25181 #include <$ac_header>
25182 _ACEOF
25183 if { (eval echo "$as_me:25183: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25184   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25185   ac_status=$?
25186   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25187   rm -f conftest.er1
25188   cat conftest.err >&5
25189   echo "$as_me:25189: \$? = $ac_status" >&5
25190   (exit "$ac_status"); } >/dev/null; then
25191   if test -s conftest.err; then
25192     ac_cpp_err=$ac_cxx_preproc_warn_flag
25193   else
25194     ac_cpp_err=
25195   fi
25196 else
25197   ac_cpp_err=yes
25198 fi
25199 if test -z "$ac_cpp_err"; then
25200   eval "$as_ac_Header=yes"
25201 else
25202   echo "$as_me: failed program was:" >&5
25203   cat "conftest.$ac_ext" >&5
25204   eval "$as_ac_Header=no"
25205 fi
25206 rm -f conftest.err "conftest.$ac_ext"
25207 fi
25208 echo "$as_me:25208: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25209 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25210 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25211   cat >>confdefs.h <<EOF
25212 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25213 EOF
25214
25215 fi
25216 done
25217
25218 if test x"$ac_cv_header_iostream" = xyes ; then
25219         echo "$as_me:25219: checking if iostream uses std-namespace" >&5
25220 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25221         cat >"conftest.$ac_ext" <<_ACEOF
25222 #line 25222 "configure"
25223 #include "confdefs.h"
25224
25225 #include <iostream>
25226 using std::endl;
25227 using std::cerr;
25228 int
25229 main (void)
25230 {
25231
25232 cerr << "testing" << endl;
25233
25234   ;
25235   return 0;
25236 }
25237 _ACEOF
25238 rm -f "conftest.$ac_objext"
25239 if { (eval echo "$as_me:25239: \"$ac_compile\"") >&5
25240   (eval $ac_compile) 2>&5
25241   ac_status=$?
25242   echo "$as_me:25242: \$? = $ac_status" >&5
25243   (exit "$ac_status"); } &&
25244          { ac_try='test -s "conftest.$ac_objext"'
25245   { (eval echo "$as_me:25245: \"$ac_try\"") >&5
25246   (eval $ac_try) 2>&5
25247   ac_status=$?
25248   echo "$as_me:25248: \$? = $ac_status" >&5
25249   (exit "$ac_status"); }; }; then
25250   cf_iostream_namespace=yes
25251 else
25252   echo "$as_me: failed program was:" >&5
25253 cat "conftest.$ac_ext" >&5
25254 cf_iostream_namespace=no
25255 fi
25256 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25257         echo "$as_me:25257: result: $cf_iostream_namespace" >&5
25258 echo "${ECHO_T}$cf_iostream_namespace" >&6
25259         if test "$cf_iostream_namespace" = yes ; then
25260
25261 cat >>confdefs.h <<\EOF
25262 #define IOSTREAM_NAMESPACE 1
25263 EOF
25264
25265         fi
25266 fi
25267
25268 echo "$as_me:25268: checking if we should include stdbool.h" >&5
25269 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25270
25271 if test "${cf_cv_header_stdbool_h+set}" = set; then
25272   echo $ECHO_N "(cached) $ECHO_C" >&6
25273 else
25274
25275         cat >"conftest.$ac_ext" <<_ACEOF
25276 #line 25276 "configure"
25277 #include "confdefs.h"
25278
25279 int
25280 main (void)
25281 {
25282 bool foo = false
25283   ;
25284   return 0;
25285 }
25286 _ACEOF
25287 rm -f "conftest.$ac_objext"
25288 if { (eval echo "$as_me:25288: \"$ac_compile\"") >&5
25289   (eval $ac_compile) 2>&5
25290   ac_status=$?
25291   echo "$as_me:25291: \$? = $ac_status" >&5
25292   (exit "$ac_status"); } &&
25293          { ac_try='test -s "conftest.$ac_objext"'
25294   { (eval echo "$as_me:25294: \"$ac_try\"") >&5
25295   (eval $ac_try) 2>&5
25296   ac_status=$?
25297   echo "$as_me:25297: \$? = $ac_status" >&5
25298   (exit "$ac_status"); }; }; then
25299   cf_cv_header_stdbool_h=0
25300 else
25301   echo "$as_me: failed program was:" >&5
25302 cat "conftest.$ac_ext" >&5
25303 cat >"conftest.$ac_ext" <<_ACEOF
25304 #line 25304 "configure"
25305 #include "confdefs.h"
25306
25307 #ifndef __BEOS__
25308 #include <stdbool.h>
25309 #endif
25310
25311 int
25312 main (void)
25313 {
25314 bool foo = false
25315   ;
25316   return 0;
25317 }
25318 _ACEOF
25319 rm -f "conftest.$ac_objext"
25320 if { (eval echo "$as_me:25320: \"$ac_compile\"") >&5
25321   (eval $ac_compile) 2>&5
25322   ac_status=$?
25323   echo "$as_me:25323: \$? = $ac_status" >&5
25324   (exit "$ac_status"); } &&
25325          { ac_try='test -s "conftest.$ac_objext"'
25326   { (eval echo "$as_me:25326: \"$ac_try\"") >&5
25327   (eval $ac_try) 2>&5
25328   ac_status=$?
25329   echo "$as_me:25329: \$? = $ac_status" >&5
25330   (exit "$ac_status"); }; }; then
25331   cf_cv_header_stdbool_h=1
25332 else
25333   echo "$as_me: failed program was:" >&5
25334 cat "conftest.$ac_ext" >&5
25335 cf_cv_header_stdbool_h=0
25336 fi
25337 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25338 fi
25339 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25340 fi
25341
25342 if test "$cf_cv_header_stdbool_h" = 1
25343 then    echo "$as_me:25343: result: yes" >&5
25344 echo "${ECHO_T}yes" >&6
25345 else    echo "$as_me:25345: result: no" >&5
25346 echo "${ECHO_T}no" >&6
25347 fi
25348
25349 echo "$as_me:25349: checking for builtin bool type" >&5
25350 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25351
25352 if test "${cf_cv_builtin_bool+set}" = set; then
25353   echo $ECHO_N "(cached) $ECHO_C" >&6
25354 else
25355
25356         cat >"conftest.$ac_ext" <<_ACEOF
25357 #line 25357 "configure"
25358 #include "confdefs.h"
25359
25360 #include <stdio.h>
25361 #include <sys/types.h>
25362
25363 int
25364 main (void)
25365 {
25366 bool x = false
25367   ;
25368   return 0;
25369 }
25370 _ACEOF
25371 rm -f "conftest.$ac_objext"
25372 if { (eval echo "$as_me:25372: \"$ac_compile\"") >&5
25373   (eval $ac_compile) 2>&5
25374   ac_status=$?
25375   echo "$as_me:25375: \$? = $ac_status" >&5
25376   (exit "$ac_status"); } &&
25377          { ac_try='test -s "conftest.$ac_objext"'
25378   { (eval echo "$as_me:25378: \"$ac_try\"") >&5
25379   (eval $ac_try) 2>&5
25380   ac_status=$?
25381   echo "$as_me:25381: \$? = $ac_status" >&5
25382   (exit "$ac_status"); }; }; then
25383   cf_cv_builtin_bool=1
25384 else
25385   echo "$as_me: failed program was:" >&5
25386 cat "conftest.$ac_ext" >&5
25387 cf_cv_builtin_bool=0
25388 fi
25389 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25390
25391 fi
25392
25393 if test "$cf_cv_builtin_bool" = 1
25394 then    echo "$as_me:25394: result: yes" >&5
25395 echo "${ECHO_T}yes" >&6
25396 else    echo "$as_me:25396: result: no" >&5
25397 echo "${ECHO_T}no" >&6
25398 fi
25399
25400 echo "$as_me:25400: checking for bool" >&5
25401 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25402 if test "${ac_cv_type_bool+set}" = set; then
25403   echo $ECHO_N "(cached) $ECHO_C" >&6
25404 else
25405   cat >"conftest.$ac_ext" <<_ACEOF
25406 #line 25406 "configure"
25407 #include "confdefs.h"
25408
25409 #include <stdlib.h>
25410 #include <stdio.h>
25411
25412 #if defined(__cplusplus)
25413
25414 #ifdef HAVE_GXX_BUILTIN_H
25415 #include <g++/builtin.h>
25416 #elif HAVE_GPP_BUILTIN_H
25417 #include <gpp/builtin.h>
25418 #elif HAVE_BUILTIN_H
25419 #include <builtin.h>
25420 #endif
25421
25422 #else
25423
25424 #if $cf_cv_header_stdbool_h
25425 #include <stdbool.h>
25426 #endif
25427
25428 #endif
25429
25430 int
25431 main (void)
25432 {
25433 if ((bool *) 0)
25434   return 0;
25435 if (sizeof (bool))
25436   return 0;
25437   ;
25438   return 0;
25439 }
25440 _ACEOF
25441 rm -f "conftest.$ac_objext"
25442 if { (eval echo "$as_me:25442: \"$ac_compile\"") >&5
25443   (eval $ac_compile) 2>&5
25444   ac_status=$?
25445   echo "$as_me:25445: \$? = $ac_status" >&5
25446   (exit "$ac_status"); } &&
25447          { ac_try='test -s "conftest.$ac_objext"'
25448   { (eval echo "$as_me:25448: \"$ac_try\"") >&5
25449   (eval $ac_try) 2>&5
25450   ac_status=$?
25451   echo "$as_me:25451: \$? = $ac_status" >&5
25452   (exit "$ac_status"); }; }; then
25453   ac_cv_type_bool=yes
25454 else
25455   echo "$as_me: failed program was:" >&5
25456 cat "conftest.$ac_ext" >&5
25457 ac_cv_type_bool=no
25458 fi
25459 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25460 fi
25461 echo "$as_me:25461: result: $ac_cv_type_bool" >&5
25462 echo "${ECHO_T}$ac_cv_type_bool" >&6
25463
25464 echo "$as_me:25464: checking size of bool" >&5
25465 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25466 if test "${ac_cv_sizeof_bool+set}" = set; then
25467   echo $ECHO_N "(cached) $ECHO_C" >&6
25468 else
25469   if test "$ac_cv_type_bool" = yes; then
25470   if test "$cross_compiling" = yes; then
25471   # Depending upon the size, compute the lo and hi bounds.
25472 cat >"conftest.$ac_ext" <<_ACEOF
25473 #line 25473 "configure"
25474 #include "confdefs.h"
25475
25476 #include <stdlib.h>
25477 #include <stdio.h>
25478
25479 #if defined(__cplusplus)
25480
25481 #ifdef HAVE_GXX_BUILTIN_H
25482 #include <g++/builtin.h>
25483 #elif HAVE_GPP_BUILTIN_H
25484 #include <gpp/builtin.h>
25485 #elif HAVE_BUILTIN_H
25486 #include <builtin.h>
25487 #endif
25488
25489 #else
25490
25491 #if $cf_cv_header_stdbool_h
25492 #include <stdbool.h>
25493 #endif
25494
25495 #endif
25496
25497 int
25498 main (void)
25499 {
25500 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25501   ;
25502   return 0;
25503 }
25504 _ACEOF
25505 rm -f "conftest.$ac_objext"
25506 if { (eval echo "$as_me:25506: \"$ac_compile\"") >&5
25507   (eval $ac_compile) 2>&5
25508   ac_status=$?
25509   echo "$as_me:25509: \$? = $ac_status" >&5
25510   (exit "$ac_status"); } &&
25511          { ac_try='test -s "conftest.$ac_objext"'
25512   { (eval echo "$as_me:25512: \"$ac_try\"") >&5
25513   (eval $ac_try) 2>&5
25514   ac_status=$?
25515   echo "$as_me:25515: \$? = $ac_status" >&5
25516   (exit "$ac_status"); }; }; then
25517   ac_lo=0 ac_mid=0
25518   while :; do
25519     cat >"conftest.$ac_ext" <<_ACEOF
25520 #line 25520 "configure"
25521 #include "confdefs.h"
25522
25523 #include <stdlib.h>
25524 #include <stdio.h>
25525
25526 #if defined(__cplusplus)
25527
25528 #ifdef HAVE_GXX_BUILTIN_H
25529 #include <g++/builtin.h>
25530 #elif HAVE_GPP_BUILTIN_H
25531 #include <gpp/builtin.h>
25532 #elif HAVE_BUILTIN_H
25533 #include <builtin.h>
25534 #endif
25535
25536 #else
25537
25538 #if $cf_cv_header_stdbool_h
25539 #include <stdbool.h>
25540 #endif
25541
25542 #endif
25543
25544 int
25545 main (void)
25546 {
25547 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25548   ;
25549   return 0;
25550 }
25551 _ACEOF
25552 rm -f "conftest.$ac_objext"
25553 if { (eval echo "$as_me:25553: \"$ac_compile\"") >&5
25554   (eval $ac_compile) 2>&5
25555   ac_status=$?
25556   echo "$as_me:25556: \$? = $ac_status" >&5
25557   (exit "$ac_status"); } &&
25558          { ac_try='test -s "conftest.$ac_objext"'
25559   { (eval echo "$as_me:25559: \"$ac_try\"") >&5
25560   (eval $ac_try) 2>&5
25561   ac_status=$?
25562   echo "$as_me:25562: \$? = $ac_status" >&5
25563   (exit "$ac_status"); }; }; then
25564   ac_hi=$ac_mid; break
25565 else
25566   echo "$as_me: failed program was:" >&5
25567 cat "conftest.$ac_ext" >&5
25568 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25569 fi
25570 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25571   done
25572 else
25573   echo "$as_me: failed program was:" >&5
25574 cat "conftest.$ac_ext" >&5
25575 ac_hi=-1 ac_mid=-1
25576   while :; do
25577     cat >"conftest.$ac_ext" <<_ACEOF
25578 #line 25578 "configure"
25579 #include "confdefs.h"
25580
25581 #include <stdlib.h>
25582 #include <stdio.h>
25583
25584 #if defined(__cplusplus)
25585
25586 #ifdef HAVE_GXX_BUILTIN_H
25587 #include <g++/builtin.h>
25588 #elif HAVE_GPP_BUILTIN_H
25589 #include <gpp/builtin.h>
25590 #elif HAVE_BUILTIN_H
25591 #include <builtin.h>
25592 #endif
25593
25594 #else
25595
25596 #if $cf_cv_header_stdbool_h
25597 #include <stdbool.h>
25598 #endif
25599
25600 #endif
25601
25602 int
25603 main (void)
25604 {
25605 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25606   ;
25607   return 0;
25608 }
25609 _ACEOF
25610 rm -f "conftest.$ac_objext"
25611 if { (eval echo "$as_me:25611: \"$ac_compile\"") >&5
25612   (eval $ac_compile) 2>&5
25613   ac_status=$?
25614   echo "$as_me:25614: \$? = $ac_status" >&5
25615   (exit "$ac_status"); } &&
25616          { ac_try='test -s "conftest.$ac_objext"'
25617   { (eval echo "$as_me:25617: \"$ac_try\"") >&5
25618   (eval $ac_try) 2>&5
25619   ac_status=$?
25620   echo "$as_me:25620: \$? = $ac_status" >&5
25621   (exit "$ac_status"); }; }; then
25622   ac_lo=$ac_mid; break
25623 else
25624   echo "$as_me: failed program was:" >&5
25625 cat "conftest.$ac_ext" >&5
25626 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25627 fi
25628 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25629   done
25630 fi
25631 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25632 # Binary search between lo and hi bounds.
25633 while test "x$ac_lo" != "x$ac_hi"; do
25634   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25635   cat >"conftest.$ac_ext" <<_ACEOF
25636 #line 25636 "configure"
25637 #include "confdefs.h"
25638
25639 #include <stdlib.h>
25640 #include <stdio.h>
25641
25642 #if defined(__cplusplus)
25643
25644 #ifdef HAVE_GXX_BUILTIN_H
25645 #include <g++/builtin.h>
25646 #elif HAVE_GPP_BUILTIN_H
25647 #include <gpp/builtin.h>
25648 #elif HAVE_BUILTIN_H
25649 #include <builtin.h>
25650 #endif
25651
25652 #else
25653
25654 #if $cf_cv_header_stdbool_h
25655 #include <stdbool.h>
25656 #endif
25657
25658 #endif
25659
25660 int
25661 main (void)
25662 {
25663 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25664   ;
25665   return 0;
25666 }
25667 _ACEOF
25668 rm -f "conftest.$ac_objext"
25669 if { (eval echo "$as_me:25669: \"$ac_compile\"") >&5
25670   (eval $ac_compile) 2>&5
25671   ac_status=$?
25672   echo "$as_me:25672: \$? = $ac_status" >&5
25673   (exit "$ac_status"); } &&
25674          { ac_try='test -s "conftest.$ac_objext"'
25675   { (eval echo "$as_me:25675: \"$ac_try\"") >&5
25676   (eval $ac_try) 2>&5
25677   ac_status=$?
25678   echo "$as_me:25678: \$? = $ac_status" >&5
25679   (exit "$ac_status"); }; }; then
25680   ac_hi=$ac_mid
25681 else
25682   echo "$as_me: failed program was:" >&5
25683 cat "conftest.$ac_ext" >&5
25684 ac_lo=`expr "$ac_mid" + 1`
25685 fi
25686 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25687 done
25688 ac_cv_sizeof_bool=$ac_lo
25689 else
25690   if test "$cross_compiling" = yes; then
25691   { { echo "$as_me:25691: error: cannot run test program while cross compiling" >&5
25692 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25693    { (exit 1); exit 1; }; }
25694 else
25695   cat >"conftest.$ac_ext" <<_ACEOF
25696 #line 25696 "configure"
25697 #include "confdefs.h"
25698
25699 #include <stdlib.h>
25700 #include <stdio.h>
25701
25702 #if defined(__cplusplus)
25703
25704 #ifdef HAVE_GXX_BUILTIN_H
25705 #include <g++/builtin.h>
25706 #elif HAVE_GPP_BUILTIN_H
25707 #include <gpp/builtin.h>
25708 #elif HAVE_BUILTIN_H
25709 #include <builtin.h>
25710 #endif
25711
25712 #else
25713
25714 #if $cf_cv_header_stdbool_h
25715 #include <stdbool.h>
25716 #endif
25717
25718 #endif
25719
25720 int
25721 main (void)
25722 {
25723 FILE *f = fopen ("conftest.val", "w");
25724 if (!f)
25725   $ac_main_return (1);
25726 fprintf (f, "%ld", (long)(sizeof (bool)));
25727 fclose (f);
25728   ;
25729   return 0;
25730 }
25731 _ACEOF
25732 rm -f "conftest$ac_exeext"
25733 if { (eval echo "$as_me:25733: \"$ac_link\"") >&5
25734   (eval $ac_link) 2>&5
25735   ac_status=$?
25736   echo "$as_me:25736: \$? = $ac_status" >&5
25737   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25738   { (eval echo "$as_me:25738: \"$ac_try\"") >&5
25739   (eval $ac_try) 2>&5
25740   ac_status=$?
25741   echo "$as_me:25741: \$? = $ac_status" >&5
25742   (exit "$ac_status"); }; }; then
25743   ac_cv_sizeof_bool=`cat conftest.val`
25744 else
25745   echo "$as_me: program exited with status $ac_status" >&5
25746 echo "$as_me: failed program was:" >&5
25747 cat "conftest.$ac_ext" >&5
25748 fi
25749 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25750 fi
25751 fi
25752 rm -f conftest.val
25753 else
25754   ac_cv_sizeof_bool=0
25755 fi
25756 fi
25757 echo "$as_me:25757: result: $ac_cv_sizeof_bool" >&5
25758 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25759 cat >>confdefs.h <<EOF
25760 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25761 EOF
25762
25763 echo "$as_me:25763: checking for type of bool" >&5
25764 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25765 if test "${cf_cv_type_of_bool+set}" = set; then
25766   echo $ECHO_N "(cached) $ECHO_C" >&6
25767 else
25768
25769         rm -f cf_test.out
25770         if test "$cross_compiling" = yes; then
25771
25772                 case x$ac_cv_sizeof_bool in
25773                 (x1) cf_cv_type_of_bool="unsigned char";;
25774                 (x2) cf_cv_type_of_bool="unsigned short";;
25775                 (x4) cf_cv_type_of_bool="unsigned int";;
25776                 (x8) cf_cv_type_of_bool="unsigned long";;
25777                 (*)  cf_cv_type_of_bool=unknown;;
25778                 esac
25779
25780 else
25781   cat >"conftest.$ac_ext" <<_ACEOF
25782 #line 25782 "configure"
25783 #include "confdefs.h"
25784
25785 #include <stdlib.h>
25786 #include <stdio.h>
25787
25788 #if defined(__cplusplus)
25789
25790 #ifdef HAVE_GXX_BUILTIN_H
25791 #include <g++/builtin.h>
25792 #elif HAVE_GPP_BUILTIN_H
25793 #include <gpp/builtin.h>
25794 #elif HAVE_BUILTIN_H
25795 #include <builtin.h>
25796 #endif
25797
25798 #else
25799
25800 #if $cf_cv_header_stdbool_h
25801 #include <stdbool.h>
25802 #endif
25803
25804 #endif
25805
25806 int main(void)
25807 {
25808         FILE *fp = fopen("cf_test.out", "w");
25809         if (fp != 0) {
25810                 bool x = true;
25811                 if ((bool)(-x) >= 0)
25812                         fputs("unsigned ", fp);
25813                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25814                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25815                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25816                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25817                 fclose(fp);
25818         }
25819         ${cf_cv_main_return:-return}(0);
25820 }
25821
25822 _ACEOF
25823 rm -f "conftest$ac_exeext"
25824 if { (eval echo "$as_me:25824: \"$ac_link\"") >&5
25825   (eval $ac_link) 2>&5
25826   ac_status=$?
25827   echo "$as_me:25827: \$? = $ac_status" >&5
25828   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25829   { (eval echo "$as_me:25829: \"$ac_try\"") >&5
25830   (eval $ac_try) 2>&5
25831   ac_status=$?
25832   echo "$as_me:25832: \$? = $ac_status" >&5
25833   (exit "$ac_status"); }; }; then
25834   cf_cv_type_of_bool=`cat cf_test.out`
25835                  if test -z "$cf_cv_type_of_bool"; then
25836                    cf_cv_type_of_bool=unknown
25837                  fi
25838 else
25839   echo "$as_me: program exited with status $ac_status" >&5
25840 echo "$as_me: failed program was:" >&5
25841 cat "conftest.$ac_ext" >&5
25842 cf_cv_type_of_bool=unknown
25843 fi
25844 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25845 fi
25846         rm -f cf_test.out
25847
25848 fi
25849 echo "$as_me:25849: result: $cf_cv_type_of_bool" >&5
25850 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25851
25852 if test "$cf_cv_type_of_bool" = unknown ; then
25853         case .$NCURSES_BOOL in
25854         (.auto|.) NCURSES_BOOL=unsigned;;
25855         esac
25856         { echo "$as_me:25856: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25857 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25858         cf_cv_type_of_bool=$NCURSES_BOOL
25859 fi
25860
25861 echo "$as_me:25861: checking for special defines needed for etip.h" >&5
25862 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25863 cf_save_CXXFLAGS="$CXXFLAGS"
25864 cf_result="none"
25865
25866 # etip.h includes ncurses.h which includes ncurses_dll.h
25867 # But ncurses_dll.h is generated - fix here.
25868 test -d include || mkdir include
25869 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
25870
25871 for cf_math in "" MATH_H
25872 do
25873 for cf_excp in "" MATH_EXCEPTION
25874 do
25875         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25876         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25877         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25878 cat >"conftest.$ac_ext" <<_ACEOF
25879 #line 25879 "configure"
25880 #include "confdefs.h"
25881
25882 #include <etip.h.in>
25883
25884 int
25885 main (void)
25886 {
25887
25888   ;
25889   return 0;
25890 }
25891 _ACEOF
25892 rm -f "conftest.$ac_objext"
25893 if { (eval echo "$as_me:25893: \"$ac_compile\"") >&5
25894   (eval $ac_compile) 2>&5
25895   ac_status=$?
25896   echo "$as_me:25896: \$? = $ac_status" >&5
25897   (exit "$ac_status"); } &&
25898          { ac_try='test -s "conftest.$ac_objext"'
25899   { (eval echo "$as_me:25899: \"$ac_try\"") >&5
25900   (eval $ac_try) 2>&5
25901   ac_status=$?
25902   echo "$as_me:25902: \$? = $ac_status" >&5
25903   (exit "$ac_status"); }; }; then
25904
25905         test -n "$cf_math" && cat >>confdefs.h <<EOF
25906 #define ETIP_NEEDS_${cf_math} 1
25907 EOF
25908
25909         test -n "$cf_excp" && cat >>confdefs.h <<EOF
25910 #define ETIP_NEEDS_${cf_excp} 1
25911 EOF
25912
25913         cf_result="$cf_math $cf_excp"
25914         break 2
25915
25916 else
25917   echo "$as_me: failed program was:" >&5
25918 cat "conftest.$ac_ext" >&5
25919 fi
25920 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25921 done
25922 done
25923 echo "$as_me:25923: result: $cf_result" >&5
25924 echo "${ECHO_T}$cf_result" >&6
25925 CXXFLAGS="$cf_save_CXXFLAGS"
25926
25927 if test -n "$CXX"; then
25928 echo "$as_me:25928: checking if $CXX accepts parameter initialization" >&5
25929 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
25930 if test "${cf_cv_cpp_param_init+set}" = set; then
25931   echo $ECHO_N "(cached) $ECHO_C" >&6
25932 else
25933
25934         ac_ext=cc
25935 ac_cpp='$CXXCPP $CPPFLAGS'
25936 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25937 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25938 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25939 ac_main_return="return"
25940
25941         if test "$cross_compiling" = yes; then
25942   cf_cv_cpp_param_init=unknown
25943 else
25944   cat >"conftest.$ac_ext" <<_ACEOF
25945 #line 25945 "configure"
25946 #include "confdefs.h"
25947
25948 class TEST {
25949 private:
25950         int value;
25951 public:
25952         TEST(int x = 1);
25953         ~TEST();
25954 };
25955
25956 TEST::TEST(int x = 1)   // some compilers do not like second initializer
25957 {
25958         value = x;
25959 }
25960 int main(void) { }
25961
25962 _ACEOF
25963 rm -f "conftest$ac_exeext"
25964 if { (eval echo "$as_me:25964: \"$ac_link\"") >&5
25965   (eval $ac_link) 2>&5
25966   ac_status=$?
25967   echo "$as_me:25967: \$? = $ac_status" >&5
25968   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25969   { (eval echo "$as_me:25969: \"$ac_try\"") >&5
25970   (eval $ac_try) 2>&5
25971   ac_status=$?
25972   echo "$as_me:25972: \$? = $ac_status" >&5
25973   (exit "$ac_status"); }; }; then
25974   cf_cv_cpp_param_init=yes
25975 else
25976   echo "$as_me: program exited with status $ac_status" >&5
25977 echo "$as_me: failed program was:" >&5
25978 cat "conftest.$ac_ext" >&5
25979 cf_cv_cpp_param_init=no
25980 fi
25981 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25982 fi
25983         ac_ext=cc
25984 ac_cpp='$CXXCPP $CPPFLAGS'
25985 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25986 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25987 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25988 ac_main_return="return"
25989
25990 fi
25991 echo "$as_me:25991: result: $cf_cv_cpp_param_init" >&5
25992 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
25993 fi
25994 test "$cf_cv_cpp_param_init" = yes &&
25995 cat >>confdefs.h <<\EOF
25996 #define CPP_HAS_PARAM_INIT 1
25997 EOF
25998
25999 if test -n "$CXX"; then
26000
26001 echo "$as_me:26001: checking if $CXX accepts static_cast" >&5
26002 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26003 if test "${cf_cv_cpp_static_cast+set}" = set; then
26004   echo $ECHO_N "(cached) $ECHO_C" >&6
26005 else
26006
26007         ac_ext=cc
26008 ac_cpp='$CXXCPP $CPPFLAGS'
26009 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26010 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26011 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26012 ac_main_return="return"
26013
26014         cat >"conftest.$ac_ext" <<_ACEOF
26015 #line 26015 "configure"
26016 #include "confdefs.h"
26017
26018 class NCursesPanel
26019 {
26020 public:
26021   NCursesPanel(int nlines,
26022                int ncols,
26023                int begin_y = 0,
26024                int begin_x = 0)
26025   {
26026   }
26027   NCursesPanel();
26028   ~NCursesPanel();
26029 };
26030
26031 template<class T> class NCursesUserPanel : public NCursesPanel
26032 {
26033 public:
26034   NCursesUserPanel (int nlines,
26035                     int ncols,
26036                     int begin_y = 0,
26037                     int begin_x = 0,
26038                     const T* p_UserData = static_cast<T*>(0))
26039     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26040   {
26041   };
26042   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26043   {
26044   };
26045
26046   virtual ~NCursesUserPanel() {};
26047 };
26048
26049 int
26050 main (void)
26051 {
26052
26053         const char* p_UserData = static_cast<char*>(0)
26054   ;
26055   return 0;
26056 }
26057 _ACEOF
26058 rm -f "conftest.$ac_objext"
26059 if { (eval echo "$as_me:26059: \"$ac_compile\"") >&5
26060   (eval $ac_compile) 2>&5
26061   ac_status=$?
26062   echo "$as_me:26062: \$? = $ac_status" >&5
26063   (exit "$ac_status"); } &&
26064          { ac_try='test -s "conftest.$ac_objext"'
26065   { (eval echo "$as_me:26065: \"$ac_try\"") >&5
26066   (eval $ac_try) 2>&5
26067   ac_status=$?
26068   echo "$as_me:26068: \$? = $ac_status" >&5
26069   (exit "$ac_status"); }; }; then
26070   cf_cv_cpp_static_cast=yes
26071 else
26072   echo "$as_me: failed program was:" >&5
26073 cat "conftest.$ac_ext" >&5
26074 cf_cv_cpp_static_cast=no
26075 fi
26076 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26077
26078         ac_ext=cc
26079 ac_cpp='$CXXCPP $CPPFLAGS'
26080 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26081 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26082 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26083 ac_main_return="return"
26084
26085 fi
26086 echo "$as_me:26086: result: $cf_cv_cpp_static_cast" >&5
26087 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26088
26089 fi
26090
26091 test "$cf_cv_cpp_static_cast" = yes &&
26092 cat >>confdefs.h <<\EOF
26093 #define CPP_HAS_STATIC_CAST 1
26094 EOF
26095
26096         CXX_AR='$(AR)'
26097         CXX_ARFLAGS='$(ARFLAGS)'
26098         case "$cf_cv_system_name" in
26099         (irix*)
26100             if test "$GXX" != yes ; then
26101                 CXX_AR='$(CXX)'
26102                 CXX_ARFLAGS='-ar -o'
26103             fi
26104             ;;
26105         (sco3.2v5*)
26106             CXXLDFLAGS="-u main"
26107             ;;
26108         (solaris2*)
26109             if test "$GXX" != yes ; then
26110                 CXX_AR='$(CXX)'
26111                 CXX_ARFLAGS='-xar -o'
26112             fi
26113             ;;
26114         esac
26115
26116 else
26117         cf_cxx_library=no
26118         cf_cv_builtin_bool=1
26119
26120         # Just because we are not configuring against C++ right now does not
26121         # mean that a user will not want to use C++.  Some distributors disable
26122         # the C++ portion of this configuration as a shortcut (or just to avoid
26123         # compiling the demo in the c++ directory).  So we need a reasonable
26124         # default for the 'bool' type.
26125         #
26126         # Caveat: since the storage of the bool type is not standardized, it
26127         # may change.
26128
26129         if test "$NCURSES_BOOL" != auto ; then
26130                 cf_cv_type_of_bool=$NCURSES_BOOL
26131                 cf_cv_header_stdbool_h=0
26132         else
26133                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26134
26135 echo "$as_me:26135: checking for bool" >&5
26136 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26137 if test "${ac_cv_type_bool+set}" = set; then
26138   echo $ECHO_N "(cached) $ECHO_C" >&6
26139 else
26140   cat >"conftest.$ac_ext" <<_ACEOF
26141 #line 26141 "configure"
26142 #include "confdefs.h"
26143
26144 #include <stdlib.h>
26145 #include <stdio.h>
26146
26147 #if defined(__cplusplus)
26148
26149 #ifdef HAVE_GXX_BUILTIN_H
26150 #include <g++/builtin.h>
26151 #elif HAVE_GPP_BUILTIN_H
26152 #include <gpp/builtin.h>
26153 #elif HAVE_BUILTIN_H
26154 #include <builtin.h>
26155 #endif
26156
26157 #else
26158
26159 #if $cf_cv_header_stdbool_h
26160 #include <stdbool.h>
26161 #endif
26162
26163 #endif
26164
26165 int
26166 main (void)
26167 {
26168 if ((bool *) 0)
26169   return 0;
26170 if (sizeof (bool))
26171   return 0;
26172   ;
26173   return 0;
26174 }
26175 _ACEOF
26176 rm -f "conftest.$ac_objext"
26177 if { (eval echo "$as_me:26177: \"$ac_compile\"") >&5
26178   (eval $ac_compile) 2>&5
26179   ac_status=$?
26180   echo "$as_me:26180: \$? = $ac_status" >&5
26181   (exit "$ac_status"); } &&
26182          { ac_try='test -s "conftest.$ac_objext"'
26183   { (eval echo "$as_me:26183: \"$ac_try\"") >&5
26184   (eval $ac_try) 2>&5
26185   ac_status=$?
26186   echo "$as_me:26186: \$? = $ac_status" >&5
26187   (exit "$ac_status"); }; }; then
26188   ac_cv_type_bool=yes
26189 else
26190   echo "$as_me: failed program was:" >&5
26191 cat "conftest.$ac_ext" >&5
26192 ac_cv_type_bool=no
26193 fi
26194 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26195 fi
26196 echo "$as_me:26196: result: $ac_cv_type_bool" >&5
26197 echo "${ECHO_T}$ac_cv_type_bool" >&6
26198
26199 echo "$as_me:26199: checking size of bool" >&5
26200 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26201 if test "${ac_cv_sizeof_bool+set}" = set; then
26202   echo $ECHO_N "(cached) $ECHO_C" >&6
26203 else
26204   if test "$ac_cv_type_bool" = yes; then
26205   if test "$cross_compiling" = yes; then
26206   # Depending upon the size, compute the lo and hi bounds.
26207 cat >"conftest.$ac_ext" <<_ACEOF
26208 #line 26208 "configure"
26209 #include "confdefs.h"
26210
26211 #include <stdlib.h>
26212 #include <stdio.h>
26213
26214 #if defined(__cplusplus)
26215
26216 #ifdef HAVE_GXX_BUILTIN_H
26217 #include <g++/builtin.h>
26218 #elif HAVE_GPP_BUILTIN_H
26219 #include <gpp/builtin.h>
26220 #elif HAVE_BUILTIN_H
26221 #include <builtin.h>
26222 #endif
26223
26224 #else
26225
26226 #if $cf_cv_header_stdbool_h
26227 #include <stdbool.h>
26228 #endif
26229
26230 #endif
26231
26232 int
26233 main (void)
26234 {
26235 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26236   ;
26237   return 0;
26238 }
26239 _ACEOF
26240 rm -f "conftest.$ac_objext"
26241 if { (eval echo "$as_me:26241: \"$ac_compile\"") >&5
26242   (eval $ac_compile) 2>&5
26243   ac_status=$?
26244   echo "$as_me:26244: \$? = $ac_status" >&5
26245   (exit "$ac_status"); } &&
26246          { ac_try='test -s "conftest.$ac_objext"'
26247   { (eval echo "$as_me:26247: \"$ac_try\"") >&5
26248   (eval $ac_try) 2>&5
26249   ac_status=$?
26250   echo "$as_me:26250: \$? = $ac_status" >&5
26251   (exit "$ac_status"); }; }; then
26252   ac_lo=0 ac_mid=0
26253   while :; do
26254     cat >"conftest.$ac_ext" <<_ACEOF
26255 #line 26255 "configure"
26256 #include "confdefs.h"
26257
26258 #include <stdlib.h>
26259 #include <stdio.h>
26260
26261 #if defined(__cplusplus)
26262
26263 #ifdef HAVE_GXX_BUILTIN_H
26264 #include <g++/builtin.h>
26265 #elif HAVE_GPP_BUILTIN_H
26266 #include <gpp/builtin.h>
26267 #elif HAVE_BUILTIN_H
26268 #include <builtin.h>
26269 #endif
26270
26271 #else
26272
26273 #if $cf_cv_header_stdbool_h
26274 #include <stdbool.h>
26275 #endif
26276
26277 #endif
26278
26279 int
26280 main (void)
26281 {
26282 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26283   ;
26284   return 0;
26285 }
26286 _ACEOF
26287 rm -f "conftest.$ac_objext"
26288 if { (eval echo "$as_me:26288: \"$ac_compile\"") >&5
26289   (eval $ac_compile) 2>&5
26290   ac_status=$?
26291   echo "$as_me:26291: \$? = $ac_status" >&5
26292   (exit "$ac_status"); } &&
26293          { ac_try='test -s "conftest.$ac_objext"'
26294   { (eval echo "$as_me:26294: \"$ac_try\"") >&5
26295   (eval $ac_try) 2>&5
26296   ac_status=$?
26297   echo "$as_me:26297: \$? = $ac_status" >&5
26298   (exit "$ac_status"); }; }; then
26299   ac_hi=$ac_mid; break
26300 else
26301   echo "$as_me: failed program was:" >&5
26302 cat "conftest.$ac_ext" >&5
26303 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26304 fi
26305 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26306   done
26307 else
26308   echo "$as_me: failed program was:" >&5
26309 cat "conftest.$ac_ext" >&5
26310 ac_hi=-1 ac_mid=-1
26311   while :; do
26312     cat >"conftest.$ac_ext" <<_ACEOF
26313 #line 26313 "configure"
26314 #include "confdefs.h"
26315
26316 #include <stdlib.h>
26317 #include <stdio.h>
26318
26319 #if defined(__cplusplus)
26320
26321 #ifdef HAVE_GXX_BUILTIN_H
26322 #include <g++/builtin.h>
26323 #elif HAVE_GPP_BUILTIN_H
26324 #include <gpp/builtin.h>
26325 #elif HAVE_BUILTIN_H
26326 #include <builtin.h>
26327 #endif
26328
26329 #else
26330
26331 #if $cf_cv_header_stdbool_h
26332 #include <stdbool.h>
26333 #endif
26334
26335 #endif
26336
26337 int
26338 main (void)
26339 {
26340 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26341   ;
26342   return 0;
26343 }
26344 _ACEOF
26345 rm -f "conftest.$ac_objext"
26346 if { (eval echo "$as_me:26346: \"$ac_compile\"") >&5
26347   (eval $ac_compile) 2>&5
26348   ac_status=$?
26349   echo "$as_me:26349: \$? = $ac_status" >&5
26350   (exit "$ac_status"); } &&
26351          { ac_try='test -s "conftest.$ac_objext"'
26352   { (eval echo "$as_me:26352: \"$ac_try\"") >&5
26353   (eval $ac_try) 2>&5
26354   ac_status=$?
26355   echo "$as_me:26355: \$? = $ac_status" >&5
26356   (exit "$ac_status"); }; }; then
26357   ac_lo=$ac_mid; break
26358 else
26359   echo "$as_me: failed program was:" >&5
26360 cat "conftest.$ac_ext" >&5
26361 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26362 fi
26363 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26364   done
26365 fi
26366 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26367 # Binary search between lo and hi bounds.
26368 while test "x$ac_lo" != "x$ac_hi"; do
26369   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26370   cat >"conftest.$ac_ext" <<_ACEOF
26371 #line 26371 "configure"
26372 #include "confdefs.h"
26373
26374 #include <stdlib.h>
26375 #include <stdio.h>
26376
26377 #if defined(__cplusplus)
26378
26379 #ifdef HAVE_GXX_BUILTIN_H
26380 #include <g++/builtin.h>
26381 #elif HAVE_GPP_BUILTIN_H
26382 #include <gpp/builtin.h>
26383 #elif HAVE_BUILTIN_H
26384 #include <builtin.h>
26385 #endif
26386
26387 #else
26388
26389 #if $cf_cv_header_stdbool_h
26390 #include <stdbool.h>
26391 #endif
26392
26393 #endif
26394
26395 int
26396 main (void)
26397 {
26398 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26399   ;
26400   return 0;
26401 }
26402 _ACEOF
26403 rm -f "conftest.$ac_objext"
26404 if { (eval echo "$as_me:26404: \"$ac_compile\"") >&5
26405   (eval $ac_compile) 2>&5
26406   ac_status=$?
26407   echo "$as_me:26407: \$? = $ac_status" >&5
26408   (exit "$ac_status"); } &&
26409          { ac_try='test -s "conftest.$ac_objext"'
26410   { (eval echo "$as_me:26410: \"$ac_try\"") >&5
26411   (eval $ac_try) 2>&5
26412   ac_status=$?
26413   echo "$as_me:26413: \$? = $ac_status" >&5
26414   (exit "$ac_status"); }; }; then
26415   ac_hi=$ac_mid
26416 else
26417   echo "$as_me: failed program was:" >&5
26418 cat "conftest.$ac_ext" >&5
26419 ac_lo=`expr "$ac_mid" + 1`
26420 fi
26421 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26422 done
26423 ac_cv_sizeof_bool=$ac_lo
26424 else
26425   if test "$cross_compiling" = yes; then
26426   { { echo "$as_me:26426: error: cannot run test program while cross compiling" >&5
26427 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26428    { (exit 1); exit 1; }; }
26429 else
26430   cat >"conftest.$ac_ext" <<_ACEOF
26431 #line 26431 "configure"
26432 #include "confdefs.h"
26433
26434 #include <stdlib.h>
26435 #include <stdio.h>
26436
26437 #if defined(__cplusplus)
26438
26439 #ifdef HAVE_GXX_BUILTIN_H
26440 #include <g++/builtin.h>
26441 #elif HAVE_GPP_BUILTIN_H
26442 #include <gpp/builtin.h>
26443 #elif HAVE_BUILTIN_H
26444 #include <builtin.h>
26445 #endif
26446
26447 #else
26448
26449 #if $cf_cv_header_stdbool_h
26450 #include <stdbool.h>
26451 #endif
26452
26453 #endif
26454
26455 int
26456 main (void)
26457 {
26458 FILE *f = fopen ("conftest.val", "w");
26459 if (!f)
26460   $ac_main_return (1);
26461 fprintf (f, "%ld", (long)(sizeof (bool)));
26462 fclose (f);
26463   ;
26464   return 0;
26465 }
26466 _ACEOF
26467 rm -f "conftest$ac_exeext"
26468 if { (eval echo "$as_me:26468: \"$ac_link\"") >&5
26469   (eval $ac_link) 2>&5
26470   ac_status=$?
26471   echo "$as_me:26471: \$? = $ac_status" >&5
26472   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26473   { (eval echo "$as_me:26473: \"$ac_try\"") >&5
26474   (eval $ac_try) 2>&5
26475   ac_status=$?
26476   echo "$as_me:26476: \$? = $ac_status" >&5
26477   (exit "$ac_status"); }; }; then
26478   ac_cv_sizeof_bool=`cat conftest.val`
26479 else
26480   echo "$as_me: program exited with status $ac_status" >&5
26481 echo "$as_me: failed program was:" >&5
26482 cat "conftest.$ac_ext" >&5
26483 fi
26484 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26485 fi
26486 fi
26487 rm -f conftest.val
26488 else
26489   ac_cv_sizeof_bool=0
26490 fi
26491 fi
26492 echo "$as_me:26492: result: $ac_cv_sizeof_bool" >&5
26493 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26494 cat >>confdefs.h <<EOF
26495 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26496 EOF
26497
26498 echo "$as_me:26498: checking for type of bool" >&5
26499 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26500 if test "${cf_cv_type_of_bool+set}" = set; then
26501   echo $ECHO_N "(cached) $ECHO_C" >&6
26502 else
26503
26504         rm -f cf_test.out
26505         if test "$cross_compiling" = yes; then
26506
26507                 case x$ac_cv_sizeof_bool in
26508                 (x1) cf_cv_type_of_bool="unsigned char";;
26509                 (x2) cf_cv_type_of_bool="unsigned short";;
26510                 (x4) cf_cv_type_of_bool="unsigned int";;
26511                 (x8) cf_cv_type_of_bool="unsigned long";;
26512                 (*)  cf_cv_type_of_bool=unknown;;
26513                 esac
26514
26515 else
26516   cat >"conftest.$ac_ext" <<_ACEOF
26517 #line 26517 "configure"
26518 #include "confdefs.h"
26519
26520 #include <stdlib.h>
26521 #include <stdio.h>
26522
26523 #if defined(__cplusplus)
26524
26525 #ifdef HAVE_GXX_BUILTIN_H
26526 #include <g++/builtin.h>
26527 #elif HAVE_GPP_BUILTIN_H
26528 #include <gpp/builtin.h>
26529 #elif HAVE_BUILTIN_H
26530 #include <builtin.h>
26531 #endif
26532
26533 #else
26534
26535 #if $cf_cv_header_stdbool_h
26536 #include <stdbool.h>
26537 #endif
26538
26539 #endif
26540
26541 int main(void)
26542 {
26543         FILE *fp = fopen("cf_test.out", "w");
26544         if (fp != 0) {
26545                 bool x = true;
26546                 if ((bool)(-x) >= 0)
26547                         fputs("unsigned ", fp);
26548                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26549                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26550                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26551                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26552                 fclose(fp);
26553         }
26554         ${cf_cv_main_return:-return}(0);
26555 }
26556
26557 _ACEOF
26558 rm -f "conftest$ac_exeext"
26559 if { (eval echo "$as_me:26559: \"$ac_link\"") >&5
26560   (eval $ac_link) 2>&5
26561   ac_status=$?
26562   echo "$as_me:26562: \$? = $ac_status" >&5
26563   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26564   { (eval echo "$as_me:26564: \"$ac_try\"") >&5
26565   (eval $ac_try) 2>&5
26566   ac_status=$?
26567   echo "$as_me:26567: \$? = $ac_status" >&5
26568   (exit "$ac_status"); }; }; then
26569   cf_cv_type_of_bool=`cat cf_test.out`
26570                  if test -z "$cf_cv_type_of_bool"; then
26571                    cf_cv_type_of_bool=unknown
26572                  fi
26573 else
26574   echo "$as_me: program exited with status $ac_status" >&5
26575 echo "$as_me: failed program was:" >&5
26576 cat "conftest.$ac_ext" >&5
26577 cf_cv_type_of_bool=unknown
26578 fi
26579 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26580 fi
26581         rm -f cf_test.out
26582
26583 fi
26584 echo "$as_me:26584: result: $cf_cv_type_of_bool" >&5
26585 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26586
26587 if test "$cf_cv_type_of_bool" = unknown ; then
26588         case .$NCURSES_BOOL in
26589         (.auto|.) NCURSES_BOOL=unsigned;;
26590         esac
26591         { echo "$as_me:26591: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26592 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26593         cf_cv_type_of_bool=$NCURSES_BOOL
26594 fi
26595
26596                 else
26597                         echo "$as_me:26597: checking for fallback type of bool" >&5
26598 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26599                         case "$host_cpu" in
26600                         (i?86)  cf_cv_type_of_bool=char ;;
26601                         (*)     cf_cv_type_of_bool=int  ;;
26602                         esac
26603                         echo "$as_me:26603: result: $cf_cv_type_of_bool" >&5
26604 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26605                 fi
26606         fi
26607 fi
26608
26609 # If the C compiler did not declare bool, and we did not determine that the C++
26610 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26611 # ncurses library use the same type as C++ bool.  Note that this allows one to
26612 # specify the type of bool in a configure-script option and postpone
26613 # integration with the C++ compiler provided that the types are compatible.
26614 USE_CXX_BOOL=1
26615 if test "$cf_cv_cc_bool_type" = 1
26616 then
26617         # oops: C has a bool.  Unlikely, but C++ could differ.
26618         USE_CXX_BOOL=0
26619 elif test "$cf_cv_builtin_bool" = 0
26620 then
26621         # C++ has no bool
26622         USE_CXX_BOOL=0
26623 else
26624         # this is the normal case
26625         USE_CXX_BOOL='defined(__cplusplus)'
26626 fi
26627
26628 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26629
26630         if test "$cf_with_ada" != "no" ; then
26631                 if test "$with_libtool" != "no"; then
26632                         { echo "$as_me:26632: WARNING: libtool does not support Ada - disabling feature" >&5
26633 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26634                         cf_with_ada=no
26635                 fi
26636         fi
26637
26638         if test "$cf_with_ada" != "no" ; then
26639
26640 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26641 do
26642
26643 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26644
26645         unset ac_cv_path_cf_TEMP_gnat
26646         unset cf_TEMP_gnat
26647         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26648 set dummy $cf_prog_gnat; ac_word=$2
26649 echo "$as_me:26649: checking for $ac_word" >&5
26650 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26651 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26652   echo $ECHO_N "(cached) $ECHO_C" >&6
26653 else
26654   case $cf_TEMP_gnat in
26655   [\\/]* | ?:[\\/]*)
26656   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26657   ;;
26658   *)
26659   ac_save_IFS=$IFS; IFS=$ac_path_separator
26660 ac_dummy="$PATH"
26661 for ac_dir in $ac_dummy; do
26662   IFS=$ac_save_IFS
26663   test -z "$ac_dir" && ac_dir=.
26664   if $as_executable_p "$ac_dir/$ac_word"; then
26665    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26666    echo "$as_me:26666: found $ac_dir/$ac_word" >&5
26667    break
26668 fi
26669 done
26670
26671   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26672   ;;
26673 esac
26674 fi
26675 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26676
26677 if test -n "$cf_TEMP_gnat"; then
26678   echo "$as_me:26678: result: $cf_TEMP_gnat" >&5
26679 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26680 else
26681   echo "$as_me:26681: result: no" >&5
26682 echo "${ECHO_T}no" >&6
26683 fi
26684
26685         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26686
26687         if test "x$cf_TEMP_gnat" != xno; then
26688                 unset cf_cv_gnat_version
26689                 unset cf_TEMP_gnat
26690
26691 echo "$as_me:26691: checking for $cf_prog_gnat version" >&5
26692 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26693 if test "${cf_cv_gnat_version+set}" = set; then
26694   echo $ECHO_N "(cached) $ECHO_C" >&6
26695 else
26696
26697 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26698         grep '[0-9].[0-9][0-9]*' |\
26699         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26700
26701 fi
26702 echo "$as_me:26702: result: $cf_cv_gnat_version" >&5
26703 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26704 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26705 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26706
26707         fi
26708         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26709
26710         unset cf_TEMP_gnat
26711         unset cf_cv_gnat_version
26712         unset ac_cv_path_cf_TEMP_gnat
26713 done
26714
26715 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26716         cf_ada_make=
26717         cf_cv_prog_gnat_correct=no
26718 else
26719         cf_ada_make=gnatmake
26720         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26721                 # gprconfig is newer than gnatmake; we can continue...
26722                 cf_ada_config="##"
26723         else
26724                 rm -rf ./conftest* ./*~conftest*
26725                 if mkdir conftest.src
26726                 then
26727                         cf_ada_config=""
26728                         cd conftest.src
26729                         for cf_gprconfig in Ada C
26730                         do
26731                                 echo "$as_me:26731: checking for gprconfig name for $cf_gprconfig" >&5
26732 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26733                                 if test "$cf_gprconfig" = C
26734                                 then
26735                                         for cf_gprconfig_param in \
26736                                                 "$cf_gprconfig,,,,GNATGCC" \
26737                                                 "$cf_gprconfig,,,,GCC" \
26738                                                 "$cf_gprconfig"
26739                                         do
26740                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26741                                                 test -n "$cf_gprconfig_value" && break
26742                                         done
26743                                 else
26744                                         cf_gprconfig_param=$cf_gprconfig
26745                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26746                                 fi
26747                                 if test -n "$cf_gprconfig_value"
26748                                 then
26749                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
26750                                         echo "$as_me:26750: result: $cf_gprconfig_value" >&5
26751 echo "${ECHO_T}$cf_gprconfig_value" >&6
26752                                 else
26753                                         echo "$as_me:26753: result: missing" >&5
26754 echo "${ECHO_T}missing" >&6
26755                                         cf_ada_config="#"
26756                                         break
26757                                 fi
26758                         done
26759                         cd ..
26760                         rm -rf ./conftest* ./*~conftest*
26761                 fi
26762         fi
26763         if test "x$cf_ada_config" != "x#"
26764         then
26765
26766 echo "$as_me:26766: checking for gnat version" >&5
26767 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26768 if test "${cf_cv_gnat_version+set}" = set; then
26769   echo $ECHO_N "(cached) $ECHO_C" >&6
26770 else
26771
26772 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26773         grep '[0-9].[0-9][0-9]*' |\
26774         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26775
26776 fi
26777 echo "$as_me:26777: result: $cf_cv_gnat_version" >&5
26778 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26779 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26780
26781 case "$cf_cv_gnat_version" in
26782 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26783         cf_cv_prog_gnat_correct=yes
26784         ;;
26785 (*)
26786         { echo "$as_me:26786: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26787 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26788         cf_cv_prog_gnat_correct=no
26789         ;;
26790 esac
26791
26792                 # Extract the first word of "m4", so it can be a program name with args.
26793 set dummy m4; ac_word=$2
26794 echo "$as_me:26794: checking for $ac_word" >&5
26795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26796 if test "${ac_cv_prog_M4_exists+set}" = set; then
26797   echo $ECHO_N "(cached) $ECHO_C" >&6
26798 else
26799   if test -n "$M4_exists"; then
26800   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26801 else
26802   ac_save_IFS=$IFS; IFS=$ac_path_separator
26803 ac_dummy="$PATH"
26804 for ac_dir in $ac_dummy; do
26805   IFS=$ac_save_IFS
26806   test -z "$ac_dir" && ac_dir=.
26807   $as_executable_p "$ac_dir/$ac_word" || continue
26808 ac_cv_prog_M4_exists="yes"
26809 echo "$as_me:26809: found $ac_dir/$ac_word" >&5
26810 break
26811 done
26812
26813   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26814 fi
26815 fi
26816 M4_exists=$ac_cv_prog_M4_exists
26817 if test -n "$M4_exists"; then
26818   echo "$as_me:26818: result: $M4_exists" >&5
26819 echo "${ECHO_T}$M4_exists" >&6
26820 else
26821   echo "$as_me:26821: result: no" >&5
26822 echo "${ECHO_T}no" >&6
26823 fi
26824
26825                 if test "$ac_cv_prog_M4_exists" = no; then
26826                         cf_cv_prog_gnat_correct=no
26827                         { echo "$as_me:26827: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26828 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26829                 fi
26830                 if test "$cf_cv_prog_gnat_correct" = yes; then
26831                         echo "$as_me:26831: checking if GNAT works" >&5
26832 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26833
26834 rm -rf ./conftest* ./*~conftest*
26835 cat >>conftest.ads <<CF_EOF
26836 procedure conftest;
26837 CF_EOF
26838 cat >>conftest.adb <<CF_EOF
26839 with Text_IO;
26840 with GNAT.OS_Lib;
26841 procedure conftest is
26842 begin
26843    Text_IO.Put ("Hello World");
26844    Text_IO.New_Line;
26845    GNAT.OS_Lib.OS_Exit (0);
26846 end conftest;
26847 CF_EOF
26848 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26849    if ( ./conftest 1>&5 2>&1 ) ; then
26850       cf_cv_prog_gnat_correct=yes
26851    else
26852       cf_cv_prog_gnat_correct=no
26853    fi
26854 else
26855    cf_cv_prog_gnat_correct=no
26856 fi
26857 rm -rf ./conftest* ./*~conftest*
26858
26859                         echo "$as_me:26859: result: $cf_cv_prog_gnat_correct" >&5
26860 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26861                 fi
26862         else
26863                 cf_cv_prog_gnat_correct=no
26864         fi
26865 fi
26866
26867                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26868
26869         ADAFLAGS="$ADAFLAGS -gnatpn"
26870
26871         echo "$as_me:26871: checking optimization options for ADAFLAGS" >&5
26872 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26873         case "$CFLAGS" in
26874         (*-g*)
26875
26876         ADAFLAGS="$ADAFLAGS -g"
26877
26878                 ;;
26879         esac
26880         case "$CFLAGS" in
26881         (*-O*)
26882                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26883
26884         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26885
26886                 ;;
26887         esac
26888         echo "$as_me:26888: result: $ADAFLAGS" >&5
26889 echo "${ECHO_T}$ADAFLAGS" >&6
26890
26891 echo "$as_me:26891: checking if GNATPREP supports -T option" >&5
26892 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26893 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26894   echo $ECHO_N "(cached) $ECHO_C" >&6
26895 else
26896
26897 cf_cv_gnatprep_opt_t=no
26898 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
26899
26900 fi
26901 echo "$as_me:26901: result: $cf_cv_gnatprep_opt_t" >&5
26902 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
26903 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
26904
26905 echo "$as_me:26905: checking if GNAT supports generics" >&5
26906 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
26907 case "$cf_cv_gnat_version" in
26908 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26909         cf_gnat_generics=yes
26910         ;;
26911 (*)
26912         cf_gnat_generics=no
26913         ;;
26914 esac
26915 echo "$as_me:26915: result: $cf_gnat_generics" >&5
26916 echo "${ECHO_T}$cf_gnat_generics" >&6
26917
26918 if test "$cf_gnat_generics" = yes
26919 then
26920         cf_compile_generics=generics
26921         cf_generic_objects="\${GENOBJS}"
26922 else
26923         cf_compile_generics=
26924         cf_generic_objects=
26925 fi
26926
26927 echo "$as_me:26927: checking if GNAT supports SIGINT" >&5
26928 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
26929 if test "${cf_cv_gnat_sigint+set}" = set; then
26930   echo $ECHO_N "(cached) $ECHO_C" >&6
26931 else
26932
26933 rm -rf ./conftest* ./*~conftest*
26934 cat >>conftest.ads <<CF_EOF
26935 with Ada.Interrupts.Names;
26936
26937 package ConfTest is
26938
26939    pragma Warnings (Off);  --  the next pragma exists since 3.11p
26940    pragma Unreserve_All_Interrupts;
26941    pragma Warnings (On);
26942
26943    protected Process is
26944       procedure Stop;
26945       function Continue return Boolean;
26946       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
26947    private
26948       Done : Boolean := False;
26949    end Process;
26950
26951 end ConfTest;
26952 CF_EOF
26953 cat >>conftest.adb <<CF_EOF
26954 package body ConfTest is
26955    protected body Process is
26956       procedure Stop is
26957       begin
26958          Done := True;
26959       end Stop;
26960       function Continue return Boolean is
26961       begin
26962          return not Done;
26963       end Continue;
26964    end Process;
26965 end ConfTest;
26966 CF_EOF
26967 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26968       cf_cv_gnat_sigint=yes
26969 else
26970    cf_cv_gnat_sigint=no
26971 fi
26972 rm -rf ./conftest* ./*~conftest*
26973
26974 fi
26975 echo "$as_me:26975: result: $cf_cv_gnat_sigint" >&5
26976 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
26977
26978 if test "$cf_cv_gnat_sigint" = yes ; then
26979         USE_GNAT_SIGINT=""
26980 else
26981         USE_GNAT_SIGINT="#"
26982 fi
26983
26984 cf_gnat_libraries=no
26985 cf_gnat_projects=no
26986
26987 if test "$enable_gnat_projects" != no ; then
26988 echo "$as_me:26988: checking if GNAT supports project files" >&5
26989 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
26990 case "$cf_cv_gnat_version" in
26991 (3.[0-9]*)
26992         ;;
26993 (*)
26994         case "$cf_cv_system_name" in
26995         (cygwin*|msys*)
26996                 ;;
26997         (*)
26998                 rm -rf ./conftest* ./*~conftest*
26999                 if mkdir conftest.src conftest.bin conftest.lib
27000                 then
27001                         cd conftest.src
27002                         rm -rf ./conftest* ./*~conftest*
27003                         cat >>library.gpr <<CF_EOF
27004 project Library is
27005   Kind := External ("LIB_KIND");
27006   for Library_Name use "ConfTest";
27007   for Object_Dir use ".";
27008   for Library_ALI_Dir use External("LIBRARY_DIR");
27009   for Library_Version use External ("SONAME");
27010   for Library_Kind use Kind;
27011   for Library_Dir use External("BUILD_DIR");
27012   Source_Dir := External ("SOURCE_DIR");
27013   for Source_Dirs use (Source_Dir);
27014 end Library;
27015 CF_EOF
27016                         cat >>confpackage.ads <<CF_EOF
27017 package ConfPackage is
27018    procedure conftest;
27019 end ConfPackage;
27020 CF_EOF
27021                         cat >>confpackage.adb <<CF_EOF
27022 with Text_IO;
27023 package body ConfPackage is
27024    procedure conftest is
27025    begin
27026       Text_IO.Put ("Hello World");
27027       Text_IO.New_Line;
27028    end conftest;
27029 end ConfPackage;
27030 CF_EOF
27031                         if ( "$cf_ada_make" $ADAFLAGS \
27032                                         -Plibrary.gpr \
27033                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27034                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27035                                         -XSOURCE_DIR="`pwd`" \
27036                                         -XSONAME=libConfTest.so.1 \
27037                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27038                                 cf_gnat_projects=yes
27039                         fi
27040                         cd ..
27041                 fi
27042                 if test -f conftest.lib/confpackage.ali
27043                 then
27044                         cf_gnat_libraries=yes
27045                 fi
27046                 rm -rf ./conftest* ./*~conftest*
27047                 ;;
27048         esac
27049         ;;
27050 esac
27051 echo "$as_me:27051: result: $cf_gnat_projects" >&5
27052 echo "${ECHO_T}$cf_gnat_projects" >&6
27053 fi # enable_gnat_projects
27054
27055 if test "$cf_gnat_projects" = yes
27056 then
27057         echo "$as_me:27057: checking if GNAT supports libraries" >&5
27058 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27059         echo "$as_me:27059: result: $cf_gnat_libraries" >&5
27060 echo "${ECHO_T}$cf_gnat_libraries" >&6
27061 fi
27062
27063 USE_OLD_MAKERULES=""
27064 USE_GNAT_PROJECTS="#"
27065 USE_GNAT_MAKE_GPR="#"
27066 USE_GNAT_GPRBUILD="#"
27067
27068 if test "$cf_gnat_projects" = yes
27069 then
27070         USE_OLD_MAKERULES="#"
27071         USE_GNAT_PROJECTS=""
27072         if test "$cf_cv_VERSION_GPRBUILD" != no
27073         then
27074                 USE_GNAT_GPRBUILD=""
27075         elif test "$cf_cv_VERSION_GNATMAKE" != no
27076         then
27077                 USE_GNAT_MAKE_GPR=""
27078         else
27079                 { echo "$as_me:27079: WARNING: use old makefile rules since tools are missing" >&5
27080 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27081         fi
27082 fi
27083
27084 if test "$cf_gnat_libraries" = yes
27085 then
27086         USE_GNAT_LIBRARIES=""
27087 else
27088         USE_GNAT_LIBRARIES="#"
27089 fi
27090
27091 echo "$as_me:27091: checking for ada-compiler" >&5
27092 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27093
27094 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27095 if test "${with_ada_compiler+set}" = set; then
27096   withval="$with_ada_compiler"
27097   cf_ada_compiler=$withval
27098 else
27099   cf_ada_compiler=gnatmake
27100 fi;
27101
27102 echo "$as_me:27102: result: $cf_ada_compiler" >&5
27103 echo "${ECHO_T}$cf_ada_compiler" >&6
27104
27105                         cf_ada_package=terminal_interface
27106
27107 echo "$as_me:27107: checking for ada-include" >&5
27108 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27109
27110 # Check whether --with-ada-include or --without-ada-include was given.
27111 if test "${with_ada_include+set}" = set; then
27112   withval="$with_ada_include"
27113
27114 else
27115   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27116 fi; if test -n "$prefix/share/ada/adainclude" ; then
27117
27118 if test "x$prefix" != xNONE; then
27119         cf_path_syntax="$prefix"
27120 else
27121         cf_path_syntax="$ac_default_prefix"
27122 fi
27123
27124 case ".$withval" in
27125 (.\$\(*\)*|.\'*\'*)
27126         ;;
27127 (..|./*|.\\*)
27128         ;;
27129 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27130         ;;
27131 (.\$\{*prefix\}*|.\$\{*dir\}*)
27132         eval withval="$withval"
27133         case ".$withval" in
27134         (.NONE/*)
27135                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27136                 ;;
27137         esac
27138         ;;
27139 (.no|.NONE/*)
27140         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27141         ;;
27142 (*)
27143         { { echo "$as_me:27143: error: expected a pathname, not \"$withval\"" >&5
27144 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27145    { (exit 1); exit 1; }; }
27146         ;;
27147 esac
27148
27149 fi
27150 eval ADA_INCLUDE="$withval"
27151
27152 echo "$as_me:27152: result: $ADA_INCLUDE" >&5
27153 echo "${ECHO_T}$ADA_INCLUDE" >&6
27154
27155 echo "$as_me:27155: checking for ada-objects" >&5
27156 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27157
27158 # Check whether --with-ada-objects or --without-ada-objects was given.
27159 if test "${with_ada_objects+set}" = set; then
27160   withval="$with_ada_objects"
27161
27162 else
27163   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27164 fi; if test -n "$prefix/lib/ada/adalib" ; then
27165
27166 if test "x$prefix" != xNONE; then
27167         cf_path_syntax="$prefix"
27168 else
27169         cf_path_syntax="$ac_default_prefix"
27170 fi
27171
27172 case ".$withval" in
27173 (.\$\(*\)*|.\'*\'*)
27174         ;;
27175 (..|./*|.\\*)
27176         ;;
27177 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27178         ;;
27179 (.\$\{*prefix\}*|.\$\{*dir\}*)
27180         eval withval="$withval"
27181         case ".$withval" in
27182         (.NONE/*)
27183                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27184                 ;;
27185         esac
27186         ;;
27187 (.no|.NONE/*)
27188         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27189         ;;
27190 (*)
27191         { { echo "$as_me:27191: error: expected a pathname, not \"$withval\"" >&5
27192 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27193    { (exit 1); exit 1; }; }
27194         ;;
27195 esac
27196
27197 fi
27198 eval ADA_OBJECTS="$withval"
27199
27200 echo "$as_me:27200: result: $ADA_OBJECTS" >&5
27201 echo "${ECHO_T}$ADA_OBJECTS" >&6
27202
27203 echo "$as_me:27203: checking if an Ada95 shared-library should be built" >&5
27204 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27205
27206 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27207 if test "${with_ada_sharedlib+set}" = set; then
27208   withval="$with_ada_sharedlib"
27209   with_ada_sharedlib=$withval
27210 else
27211   with_ada_sharedlib=no
27212 fi;
27213 echo "$as_me:27213: result: $with_ada_sharedlib" >&5
27214 echo "${ECHO_T}$with_ada_sharedlib" >&6
27215
27216 if test "x$with_ada_sharedlib" != xno
27217 then
27218         if test "x$cf_gnat_projects" != xyes
27219         then
27220                 { echo "$as_me:27220: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27221 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27222                 with_ada_sharedlib=no
27223         fi
27224 fi
27225
27226 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27227 MAKE_ADA_SHAREDLIB="#"
27228
27229 if test "x$with_ada_sharedlib" != xno
27230 then
27231         MAKE_ADA_SHAREDLIB=
27232         if test "x$with_ada_sharedlib" != xyes
27233         then
27234                 ADA_SHAREDLIB="$with_ada_sharedlib"
27235         fi
27236 fi
27237
27238                         # allow the Ada binding to be renamed
27239
27240 echo "$as_me:27240: checking for ada-libname" >&5
27241 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27242
27243 # Check whether --with-ada-libname or --without-ada-libname was given.
27244 if test "${with_ada_libname+set}" = set; then
27245   withval="$with_ada_libname"
27246   ADA_LIBNAME=$withval
27247 else
27248   ADA_LIBNAME=AdaCurses
27249 fi;
27250 case "x$ADA_LIBNAME" in
27251 (x|xyes|xno)
27252         ADA_LIBNAME=AdaCurses
27253         ;;
27254 esac
27255
27256 echo "$as_me:27256: result: $ADA_LIBNAME" >&5
27257 echo "${ECHO_T}$ADA_LIBNAME" >&6
27258
27259                 fi
27260         fi
27261 else
27262         cf_with_ada=no
27263 fi
27264
27265 # do this "late" to avoid conflict with header-checks
27266 if test "x$with_widec" = xyes ; then
27267         echo "$as_me:27267: checking for wchar_t" >&5
27268 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27269 if test "${ac_cv_type_wchar_t+set}" = set; then
27270   echo $ECHO_N "(cached) $ECHO_C" >&6
27271 else
27272   cat >"conftest.$ac_ext" <<_ACEOF
27273 #line 27273 "configure"
27274 #include "confdefs.h"
27275 $ac_includes_default
27276 int
27277 main (void)
27278 {
27279 if ((wchar_t *) 0)
27280   return 0;
27281 if (sizeof (wchar_t))
27282   return 0;
27283   ;
27284   return 0;
27285 }
27286 _ACEOF
27287 rm -f "conftest.$ac_objext"
27288 if { (eval echo "$as_me:27288: \"$ac_compile\"") >&5
27289   (eval $ac_compile) 2>&5
27290   ac_status=$?
27291   echo "$as_me:27291: \$? = $ac_status" >&5
27292   (exit "$ac_status"); } &&
27293          { ac_try='test -s "conftest.$ac_objext"'
27294   { (eval echo "$as_me:27294: \"$ac_try\"") >&5
27295   (eval $ac_try) 2>&5
27296   ac_status=$?
27297   echo "$as_me:27297: \$? = $ac_status" >&5
27298   (exit "$ac_status"); }; }; then
27299   ac_cv_type_wchar_t=yes
27300 else
27301   echo "$as_me: failed program was:" >&5
27302 cat "conftest.$ac_ext" >&5
27303 ac_cv_type_wchar_t=no
27304 fi
27305 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27306 fi
27307 echo "$as_me:27307: result: $ac_cv_type_wchar_t" >&5
27308 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27309
27310 echo "$as_me:27310: checking size of wchar_t" >&5
27311 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27312 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27313   echo $ECHO_N "(cached) $ECHO_C" >&6
27314 else
27315   if test "$ac_cv_type_wchar_t" = yes; then
27316   if test "$cross_compiling" = yes; then
27317   # Depending upon the size, compute the lo and hi bounds.
27318 cat >"conftest.$ac_ext" <<_ACEOF
27319 #line 27319 "configure"
27320 #include "confdefs.h"
27321 $ac_includes_default
27322 int
27323 main (void)
27324 {
27325 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27326   ;
27327   return 0;
27328 }
27329 _ACEOF
27330 rm -f "conftest.$ac_objext"
27331 if { (eval echo "$as_me:27331: \"$ac_compile\"") >&5
27332   (eval $ac_compile) 2>&5
27333   ac_status=$?
27334   echo "$as_me:27334: \$? = $ac_status" >&5
27335   (exit "$ac_status"); } &&
27336          { ac_try='test -s "conftest.$ac_objext"'
27337   { (eval echo "$as_me:27337: \"$ac_try\"") >&5
27338   (eval $ac_try) 2>&5
27339   ac_status=$?
27340   echo "$as_me:27340: \$? = $ac_status" >&5
27341   (exit "$ac_status"); }; }; then
27342   ac_lo=0 ac_mid=0
27343   while :; do
27344     cat >"conftest.$ac_ext" <<_ACEOF
27345 #line 27345 "configure"
27346 #include "confdefs.h"
27347 $ac_includes_default
27348 int
27349 main (void)
27350 {
27351 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27352   ;
27353   return 0;
27354 }
27355 _ACEOF
27356 rm -f "conftest.$ac_objext"
27357 if { (eval echo "$as_me:27357: \"$ac_compile\"") >&5
27358   (eval $ac_compile) 2>&5
27359   ac_status=$?
27360   echo "$as_me:27360: \$? = $ac_status" >&5
27361   (exit "$ac_status"); } &&
27362          { ac_try='test -s "conftest.$ac_objext"'
27363   { (eval echo "$as_me:27363: \"$ac_try\"") >&5
27364   (eval $ac_try) 2>&5
27365   ac_status=$?
27366   echo "$as_me:27366: \$? = $ac_status" >&5
27367   (exit "$ac_status"); }; }; then
27368   ac_hi=$ac_mid; break
27369 else
27370   echo "$as_me: failed program was:" >&5
27371 cat "conftest.$ac_ext" >&5
27372 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27373 fi
27374 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27375   done
27376 else
27377   echo "$as_me: failed program was:" >&5
27378 cat "conftest.$ac_ext" >&5
27379 ac_hi=-1 ac_mid=-1
27380   while :; do
27381     cat >"conftest.$ac_ext" <<_ACEOF
27382 #line 27382 "configure"
27383 #include "confdefs.h"
27384 $ac_includes_default
27385 int
27386 main (void)
27387 {
27388 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
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_lo=$ac_mid; break
27406 else
27407   echo "$as_me: failed program was:" >&5
27408 cat "conftest.$ac_ext" >&5
27409 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27410 fi
27411 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27412   done
27413 fi
27414 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27415 # Binary search between lo and hi bounds.
27416 while test "x$ac_lo" != "x$ac_hi"; do
27417   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27418   cat >"conftest.$ac_ext" <<_ACEOF
27419 #line 27419 "configure"
27420 #include "confdefs.h"
27421 $ac_includes_default
27422 int
27423 main (void)
27424 {
27425 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27426   ;
27427   return 0;
27428 }
27429 _ACEOF
27430 rm -f "conftest.$ac_objext"
27431 if { (eval echo "$as_me:27431: \"$ac_compile\"") >&5
27432   (eval $ac_compile) 2>&5
27433   ac_status=$?
27434   echo "$as_me:27434: \$? = $ac_status" >&5
27435   (exit "$ac_status"); } &&
27436          { ac_try='test -s "conftest.$ac_objext"'
27437   { (eval echo "$as_me:27437: \"$ac_try\"") >&5
27438   (eval $ac_try) 2>&5
27439   ac_status=$?
27440   echo "$as_me:27440: \$? = $ac_status" >&5
27441   (exit "$ac_status"); }; }; then
27442   ac_hi=$ac_mid
27443 else
27444   echo "$as_me: failed program was:" >&5
27445 cat "conftest.$ac_ext" >&5
27446 ac_lo=`expr "$ac_mid" + 1`
27447 fi
27448 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27449 done
27450 ac_cv_sizeof_wchar_t=$ac_lo
27451 else
27452   if test "$cross_compiling" = yes; then
27453   { { echo "$as_me:27453: error: cannot run test program while cross compiling" >&5
27454 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27455    { (exit 1); exit 1; }; }
27456 else
27457   cat >"conftest.$ac_ext" <<_ACEOF
27458 #line 27458 "configure"
27459 #include "confdefs.h"
27460 $ac_includes_default
27461 int
27462 main (void)
27463 {
27464 FILE *f = fopen ("conftest.val", "w");
27465 if (!f)
27466   $ac_main_return (1);
27467 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
27468 fclose (f);
27469   ;
27470   return 0;
27471 }
27472 _ACEOF
27473 rm -f "conftest$ac_exeext"
27474 if { (eval echo "$as_me:27474: \"$ac_link\"") >&5
27475   (eval $ac_link) 2>&5
27476   ac_status=$?
27477   echo "$as_me:27477: \$? = $ac_status" >&5
27478   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27479   { (eval echo "$as_me:27479: \"$ac_try\"") >&5
27480   (eval $ac_try) 2>&5
27481   ac_status=$?
27482   echo "$as_me:27482: \$? = $ac_status" >&5
27483   (exit "$ac_status"); }; }; then
27484   ac_cv_sizeof_wchar_t=`cat conftest.val`
27485 else
27486   echo "$as_me: program exited with status $ac_status" >&5
27487 echo "$as_me: failed program was:" >&5
27488 cat "conftest.$ac_ext" >&5
27489 fi
27490 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27491 fi
27492 fi
27493 rm -f conftest.val
27494 else
27495   ac_cv_sizeof_wchar_t=0
27496 fi
27497 fi
27498 echo "$as_me:27498: result: $ac_cv_sizeof_wchar_t" >&5
27499 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27500 cat >>confdefs.h <<EOF
27501 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27502 EOF
27503
27504         # cross-compiling to mingw can run into the problem that attempting to
27505         # link with the regex library fails, causing the test to not set this to
27506         # a number.  "recent" autoconf does not address this problem either -TD
27507         if test -z "$ac_cv_sizeof_wchar_t"
27508         then
27509                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27510
27511 echo "${as_me:-configure}:27511: testing test failed (assume 2) ..." 1>&5
27512
27513                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27514                 mv confdefs.tmp confdefs.h
27515                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27516         fi
27517 fi
27518
27519 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27520 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27521 ###
27522 ### ticlib modules may be a separate library, otherwise contained in termlib.
27523 ### termlib modules may be a separate library, otherwise contained in ncurses.
27524 ###
27525 ### The of "+" or " " between the tokens controls the way the script
27526 ### chooses to split module lists into libraries.
27527 ###
27528 ### (see CF_LIB_RULES).
27529 echo "$as_me:27529: checking for library subsets" >&5
27530 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27531 LIB_SUBSETS=
27532
27533 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27534         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27535         if test "$with_ticlib" != no ; then
27536                 LIB_SUBSETS="${LIB_SUBSETS} "
27537         else
27538                 LIB_SUBSETS="${LIB_SUBSETS}+"
27539         fi
27540 fi
27541
27542 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27543 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27544
27545 if test "$with_termlib" != no ; then
27546         LIB_SUBSETS="${LIB_SUBSETS} "
27547 else
27548         LIB_SUBSETS="${LIB_SUBSETS}+"
27549 fi
27550
27551 LIB_SUBSETS="${LIB_SUBSETS}base"
27552
27553 # Most term-driver calls are to tinfo, but some like init_pair are to the
27554 # base library (so it resides in base).
27555 if test "$with_term_driver" != no ; then
27556         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27557         case "$cf_cv_system_name" in
27558         (*mingw32*|*mingw64*)
27559                 if test "x$with_exp_win32" = xyes ; then
27560                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27561                 else
27562                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27563                 fi
27564                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27565                 ;;
27566         (*)
27567                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27568                 ;;
27569         esac
27570 elif test "x$with_exp_win32" = xyes ; then
27571         case "$cf_cv_system_name" in
27572         (*mingw32*|*mingw64*)
27573                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27574                 ;;
27575         (*)
27576                 ;;
27577         esac
27578 fi
27579
27580 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27581 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27582
27583 echo "$as_me:27583: result: $LIB_SUBSETS" >&5
27584 echo "${ECHO_T}$LIB_SUBSETS" >&6
27585
27586 ### Construct the list of include-directories to be generated
27587
27588 if test "$srcdir" != "."; then
27589         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27590 fi
27591 CPPFLAGS="-I../include $CPPFLAGS"
27592 if test "$srcdir" != "."; then
27593         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27594 fi
27595 CPPFLAGS="-I. $CPPFLAGS"
27596
27597 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27598 if test "$srcdir" != "."; then
27599         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27600 fi
27601 if test "$GCC" != yes; then
27602         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27603 elif test "$includedir" != "/usr/include"; then
27604         if test "$includedir" = '${prefix}/include' ; then
27605                 if test x$prefix != x/usr ; then
27606                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27607                 fi
27608         else
27609                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27610         fi
27611 fi
27612
27613 ### Build up pieces for makefile rules
27614 echo "$as_me:27614: checking default library suffix" >&5
27615 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27616
27617         case $DFT_LWR_MODEL in
27618         (libtool) DFT_ARG_SUFFIX=''   ;;
27619         (normal)  DFT_ARG_SUFFIX=''   ;;
27620         (debug)   DFT_ARG_SUFFIX='_g' ;;
27621         (profile) DFT_ARG_SUFFIX='_p' ;;
27622         (shared)  DFT_ARG_SUFFIX=''   ;;
27623         esac
27624         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27625 echo "$as_me:27625: result: $DFT_ARG_SUFFIX" >&5
27626 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27627
27628 echo "$as_me:27628: checking default library-dependency suffix" >&5
27629 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27630
27631         case X$DFT_LWR_MODEL in
27632         (Xlibtool)
27633                 DFT_LIB_SUFFIX='.la'
27634                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27635                 ;;
27636         (Xdebug)
27637                 case "$cf_cv_system_name" in
27638                 (*-msvc*)
27639                         DFT_LIB_SUFFIX='_g.lib'
27640                         ;;
27641                 (*)
27642                         DFT_LIB_SUFFIX='_g.a'
27643                         ;;
27644                 esac
27645                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27646                 ;;
27647         (Xprofile)
27648                 case "$cf_cv_system_name" in
27649                 (*-msvc*)
27650                         DFT_LIB_SUFFIX='_p.lib'
27651                         ;;
27652                 (*)
27653                         DFT_LIB_SUFFIX='_p.a'
27654                         ;;
27655                 esac
27656                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27657                 ;;
27658         (Xshared)
27659                 case "$cf_cv_system_name" in
27660                 (aix[5-7]*)
27661                         DFT_LIB_SUFFIX='.so'
27662                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27663                         ;;
27664                 (*-msvc*)
27665                         DFT_LIB_SUFFIX='.dll'
27666                         DFT_DEP_SUFFIX='.dll.lib'
27667                         ;;
27668                 (cygwin*|msys*|mingw*)
27669                         DFT_LIB_SUFFIX='.dll'
27670                         DFT_DEP_SUFFIX='.dll.a'
27671                         ;;
27672                 (darwin*)
27673                         DFT_LIB_SUFFIX='.dylib'
27674                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27675                         ;;
27676                 (hpux*)
27677                         case "$target" in
27678                         (ia64*)
27679                                 DFT_LIB_SUFFIX='.so'
27680                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27681                                 ;;
27682                         (*)
27683                                 DFT_LIB_SUFFIX='.sl'
27684                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27685                                 ;;
27686                         esac
27687                         ;;
27688                 (*)
27689                         DFT_LIB_SUFFIX='.so'
27690                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27691                         ;;
27692                 esac
27693                 ;;
27694         (*)
27695                 case "$target" in
27696                 (*-msvc*)
27697                         DFT_LIB_SUFFIX='.lib'
27698                         ;;
27699                 (*)
27700                         DFT_LIB_SUFFIX='.a'
27701                         ;;
27702                 esac
27703                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27704                 ;;
27705         esac
27706         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27707         then
27708                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27709                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27710         fi
27711 echo "$as_me:27711: result: $DFT_DEP_SUFFIX" >&5
27712 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27713
27714 echo "$as_me:27714: checking default object directory" >&5
27715 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27716
27717         case $DFT_LWR_MODEL in
27718         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27719         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27720         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27721         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27722         (shared)
27723                 case "$cf_cv_system_name" in
27724                 (cygwin|msys)
27725                         DFT_OBJ_SUBDIR='objects' ;;
27726                 (*)
27727                         DFT_OBJ_SUBDIR='obj_s' ;;
27728                 esac
27729         esac
27730 echo "$as_me:27730: result: $DFT_OBJ_SUBDIR" >&5
27731 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27732
27733 if test "x$cf_with_cxx" = xyes ; then
27734 echo "$as_me:27734: checking c++ library-dependency suffix" >&5
27735 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27736 if test "$with_libtool" != "no"; then
27737         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27738         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27739 elif test "$with_shared_cxx" != "no"; then
27740         # also for g++ users...
27741         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27742 else
27743         # we normally make a static library because C/C++ library rules differ
27744
27745         case Xnormal in
27746         (Xlibtool)
27747                 CXX_LIB_SUFFIX='.la'
27748                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27749                 ;;
27750         (Xdebug)
27751                 case "$cf_cv_system_name" in
27752                 (*-msvc*)
27753                         CXX_LIB_SUFFIX='_g.lib'
27754                         ;;
27755                 (*)
27756                         CXX_LIB_SUFFIX='_g.a'
27757                         ;;
27758                 esac
27759                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27760                 ;;
27761         (Xprofile)
27762                 case "$cf_cv_system_name" in
27763                 (*-msvc*)
27764                         CXX_LIB_SUFFIX='_p.lib'
27765                         ;;
27766                 (*)
27767                         CXX_LIB_SUFFIX='_p.a'
27768                         ;;
27769                 esac
27770                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27771                 ;;
27772         (Xshared)
27773                 case "$cf_cv_system_name" in
27774                 (aix[5-7]*)
27775                         CXX_LIB_SUFFIX='.so'
27776                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27777                         ;;
27778                 (*-msvc*)
27779                         CXX_LIB_SUFFIX='.dll'
27780                         CXX_DEP_SUFFIX='.dll.lib'
27781                         ;;
27782                 (cygwin*|msys*|mingw*)
27783                         CXX_LIB_SUFFIX='.dll'
27784                         CXX_DEP_SUFFIX='.dll.a'
27785                         ;;
27786                 (darwin*)
27787                         CXX_LIB_SUFFIX='.dylib'
27788                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27789                         ;;
27790                 (hpux*)
27791                         case "$target" in
27792                         (ia64*)
27793                                 CXX_LIB_SUFFIX='.so'
27794                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27795                                 ;;
27796                         (*)
27797                                 CXX_LIB_SUFFIX='.sl'
27798                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27799                                 ;;
27800                         esac
27801                         ;;
27802                 (*)
27803                         CXX_LIB_SUFFIX='.so'
27804                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27805                         ;;
27806                 esac
27807                 ;;
27808         (*)
27809                 case "$target" in
27810                 (*-msvc*)
27811                         CXX_LIB_SUFFIX='.lib'
27812                         ;;
27813                 (*)
27814                         CXX_LIB_SUFFIX='.a'
27815                         ;;
27816                 esac
27817                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27818                 ;;
27819         esac
27820         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27821         then
27822                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27823                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27824         fi
27825
27826 fi
27827 echo "$as_me:27827: result: $CXX_LIB_SUFFIX" >&5
27828 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27829
27830 fi
27831
27832 # do not want -ldl in build except as needed for -lncurses dependency
27833 if test "x$with_dlsym" = xyes ; then
27834 if test "$DFT_LWR_MODEL" = shared || \
27835    test "$DFT_LWR_MODEL" = libtool ; then
27836
27837 # remove dl library from $LIBS
27838 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27839
27840 fi
27841 fi
27842 ### Set up low-level terminfo dependencies for makefiles.
27843
27844 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27845 # do not need libdl
27846 TICS_LIST=
27847 if test "x$with_dlsym" = xyes ; then
27848
27849 # remove dl library from $SHLIB_LIST
27850 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27851
27852 fi
27853
27854 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27855 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27856 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27857 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27858 then
27859         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27860 fi
27861
27862 if test "$with_ticlib" != no ; then
27863
27864         if test "x$with_ticlib" != xyes ; then
27865                 TICS_NAME=$with_ticlib
27866                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27867                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27868                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27869                 TICS_LIB_SUFFIX="${with_ticlib}"
27870         else
27871                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27872                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27873                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27874                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27875         fi
27876         TICS_LDFLAGS="-L${LIB_DIR}"
27877         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27878 else
27879         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27880         TICS_LDFLAGS="-L${LIB_DIR}"
27881         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27882 fi
27883
27884 if test "$with_termlib" != no ; then
27885
27886         if test "x$with_termlib" != xyes ; then
27887                 TINFO_NAME=$with_termlib
27888                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27889                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27890                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27891                 TINFO_LIB_SUFFIX="${with_termlib}"
27892         else
27893                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27894                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27895                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27896                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
27897         fi
27898
27899         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27900         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27901         if test "$DFT_LWR_MODEL" = "libtool"; then
27902                 TEST_ARGS="${TEST_DEPS}"
27903                 TEST_ARG2="${TEST_DEP2}"
27904                 TINFO_LDFLAGS="-L${LIB_DIR}"
27905                 TINFO_LIBS="$TEST_ARGS"
27906                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
27907                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
27908         else
27909                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
27910                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
27911                 if test "x$with_term_driver" != xno ; then
27912                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27913                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
27914                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27915                 else
27916                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27917                         TINFO_LIBS="$TEST_ARGS"
27918                 fi
27919                 TINFO_LDFLAGS="-L${LIB_DIR}"
27920                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27921         fi
27922 else
27923         # the next lines are needed for linking libtic over libncurses
27924         TINFO_NAME=${LIB_NAME}
27925         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27926         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
27927         if test "x$with_tic_depends" = xyes ; then
27928                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27929         else
27930                 TICS_LIST="$SHLIB_LIST"
27931         fi
27932
27933         TINFO_LDFLAGS="-L${LIB_DIR}"
27934         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27935 fi
27936
27937 if test "$DFT_LWR_MODEL" = shared ; then
27938         case "$cf_cv_system_name" in
27939         (cygwin*|msys*)
27940                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
27941                 TINFO_SUFFIX=.dll
27942                 ;;
27943         esac
27944 fi
27945
27946 if test "x$with_dlsym" = xyes ; then
27947
27948 # remove dl library from $TICS_LIST
27949 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
27950
27951 fi
27952
27953 if test "$DFT_LWR_MODEL" = "libtool"; then
27954         OBJEXT=lo
27955 fi
27956
27957 # needed for Ada95
27958 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
27959
27960 case "$DFT_LWR_MODEL" in
27961 (normal|debug|profile)
27962
27963 if test "$GCC" = yes ; then
27964         case "$cf_cv_system_name" in
27965         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
27966                 LDFLAGS_STATIC=
27967                 LDFLAGS_SHARED=
27968                 ;;
27969         (*)     # normally, except when broken
27970                 LDFLAGS_STATIC=-static
27971                 LDFLAGS_SHARED=-dynamic
27972                 ;;
27973         esac
27974 else
27975         case "$cf_cv_system_name" in
27976         (aix[4-7]*)     # from ld manpage
27977                 LDFLAGS_STATIC=-bstatic
27978                 LDFLAGS_SHARED=-bdynamic
27979                 ;;
27980         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
27981                 # We could also use just "archive" and "shared".
27982                 LDFLAGS_STATIC=-Wl,-a,archive_shared
27983                 LDFLAGS_SHARED=-Wl,-a,shared_archive
27984                 ;;
27985         (irix*)         # from ld manpage IRIX64
27986                 LDFLAGS_STATIC=-Bstatic
27987                 LDFLAGS_SHARED=-Bdynamic
27988                 ;;
27989         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
27990                 # alternative "-oldstyle_liblookup" (not in cc manpage)
27991                 LDFLAGS_STATIC=-noso
27992                 LDFLAGS_SHARED=-so_archive
27993                 ;;
27994         (solaris2*)
27995                 LDFLAGS_STATIC=-Bstatic
27996                 LDFLAGS_SHARED=-Bdynamic
27997                 ;;
27998         esac
27999 fi
28000
28001 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28002 then
28003         echo "$as_me:28003: checking if linker supports switching between static/dynamic" >&5
28004 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28005
28006         rm -f libconftest.a
28007         cat >conftest.$ac_ext <<EOF
28008 #line 28008 "configure"
28009 #include <stdio.h>
28010 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28011 EOF
28012         if { (eval echo "$as_me:28012: \"$ac_compile\"") >&5
28013   (eval $ac_compile) 2>&5
28014   ac_status=$?
28015   echo "$as_me:28015: \$? = $ac_status" >&5
28016   (exit "$ac_status"); } ; then
28017                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28018                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28019         fi
28020         rm -f conftest.*
28021
28022         cf_save_LIBS="$LIBS"
28023
28024         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28025         cat >"conftest.$ac_ext" <<_ACEOF
28026 #line 28026 "configure"
28027 #include "confdefs.h"
28028
28029 #line 28029 "configure"
28030 #include <stdio.h>
28031 int cf_ldflags_static(FILE *fp);
28032
28033 int
28034 main (void)
28035 {
28036
28037         return cf_ldflags_static(stdin);
28038
28039   ;
28040   return 0;
28041 }
28042 _ACEOF
28043 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28044 if { (eval echo "$as_me:28044: \"$ac_link\"") >&5
28045   (eval $ac_link) 2>&5
28046   ac_status=$?
28047   echo "$as_me:28047: \$? = $ac_status" >&5
28048   (exit "$ac_status"); } &&
28049          { ac_try='test -s "conftest$ac_exeext"'
28050   { (eval echo "$as_me:28050: \"$ac_try\"") >&5
28051   (eval $ac_try) 2>&5
28052   ac_status=$?
28053   echo "$as_me:28053: \$? = $ac_status" >&5
28054   (exit "$ac_status"); }; }; then
28055
28056         # some linkers simply ignore the -dynamic
28057         case x`file "conftest$ac_exeext" 2>/dev/null` in
28058         (*static*)
28059                 cf_ldflags_static=no
28060                 ;;
28061         (*)
28062                 cf_ldflags_static=yes
28063                 ;;
28064         esac
28065
28066 else
28067   echo "$as_me: failed program was:" >&5
28068 cat "conftest.$ac_ext" >&5
28069 cf_ldflags_static=no
28070 fi
28071 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28072
28073         rm -f libconftest.*
28074         LIBS="$cf_save_LIBS"
28075
28076         echo "$as_me:28076: result: $cf_ldflags_static" >&5
28077 echo "${ECHO_T}$cf_ldflags_static" >&6
28078
28079         if test "$cf_ldflags_static" != yes
28080         then
28081                 LDFLAGS_STATIC=
28082                 LDFLAGS_SHARED=
28083         fi
28084 else
28085         LDFLAGS_STATIC=
28086         LDFLAGS_SHARED=
28087 fi
28088
28089         ;;
28090 esac
28091
28092 echo "$as_me:28092: checking where we will install curses.h" >&5
28093 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28094
28095 includesubdir=
28096 if test "$with_overwrite" = no && \
28097  { test "x$includedir" = 'x${prefix}/include' || \
28098    test "x$includedir" = "x${prefix}/include"; }
28099 then
28100         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28101 fi
28102 echo "$as_me:28102: result: ${includedir}${includesubdir}" >&5
28103 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28104
28105 ### Resolve a conflict between normal and wide-curses by forcing applications
28106 ### that will need libutf8 to add it to their configure script.
28107 if test "$with_overwrite" != no ; then
28108 if test "$NCURSES_LIBUTF8" = 1 ; then
28109         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28110         { echo "$as_me:28110: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28111 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28112 fi
28113 fi
28114 WITH_OVERWRITE=$with_overwrite
28115
28116 ### At least on MinGW a shared library build without libtool
28117 ### requires adding the additional libs to the link list.
28118 case "$cf_cv_system_name" in
28119 (*mingw32*|*mingw64*)
28120         if test "$DFT_LWR_MODEL" != "libtool"; then
28121            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28122         fi
28123         ;;
28124 *)      ;;
28125 esac
28126
28127 # used to separate tack out of the tree
28128 NCURSES_TREE=
28129
28130 ### predefined stuff for the test programs
28131
28132 cat >>confdefs.h <<\EOF
28133 #define HAVE_SLK_COLOR 1
28134 EOF
28135
28136 # pkgsrc uses these
28137
28138 echo "$as_me:28138: checking for desired basename for form library" >&5
28139 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28140
28141 # Check whether --with-form-libname or --without-form-libname was given.
28142 if test "${with_form_libname+set}" = set; then
28143   withval="$with_form_libname"
28144   with_lib_basename=$withval
28145 else
28146   with_lib_basename=form
28147 fi;
28148 FORM_NAME="$with_lib_basename"
28149
28150 case "x$FORM_NAME" in
28151 (x|xno|xnone|xyes)
28152         FORM_NAME=form
28153         ;;
28154 (*)
28155         ;;
28156 esac
28157
28158 echo "$as_me:28158: result: $FORM_NAME" >&5
28159 echo "${ECHO_T}$FORM_NAME" >&6
28160
28161 echo "$as_me:28161: checking for desired basename for menu library" >&5
28162 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28163
28164 # Check whether --with-menu-libname or --without-menu-libname was given.
28165 if test "${with_menu_libname+set}" = set; then
28166   withval="$with_menu_libname"
28167   with_lib_basename=$withval
28168 else
28169   with_lib_basename=menu
28170 fi;
28171 MENU_NAME="$with_lib_basename"
28172
28173 case "x$MENU_NAME" in
28174 (x|xno|xnone|xyes)
28175         MENU_NAME=menu
28176         ;;
28177 (*)
28178         ;;
28179 esac
28180
28181 echo "$as_me:28181: result: $MENU_NAME" >&5
28182 echo "${ECHO_T}$MENU_NAME" >&6
28183
28184 echo "$as_me:28184: checking for desired basename for panel library" >&5
28185 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28186
28187 # Check whether --with-panel-libname or --without-panel-libname was given.
28188 if test "${with_panel_libname+set}" = set; then
28189   withval="$with_panel_libname"
28190   with_lib_basename=$withval
28191 else
28192   with_lib_basename=panel
28193 fi;
28194 PANEL_NAME="$with_lib_basename"
28195
28196 case "x$PANEL_NAME" in
28197 (x|xno|xnone|xyes)
28198         PANEL_NAME=panel
28199         ;;
28200 (*)
28201         ;;
28202 esac
28203
28204 echo "$as_me:28204: result: $PANEL_NAME" >&5
28205 echo "${ECHO_T}$PANEL_NAME" >&6
28206
28207 echo "$as_me:28207: checking for desired basename for cxx library" >&5
28208 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28209
28210 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28211 if test "${with_cxx_libname+set}" = set; then
28212   withval="$with_cxx_libname"
28213   with_lib_basename=$withval
28214 else
28215   with_lib_basename=ncurses++
28216 fi;
28217 CXX_NAME="$with_lib_basename"
28218
28219 case "x$CXX_NAME" in
28220 (x|xno|xnone|xyes)
28221         CXX_NAME=ncurses++
28222         ;;
28223 (*)
28224         ;;
28225 esac
28226
28227 echo "$as_me:28227: result: $CXX_NAME" >&5
28228 echo "${ECHO_T}$CXX_NAME" >&6
28229
28230 ### Construct the list of subdirectories for which we'll customize makefiles
28231 ### with the appropriate compile-rules.
28232
28233 echo "$as_me:28233: checking for src modules" >&5
28234 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28235
28236 # dependencies and linker-arguments for test-programs
28237 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28238 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28239 if test "$DFT_LWR_MODEL" = "libtool"; then
28240         TEST_ARGS="${TEST_DEPS}"
28241         TEST_ARG2="${TEST_DEP2}"
28242 else
28243         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28244         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28245 fi
28246
28247 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28248 cf_cv_src_modules=
28249 for cf_dir in $modules_to_build
28250 do
28251         if test -f "$srcdir/$cf_dir/modules" ; then
28252
28253                 # We may/may not have tack in the distribution, though the
28254                 # makefile is.
28255                 if test "$cf_dir" = tack ; then
28256                         if test "x$cf_with_tack" != "xyes"; then
28257                                 continue
28258                         fi
28259                 fi
28260
28261                 if test -z "$cf_cv_src_modules"; then
28262                         cf_cv_src_modules=$cf_dir
28263                 else
28264                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28265                 fi
28266
28267                 # Make the ncurses_cfg.h file record the library interface files as
28268                 # well.  These are header files that are the same name as their
28269                 # directory.  Ncurses is the only library that does not follow
28270                 # that pattern.
28271                 if test "$cf_dir" = tack ; then
28272                         continue
28273                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28274
28275 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28276
28277                         cat >>confdefs.h <<EOF
28278 #define HAVE_${cf_have_include}_H 1
28279 EOF
28280
28281                         cat >>confdefs.h <<EOF
28282 #define HAVE_LIB${cf_have_include} 1
28283 EOF
28284
28285 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28286
28287 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28288
28289                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28290                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28291                         if test "$DFT_LWR_MODEL" = "libtool"; then
28292                                 TEST_ARGS="${TEST_DEPS}"
28293                                 TEST_ARG2="${TEST_DEP2}"
28294                         else
28295                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28296                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28297                         fi
28298                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28299                 fi
28300         fi
28301 done
28302 echo "$as_me:28302: result: $cf_cv_src_modules" >&5
28303 echo "${ECHO_T}$cf_cv_src_modules" >&6
28304
28305 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28306 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28307
28308 SRC_SUBDIRS=
28309 if test "x$cf_with_manpages" != xno ; then
28310         SRC_SUBDIRS="$SRC_SUBDIRS man"
28311 fi
28312 SRC_SUBDIRS="$SRC_SUBDIRS include"
28313 for cf_dir in $cf_cv_src_modules
28314 do
28315         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28316 done
28317 if test "x$cf_with_tests" != "xno" ; then
28318         SRC_SUBDIRS="$SRC_SUBDIRS test"
28319 fi
28320 # always make this, to install the ncurses-config script
28321 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28322 if test "$cf_with_cxx_binding" != no; then
28323         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28324         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28325 fi
28326
28327 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28328 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28329
28330 ADA_SUBDIRS=
28331 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28332         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28333         ADA_SUBDIRS="gen src"
28334         if test "x$cf_with_tests" != "xno" ; then
28335                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28336         fi
28337 fi
28338
28339 SUB_MAKEFILES=
28340 for cf_dir in $SRC_SUBDIRS
28341 do
28342         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28343 done
28344
28345 if test -n "$ADA_SUBDIRS"; then
28346         for cf_dir in $ADA_SUBDIRS
28347         do
28348                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28349         done
28350
28351 fi
28352
28353 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28354    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28355    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28356    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28357 fi
28358
28359 DIRS_TO_MAKE="lib"
28360 for cf_item in $cf_list_models
28361 do
28362
28363         case $cf_item in
28364         (libtool) cf_subdir='obj_lo'  ;;
28365         (normal)  cf_subdir='objects' ;;
28366         (debug)   cf_subdir='obj_g' ;;
28367         (profile) cf_subdir='obj_p' ;;
28368         (shared)
28369                 case "$cf_cv_system_name" in
28370                 (cygwin|msys)
28371                         cf_subdir='objects' ;;
28372                 (*)
28373                         cf_subdir='obj_s' ;;
28374                 esac
28375         esac
28376
28377         for cf_item2 in $DIRS_TO_MAKE
28378         do
28379                 test "$cf_item2" = "$cf_subdir" && break
28380         done
28381         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28382 done
28383 for cf_dir in $DIRS_TO_MAKE
28384 do
28385         test ! -d "$cf_dir" && mkdir "$cf_dir"
28386 done
28387
28388 # symbols that differ when compiling Ada95 by itself.
28389 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28390
28391 # values to use as strings
28392
28393 cat >>confdefs.h <<EOF
28394 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28395 EOF
28396
28397 cat >>confdefs.h <<EOF
28398 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28399 EOF
28400
28401 ### Define substitutions for header files to avoid name-pollution
28402
28403 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28404         HAVE_TCGETATTR=1
28405 else
28406         HAVE_TCGETATTR=0
28407 fi
28408
28409 if test "x$ac_cv_header_stdint_h" = xyes ; then
28410         HAVE_STDINT_H=1
28411 else
28412         HAVE_STDINT_H=0
28413 fi
28414
28415 if test "x$ac_cv_header_termio_h" = xyes ; then
28416         HAVE_TERMIO_H=1
28417 else
28418         HAVE_TERMIO_H=0
28419 fi
28420
28421 if test "x$ac_cv_header_termios_h" = xyes ; then
28422         HAVE_TERMIOS_H=1
28423 else
28424         HAVE_TERMIOS_H=0
28425 fi
28426
28427 ################################################################################
28428 test "x$use_database" = xyes && \
28429 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28430
28431 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28432 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28433
28434 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28435 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28436 fi
28437
28438 if test "x$cf_with_tests" != xno ; then
28439         MAKE_TESTS=
28440 else
28441         MAKE_TESTS="#"
28442 fi
28443
28444 ADAHTML_DIR=../../doc/html/ada
28445
28446 # workaround for OS/2 (20151017)
28447 case "$cf_cv_system_name" in
28448 (os2*)
28449         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28450         ;;
28451 (*)
28452         LIBTOOL_OPTS_CXX=
28453         ;;
28454 esac
28455
28456 # workaround for g++ versus Solaris (20131116)
28457 case "$cf_cv_system_name" in
28458 (solaris2*)
28459         case "x$CPPFLAGS" in
28460         (*-D_XOPEN_SOURCE_EXTENDED*)
28461                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28462
28463 echo "${as_me:-configure}:28463: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28464
28465                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28466                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28467                 ;;
28468         esac
28469         ;;
28470 esac
28471
28472 # Help to automatically enable the extended curses features when using either
28473 # the *-config or the ".pc" files by adding defines.
28474 echo "$as_me:28474: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28475 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28476 PKG_CFLAGS=
28477 for cf_loop1 in $CPPFLAGS_after_XOPEN
28478 do
28479         cf_found=no
28480         for cf_loop2 in $CPPFLAGS_before_XOPEN
28481         do
28482                 if test "x$cf_loop1" = "x$cf_loop2"
28483                 then
28484                         cf_found=yes
28485                         break
28486                 fi
28487         done
28488         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28489 done
28490 echo "$as_me:28490: result: $PKG_CFLAGS" >&5
28491 echo "${ECHO_T}$PKG_CFLAGS" >&6
28492
28493 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28494 case "x$NCURSES_OSPEED" in
28495 (*short*)
28496         cf_compatible=1
28497         ;;
28498 (*)
28499         cf_compatible=0
28500         ;;
28501 esac
28502
28503 cat >>confdefs.h <<EOF
28504 #define NCURSES_OSPEED_COMPAT $cf_compatible
28505 EOF
28506
28507 case "x$cf_cv_typeof_chtype" in
28508 (xshort|xint|xlong)
28509         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28510         ;;
28511 esac
28512
28513 case "x$cf_cv_typeof_mmask_t" in
28514 (xshort|xint|xlong)
28515         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28516         ;;
28517 esac
28518
28519 # substitute into misc/Makefile to suppress
28520 # (un)install.data from the
28521 # (un)install rules.
28522 if test "x$cf_with_db_install" = "xno"; then
28523         MISC_INSTALL_DATA=
28524         MISC_UNINSTALL_DATA=
28525 else
28526         MISC_INSTALL_DATA=install.data
28527         MISC_UNINSTALL_DATA=uninstall.data
28528 fi
28529
28530 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28531         MAKE_DATABASE="#"
28532 else
28533         MAKE_DATABASE="$MAKE_TERMINFO"
28534 fi
28535
28536 if test -n "$PACKAGE"
28537 then
28538         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28539         export PACKAGE
28540         echo "package: $PACKAGE"
28541 fi
28542
28543 UNALTERED_SYMS=
28544 cf_filter_syms=no
28545
28546 if test -n "$RESULTING_SYMS"
28547 then
28548         cf_filter_syms=$cf_dft_filter_syms
28549         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28550
28551 echo "${as_me:-configure}:28551: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28552
28553 fi
28554
28555 if test "x$WILDCARD_SYMS" = xno
28556 then
28557         cf_filter_syms=yes
28558 fi
28559
28560 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28561
28562 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28563 if test "$cf_filter_syms" = yes
28564 then
28565         RESULTING_SYMS=resulting.map
28566 fi
28567
28568 if test "x$cross_compiling" = xyes ; then
28569         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28570         CHECK_BUILD="#"
28571 else
28572         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28573         CHECK_BUILD=
28574 fi
28575
28576 # This is used for the *-config script and *.pc data files.
28577
28578 echo "$as_me:28578: checking for linker search path" >&5
28579 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28580 if test "${cf_cv_ld_searchpath+set}" = set; then
28581   echo $ECHO_N "(cached) $ECHO_C" >&6
28582 else
28583
28584 if test "$cross_compiling" != yes ; then
28585
28586 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28587 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28588
28589 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28590 # update the cache, which makes it run faster.
28591 test -z "$cf_pathlist" && \
28592         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28593
28594 test -z "$cf_pathlist" &&
28595         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28596
28597 # This works with OpenBSD 6.5, which lists only filenames
28598 test -z "$cf_pathlist" &&
28599         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28600
28601 if test -z "$cf_pathlist"
28602 then
28603         # dyld default path with MacOS
28604         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28605         then
28606                 # do this to bypass check
28607                 cf_cv_ld_searchpath='$HOME/lib'
28608                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28609         fi
28610 fi
28611
28612 if test -z "$cf_pathlist"
28613 then
28614         # Solaris is "SunOS"
28615         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28616         then
28617                 case x`(isainfo -b)` in
28618                 (x64)
28619                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28620                         ;;
28621                 (x32)
28622                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28623                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28624                         ;;
28625                 (*)
28626                         { echo "$as_me:28626: WARNING: problem with Solaris architecture" >&5
28627 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28628                         ;;
28629                 esac
28630         fi
28631 fi
28632
28633 if test -z "$cf_pathlist"
28634 then
28635         # HP-UX
28636         if test x"`uname -s`" = xHP-UX
28637         then
28638                 case x`getconf LONG_BIT` in
28639                 (x64)
28640                         cf_pathlist="/usr/lib/hpux64"
28641                         ;;
28642                 (x*)
28643                         cf_pathlist="/usr/lib/hpux32"
28644                         ;;
28645                 esac
28646         fi
28647 fi
28648
28649 fi
28650
28651 # If nothing else, assume it is conventional
28652 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28653
28654 # Finally, check that this is only directories
28655 for cf_path in $0 $cf_pathlist
28656 do
28657         if test -d "$cf_path"; then
28658                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28659                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28660         fi
28661 done
28662
28663 # Ensure that it is nonempty
28664 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28665
28666 fi
28667 echo "$as_me:28667: result: $cf_cv_ld_searchpath" >&5
28668 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28669
28670 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28671
28672 cat >>confdefs.h <<\EOF
28673 #define HAVE_CURSES_DATA_BOOLNAMES 1
28674 EOF
28675
28676 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"
28677 ac_config_commands="$ac_config_commands default"
28678 cat >confcache <<\_ACEOF
28679 # This file is a shell script that caches the results of configure
28680 # tests run on this system so they can be shared between configure
28681 # scripts and configure runs, see configure's option --config-cache.
28682 # It is not useful on other systems.  If it contains results you don't
28683 # want to keep, you may remove or edit it.
28684 #
28685 # config.status only pays attention to the cache file if you give it
28686 # the --recheck option to rerun configure.
28687 #
28688 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28689 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28690 # following values.
28691
28692 _ACEOF
28693
28694 # The following way of writing the cache mishandles newlines in values,
28695 # but we know of no workaround that is simple, portable, and efficient.
28696 # So, don't put newlines in cache variables' values.
28697 # Ultrix sh set writes to stderr and can't be redirected directly,
28698 # and sets the high bit in the cache file unless we assign to the vars.
28699 {
28700   (set) 2>&1 |
28701     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28702     *ac_space=\ *)
28703       # `set' does not quote correctly, so add quotes (double-quote
28704       # substitution turns \\\\ into \\, and sed turns \\ into \).
28705       sed -n \
28706         "s/'/'\\\\''/g;
28707           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28708       ;;
28709     *)
28710       # `set' quotes correctly as required by POSIX, so do not add quotes.
28711       sed -n \
28712         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28713       ;;
28714     esac;
28715 } |
28716   sed '
28717      t clear
28718      : clear
28719      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28720      t end
28721      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28722      : end' >>confcache
28723 if cmp -s $cache_file confcache; then :; else
28724   if test -w $cache_file; then
28725     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28726     cat confcache >$cache_file
28727   else
28728     echo "not updating unwritable cache $cache_file"
28729   fi
28730 fi
28731 rm -f confcache
28732
28733 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28734 # Let make expand exec_prefix.
28735 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28736
28737 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28738 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28739 # trailing colons and then remove the whole line if VPATH becomes empty
28740 # (actually we leave an empty line to preserve line numbers).
28741 if test "x$srcdir" = x.; then
28742   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28743 s/:*\$(srcdir):*/:/;
28744 s/:*\${srcdir}:*/:/;
28745 s/:*@srcdir@:*/:/;
28746 s/^\([^=]*=[    ]*\):*/\1/;
28747 s/:*$//;
28748 s/^[^=]*=[      ]*$//;
28749 }'
28750 fi
28751
28752 DEFS=-DHAVE_CONFIG_H
28753
28754 : "${CONFIG_STATUS=./config.status}"
28755 ac_clean_files_save=$ac_clean_files
28756 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28757 { echo "$as_me:28757: creating $CONFIG_STATUS" >&5
28758 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28759 cat >"$CONFIG_STATUS" <<_ACEOF
28760 #! $SHELL
28761 # Generated automatically by configure.
28762 # Run this file to recreate the current configuration.
28763 # Compiler output produced by configure, useful for debugging
28764 # configure, is in config.log if it exists.
28765
28766 debug=false
28767 SHELL=\${CONFIG_SHELL-$SHELL}
28768 ac_cs_invocation="\$0 \$@"
28769
28770 CLICOLOR_FORCE= GREP_OPTIONS=
28771 unset CLICOLOR_FORCE GREP_OPTIONS
28772 _ACEOF
28773
28774 cat >>"$CONFIG_STATUS" <<\_ACEOF
28775 # Be Bourne compatible
28776 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28777   emulate sh
28778   NULLCMD=:
28779 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28780   set -o posix
28781 fi
28782
28783 # Name of the executable.
28784 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28785
28786 if expr a : '\(a\)' >/dev/null 2>&1; then
28787   as_expr=expr
28788 else
28789   as_expr=false
28790 fi
28791
28792 rm -f conf$$ conf$$.exe conf$$.file
28793 echo >conf$$.file
28794 if ln -s conf$$.file conf$$ 2>/dev/null; then
28795   # We could just check for DJGPP; but this test a) works b) is more generic
28796   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28797   if test -f conf$$.exe; then
28798     # Don't use ln at all; we don't have any links
28799     as_ln_s='cp -p'
28800   else
28801     as_ln_s='ln -s'
28802   fi
28803 elif ln conf$$.file conf$$ 2>/dev/null; then
28804   as_ln_s=ln
28805 else
28806   as_ln_s='cp -p'
28807 fi
28808 rm -f conf$$ conf$$.exe conf$$.file
28809
28810 as_executable_p="test -f"
28811
28812 # Support unset when possible.
28813 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28814   as_unset="unset"
28815 else
28816   as_unset="false"
28817 fi
28818
28819 # NLS nuisances.
28820 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28821 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28822 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28823 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28824 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28825 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28826 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28827 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28828
28829 # IFS
28830 # We need space, tab and new line, in precisely that order.
28831 as_nl='
28832 '
28833 IFS="   $as_nl"
28834
28835 # CDPATH.
28836 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28837
28838 exec 6>&1
28839
28840 _ACEOF
28841
28842 # Files that config.status was made for.
28843 if test -n "$ac_config_files"; then
28844   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
28845 fi
28846
28847 if test -n "$ac_config_headers"; then
28848   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
28849 fi
28850
28851 if test -n "$ac_config_links"; then
28852   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
28853 fi
28854
28855 if test -n "$ac_config_commands"; then
28856   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
28857 fi
28858
28859 cat >>"$CONFIG_STATUS" <<\EOF
28860
28861 ac_cs_usage="\
28862 \`$as_me' instantiates files from templates according to the
28863 current configuration.
28864
28865 Usage: $0 [OPTIONS] [FILE]...
28866
28867   -h, --help       print this help, then exit
28868   -V, --version    print version number, then exit
28869   -d, --debug      don't remove temporary files
28870       --recheck    update $as_me by reconfiguring in the same conditions
28871   --file=FILE[:TEMPLATE]
28872                    instantiate the configuration file FILE
28873   --header=FILE[:TEMPLATE]
28874                    instantiate the configuration header FILE
28875
28876 Configuration files:
28877 $config_files
28878
28879 Configuration headers:
28880 $config_headers
28881
28882 Configuration commands:
28883 $config_commands
28884
28885 Report bugs to <dickey@invisible-island.net>."
28886 EOF
28887
28888 cat >>"$CONFIG_STATUS" <<EOF
28889 ac_cs_version="\\
28890 config.status
28891 configured by $0, generated by GNU Autoconf 2.52.20210509,
28892   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28893
28894 Copyright 2003-2020,2021        Thomas E. Dickey
28895 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28896 Free Software Foundation, Inc.
28897 This config.status script is free software; the Free Software Foundation
28898 gives unlimited permission to copy, distribute and modify it."
28899 srcdir="$srcdir"
28900 INSTALL="$INSTALL"
28901 EOF
28902
28903 cat >>"$CONFIG_STATUS" <<\EOF
28904 # If no file are specified by the user, then we need to provide default
28905 # value.  By we need to know if files were specified by the user.
28906 ac_need_defaults=:
28907 while test $# != 0
28908 do
28909   case $1 in
28910   --*=*)
28911     ac_option=`expr "x$1" : 'x\([^=]*\)='`
28912     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
28913     shift
28914     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
28915     shift
28916     ;;
28917   -*);;
28918   *) # This is not an option, so the user has probably given explicit
28919      # arguments.
28920      ac_need_defaults=false;;
28921   esac
28922
28923   case $1 in
28924   # Handling of the options.
28925 EOF
28926 cat >>"$CONFIG_STATUS" <<EOF
28927   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28928     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
28929     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
28930 EOF
28931 cat >>"$CONFIG_STATUS" <<\EOF
28932   --version | --vers* | -V )
28933     echo "$ac_cs_version"; exit 0 ;;
28934   --he | --h)
28935     # Conflict between --help and --header
28936     { { echo "$as_me:28936: error: ambiguous option: $1
28937 Try \`$0 --help' for more information." >&5
28938 echo "$as_me: error: ambiguous option: $1
28939 Try \`$0 --help' for more information." >&2;}
28940    { (exit 1); exit 1; }; };;
28941   --help | --hel | -h )
28942     echo "$ac_cs_usage"; exit 0 ;;
28943   --debug | --d* | -d )
28944     debug=: ;;
28945   --file | --fil | --fi | --f )
28946     shift
28947     CONFIG_FILES="$CONFIG_FILES $1"
28948     ac_need_defaults=false;;
28949   --header | --heade | --head | --hea )
28950     shift
28951     CONFIG_HEADERS="$CONFIG_HEADERS $1"
28952     ac_need_defaults=false;;
28953
28954   # This is an error.
28955   -*) { { echo "$as_me:28955: error: unrecognized option: $1
28956 Try \`$0 --help' for more information." >&5
28957 echo "$as_me: error: unrecognized option: $1
28958 Try \`$0 --help' for more information." >&2;}
28959    { (exit 1); exit 1; }; } ;;
28960
28961   *) ac_config_targets="$ac_config_targets $1" ;;
28962
28963   esac
28964   shift
28965 done
28966
28967 exec 5>>config.log
28968 cat >&5 << _ACEOF
28969
28970 ## ----------------------- ##
28971 ## Running config.status.  ##
28972 ## ----------------------- ##
28973
28974 This file was extended by $as_me 2.52.20210509, executed with
28975   CONFIG_FILES    = $CONFIG_FILES
28976   CONFIG_HEADERS  = $CONFIG_HEADERS
28977   CONFIG_LINKS    = $CONFIG_LINKS
28978   CONFIG_COMMANDS = $CONFIG_COMMANDS
28979   > "$ac_cs_invocation"
28980 on `(hostname || uname -n) 2>/dev/null | sed 1q`
28981
28982 _ACEOF
28983 EOF
28984
28985 cat >>"$CONFIG_STATUS" <<EOF
28986 #
28987 # INIT-COMMANDS section.
28988 #
28989
28990 ### Special initialization commands, used to pass information from the
28991 ### configuration-run into config.status
28992
28993 ALTERNATE_SYMS="$ALTERNATE_SYMS"
28994 AWK="$AWK"
28995 CXX_NAME="$CXX_NAME"
28996 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
28997 DFT_LWR_MODEL="$DFT_LWR_MODEL"
28998 ECHO_LD="$ECHO_LD"
28999 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29000 FORM_NAME="$FORM_NAME"
29001 LDCONFIG="$LDCONFIG"
29002 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29003 LIB_NAME="$LIB_NAME"
29004 LIB_PREFIX="$LIB_PREFIX"
29005 LIB_SUBSETS="$LIB_SUBSETS"
29006 LIB_SUFFIX="$LIB_SUFFIX"
29007 LIB_TRACING="$LIB_TRACING"
29008 LN_S="$LN_S"
29009 MAKE_TERMINFO="$MAKE_TERMINFO"
29010 MENU_NAME="$MENU_NAME"
29011 NCURSES_MAJOR="$NCURSES_MAJOR"
29012 NCURSES_MINOR="$NCURSES_MINOR"
29013 NCURSES_OSPEED="$NCURSES_OSPEED"
29014 NCURSES_PATCH="$NCURSES_PATCH"
29015 PANEL_NAME="$PANEL_NAME"
29016 SRC_SUBDIRS="$SRC_SUBDIRS"
29017 TERMINFO="$TERMINFO"
29018 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29019 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29020 TICS_NAME="$TICS_NAME"
29021 TICS_SUFFIX="$TICS_SUFFIX"
29022 TIC_PATH="$TIC_PATH"
29023 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29024 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29025 TINFO_NAME="$TINFO_NAME"
29026 TINFO_SUFFIX="$TINFO_SUFFIX"
29027 UNALTERED_SYMS="$UNALTERED_SYMS"
29028 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29029 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29030 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29031 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29032 WILDCARD_SYMS="$WILDCARD_SYMS"
29033 WITH_CURSES_H="$with_curses_h"
29034 WITH_ECHO="${enable_echo:=yes}"
29035 WITH_OVERWRITE="$with_overwrite"
29036 cf_LIST_MODELS="$cf_list_models"
29037 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29038 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29039 cf_cv_abi_version="$cf_cv_abi_version"
29040 cf_cv_do_relink="$cf_cv_do_relink"
29041 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29042 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29043 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29044 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29045 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29046 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29047 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29048 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29049 cf_cv_rel_version="$cf_cv_rel_version"
29050 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29051 cf_cv_shared_soname='$cf_cv_shared_soname'
29052 cf_cv_shlib_version="$cf_cv_shlib_version"
29053 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29054 cf_cv_system_name="$cf_cv_system_name"
29055 cf_cv_term_driver="$with_term_driver"
29056 cf_with_ada="$cf_with_ada"
29057 cf_with_cxx_binding="$cf_with_cxx_binding"
29058 cf_with_db_install="$cf_with_db_install"
29059 cf_with_manpages="$cf_with_manpages"
29060 cf_with_tests="$cf_with_tests"
29061 host="$host"
29062 target="$target"
29063 with_shared_cxx="$with_shared_cxx"
29064
29065 EOF
29066
29067 cat >>"$CONFIG_STATUS" <<\EOF
29068 for ac_config_target in $ac_config_targets
29069 do
29070   case "$ac_config_target" in
29071   # Handling of arguments.
29072   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29073   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29074   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29075   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29076   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29077   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29078   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29079   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29080   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29081   *) { { echo "$as_me:29081: error: invalid argument: $ac_config_target" >&5
29082 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29083    { (exit 1); exit 1; }; };;
29084   esac
29085 done
29086
29087 # If the user did not use the arguments to specify the items to instantiate,
29088 # then the envvar interface is used.  Set only those that are not.
29089 # We use the long form for the default assignment because of an extremely
29090 # bizarre bug on SunOS 4.1.3.
29091 if "$ac_need_defaults"; then
29092   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29093   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29094   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29095 fi
29096
29097 # Create a temporary directory, and hook for its removal unless debugging.
29098 $debug ||
29099 {
29100   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29101   trap '{ (exit 1); exit 1; }' 1 2 13 15
29102 }
29103
29104 # Create a (secure) tmp directory for tmp files.
29105 : ${TMPDIR=/tmp}
29106 {
29107   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29108   test -n "$tmp" && test -d "$tmp"
29109 }  ||
29110 {
29111   tmp=$TMPDIR/cs$$-$RANDOM
29112   (umask 077 && mkdir $tmp)
29113 } ||
29114 {
29115    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29116    { (exit 1); exit 1; }
29117 }
29118
29119 EOF
29120
29121 cat >>"$CONFIG_STATUS" <<EOF
29122
29123 #
29124 # CONFIG_FILES section.
29125 #
29126
29127 # No need to generate the scripts if there are no CONFIG_FILES.
29128 # This happens for instance when ./config.status config.h
29129 if test -n "\$CONFIG_FILES"; then
29130   # Protect against being on the right side of a sed subst in config.status.
29131   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29132    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
29133 s,@SHELL@,$SHELL,;t t
29134 s,@exec_prefix@,$exec_prefix,;t t
29135 s,@prefix@,$prefix,;t t
29136 s,@program_transform_name@,$program_transform_name,;t t
29137 s,@bindir@,$bindir,;t t
29138 s,@sbindir@,$sbindir,;t t
29139 s,@libexecdir@,$libexecdir,;t t
29140 s,@datarootdir@,$datarootdir,;t t
29141 s,@datadir@,$datadir,;t t
29142 s,@sysconfdir@,$sysconfdir,;t t
29143 s,@sharedstatedir@,$sharedstatedir,;t t
29144 s,@localstatedir@,$localstatedir,;t t
29145 s,@runstatedir@,$runstatedir,;t t
29146 s,@libdir@,$libdir,;t t
29147 s,@includedir@,$includedir,;t t
29148 s,@oldincludedir@,$oldincludedir,;t t
29149 s,@infodir@,$infodir,;t t
29150 s,@mandir@,$mandir,;t t
29151 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29152 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29153 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29154 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29155 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29156 s,@build_alias@,$build_alias,;t t
29157 s,@host_alias@,$host_alias,;t t
29158 s,@target_alias@,$target_alias,;t t
29159 s,@ECHO_C@,$ECHO_C,;t t
29160 s,@ECHO_N@,$ECHO_N,;t t
29161 s,@ECHO_T@,$ECHO_T,;t t
29162 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29163 s,@DEFS@,$DEFS,;t t
29164 s,@LIBS@,$LIBS,;t t
29165 s,@top_builddir@,$top_builddir,;t t
29166 s,@GREP@,$GREP,;t t
29167 s,@EGREP@,$EGREP,;t t
29168 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29169 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29170 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29171 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29172 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29173 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29174 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29175 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29176 s,@VERSION@,$VERSION,;t t
29177 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29178 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29179 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29180 s,@PACKAGE@,$PACKAGE,;t t
29181 s,@build@,$build,;t t
29182 s,@build_cpu@,$build_cpu,;t t
29183 s,@build_vendor@,$build_vendor,;t t
29184 s,@build_os@,$build_os,;t t
29185 s,@host@,$host,;t t
29186 s,@host_cpu@,$host_cpu,;t t
29187 s,@host_vendor@,$host_vendor,;t t
29188 s,@host_os@,$host_os,;t t
29189 s,@target@,$target,;t t
29190 s,@target_cpu@,$target_cpu,;t t
29191 s,@target_vendor@,$target_vendor,;t t
29192 s,@target_os@,$target_os,;t t
29193 s,@FGREP@,$FGREP,;t t
29194 s,@CC@,$CC,;t t
29195 s,@CFLAGS@,$CFLAGS,;t t
29196 s,@LDFLAGS@,$LDFLAGS,;t t
29197 s,@CPPFLAGS@,$CPPFLAGS,;t t
29198 s,@ac_ct_CC@,$ac_ct_CC,;t t
29199 s,@EXEEXT@,$EXEEXT,;t t
29200 s,@OBJEXT@,$OBJEXT,;t t
29201 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29202 s,@CPP@,$CPP,;t t
29203 s,@LDCONFIG@,$LDCONFIG,;t t
29204 s,@CXX@,$CXX,;t t
29205 s,@CXXFLAGS@,$CXXFLAGS,;t t
29206 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29207 s,@AWK@,$AWK,;t t
29208 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29209 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29210 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29211 s,@LINT@,$LINT,;t t
29212 s,@LINT_OPTS@,$LINT_OPTS,;t t
29213 s,@LN_S@,$LN_S,;t t
29214 s,@cf_config_suffix@,$cf_config_suffix,;t t
29215 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29216 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29217 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29218 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29219 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29220 s,@SET_MAKE@,$SET_MAKE,;t t
29221 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29222 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29223 s,@CTAGS@,$CTAGS,;t t
29224 s,@ETAGS@,$ETAGS,;t t
29225 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29226 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29227 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29228 s,@RANLIB@,$RANLIB,;t t
29229 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29230 s,@LD@,$LD,;t t
29231 s,@ac_ct_LD@,$ac_ct_LD,;t t
29232 s,@AR@,$AR,;t t
29233 s,@ac_ct_AR@,$ac_ct_AR,;t t
29234 s,@NM@,$NM,;t t
29235 s,@ac_ct_NM@,$ac_ct_NM,;t t
29236 s,@ARFLAGS@,$ARFLAGS,;t t
29237 s,@DESTDIR@,$DESTDIR,;t t
29238 s,@BUILD_CC@,$BUILD_CC,;t t
29239 s,@BUILD_CPP@,$BUILD_CPP,;t t
29240 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29241 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29242 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29243 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29244 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29245 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29246 s,@cf_list_models@,$cf_list_models,;t t
29247 s,@ABI_VERSION@,$ABI_VERSION,;t t
29248 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29249 s,@LIBTOOL@,$LIBTOOL,;t t
29250 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29251 s,@LT_UNDEF@,$LT_UNDEF,;t t
29252 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29253 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29254 s,@LIB_CREATE@,$LIB_CREATE,;t t
29255 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29256 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29257 s,@LIB_PREP@,$LIB_PREP,;t t
29258 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29259 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29260 s,@LIB_LINK@,$LIB_LINK,;t t
29261 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29262 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29263 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29264 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29265 s,@TICS_NAME@,$TICS_NAME,;t t
29266 s,@TINFO_NAME@,$TINFO_NAME,;t t
29267 s,@LIB_NAME@,$LIB_NAME,;t t
29268 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29269 s,@CC_G_OPT@,$CC_G_OPT,;t t
29270 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29271 s,@LD_MODEL@,$LD_MODEL,;t t
29272 s,@shlibdir@,$shlibdir,;t t
29273 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29274 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29275 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29276 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29277 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29278 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29279 s,@LINK_PROGS@,$LINK_PROGS,;t t
29280 s,@LINK_TESTS@,$LINK_TESTS,;t t
29281 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29282 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29283 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29284 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29285 s,@RPATH_LIST@,$RPATH_LIST,;t t
29286 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29287 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29288 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29289 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29290 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29291 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29292 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29293 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29294 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29295 s,@TIC@,$TIC,;t t
29296 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29297 s,@INFOCMP@,$INFOCMP,;t t
29298 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29299 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29300 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29301 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29302 s,@XTERM_KBS@,$XTERM_KBS,;t t
29303 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29304 s,@TERMINFO@,$TERMINFO,;t t
29305 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29306 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29307 s,@TERMPATH@,$TERMPATH,;t t
29308 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29309 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29310 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29311 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29312 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29313 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29314 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29315 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29316 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29317 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29318 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29319 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29320 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29321 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29322 s,@RGB_PATH@,$RGB_PATH,;t t
29323 s,@no_x11_rgb@,$no_x11_rgb,;t t
29324 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29325 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29326 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29327 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29328 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29329 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29330 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29331 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29332 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29333 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29334 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29335 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29336 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29337 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29338 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29339 s,@PTHREAD@,$PTHREAD,;t t
29340 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29341 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29342 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29343 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29344 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29345 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29346 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29347 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29348 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29349 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29350 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29351 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29352 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29353 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29354 s,@ECHO_LT@,$ECHO_LT,;t t
29355 s,@ECHO_LD@,$ECHO_LD,;t t
29356 s,@RULE_CC@,$RULE_CC,;t t
29357 s,@SHOW_CC@,$SHOW_CC,;t t
29358 s,@ECHO_CC@,$ECHO_CC,;t t
29359 s,@ECHO_LINK@,$ECHO_LINK,;t t
29360 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29361 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29362 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29363 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29364 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29365 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29366 s,@ADAFLAGS@,$ADAFLAGS,;t t
29367 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29368 s,@ADA_TRACE@,$ADA_TRACE,;t t
29369 s,@MATH_LIB@,$MATH_LIB,;t t
29370 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29371 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29372 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29373 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29374 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29375 s,@TEST_LIBS@,$TEST_LIBS,;t t
29376 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29377 s,@CXXCPP@,$CXXCPP,;t t
29378 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29379 s,@CXX_AR@,$CXX_AR,;t t
29380 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29381 s,@CXXLIBS@,$CXXLIBS,;t t
29382 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29383 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29384 s,@M4_exists@,$M4_exists,;t t
29385 s,@cf_ada_make@,$cf_ada_make,;t t
29386 s,@cf_ada_config@,$cf_ada_config,;t t
29387 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29388 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29389 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29390 s,@cf_compile_generics@,$cf_compile_generics,;t t
29391 s,@cf_generic_objects@,$cf_generic_objects,;t t
29392 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29393 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29394 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29395 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29396 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29397 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29398 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29399 s,@cf_ada_package@,$cf_ada_package,;t t
29400 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29401 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29402 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29403 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29404 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29405 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29406 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29407 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29408 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29409 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29410 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29411 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29412 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29413 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29414 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29415 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29416 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29417 s,@TICS_LIBS@,$TICS_LIBS,;t t
29418 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29419 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29420 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29421 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29422 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29423 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29424 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29425 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29426 s,@includesubdir@,$includesubdir,;t t
29427 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29428 s,@TICS_LIST@,$TICS_LIST,;t t
29429 s,@TINFO_LIST@,$TINFO_LIST,;t t
29430 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29431 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29432 s,@FORM_NAME@,$FORM_NAME,;t t
29433 s,@MENU_NAME@,$MENU_NAME,;t t
29434 s,@PANEL_NAME@,$PANEL_NAME,;t t
29435 s,@CXX_NAME@,$CXX_NAME,;t t
29436 s,@TEST_ARGS@,$TEST_ARGS,;t t
29437 s,@TEST_DEPS@,$TEST_DEPS,;t t
29438 s,@TEST_ARG2@,$TEST_ARG2,;t t
29439 s,@TEST_DEP2@,$TEST_DEP2,;t t
29440 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29441 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29442 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29443 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29444 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29445 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29446 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29447 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29448 s,@cross_compiling@,$cross_compiling,;t t
29449 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29450 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29451 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29452 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29453 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29454 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29455 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29456 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29457 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29458 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29459 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29460 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29461 CEOF
29462
29463 EOF
29464
29465   cat >>"$CONFIG_STATUS" <<\EOF
29466   # Split the substitutions into bite-sized pieces for seds with
29467   # small command number limits, like on Digital OSF/1 and HP-UX.
29468   ac_max_sed_lines=48
29469   ac_sed_frag=1 # Number of current file.
29470   ac_beg=1 # First line for current file.
29471   ac_end=$ac_max_sed_lines # Line after last line for current file.
29472   ac_more_lines=:
29473   ac_sed_cmds=
29474   while "$ac_more_lines"; do
29475     if test "$ac_beg" -gt 1; then
29476       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29477     else
29478       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29479     fi
29480     if test ! -s $tmp/subs.frag; then
29481       ac_more_lines=false
29482     else
29483       # The purpose of the label and of the branching condition is to
29484       # speed up the sed processing (if there are no `@' at all, there
29485       # is no need to browse any of the substitutions).
29486       # These are the two extra sed commands mentioned above.
29487       (echo ':t
29488   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29489       # It is possible to make a multiline substitution using escaped newlines.
29490       # Ensure that we do not split the substitution between script fragments.
29491       ac_BEG=$ac_end
29492       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29493       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29494       if test -s $tmp/subs.next; then
29495         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29496         if test ! -s $tmp/subs.edit; then
29497           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29498           if test ! -s $tmp/subs.edit; then
29499             if test "$ac_beg" -gt 1; then
29500               ac_end=`expr "$ac_end" - 1`
29501               continue
29502             fi
29503           fi
29504         fi
29505       fi
29506
29507       if test -z "$ac_sed_cmds"; then
29508         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29509       else
29510         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29511       fi
29512       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29513       ac_beg=$ac_end
29514       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29515     fi
29516   done
29517   if test -z "$ac_sed_cmds"; then
29518     ac_sed_cmds=cat
29519   fi
29520 fi # test -n "$CONFIG_FILES"
29521
29522 EOF
29523 cat >>"$CONFIG_STATUS" <<\EOF
29524 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29525   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29526   case "$ac_file" in
29527   - | *:- | *:-:* ) # input from stdin
29528         cat >$tmp/stdin
29529         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29530         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29531   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29532         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29533   * )   ac_file_in=$ac_file.in ;;
29534   esac
29535
29536   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29537   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29538          X"$ac_file" : 'X\(//\)[^/]' \| \
29539          X"$ac_file" : 'X\(//\)$' \| \
29540          X"$ac_file" : 'X\(/\)' \| \
29541          .     : '\(.\)' 2>/dev/null ||
29542 echo X"$ac_file" |
29543     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29544           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29545           /^X\(\/\/\)$/{ s//\1/; q; }
29546           /^X\(\/\).*/{ s//\1/; q; }
29547           s/.*/./; q'`
29548   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29549     { case "$ac_dir" in
29550   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29551   *)                      as_incr_dir=.;;
29552 esac
29553 as_dummy="$ac_dir"
29554 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29555   case $as_mkdir_dir in
29556     # Skip DOS drivespec
29557     ?:) as_incr_dir=$as_mkdir_dir ;;
29558     *)
29559       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29560       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29561     ;;
29562   esac
29563 done; }
29564
29565     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29566     # A "../" for each directory in $ac_dir_suffix.
29567     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29568   else
29569     ac_dir_suffix= ac_dots=
29570   fi
29571
29572   case "$srcdir" in
29573   .)  ac_srcdir=.
29574       if test -z "$ac_dots"; then
29575          ac_top_srcdir=.
29576       else
29577          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29578       fi ;;
29579   [\\/]* | ?:[\\/]* )
29580       ac_srcdir="$srcdir$ac_dir_suffix";
29581       ac_top_srcdir="$srcdir" ;;
29582   *) # Relative path.
29583     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29584     ac_top_srcdir="$ac_dots$srcdir" ;;
29585   esac
29586
29587   case $INSTALL in
29588   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29589   *) ac_INSTALL=$ac_dots$INSTALL ;;
29590   esac
29591
29592   if test x"$ac_file" != x-; then
29593     { echo "$as_me:29593: creating $ac_file" >&5
29594 echo "$as_me: creating $ac_file" >&6;}
29595     rm -f "$ac_file"
29596   fi
29597   # Let's still pretend it is `configure' which instantiates (i.e., don't
29598   # use $as_me), people would be surprised to read:
29599   #    /* config.h.  Generated automatically by config.status.  */
29600   configure_input="Generated automatically from `echo $ac_file_in |
29601                                                  sed 's,.*/,,'` by configure."
29602
29603   # First look for the input files in the build tree, otherwise in the
29604   # src tree.
29605   ac_file_inputs=`IFS=:
29606     for f in $ac_file_in; do
29607       case $f in
29608       -) echo $tmp/stdin ;;
29609       [\\/$]*)
29610          # Absolute (can't be DOS-style, as IFS=:)
29611          test -f "$f" || { { echo "$as_me:29611: error: cannot find input file: $f" >&5
29612 echo "$as_me: error: cannot find input file: $f" >&2;}
29613    { (exit 1); exit 1; }; }
29614          echo $f;;
29615       *) # Relative
29616          if test -f "$f"; then
29617            # Build tree
29618            echo $f
29619          elif test -f "$srcdir/$f"; then
29620            # Source tree
29621            echo "$srcdir/$f"
29622          else
29623            # /dev/null tree
29624            { { echo "$as_me:29624: error: cannot find input file: $f" >&5
29625 echo "$as_me: error: cannot find input file: $f" >&2;}
29626    { (exit 1); exit 1; }; }
29627          fi;;
29628       esac
29629     done` || { (exit 1); exit 1; }
29630 EOF
29631 cat >>"$CONFIG_STATUS" <<\EOF
29632   ac_warn_datarootdir=no
29633   if test x"$ac_file" != x-; then
29634     for ac_item in $ac_file_inputs
29635     do
29636       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29637       if test -n "$ac_seen"; then
29638         ac_used=`grep '@datarootdir@' "$ac_item"`
29639         if test -z "$ac_used"; then
29640           { echo "$as_me:29640: WARNING: datarootdir was used implicitly but not set:
29641 $ac_seen" >&5
29642 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29643 $ac_seen" >&2;}
29644           ac_warn_datarootdir=yes
29645         fi
29646       fi
29647       ac_seen=`grep '${datarootdir}' "$ac_item"`
29648       if test -n "$ac_seen"; then
29649         { echo "$as_me:29649: WARNING: datarootdir was used explicitly but not set:
29650 $ac_seen" >&5
29651 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29652 $ac_seen" >&2;}
29653         ac_warn_datarootdir=yes
29654       fi
29655     done
29656   fi
29657
29658 if test "x$ac_warn_datarootdir" = xyes; then
29659   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29660 fi
29661
29662 EOF
29663 cat >>"$CONFIG_STATUS" <<EOF
29664   sed "$ac_vpsub
29665 $extrasub
29666 EOF
29667 cat >>"$CONFIG_STATUS" <<\EOF
29668 :t
29669 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29670 s,@configure_input@,$configure_input,;t t
29671 s,@srcdir@,$ac_srcdir,;t t
29672 s,@top_srcdir@,$ac_top_srcdir,;t t
29673 s,@INSTALL@,$ac_INSTALL,;t t
29674 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29675   rm -f $tmp/stdin
29676   if test x"$ac_file" != x-; then
29677     cp "$tmp/out" "$ac_file"
29678
29679     for ac_name in prefix exec_prefix datarootdir
29680     do
29681         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29682         if test -n "$ac_seen"; then
29683             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29684             if test -z "$ac_init"; then
29685               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29686               { echo "$as_me:29686: WARNING: Variable $ac_name is used but was not set:
29687 $ac_seen" >&5
29688 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29689 $ac_seen" >&2;}
29690             fi
29691         fi
29692     done
29693     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29694     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29695     if test -s $tmp/out; then
29696       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29697       { echo "$as_me:29697: WARNING: Some variables may not be substituted:
29698 $ac_seen" >&5
29699 echo "$as_me: WARNING: Some variables may not be substituted:
29700 $ac_seen" >&2;}
29701     fi
29702   else
29703     cat $tmp/out
29704   fi
29705   rm -f $tmp/out
29706
29707 done
29708 EOF
29709 cat >>"$CONFIG_STATUS" <<\EOF
29710
29711 #
29712 # CONFIG_HEADER section.
29713 #
29714
29715 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29716 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29717 #
29718 # ac_d sets the value in "#define NAME VALUE" lines.
29719 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29720 ac_dB='[        ].*$,\1#\2'
29721 ac_dC=' '
29722 ac_dD=',;t'
29723 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29724 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29725 ac_iB='\([      ]\),\1#\2define\3'
29726 ac_iC=' '
29727 ac_iD='\4,;t'
29728 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29729 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29730 ac_uB='$,\1#\2define\3'
29731 ac_uC=' '
29732 ac_uD=',;t'
29733
29734 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29735   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29736   case "$ac_file" in
29737   - | *:- | *:-:* ) # input from stdin
29738         cat >$tmp/stdin
29739         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29740         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29741   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29742         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29743   * )   ac_file_in=$ac_file.in ;;
29744   esac
29745
29746   test x"$ac_file" != x- && { echo "$as_me:29746: creating $ac_file" >&5
29747 echo "$as_me: creating $ac_file" >&6;}
29748
29749   # First look for the input files in the build tree, otherwise in the
29750   # src tree.
29751   ac_file_inputs=`IFS=:
29752     for f in $ac_file_in; do
29753       case $f in
29754       -) echo $tmp/stdin ;;
29755       [\\/$]*)
29756          # Absolute (can't be DOS-style, as IFS=:)
29757          test -f "$f" || { { echo "$as_me:29757: error: cannot find input file: $f" >&5
29758 echo "$as_me: error: cannot find input file: $f" >&2;}
29759    { (exit 1); exit 1; }; }
29760          echo $f;;
29761       *) # Relative
29762          if test -f "$f"; then
29763            # Build tree
29764            echo $f
29765          elif test -f "$srcdir/$f"; then
29766            # Source tree
29767            echo "$srcdir/$f"
29768          else
29769            # /dev/null tree
29770            { { echo "$as_me:29770: error: cannot find input file: $f" >&5
29771 echo "$as_me: error: cannot find input file: $f" >&2;}
29772    { (exit 1); exit 1; }; }
29773          fi;;
29774       esac
29775     done` || { (exit 1); exit 1; }
29776   # Remove the trailing spaces.
29777   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29778
29779 EOF
29780
29781 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29782 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29783 # be either 'cat' or 'sort'.
29784 cat confdefs.h | uniq >conftest.vals
29785
29786 # Break up conftest.vals because some shells have a limit on
29787 # the size of here documents, and old seds have small limits too.
29788
29789 rm -f conftest.tail
29790 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
29791 while grep . conftest.vals >/dev/null
29792 do
29793   # Write chunks of a limited-size here document to conftest.frag.
29794   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
29795   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
29796   echo 'CEOF' >> "$CONFIG_STATUS"
29797   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
29798   rm -f conftest.vals
29799   mv conftest.tail conftest.vals
29800 done
29801 rm -f conftest.vals
29802
29803 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29804 # marker @DEFS@.
29805 echo '  cat >> conftest.edit <<CEOF
29806 /@DEFS@/r conftest.frag
29807 /@DEFS@/d
29808 CEOF
29809 sed -f conftest.edit $tmp/in > $tmp/out
29810 rm -f $tmp/in
29811 mv $tmp/out $tmp/in
29812 rm -f conftest.edit conftest.frag
29813 ' >> "$CONFIG_STATUS"
29814
29815 cat >>"$CONFIG_STATUS" <<\EOF
29816   # Let's still pretend it is `configure' which instantiates (i.e., don't
29817   # use $as_me), people would be surprised to read:
29818   #    /* config.h.  Generated automatically by config.status.  */
29819   if test x"$ac_file" = x-; then
29820     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29821   else
29822     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29823   fi
29824   cat $tmp/in >>$tmp/config.h
29825   rm -f $tmp/in
29826   if test x"$ac_file" != x-; then
29827     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
29828       { echo "$as_me:29828: $ac_file is unchanged" >&5
29829 echo "$as_me: $ac_file is unchanged" >&6;}
29830     else
29831       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29832          X"$ac_file" : 'X\(//\)[^/]' \| \
29833          X"$ac_file" : 'X\(//\)$' \| \
29834          X"$ac_file" : 'X\(/\)' \| \
29835          .     : '\(.\)' 2>/dev/null ||
29836 echo X"$ac_file" |
29837     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29838           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29839           /^X\(\/\/\)$/{ s//\1/; q; }
29840           /^X\(\/\).*/{ s//\1/; q; }
29841           s/.*/./; q'`
29842       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29843         { case "$ac_dir" in
29844   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29845   *)                      as_incr_dir=.;;
29846 esac
29847 as_dummy="$ac_dir"
29848 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29849   case $as_mkdir_dir in
29850     # Skip DOS drivespec
29851     ?:) as_incr_dir=$as_mkdir_dir ;;
29852     *)
29853       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29854       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29855     ;;
29856   esac
29857 done; }
29858
29859       fi
29860       rm -f "$ac_file"
29861       mv "$tmp/config.h" "$ac_file"
29862     fi
29863   else
29864     cat $tmp/config.h
29865     rm -f $tmp/config.h
29866   fi
29867 done
29868 EOF
29869 cat >>"$CONFIG_STATUS" <<\EOF
29870 #
29871 # CONFIG_COMMANDS section.
29872 #
29873 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29874   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29875   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29876
29877   case "$ac_dest" in
29878     default )
29879 if test "x$cf_with_tests" != xno ; then
29880
29881 for cf_dir in test
29882 do
29883         if test ! -d "$srcdir/$cf_dir" ; then
29884                 continue
29885         elif test -f "$srcdir/$cf_dir/programs" ; then
29886                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
29887         fi
29888 done
29889
29890 fi
29891
29892 cf_prefix=$LIB_PREFIX
29893
29894 case "$cf_cv_shlib_version" in
29895 (cygdll|msysdll|mingw|msvcdll)
29896         TINFO_NAME=$TINFO_ARG_SUFFIX
29897         TINFO_SUFFIX=.dll
29898         ;;
29899 esac
29900
29901 if test -n "$TINFO_SUFFIX" ; then
29902         case "$TINFO_SUFFIX" in
29903         (tw*)
29904                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
29905                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
29906                 ;;
29907         (t*)
29908                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
29909                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
29910                 ;;
29911         (w*)
29912                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
29913                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
29914                 ;;
29915         esac
29916 fi
29917
29918 for cf_dir in $SRC_SUBDIRS
29919 do
29920         if test ! -d "$srcdir/$cf_dir" ; then
29921                 continue
29922         elif test -f "$srcdir/$cf_dir/modules" ; then
29923
29924                 SHARED_LIB=
29925                 Libs_To_Make=
29926                 cf_awk_program=
29927                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
29928                 then
29929                         cf_awk_program="$cf_awk_program\
29930 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
29931 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
29932 "
29933                 fi
29934
29935                 if test "x$WILDCARD_SYMS" = xno
29936                 then
29937                         cf_awk_program="$cf_awk_program\
29938 /[      ]_\\*;/ { skip=1; next; }\
29939 "
29940                 fi
29941
29942                 if test "x$cf_awk_program" != "x"
29943                 then
29944                         cat >>$cf_dir/Makefile <<CF_EOF
29945
29946 # Generated by CF_LIB_RULES
29947 resulting.map: $UNALTERED_SYMS
29948         $AWK 'BEGIN { skip = 1; last=""; } \
29949 $cf_awk_program \
29950 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
29951  skip = 0; last = \$\$0; } \
29952 END { print last; }' < "$UNALTERED_SYMS" >\$@
29953
29954 distclean::
29955         rm -f resulting.map
29956 CF_EOF
29957                 fi
29958
29959                 for cf_item in $cf_LIST_MODELS
29960                 do
29961
29962         case X$cf_item in
29963         (Xlibtool)
29964                 cf_suffix='.la'
29965                 cf_depsuf=$cf_suffix
29966                 ;;
29967         (Xdebug)
29968                 case "$cf_cv_system_name" in
29969                 (*-msvc*)
29970                         cf_suffix='_g.lib'
29971                         ;;
29972                 (*)
29973                         cf_suffix='_g.a'
29974                         ;;
29975                 esac
29976                 cf_depsuf=$cf_suffix
29977                 ;;
29978         (Xprofile)
29979                 case "$cf_cv_system_name" in
29980                 (*-msvc*)
29981                         cf_suffix='_p.lib'
29982                         ;;
29983                 (*)
29984                         cf_suffix='_p.a'
29985                         ;;
29986                 esac
29987                 cf_depsuf=$cf_suffix
29988                 ;;
29989         (Xshared)
29990                 case "$cf_cv_system_name" in
29991                 (aix[5-7]*)
29992                         cf_suffix='.so'
29993                         cf_depsuf=$cf_suffix
29994                         ;;
29995                 (*-msvc*)
29996                         cf_suffix='.dll'
29997                         cf_depsuf='.dll.lib'
29998                         ;;
29999                 (cygwin*|msys*|mingw*)
30000                         cf_suffix='.dll'
30001                         cf_depsuf='.dll.a'
30002                         ;;
30003                 (darwin*)
30004                         cf_suffix='.dylib'
30005                         cf_depsuf=$cf_suffix
30006                         ;;
30007                 (hpux*)
30008                         case "$target" in
30009                         (ia64*)
30010                                 cf_suffix='.so'
30011                                 cf_depsuf=$cf_suffix
30012                                 ;;
30013                         (*)
30014                                 cf_suffix='.sl'
30015                                 cf_depsuf=$cf_suffix
30016                                 ;;
30017                         esac
30018                         ;;
30019                 (*)
30020                         cf_suffix='.so'
30021                         cf_depsuf=$cf_suffix
30022                         ;;
30023                 esac
30024                 ;;
30025         (*)
30026                 case "$target" in
30027                 (*-msvc*)
30028                         cf_suffix='.lib'
30029                         ;;
30030                 (*)
30031                         cf_suffix='.a'
30032                         ;;
30033                 esac
30034                 cf_depsuf=$cf_suffix
30035                 ;;
30036         esac
30037         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30038         then
30039                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30040                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30041         fi
30042
30043                         if test "$cf_dir" = "c++"
30044                         then
30045
30046 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30047
30048 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30049
30050                         else
30051
30052 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30053
30054 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30055
30056                         fi
30057                         test -z "$cf_libname" && cf_libname="$cf_dir"
30058                         if test "$cf_item" = shared ; then
30059                                 if test -n "${LIB_SUFFIX}"
30060                                 then
30061                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30062                                 else
30063                                         cf_shared_suffix="$cf_suffix"
30064                                 fi
30065                                 if test "$cf_cv_do_symlinks" = yes ; then
30066                                         cf_version_name=
30067
30068                                         case "$cf_cv_shlib_version" in
30069                                         (rel)
30070                                                 cf_version_name=REL_VERSION
30071                                                 ;;
30072                                         (abi)
30073                                                 cf_version_name=ABI_VERSION
30074                                                 ;;
30075                                         esac
30076
30077                                         if test -n "$cf_version_name"
30078                                         then
30079                                                 case "$cf_cv_system_name" in
30080                                                 (darwin*)
30081                                                         # "w", etc?
30082                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30083                                                         ;;
30084                                                 (*)
30085                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30086                                                         ;;
30087                                                 esac
30088                                         fi
30089                                         if test -n "${USE_LIB_SUFFIX}"
30090                                         then
30091                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30092                                         else
30093                                                 cf_shared_suffix="$cf_suffix"
30094                                         fi
30095                                 fi
30096                                 # cygwin needs import library, and has unique naming convention
30097                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30098                                 # use 'cyg' prefix for shared lib.
30099                                 case "$cf_cv_shlib_version" in
30100                                 (cygdll)
30101                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30102                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30103                                         ;;
30104                                 (msysdll)
30105                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30106                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30107                                         ;;
30108                                 (mingw)
30109                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30110                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30111                                         ;;
30112                                 (msvcdll)
30113                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30114                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30115                                         ;;
30116                                 (*)
30117                                         cf_add_lib=
30118                                         ;;
30119                                 esac
30120                                 if test -n "$cf_add_lib"
30121                                 then
30122                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30123                                         continue
30124                                 fi
30125                         fi
30126                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30127                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30128                 done
30129
30130                 if test "$cf_dir" = ncurses ; then
30131                         cf_subsets="$LIB_SUBSETS"
30132                         cf_r_parts="$cf_subsets"
30133                         cf_liblist="$Libs_To_Make"
30134
30135                         while test -n "$cf_r_parts"
30136                         do
30137                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30138                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30139                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30140                                         cf_add_lib=
30141                                         case "$cf_l_parts" in
30142                                         (*termlib*)
30143                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30144                                                 ;;
30145                                         (*ticlib*)
30146                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30147                                                 ;;
30148                                         (*)
30149                                                 break
30150                                                 ;;
30151                                         esac
30152                                         if test -n "$cf_add_lib"; then
30153                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30154                                         fi
30155                                 else
30156                                         break
30157                                 fi
30158                         done
30159                 else
30160                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30161                 fi
30162
30163                 if test "$cf_dir" = c++; then
30164                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30165                                 cf_list=
30166                                 for cf_item in $Libs_To_Make
30167                                 do
30168                                         case "$cf_item" in
30169                                         (*.a)
30170                                                 ;;
30171                                         (*)
30172                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30173                                                 ;;
30174                                         esac
30175                                         for cf_test in $cf_list
30176                                         do
30177                                                 if test "$cf_test" = "$cf_item"
30178                                                 then
30179                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30180                                                         cf_item=
30181                                                         break
30182                                                 fi
30183                                         done
30184                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30185                                 done
30186                                 Libs_To_Make="$cf_list"
30187                         fi
30188                 fi
30189
30190                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30191                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30192                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30193                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30194
30195                 $AWK -f "$srcdir/mk-0th.awk" \
30196                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30197                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30198
30199                 for cf_subset in $cf_subsets
30200                 do
30201                         cf_subdirs=
30202                         for cf_item in $cf_LIST_MODELS
30203                         do
30204
30205                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30206
30207 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30208
30209                         CXX_MODEL=$cf_ITEM
30210                         if test "$CXX_MODEL" = SHARED; then
30211                                 case "$cf_cv_shlib_version" in
30212                                 (cygdll|msysdll|mingw|msvcdll)
30213                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30214
30215 echo "${as_me:-configure}:30215: testing overriding CXX_MODEL to SHARED ..." 1>&5
30216
30217                                         with_shared_cxx=yes
30218                                         ;;
30219                                 (*)
30220                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30221                                         ;;
30222                                 esac
30223                         fi
30224
30225         case X$cf_item in
30226         (Xlibtool)
30227                 cf_suffix='.la'
30228                 cf_depsuf=$cf_suffix
30229                 ;;
30230         (Xdebug)
30231                 case "$cf_cv_system_name" in
30232                 (*-msvc*)
30233                         cf_suffix='_g.lib'
30234                         ;;
30235                 (*)
30236                         cf_suffix='_g.a'
30237                         ;;
30238                 esac
30239                 cf_depsuf=$cf_suffix
30240                 ;;
30241         (Xprofile)
30242                 case "$cf_cv_system_name" in
30243                 (*-msvc*)
30244                         cf_suffix='_p.lib'
30245                         ;;
30246                 (*)
30247                         cf_suffix='_p.a'
30248                         ;;
30249                 esac
30250                 cf_depsuf=$cf_suffix
30251                 ;;
30252         (Xshared)
30253                 case "$cf_cv_system_name" in
30254                 (aix[5-7]*)
30255                         cf_suffix='.so'
30256                         cf_depsuf=$cf_suffix
30257                         ;;
30258                 (*-msvc*)
30259                         cf_suffix='.dll'
30260                         cf_depsuf='.dll.lib'
30261                         ;;
30262                 (cygwin*|msys*|mingw*)
30263                         cf_suffix='.dll'
30264                         cf_depsuf='.dll.a'
30265                         ;;
30266                 (darwin*)
30267                         cf_suffix='.dylib'
30268                         cf_depsuf=$cf_suffix
30269                         ;;
30270                 (hpux*)
30271                         case "$target" in
30272                         (ia64*)
30273                                 cf_suffix='.so'
30274                                 cf_depsuf=$cf_suffix
30275                                 ;;
30276                         (*)
30277                                 cf_suffix='.sl'
30278                                 cf_depsuf=$cf_suffix
30279                                 ;;
30280                         esac
30281                         ;;
30282                 (*)
30283                         cf_suffix='.so'
30284                         cf_depsuf=$cf_suffix
30285                         ;;
30286                 esac
30287                 ;;
30288         (*)
30289                 case "$target" in
30290                 (*-msvc*)
30291                         cf_suffix='.lib'
30292                         ;;
30293                 (*)
30294                         cf_suffix='.a'
30295                         ;;
30296                 esac
30297                 cf_depsuf=$cf_suffix
30298                 ;;
30299         esac
30300         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30301         then
30302                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30303                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30304         fi
30305
30306         case $cf_item in
30307         (libtool) cf_subdir='obj_lo'  ;;
30308         (normal)  cf_subdir='objects' ;;
30309         (debug)   cf_subdir='obj_g' ;;
30310         (profile) cf_subdir='obj_p' ;;
30311         (shared)
30312                 case "$cf_cv_system_name" in
30313                 (cygwin|msys)
30314                         cf_subdir='objects' ;;
30315                 (*)
30316                         cf_subdir='obj_s' ;;
30317                 esac
30318         esac
30319
30320                         # Test for case where we build libtinfo with a different name.
30321                         cf_libname=$cf_dir
30322                         if test "$cf_dir" = ncurses ; then
30323                                 case "$cf_subset" in
30324                                 (*base*)
30325                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30326                                         ;;
30327                                 (*termlib*)
30328                                         cf_libname=$TINFO_LIB_SUFFIX
30329                                         ;;
30330                                 (ticlib*)
30331                                         cf_libname=$TICS_LIB_SUFFIX
30332                                         ;;
30333                                 esac
30334                         elif test "$cf_dir" = c++ ; then
30335
30336 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30337
30338 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30339
30340                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30341                         else
30342
30343 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30344
30345 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30346
30347                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30348                         fi
30349                         if test -n "${USE_ARG_SUFFIX}" ; then
30350                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30351                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30352                         fi
30353
30354                         # These dependencies really are for development, not
30355                         # builds, but they are useful in porting, too.
30356                         cf_depend="../include/ncurses_cfg.h"
30357                         if test "$srcdir" = "."; then
30358                                 cf_reldir="."
30359                         else
30360                                 cf_reldir="\${srcdir}"
30361                         fi
30362
30363                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30364                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30365                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30366                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30367                         fi
30368
30369                         cf_dir_suffix=
30370                         old_cf_suffix="$cf_suffix"
30371                         if test "$cf_cv_shlib_version_infix" = yes ; then
30372                         if test -n "$USE_LIB_SUFFIX" ; then
30373                                 case "$USE_LIB_SUFFIX" in
30374                                 (tw*)
30375                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30376                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30377                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30378                                         ;;
30379                                 (t*)
30380                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30381                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30382                                         cf_dir_suffix=t$EXTRA_SUFFIX
30383                                         ;;
30384                                 (w*)
30385                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30386                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30387                                         cf_dir_suffix=w$EXTRA_SUFFIX
30388                                         ;;
30389                                 (*)
30390                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30391                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30392                                         cf_dir_suffix=$EXTRA_SUFFIX
30393                                         ;;
30394                                 esac
30395                         fi
30396                         fi
30397
30398                         $AWK -f "$srcdir/mk-1st.awk" \
30399                                 name=${cf_libname}${cf_dir_suffix} \
30400                                 traces=$LIB_TRACING \
30401                                 MODEL=$cf_ITEM \
30402                                 CXX_MODEL=$CXX_MODEL \
30403                                 LIB_SUFFIX=$LIB_SUFFIX \
30404                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30405                                 make_phony="${cf_cv_make_PHONY:-no}" \
30406                                 model=$cf_subdir \
30407                                 prefix=$cf_prefix \
30408                                 suffix=$cf_suffix \
30409                                 subset=$cf_subset \
30410                                 driver=$cf_cv_term_driver \
30411                                 SymLink="$LN_S" \
30412                                 TermlibRoot=$TINFO_NAME \
30413                                 TermlibSuffix=$TINFO_SUFFIX \
30414                                 ShlibVer=$cf_cv_shlib_version \
30415                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30416                                 ReLink=${cf_cv_do_relink:-no} \
30417                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30418                                 DoLinks=$cf_cv_do_symlinks \
30419                                 rmSoLocs=$cf_cv_rm_so_locs \
30420                                 ldconfig="$LDCONFIG" \
30421                                 overwrite=$WITH_OVERWRITE \
30422                                 depend="$cf_depend" \
30423                                 host="$host" \
30424                                 libtool_version="$LIBTOOL_VERSION" \
30425                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30426
30427                         cf_suffix="$old_cf_suffix"
30428
30429                         for cf_subdir2 in $cf_subdirs lib
30430                         do
30431                                 test "$cf_subdir" = "$cf_subdir2" && break
30432                         done
30433                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30434                         $AWK -f "$srcdir/mk-2nd.awk" \
30435                                 name=$cf_dir \
30436                                 traces=$LIB_TRACING \
30437                                 MODEL=$cf_ITEM \
30438                                 model=$cf_subdir \
30439                                 subset=$cf_subset \
30440                                 srcdir=$srcdir \
30441                                 echo=$WITH_ECHO \
30442                                 crenames=$cf_cv_prog_CC_c_o \
30443                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30444                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30445                         cf_subdirs="$cf_subdirs $cf_subdir"
30446                         done
30447                 done
30448         fi
30449
30450         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30451 done
30452
30453 echo >> Makefile
30454 echo '# generated by CF_LIB_RULES' >> Makefile
30455
30456 if test "x$cf_cv_make_PHONY" = xyes ; then
30457         cat >> Makefile <<-CF_EOF
30458
30459         .PHONY :        libs
30460         .PHONY :        lintlib
30461         .PHONY :        install.includes
30462         .PHONY :        uninstall.includes
30463         .PHONY :        install.libs
30464         .PHONY :        uninstall.libs
30465 CF_EOF
30466 fi
30467
30468 for cf_dir in $SRC_SUBDIRS
30469 do
30470         if test ! -d "$srcdir/$cf_dir" ; then
30471                 continue
30472         fi
30473
30474         if test -f "$cf_dir/Makefile" ; then
30475                 case "$cf_dir" in
30476                 (Ada95)
30477                         echo 'libs \' >> Makefile
30478                         echo 'install.libs \' >> Makefile
30479                         echo 'uninstall.libs ::' >> Makefile
30480                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30481                         ;;
30482                 esac
30483         fi
30484
30485         if test -f "$srcdir/$cf_dir/modules" ; then
30486
30487                 if test "x$cf_cv_make_PHONY" = xyes ; then
30488                         cat >> Makefile <<-CF_EOF
30489
30490                         .PHONY :        install.$cf_dir
30491                         .PHONY :        uninstall.$cf_dir
30492 CF_EOF
30493                 fi
30494
30495                 echo >> Makefile
30496                 if test -f "$srcdir/$cf_dir/headers" ; then
30497 cat >> Makefile <<CF_EOF
30498 install.includes \\
30499 uninstall.includes \\
30500 CF_EOF
30501                 fi
30502
30503 cat >> Makefile <<CF_EOF
30504 lint \\
30505 libs \\
30506 lintlib \\
30507 install.libs \\
30508 uninstall.libs \\
30509 install.$cf_dir \\
30510 uninstall.$cf_dir ::
30511         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30512 CF_EOF
30513         elif test -f "$srcdir/$cf_dir/headers" ; then
30514 cat >> Makefile <<CF_EOF
30515
30516 libs \\
30517 install.libs \\
30518 uninstall.libs \\
30519 install.includes \\
30520 uninstall.includes ::
30521         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30522 CF_EOF
30523 fi
30524 done
30525
30526 if test "x$cf_cv_make_PHONY" = xyes ; then
30527         cat >> Makefile <<-CF_EOF
30528
30529         .PHONY :        install.data
30530         .PHONY :        uninstall.data
30531 CF_EOF
30532 fi
30533
30534 if test "x$cf_with_db_install" = xyes; then
30535 cat >> Makefile <<CF_EOF
30536
30537 install.libs uninstall.libs \\
30538 install.data uninstall.data ::
30539 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30540 CF_EOF
30541 else
30542 cat >> Makefile <<CF_EOF
30543
30544 install.libs uninstall.libs ::
30545         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30546 CF_EOF
30547 fi
30548
30549 if test "x$cf_with_manpages" = xyes; then
30550
30551 if test "x$cf_cv_make_PHONY" = xyes ; then
30552         cat >> Makefile <<-CF_EOF
30553
30554         .PHONY :        install.man
30555         .PHONY :        uninstall.man
30556 CF_EOF
30557 fi
30558
30559 cat >> Makefile <<CF_EOF
30560
30561 install.man \\
30562 uninstall.man ::
30563         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30564 CF_EOF
30565 fi
30566
30567 cat >> Makefile <<CF_EOF
30568
30569 distclean ::
30570         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30571         rm -f headers.sh headers.sed mk_shared_lib.sh
30572         rm -f edit_man.* man_alias.*
30573         rm -rf \${DIRS_TO_MAKE}
30574 CF_EOF
30575
30576 # Special case: tack's manpage lives in its own directory.
30577 if test "x$cf_with_manpages" = xyes; then
30578 if test "x$cf_with_tack" = "xyes"; then
30579 cat >> Makefile <<CF_EOF
30580
30581 install.man \\
30582 uninstall.man ::
30583         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30584 CF_EOF
30585 fi
30586 fi
30587
30588 rm -f headers.sed headers.sh
30589
30590 echo creating headers.sh
30591 cat >headers.sh <<CF_EOF
30592 #! $SHELL
30593 # This shell script is generated by the 'configure' script.  It is invoked in a
30594 # subdirectory of the build tree.  It generates a sed-script in the parent
30595 # directory that is used to adjust includes for header files that reside in a
30596 # subdirectory of /usr/include, etc.
30597 PRG=""
30598 while test \$# != 3
30599 do
30600 PRG="\$PRG \$1"; shift
30601 done
30602 DST=\$1
30603 REF=\$2
30604 SRC=\$3
30605 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30606 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30607 echo installing \$SRC in \$DST
30608 CF_EOF
30609
30610 if test "$WITH_CURSES_H" = yes; then
30611         cat >>headers.sh <<CF_EOF
30612 case \$DST in
30613 (/*/include/*)
30614         END=\`basename \$DST\`
30615         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30616         do
30617                 NAME=\`basename \$i\`
30618                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30619         done
30620         ;;
30621 (*)
30622         echo "" >> \$TMPSED
30623         ;;
30624 esac
30625 CF_EOF
30626
30627 else
30628         cat >>headers.sh <<CF_EOF
30629 case \$DST in
30630 (/*/include/*)
30631         END=\`basename \$DST\`
30632         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30633         do
30634                 NAME=\`basename \$i\`
30635                 if test "\$NAME" = "curses.h"
30636                 then
30637                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30638                         NAME=ncurses.h
30639                 fi
30640                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30641         done
30642         ;;
30643 (*)
30644         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30645         ;;
30646 esac
30647 CF_EOF
30648 fi
30649 cat >>headers.sh <<CF_EOF
30650 rm -f \$TMPSRC
30651 sed -f \$TMPSED \$SRC > \$TMPSRC
30652 NAME=\`basename \$SRC\`
30653 CF_EOF
30654 if test "$WITH_CURSES_H" != yes; then
30655         cat >>headers.sh <<CF_EOF
30656 test "\$NAME" = "curses.h" && NAME=ncurses.h
30657 CF_EOF
30658 fi
30659 cat >>headers.sh <<CF_EOF
30660 # Just in case someone gzip'd manpages, remove the conflicting copy.
30661 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30662
30663 eval \$PRG \$TMPSRC \$DST/\$NAME
30664 rm -f \$TMPSRC \$TMPSED
30665 CF_EOF
30666
30667 chmod 0755 headers.sh
30668
30669 for cf_dir in $SRC_SUBDIRS
30670 do
30671         if test ! -d "$srcdir/$cf_dir" ; then
30672                 continue
30673         fi
30674
30675         if test -f "$srcdir/$cf_dir/headers" ; then
30676                 $AWK -f "$srcdir/mk-hdr.awk" \
30677                         subset="$LIB_SUBSETS" \
30678                         compat="$WITH_CURSES_H" \
30679                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30680         fi
30681
30682         if test -f "$srcdir/$cf_dir/modules" ; then
30683                 if test "$cf_dir" != "c++" ; then
30684                         if test "x$cf_cv_make_PHONY" = xyes ; then
30685                                 cat >> $cf_dir/Makefile <<-CF_EOF
30686
30687                                 .PHONY :        depend
30688 CF_EOF
30689                         fi
30690
30691                         cat >>$cf_dir/Makefile <<"CF_EOF"
30692 depend : ${AUTO_SRC}
30693         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30694
30695 # DO NOT DELETE THIS LINE -- make depend depends on it.
30696 CF_EOF
30697                 fi
30698         fi
30699 done
30700
30701 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30702 if test -z "$USE_OLD_MAKERULES" ; then
30703         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30704 fi
30705 fi
30706  ;;
30707   esac
30708 done
30709 EOF
30710
30711 cat >>"$CONFIG_STATUS" <<\EOF
30712
30713 { (exit 0); exit 0; }
30714 EOF
30715 chmod +x "$CONFIG_STATUS"
30716 ac_clean_files=$ac_clean_files_save
30717
30718 # configure is writing to config.log, and then calls config.status.
30719 # config.status does its own redirection, appending to config.log.
30720 # Unfortunately, on DOS this fails, as config.log is still kept open
30721 # by configure, so config.status won't be able to write to it; its
30722 # output is simply discarded.  So we exec the FD to /dev/null,
30723 # effectively closing config.log, so it can be properly (re)opened and
30724 # appended to by config.status.  When coming back to configure, we
30725 # need to make the FD available again.
30726 if test "$no_create" != yes; then
30727   ac_cs_success=:
30728   exec 5>/dev/null
30729   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
30730   exec 5>>config.log
30731   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30732   # would make configure fail if this is the last instruction.
30733   "$ac_cs_success" || { (exit 1); exit 1; }
30734 fi
30735 ${MAKE:-make} preinstall