]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.2 - patch 20210904
[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 PKG_CONFIG_LIBDIR=no
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   PKG_CONFIG_LIBDIR=$withval
4147 else
4148   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
4149 fi;
4150
4151 case x$PKG_CONFIG_LIBDIR in
4152 (x/*)
4153         ;;
4154 (xyes)
4155         # Look for the library directory using the same prefix as the executable
4156         if test "x$PKG_CONFIG" = xnone
4157         then
4158                 cf_path=$prefix
4159         else
4160                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
4161         fi
4162
4163         # If you don't like using the default architecture, you have to specify the
4164         # intended library directory and corresponding compiler/linker options.
4165         #
4166         # This case allows for Debian's 2014-flavor of multiarch, along with the
4167         # most common variations before that point.  Some other variants spell the
4168         # directory differently, e.g., "pkg-config", and put it in unusual places.
4169         # pkg-config has always been poorly standardized, which is ironic...
4170         case x`(arch) 2>/dev/null` in
4171         (*64)
4172                 cf_search_path="\
4173                         $cf_path/lib/*64-linux-gnu \
4174                         $cf_path/share \
4175                         $cf_path/lib64 \
4176                         $cf_path/lib32 \
4177                         $cf_path/lib"
4178                 ;;
4179         (*)
4180                 cf_search_path="\
4181                         $cf_path/lib/*-linux-gnu \
4182                         $cf_path/share \
4183                         $cf_path/lib32 \
4184                         $cf_path/lib \
4185                         $cf_path/libdata"
4186                 ;;
4187         esac
4188
4189         test -n "$verbose" && echo "    list..." 1>&6
4190
4191 echo "${as_me:-configure}:4191: testing list... ..." 1>&5
4192
4193         for cf_config in $cf_search_path
4194         do
4195                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
4196
4197 echo "${as_me:-configure}:4197: testing checking $cf_config/pkgconfig ..." 1>&5
4198
4199                 if test -d "$cf_config/pkgconfig"
4200                 then
4201                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
4202                         echo "$as_me:4202: checking done" >&5
4203 echo $ECHO_N "checking done... $ECHO_C" >&6
4204                         break
4205                 fi
4206         done
4207         ;;
4208 (*)
4209         ;;
4210 esac
4211
4212 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4213         echo "$as_me:4213: result: $PKG_CONFIG_LIBDIR" >&5
4214 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4215 fi
4216
4217 if test "x$PKG_CONFIG" != xnone
4218 then
4219         echo "$as_me:4219: checking if we should install .pc files for $PKG_CONFIG" >&5
4220 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4221 else
4222         echo "$as_me:4222: checking if we should install .pc files" >&5
4223 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4224 fi
4225
4226 # Check whether --enable-pc-files or --disable-pc-files was given.
4227 if test "${enable_pc_files+set}" = set; then
4228   enableval="$enable_pc_files"
4229   enable_pc_files=$enableval
4230 else
4231   enable_pc_files=no
4232 fi;
4233 echo "$as_me:4233: result: $enable_pc_files" >&5
4234 echo "${ECHO_T}$enable_pc_files" >&6
4235
4236 if test "x$enable_pc_files" != xno
4237 then
4238         MAKE_PC_FILES=
4239         case "x$PKG_CONFIG_LIBDIR" in
4240         (xno|xyes)
4241                 { echo "$as_me:4241: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4242 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4243                 ;;
4244         (*)
4245
4246 if test "x$prefix" != xNONE; then
4247         cf_path_syntax="$prefix"
4248 else
4249         cf_path_syntax="$ac_default_prefix"
4250 fi
4251
4252 case ".$PKG_CONFIG_LIBDIR" in
4253 (.\$\(*\)*|.\'*\'*)
4254         ;;
4255 (..|./*|.\\*)
4256         ;;
4257 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4258         ;;
4259 (.\$\{*prefix\}*|.\$\{*dir\}*)
4260         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4261         case ".$PKG_CONFIG_LIBDIR" in
4262         (.NONE/*)
4263                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4264                 ;;
4265         esac
4266         ;;
4267 (.no|.NONE/*)
4268         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e s%NONE%$cf_path_syntax%`
4269         ;;
4270 (*)
4271         { { echo "$as_me:4271: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4272 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4273    { (exit 1); exit 1; }; }
4274         ;;
4275 esac
4276
4277                 ;;
4278         esac
4279 else
4280         MAKE_PC_FILES="#"
4281 fi
4282
4283 if test -z "$MAKE_PC_FILES"
4284 then
4285         echo "$as_me:4285: checking for suffix to add to pc-files" >&5
4286 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4287
4288 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4289 if test "${with_pc_suffix+set}" = set; then
4290   withval="$with_pc_suffix"
4291   case "x$withval" in
4292         (xyes|xno)
4293                 PC_MODULE_SUFFIX=
4294                 ;;
4295         (*)     PC_MODULE_SUFFIX="$withval"
4296                 ;;
4297         esac
4298 fi;
4299         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4300         echo "$as_me:4300: result: $PC_MODULE_SUFFIX" >&5
4301 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4302         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4303
4304 fi
4305
4306 echo "$as_me:4306: checking if we should assume mixed-case filenames" >&5
4307 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4308
4309 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4310 if test "${enable_mixed_case+set}" = set; then
4311   enableval="$enable_mixed_case"
4312   enable_mixedcase=$enableval
4313 else
4314   enable_mixedcase=auto
4315 fi;
4316 echo "$as_me:4316: result: $enable_mixedcase" >&5
4317 echo "${ECHO_T}$enable_mixedcase" >&6
4318 if test "$enable_mixedcase" = "auto" ; then
4319
4320 echo "$as_me:4320: checking if filesystem supports mixed-case filenames" >&5
4321 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4322 if test "${cf_cv_mixedcase+set}" = set; then
4323   echo $ECHO_N "(cached) $ECHO_C" >&6
4324 else
4325
4326 if test "$cross_compiling" = yes ; then
4327         case "$target_alias" in
4328         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4329                 cf_cv_mixedcase=no
4330                 ;;
4331         (*)
4332                 cf_cv_mixedcase=yes
4333                 ;;
4334         esac
4335 else
4336         rm -f conftest CONFTEST
4337         echo test >conftest
4338         if test -f CONFTEST ; then
4339                 cf_cv_mixedcase=no
4340         else
4341                 cf_cv_mixedcase=yes
4342         fi
4343         rm -f conftest CONFTEST
4344 fi
4345
4346 fi
4347 echo "$as_me:4347: result: $cf_cv_mixedcase" >&5
4348 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4349 test "$cf_cv_mixedcase" = yes &&
4350 cat >>confdefs.h <<\EOF
4351 #define MIXEDCASE_FILENAMES 1
4352 EOF
4353
4354 else
4355         cf_cv_mixedcase=$enable_mixedcase
4356         if test "x$enable_mixedcase" = "xyes" ; then
4357
4358 cat >>confdefs.h <<\EOF
4359 #define MIXEDCASE_FILENAMES 1
4360 EOF
4361
4362         fi
4363 fi
4364
4365 # do this after mixed-case option (tags/TAGS is not as important as tic).
4366 echo "$as_me:4366: checking whether ${MAKE-make} sets \${MAKE}" >&5
4367 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4368 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4369 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4370   echo $ECHO_N "(cached) $ECHO_C" >&6
4371 else
4372   cat >conftest.make <<\EOF
4373 all:
4374         @echo 'ac_maketemp="${MAKE}"'
4375 EOF
4376 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4377 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4378 if test -n "$ac_maketemp"; then
4379   eval ac_cv_prog_make_${ac_make}_set=yes
4380 else
4381   eval ac_cv_prog_make_${ac_make}_set=no
4382 fi
4383 rm -f conftest.make
4384 fi
4385 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4386   echo "$as_me:4386: result: yes" >&5
4387 echo "${ECHO_T}yes" >&6
4388   SET_MAKE=
4389 else
4390   echo "$as_me:4390: result: no" >&5
4391 echo "${ECHO_T}no" >&6
4392   SET_MAKE="MAKE=${MAKE-make}"
4393 fi
4394
4395 echo "$as_me:4395: checking for \".PHONY\" make-support" >&5
4396 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4397 if test "${cf_cv_make_PHONY+set}" = set; then
4398   echo $ECHO_N "(cached) $ECHO_C" >&6
4399 else
4400
4401         rm -rf conftest*
4402         (
4403                 mkdir conftest || exit 1
4404                 cd conftest
4405                 cat >makefile <<'CF_EOF'
4406 .PHONY: always
4407 DATA=0
4408 always: always.out
4409         @echo "** making $@ $(DATA)"
4410 once: once.out
4411         @echo "** making $@ $(DATA)"
4412 always.out:
4413         @echo "** making $@ $(DATA)"
4414         echo $(DATA) > $@
4415 once.out:
4416         @echo "** making $@ $(DATA)"
4417         echo $(DATA) > $@
4418 CF_EOF
4419                 for cf_data in 1 2 3
4420                 do
4421                         ${MAKE:-make} always DATA=$cf_data
4422                         ${MAKE:-make} once   DATA=$cf_data
4423                         ${MAKE:-make} -t always once
4424                         if test -f always ; then
4425                                 echo "no (case 1)" > ../conftest.tmp
4426                         elif test ! -f always.out ; then
4427                                 echo "no (case 2)" > ../conftest.tmp
4428                         elif test ! -f once.out ; then
4429                                 echo "no (case 3)" > ../conftest.tmp
4430                         elif ! cmp -s always.out once.out ; then
4431                                 echo "no (case 4)" > ../conftest.tmp
4432                                 diff always.out once.out
4433                         else
4434                                 cf_check="`cat always.out`"
4435                                 if test "x$cf_check" != "x$cf_data" ; then
4436                                         echo "no (case 5)" > ../conftest.tmp
4437                                 else
4438                                         echo yes > ../conftest.tmp
4439                                         rm -f ./*.out
4440                                         continue
4441                                 fi
4442                         fi
4443                         break
4444                 done
4445         ) >&5 2>&1
4446         cf_cv_make_PHONY="`cat conftest.tmp`"
4447         rm -rf conftest*
4448
4449 fi
4450 echo "$as_me:4450: result: $cf_cv_make_PHONY" >&5
4451 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4452 MAKE_NO_PHONY="#"
4453 MAKE_PHONY="#"
4454 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4455 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4456
4457 for ac_prog in exctags ctags
4458 do
4459   # Extract the first word of "$ac_prog", so it can be a program name with args.
4460 set dummy $ac_prog; ac_word=$2
4461 echo "$as_me:4461: checking for $ac_word" >&5
4462 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4463 if test "${ac_cv_prog_CTAGS+set}" = set; then
4464   echo $ECHO_N "(cached) $ECHO_C" >&6
4465 else
4466   if test -n "$CTAGS"; then
4467   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4468 else
4469   ac_save_IFS=$IFS; IFS=$ac_path_separator
4470 ac_dummy="$PATH"
4471 for ac_dir in $ac_dummy; do
4472   IFS=$ac_save_IFS
4473   test -z "$ac_dir" && ac_dir=.
4474   $as_executable_p "$ac_dir/$ac_word" || continue
4475 ac_cv_prog_CTAGS="$ac_prog"
4476 echo "$as_me:4476: found $ac_dir/$ac_word" >&5
4477 break
4478 done
4479
4480 fi
4481 fi
4482 CTAGS=$ac_cv_prog_CTAGS
4483 if test -n "$CTAGS"; then
4484   echo "$as_me:4484: result: $CTAGS" >&5
4485 echo "${ECHO_T}$CTAGS" >&6
4486 else
4487   echo "$as_me:4487: result: no" >&5
4488 echo "${ECHO_T}no" >&6
4489 fi
4490
4491   test -n "$CTAGS" && break
4492 done
4493
4494 for ac_prog in exetags etags
4495 do
4496   # Extract the first word of "$ac_prog", so it can be a program name with args.
4497 set dummy $ac_prog; ac_word=$2
4498 echo "$as_me:4498: checking for $ac_word" >&5
4499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4500 if test "${ac_cv_prog_ETAGS+set}" = set; then
4501   echo $ECHO_N "(cached) $ECHO_C" >&6
4502 else
4503   if test -n "$ETAGS"; then
4504   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4505 else
4506   ac_save_IFS=$IFS; IFS=$ac_path_separator
4507 ac_dummy="$PATH"
4508 for ac_dir in $ac_dummy; do
4509   IFS=$ac_save_IFS
4510   test -z "$ac_dir" && ac_dir=.
4511   $as_executable_p "$ac_dir/$ac_word" || continue
4512 ac_cv_prog_ETAGS="$ac_prog"
4513 echo "$as_me:4513: found $ac_dir/$ac_word" >&5
4514 break
4515 done
4516
4517 fi
4518 fi
4519 ETAGS=$ac_cv_prog_ETAGS
4520 if test -n "$ETAGS"; then
4521   echo "$as_me:4521: result: $ETAGS" >&5
4522 echo "${ECHO_T}$ETAGS" >&6
4523 else
4524   echo "$as_me:4524: result: no" >&5
4525 echo "${ECHO_T}no" >&6
4526 fi
4527
4528   test -n "$ETAGS" && break
4529 done
4530
4531 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4532 set dummy ${CTAGS:-ctags}; ac_word=$2
4533 echo "$as_me:4533: checking for $ac_word" >&5
4534 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4535 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4536   echo $ECHO_N "(cached) $ECHO_C" >&6
4537 else
4538   if test -n "$MAKE_LOWER_TAGS"; then
4539   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4540 else
4541   ac_save_IFS=$IFS; IFS=$ac_path_separator
4542 ac_dummy="$PATH"
4543 for ac_dir in $ac_dummy; do
4544   IFS=$ac_save_IFS
4545   test -z "$ac_dir" && ac_dir=.
4546   $as_executable_p "$ac_dir/$ac_word" || continue
4547 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4548 echo "$as_me:4548: found $ac_dir/$ac_word" >&5
4549 break
4550 done
4551
4552   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4553 fi
4554 fi
4555 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4556 if test -n "$MAKE_LOWER_TAGS"; then
4557   echo "$as_me:4557: result: $MAKE_LOWER_TAGS" >&5
4558 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4559 else
4560   echo "$as_me:4560: result: no" >&5
4561 echo "${ECHO_T}no" >&6
4562 fi
4563
4564 if test "$cf_cv_mixedcase" = yes ; then
4565         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4566 set dummy ${ETAGS:-etags}; ac_word=$2
4567 echo "$as_me:4567: checking for $ac_word" >&5
4568 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4569 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4570   echo $ECHO_N "(cached) $ECHO_C" >&6
4571 else
4572   if test -n "$MAKE_UPPER_TAGS"; then
4573   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4574 else
4575   ac_save_IFS=$IFS; IFS=$ac_path_separator
4576 ac_dummy="$PATH"
4577 for ac_dir in $ac_dummy; do
4578   IFS=$ac_save_IFS
4579   test -z "$ac_dir" && ac_dir=.
4580   $as_executable_p "$ac_dir/$ac_word" || continue
4581 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4582 echo "$as_me:4582: found $ac_dir/$ac_word" >&5
4583 break
4584 done
4585
4586   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4587 fi
4588 fi
4589 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4590 if test -n "$MAKE_UPPER_TAGS"; then
4591   echo "$as_me:4591: result: $MAKE_UPPER_TAGS" >&5
4592 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4593 else
4594   echo "$as_me:4594: result: no" >&5
4595 echo "${ECHO_T}no" >&6
4596 fi
4597
4598 else
4599         MAKE_UPPER_TAGS=no
4600 fi
4601
4602 if test "$MAKE_UPPER_TAGS" = yes ; then
4603         MAKE_UPPER_TAGS=
4604 else
4605         MAKE_UPPER_TAGS="#"
4606 fi
4607
4608 if test "$MAKE_LOWER_TAGS" = yes ; then
4609         MAKE_LOWER_TAGS=
4610 else
4611         MAKE_LOWER_TAGS="#"
4612 fi
4613
4614 echo "$as_me:4614: checking for makeflags variable" >&5
4615 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4616 if test "${cf_cv_makeflags+set}" = set; then
4617   echo $ECHO_N "(cached) $ECHO_C" >&6
4618 else
4619
4620         cf_cv_makeflags=''
4621         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4622         do
4623                 cat >cf_makeflags.tmp <<CF_EOF
4624 SHELL = $SHELL
4625 all :
4626         @ echo '.$cf_option'
4627 CF_EOF
4628                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4629                 case "$cf_result" in
4630                 (.*k|.*kw)
4631                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4632                         case "$cf_result" in
4633                         (.*CC=*)        cf_cv_makeflags=
4634                                 ;;
4635                         (*)     cf_cv_makeflags=$cf_option
4636                                 ;;
4637                         esac
4638                         break
4639                         ;;
4640                 (.-)
4641                         ;;
4642                 (*)
4643
4644 echo "${as_me:-configure}:4644: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4645
4646                         ;;
4647                 esac
4648         done
4649         rm -f cf_makeflags.tmp
4650
4651 fi
4652 echo "$as_me:4652: result: $cf_cv_makeflags" >&5
4653 echo "${ECHO_T}$cf_cv_makeflags" >&6
4654
4655 if test -n "$ac_tool_prefix"; then
4656   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4657 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4658 echo "$as_me:4658: checking for $ac_word" >&5
4659 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4660 if test "${ac_cv_prog_RANLIB+set}" = set; then
4661   echo $ECHO_N "(cached) $ECHO_C" >&6
4662 else
4663   if test -n "$RANLIB"; then
4664   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4665 else
4666   ac_save_IFS=$IFS; IFS=$ac_path_separator
4667 ac_dummy="$PATH"
4668 for ac_dir in $ac_dummy; do
4669   IFS=$ac_save_IFS
4670   test -z "$ac_dir" && ac_dir=.
4671   $as_executable_p "$ac_dir/$ac_word" || continue
4672 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4673 echo "$as_me:4673: found $ac_dir/$ac_word" >&5
4674 break
4675 done
4676
4677 fi
4678 fi
4679 RANLIB=$ac_cv_prog_RANLIB
4680 if test -n "$RANLIB"; then
4681   echo "$as_me:4681: result: $RANLIB" >&5
4682 echo "${ECHO_T}$RANLIB" >&6
4683 else
4684   echo "$as_me:4684: result: no" >&5
4685 echo "${ECHO_T}no" >&6
4686 fi
4687
4688 fi
4689 if test -z "$ac_cv_prog_RANLIB"; then
4690   ac_ct_RANLIB=$RANLIB
4691   # Extract the first word of "ranlib", so it can be a program name with args.
4692 set dummy ranlib; ac_word=$2
4693 echo "$as_me:4693: checking for $ac_word" >&5
4694 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4695 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4696   echo $ECHO_N "(cached) $ECHO_C" >&6
4697 else
4698   if test -n "$ac_ct_RANLIB"; then
4699   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4700 else
4701   ac_save_IFS=$IFS; IFS=$ac_path_separator
4702 ac_dummy="$PATH"
4703 for ac_dir in $ac_dummy; do
4704   IFS=$ac_save_IFS
4705   test -z "$ac_dir" && ac_dir=.
4706   $as_executable_p "$ac_dir/$ac_word" || continue
4707 ac_cv_prog_ac_ct_RANLIB="ranlib"
4708 echo "$as_me:4708: found $ac_dir/$ac_word" >&5
4709 break
4710 done
4711
4712   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4713 fi
4714 fi
4715 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4716 if test -n "$ac_ct_RANLIB"; then
4717   echo "$as_me:4717: result: $ac_ct_RANLIB" >&5
4718 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4719 else
4720   echo "$as_me:4720: result: no" >&5
4721 echo "${ECHO_T}no" >&6
4722 fi
4723
4724   RANLIB=$ac_ct_RANLIB
4725 else
4726   RANLIB="$ac_cv_prog_RANLIB"
4727 fi
4728
4729 if test -n "$ac_tool_prefix"; then
4730   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4731 set dummy ${ac_tool_prefix}ld; ac_word=$2
4732 echo "$as_me:4732: checking for $ac_word" >&5
4733 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4734 if test "${ac_cv_prog_LD+set}" = set; then
4735   echo $ECHO_N "(cached) $ECHO_C" >&6
4736 else
4737   if test -n "$LD"; then
4738   ac_cv_prog_LD="$LD" # Let the user override the test.
4739 else
4740   ac_save_IFS=$IFS; IFS=$ac_path_separator
4741 ac_dummy="$PATH"
4742 for ac_dir in $ac_dummy; do
4743   IFS=$ac_save_IFS
4744   test -z "$ac_dir" && ac_dir=.
4745   $as_executable_p "$ac_dir/$ac_word" || continue
4746 ac_cv_prog_LD="${ac_tool_prefix}ld"
4747 echo "$as_me:4747: found $ac_dir/$ac_word" >&5
4748 break
4749 done
4750
4751 fi
4752 fi
4753 LD=$ac_cv_prog_LD
4754 if test -n "$LD"; then
4755   echo "$as_me:4755: result: $LD" >&5
4756 echo "${ECHO_T}$LD" >&6
4757 else
4758   echo "$as_me:4758: result: no" >&5
4759 echo "${ECHO_T}no" >&6
4760 fi
4761
4762 fi
4763 if test -z "$ac_cv_prog_LD"; then
4764   ac_ct_LD=$LD
4765   # Extract the first word of "ld", so it can be a program name with args.
4766 set dummy ld; ac_word=$2
4767 echo "$as_me:4767: checking for $ac_word" >&5
4768 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4769 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4770   echo $ECHO_N "(cached) $ECHO_C" >&6
4771 else
4772   if test -n "$ac_ct_LD"; then
4773   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4774 else
4775   ac_save_IFS=$IFS; IFS=$ac_path_separator
4776 ac_dummy="$PATH"
4777 for ac_dir in $ac_dummy; do
4778   IFS=$ac_save_IFS
4779   test -z "$ac_dir" && ac_dir=.
4780   $as_executable_p "$ac_dir/$ac_word" || continue
4781 ac_cv_prog_ac_ct_LD="ld"
4782 echo "$as_me:4782: found $ac_dir/$ac_word" >&5
4783 break
4784 done
4785
4786   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4787 fi
4788 fi
4789 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4790 if test -n "$ac_ct_LD"; then
4791   echo "$as_me:4791: result: $ac_ct_LD" >&5
4792 echo "${ECHO_T}$ac_ct_LD" >&6
4793 else
4794   echo "$as_me:4794: result: no" >&5
4795 echo "${ECHO_T}no" >&6
4796 fi
4797
4798   LD=$ac_ct_LD
4799 else
4800   LD="$ac_cv_prog_LD"
4801 fi
4802
4803 if test -n "$ac_tool_prefix"; then
4804   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4805 set dummy ${ac_tool_prefix}ar; ac_word=$2
4806 echo "$as_me:4806: checking for $ac_word" >&5
4807 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4808 if test "${ac_cv_prog_AR+set}" = set; then
4809   echo $ECHO_N "(cached) $ECHO_C" >&6
4810 else
4811   if test -n "$AR"; then
4812   ac_cv_prog_AR="$AR" # Let the user override the test.
4813 else
4814   ac_save_IFS=$IFS; IFS=$ac_path_separator
4815 ac_dummy="$PATH"
4816 for ac_dir in $ac_dummy; do
4817   IFS=$ac_save_IFS
4818   test -z "$ac_dir" && ac_dir=.
4819   $as_executable_p "$ac_dir/$ac_word" || continue
4820 ac_cv_prog_AR="${ac_tool_prefix}ar"
4821 echo "$as_me:4821: found $ac_dir/$ac_word" >&5
4822 break
4823 done
4824
4825 fi
4826 fi
4827 AR=$ac_cv_prog_AR
4828 if test -n "$AR"; then
4829   echo "$as_me:4829: result: $AR" >&5
4830 echo "${ECHO_T}$AR" >&6
4831 else
4832   echo "$as_me:4832: result: no" >&5
4833 echo "${ECHO_T}no" >&6
4834 fi
4835
4836 fi
4837 if test -z "$ac_cv_prog_AR"; then
4838   ac_ct_AR=$AR
4839   # Extract the first word of "ar", so it can be a program name with args.
4840 set dummy ar; ac_word=$2
4841 echo "$as_me:4841: checking for $ac_word" >&5
4842 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4843 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4844   echo $ECHO_N "(cached) $ECHO_C" >&6
4845 else
4846   if test -n "$ac_ct_AR"; then
4847   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4848 else
4849   ac_save_IFS=$IFS; IFS=$ac_path_separator
4850 ac_dummy="$PATH"
4851 for ac_dir in $ac_dummy; do
4852   IFS=$ac_save_IFS
4853   test -z "$ac_dir" && ac_dir=.
4854   $as_executable_p "$ac_dir/$ac_word" || continue
4855 ac_cv_prog_ac_ct_AR="ar"
4856 echo "$as_me:4856: found $ac_dir/$ac_word" >&5
4857 break
4858 done
4859
4860   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4861 fi
4862 fi
4863 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4864 if test -n "$ac_ct_AR"; then
4865   echo "$as_me:4865: result: $ac_ct_AR" >&5
4866 echo "${ECHO_T}$ac_ct_AR" >&6
4867 else
4868   echo "$as_me:4868: result: no" >&5
4869 echo "${ECHO_T}no" >&6
4870 fi
4871
4872   AR=$ac_ct_AR
4873 else
4874   AR="$ac_cv_prog_AR"
4875 fi
4876
4877 if test -n "$ac_tool_prefix"; then
4878   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4879 set dummy ${ac_tool_prefix}nm; ac_word=$2
4880 echo "$as_me:4880: checking for $ac_word" >&5
4881 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4882 if test "${ac_cv_prog_NM+set}" = set; then
4883   echo $ECHO_N "(cached) $ECHO_C" >&6
4884 else
4885   if test -n "$NM"; then
4886   ac_cv_prog_NM="$NM" # Let the user override the test.
4887 else
4888   ac_save_IFS=$IFS; IFS=$ac_path_separator
4889 ac_dummy="$PATH"
4890 for ac_dir in $ac_dummy; do
4891   IFS=$ac_save_IFS
4892   test -z "$ac_dir" && ac_dir=.
4893   $as_executable_p "$ac_dir/$ac_word" || continue
4894 ac_cv_prog_NM="${ac_tool_prefix}nm"
4895 echo "$as_me:4895: found $ac_dir/$ac_word" >&5
4896 break
4897 done
4898
4899 fi
4900 fi
4901 NM=$ac_cv_prog_NM
4902 if test -n "$NM"; then
4903   echo "$as_me:4903: result: $NM" >&5
4904 echo "${ECHO_T}$NM" >&6
4905 else
4906   echo "$as_me:4906: result: no" >&5
4907 echo "${ECHO_T}no" >&6
4908 fi
4909
4910 fi
4911 if test -z "$ac_cv_prog_NM"; then
4912   ac_ct_NM=$NM
4913   # Extract the first word of "nm", so it can be a program name with args.
4914 set dummy nm; ac_word=$2
4915 echo "$as_me:4915: checking for $ac_word" >&5
4916 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4917 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4918   echo $ECHO_N "(cached) $ECHO_C" >&6
4919 else
4920   if test -n "$ac_ct_NM"; then
4921   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4922 else
4923   ac_save_IFS=$IFS; IFS=$ac_path_separator
4924 ac_dummy="$PATH"
4925 for ac_dir in $ac_dummy; do
4926   IFS=$ac_save_IFS
4927   test -z "$ac_dir" && ac_dir=.
4928   $as_executable_p "$ac_dir/$ac_word" || continue
4929 ac_cv_prog_ac_ct_NM="nm"
4930 echo "$as_me:4930: found $ac_dir/$ac_word" >&5
4931 break
4932 done
4933
4934   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4935 fi
4936 fi
4937 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4938 if test -n "$ac_ct_NM"; then
4939   echo "$as_me:4939: result: $ac_ct_NM" >&5
4940 echo "${ECHO_T}$ac_ct_NM" >&6
4941 else
4942   echo "$as_me:4942: result: no" >&5
4943 echo "${ECHO_T}no" >&6
4944 fi
4945
4946   NM=$ac_ct_NM
4947 else
4948   NM="$ac_cv_prog_NM"
4949 fi
4950
4951 if test -n "$ac_tool_prefix"; then
4952   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4953 set dummy ${ac_tool_prefix}ar; ac_word=$2
4954 echo "$as_me:4954: checking for $ac_word" >&5
4955 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4956 if test "${ac_cv_prog_AR+set}" = set; then
4957   echo $ECHO_N "(cached) $ECHO_C" >&6
4958 else
4959   if test -n "$AR"; then
4960   ac_cv_prog_AR="$AR" # Let the user override the test.
4961 else
4962   ac_save_IFS=$IFS; IFS=$ac_path_separator
4963 ac_dummy="$PATH"
4964 for ac_dir in $ac_dummy; do
4965   IFS=$ac_save_IFS
4966   test -z "$ac_dir" && ac_dir=.
4967   $as_executable_p "$ac_dir/$ac_word" || continue
4968 ac_cv_prog_AR="${ac_tool_prefix}ar"
4969 echo "$as_me:4969: found $ac_dir/$ac_word" >&5
4970 break
4971 done
4972
4973 fi
4974 fi
4975 AR=$ac_cv_prog_AR
4976 if test -n "$AR"; then
4977   echo "$as_me:4977: result: $AR" >&5
4978 echo "${ECHO_T}$AR" >&6
4979 else
4980   echo "$as_me:4980: result: no" >&5
4981 echo "${ECHO_T}no" >&6
4982 fi
4983
4984 fi
4985 if test -z "$ac_cv_prog_AR"; then
4986   ac_ct_AR=$AR
4987   # Extract the first word of "ar", so it can be a program name with args.
4988 set dummy ar; ac_word=$2
4989 echo "$as_me:4989: checking for $ac_word" >&5
4990 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4991 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4992   echo $ECHO_N "(cached) $ECHO_C" >&6
4993 else
4994   if test -n "$ac_ct_AR"; then
4995   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4996 else
4997   ac_save_IFS=$IFS; IFS=$ac_path_separator
4998 ac_dummy="$PATH"
4999 for ac_dir in $ac_dummy; do
5000   IFS=$ac_save_IFS
5001   test -z "$ac_dir" && ac_dir=.
5002   $as_executable_p "$ac_dir/$ac_word" || continue
5003 ac_cv_prog_ac_ct_AR="ar"
5004 echo "$as_me:5004: found $ac_dir/$ac_word" >&5
5005 break
5006 done
5007
5008   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5009 fi
5010 fi
5011 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5012 if test -n "$ac_ct_AR"; then
5013   echo "$as_me:5013: result: $ac_ct_AR" >&5
5014 echo "${ECHO_T}$ac_ct_AR" >&6
5015 else
5016   echo "$as_me:5016: result: no" >&5
5017 echo "${ECHO_T}no" >&6
5018 fi
5019
5020   AR=$ac_ct_AR
5021 else
5022   AR="$ac_cv_prog_AR"
5023 fi
5024
5025 echo "$as_me:5025: checking for options to update archives" >&5
5026 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5027 if test "${cf_cv_ar_flags+set}" = set; then
5028   echo $ECHO_N "(cached) $ECHO_C" >&6
5029 else
5030
5031         case "$cf_cv_system_name" in
5032         (*-msvc*)
5033                 cf_cv_ar_flags=''
5034                 cat >mk_static_lib.sh <<-EOF
5035                 #!$SHELL
5036                 MSVC_BIN="$AR"
5037                 out="\$1"
5038                 shift
5039                 exec \$MSVC_BIN -out:"\$out" \$@
5040                 EOF
5041                 chmod +x mk_static_lib.sh
5042                 AR=`pwd`/mk_static_lib.sh
5043                 ;;
5044         (*)
5045                 cf_cv_ar_flags=unknown
5046                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5047                 do
5048
5049                         # check if $ARFLAGS already contains this choice
5050                         if test "x$ARFLAGS" != "x" ; then
5051                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5052                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5053                                         cf_cv_ar_flags=
5054                                         break
5055                                 fi
5056                         fi
5057
5058                         rm -f "conftest.$ac_cv_objext"
5059                         rm -f conftest.a
5060
5061                         cat >"conftest.$ac_ext" <<EOF
5062 #line 5062 "configure"
5063 int     testdata[3] = { 123, 456, 789 };
5064 EOF
5065                         if { (eval echo "$as_me:5065: \"$ac_compile\"") >&5
5066   (eval $ac_compile) 2>&5
5067   ac_status=$?
5068   echo "$as_me:5068: \$? = $ac_status" >&5
5069   (exit "$ac_status"); } ; then
5070                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5071                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5072                                 if test -f conftest.a ; then
5073                                         cf_cv_ar_flags="$cf_ar_flags"
5074                                         break
5075                                 fi
5076                         else
5077                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5078
5079 echo "${as_me:-configure}:5079: testing cannot compile test-program ..." 1>&5
5080
5081                                 break
5082                         fi
5083                 done
5084                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5085                 ;;
5086         esac
5087
5088 fi
5089 echo "$as_me:5089: result: $cf_cv_ar_flags" >&5
5090 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5091
5092 if test -n "$ARFLAGS" ; then
5093         if test -n "$cf_cv_ar_flags" ; then
5094                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5095         fi
5096 else
5097         ARFLAGS=$cf_cv_ar_flags
5098 fi
5099
5100 echo "$as_me:5100: checking if you have specified an install-prefix" >&5
5101 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5102
5103 # Check whether --with-install-prefix or --without-install-prefix was given.
5104 if test "${with_install_prefix+set}" = set; then
5105   withval="$with_install_prefix"
5106   case "x$withval" in
5107         (xyes|xno)
5108                 ;;
5109         (*)     DESTDIR="$withval"
5110                 ;;
5111         esac
5112 fi;
5113 echo "$as_me:5113: result: $DESTDIR" >&5
5114 echo "${ECHO_T}$DESTDIR" >&6
5115
5116 ###############################################################################
5117
5118 # If we're cross-compiling, allow the user to override the tools and their
5119 # options.  The configure script is oriented toward identifying the host
5120 # compiler, etc., but we need a build compiler to generate parts of the source.
5121
5122 case "$cf_cv_system_name" in
5123 (*-msvc*)
5124         LDFLAGS="$LDFLAGS user32.lib"
5125         export LDFLAGS
5126         ;;
5127 esac
5128
5129 if test "$cross_compiling" = yes ; then
5130
5131         # defaults that we might want to override
5132         : ${BUILD_CFLAGS:=''}
5133         : ${BUILD_CPPFLAGS:=''}
5134         : ${BUILD_LDFLAGS:=''}
5135         : ${BUILD_LIBS:=''}
5136         : ${BUILD_EXEEXT:='$x'}
5137         : ${BUILD_OBJEXT:='o'}
5138
5139 # Check whether --with-build-cc or --without-build-cc was given.
5140 if test "${with_build_cc+set}" = set; then
5141   withval="$with_build_cc"
5142   BUILD_CC="$withval"
5143 else
5144   for ac_prog in gcc clang c99 c89 cc cl
5145 do
5146   # Extract the first word of "$ac_prog", so it can be a program name with args.
5147 set dummy $ac_prog; ac_word=$2
5148 echo "$as_me:5148: checking for $ac_word" >&5
5149 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5150 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5151   echo $ECHO_N "(cached) $ECHO_C" >&6
5152 else
5153   if test -n "$BUILD_CC"; then
5154   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5155 else
5156   ac_save_IFS=$IFS; IFS=$ac_path_separator
5157 ac_dummy="$PATH"
5158 for ac_dir in $ac_dummy; do
5159   IFS=$ac_save_IFS
5160   test -z "$ac_dir" && ac_dir=.
5161   $as_executable_p "$ac_dir/$ac_word" || continue
5162 ac_cv_prog_BUILD_CC="$ac_prog"
5163 echo "$as_me:5163: found $ac_dir/$ac_word" >&5
5164 break
5165 done
5166
5167 fi
5168 fi
5169 BUILD_CC=$ac_cv_prog_BUILD_CC
5170 if test -n "$BUILD_CC"; then
5171   echo "$as_me:5171: result: $BUILD_CC" >&5
5172 echo "${ECHO_T}$BUILD_CC" >&6
5173 else
5174   echo "$as_me:5174: result: no" >&5
5175 echo "${ECHO_T}no" >&6
5176 fi
5177
5178   test -n "$BUILD_CC" && break
5179 done
5180 test -n "$BUILD_CC" || BUILD_CC="none"
5181
5182 fi;
5183         echo "$as_me:5183: checking for native build C compiler" >&5
5184 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5185         echo "$as_me:5185: result: $BUILD_CC" >&5
5186 echo "${ECHO_T}$BUILD_CC" >&6
5187
5188         echo "$as_me:5188: checking for native build C preprocessor" >&5
5189 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5190
5191 # Check whether --with-build-cpp or --without-build-cpp was given.
5192 if test "${with_build_cpp+set}" = set; then
5193   withval="$with_build_cpp"
5194   BUILD_CPP="$withval"
5195 else
5196   BUILD_CPP='${BUILD_CC} -E'
5197 fi;
5198         echo "$as_me:5198: result: $BUILD_CPP" >&5
5199 echo "${ECHO_T}$BUILD_CPP" >&6
5200
5201         echo "$as_me:5201: checking for native build C flags" >&5
5202 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5203
5204 # Check whether --with-build-cflags or --without-build-cflags was given.
5205 if test "${with_build_cflags+set}" = set; then
5206   withval="$with_build_cflags"
5207   BUILD_CFLAGS="$withval"
5208 fi;
5209         echo "$as_me:5209: result: $BUILD_CFLAGS" >&5
5210 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5211
5212         echo "$as_me:5212: checking for native build C preprocessor-flags" >&5
5213 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5214
5215 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5216 if test "${with_build_cppflags+set}" = set; then
5217   withval="$with_build_cppflags"
5218   BUILD_CPPFLAGS="$withval"
5219 fi;
5220         echo "$as_me:5220: result: $BUILD_CPPFLAGS" >&5
5221 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5222
5223         echo "$as_me:5223: checking for native build linker-flags" >&5
5224 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5225
5226 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5227 if test "${with_build_ldflags+set}" = set; then
5228   withval="$with_build_ldflags"
5229   BUILD_LDFLAGS="$withval"
5230 fi;
5231         echo "$as_me:5231: result: $BUILD_LDFLAGS" >&5
5232 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5233
5234         echo "$as_me:5234: checking for native build linker-libraries" >&5
5235 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5236
5237 # Check whether --with-build-libs or --without-build-libs was given.
5238 if test "${with_build_libs+set}" = set; then
5239   withval="$with_build_libs"
5240   BUILD_LIBS="$withval"
5241 fi;
5242         echo "$as_me:5242: result: $BUILD_LIBS" >&5
5243 echo "${ECHO_T}$BUILD_LIBS" >&6
5244
5245         # this assumes we're on Unix.
5246         BUILD_EXEEXT=
5247         BUILD_OBJEXT=o
5248
5249         : ${BUILD_CC:='${CC}'}
5250
5251         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5252                 { { echo "$as_me:5252: error: Cross-build requires two compilers.
5253 Use --with-build-cc to specify the native compiler." >&5
5254 echo "$as_me: error: Cross-build requires two compilers.
5255 Use --with-build-cc to specify the native compiler." >&2;}
5256    { (exit 1); exit 1; }; }
5257         fi
5258
5259 else
5260         : ${BUILD_CC:='${CC}'}
5261         : ${BUILD_CPP:='${CPP}'}
5262         : ${BUILD_CFLAGS:='${CFLAGS}'}
5263         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5264         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5265         : ${BUILD_LIBS:='${LIBS}'}
5266         : ${BUILD_EXEEXT:='$x'}
5267         : ${BUILD_OBJEXT:='o'}
5268 fi
5269
5270 ###############################################################################
5271
5272 ### Options to allow the user to specify the set of libraries which are used.
5273 ### Use "--without-normal --with-shared" to allow the default model to be
5274 ### shared, for example.
5275 cf_list_models=""
5276
5277 echo "$as_me:5277: checking if libtool -version-number should be used" >&5
5278 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5279
5280 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5281 if test "${enable_libtool_version+set}" = set; then
5282   enableval="$enable_libtool_version"
5283   test "$enableval" != no && enableval=yes
5284         if test "$enableval" != "yes" ; then
5285     cf_libtool_version=no
5286         else
5287                 cf_libtool_version=yes
5288         fi
5289 else
5290   enableval=yes
5291         cf_libtool_version=yes
5292
5293 fi;
5294 echo "$as_me:5294: result: $cf_libtool_version" >&5
5295 echo "${ECHO_T}$cf_libtool_version" >&6
5296
5297 if test "$cf_libtool_version" = yes ; then
5298         LIBTOOL_VERSION="-version-number"
5299 else
5300         LIBTOOL_VERSION="-version-info"
5301         case "x$VERSION" in
5302         (x)
5303                 { echo "$as_me:5303: WARNING: VERSION was not set" >&5
5304 echo "$as_me: WARNING: VERSION was not set" >&2;}
5305                 ;;
5306         (x*.*.*)
5307                 ABI_VERSION="$VERSION"
5308                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5309
5310 echo "${as_me:-configure}:5310: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5311
5312                 ;;
5313         (x*:*:*)
5314                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5315                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5316
5317 echo "${as_me:-configure}:5317: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5318
5319                 ;;
5320         (*)
5321                 { echo "$as_me:5321: WARNING: unexpected VERSION value: $VERSION" >&5
5322 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5323                 ;;
5324         esac
5325 fi
5326
5327 LIBTOOL=
5328
5329 # common library maintenance symbols that are convenient for libtool scripts:
5330 LIB_CREATE='${AR} -cr'
5331 LIB_OBJECT='${OBJECTS}'
5332 LIB_SUFFIX=.a
5333 LIB_PREP="$RANLIB"
5334
5335 # symbols used to prop libtool up to enable it to determine what it should be
5336 # doing:
5337 LIB_CLEAN=
5338 LIB_COMPILE=
5339 LIB_LINK='${CC}'
5340 LIB_INSTALL=
5341 LIB_UNINSTALL=
5342
5343 echo "$as_me:5343: checking if you want to build libraries with libtool" >&5
5344 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5345
5346 # Check whether --with-libtool or --without-libtool was given.
5347 if test "${with_libtool+set}" = set; then
5348   withval="$with_libtool"
5349   with_libtool=$withval
5350 else
5351   with_libtool=no
5352 fi;
5353 echo "$as_me:5353: result: $with_libtool" >&5
5354 echo "${ECHO_T}$with_libtool" >&6
5355 if test "$with_libtool" != "no"; then
5356
5357         if test "$with_libtool" != "yes" ; then
5358
5359 if test "x$prefix" != xNONE; then
5360         cf_path_syntax="$prefix"
5361 else
5362         cf_path_syntax="$ac_default_prefix"
5363 fi
5364
5365 case ".$with_libtool" in
5366 (.\$\(*\)*|.\'*\'*)
5367         ;;
5368 (..|./*|.\\*)
5369         ;;
5370 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5371         ;;
5372 (.\$\{*prefix\}*|.\$\{*dir\}*)
5373         eval with_libtool="$with_libtool"
5374         case ".$with_libtool" in
5375         (.NONE/*)
5376                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5377                 ;;
5378         esac
5379         ;;
5380 (.no|.NONE/*)
5381         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5382         ;;
5383 (*)
5384         { { echo "$as_me:5384: error: expected a pathname, not \"$with_libtool\"" >&5
5385 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5386    { (exit 1); exit 1; }; }
5387         ;;
5388 esac
5389
5390                 LIBTOOL=$with_libtool
5391         else
5392                 if test -n "$ac_tool_prefix"; then
5393   for ac_prog in libtool glibtool
5394   do
5395     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5396 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5397 echo "$as_me:5397: checking for $ac_word" >&5
5398 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5399 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5400   echo $ECHO_N "(cached) $ECHO_C" >&6
5401 else
5402   if test -n "$LIBTOOL"; then
5403   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5404 else
5405   ac_save_IFS=$IFS; IFS=$ac_path_separator
5406 ac_dummy="$PATH"
5407 for ac_dir in $ac_dummy; do
5408   IFS=$ac_save_IFS
5409   test -z "$ac_dir" && ac_dir=.
5410   $as_executable_p "$ac_dir/$ac_word" || continue
5411 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5412 echo "$as_me:5412: found $ac_dir/$ac_word" >&5
5413 break
5414 done
5415
5416 fi
5417 fi
5418 LIBTOOL=$ac_cv_prog_LIBTOOL
5419 if test -n "$LIBTOOL"; then
5420   echo "$as_me:5420: result: $LIBTOOL" >&5
5421 echo "${ECHO_T}$LIBTOOL" >&6
5422 else
5423   echo "$as_me:5423: result: no" >&5
5424 echo "${ECHO_T}no" >&6
5425 fi
5426
5427     test -n "$LIBTOOL" && break
5428   done
5429 fi
5430 if test -z "$LIBTOOL"; then
5431   ac_ct_LIBTOOL=$LIBTOOL
5432   for ac_prog in libtool glibtool
5433 do
5434   # Extract the first word of "$ac_prog", so it can be a program name with args.
5435 set dummy $ac_prog; ac_word=$2
5436 echo "$as_me:5436: checking for $ac_word" >&5
5437 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5438 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5439   echo $ECHO_N "(cached) $ECHO_C" >&6
5440 else
5441   if test -n "$ac_ct_LIBTOOL"; then
5442   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5443 else
5444   ac_save_IFS=$IFS; IFS=$ac_path_separator
5445 ac_dummy="$PATH"
5446 for ac_dir in $ac_dummy; do
5447   IFS=$ac_save_IFS
5448   test -z "$ac_dir" && ac_dir=.
5449   $as_executable_p "$ac_dir/$ac_word" || continue
5450 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5451 echo "$as_me:5451: found $ac_dir/$ac_word" >&5
5452 break
5453 done
5454
5455 fi
5456 fi
5457 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5458 if test -n "$ac_ct_LIBTOOL"; then
5459   echo "$as_me:5459: result: $ac_ct_LIBTOOL" >&5
5460 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5461 else
5462   echo "$as_me:5462: result: no" >&5
5463 echo "${ECHO_T}no" >&6
5464 fi
5465
5466   test -n "$ac_ct_LIBTOOL" && break
5467 done
5468 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5469
5470   LIBTOOL=$ac_ct_LIBTOOL
5471 fi
5472
5473 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5474 then
5475         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.].*//'`
5476 else
5477         cf_cv_libtool_version=
5478 fi
5479 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5480
5481                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5482                 then
5483
5484 unset ac_cv_prog_ac_ct_LIBTOOL
5485 unset ac_ct_LIBTOOL
5486 unset LIBTOOL
5487
5488                         if test -n "$ac_tool_prefix"; then
5489   for ac_prog in glibtool
5490   do
5491     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5492 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5493 echo "$as_me:5493: checking for $ac_word" >&5
5494 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5495 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5496   echo $ECHO_N "(cached) $ECHO_C" >&6
5497 else
5498   if test -n "$LIBTOOL"; then
5499   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5500 else
5501   ac_save_IFS=$IFS; IFS=$ac_path_separator
5502 ac_dummy="$PATH"
5503 for ac_dir in $ac_dummy; do
5504   IFS=$ac_save_IFS
5505   test -z "$ac_dir" && ac_dir=.
5506   $as_executable_p "$ac_dir/$ac_word" || continue
5507 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5508 echo "$as_me:5508: found $ac_dir/$ac_word" >&5
5509 break
5510 done
5511
5512 fi
5513 fi
5514 LIBTOOL=$ac_cv_prog_LIBTOOL
5515 if test -n "$LIBTOOL"; then
5516   echo "$as_me:5516: result: $LIBTOOL" >&5
5517 echo "${ECHO_T}$LIBTOOL" >&6
5518 else
5519   echo "$as_me:5519: result: no" >&5
5520 echo "${ECHO_T}no" >&6
5521 fi
5522
5523     test -n "$LIBTOOL" && break
5524   done
5525 fi
5526 if test -z "$LIBTOOL"; then
5527   ac_ct_LIBTOOL=$LIBTOOL
5528   for ac_prog in glibtool
5529 do
5530   # Extract the first word of "$ac_prog", so it can be a program name with args.
5531 set dummy $ac_prog; ac_word=$2
5532 echo "$as_me:5532: checking for $ac_word" >&5
5533 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5534 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5535   echo $ECHO_N "(cached) $ECHO_C" >&6
5536 else
5537   if test -n "$ac_ct_LIBTOOL"; then
5538   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5539 else
5540   ac_save_IFS=$IFS; IFS=$ac_path_separator
5541 ac_dummy="$PATH"
5542 for ac_dir in $ac_dummy; do
5543   IFS=$ac_save_IFS
5544   test -z "$ac_dir" && ac_dir=.
5545   $as_executable_p "$ac_dir/$ac_word" || continue
5546 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5547 echo "$as_me:5547: found $ac_dir/$ac_word" >&5
5548 break
5549 done
5550
5551 fi
5552 fi
5553 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5554 if test -n "$ac_ct_LIBTOOL"; then
5555   echo "$as_me:5555: result: $ac_ct_LIBTOOL" >&5
5556 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5557 else
5558   echo "$as_me:5558: result: no" >&5
5559 echo "${ECHO_T}no" >&6
5560 fi
5561
5562   test -n "$ac_ct_LIBTOOL" && break
5563 done
5564 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5565
5566   LIBTOOL=$ac_ct_LIBTOOL
5567 fi
5568
5569 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5570 then
5571         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.].*//'`
5572 else
5573         cf_cv_libtool_version=
5574 fi
5575 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5576
5577                 fi
5578         fi
5579         if test -z "$LIBTOOL" ; then
5580                 { { echo "$as_me:5580: error: Cannot find libtool" >&5
5581 echo "$as_me: error: Cannot find libtool" >&2;}
5582    { (exit 1); exit 1; }; }
5583         fi
5584         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5585         LIB_OBJECT='${OBJECTS:.o=.lo}'
5586         LIB_SUFFIX=.la
5587         LIB_CLEAN='${LIBTOOL} --mode=clean'
5588         LIB_COMPILE='${LIBTOOL} --mode=compile'
5589         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5590         LIB_INSTALL='${LIBTOOL} --mode=install'
5591         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5592         LIB_PREP=:
5593
5594 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5595 then
5596         echo "$as_me:5596: checking version of $LIBTOOL" >&5
5597 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5598
5599 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5600 then
5601         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.].*//'`
5602 else
5603         cf_cv_libtool_version=
5604 fi
5605 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5606
5607         echo "$as_me:5607: result: $cf_cv_libtool_version" >&5
5608 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5609         if test -n "$cf_cv_libtool_version"
5610         then
5611                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5612                 case "x$cf_check_libtool_version" in
5613                 (*...GNU-libtool...*)
5614                         ;;
5615                 (*)
5616                         { { echo "$as_me:5616: error: This is not GNU libtool" >&5
5617 echo "$as_me: error: This is not GNU libtool" >&2;}
5618    { (exit 1); exit 1; }; }
5619                         ;;
5620                 esac
5621         else
5622                 { { echo "$as_me:5622: error: No version found for $LIBTOOL" >&5
5623 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5624    { (exit 1); exit 1; }; }
5625         fi
5626 else
5627         { { echo "$as_me:5627: error: GNU libtool has not been found" >&5
5628 echo "$as_me: error: GNU libtool has not been found" >&2;}
5629    { (exit 1); exit 1; }; }
5630 fi
5631
5632         # special hack to add -no-undefined (which libtool should do for itself)
5633         LT_UNDEF=
5634         case "$cf_cv_system_name" in
5635         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5636                 LT_UNDEF=-no-undefined
5637                 ;;
5638         esac
5639
5640         # special hack to add --tag option for C++ compiler
5641         case "$cf_cv_libtool_version" in
5642         (1.[5-9]*|[2-9].[0-9.a-z]*)
5643                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5644                 LIBTOOL="$LIBTOOL --tag=CC"
5645                 ;;
5646         (*)
5647                 LIBTOOL_CXX="$LIBTOOL"
5648                 ;;
5649         esac
5650 else
5651         LIBTOOL=""
5652         LIBTOOL_CXX=""
5653 fi
5654
5655 test -z "$LIBTOOL" && ECHO_LT=
5656
5657 if test "$with_libtool" != "no" ; then
5658
5659 cf_list_models="$cf_list_models libtool"
5660
5661 else
5662
5663 echo "$as_me:5663: checking if you want to build shared libraries" >&5
5664 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5665
5666 # Check whether --with-shared or --without-shared was given.
5667 if test "${with_shared+set}" = set; then
5668   withval="$with_shared"
5669   with_shared=$withval
5670 else
5671   with_shared=no
5672 fi;
5673 echo "$as_me:5673: result: $with_shared" >&5
5674 echo "${ECHO_T}$with_shared" >&6
5675 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5676
5677 echo "$as_me:5677: checking if you want to build static libraries" >&5
5678 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5679
5680 # Check whether --with-normal or --without-normal was given.
5681 if test "${with_normal+set}" = set; then
5682   withval="$with_normal"
5683   with_normal=$withval
5684 else
5685   with_normal=yes
5686 fi;
5687 echo "$as_me:5687: result: $with_normal" >&5
5688 echo "${ECHO_T}$with_normal" >&6
5689 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5690
5691 echo "$as_me:5691: checking if you want to build debug libraries" >&5
5692 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5693
5694 # Check whether --with-debug or --without-debug was given.
5695 if test "${with_debug+set}" = set; then
5696   withval="$with_debug"
5697   with_debug=$withval
5698 else
5699   with_debug=yes
5700 fi;
5701 echo "$as_me:5701: result: $with_debug" >&5
5702 echo "${ECHO_T}$with_debug" >&6
5703 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5704
5705 echo "$as_me:5705: checking if you want to build profiling libraries" >&5
5706 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5707
5708 # Check whether --with-profile or --without-profile was given.
5709 if test "${with_profile+set}" = set; then
5710   withval="$with_profile"
5711   with_profile=$withval
5712 else
5713   with_profile=no
5714 fi;
5715 echo "$as_me:5715: result: $with_profile" >&5
5716 echo "${ECHO_T}$with_profile" >&6
5717 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5718
5719 fi
5720
5721 if test "X$cf_with_cxx_binding" != Xno; then
5722 if test "x$with_shared" = "xyes"; then
5723 echo "$as_me:5723: checking if you want to build C++ shared libraries" >&5
5724 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5725
5726 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5727 if test "${with_cxx_shared+set}" = set; then
5728   withval="$with_cxx_shared"
5729   with_shared_cxx=$withval
5730 else
5731   with_shared_cxx=no
5732 fi;
5733 echo "$as_me:5733: result: $with_shared_cxx" >&5
5734 echo "${ECHO_T}$with_shared_cxx" >&6
5735 fi
5736 fi
5737
5738 ###############################################################################
5739
5740 echo "$as_me:5740: checking for specified models" >&5
5741 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5742 test -z "$cf_list_models" && cf_list_models=normal
5743 test "$with_libtool" != "no" && cf_list_models=libtool
5744 echo "$as_me:5744: result: $cf_list_models" >&5
5745 echo "${ECHO_T}$cf_list_models" >&6
5746
5747 ### Use the first model as the default, and save its suffix for use in building
5748 ### up test-applications.
5749 echo "$as_me:5749: checking for default model" >&5
5750 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5751 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5752 echo "$as_me:5752: result: $DFT_LWR_MODEL" >&5
5753 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5754
5755 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5756
5757 TICS_NAME=tic
5758
5759 TINFO_NAME=tinfo
5760
5761 LIB_NAME=ncurses
5762
5763 LIB_DIR=../lib
5764 LIB_2ND=../../lib
5765
5766 echo "$as_me:5766: checking if you want to have a library-prefix" >&5
5767 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5768
5769 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5770 if test "${with_lib_prefix+set}" = set; then
5771   withval="$with_lib_prefix"
5772   with_lib_prefix=$withval
5773 else
5774   with_lib_prefix=auto
5775 fi;
5776 echo "$as_me:5776: result: $with_lib_prefix" >&5
5777 echo "${ECHO_T}$with_lib_prefix" >&6
5778
5779 if test "$with_lib_prefix" = auto
5780 then
5781
5782         case "$cf_cv_system_name" in
5783         (OS/2*|os2*)
5784                 if test "$DFT_LWR_MODEL" = libtool; then
5785                         LIB_PREFIX='lib'
5786                 else
5787                         LIB_PREFIX=''
5788                 fi
5789                 ;;
5790         (*-msvc*)
5791                 LIB_PREFIX=''
5792                 ;;
5793         (*)     LIB_PREFIX='lib'
5794                 ;;
5795         esac
5796 cf_prefix=$LIB_PREFIX
5797
5798 elif test "$with_lib_prefix" = no
5799 then
5800         LIB_PREFIX=
5801 else
5802         LIB_PREFIX=$with_lib_prefix
5803 fi
5804
5805 LIB_SUFFIX=
5806
5807         echo "$as_me:5807: checking for PATH separator" >&5
5808 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5809         case "$cf_cv_system_name" in
5810         (os2*)  PATH_SEPARATOR=';'  ;;
5811         (*)     ${PATH_SEPARATOR:=':'}  ;;
5812         esac
5813
5814         echo "$as_me:5814: result: $PATH_SEPARATOR" >&5
5815 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5816
5817 ###############################################################################
5818
5819 echo "$as_me:5819: checking if you want to build a separate terminfo library" >&5
5820 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5821
5822 # Check whether --with-termlib or --without-termlib was given.
5823 if test "${with_termlib+set}" = set; then
5824   withval="$with_termlib"
5825   with_termlib=$withval
5826 else
5827   with_termlib=no
5828 fi;
5829 echo "$as_me:5829: result: $with_termlib" >&5
5830 echo "${ECHO_T}$with_termlib" >&6
5831
5832 echo "$as_me:5832: checking if you want to build a separate tic library" >&5
5833 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5834
5835 # Check whether --with-ticlib or --without-ticlib was given.
5836 if test "${with_ticlib+set}" = set; then
5837   withval="$with_ticlib"
5838   with_ticlib=$withval
5839 else
5840   with_ticlib=no
5841 fi;
5842 echo "$as_me:5842: result: $with_ticlib" >&5
5843 echo "${ECHO_T}$with_ticlib" >&6
5844
5845 if test X"$CC_G_OPT" = X"" ; then
5846         CC_G_OPT='-g'
5847         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5848 fi
5849
5850 if test X"$CXX_G_OPT" = X"" ; then
5851         CXX_G_OPT='-g'
5852         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5853 fi
5854
5855 echo "$as_me:5855: checking for default loader flags" >&5
5856 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5857 case "$DFT_LWR_MODEL" in
5858 (libtool) LD_MODEL=''   ;;
5859 (normal)  LD_MODEL=''   ;;
5860 (debug)   LD_MODEL=$CC_G_OPT ;;
5861 (profile) LD_MODEL='-pg';;
5862 (shared)  LD_MODEL=''   ;;
5863 esac
5864 echo "$as_me:5864: result: $LD_MODEL" >&5
5865 echo "${ECHO_T}$LD_MODEL" >&6
5866
5867 case "$DFT_LWR_MODEL" in
5868 (shared)
5869
5870 echo "$as_me:5870: checking if rpath option should be used" >&5
5871 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5872
5873 # Check whether --enable-rpath or --disable-rpath was given.
5874 if test "${enable_rpath+set}" = set; then
5875   enableval="$enable_rpath"
5876   cf_cv_enable_rpath=$enableval
5877 else
5878   cf_cv_enable_rpath=no
5879 fi;
5880 echo "$as_me:5880: result: $cf_cv_enable_rpath" >&5
5881 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5882
5883 echo "$as_me:5883: checking if shared libraries should be relinked during install" >&5
5884 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5885
5886 # Check whether --enable-relink or --disable-relink was given.
5887 if test "${enable_relink+set}" = set; then
5888   enableval="$enable_relink"
5889   cf_cv_do_relink=$enableval
5890 else
5891   cf_cv_do_relink=yes
5892 fi;
5893 echo "$as_me:5893: result: $cf_cv_do_relink" >&5
5894 echo "${ECHO_T}$cf_cv_do_relink" >&6
5895         ;;
5896 esac
5897
5898 # we will build libraries one-level down.
5899 rel_builddir=..
5900
5901 LD_RPATH_OPT=
5902 if test "x$cf_cv_enable_rpath" != xno
5903 then
5904         echo "$as_me:5904: checking for an rpath option" >&5
5905 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5906         case "$cf_cv_system_name" in
5907         (irix*)
5908                 if test "$GCC" = yes; then
5909                         LD_RPATH_OPT="-Wl,-rpath,"
5910                 else
5911                         LD_RPATH_OPT="-rpath "
5912                 fi
5913                 ;;
5914         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5915                 LD_RPATH_OPT="-Wl,-rpath,"
5916                 ;;
5917         (openbsd[2-9].*|mirbsd*)
5918                 LD_RPATH_OPT="-Wl,-rpath,"
5919                 ;;
5920         (dragonfly*)
5921                 LD_RPATH_OPT="-rpath "
5922                 ;;
5923         (netbsd*)
5924                 LD_RPATH_OPT="-Wl,-rpath,"
5925                 ;;
5926         (osf*|mls+*)
5927                 LD_RPATH_OPT="-rpath "
5928                 ;;
5929         (solaris2*)
5930                 LD_RPATH_OPT="-R"
5931                 ;;
5932         (*)
5933                 ;;
5934         esac
5935         echo "$as_me:5935: result: $LD_RPATH_OPT" >&5
5936 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5937
5938         case "x$LD_RPATH_OPT" in
5939         (x-R*)
5940                 echo "$as_me:5940: checking if we need a space after rpath option" >&5
5941 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5942                 cf_save_LIBS="$LIBS"
5943
5944 cf_add_libs="$LIBS"
5945 # reverse order
5946 cf_add_0lib=
5947 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5948 # filter duplicates
5949 for cf_add_1lib in $cf_add_0lib; do
5950         for cf_add_2lib in $cf_add_libs; do
5951                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5952                         cf_add_1lib=
5953                         break
5954                 fi
5955         done
5956         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5957 done
5958 LIBS="$cf_add_libs"
5959
5960                 cat >"conftest.$ac_ext" <<_ACEOF
5961 #line 5961 "configure"
5962 #include "confdefs.h"
5963
5964 int
5965 main (void)
5966 {
5967
5968   ;
5969   return 0;
5970 }
5971 _ACEOF
5972 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5973 if { (eval echo "$as_me:5973: \"$ac_link\"") >&5
5974   (eval $ac_link) 2>&5
5975   ac_status=$?
5976   echo "$as_me:5976: \$? = $ac_status" >&5
5977   (exit "$ac_status"); } &&
5978          { ac_try='test -s "conftest$ac_exeext"'
5979   { (eval echo "$as_me:5979: \"$ac_try\"") >&5
5980   (eval $ac_try) 2>&5
5981   ac_status=$?
5982   echo "$as_me:5982: \$? = $ac_status" >&5
5983   (exit "$ac_status"); }; }; then
5984   cf_rpath_space=no
5985 else
5986   echo "$as_me: failed program was:" >&5
5987 cat "conftest.$ac_ext" >&5
5988 cf_rpath_space=yes
5989 fi
5990 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5991                 LIBS="$cf_save_LIBS"
5992                 echo "$as_me:5992: result: $cf_rpath_space" >&5
5993 echo "${ECHO_T}$cf_rpath_space" >&6
5994                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5995                 ;;
5996         esac
5997 fi
5998
5999         RM_SHARED_OPTS=
6000         LOCAL_LDFLAGS=
6001         LOCAL_LDFLAGS2=
6002         LD_SHARED_OPTS=
6003         INSTALL_LIB="-m 644"
6004         : ${rel_builddir:=.}
6005
6006         shlibdir=$libdir
6007
6008         MAKE_DLLS="#"
6009
6010         cf_cv_do_symlinks=no
6011         cf_ld_rpath_opt=
6012         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6013
6014         echo "$as_me:6014: checking if release/abi version should be used for shared libs" >&5
6015 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6016
6017 # Check whether --with-shlib-version or --without-shlib-version was given.
6018 if test "${with_shlib_version+set}" = set; then
6019   withval="$with_shlib_version"
6020   test -z "$withval" && withval=auto
6021         case "$withval" in
6022         (yes)
6023                 cf_cv_shlib_version=auto
6024                 ;;
6025         (rel|abi|auto)
6026                 cf_cv_shlib_version=$withval
6027                 ;;
6028         (*)
6029                 echo "$as_me:6029: result: $withval" >&5
6030 echo "${ECHO_T}$withval" >&6
6031                 { { echo "$as_me:6031: error: option value must be one of: rel, abi, or auto" >&5
6032 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6033    { (exit 1); exit 1; }; }
6034                 ;;
6035         esac
6036
6037 else
6038   cf_cv_shlib_version=auto
6039 fi;
6040         echo "$as_me:6040: result: $cf_cv_shlib_version" >&5
6041 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6042
6043         cf_cv_rm_so_locs=no
6044         cf_try_cflags=
6045
6046         # Some less-capable ports of gcc support only -fpic
6047         CC_SHARED_OPTS=
6048
6049         cf_try_fPIC=no
6050         if test "$GCC" = yes
6051         then
6052                 cf_try_fPIC=yes
6053         else
6054                 case "$cf_cv_system_name" in
6055                 (*linux*)       # e.g., PGI compiler
6056                         cf_try_fPIC=yes
6057                         ;;
6058                 esac
6059         fi
6060
6061         if test "$cf_try_fPIC" = yes
6062         then
6063                 echo "$as_me:6063: checking which $CC option to use" >&5
6064 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6065                 cf_save_CFLAGS="$CFLAGS"
6066                 for CC_SHARED_OPTS in -fPIC -fpic ''
6067                 do
6068                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6069                         cat >"conftest.$ac_ext" <<_ACEOF
6070 #line 6070 "configure"
6071 #include "confdefs.h"
6072 #include <stdio.h>
6073 int
6074 main (void)
6075 {
6076 int x = 1
6077   ;
6078   return 0;
6079 }
6080 _ACEOF
6081 rm -f "conftest.$ac_objext"
6082 if { (eval echo "$as_me:6082: \"$ac_compile\"") >&5
6083   (eval $ac_compile) 2>&5
6084   ac_status=$?
6085   echo "$as_me:6085: \$? = $ac_status" >&5
6086   (exit "$ac_status"); } &&
6087          { ac_try='test -s "conftest.$ac_objext"'
6088   { (eval echo "$as_me:6088: \"$ac_try\"") >&5
6089   (eval $ac_try) 2>&5
6090   ac_status=$?
6091   echo "$as_me:6091: \$? = $ac_status" >&5
6092   (exit "$ac_status"); }; }; then
6093   break
6094 else
6095   echo "$as_me: failed program was:" >&5
6096 cat "conftest.$ac_ext" >&5
6097 fi
6098 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6099                 done
6100                 echo "$as_me:6100: result: $CC_SHARED_OPTS" >&5
6101 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6102                 CFLAGS="$cf_save_CFLAGS"
6103         fi
6104
6105         cf_cv_shlib_version_infix=no
6106
6107         case "$cf_cv_system_name" in
6108         (aix4.3-9*|aix[5-7]*)
6109                 if test "$GCC" = yes; then
6110                         CC_SHARED_OPTS='-Wl,-brtl'
6111                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6112                 else
6113                         CC_SHARED_OPTS='-brtl'
6114                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6115                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6116                 fi
6117                 ;;
6118         (beos*)
6119                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6120                 ;;
6121         (cygwin*)
6122                 CC_SHARED_OPTS=
6123                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6124                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6125                 cf_cv_shlib_version=cygdll
6126                 cf_cv_shlib_version_infix=cygdll
6127                 shlibdir=$bindir
6128                 MAKE_DLLS=
6129                 cat >mk_shared_lib.sh <<-CF_EOF
6130                 #!$SHELL
6131                 SHARED_LIB=\$1
6132                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6133                 shift
6134                 cat <<-EOF
6135                 Linking shared library
6136                 ** SHARED_LIB \$SHARED_LIB
6137                 ** IMPORT_LIB \$IMPORT_LIB
6138 EOF
6139                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6140 CF_EOF
6141                 chmod +x mk_shared_lib.sh
6142                 ;;
6143         (msys*)
6144                 CC_SHARED_OPTS=
6145                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6146                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6147                 cf_cv_shlib_version=msysdll
6148                 cf_cv_shlib_version_infix=msysdll
6149                 shlibdir=$bindir
6150                 MAKE_DLLS=
6151                 cat >mk_shared_lib.sh <<-CF_EOF
6152                 #!$SHELL
6153                 SHARED_LIB=\$1
6154                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6155                 shift
6156                 cat <<-EOF
6157                 Linking shared library
6158                 ** SHARED_LIB \$SHARED_LIB
6159                 ** IMPORT_LIB \$IMPORT_LIB
6160 EOF
6161                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6162 CF_EOF
6163                 chmod +x mk_shared_lib.sh
6164                 ;;
6165         (darwin*)
6166                 cf_try_cflags="no-cpp-precomp"
6167                 CC_SHARED_OPTS="-dynamic"
6168                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6169                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6170                 cf_cv_shlib_version_infix=yes
6171                 echo "$as_me:6171: checking if ld -search_paths_first works" >&5
6172 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6173 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6174   echo $ECHO_N "(cached) $ECHO_C" >&6
6175 else
6176
6177                         cf_save_LDFLAGS=$LDFLAGS
6178                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6179                         cat >"conftest.$ac_ext" <<_ACEOF
6180 #line 6180 "configure"
6181 #include "confdefs.h"
6182
6183 int
6184 main (void)
6185 {
6186 int i;
6187   ;
6188   return 0;
6189 }
6190 _ACEOF
6191 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6192 if { (eval echo "$as_me:6192: \"$ac_link\"") >&5
6193   (eval $ac_link) 2>&5
6194   ac_status=$?
6195   echo "$as_me:6195: \$? = $ac_status" >&5
6196   (exit "$ac_status"); } &&
6197          { ac_try='test -s "conftest$ac_exeext"'
6198   { (eval echo "$as_me:6198: \"$ac_try\"") >&5
6199   (eval $ac_try) 2>&5
6200   ac_status=$?
6201   echo "$as_me:6201: \$? = $ac_status" >&5
6202   (exit "$ac_status"); }; }; then
6203   cf_cv_ldflags_search_paths_first=yes
6204 else
6205   echo "$as_me: failed program was:" >&5
6206 cat "conftest.$ac_ext" >&5
6207 cf_cv_ldflags_search_paths_first=no
6208 fi
6209 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6210                                 LDFLAGS=$cf_save_LDFLAGS
6211 fi
6212 echo "$as_me:6212: result: $cf_cv_ldflags_search_paths_first" >&5
6213 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6214                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6215                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6216                 fi
6217                 ;;
6218         (haiku*)
6219
6220         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6221         if test "$cf_cv_shlib_version" = rel; then
6222                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6223         else
6224                 cf_cv_shared_soname='`basename $@`'
6225         fi
6226
6227                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6228                 ;;
6229         (hpux[7-8]*)
6230                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6231                 if test "$GCC" != yes; then
6232                         CC_SHARED_OPTS='+Z'
6233                 fi
6234                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6235                 INSTALL_LIB="-m 555"
6236                 ;;
6237         (hpux*)
6238                 # (tested with gcc 2.7.2 -- I don't have c89)
6239                 if test "$GCC" = yes; then
6240                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6241                 else
6242                         CC_SHARED_OPTS='+Z'
6243                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6244                 fi
6245                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6246                 # HP-UX shared libraries must be executable, and should be
6247                 # readonly to exploit a quirk in the memory manager.
6248                 INSTALL_LIB="-m 555"
6249                 ;;
6250         (interix*)
6251                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6252                 if test "$cf_cv_shlib_version" = rel; then
6253                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6254                 else
6255                         cf_shared_soname='`basename $@`'
6256                 fi
6257                 CC_SHARED_OPTS=
6258                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6259                 ;;
6260         (irix*)
6261                 if test "$cf_cv_enable_rpath" = yes ; then
6262                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6263                 fi
6264                 # tested with IRIX 5.2 and 'cc'.
6265                 if test "$GCC" != yes; then
6266                         CC_SHARED_OPTS='-KPIC'
6267                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6268                 else
6269                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6270                 fi
6271                 cf_cv_rm_so_locs=yes
6272                 ;;
6273         (linux*|gnu*|k*bsd*-gnu)
6274                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6275                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6276                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6277                 fi
6278                 if test "$cf_cv_enable_rpath" = yes ; then
6279                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6280                 fi
6281
6282         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6283         if test "$cf_cv_shlib_version" = rel; then
6284                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6285         else
6286                 cf_cv_shared_soname='`basename $@`'
6287         fi
6288
6289                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6290                 ;;
6291         (mingw*msvc*)
6292                 cf_cv_shlib_version=msvcdll
6293                 cf_cv_shlib_version_infix=msvcdll
6294                 shlibdir=$bindir
6295                 MAKE_DLLS=
6296                 if test "$DFT_LWR_MODEL" = "shared" ; then
6297                         LOCAL_LDFLAGS="-link -dll"
6298                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6299                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6300                 fi
6301                 CC_SHARED_OPTS=
6302                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6303                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6304                 cat >mk_shared_lib.sh <<-CF_EOF
6305                 #!$SHELL
6306                 SHARED_LIB=\$1
6307                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6308                 shift
6309                 my_ld=\$1
6310                 shift
6311                 cat <<-EOF
6312                 Linking shared library
6313                 ** SHARED LIB \$SHARED_LIB
6314                 ** IMPORT_LIB \$IMPORT_LIB
6315 EOF
6316                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6317                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6318                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6319 CF_EOF
6320                 chmod +x mk_shared_lib.sh
6321                 cat >mk_prog.sh <<-CF_EOF
6322                 #!$SHELL
6323                 shift
6324                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6325                 LD="$LD"
6326                 clopts=()
6327                 ldopts=("/subsystem:console")
6328                 libs=()
6329                 isdll=0
6330                 while test \$# -gt 0; do
6331                         case "\$1" in
6332                                 -link)
6333                                         # ignore -link argument
6334                                         ;;
6335                                 -M[TD] | -M[TD]d)
6336                                         # ignore runtime-library option
6337                                         ;;
6338                                 -dll)
6339                                         isdll=1
6340                                         ;;
6341                                 -W* | -w*)
6342                                         # ignore warnings
6343                                         ;;
6344                                 -D*)
6345                                         clopts+=("\$1")
6346                                         ;;
6347                                 -I*)
6348                                         clopts+=("\$1")
6349                                         ;;
6350                                 -l*)
6351                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6352                                         ;;
6353                                 -L*)
6354                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6355                                         ;;
6356                                 *.obj | *.o)
6357                                         ldopts+=("\$1")
6358                                         ;;
6359                                 -Wl,*)
6360                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6361                                                 ldopts+=("\${linkarg}")
6362                                         done
6363                                         ;;
6364                                 *.lib)
6365                                         ldopts+=("\$1")
6366                                         ;;
6367                                 -o)
6368                                         shift
6369                                         ldopts+=("-out:\$1")
6370                                         ;;
6371                                 *)
6372                                         clopts+=("\$1")
6373                                         ldopts+=("\$1")
6374                                         ;;
6375                         esac
6376                         shift
6377                 done
6378                 if [ "\$isdll" -ne 0 ]; then
6379                         for lib in \${libs[*]}; do
6380                                 ldopts+=("\$lib.dll.lib")
6381                         done
6382                 else
6383                         for lib in \${libs[*]}; do
6384                                 ldopts+=("\$lib.lib")
6385                         done
6386                 fi
6387                 cat <<-EOF
6388                 Creating program
6389                 ** ld options:   "\${ldopts[@]}"
6390 EOF
6391                 exec \$LD \${ldopts[@]}
6392 CF_EOF
6393                 chmod +x mk_prog.sh
6394                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6395                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6396                 ;;
6397         (mingw*)
6398                 cf_cv_shlib_version=mingw
6399                 cf_cv_shlib_version_infix=mingw
6400                 shlibdir=$bindir
6401                 MAKE_DLLS=
6402                 if test "$DFT_LWR_MODEL" = "shared" ; then
6403                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6404                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6405                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6406                 fi
6407                 CC_SHARED_OPTS=
6408                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6409                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6410                 cat >mk_shared_lib.sh <<-CF_EOF
6411                 #!$SHELL
6412                 SHARED_LIB=\$1
6413                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6414                 shift
6415                 cat <<-EOF
6416                 Linking shared library
6417                 ** SHARED_LIB \$SHARED_LIB
6418                 ** IMPORT_LIB \$IMPORT_LIB
6419 EOF
6420                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6421 CF_EOF
6422                 chmod +x mk_shared_lib.sh
6423                 ;;
6424         (openbsd[2-9].*|mirbsd*)
6425                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6426                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6427                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6428                 fi
6429                 if test "$cf_cv_enable_rpath" = yes ; then
6430                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6431                 fi
6432                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6433
6434         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6435         if test "$cf_cv_shlib_version" = rel; then
6436                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6437         else
6438                 cf_cv_shared_soname='`basename $@`'
6439         fi
6440
6441                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6442                 ;;
6443         (nskJ*)
6444                 CC_SHARED_OPTS=
6445                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6446                 ;;
6447         (nskL*)
6448                 CC_SHARED_OPTS=
6449                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6450                 ;;
6451         (nto-qnx*|openbsd*|freebsd[12].*)
6452                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6453                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6454                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6455                 ;;
6456         (dragonfly*|freebsd*)
6457                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6458                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6459                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6460                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6461                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6462                 fi
6463
6464         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6465         if test "$cf_cv_shlib_version" = rel; then
6466                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6467         else
6468                 cf_cv_shared_soname='`basename $@`'
6469         fi
6470
6471                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6472                 ;;
6473         (netbsd*)
6474                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6475                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6476                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6477                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6478                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6479                         if test "$cf_cv_shlib_version" = auto; then
6480                         if test -f /usr/libexec/ld.elf_so; then
6481                                 cf_cv_shlib_version=abi
6482                         else
6483                                 cf_cv_shlib_version=rel
6484                         fi
6485                         fi
6486
6487         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6488         if test "$cf_cv_shlib_version" = rel; then
6489                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6490         else
6491                 cf_cv_shared_soname='`basename $@`'
6492         fi
6493
6494                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6495                 else
6496                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6497                 fi
6498                 ;;
6499         (osf*|mls+*)
6500                 # tested with OSF/1 V3.2 and 'cc'
6501                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6502                 # link with shared libs).
6503                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6504                 case "$host_os" in
6505                 (osf4*)
6506                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6507                         ;;
6508                 esac
6509                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6510                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6511                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6512                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6513                 fi
6514                 cf_cv_rm_so_locs=yes
6515                 ;;
6516         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6517                 # tested with osr5.0.5
6518                 if test "$GCC" != yes; then
6519                         CC_SHARED_OPTS='-belf -KPIC'
6520                 fi
6521                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6522                 if test "$cf_cv_enable_rpath" = yes ; then
6523                         # only way is to set LD_RUN_PATH but no switch for it
6524                         RUN_PATH=$libdir
6525                 fi
6526                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6527                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6528                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6529                 ;;
6530         (sunos4*)
6531                 # tested with SunOS 4.1.1 and gcc 2.7.0
6532                 if test "$GCC" != yes; then
6533                         CC_SHARED_OPTS='-KPIC'
6534                 fi
6535                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6536                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6537                 ;;
6538         (solaris2*)
6539                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6540                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6541                 if test "$DFT_LWR_MODEL" = "shared" ; then
6542                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6543                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6544                 fi
6545                 if test "$cf_cv_enable_rpath" = yes ; then
6546                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6547                 fi
6548
6549         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6550         if test "$cf_cv_shlib_version" = rel; then
6551                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6552         else
6553                 cf_cv_shared_soname='`basename $@`'
6554         fi
6555
6556                 if test "$GCC" != yes; then
6557                         cf_save_CFLAGS="$CFLAGS"
6558                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6559                         do
6560                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6561                                 cat >"conftest.$ac_ext" <<_ACEOF
6562 #line 6562 "configure"
6563 #include "confdefs.h"
6564 #include <stdio.h>
6565 int
6566 main (void)
6567 {
6568 printf("Hello\\n");
6569   ;
6570   return 0;
6571 }
6572 _ACEOF
6573 rm -f "conftest.$ac_objext"
6574 if { (eval echo "$as_me:6574: \"$ac_compile\"") >&5
6575   (eval $ac_compile) 2>&5
6576   ac_status=$?
6577   echo "$as_me:6577: \$? = $ac_status" >&5
6578   (exit "$ac_status"); } &&
6579          { ac_try='test -s "conftest.$ac_objext"'
6580   { (eval echo "$as_me:6580: \"$ac_try\"") >&5
6581   (eval $ac_try) 2>&5
6582   ac_status=$?
6583   echo "$as_me:6583: \$? = $ac_status" >&5
6584   (exit "$ac_status"); }; }; then
6585   break
6586 else
6587   echo "$as_me: failed program was:" >&5
6588 cat "conftest.$ac_ext" >&5
6589 fi
6590 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6591                         done
6592                         CFLAGS="$cf_save_CFLAGS"
6593                         CC_SHARED_OPTS=$cf_shared_opts
6594                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6595                 else
6596                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6597                 fi
6598                 ;;
6599         (sysv5uw7*|unix_sv*)
6600                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6601                 if test "$GCC" != yes; then
6602                         CC_SHARED_OPTS='-KPIC'
6603                 fi
6604                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6605                 ;;
6606         (*)
6607                 CC_SHARED_OPTS='unknown'
6608                 MK_SHARED_LIB='echo unknown'
6609                 ;;
6610         esac
6611
6612         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6613         case "$cf_cv_shlib_version" in
6614         (rel|abi)
6615                 case "$MK_SHARED_LIB" in
6616                 (*'-o $@')
6617                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6618                         ;;
6619                 (*)
6620                         { echo "$as_me:6620: WARNING: ignored --with-shlib-version" >&5
6621 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6622                         ;;
6623                 esac
6624                 ;;
6625         esac
6626
6627         if test -n "$cf_try_cflags"
6628         then
6629 cat > conftest.$ac_ext <<EOF
6630 #line 6630 "${as_me:-configure}"
6631 #include <stdio.h>
6632 int main(int argc, char *argv[])
6633 {
6634         printf("hello\\n");
6635         return (argv[argc-1] == 0) ;
6636 }
6637 EOF
6638                 cf_save_CFLAGS="$CFLAGS"
6639                 for cf_opt in $cf_try_cflags
6640                 do
6641                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6642                         echo "$as_me:6642: checking if CFLAGS option -$cf_opt works" >&5
6643 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6644                         if { (eval echo "$as_me:6644: \"$ac_compile\"") >&5
6645   (eval $ac_compile) 2>&5
6646   ac_status=$?
6647   echo "$as_me:6647: \$? = $ac_status" >&5
6648   (exit "$ac_status"); }; then
6649                                 echo "$as_me:6649: result: yes" >&5
6650 echo "${ECHO_T}yes" >&6
6651                                 cf_save_CFLAGS="$CFLAGS"
6652                         else
6653                                 echo "$as_me:6653: result: no" >&5
6654 echo "${ECHO_T}no" >&6
6655                         fi
6656                 done
6657                 CFLAGS="$cf_save_CFLAGS"
6658         fi
6659
6660         # RPATH_LIST is a colon-separated list of directories
6661         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6662         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6663
6664         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6665
6666         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6667
6668 echo "${as_me:-configure}:6668: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6669
6670         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6671
6672 echo "${as_me:-configure}:6672: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6673
6674 for model in $cf_list_models ; do
6675         case "$model" in
6676         (libtool)
6677
6678 echo "$as_me:6678: checking for additional libtool options" >&5
6679 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6680
6681 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6682 if test "${with_libtool_opts+set}" = set; then
6683   withval="$with_libtool_opts"
6684   with_libtool_opts=$withval
6685 else
6686   with_libtool_opts=no
6687 fi;
6688 echo "$as_me:6688: result: $with_libtool_opts" >&5
6689 echo "${ECHO_T}$with_libtool_opts" >&6
6690
6691 case .$with_libtool_opts in
6692 (.yes|.no|.)
6693         ;;
6694 (*)
6695         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6696         ;;
6697 esac
6698
6699 echo "$as_me:6699: checking if exported-symbols file should be used" >&5
6700 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6701
6702 # Check whether --with-export-syms or --without-export-syms was given.
6703 if test "${with_export_syms+set}" = set; then
6704   withval="$with_export_syms"
6705   with_export_syms=$withval
6706 else
6707   with_export_syms=no
6708 fi;
6709 if test "x$with_export_syms" = xyes
6710 then
6711         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6712
6713 fi
6714 echo "$as_me:6714: result: $with_export_syms" >&5
6715 echo "${ECHO_T}$with_export_syms" >&6
6716 if test "x$with_export_syms" != xno
6717 then
6718         EXPORT_SYMS="-export-symbols $with_export_syms"
6719
6720 fi
6721
6722                 ;;
6723         (shared)
6724                 if test "$CC_SHARED_OPTS" = "unknown"; then
6725                         { { echo "$as_me:6725: error: Shared libraries are not supported in this version" >&5
6726 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6727    { (exit 1); exit 1; }; }
6728                 fi
6729                 # workaround for inept transition to PIE vs PIC...
6730                 echo "$as_me:6730: checking if current CFLAGS link properly" >&5
6731 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6732                 cat >"conftest.$ac_ext" <<_ACEOF
6733 #line 6733 "configure"
6734 #include "confdefs.h"
6735 #include <stdio.h>
6736 int
6737 main (void)
6738 {
6739 printf("Hello work\\n");
6740   ;
6741   return 0;
6742 }
6743 _ACEOF
6744 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6745 if { (eval echo "$as_me:6745: \"$ac_link\"") >&5
6746   (eval $ac_link) 2>&5
6747   ac_status=$?
6748   echo "$as_me:6748: \$? = $ac_status" >&5
6749   (exit "$ac_status"); } &&
6750          { ac_try='test -s "conftest$ac_exeext"'
6751   { (eval echo "$as_me:6751: \"$ac_try\"") >&5
6752   (eval $ac_try) 2>&5
6753   ac_status=$?
6754   echo "$as_me:6754: \$? = $ac_status" >&5
6755   (exit "$ac_status"); }; }; then
6756   cf_cflags_work=yes
6757 else
6758   echo "$as_me: failed program was:" >&5
6759 cat "conftest.$ac_ext" >&5
6760 cf_cflags_work=no
6761 fi
6762 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6763                 echo "$as_me:6763: result: $cf_cflags_work" >&5
6764 echo "${ECHO_T}$cf_cflags_work" >&6
6765                 if test "$cf_cflags_work" = no
6766                 then
6767                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6768
6769 echo "${as_me:-configure}:6769: testing try to work around by appending shared-options ..." 1>&5
6770
6771                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6772                 fi
6773
6774 echo "$as_me:6774: checking if versioned-symbols file should be used" >&5
6775 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6776
6777 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6778 if test "${with_versioned_syms+set}" = set; then
6779   withval="$with_versioned_syms"
6780   with_versioned_syms=$withval
6781 else
6782   with_versioned_syms=no
6783 fi;
6784 case "x$with_versioned_syms" in
6785 (xyes)
6786         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6787
6788         ;;
6789 (xno)
6790         ;;
6791 (x/*)
6792         test -f "$with_versioned_syms" || { { echo "$as_me:6792: error: expected a filename: $with_versioned_syms" >&5
6793 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6794    { (exit 1); exit 1; }; }
6795         ;;
6796 (*)
6797         test -f "$with_versioned_syms" || { { echo "$as_me:6797: error: expected a filename: $with_versioned_syms" >&5
6798 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6799    { (exit 1); exit 1; }; }
6800         with_versioned_syms=`pwd`/"$with_versioned_syms"
6801         ;;
6802 esac
6803 echo "$as_me:6803: result: $with_versioned_syms" >&5
6804 echo "${ECHO_T}$with_versioned_syms" >&6
6805
6806 RESULTING_SYMS=
6807 VERSIONED_SYMS=
6808 WILDCARD_SYMS=
6809
6810 if test "x$with_versioned_syms" != xno
6811 then
6812         RESULTING_SYMS=$with_versioned_syms
6813         case "x$MK_SHARED_LIB" in
6814         (*-Wl,*)
6815                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6816                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6817                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6818
6819 echo "${as_me:-configure}:6819: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6820
6821                 ;;
6822         (*-dy\ *)
6823                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6824                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6825                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6826
6827 echo "${as_me:-configure}:6827: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6828
6829                 ;;
6830         (*)
6831                 { echo "$as_me:6831: WARNING: this system does not support versioned-symbols" >&5
6832 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6833                 ;;
6834         esac
6835
6836         # Linux ld can selectively override scope, e.g., of symbols beginning with
6837         # "_" by first declaring some as global, and then using a wildcard to
6838         # declare the others as local.  Some other loaders cannot do this.  Check
6839         # by constructing a (very) simple shared library and inspecting its
6840         # symbols.
6841         if test "x$VERSIONED_SYMS" != "x"
6842         then
6843                 echo "$as_me:6843: checking if wildcards can be used to selectively omit symbols" >&5
6844 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6845                 WILDCARD_SYMS=no
6846
6847                 # make sources
6848                 rm -f conftest.*
6849
6850                 cat >conftest.ver <<EOF
6851 module_1.0 {
6852 global:
6853         globalf1;
6854 local:
6855         localf1;
6856 };
6857 module_2.0 {
6858 global:
6859         globalf2;
6860 local:
6861         localf2;
6862         _*;
6863 } module_1.0;
6864 submodule_1.0 {
6865 global:
6866         subglobalf1;
6867         _ismissing;
6868 local:
6869         sublocalf1;
6870 };
6871 submodule_2.0 {
6872 global:
6873         subglobalf2;
6874 local:
6875         sublocalf2;
6876         _*;
6877 } submodule_1.0;
6878 EOF
6879                 cat >conftest.$ac_ext <<EOF
6880 #line 6880 "configure"
6881 int     _ismissing(void) { return 1; }
6882 int     _localf1(void) { return 1; }
6883 int     _localf2(void) { return 2; }
6884 int     globalf1(void) { return 1; }
6885 int     globalf2(void) { return 2; }
6886 int     _sublocalf1(void) { return 1; }
6887 int     _sublocalf2(void) { return 2; }
6888 int     subglobalf1(void) { return 1; }
6889 int     subglobalf2(void) { return 2; }
6890 EOF
6891                 cat >conftest.mk <<EOF
6892 CC=${CC}
6893 CFLAGS=${CFLAGS}
6894 CPPFLAGS=${CPPFLAGS}
6895 LDFLAGS=${LDFLAGS}
6896 LIBS=${LIBS}
6897 VERSIONED_SYMS=${VERSIONED_SYMS}
6898 RESULTING_SYMS=conftest.ver
6899 MK_SHARED_LIB=${MK_SHARED_LIB}
6900 conftest.so: conftest.$ac_cv_objext
6901                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6902 EOF
6903
6904                 # compile source, make library
6905                 if make -f conftest.mk 2>&5 >/dev/null
6906                 then
6907                         # test for missing symbol in either Data or Text section
6908                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6909                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6910                 fi
6911                 echo "$as_me:6911: result: $WILDCARD_SYMS" >&5
6912 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6913                 rm -f conftest.*
6914         fi
6915 fi
6916
6917                 ;;
6918         esac
6919 done
6920
6921 ### Checks for special libraries, must be done up-front.
6922 SHLIB_LIST=""
6923
6924 echo "$as_me:6924: checking if you want to link with the GPM mouse library" >&5
6925 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6926
6927 # Check whether --with-gpm or --without-gpm was given.
6928 if test "${with_gpm+set}" = set; then
6929   withval="$with_gpm"
6930   with_gpm=$withval
6931 else
6932   with_gpm=maybe
6933 fi;
6934 echo "$as_me:6934: result: $with_gpm" >&5
6935 echo "${ECHO_T}$with_gpm" >&6
6936
6937 if test "$with_gpm" != no ; then
6938         echo "$as_me:6938: checking for gpm.h" >&5
6939 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6940 if test "${ac_cv_header_gpm_h+set}" = set; then
6941   echo $ECHO_N "(cached) $ECHO_C" >&6
6942 else
6943   cat >"conftest.$ac_ext" <<_ACEOF
6944 #line 6944 "configure"
6945 #include "confdefs.h"
6946 #include <gpm.h>
6947 _ACEOF
6948 if { (eval echo "$as_me:6948: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6949   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6950   ac_status=$?
6951   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6952   rm -f conftest.er1
6953   cat conftest.err >&5
6954   echo "$as_me:6954: \$? = $ac_status" >&5
6955   (exit "$ac_status"); } >/dev/null; then
6956   if test -s conftest.err; then
6957     ac_cpp_err=$ac_c_preproc_warn_flag
6958   else
6959     ac_cpp_err=
6960   fi
6961 else
6962   ac_cpp_err=yes
6963 fi
6964 if test -z "$ac_cpp_err"; then
6965   ac_cv_header_gpm_h=yes
6966 else
6967   echo "$as_me: failed program was:" >&5
6968   cat "conftest.$ac_ext" >&5
6969   ac_cv_header_gpm_h=no
6970 fi
6971 rm -f conftest.err "conftest.$ac_ext"
6972 fi
6973 echo "$as_me:6973: result: $ac_cv_header_gpm_h" >&5
6974 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6975 if test "$ac_cv_header_gpm_h" = yes; then
6976
6977 cat >>confdefs.h <<\EOF
6978 #define HAVE_GPM_H 1
6979 EOF
6980
6981                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6982                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6983
6984 echo "${as_me:-configure}:6984: testing assuming we really have GPM library ..." 1>&5
6985
6986 cat >>confdefs.h <<\EOF
6987 #define HAVE_LIBGPM 1
6988 EOF
6989
6990                         with_gpm=yes
6991                 else
6992                         echo "$as_me:6992: checking for Gpm_Open in -lgpm" >&5
6993 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6994 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6995   echo $ECHO_N "(cached) $ECHO_C" >&6
6996 else
6997   ac_check_lib_save_LIBS=$LIBS
6998 LIBS="-lgpm  $LIBS"
6999 cat >"conftest.$ac_ext" <<_ACEOF
7000 #line 7000 "configure"
7001 #include "confdefs.h"
7002
7003 /* Override any gcc2 internal prototype to avoid an error.  */
7004 #ifdef __cplusplus
7005 extern "C"
7006 #endif
7007 /* We use char because int might match the return type of a gcc2
7008    builtin and then its argument prototype would still apply.  */
7009 char Gpm_Open ();
7010 int
7011 main (void)
7012 {
7013 Gpm_Open ();
7014   ;
7015   return 0;
7016 }
7017 _ACEOF
7018 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7019 if { (eval echo "$as_me:7019: \"$ac_link\"") >&5
7020   (eval $ac_link) 2>&5
7021   ac_status=$?
7022   echo "$as_me:7022: \$? = $ac_status" >&5
7023   (exit "$ac_status"); } &&
7024          { ac_try='test -s "conftest$ac_exeext"'
7025   { (eval echo "$as_me:7025: \"$ac_try\"") >&5
7026   (eval $ac_try) 2>&5
7027   ac_status=$?
7028   echo "$as_me:7028: \$? = $ac_status" >&5
7029   (exit "$ac_status"); }; }; then
7030   ac_cv_lib_gpm_Gpm_Open=yes
7031 else
7032   echo "$as_me: failed program was:" >&5
7033 cat "conftest.$ac_ext" >&5
7034 ac_cv_lib_gpm_Gpm_Open=no
7035 fi
7036 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7037 LIBS=$ac_check_lib_save_LIBS
7038 fi
7039 echo "$as_me:7039: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7040 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7041 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7042   with_gpm=yes
7043 else
7044
7045                                 if test "$with_gpm" = maybe; then
7046                                         { echo "$as_me:7046: WARNING: Cannot link with GPM library" >&5
7047 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7048                                         with_gpm=no
7049                                 else
7050                                         { { echo "$as_me:7050: error: Cannot link with GPM library" >&5
7051 echo "$as_me: error: Cannot link with GPM library" >&2;}
7052    { (exit 1); exit 1; }; }
7053                                 fi
7054
7055 fi
7056
7057                 fi
7058
7059 else
7060
7061                 test "$with_gpm" != maybe && { echo "$as_me:7061: WARNING: Cannot find GPM header" >&5
7062 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7063                 with_gpm=no
7064
7065 fi
7066
7067 fi
7068
7069 if test "$with_gpm" != no ; then
7070         echo "$as_me:7070: checking if you want to load GPM dynamically" >&5
7071 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7072
7073 # Check whether --with-dlsym or --without-dlsym was given.
7074 if test "${with_dlsym+set}" = set; then
7075   withval="$with_dlsym"
7076   with_dlsym=$withval
7077 else
7078   with_dlsym=yes
7079 fi;
7080         echo "$as_me:7080: result: $with_dlsym" >&5
7081 echo "${ECHO_T}$with_dlsym" >&6
7082         if test "x$with_dlsym" = xyes ; then
7083
7084 cf_have_dlsym=no
7085 echo "$as_me:7085: checking for dlsym" >&5
7086 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7087 if test "${ac_cv_func_dlsym+set}" = set; then
7088   echo $ECHO_N "(cached) $ECHO_C" >&6
7089 else
7090   cat >"conftest.$ac_ext" <<_ACEOF
7091 #line 7091 "configure"
7092 #include "confdefs.h"
7093 #define dlsym autoconf_temporary
7094 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7095 #undef dlsym
7096
7097 #ifdef __cplusplus
7098 extern "C"
7099 #endif
7100
7101 /* We use char because int might match the return type of a gcc2
7102    builtin and then its argument prototype would still apply.  */
7103 char dlsym (void);
7104
7105 int
7106 main (void)
7107 {
7108
7109 /* The GNU C library defines stubs for functions which it implements
7110     to always fail with ENOSYS.  Some functions are actually named
7111     something starting with __ and the normal name is an alias.  */
7112 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7113 #error found stub for dlsym
7114 #endif
7115
7116         return dlsym ();
7117   ;
7118   return 0;
7119 }
7120 _ACEOF
7121 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7122 if { (eval echo "$as_me:7122: \"$ac_link\"") >&5
7123   (eval $ac_link) 2>&5
7124   ac_status=$?
7125   echo "$as_me:7125: \$? = $ac_status" >&5
7126   (exit "$ac_status"); } &&
7127          { ac_try='test -s "conftest$ac_exeext"'
7128   { (eval echo "$as_me:7128: \"$ac_try\"") >&5
7129   (eval $ac_try) 2>&5
7130   ac_status=$?
7131   echo "$as_me:7131: \$? = $ac_status" >&5
7132   (exit "$ac_status"); }; }; then
7133   ac_cv_func_dlsym=yes
7134 else
7135   echo "$as_me: failed program was:" >&5
7136 cat "conftest.$ac_ext" >&5
7137 ac_cv_func_dlsym=no
7138 fi
7139 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7140 fi
7141 echo "$as_me:7141: result: $ac_cv_func_dlsym" >&5
7142 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7143 if test "$ac_cv_func_dlsym" = yes; then
7144   cf_have_dlsym=yes
7145 else
7146
7147 cf_have_libdl=no
7148 echo "$as_me:7148: checking for dlsym in -ldl" >&5
7149 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7150 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7151   echo $ECHO_N "(cached) $ECHO_C" >&6
7152 else
7153   ac_check_lib_save_LIBS=$LIBS
7154 LIBS="-ldl  $LIBS"
7155 cat >"conftest.$ac_ext" <<_ACEOF
7156 #line 7156 "configure"
7157 #include "confdefs.h"
7158
7159 /* Override any gcc2 internal prototype to avoid an error.  */
7160 #ifdef __cplusplus
7161 extern "C"
7162 #endif
7163 /* We use char because int might match the return type of a gcc2
7164    builtin and then its argument prototype would still apply.  */
7165 char dlsym ();
7166 int
7167 main (void)
7168 {
7169 dlsym ();
7170   ;
7171   return 0;
7172 }
7173 _ACEOF
7174 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7175 if { (eval echo "$as_me:7175: \"$ac_link\"") >&5
7176   (eval $ac_link) 2>&5
7177   ac_status=$?
7178   echo "$as_me:7178: \$? = $ac_status" >&5
7179   (exit "$ac_status"); } &&
7180          { ac_try='test -s "conftest$ac_exeext"'
7181   { (eval echo "$as_me:7181: \"$ac_try\"") >&5
7182   (eval $ac_try) 2>&5
7183   ac_status=$?
7184   echo "$as_me:7184: \$? = $ac_status" >&5
7185   (exit "$ac_status"); }; }; then
7186   ac_cv_lib_dl_dlsym=yes
7187 else
7188   echo "$as_me: failed program was:" >&5
7189 cat "conftest.$ac_ext" >&5
7190 ac_cv_lib_dl_dlsym=no
7191 fi
7192 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7193 LIBS=$ac_check_lib_save_LIBS
7194 fi
7195 echo "$as_me:7195: result: $ac_cv_lib_dl_dlsym" >&5
7196 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7197 if test "$ac_cv_lib_dl_dlsym" = yes; then
7198
7199         cf_have_dlsym=yes
7200         cf_have_libdl=yes
7201 fi
7202
7203 fi
7204
7205 if test "$cf_have_dlsym" = yes ; then
7206         test "$cf_have_libdl" = yes && {
7207 cf_add_libs="$LIBS"
7208 # reverse order
7209 cf_add_0lib=
7210 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7211 # filter duplicates
7212 for cf_add_1lib in $cf_add_0lib; do
7213         for cf_add_2lib in $cf_add_libs; do
7214                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7215                         cf_add_1lib=
7216                         break
7217                 fi
7218         done
7219         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7220 done
7221 LIBS="$cf_add_libs"
7222  }
7223
7224         echo "$as_me:7224: checking whether able to link to dl*() functions" >&5
7225 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7226         cat >"conftest.$ac_ext" <<_ACEOF
7227 #line 7227 "configure"
7228 #include "confdefs.h"
7229 #include <dlfcn.h>
7230 int
7231 main (void)
7232 {
7233
7234                 void *obj;
7235                 if ((obj = dlopen("filename", 0)) != 0) {
7236                         if (dlsym(obj, "symbolname") == 0) {
7237                         dlclose(obj);
7238                         }
7239                 }
7240   ;
7241   return 0;
7242 }
7243 _ACEOF
7244 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7245 if { (eval echo "$as_me:7245: \"$ac_link\"") >&5
7246   (eval $ac_link) 2>&5
7247   ac_status=$?
7248   echo "$as_me:7248: \$? = $ac_status" >&5
7249   (exit "$ac_status"); } &&
7250          { ac_try='test -s "conftest$ac_exeext"'
7251   { (eval echo "$as_me:7251: \"$ac_try\"") >&5
7252   (eval $ac_try) 2>&5
7253   ac_status=$?
7254   echo "$as_me:7254: \$? = $ac_status" >&5
7255   (exit "$ac_status"); }; }; then
7256
7257 cat >>confdefs.h <<\EOF
7258 #define HAVE_LIBDL 1
7259 EOF
7260
7261 else
7262   echo "$as_me: failed program was:" >&5
7263 cat "conftest.$ac_ext" >&5
7264
7265                 { { echo "$as_me:7265: error: Cannot link test program for libdl" >&5
7266 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7267    { (exit 1); exit 1; }; }
7268 fi
7269 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7270         echo "$as_me:7270: result: ok" >&5
7271 echo "${ECHO_T}ok" >&6
7272 else
7273         { { echo "$as_me:7273: error: Cannot find dlsym function" >&5
7274 echo "$as_me: error: Cannot find dlsym function" >&2;}
7275    { (exit 1); exit 1; }; }
7276 fi
7277
7278                 if test "x$with_gpm" != xyes ; then
7279                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7280
7281 echo "${as_me:-configure}:7281: testing assuming soname for gpm is $with_gpm ..." 1>&5
7282
7283                         cf_cv_gpm_soname="$with_gpm"
7284                 else
7285
7286 echo "$as_me:7286: checking for soname of gpm library" >&5
7287 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7288 if test "${cf_cv_gpm_soname+set}" = set; then
7289   echo $ECHO_N "(cached) $ECHO_C" >&6
7290 else
7291
7292 cf_cv_gpm_soname=unknown
7293 if test "$cross_compiling" != yes ; then
7294 cat >conftest.$ac_ext <<CF_EOF
7295 #include <gpm.h>
7296 int main(void)
7297 {
7298 if (Gpm_Open(0,0)) Gpm_Close();
7299         ${cf_cv_main_return:-return}(0);
7300 }
7301 CF_EOF
7302 cf_save_LIBS="$LIBS"
7303
7304 cf_add_libs="$LIBS"
7305 # reverse order
7306 cf_add_0lib=
7307 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7308 # filter duplicates
7309 for cf_add_1lib in $cf_add_0lib; do
7310         for cf_add_2lib in $cf_add_libs; do
7311                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7312                         cf_add_1lib=
7313                         break
7314                 fi
7315         done
7316         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7317 done
7318 LIBS="$cf_add_libs"
7319
7320         if { (eval echo "$as_me:7320: \"$ac_compile\"") >&5
7321   (eval $ac_compile) 2>&5
7322   ac_status=$?
7323   echo "$as_me:7323: \$? = $ac_status" >&5
7324   (exit "$ac_status"); } ; then
7325                 if { (eval echo "$as_me:7325: \"$ac_link\"") >&5
7326   (eval $ac_link) 2>&5
7327   ac_status=$?
7328   echo "$as_me:7328: \$? = $ac_status" >&5
7329   (exit "$ac_status"); } ; then
7330                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7331                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7332                 fi
7333         fi
7334 rm -rf ./conftest*
7335 LIBS="$cf_save_LIBS"
7336 fi
7337
7338 fi
7339 echo "$as_me:7339: result: $cf_cv_gpm_soname" >&5
7340 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7341
7342                 fi
7343                 test "$cf_cv_gpm_soname" != "unknown" &&
7344 cat >>confdefs.h <<EOF
7345 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7346 EOF
7347
7348                 SHLIB_LIST="-ldl $SHLIB_LIST"
7349
7350 cf_add_libs="$PRIVATE_LIBS"
7351 # reverse order
7352 cf_add_0lib=
7353 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7354 # filter duplicates
7355 for cf_add_1lib in $cf_add_0lib; do
7356         for cf_add_2lib in $cf_add_libs; do
7357                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7358                         cf_add_1lib=
7359                         break
7360                 fi
7361         done
7362         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7363 done
7364 PRIVATE_LIBS="$cf_add_libs"
7365
7366         else
7367                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7368
7369 cf_add_libs="$TEST_LIBS"
7370 # reverse order
7371 cf_add_0lib=
7372 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7373 # filter duplicates
7374 for cf_add_1lib in $cf_add_0lib; do
7375         for cf_add_2lib in $cf_add_libs; do
7376                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7377                         cf_add_1lib=
7378                         break
7379                 fi
7380         done
7381         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7382 done
7383 TEST_LIBS="$cf_add_libs"
7384
7385 cf_add_libs="$PRIVATE_LIBS"
7386 # reverse order
7387 cf_add_0lib=
7388 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7389 # filter duplicates
7390 for cf_add_1lib in $cf_add_0lib; do
7391         for cf_add_2lib in $cf_add_libs; do
7392                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7393                         cf_add_1lib=
7394                         break
7395                 fi
7396         done
7397         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7398 done
7399 PRIVATE_LIBS="$cf_add_libs"
7400
7401         fi
7402
7403 cat >>confdefs.h <<\EOF
7404 #define HAVE_LIBGPM 1
7405 EOF
7406
7407 echo "$as_me:7407: checking for Gpm_Wgetch in -lgpm" >&5
7408 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7409 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7410   echo $ECHO_N "(cached) $ECHO_C" >&6
7411 else
7412   ac_check_lib_save_LIBS=$LIBS
7413 LIBS="-lgpm  $LIBS"
7414 cat >"conftest.$ac_ext" <<_ACEOF
7415 #line 7415 "configure"
7416 #include "confdefs.h"
7417
7418 /* Override any gcc2 internal prototype to avoid an error.  */
7419 #ifdef __cplusplus
7420 extern "C"
7421 #endif
7422 /* We use char because int might match the return type of a gcc2
7423    builtin and then its argument prototype would still apply.  */
7424 char Gpm_Wgetch ();
7425 int
7426 main (void)
7427 {
7428 Gpm_Wgetch ();
7429   ;
7430   return 0;
7431 }
7432 _ACEOF
7433 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7434 if { (eval echo "$as_me:7434: \"$ac_link\"") >&5
7435   (eval $ac_link) 2>&5
7436   ac_status=$?
7437   echo "$as_me:7437: \$? = $ac_status" >&5
7438   (exit "$ac_status"); } &&
7439          { ac_try='test -s "conftest$ac_exeext"'
7440   { (eval echo "$as_me:7440: \"$ac_try\"") >&5
7441   (eval $ac_try) 2>&5
7442   ac_status=$?
7443   echo "$as_me:7443: \$? = $ac_status" >&5
7444   (exit "$ac_status"); }; }; then
7445   ac_cv_lib_gpm_Gpm_Wgetch=yes
7446 else
7447   echo "$as_me: failed program was:" >&5
7448 cat "conftest.$ac_ext" >&5
7449 ac_cv_lib_gpm_Gpm_Wgetch=no
7450 fi
7451 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7452 LIBS=$ac_check_lib_save_LIBS
7453 fi
7454 echo "$as_me:7454: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7455 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7456 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7457
7458 echo "$as_me:7458: checking if GPM is weakly bound to curses library" >&5
7459 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7460 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7461   echo $ECHO_N "(cached) $ECHO_C" >&6
7462 else
7463
7464 cf_cv_check_gpm_wgetch=unknown
7465 if test "$cross_compiling" != yes ; then
7466
7467 cat >conftest.$ac_ext <<CF_EOF
7468 #include <gpm.h>
7469 int main(void)
7470 {
7471         Gpm_Wgetch();
7472         ${cf_cv_main_return:-return}(0);
7473 }
7474 CF_EOF
7475
7476         cf_save_LIBS="$LIBS"
7477         # This only works if we can look at the symbol table.  If a shared
7478         # library is stripped for install, we cannot use that.  So we're forced
7479         # to rely on the static library, noting that some packagers may not
7480         # include it.
7481         LIBS="-static -lgpm -dynamic $LIBS"
7482         if { (eval echo "$as_me:7482: \"$ac_compile\"") >&5
7483   (eval $ac_compile) 2>&5
7484   ac_status=$?
7485   echo "$as_me:7485: \$? = $ac_status" >&5
7486   (exit "$ac_status"); } ; then
7487                 if { (eval echo "$as_me:7487: \"$ac_link\"") >&5
7488   (eval $ac_link) 2>&5
7489   ac_status=$?
7490   echo "$as_me:7490: \$? = $ac_status" >&5
7491   (exit "$ac_status"); } ; then
7492                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7493                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7494                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7495                 fi
7496         fi
7497         rm -rf ./conftest*
7498         LIBS="$cf_save_LIBS"
7499 fi
7500
7501 fi
7502 echo "$as_me:7502: result: $cf_cv_check_gpm_wgetch" >&5
7503 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7504
7505 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7506         { echo "$as_me:7506: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7507 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7508 fi
7509
7510 fi
7511
7512 fi
7513
7514 echo "$as_me:7514: checking if you want to use PCRE2 for regular-expressions" >&5
7515 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7516
7517 # Check whether --with-pcre2 or --without-pcre2 was given.
7518 if test "${with_pcre2+set}" = set; then
7519   withval="$with_pcre2"
7520
7521 fi;
7522 test -z "$with_pcre2" && with_pcre2=no
7523 echo "$as_me:7523: result: $with_pcre2" >&5
7524 echo "${ECHO_T}$with_pcre2" >&6
7525
7526 if test "x$with_pcre2" != xno ; then
7527         cf_with_pcre2_ok=no
7528         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7529         do
7530
7531 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7532         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7533
7534 echo "${as_me:-configure}:7534: testing found package $cf_with_pcre2 ..." 1>&5
7535
7536         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7537         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7538         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7539
7540 echo "${as_me:-configure}:7540: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7541
7542         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7543
7544 echo "${as_me:-configure}:7544: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7545
7546 cf_fix_cppflags=no
7547 cf_new_cflags=
7548 cf_new_cppflags=
7549 cf_new_extra_cppflags=
7550
7551 for cf_add_cflags in $cf_pkgconfig_incs
7552 do
7553 case "$cf_fix_cppflags" in
7554 (no)
7555         case "$cf_add_cflags" in
7556         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7557                 case "$cf_add_cflags" in
7558                 (-D*)
7559                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7560
7561                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7562                                 && test -z "${cf_tst_cflags}" \
7563                                 && cf_fix_cppflags=yes
7564
7565                         if test "$cf_fix_cppflags" = yes ; then
7566
7567         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7568         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7569
7570                                 continue
7571                         elif test "${cf_tst_cflags}" = "\"'" ; then
7572
7573         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7574         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7575
7576                                 continue
7577                         fi
7578                         ;;
7579                 esac
7580                 case "$CPPFLAGS" in
7581                 (*$cf_add_cflags)
7582                         ;;
7583                 (*)
7584                         case "$cf_add_cflags" in
7585                         (-D*)
7586                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7587
7588 CPPFLAGS=`echo "$CPPFLAGS" | \
7589         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7590                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7591
7592                                 ;;
7593                         esac
7594
7595         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7596         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7597
7598                         ;;
7599                 esac
7600                 ;;
7601         (*)
7602
7603         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7604         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7605
7606                 ;;
7607         esac
7608         ;;
7609 (yes)
7610
7611         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7612         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7613
7614         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7615
7616         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7617                 && test -z "${cf_tst_cflags}" \
7618                 && cf_fix_cppflags=no
7619         ;;
7620 esac
7621 done
7622
7623 if test -n "$cf_new_cflags" ; then
7624
7625         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7626         CFLAGS="${CFLAGS}$cf_new_cflags"
7627
7628 fi
7629
7630 if test -n "$cf_new_cppflags" ; then
7631
7632         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7633         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7634
7635 fi
7636
7637 if test -n "$cf_new_extra_cppflags" ; then
7638
7639         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7640         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7641
7642 fi
7643
7644 cf_add_libs="$LIBS"
7645 # reverse order
7646 cf_add_0lib=
7647 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7648 # filter duplicates
7649 for cf_add_1lib in $cf_add_0lib; do
7650         for cf_add_2lib in $cf_add_libs; do
7651                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7652                         cf_add_1lib=
7653                         break
7654                 fi
7655         done
7656         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7657 done
7658 LIBS="$cf_add_libs"
7659
7660         cf_with_pcre2_ok=yes; break
7661 else
7662         cf_pkgconfig_incs=
7663         cf_pkgconfig_libs=
7664         :
7665 fi
7666
7667         done
7668         cf_with_pcre2_ok=yes || { { echo "$as_me:7668: error: Cannot find PCRE2 library" >&5
7669 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7670    { (exit 1); exit 1; }; }
7671
7672 cat >>confdefs.h <<\EOF
7673 #define HAVE_LIB_PCRE2 1
7674 EOF
7675
7676         # if pkgconfig gave no results, look for the libraries directly
7677         case "$LIBS" in
7678         (*pcre2-posix*|*pcreposix*)
7679                 ;;
7680         (*)
7681                 echo "$as_me:7681: checking for regcomp in -lpcre2-posix" >&5
7682 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7683 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7684   echo $ECHO_N "(cached) $ECHO_C" >&6
7685 else
7686   ac_check_lib_save_LIBS=$LIBS
7687 LIBS="-lpcre2-posix  $LIBS"
7688 cat >"conftest.$ac_ext" <<_ACEOF
7689 #line 7689 "configure"
7690 #include "confdefs.h"
7691
7692 /* Override any gcc2 internal prototype to avoid an error.  */
7693 #ifdef __cplusplus
7694 extern "C"
7695 #endif
7696 /* We use char because int might match the return type of a gcc2
7697    builtin and then its argument prototype would still apply.  */
7698 char regcomp ();
7699 int
7700 main (void)
7701 {
7702 regcomp ();
7703   ;
7704   return 0;
7705 }
7706 _ACEOF
7707 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7708 if { (eval echo "$as_me:7708: \"$ac_link\"") >&5
7709   (eval $ac_link) 2>&5
7710   ac_status=$?
7711   echo "$as_me:7711: \$? = $ac_status" >&5
7712   (exit "$ac_status"); } &&
7713          { ac_try='test -s "conftest$ac_exeext"'
7714   { (eval echo "$as_me:7714: \"$ac_try\"") >&5
7715   (eval $ac_try) 2>&5
7716   ac_status=$?
7717   echo "$as_me:7717: \$? = $ac_status" >&5
7718   (exit "$ac_status"); }; }; then
7719   ac_cv_lib_pcre2_posix_regcomp=yes
7720 else
7721   echo "$as_me: failed program was:" >&5
7722 cat "conftest.$ac_ext" >&5
7723 ac_cv_lib_pcre2_posix_regcomp=no
7724 fi
7725 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7726 LIBS=$ac_check_lib_save_LIBS
7727 fi
7728 echo "$as_me:7728: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7729 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7730 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7731
7732 cf_add_libs="$LIBS"
7733 # reverse order
7734 cf_add_0lib=
7735 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7736 # filter duplicates
7737 for cf_add_1lib in $cf_add_0lib; do
7738         for cf_add_2lib in $cf_add_libs; do
7739                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7740                         cf_add_1lib=
7741                         break
7742                 fi
7743         done
7744         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7745 done
7746 LIBS="$cf_add_libs"
7747
7748 else
7749   echo "$as_me:7749: checking for regcomp in -lpcreposix" >&5
7750 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7751 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7752   echo $ECHO_N "(cached) $ECHO_C" >&6
7753 else
7754   ac_check_lib_save_LIBS=$LIBS
7755 LIBS="-lpcreposix  $LIBS"
7756 cat >"conftest.$ac_ext" <<_ACEOF
7757 #line 7757 "configure"
7758 #include "confdefs.h"
7759
7760 /* Override any gcc2 internal prototype to avoid an error.  */
7761 #ifdef __cplusplus
7762 extern "C"
7763 #endif
7764 /* We use char because int might match the return type of a gcc2
7765    builtin and then its argument prototype would still apply.  */
7766 char regcomp ();
7767 int
7768 main (void)
7769 {
7770 regcomp ();
7771   ;
7772   return 0;
7773 }
7774 _ACEOF
7775 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7776 if { (eval echo "$as_me:7776: \"$ac_link\"") >&5
7777   (eval $ac_link) 2>&5
7778   ac_status=$?
7779   echo "$as_me:7779: \$? = $ac_status" >&5
7780   (exit "$ac_status"); } &&
7781          { ac_try='test -s "conftest$ac_exeext"'
7782   { (eval echo "$as_me:7782: \"$ac_try\"") >&5
7783   (eval $ac_try) 2>&5
7784   ac_status=$?
7785   echo "$as_me:7785: \$? = $ac_status" >&5
7786   (exit "$ac_status"); }; }; then
7787   ac_cv_lib_pcreposix_regcomp=yes
7788 else
7789   echo "$as_me: failed program was:" >&5
7790 cat "conftest.$ac_ext" >&5
7791 ac_cv_lib_pcreposix_regcomp=no
7792 fi
7793 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7794 LIBS=$ac_check_lib_save_LIBS
7795 fi
7796 echo "$as_me:7796: result: $ac_cv_lib_pcreposix_regcomp" >&5
7797 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7798 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7799
7800 cf_add_libs="$LIBS"
7801 # reverse order
7802 cf_add_0lib=
7803 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7804 # filter duplicates
7805 for cf_add_1lib in $cf_add_0lib; do
7806         for cf_add_2lib in $cf_add_libs; do
7807                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7808                         cf_add_1lib=
7809                         break
7810                 fi
7811         done
7812         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7813 done
7814 LIBS="$cf_add_libs"
7815
7816 else
7817   { { echo "$as_me:7817: error: Cannot find PCRE2 POSIX library" >&5
7818 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7819    { (exit 1); exit 1; }; }
7820 fi
7821
7822 fi
7823
7824                 ;;
7825         esac
7826
7827         # either way, check for the library header files
7828
7829 for ac_header in pcre2posix.h pcreposix.h
7830 do
7831 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7832 echo "$as_me:7832: checking for $ac_header" >&5
7833 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7834 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7835   echo $ECHO_N "(cached) $ECHO_C" >&6
7836 else
7837   cat >"conftest.$ac_ext" <<_ACEOF
7838 #line 7838 "configure"
7839 #include "confdefs.h"
7840 #include <$ac_header>
7841 _ACEOF
7842 if { (eval echo "$as_me:7842: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7843   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7844   ac_status=$?
7845   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7846   rm -f conftest.er1
7847   cat conftest.err >&5
7848   echo "$as_me:7848: \$? = $ac_status" >&5
7849   (exit "$ac_status"); } >/dev/null; then
7850   if test -s conftest.err; then
7851     ac_cpp_err=$ac_c_preproc_warn_flag
7852   else
7853     ac_cpp_err=
7854   fi
7855 else
7856   ac_cpp_err=yes
7857 fi
7858 if test -z "$ac_cpp_err"; then
7859   eval "$as_ac_Header=yes"
7860 else
7861   echo "$as_me: failed program was:" >&5
7862   cat "conftest.$ac_ext" >&5
7863   eval "$as_ac_Header=no"
7864 fi
7865 rm -f conftest.err "conftest.$ac_ext"
7866 fi
7867 echo "$as_me:7867: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7868 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7869 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7870   cat >>confdefs.h <<EOF
7871 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7872 EOF
7873
7874 fi
7875 done
7876
7877 for ac_func in PCRE2regcomp
7878 do
7879 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7880 echo "$as_me:7880: checking for $ac_func" >&5
7881 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7882 if eval "test \"\${$as_ac_var+set}\" = set"; then
7883   echo $ECHO_N "(cached) $ECHO_C" >&6
7884 else
7885   cat >"conftest.$ac_ext" <<_ACEOF
7886 #line 7886 "configure"
7887 #include "confdefs.h"
7888 #define $ac_func autoconf_temporary
7889 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7890 #undef $ac_func
7891
7892 #ifdef __cplusplus
7893 extern "C"
7894 #endif
7895
7896 /* We use char because int might match the return type of a gcc2
7897    builtin and then its argument prototype would still apply.  */
7898 char $ac_func (void);
7899
7900 int
7901 main (void)
7902 {
7903
7904 /* The GNU C library defines stubs for functions which it implements
7905     to always fail with ENOSYS.  Some functions are actually named
7906     something starting with __ and the normal name is an alias.  */
7907 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7908 #error found stub for $ac_func
7909 #endif
7910
7911         return $ac_func ();
7912   ;
7913   return 0;
7914 }
7915 _ACEOF
7916 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7917 if { (eval echo "$as_me:7917: \"$ac_link\"") >&5
7918   (eval $ac_link) 2>&5
7919   ac_status=$?
7920   echo "$as_me:7920: \$? = $ac_status" >&5
7921   (exit "$ac_status"); } &&
7922          { ac_try='test -s "conftest$ac_exeext"'
7923   { (eval echo "$as_me:7923: \"$ac_try\"") >&5
7924   (eval $ac_try) 2>&5
7925   ac_status=$?
7926   echo "$as_me:7926: \$? = $ac_status" >&5
7927   (exit "$ac_status"); }; }; then
7928   eval "$as_ac_var=yes"
7929 else
7930   echo "$as_me: failed program was:" >&5
7931 cat "conftest.$ac_ext" >&5
7932 eval "$as_ac_var=no"
7933 fi
7934 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7935 fi
7936 echo "$as_me:7936: result: `eval echo '${'"$as_ac_var"'}'`" >&5
7937 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
7938 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
7939   cat >>confdefs.h <<EOF
7940 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7941 EOF
7942
7943 fi
7944 done
7945
7946 fi
7947
7948 # not everyone has "test -c"
7949 if test -c /dev/sysmouse 2>/dev/null ; then
7950 echo "$as_me:7950: checking if you want to use sysmouse" >&5
7951 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7952
7953 # Check whether --with-sysmouse or --without-sysmouse was given.
7954 if test "${with_sysmouse+set}" = set; then
7955   withval="$with_sysmouse"
7956   cf_with_sysmouse=$withval
7957 else
7958   cf_with_sysmouse=maybe
7959 fi;
7960         if test "$cf_with_sysmouse" != no ; then
7961         cat >"conftest.$ac_ext" <<_ACEOF
7962 #line 7962 "configure"
7963 #include "confdefs.h"
7964
7965 #include <osreldate.h>
7966 #if (__FreeBSD_version >= 400017)
7967 #include <sys/consio.h>
7968 #include <sys/fbio.h>
7969 #else
7970 #include <machine/console.h>
7971 #endif
7972
7973 int
7974 main (void)
7975 {
7976
7977         struct mouse_info the_mouse;
7978         ioctl(0, CONS_MOUSECTL, &the_mouse);
7979
7980   ;
7981   return 0;
7982 }
7983 _ACEOF
7984 rm -f "conftest.$ac_objext"
7985 if { (eval echo "$as_me:7985: \"$ac_compile\"") >&5
7986   (eval $ac_compile) 2>&5
7987   ac_status=$?
7988   echo "$as_me:7988: \$? = $ac_status" >&5
7989   (exit "$ac_status"); } &&
7990          { ac_try='test -s "conftest.$ac_objext"'
7991   { (eval echo "$as_me:7991: \"$ac_try\"") >&5
7992   (eval $ac_try) 2>&5
7993   ac_status=$?
7994   echo "$as_me:7994: \$? = $ac_status" >&5
7995   (exit "$ac_status"); }; }; then
7996   cf_with_sysmouse=yes
7997 else
7998   echo "$as_me: failed program was:" >&5
7999 cat "conftest.$ac_ext" >&5
8000 cf_with_sysmouse=no
8001 fi
8002 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8003         fi
8004 echo "$as_me:8004: result: $cf_with_sysmouse" >&5
8005 echo "${ECHO_T}$cf_with_sysmouse" >&6
8006 test "$cf_with_sysmouse" = yes &&
8007 cat >>confdefs.h <<\EOF
8008 #define USE_SYSMOUSE 1
8009 EOF
8010
8011 fi
8012
8013 # pretend that ncurses==ncursesw==ncursest
8014 echo "$as_me:8014: checking if you want to disable library suffixes" >&5
8015 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8016
8017 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8018 if test "${enable_lib_suffixes+set}" = set; then
8019   enableval="$enable_lib_suffixes"
8020   test "$enableval" != no && enableval=yes
8021         if test "$enableval" != "yes" ; then
8022     disable_lib_suffixes=yes
8023         else
8024                 disable_lib_suffixes=no
8025         fi
8026 else
8027   enableval=yes
8028         disable_lib_suffixes=no
8029
8030 fi;
8031 echo "$as_me:8031: result: $disable_lib_suffixes" >&5
8032 echo "${ECHO_T}$disable_lib_suffixes" >&6
8033
8034 ### If we're building with rpath, try to link non-standard libs that way too.
8035 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8036
8037 echo "$as_me:8037: checking if rpath-hack should be disabled" >&5
8038 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8039
8040 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8041 if test "${enable_rpath_hack+set}" = set; then
8042   enableval="$enable_rpath_hack"
8043   test "$enableval" != no && enableval=yes
8044         if test "$enableval" != "yes" ; then
8045     enable_rpath_hack=no
8046         else
8047                 enable_rpath_hack=yes
8048         fi
8049 else
8050   enableval=yes
8051         enable_rpath_hack=yes
8052
8053 fi;
8054 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8055 echo "$as_me:8055: result: $cf_disable_rpath_hack" >&5
8056 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8057
8058 if test "$enable_rpath_hack" = yes ; then
8059
8060 echo "$as_me:8060: checking for updated LDFLAGS" >&5
8061 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8062 if test -n "$LD_RPATH_OPT" ; then
8063         echo "$as_me:8063: result: maybe" >&5
8064 echo "${ECHO_T}maybe" >&6
8065
8066         for ac_prog in ldd
8067 do
8068   # Extract the first word of "$ac_prog", so it can be a program name with args.
8069 set dummy $ac_prog; ac_word=$2
8070 echo "$as_me:8070: checking for $ac_word" >&5
8071 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8072 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8073   echo $ECHO_N "(cached) $ECHO_C" >&6
8074 else
8075   if test -n "$cf_ldd_prog"; then
8076   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8077 else
8078   ac_save_IFS=$IFS; IFS=$ac_path_separator
8079 ac_dummy="$PATH"
8080 for ac_dir in $ac_dummy; do
8081   IFS=$ac_save_IFS
8082   test -z "$ac_dir" && ac_dir=.
8083   $as_executable_p "$ac_dir/$ac_word" || continue
8084 ac_cv_prog_cf_ldd_prog="$ac_prog"
8085 echo "$as_me:8085: found $ac_dir/$ac_word" >&5
8086 break
8087 done
8088
8089 fi
8090 fi
8091 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8092 if test -n "$cf_ldd_prog"; then
8093   echo "$as_me:8093: result: $cf_ldd_prog" >&5
8094 echo "${ECHO_T}$cf_ldd_prog" >&6
8095 else
8096   echo "$as_me:8096: result: no" >&5
8097 echo "${ECHO_T}no" >&6
8098 fi
8099
8100   test -n "$cf_ldd_prog" && break
8101 done
8102 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8103
8104         cf_rpath_list="/usr/lib /lib"
8105         if test "$cf_ldd_prog" != no
8106         then
8107                 cf_rpath_oops=
8108
8109 cat >"conftest.$ac_ext" <<_ACEOF
8110 #line 8110 "configure"
8111 #include "confdefs.h"
8112 #include <stdio.h>
8113 int
8114 main (void)
8115 {
8116 printf("Hello");
8117   ;
8118   return 0;
8119 }
8120 _ACEOF
8121 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8122 if { (eval echo "$as_me:8122: \"$ac_link\"") >&5
8123   (eval $ac_link) 2>&5
8124   ac_status=$?
8125   echo "$as_me:8125: \$? = $ac_status" >&5
8126   (exit "$ac_status"); } &&
8127          { ac_try='test -s "conftest$ac_exeext"'
8128   { (eval echo "$as_me:8128: \"$ac_try\"") >&5
8129   (eval $ac_try) 2>&5
8130   ac_status=$?
8131   echo "$as_me:8131: \$? = $ac_status" >&5
8132   (exit "$ac_status"); }; }; then
8133   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8134                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8135 else
8136   echo "$as_me: failed program was:" >&5
8137 cat "conftest.$ac_ext" >&5
8138 fi
8139 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8140
8141                 # If we passed the link-test, but get a "not found" on a given library,
8142                 # this could be due to inept reconfiguration of gcc to make it only
8143                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8144                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8145                 # /usr/local libraries.
8146                 if test -n "$cf_rpath_oops"
8147                 then
8148                         for cf_rpath_src in $cf_rpath_oops
8149                         do
8150                                 for cf_rpath_dir in \
8151                                         /usr/local \
8152                                         /usr/pkg \
8153                                         /opt/sfw
8154                                 do
8155                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8156                                         then
8157                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8158
8159 echo "${as_me:-configure}:8159: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8160
8161                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8162                                                 break
8163                                         fi
8164                                 done
8165                         done
8166                 fi
8167         fi
8168
8169         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8170
8171 echo "${as_me:-configure}:8171: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8172
8173 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8174
8175 echo "${as_me:-configure}:8175: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8176
8177 cf_rpath_dst=
8178 for cf_rpath_src in $LDFLAGS
8179 do
8180         case "$cf_rpath_src" in
8181         (-L*)
8182
8183                 # check if this refers to a directory which we will ignore
8184                 cf_rpath_skip=no
8185                 if test -n "$cf_rpath_list"
8186                 then
8187                         for cf_rpath_item in $cf_rpath_list
8188                         do
8189                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8190                                 then
8191                                         cf_rpath_skip=yes
8192                                         break
8193                                 fi
8194                         done
8195                 fi
8196
8197                 if test "$cf_rpath_skip" = no
8198                 then
8199                         # transform the option
8200                         if test "$LD_RPATH_OPT" = "-R " ; then
8201                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8202                         else
8203                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8204                         fi
8205
8206                         # if we have not already added this, add it now
8207                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8208                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8209                         then
8210                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8211
8212 echo "${as_me:-configure}:8212: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8213
8214                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8215                         fi
8216                 fi
8217                 ;;
8218         esac
8219         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8220 done
8221 LDFLAGS=$cf_rpath_dst
8222
8223 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8224
8225 echo "${as_me:-configure}:8225: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8226
8227 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8228
8229 echo "${as_me:-configure}:8229: testing ...checking LIBS $LIBS ..." 1>&5
8230
8231 cf_rpath_dst=
8232 for cf_rpath_src in $LIBS
8233 do
8234         case "$cf_rpath_src" in
8235         (-L*)
8236
8237                 # check if this refers to a directory which we will ignore
8238                 cf_rpath_skip=no
8239                 if test -n "$cf_rpath_list"
8240                 then
8241                         for cf_rpath_item in $cf_rpath_list
8242                         do
8243                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8244                                 then
8245                                         cf_rpath_skip=yes
8246                                         break
8247                                 fi
8248                         done
8249                 fi
8250
8251                 if test "$cf_rpath_skip" = no
8252                 then
8253                         # transform the option
8254                         if test "$LD_RPATH_OPT" = "-R " ; then
8255                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8256                         else
8257                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8258                         fi
8259
8260                         # if we have not already added this, add it now
8261                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8262                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8263                         then
8264                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8265
8266 echo "${as_me:-configure}:8266: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8267
8268                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8269                         fi
8270                 fi
8271                 ;;
8272         esac
8273         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8274 done
8275 LIBS=$cf_rpath_dst
8276
8277 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8278
8279 echo "${as_me:-configure}:8279: testing ...checked LIBS $LIBS ..." 1>&5
8280
8281         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8282
8283 echo "${as_me:-configure}:8283: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8284
8285 else
8286         echo "$as_me:8286: result: no" >&5
8287 echo "${ECHO_T}no" >&6
8288 fi
8289
8290 fi
8291
8292 fi
8293
8294 ### Depending on the system, someone may use rpath to build ncurses but not
8295 # want users of the package to rely upon that feature.  Give those people an
8296 # option to suppress that detail from EXTRA_LDFLAGS.
8297 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8298 if test -n "$EXTRA_PKG_LDFLAGS"
8299 then
8300         echo "$as_me:8300: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8301 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8302
8303 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8304 if test "${enable_pkg_ldflags+set}" = set; then
8305   enableval="$enable_pkg_ldflags"
8306   test "$enableval" != no && enableval=yes
8307         if test "$enableval" != "yes" ; then
8308     disable_pkg_ldflags=yes
8309         else
8310                 disable_pkg_ldflags=no
8311         fi
8312 else
8313   enableval=yes
8314         disable_pkg_ldflags=no
8315
8316 fi;
8317         echo "$as_me:8317: result: $disable_pkg_ldflags" >&5
8318 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8319         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8320 fi
8321
8322 ###############################################################################
8323
8324 ###     use option --with-extra-suffix to append suffix to headers and libraries
8325 echo "$as_me:8325: checking if you wish to append extra suffix to header/library paths" >&5
8326 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8327 EXTRA_SUFFIX=
8328
8329 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8330 if test "${with_extra_suffix+set}" = set; then
8331   withval="$with_extra_suffix"
8332   case x$withval in
8333         (xno)
8334                 ;;
8335         (xyes|x)
8336                 EXTRA_SUFFIX=$cf_cv_abi_version
8337                 ;;
8338         (*)
8339                 EXTRA_SUFFIX=$withval
8340                 ;;
8341         esac
8342
8343 fi;
8344 echo "$as_me:8344: result: $EXTRA_SUFFIX" >&5
8345 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8346
8347 ###     use option --disable-overwrite to leave out the link to -lcurses
8348 echo "$as_me:8348: checking if you wish to install ncurses overwriting curses" >&5
8349 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8350
8351 # Check whether --enable-overwrite or --disable-overwrite was given.
8352 if test "${enable_overwrite+set}" = set; then
8353   enableval="$enable_overwrite"
8354   with_overwrite=$enableval
8355 else
8356   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8357 fi;
8358 echo "$as_me:8358: result: $with_overwrite" >&5
8359 echo "${ECHO_T}$with_overwrite" >&6
8360
8361 echo "$as_me:8361: checking if external terminfo-database is used" >&5
8362 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8363
8364 # Check whether --enable-database or --disable-database was given.
8365 if test "${enable_database+set}" = set; then
8366   enableval="$enable_database"
8367   use_database=$enableval
8368 else
8369   use_database=yes
8370 fi;
8371 echo "$as_me:8371: result: $use_database" >&5
8372 echo "${ECHO_T}$use_database" >&6
8373
8374 case "$host_os" in
8375 (os2*)
8376         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8377         ;;
8378 (*)
8379         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8380         ;;
8381 esac
8382
8383 NCURSES_USE_DATABASE=0
8384 if test "$use_database" != no ; then
8385         NCURSES_USE_DATABASE=1
8386
8387         echo "$as_me:8387: checking which terminfo source-file will be installed" >&5
8388 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8389
8390 # Check whether --with-database or --without-database was given.
8391 if test "${with_database+set}" = set; then
8392   withval="$with_database"
8393   TERMINFO_SRC=$withval
8394 fi;
8395         echo "$as_me:8395: result: $TERMINFO_SRC" >&5
8396 echo "${ECHO_T}$TERMINFO_SRC" >&6
8397
8398         echo "$as_me:8398: checking whether to use hashed database instead of directory/tree" >&5
8399 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8400
8401 # Check whether --with-hashed-db or --without-hashed-db was given.
8402 if test "${with_hashed_db+set}" = set; then
8403   withval="$with_hashed_db"
8404
8405 else
8406   with_hashed_db=no
8407 fi;
8408         echo "$as_me:8408: result: $with_hashed_db" >&5
8409 echo "${ECHO_T}$with_hashed_db" >&6
8410 else
8411         with_hashed_db=no
8412 fi
8413
8414 echo "$as_me:8414: checking for list of fallback descriptions" >&5
8415 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8416
8417 # Check whether --with-fallbacks or --without-fallbacks was given.
8418 if test "${with_fallbacks+set}" = set; then
8419   withval="$with_fallbacks"
8420   with_fallback=$withval
8421 else
8422   with_fallback=
8423 fi;
8424 echo "$as_me:8424: result: $with_fallback" >&5
8425 echo "${ECHO_T}$with_fallback" >&6
8426
8427 case ".$with_fallback" in
8428 (.|.no)
8429         FALLBACK_LIST=
8430         ;;
8431 (.yes)
8432         { echo "$as_me:8432: WARNING: expected a list of terminal descriptions" >&5
8433 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8434         ;;
8435 (*)
8436         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8437         ;;
8438 esac
8439
8440 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8441 # tree for generating the terminal descriptions that will be compiled into the
8442 # library.  If your toolchain is old, it may not handle current terminal
8443 # databases.  Use configure-options to point to the tools which will be used,
8444 # rather than the first ones found on the $PATH.
8445 if test -n "$ac_tool_prefix"; then
8446   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8447 set dummy ${ac_tool_prefix}tic; ac_word=$2
8448 echo "$as_me:8448: checking for $ac_word" >&5
8449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8450 if test "${ac_cv_prog_TIC+set}" = set; then
8451   echo $ECHO_N "(cached) $ECHO_C" >&6
8452 else
8453   if test -n "$TIC"; then
8454   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8455 else
8456   ac_save_IFS=$IFS; IFS=$ac_path_separator
8457 ac_dummy="$PATH"
8458 for ac_dir in $ac_dummy; do
8459   IFS=$ac_save_IFS
8460   test -z "$ac_dir" && ac_dir=.
8461   $as_executable_p "$ac_dir/$ac_word" || continue
8462 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8463 echo "$as_me:8463: found $ac_dir/$ac_word" >&5
8464 break
8465 done
8466
8467 fi
8468 fi
8469 TIC=$ac_cv_prog_TIC
8470 if test -n "$TIC"; then
8471   echo "$as_me:8471: result: $TIC" >&5
8472 echo "${ECHO_T}$TIC" >&6
8473 else
8474   echo "$as_me:8474: result: no" >&5
8475 echo "${ECHO_T}no" >&6
8476 fi
8477
8478 fi
8479 if test -z "$ac_cv_prog_TIC"; then
8480   ac_ct_TIC=$TIC
8481   # Extract the first word of "tic", so it can be a program name with args.
8482 set dummy tic; ac_word=$2
8483 echo "$as_me:8483: checking for $ac_word" >&5
8484 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8485 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8486   echo $ECHO_N "(cached) $ECHO_C" >&6
8487 else
8488   if test -n "$ac_ct_TIC"; then
8489   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8490 else
8491   ac_save_IFS=$IFS; IFS=$ac_path_separator
8492 ac_dummy="$PATH"
8493 for ac_dir in $ac_dummy; do
8494   IFS=$ac_save_IFS
8495   test -z "$ac_dir" && ac_dir=.
8496   $as_executable_p "$ac_dir/$ac_word" || continue
8497 ac_cv_prog_ac_ct_TIC="tic"
8498 echo "$as_me:8498: found $ac_dir/$ac_word" >&5
8499 break
8500 done
8501
8502 fi
8503 fi
8504 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8505 if test -n "$ac_ct_TIC"; then
8506   echo "$as_me:8506: result: $ac_ct_TIC" >&5
8507 echo "${ECHO_T}$ac_ct_TIC" >&6
8508 else
8509   echo "$as_me:8509: result: no" >&5
8510 echo "${ECHO_T}no" >&6
8511 fi
8512
8513   TIC=$ac_ct_TIC
8514 else
8515   TIC="$ac_cv_prog_TIC"
8516 fi
8517
8518 if test -n "$ac_tool_prefix"; then
8519   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8520 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8521 echo "$as_me:8521: checking for $ac_word" >&5
8522 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8523 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8524   echo $ECHO_N "(cached) $ECHO_C" >&6
8525 else
8526   if test -n "$INFOCMP"; then
8527   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8528 else
8529   ac_save_IFS=$IFS; IFS=$ac_path_separator
8530 ac_dummy="$PATH"
8531 for ac_dir in $ac_dummy; do
8532   IFS=$ac_save_IFS
8533   test -z "$ac_dir" && ac_dir=.
8534   $as_executable_p "$ac_dir/$ac_word" || continue
8535 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8536 echo "$as_me:8536: found $ac_dir/$ac_word" >&5
8537 break
8538 done
8539
8540 fi
8541 fi
8542 INFOCMP=$ac_cv_prog_INFOCMP
8543 if test -n "$INFOCMP"; then
8544   echo "$as_me:8544: result: $INFOCMP" >&5
8545 echo "${ECHO_T}$INFOCMP" >&6
8546 else
8547   echo "$as_me:8547: result: no" >&5
8548 echo "${ECHO_T}no" >&6
8549 fi
8550
8551 fi
8552 if test -z "$ac_cv_prog_INFOCMP"; then
8553   ac_ct_INFOCMP=$INFOCMP
8554   # Extract the first word of "infocmp", so it can be a program name with args.
8555 set dummy infocmp; ac_word=$2
8556 echo "$as_me:8556: checking for $ac_word" >&5
8557 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8558 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8559   echo $ECHO_N "(cached) $ECHO_C" >&6
8560 else
8561   if test -n "$ac_ct_INFOCMP"; then
8562   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8563 else
8564   ac_save_IFS=$IFS; IFS=$ac_path_separator
8565 ac_dummy="$PATH"
8566 for ac_dir in $ac_dummy; do
8567   IFS=$ac_save_IFS
8568   test -z "$ac_dir" && ac_dir=.
8569   $as_executable_p "$ac_dir/$ac_word" || continue
8570 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8571 echo "$as_me:8571: found $ac_dir/$ac_word" >&5
8572 break
8573 done
8574
8575 fi
8576 fi
8577 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8578 if test -n "$ac_ct_INFOCMP"; then
8579   echo "$as_me:8579: result: $ac_ct_INFOCMP" >&5
8580 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8581 else
8582   echo "$as_me:8582: result: no" >&5
8583 echo "${ECHO_T}no" >&6
8584 fi
8585
8586   INFOCMP=$ac_ct_INFOCMP
8587 else
8588   INFOCMP="$ac_cv_prog_INFOCMP"
8589 fi
8590
8591 if test -n "$FALLBACK_LIST"
8592 then
8593
8594 # Check whether --with-tic-path or --without-tic-path was given.
8595 if test "${with_tic_path+set}" = set; then
8596   withval="$with_tic_path"
8597   echo "$as_me:8597: checking for tic program for fallbacks" >&5
8598 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8599                 TIC=$withval
8600                 echo "$as_me:8600: result: $TIC" >&5
8601 echo "${ECHO_T}$TIC" >&6
8602
8603 if test "x$prefix" != xNONE; then
8604         cf_path_syntax="$prefix"
8605 else
8606         cf_path_syntax="$ac_default_prefix"
8607 fi
8608
8609 case ".$TIC" in
8610 (.\$\(*\)*|.\'*\'*)
8611         ;;
8612 (..|./*|.\\*)
8613         ;;
8614 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8615         ;;
8616 (.\$\{*prefix\}*|.\$\{*dir\}*)
8617         eval TIC="$TIC"
8618         case ".$TIC" in
8619         (.NONE/*)
8620                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8621                 ;;
8622         esac
8623         ;;
8624 (.no|.NONE/*)
8625         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8626         ;;
8627 (*)
8628         { { echo "$as_me:8628: error: expected a pathname, not \"$TIC\"" >&5
8629 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8630    { (exit 1); exit 1; }; }
8631         ;;
8632 esac
8633
8634 else
8635
8636 test -z "$TIC" && TIC="tic"
8637 for ac_prog in $TIC tic
8638 do
8639   # Extract the first word of "$ac_prog", so it can be a program name with args.
8640 set dummy $ac_prog; ac_word=$2
8641 echo "$as_me:8641: checking for $ac_word" >&5
8642 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8643 if test "${ac_cv_path_TIC+set}" = set; then
8644   echo $ECHO_N "(cached) $ECHO_C" >&6
8645 else
8646   case $TIC in
8647   [\\/]* | ?:[\\/]*)
8648   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8649   ;;
8650   *)
8651   ac_save_IFS=$IFS; IFS=$ac_path_separator
8652 ac_dummy="$PATH:/usr/local/ncurses/bin"
8653 for ac_dir in $ac_dummy; do
8654   IFS=$ac_save_IFS
8655   test -z "$ac_dir" && ac_dir=.
8656   if $as_executable_p "$ac_dir/$ac_word"; then
8657    ac_cv_path_TIC="$ac_dir/$ac_word"
8658    echo "$as_me:8658: found $ac_dir/$ac_word" >&5
8659    break
8660 fi
8661 done
8662
8663   ;;
8664 esac
8665 fi
8666 TIC=$ac_cv_path_TIC
8667
8668 if test -n "$TIC"; then
8669   echo "$as_me:8669: result: $TIC" >&5
8670 echo "${ECHO_T}$TIC" >&6
8671 else
8672   echo "$as_me:8672: result: no" >&5
8673 echo "${ECHO_T}no" >&6
8674 fi
8675
8676   test -n "$TIC" && break
8677 done
8678 test -n "$TIC" || TIC="$TIC"
8679
8680 cf_path_prog=""
8681 cf_path_args=""
8682 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8683 for cf_temp in $ac_cv_path_TIC
8684 do
8685         if test -z "$cf_path_prog" ; then
8686                 if test "$with_full_paths" = yes ; then
8687
8688 if test "x$prefix" != xNONE; then
8689         cf_path_syntax="$prefix"
8690 else
8691         cf_path_syntax="$ac_default_prefix"
8692 fi
8693
8694 case ".$cf_temp" in
8695 (.\$\(*\)*|.\'*\'*)
8696         ;;
8697 (..|./*|.\\*)
8698         ;;
8699 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8700         ;;
8701 (.\$\{*prefix\}*|.\$\{*dir\}*)
8702         eval cf_temp="$cf_temp"
8703         case ".$cf_temp" in
8704         (.NONE/*)
8705                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8706                 ;;
8707         esac
8708         ;;
8709 (.no|.NONE/*)
8710         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8711         ;;
8712 (*)
8713         break
8714         ;;
8715 esac
8716
8717                         cf_path_prog="$cf_temp"
8718                 else
8719                         cf_path_prog="`basename "$cf_temp"`"
8720                 fi
8721         elif test -z "$cf_path_args" ; then
8722                 cf_path_args="$cf_temp"
8723         else
8724                 cf_path_args="$cf_path_args $cf_temp"
8725         fi
8726 done
8727 IFS="$cf_save_ifs"
8728
8729 if test -n "$cf_path_prog" ; then
8730
8731 echo "${as_me:-configure}:8731: testing defining path for ${cf_path_prog} ..." 1>&5
8732
8733 cat >>confdefs.h <<EOF
8734 #define TIC_PATH "$cf_path_prog"
8735 EOF
8736
8737         test -n "$cf_path_args" &&
8738 cat >>confdefs.h <<EOF
8739 #define TIC_ARGS "$cf_path_args"
8740 EOF
8741
8742 fi
8743
8744                 if test -z "$TIC"
8745                 then
8746                         { echo "$as_me:8746: WARNING: no tic program found for fallbacks" >&5
8747 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8748                 fi
8749
8750 fi;
8751
8752 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8753 if test "${with_infocmp_path+set}" = set; then
8754   withval="$with_infocmp_path"
8755   echo "$as_me:8755: checking for infocmp program for fallbacks" >&5
8756 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8757                 INFOCMP=$withval
8758                 echo "$as_me:8758: result: $INFOCMP" >&5
8759 echo "${ECHO_T}$INFOCMP" >&6
8760
8761 if test "x$prefix" != xNONE; then
8762         cf_path_syntax="$prefix"
8763 else
8764         cf_path_syntax="$ac_default_prefix"
8765 fi
8766
8767 case ".$INFOCMP" in
8768 (.\$\(*\)*|.\'*\'*)
8769         ;;
8770 (..|./*|.\\*)
8771         ;;
8772 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8773         ;;
8774 (.\$\{*prefix\}*|.\$\{*dir\}*)
8775         eval INFOCMP="$INFOCMP"
8776         case ".$INFOCMP" in
8777         (.NONE/*)
8778                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8779                 ;;
8780         esac
8781         ;;
8782 (.no|.NONE/*)
8783         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8784         ;;
8785 (*)
8786         { { echo "$as_me:8786: error: expected a pathname, not \"$INFOCMP\"" >&5
8787 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8788    { (exit 1); exit 1; }; }
8789         ;;
8790 esac
8791
8792 else
8793
8794 test -z "$INFOCMP" && INFOCMP="infocmp"
8795 for ac_prog in $INFOCMP infocmp
8796 do
8797   # Extract the first word of "$ac_prog", so it can be a program name with args.
8798 set dummy $ac_prog; ac_word=$2
8799 echo "$as_me:8799: checking for $ac_word" >&5
8800 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8801 if test "${ac_cv_path_INFOCMP+set}" = set; then
8802   echo $ECHO_N "(cached) $ECHO_C" >&6
8803 else
8804   case $INFOCMP in
8805   [\\/]* | ?:[\\/]*)
8806   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8807   ;;
8808   *)
8809   ac_save_IFS=$IFS; IFS=$ac_path_separator
8810 ac_dummy="$PATH:/usr/local/ncurses/bin"
8811 for ac_dir in $ac_dummy; do
8812   IFS=$ac_save_IFS
8813   test -z "$ac_dir" && ac_dir=.
8814   if $as_executable_p "$ac_dir/$ac_word"; then
8815    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8816    echo "$as_me:8816: found $ac_dir/$ac_word" >&5
8817    break
8818 fi
8819 done
8820
8821   ;;
8822 esac
8823 fi
8824 INFOCMP=$ac_cv_path_INFOCMP
8825
8826 if test -n "$INFOCMP"; then
8827   echo "$as_me:8827: result: $INFOCMP" >&5
8828 echo "${ECHO_T}$INFOCMP" >&6
8829 else
8830   echo "$as_me:8830: result: no" >&5
8831 echo "${ECHO_T}no" >&6
8832 fi
8833
8834   test -n "$INFOCMP" && break
8835 done
8836 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8837
8838 cf_path_prog=""
8839 cf_path_args=""
8840 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8841 for cf_temp in $ac_cv_path_INFOCMP
8842 do
8843         if test -z "$cf_path_prog" ; then
8844                 if test "$with_full_paths" = yes ; then
8845
8846 if test "x$prefix" != xNONE; then
8847         cf_path_syntax="$prefix"
8848 else
8849         cf_path_syntax="$ac_default_prefix"
8850 fi
8851
8852 case ".$cf_temp" in
8853 (.\$\(*\)*|.\'*\'*)
8854         ;;
8855 (..|./*|.\\*)
8856         ;;
8857 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8858         ;;
8859 (.\$\{*prefix\}*|.\$\{*dir\}*)
8860         eval cf_temp="$cf_temp"
8861         case ".$cf_temp" in
8862         (.NONE/*)
8863                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8864                 ;;
8865         esac
8866         ;;
8867 (.no|.NONE/*)
8868         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8869         ;;
8870 (*)
8871         break
8872         ;;
8873 esac
8874
8875                         cf_path_prog="$cf_temp"
8876                 else
8877                         cf_path_prog="`basename "$cf_temp"`"
8878                 fi
8879         elif test -z "$cf_path_args" ; then
8880                 cf_path_args="$cf_temp"
8881         else
8882                 cf_path_args="$cf_path_args $cf_temp"
8883         fi
8884 done
8885 IFS="$cf_save_ifs"
8886
8887 if test -n "$cf_path_prog" ; then
8888
8889 echo "${as_me:-configure}:8889: testing defining path for ${cf_path_prog} ..." 1>&5
8890
8891 cat >>confdefs.h <<EOF
8892 #define INFOCMP_PATH "$cf_path_prog"
8893 EOF
8894
8895         test -n "$cf_path_args" &&
8896 cat >>confdefs.h <<EOF
8897 #define INFOCMP_ARGS "$cf_path_args"
8898 EOF
8899
8900 fi
8901
8902                 if test -z "$INFOCMP"
8903                 then
8904                         { echo "$as_me:8904: WARNING: no infocmp program found for fallbacks" >&5
8905 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8906                 fi
8907
8908 fi;
8909
8910         test -z "$TIC" && FALLBACK_LIST=
8911         test -z "$INFOCMP" && FALLBACK_LIST=
8912         if test -z "$FALLBACK_LIST"
8913         then
8914                 { echo "$as_me:8914: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8915 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8916         fi
8917 fi
8918
8919 USE_FALLBACKS=
8920 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8921
8922 echo "$as_me:8922: checking if you want modern xterm or antique" >&5
8923 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8924
8925 # Check whether --with-xterm-new or --without-xterm-new was given.
8926 if test "${with_xterm_new+set}" = set; then
8927   withval="$with_xterm_new"
8928   with_xterm_new=$withval
8929 else
8930   with_xterm_new=yes
8931 fi;
8932 case "$with_xterm_new" in
8933 (no) with_xterm_new=xterm-old;;
8934 (*)      with_xterm_new=xterm-new;;
8935 esac
8936 echo "$as_me:8936: result: $with_xterm_new" >&5
8937 echo "${ECHO_T}$with_xterm_new" >&6
8938 WHICH_XTERM=$with_xterm_new
8939
8940 echo "$as_me:8940: checking if xterm backspace sends BS or DEL" >&5
8941 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8942
8943 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8944 if test "${with_xterm_kbs+set}" = set; then
8945   withval="$with_xterm_kbs"
8946   with_xterm_kbs=$withval
8947 else
8948   with_xterm_kbs=BS
8949 fi;
8950 case x$with_xterm_kbs in
8951 (xyes|xno|xBS|xbs|x8)
8952         with_xterm_kbs=BS
8953         ;;
8954 (xDEL|xdel|x127)
8955         with_xterm_kbs=DEL
8956         ;;
8957 (*)
8958         with_xterm_kbs=$withval
8959         ;;
8960 esac
8961 echo "$as_me:8961: result: $with_xterm_kbs" >&5
8962 echo "${ECHO_T}$with_xterm_kbs" >&6
8963 XTERM_KBS=$with_xterm_kbs
8964
8965 MAKE_TERMINFO=
8966 if test "$use_database" = no ; then
8967         TERMINFO="${datadir}/terminfo"
8968         MAKE_TERMINFO="#"
8969 else
8970
8971 echo "$as_me:8971: checking for list of terminfo directories" >&5
8972 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8973
8974 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8975 if test "${with_terminfo_dirs+set}" = set; then
8976   withval="$with_terminfo_dirs"
8977
8978 else
8979   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8980 fi;
8981 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8982 cf_dst_path=
8983 for cf_src_path in $withval
8984 do
8985
8986 if test "x$prefix" != xNONE; then
8987         cf_path_syntax="$prefix"
8988 else
8989         cf_path_syntax="$ac_default_prefix"
8990 fi
8991
8992 case ".$cf_src_path" in
8993 (.\$\(*\)*|.\'*\'*)
8994         ;;
8995 (..|./*|.\\*)
8996         ;;
8997 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8998         ;;
8999 (.\$\{*prefix\}*|.\$\{*dir\}*)
9000         eval cf_src_path="$cf_src_path"
9001         case ".$cf_src_path" in
9002         (.NONE/*)
9003                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9004                 ;;
9005         esac
9006         ;;
9007 (.no|.NONE/*)
9008         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9009         ;;
9010 (*)
9011         { { echo "$as_me:9011: error: expected a pathname, not \"$cf_src_path\"" >&5
9012 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9013    { (exit 1); exit 1; }; }
9014         ;;
9015 esac
9016
9017   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9018   cf_dst_path="${cf_dst_path}${cf_src_path}"
9019 done
9020 IFS="$ac_save_ifs"
9021
9022 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9023 # so we have to check/work around.  We do prefer the result of "eval"...
9024 eval cf_dst_eval="$cf_dst_path"
9025 case "x$cf_dst_eval" in
9026 (xNONE*)
9027         TERMINFO_DIRS=$cf_dst_path
9028         ;;
9029 (*)
9030         TERMINFO_DIRS="$cf_dst_eval"
9031         ;;
9032 esac
9033
9034 echo "$as_me:9034: result: $TERMINFO_DIRS" >&5
9035 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9036 test -n "$TERMINFO_DIRS" &&
9037 cat >>confdefs.h <<EOF
9038 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9039 EOF
9040
9041 case "x$TERMINFO" in
9042 x???:*)
9043         { echo "$as_me:9043: WARNING: ignoring non-directory/file TERMINFO value" >&5
9044 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9045         unset TERMINFO
9046         ;;
9047 esac
9048
9049 echo "$as_me:9049: checking for default terminfo directory" >&5
9050 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9051
9052 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9053 if test "${with_default_terminfo_dir+set}" = set; then
9054   withval="$with_default_terminfo_dir"
9055
9056 else
9057   withval="${TERMINFO:-${datadir}/terminfo}"
9058 fi; if test -n "${datadir}/terminfo" ; then
9059
9060 if test "x$prefix" != xNONE; then
9061         cf_path_syntax="$prefix"
9062 else
9063         cf_path_syntax="$ac_default_prefix"
9064 fi
9065
9066 case ".$withval" in
9067 (.\$\(*\)*|.\'*\'*)
9068         ;;
9069 (..|./*|.\\*)
9070         ;;
9071 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9072         ;;
9073 (.\$\{*prefix\}*|.\$\{*dir\}*)
9074         eval withval="$withval"
9075         case ".$withval" in
9076         (.NONE/*)
9077                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9078                 ;;
9079         esac
9080         ;;
9081 (.no|.NONE/*)
9082         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9083         ;;
9084 (*)
9085         { { echo "$as_me:9085: error: expected a pathname, not \"$withval\"" >&5
9086 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9087    { (exit 1); exit 1; }; }
9088         ;;
9089 esac
9090
9091 fi
9092 eval TERMINFO="$withval"
9093
9094 echo "$as_me:9094: result: $TERMINFO" >&5
9095 echo "${ECHO_T}$TERMINFO" >&6
9096
9097 cat >>confdefs.h <<EOF
9098 #define TERMINFO "$TERMINFO"
9099 EOF
9100
9101 fi
9102
9103 ###     use option --disable-big-core to make tic run on small machines
9104 ###     We need 4Mb, check if we can allocate 50% more than that.
9105 echo "$as_me:9105: checking if big-core option selected" >&5
9106 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9107
9108 # Check whether --enable-big-core or --disable-big-core was given.
9109 if test "${enable_big_core+set}" = set; then
9110   enableval="$enable_big_core"
9111   with_big_core=$enableval
9112 else
9113   if test "$cross_compiling" = yes; then
9114   with_big_core=no
9115 else
9116   cat >"conftest.$ac_ext" <<_ACEOF
9117 #line 9117 "configure"
9118 #include "confdefs.h"
9119
9120 #include <stdlib.h>
9121 #include <string.h>
9122 int main() {
9123         unsigned long n = 6000000L;
9124         char *s = malloc(n);
9125         if (s != 0)
9126                 s[0] = s[n-1] = 0;
9127         ${cf_cv_main_return:-return}(s == 0);
9128 }
9129 _ACEOF
9130 rm -f "conftest$ac_exeext"
9131 if { (eval echo "$as_me:9131: \"$ac_link\"") >&5
9132   (eval $ac_link) 2>&5
9133   ac_status=$?
9134   echo "$as_me:9134: \$? = $ac_status" >&5
9135   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9136   { (eval echo "$as_me:9136: \"$ac_try\"") >&5
9137   (eval $ac_try) 2>&5
9138   ac_status=$?
9139   echo "$as_me:9139: \$? = $ac_status" >&5
9140   (exit "$ac_status"); }; }; then
9141   with_big_core=yes
9142 else
9143   echo "$as_me: program exited with status $ac_status" >&5
9144 echo "$as_me: failed program was:" >&5
9145 cat "conftest.$ac_ext" >&5
9146 with_big_core=no
9147 fi
9148 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9149 fi
9150 fi;
9151 echo "$as_me:9151: result: $with_big_core" >&5
9152 echo "${ECHO_T}$with_big_core" >&6
9153 test "x$with_big_core" = "xyes" &&
9154 cat >>confdefs.h <<\EOF
9155 #define HAVE_BIG_CORE 1
9156 EOF
9157
9158 ### ISO C only guarantees 512-char strings, we have tables which load faster
9159 ### when constructed using "big" strings.  More than the C compiler, the awk
9160 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9161 echo "$as_me:9161: checking if big-strings option selected" >&5
9162 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9163
9164 # Check whether --enable-big-strings or --disable-big-strings was given.
9165 if test "${enable_big_strings+set}" = set; then
9166   enableval="$enable_big_strings"
9167   with_big_strings=$enableval
9168 else
9169
9170         case x$AWK in
9171         (x)
9172                 eval with_big_strings=no
9173                 ;;
9174         (*)
9175                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9176                         | $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
9177                         eval with_big_strings=yes
9178                 else
9179                         eval with_big_strings=no
9180                 fi
9181                 ;;
9182         esac
9183
9184 fi;
9185 echo "$as_me:9185: result: $with_big_strings" >&5
9186 echo "${ECHO_T}$with_big_strings" >&6
9187
9188 USE_BIG_STRINGS=0
9189 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9190
9191 ###     use option --enable-termcap to compile in the termcap fallback support
9192 echo "$as_me:9192: checking if you want termcap-fallback support" >&5
9193 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9194
9195 # Check whether --enable-termcap or --disable-termcap was given.
9196 if test "${enable_termcap+set}" = set; then
9197   enableval="$enable_termcap"
9198   with_termcap=$enableval
9199 else
9200   with_termcap=no
9201 fi;
9202 echo "$as_me:9202: result: $with_termcap" >&5
9203 echo "${ECHO_T}$with_termcap" >&6
9204
9205 NCURSES_USE_TERMCAP=0
9206 if test "x$with_termcap" != "xyes" ; then
9207         if test "$use_database" = no ; then
9208                 if test -z "$with_fallback" ; then
9209                         { { echo "$as_me:9209: error: You have disabled the database w/o specifying fallbacks" >&5
9210 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9211    { (exit 1); exit 1; }; }
9212                 fi
9213         fi
9214
9215 cat >>confdefs.h <<\EOF
9216 #define PURE_TERMINFO 1
9217 EOF
9218
9219 else
9220
9221         if test "$with_ticlib" != no ; then
9222                 { { echo "$as_me:9222: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9223 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9224    { (exit 1); exit 1; }; }
9225         fi
9226
9227         NCURSES_USE_TERMCAP=1
9228         echo "$as_me:9228: checking for list of termcap files" >&5
9229 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9230
9231 # Check whether --with-termpath or --without-termpath was given.
9232 if test "${with_termpath+set}" = set; then
9233   withval="$with_termpath"
9234
9235 else
9236   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9237 fi;
9238 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9239 cf_dst_path=
9240 for cf_src_path in $withval
9241 do
9242
9243 if test "x$prefix" != xNONE; then
9244         cf_path_syntax="$prefix"
9245 else
9246         cf_path_syntax="$ac_default_prefix"
9247 fi
9248
9249 case ".$cf_src_path" in
9250 (.\$\(*\)*|.\'*\'*)
9251         ;;
9252 (..|./*|.\\*)
9253         ;;
9254 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9255         ;;
9256 (.\$\{*prefix\}*|.\$\{*dir\}*)
9257         eval cf_src_path="$cf_src_path"
9258         case ".$cf_src_path" in
9259         (.NONE/*)
9260                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9261                 ;;
9262         esac
9263         ;;
9264 (.no|.NONE/*)
9265         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9266         ;;
9267 (*)
9268         { { echo "$as_me:9268: error: expected a pathname, not \"$cf_src_path\"" >&5
9269 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9270    { (exit 1); exit 1; }; }
9271         ;;
9272 esac
9273
9274   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9275   cf_dst_path="${cf_dst_path}${cf_src_path}"
9276 done
9277 IFS="$ac_save_ifs"
9278
9279 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9280 # so we have to check/work around.  We do prefer the result of "eval"...
9281 eval cf_dst_eval="$cf_dst_path"
9282 case "x$cf_dst_eval" in
9283 (xNONE*)
9284         TERMPATH=$cf_dst_path
9285         ;;
9286 (*)
9287         TERMPATH="$cf_dst_eval"
9288         ;;
9289 esac
9290
9291         echo "$as_me:9291: result: $TERMPATH" >&5
9292 echo "${ECHO_T}$TERMPATH" >&6
9293         test -n "$TERMPATH" &&
9294 cat >>confdefs.h <<EOF
9295 #define TERMPATH "$TERMPATH"
9296 EOF
9297
9298         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9299         echo "$as_me:9299: checking if fast termcap-loader is needed" >&5
9300 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9301
9302 # Check whether --enable-getcap or --disable-getcap was given.
9303 if test "${enable_getcap+set}" = set; then
9304   enableval="$enable_getcap"
9305   with_getcap=$enableval
9306 else
9307   with_getcap=no
9308 fi;
9309         echo "$as_me:9309: result: $with_getcap" >&5
9310 echo "${ECHO_T}$with_getcap" >&6
9311         test "x$with_getcap" = "xyes" &&
9312 cat >>confdefs.h <<\EOF
9313 #define USE_GETCAP 1
9314 EOF
9315
9316         echo "$as_me:9316: checking if translated termcaps will be cached in ~/.terminfo" >&5
9317 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9318
9319 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9320 if test "${enable_getcap_cache+set}" = set; then
9321   enableval="$enable_getcap_cache"
9322   with_getcap_cache=$enableval
9323 else
9324   with_getcap_cache=no
9325 fi;
9326         echo "$as_me:9326: result: $with_getcap_cache" >&5
9327 echo "${ECHO_T}$with_getcap_cache" >&6
9328         test "x$with_getcap_cache" = "xyes" &&
9329 cat >>confdefs.h <<\EOF
9330 #define USE_GETCAP_CACHE 1
9331 EOF
9332
9333 fi
9334
9335 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9336 echo "$as_me:9336: checking if ~/.terminfo is wanted" >&5
9337 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9338
9339 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9340 if test "${enable_home_terminfo+set}" = set; then
9341   enableval="$enable_home_terminfo"
9342   with_home_terminfo=$enableval
9343 else
9344   with_home_terminfo=yes
9345 fi;
9346 echo "$as_me:9346: result: $with_home_terminfo" >&5
9347 echo "${ECHO_T}$with_home_terminfo" >&6
9348 test "x$with_home_terminfo" = "xyes" &&
9349 cat >>confdefs.h <<\EOF
9350 #define USE_HOME_TERMINFO 1
9351 EOF
9352
9353 echo "$as_me:9353: checking if you want to permit root to use ncurses environment variables" >&5
9354 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9355
9356 # Check whether --enable-root-environ or --disable-root-environ was given.
9357 if test "${enable_root_environ+set}" = set; then
9358   enableval="$enable_root_environ"
9359   with_root_environ=$enableval
9360 else
9361   with_root_environ=yes
9362 fi;
9363 echo "$as_me:9363: result: $with_root_environ" >&5
9364 echo "${ECHO_T}$with_root_environ" >&6
9365 test "x$with_root_environ" = xyes &&
9366 cat >>confdefs.h <<\EOF
9367 #define USE_ROOT_ENVIRON 1
9368 EOF
9369
9370 echo "$as_me:9370: checking if you want to permit setuid programs to access all files" >&5
9371 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9372
9373 # Check whether --enable-root-environ or --disable-root-environ was given.
9374 if test "${enable_root_environ+set}" = set; then
9375   enableval="$enable_root_environ"
9376   with_root_access=$enableval
9377 else
9378   with_root_access=yes
9379 fi;
9380 echo "$as_me:9380: result: $with_root_access" >&5
9381 echo "${ECHO_T}$with_root_access" >&6
9382 test "x$with_root_access" = xyes &&
9383 cat >>confdefs.h <<\EOF
9384 #define USE_ROOT_ACCESS 1
9385 EOF
9386
9387 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9388 ###   to reduce storage requirements for the terminfo database.
9389
9390 for ac_header in \
9391 unistd.h \
9392
9393 do
9394 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9395 echo "$as_me:9395: checking for $ac_header" >&5
9396 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9397 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9398   echo $ECHO_N "(cached) $ECHO_C" >&6
9399 else
9400   cat >"conftest.$ac_ext" <<_ACEOF
9401 #line 9401 "configure"
9402 #include "confdefs.h"
9403 #include <$ac_header>
9404 _ACEOF
9405 if { (eval echo "$as_me:9405: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9406   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9407   ac_status=$?
9408   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9409   rm -f conftest.er1
9410   cat conftest.err >&5
9411   echo "$as_me:9411: \$? = $ac_status" >&5
9412   (exit "$ac_status"); } >/dev/null; then
9413   if test -s conftest.err; then
9414     ac_cpp_err=$ac_c_preproc_warn_flag
9415   else
9416     ac_cpp_err=
9417   fi
9418 else
9419   ac_cpp_err=yes
9420 fi
9421 if test -z "$ac_cpp_err"; then
9422   eval "$as_ac_Header=yes"
9423 else
9424   echo "$as_me: failed program was:" >&5
9425   cat "conftest.$ac_ext" >&5
9426   eval "$as_ac_Header=no"
9427 fi
9428 rm -f conftest.err "conftest.$ac_ext"
9429 fi
9430 echo "$as_me:9430: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9431 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9432 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9433   cat >>confdefs.h <<EOF
9434 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9435 EOF
9436
9437 fi
9438 done
9439
9440 for ac_func in \
9441         remove \
9442         unlink
9443 do
9444 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9445 echo "$as_me:9445: checking for $ac_func" >&5
9446 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9447 if eval "test \"\${$as_ac_var+set}\" = set"; then
9448   echo $ECHO_N "(cached) $ECHO_C" >&6
9449 else
9450   cat >"conftest.$ac_ext" <<_ACEOF
9451 #line 9451 "configure"
9452 #include "confdefs.h"
9453 #define $ac_func autoconf_temporary
9454 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9455 #undef $ac_func
9456
9457 #ifdef __cplusplus
9458 extern "C"
9459 #endif
9460
9461 /* We use char because int might match the return type of a gcc2
9462    builtin and then its argument prototype would still apply.  */
9463 char $ac_func (void);
9464
9465 int
9466 main (void)
9467 {
9468
9469 /* The GNU C library defines stubs for functions which it implements
9470     to always fail with ENOSYS.  Some functions are actually named
9471     something starting with __ and the normal name is an alias.  */
9472 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9473 #error found stub for $ac_func
9474 #endif
9475
9476         return $ac_func ();
9477   ;
9478   return 0;
9479 }
9480 _ACEOF
9481 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9482 if { (eval echo "$as_me:9482: \"$ac_link\"") >&5
9483   (eval $ac_link) 2>&5
9484   ac_status=$?
9485   echo "$as_me:9485: \$? = $ac_status" >&5
9486   (exit "$ac_status"); } &&
9487          { ac_try='test -s "conftest$ac_exeext"'
9488   { (eval echo "$as_me:9488: \"$ac_try\"") >&5
9489   (eval $ac_try) 2>&5
9490   ac_status=$?
9491   echo "$as_me:9491: \$? = $ac_status" >&5
9492   (exit "$ac_status"); }; }; then
9493   eval "$as_ac_var=yes"
9494 else
9495   echo "$as_me: failed program was:" >&5
9496 cat "conftest.$ac_ext" >&5
9497 eval "$as_ac_var=no"
9498 fi
9499 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9500 fi
9501 echo "$as_me:9501: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9502 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9503 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9504   cat >>confdefs.h <<EOF
9505 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9506 EOF
9507
9508 fi
9509 done
9510
9511 if test "$cross_compiling" = yes ; then
9512
9513 for ac_func in \
9514                 link \
9515                 symlink
9516 do
9517 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9518 echo "$as_me:9518: checking for $ac_func" >&5
9519 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9520 if eval "test \"\${$as_ac_var+set}\" = set"; then
9521   echo $ECHO_N "(cached) $ECHO_C" >&6
9522 else
9523   cat >"conftest.$ac_ext" <<_ACEOF
9524 #line 9524 "configure"
9525 #include "confdefs.h"
9526 #define $ac_func autoconf_temporary
9527 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9528 #undef $ac_func
9529
9530 #ifdef __cplusplus
9531 extern "C"
9532 #endif
9533
9534 /* We use char because int might match the return type of a gcc2
9535    builtin and then its argument prototype would still apply.  */
9536 char $ac_func (void);
9537
9538 int
9539 main (void)
9540 {
9541
9542 /* The GNU C library defines stubs for functions which it implements
9543     to always fail with ENOSYS.  Some functions are actually named
9544     something starting with __ and the normal name is an alias.  */
9545 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9546 #error found stub for $ac_func
9547 #endif
9548
9549         return $ac_func ();
9550   ;
9551   return 0;
9552 }
9553 _ACEOF
9554 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9555 if { (eval echo "$as_me:9555: \"$ac_link\"") >&5
9556   (eval $ac_link) 2>&5
9557   ac_status=$?
9558   echo "$as_me:9558: \$? = $ac_status" >&5
9559   (exit "$ac_status"); } &&
9560          { ac_try='test -s "conftest$ac_exeext"'
9561   { (eval echo "$as_me:9561: \"$ac_try\"") >&5
9562   (eval $ac_try) 2>&5
9563   ac_status=$?
9564   echo "$as_me:9564: \$? = $ac_status" >&5
9565   (exit "$ac_status"); }; }; then
9566   eval "$as_ac_var=yes"
9567 else
9568   echo "$as_me: failed program was:" >&5
9569 cat "conftest.$ac_ext" >&5
9570 eval "$as_ac_var=no"
9571 fi
9572 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9573 fi
9574 echo "$as_me:9574: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9575 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9576 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9577   cat >>confdefs.h <<EOF
9578 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9579 EOF
9580
9581 fi
9582 done
9583
9584 else
9585         echo "$as_me:9585: checking if link/symlink functions work" >&5
9586 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9587 if test "${cf_cv_link_funcs+set}" = set; then
9588   echo $ECHO_N "(cached) $ECHO_C" >&6
9589 else
9590
9591                 cf_cv_link_funcs=
9592                 for cf_func in link symlink ; do
9593                         if test "$cross_compiling" = yes; then
9594
9595                         eval 'ac_cv_func_'$cf_func'=error'
9596 else
9597   cat >"conftest.$ac_ext" <<_ACEOF
9598 #line 9598 "configure"
9599 #include "confdefs.h"
9600
9601 #include <stdio.h>
9602 #include <sys/types.h>
9603 #include <sys/stat.h>
9604 #ifdef HAVE_UNISTD_H
9605 #include <unistd.h>
9606 #endif
9607 int main(void)
9608 {
9609         int fail = 0;
9610         char *src = "conftest.tmp";
9611         char *dst = "conftest.chk";
9612         struct stat src_sb, dst_sb;
9613         FILE *fp = fopen(src, "w");
9614         if (fp == 0) { fail = 3; } else {
9615                 fclose(fp); stat(src, &src_sb);
9616                 if ($cf_func(src, dst) < 0) {
9617                         fail = 1;
9618                 } else if (stat(dst, &dst_sb) < 0) {
9619                         fail = 2;
9620                 } else {
9621                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9622                         if (diff < 0) diff = -diff;
9623                         if (diff > 2) fail = 3;
9624                 }
9625         }
9626 #ifdef HAVE_UNLINK
9627         unlink(dst); unlink(src);
9628 #else
9629         remove(dst); remove(src);
9630 #endif
9631         ${cf_cv_main_return:-return} (fail);
9632 }
9633
9634 _ACEOF
9635 rm -f "conftest$ac_exeext"
9636 if { (eval echo "$as_me:9636: \"$ac_link\"") >&5
9637   (eval $ac_link) 2>&5
9638   ac_status=$?
9639   echo "$as_me:9639: \$? = $ac_status" >&5
9640   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9641   { (eval echo "$as_me:9641: \"$ac_try\"") >&5
9642   (eval $ac_try) 2>&5
9643   ac_status=$?
9644   echo "$as_me:9644: \$? = $ac_status" >&5
9645   (exit "$ac_status"); }; }; then
9646
9647                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9648                         eval 'ac_cv_func_'$cf_func'=yes'
9649 else
9650   echo "$as_me: program exited with status $ac_status" >&5
9651 echo "$as_me: failed program was:" >&5
9652 cat "conftest.$ac_ext" >&5
9653
9654                         eval 'ac_cv_func_'$cf_func'=no'
9655 fi
9656 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9657 fi
9658                 done
9659                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9660
9661 fi
9662 echo "$as_me:9662: result: $cf_cv_link_funcs" >&5
9663 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9664         test "$ac_cv_func_link"    = yes &&
9665 cat >>confdefs.h <<\EOF
9666 #define HAVE_LINK 1
9667 EOF
9668
9669         test "$ac_cv_func_symlink" = yes &&
9670 cat >>confdefs.h <<\EOF
9671 #define HAVE_SYMLINK 1
9672 EOF
9673
9674 fi
9675
9676 with_links=no
9677 with_symlinks=no
9678
9679 # soft links (symbolic links) are useful for some systems where hard links do
9680 # not work, or to make it simpler to copy terminfo trees around.
9681 if test "x$ac_cv_func_symlink" = xyes ; then
9682         echo "$as_me:9682: checking if tic should use symbolic links" >&5
9683 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9684
9685 # Check whether --enable-symlinks or --disable-symlinks was given.
9686 if test "${enable_symlinks+set}" = set; then
9687   enableval="$enable_symlinks"
9688   with_symlinks=$enableval
9689 else
9690   with_symlinks=no
9691 fi;
9692         echo "$as_me:9692: result: $with_symlinks" >&5
9693 echo "${ECHO_T}$with_symlinks" >&6
9694 fi
9695
9696 # If we have hard links and did not choose to use soft links instead, there is
9697 # no reason to make this choice optional - use the hard links.
9698 if test "$with_symlinks" = no ; then
9699         echo "$as_me:9699: checking if tic should use hard links" >&5
9700 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9701         if test "x$ac_cv_func_link" = xyes ; then
9702                 with_links=yes
9703         else
9704                 with_links=no
9705         fi
9706         echo "$as_me:9706: result: $with_links" >&5
9707 echo "${ECHO_T}$with_links" >&6
9708 fi
9709
9710 test "x$with_links" = xyes &&
9711 cat >>confdefs.h <<\EOF
9712 #define USE_LINKS 1
9713 EOF
9714
9715 test "x$with_symlinks" = xyes &&
9716 cat >>confdefs.h <<\EOF
9717 #define USE_SYMLINKS 1
9718 EOF
9719
9720 ###   use option --enable-broken-linker to force on use of broken-linker support
9721
9722 echo "$as_me:9722: checking if you want broken-linker support code" >&5
9723 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9724
9725 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9726 if test "${enable_broken_linker+set}" = set; then
9727   enableval="$enable_broken_linker"
9728   with_broken_linker=$enableval
9729 else
9730   with_broken_linker=no
9731 fi;
9732 echo "$as_me:9732: result: $with_broken_linker" >&5
9733 echo "${ECHO_T}$with_broken_linker" >&6
9734
9735 : "${BROKEN_LINKER:=0}"
9736 if test "x$with_broken_linker" = xyes ; then
9737
9738 cat >>confdefs.h <<\EOF
9739 #define BROKEN_LINKER 1
9740 EOF
9741
9742         BROKEN_LINKER=1
9743 fi
9744
9745 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9746 echo "$as_me:9746: checking if tputs should process BSD-style prefix padding" >&5
9747 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9748
9749 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9750 if test "${enable_bsdpad+set}" = set; then
9751   enableval="$enable_bsdpad"
9752   with_bsdpad=$enableval
9753 else
9754   with_bsdpad=no
9755 fi;
9756 echo "$as_me:9756: result: $with_bsdpad" >&5
9757 echo "${ECHO_T}$with_bsdpad" >&6
9758 test "x$with_bsdpad" = xyes &&
9759 cat >>confdefs.h <<\EOF
9760 #define BSD_TPUTS 1
9761 EOF
9762
9763 ###   use option --enable-widec to turn on use of wide-character support
9764 NCURSES_CH_T=chtype
9765 NCURSES_LIBUTF8=0
9766
9767 NEED_WCHAR_H=0
9768 NCURSES_MBSTATE_T=0
9769 NCURSES_WCHAR_T=0
9770 NCURSES_WINT_T=0
9771
9772 # Check to define _XOPEN_SOURCE "automatically"
9773 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9774
9775 echo "$as_me:9775: checking if the POSIX test-macros are already defined" >&5
9776 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9777 if test "${cf_cv_posix_visible+set}" = set; then
9778   echo $ECHO_N "(cached) $ECHO_C" >&6
9779 else
9780
9781 cat >"conftest.$ac_ext" <<_ACEOF
9782 #line 9782 "configure"
9783 #include "confdefs.h"
9784 #include <stdio.h>
9785 int
9786 main (void)
9787 {
9788
9789 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9790         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9791         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9792         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9793 #error conflicting symbols found
9794 #endif
9795
9796   ;
9797   return 0;
9798 }
9799 _ACEOF
9800 rm -f "conftest.$ac_objext"
9801 if { (eval echo "$as_me:9801: \"$ac_compile\"") >&5
9802   (eval $ac_compile) 2>&5
9803   ac_status=$?
9804   echo "$as_me:9804: \$? = $ac_status" >&5
9805   (exit "$ac_status"); } &&
9806          { ac_try='test -s "conftest.$ac_objext"'
9807   { (eval echo "$as_me:9807: \"$ac_try\"") >&5
9808   (eval $ac_try) 2>&5
9809   ac_status=$?
9810   echo "$as_me:9810: \$? = $ac_status" >&5
9811   (exit "$ac_status"); }; }; then
9812   cf_cv_posix_visible=no
9813 else
9814   echo "$as_me: failed program was:" >&5
9815 cat "conftest.$ac_ext" >&5
9816 cf_cv_posix_visible=yes
9817 fi
9818 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9819
9820 fi
9821 echo "$as_me:9821: result: $cf_cv_posix_visible" >&5
9822 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9823
9824 if test "$cf_cv_posix_visible" = no; then
9825
9826 cf_XOPEN_SOURCE=600
9827 cf_POSIX_C_SOURCE=199506L
9828 cf_xopen_source=
9829
9830 case "$host_os" in
9831 (aix[4-7]*)
9832         cf_xopen_source="-D_ALL_SOURCE"
9833         ;;
9834 (msys)
9835         cf_XOPEN_SOURCE=600
9836         ;;
9837 (darwin[0-8].*)
9838         cf_xopen_source="-D_APPLE_C_SOURCE"
9839         ;;
9840 (darwin*)
9841         cf_xopen_source="-D_DARWIN_C_SOURCE"
9842         cf_XOPEN_SOURCE=
9843         ;;
9844 (freebsd*|dragonfly*|midnightbsd*)
9845         # 5.x headers associate
9846         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9847         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9848         cf_POSIX_C_SOURCE=200112L
9849         cf_XOPEN_SOURCE=600
9850         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9851         ;;
9852 (hpux11*)
9853         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9854         ;;
9855 (hpux*)
9856         cf_xopen_source="-D_HPUX_SOURCE"
9857         ;;
9858 (irix[56].*)
9859         cf_xopen_source="-D_SGI_SOURCE"
9860         cf_XOPEN_SOURCE=
9861         ;;
9862 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9863
9864 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9865
9866 echo "$as_me:9866: checking if this is the GNU C library" >&5
9867 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9868 if test "${cf_cv_gnu_library+set}" = set; then
9869   echo $ECHO_N "(cached) $ECHO_C" >&6
9870 else
9871
9872 cat >"conftest.$ac_ext" <<_ACEOF
9873 #line 9873 "configure"
9874 #include "confdefs.h"
9875 #include <sys/types.h>
9876 int
9877 main (void)
9878 {
9879
9880         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9881                 return 0;
9882         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9883                 return 0;
9884         #else
9885         #       error not GNU C library
9886         #endif
9887   ;
9888   return 0;
9889 }
9890 _ACEOF
9891 rm -f "conftest.$ac_objext"
9892 if { (eval echo "$as_me:9892: \"$ac_compile\"") >&5
9893   (eval $ac_compile) 2>&5
9894   ac_status=$?
9895   echo "$as_me:9895: \$? = $ac_status" >&5
9896   (exit "$ac_status"); } &&
9897          { ac_try='test -s "conftest.$ac_objext"'
9898   { (eval echo "$as_me:9898: \"$ac_try\"") >&5
9899   (eval $ac_try) 2>&5
9900   ac_status=$?
9901   echo "$as_me:9901: \$? = $ac_status" >&5
9902   (exit "$ac_status"); }; }; then
9903   cf_cv_gnu_library=yes
9904 else
9905   echo "$as_me: failed program was:" >&5
9906 cat "conftest.$ac_ext" >&5
9907 cf_cv_gnu_library=no
9908 fi
9909 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9910
9911 fi
9912 echo "$as_me:9912: result: $cf_cv_gnu_library" >&5
9913 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9914
9915 if test x$cf_cv_gnu_library = xyes; then
9916
9917         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9918         # was changed to help a little.  newlib incorporated the change about 4
9919         # years later.
9920         echo "$as_me:9920: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9921 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9922 if test "${cf_cv_gnu_library_219+set}" = set; then
9923   echo $ECHO_N "(cached) $ECHO_C" >&6
9924 else
9925
9926                 cf_save="$CPPFLAGS"
9927
9928         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9929         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9930
9931                 cat >"conftest.$ac_ext" <<_ACEOF
9932 #line 9932 "configure"
9933 #include "confdefs.h"
9934 #include <sys/types.h>
9935 int
9936 main (void)
9937 {
9938
9939                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9940                                 return 0;
9941                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9942                                 return 0;
9943                         #else
9944                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9945                         #endif
9946   ;
9947   return 0;
9948 }
9949 _ACEOF
9950 rm -f "conftest.$ac_objext"
9951 if { (eval echo "$as_me:9951: \"$ac_compile\"") >&5
9952   (eval $ac_compile) 2>&5
9953   ac_status=$?
9954   echo "$as_me:9954: \$? = $ac_status" >&5
9955   (exit "$ac_status"); } &&
9956          { ac_try='test -s "conftest.$ac_objext"'
9957   { (eval echo "$as_me:9957: \"$ac_try\"") >&5
9958   (eval $ac_try) 2>&5
9959   ac_status=$?
9960   echo "$as_me:9960: \$? = $ac_status" >&5
9961   (exit "$ac_status"); }; }; then
9962   cf_cv_gnu_library_219=yes
9963 else
9964   echo "$as_me: failed program was:" >&5
9965 cat "conftest.$ac_ext" >&5
9966 cf_cv_gnu_library_219=no
9967 fi
9968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9969                 CPPFLAGS="$cf_save"
9970
9971 fi
9972 echo "$as_me:9972: result: $cf_cv_gnu_library_219" >&5
9973 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9974
9975         if test "x$cf_cv_gnu_library_219" = xyes; then
9976                 cf_save="$CPPFLAGS"
9977                 echo "$as_me:9977: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9978 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9979 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9980   echo $ECHO_N "(cached) $ECHO_C" >&6
9981 else
9982
9983 cf_fix_cppflags=no
9984 cf_new_cflags=
9985 cf_new_cppflags=
9986 cf_new_extra_cppflags=
9987
9988 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9989 do
9990 case "$cf_fix_cppflags" in
9991 (no)
9992         case "$cf_add_cflags" in
9993         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9994                 case "$cf_add_cflags" in
9995                 (-D*)
9996                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9997
9998                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9999                                 && test -z "${cf_tst_cflags}" \
10000                                 && cf_fix_cppflags=yes
10001
10002                         if test "$cf_fix_cppflags" = yes ; then
10003
10004         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10005         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10006
10007                                 continue
10008                         elif test "${cf_tst_cflags}" = "\"'" ; then
10009
10010         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10011         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10012
10013                                 continue
10014                         fi
10015                         ;;
10016                 esac
10017                 case "$CPPFLAGS" in
10018                 (*$cf_add_cflags)
10019                         ;;
10020                 (*)
10021                         case "$cf_add_cflags" in
10022                         (-D*)
10023                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10024
10025 CPPFLAGS=`echo "$CPPFLAGS" | \
10026         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10027                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10028
10029                                 ;;
10030                         esac
10031
10032         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10033         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10034
10035                         ;;
10036                 esac
10037                 ;;
10038         (*)
10039
10040         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10041         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10042
10043                 ;;
10044         esac
10045         ;;
10046 (yes)
10047
10048         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10049         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10050
10051         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10052
10053         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10054                 && test -z "${cf_tst_cflags}" \
10055                 && cf_fix_cppflags=no
10056         ;;
10057 esac
10058 done
10059
10060 if test -n "$cf_new_cflags" ; then
10061
10062         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10063         CFLAGS="${CFLAGS}$cf_new_cflags"
10064
10065 fi
10066
10067 if test -n "$cf_new_cppflags" ; then
10068
10069         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10070         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10071
10072 fi
10073
10074 if test -n "$cf_new_extra_cppflags" ; then
10075
10076         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10077         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10078
10079 fi
10080
10081                         cat >"conftest.$ac_ext" <<_ACEOF
10082 #line 10082 "configure"
10083 #include "confdefs.h"
10084
10085                                 #include <limits.h>
10086                                 #include <sys/types.h>
10087
10088 int
10089 main (void)
10090 {
10091
10092                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10093                                         return 0;
10094                                 #else
10095                                 #       error GNU C library is too old
10096                                 #endif
10097   ;
10098   return 0;
10099 }
10100 _ACEOF
10101 rm -f "conftest.$ac_objext"
10102 if { (eval echo "$as_me:10102: \"$ac_compile\"") >&5
10103   (eval $ac_compile) 2>&5
10104   ac_status=$?
10105   echo "$as_me:10105: \$? = $ac_status" >&5
10106   (exit "$ac_status"); } &&
10107          { ac_try='test -s "conftest.$ac_objext"'
10108   { (eval echo "$as_me:10108: \"$ac_try\"") >&5
10109   (eval $ac_try) 2>&5
10110   ac_status=$?
10111   echo "$as_me:10111: \$? = $ac_status" >&5
10112   (exit "$ac_status"); }; }; then
10113   cf_cv_gnu_dftsrc_219=yes
10114 else
10115   echo "$as_me: failed program was:" >&5
10116 cat "conftest.$ac_ext" >&5
10117 cf_cv_gnu_dftsrc_219=no
10118 fi
10119 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10120
10121 fi
10122 echo "$as_me:10122: result: $cf_cv_gnu_dftsrc_219" >&5
10123 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10124                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10125         else
10126                 cf_cv_gnu_dftsrc_219=maybe
10127         fi
10128
10129         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10130
10131                 echo "$as_me:10131: checking if we must define _GNU_SOURCE" >&5
10132 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10133 if test "${cf_cv_gnu_source+set}" = set; then
10134   echo $ECHO_N "(cached) $ECHO_C" >&6
10135 else
10136
10137                 cat >"conftest.$ac_ext" <<_ACEOF
10138 #line 10138 "configure"
10139 #include "confdefs.h"
10140 #include <sys/types.h>
10141 int
10142 main (void)
10143 {
10144
10145                         #ifndef _XOPEN_SOURCE
10146                         #error  expected _XOPEN_SOURCE to be defined
10147                         #endif
10148   ;
10149   return 0;
10150 }
10151 _ACEOF
10152 rm -f "conftest.$ac_objext"
10153 if { (eval echo "$as_me:10153: \"$ac_compile\"") >&5
10154   (eval $ac_compile) 2>&5
10155   ac_status=$?
10156   echo "$as_me:10156: \$? = $ac_status" >&5
10157   (exit "$ac_status"); } &&
10158          { ac_try='test -s "conftest.$ac_objext"'
10159   { (eval echo "$as_me:10159: \"$ac_try\"") >&5
10160   (eval $ac_try) 2>&5
10161   ac_status=$?
10162   echo "$as_me:10162: \$? = $ac_status" >&5
10163   (exit "$ac_status"); }; }; then
10164   cf_cv_gnu_source=no
10165 else
10166   echo "$as_me: failed program was:" >&5
10167 cat "conftest.$ac_ext" >&5
10168 cf_save="$CPPFLAGS"
10169
10170 cf_fix_cppflags=no
10171 cf_new_cflags=
10172 cf_new_cppflags=
10173 cf_new_extra_cppflags=
10174
10175 for cf_add_cflags in -D_GNU_SOURCE
10176 do
10177 case "$cf_fix_cppflags" in
10178 (no)
10179         case "$cf_add_cflags" in
10180         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10181                 case "$cf_add_cflags" in
10182                 (-D*)
10183                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10184
10185                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10186                                 && test -z "${cf_tst_cflags}" \
10187                                 && cf_fix_cppflags=yes
10188
10189                         if test "$cf_fix_cppflags" = yes ; then
10190
10191         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10192         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10193
10194                                 continue
10195                         elif test "${cf_tst_cflags}" = "\"'" ; then
10196
10197         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10198         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10199
10200                                 continue
10201                         fi
10202                         ;;
10203                 esac
10204                 case "$CPPFLAGS" in
10205                 (*$cf_add_cflags)
10206                         ;;
10207                 (*)
10208                         case "$cf_add_cflags" in
10209                         (-D*)
10210                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10211
10212 CPPFLAGS=`echo "$CPPFLAGS" | \
10213         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10214                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10215
10216                                 ;;
10217                         esac
10218
10219         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10220         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10221
10222                         ;;
10223                 esac
10224                 ;;
10225         (*)
10226
10227         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10228         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10229
10230                 ;;
10231         esac
10232         ;;
10233 (yes)
10234
10235         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10236         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10237
10238         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10239
10240         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10241                 && test -z "${cf_tst_cflags}" \
10242                 && cf_fix_cppflags=no
10243         ;;
10244 esac
10245 done
10246
10247 if test -n "$cf_new_cflags" ; then
10248
10249         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10250         CFLAGS="${CFLAGS}$cf_new_cflags"
10251
10252 fi
10253
10254 if test -n "$cf_new_cppflags" ; then
10255
10256         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10257         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10258
10259 fi
10260
10261 if test -n "$cf_new_extra_cppflags" ; then
10262
10263         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10264         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10265
10266 fi
10267
10268                          cat >"conftest.$ac_ext" <<_ACEOF
10269 #line 10269 "configure"
10270 #include "confdefs.h"
10271 #include <sys/types.h>
10272 int
10273 main (void)
10274 {
10275
10276                                 #ifdef _XOPEN_SOURCE
10277                                 #error  expected _XOPEN_SOURCE to be undefined
10278                                 #endif
10279   ;
10280   return 0;
10281 }
10282 _ACEOF
10283 rm -f "conftest.$ac_objext"
10284 if { (eval echo "$as_me:10284: \"$ac_compile\"") >&5
10285   (eval $ac_compile) 2>&5
10286   ac_status=$?
10287   echo "$as_me:10287: \$? = $ac_status" >&5
10288   (exit "$ac_status"); } &&
10289          { ac_try='test -s "conftest.$ac_objext"'
10290   { (eval echo "$as_me:10290: \"$ac_try\"") >&5
10291   (eval $ac_try) 2>&5
10292   ac_status=$?
10293   echo "$as_me:10293: \$? = $ac_status" >&5
10294   (exit "$ac_status"); }; }; then
10295   cf_cv_gnu_source=no
10296 else
10297   echo "$as_me: failed program was:" >&5
10298 cat "conftest.$ac_ext" >&5
10299 cf_cv_gnu_source=yes
10300 fi
10301 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10302                         CPPFLAGS="$cf_save"
10303
10304 fi
10305 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10306
10307 fi
10308 echo "$as_me:10308: result: $cf_cv_gnu_source" >&5
10309 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10310
10311                 if test "$cf_cv_gnu_source" = yes
10312                 then
10313                 echo "$as_me:10313: checking if we should also define _DEFAULT_SOURCE" >&5
10314 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10315 if test "${cf_cv_default_source+set}" = set; then
10316   echo $ECHO_N "(cached) $ECHO_C" >&6
10317 else
10318
10319         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10320         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10321
10322                         cat >"conftest.$ac_ext" <<_ACEOF
10323 #line 10323 "configure"
10324 #include "confdefs.h"
10325 #include <sys/types.h>
10326 int
10327 main (void)
10328 {
10329
10330                                 #ifdef _DEFAULT_SOURCE
10331                                 #error  expected _DEFAULT_SOURCE to be undefined
10332                                 #endif
10333   ;
10334   return 0;
10335 }
10336 _ACEOF
10337 rm -f "conftest.$ac_objext"
10338 if { (eval echo "$as_me:10338: \"$ac_compile\"") >&5
10339   (eval $ac_compile) 2>&5
10340   ac_status=$?
10341   echo "$as_me:10341: \$? = $ac_status" >&5
10342   (exit "$ac_status"); } &&
10343          { ac_try='test -s "conftest.$ac_objext"'
10344   { (eval echo "$as_me:10344: \"$ac_try\"") >&5
10345   (eval $ac_try) 2>&5
10346   ac_status=$?
10347   echo "$as_me:10347: \$? = $ac_status" >&5
10348   (exit "$ac_status"); }; }; then
10349   cf_cv_default_source=no
10350 else
10351   echo "$as_me: failed program was:" >&5
10352 cat "conftest.$ac_ext" >&5
10353 cf_cv_default_source=yes
10354 fi
10355 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10356
10357 fi
10358 echo "$as_me:10358: result: $cf_cv_default_source" >&5
10359 echo "${ECHO_T}$cf_cv_default_source" >&6
10360                         if test "$cf_cv_default_source" = yes
10361                         then
10362
10363         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10364         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10365
10366                         fi
10367                 fi
10368         fi
10369
10370 fi
10371
10372         ;;
10373 (minix*)
10374         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10375         ;;
10376 (mirbsd*)
10377         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10378         cf_XOPEN_SOURCE=
10379
10380 if test "$cf_cv_posix_visible" = no; then
10381
10382 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10383
10384 cf_save_CFLAGS="$CFLAGS"
10385 cf_save_CPPFLAGS="$CPPFLAGS"
10386
10387 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10388         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10389                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10390
10391 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10392         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10393                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10394
10395 echo "$as_me:10395: checking if we should define _POSIX_C_SOURCE" >&5
10396 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10397 if test "${cf_cv_posix_c_source+set}" = set; then
10398   echo $ECHO_N "(cached) $ECHO_C" >&6
10399 else
10400
10401 echo "${as_me:-configure}:10401: testing if the symbol is already defined go no further ..." 1>&5
10402
10403         cat >"conftest.$ac_ext" <<_ACEOF
10404 #line 10404 "configure"
10405 #include "confdefs.h"
10406 #include <sys/types.h>
10407 int
10408 main (void)
10409 {
10410
10411 #ifndef _POSIX_C_SOURCE
10412 make an error
10413 #endif
10414   ;
10415   return 0;
10416 }
10417 _ACEOF
10418 rm -f "conftest.$ac_objext"
10419 if { (eval echo "$as_me:10419: \"$ac_compile\"") >&5
10420   (eval $ac_compile) 2>&5
10421   ac_status=$?
10422   echo "$as_me:10422: \$? = $ac_status" >&5
10423   (exit "$ac_status"); } &&
10424          { ac_try='test -s "conftest.$ac_objext"'
10425   { (eval echo "$as_me:10425: \"$ac_try\"") >&5
10426   (eval $ac_try) 2>&5
10427   ac_status=$?
10428   echo "$as_me:10428: \$? = $ac_status" >&5
10429   (exit "$ac_status"); }; }; then
10430   cf_cv_posix_c_source=no
10431 else
10432   echo "$as_me: failed program was:" >&5
10433 cat "conftest.$ac_ext" >&5
10434 cf_want_posix_source=no
10435          case .$cf_POSIX_C_SOURCE in
10436          (.[12]??*)
10437                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10438                 ;;
10439          (.2)
10440                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10441                 cf_want_posix_source=yes
10442                 ;;
10443          (.*)
10444                 cf_want_posix_source=yes
10445                 ;;
10446          esac
10447          if test "$cf_want_posix_source" = yes ; then
10448                 cat >"conftest.$ac_ext" <<_ACEOF
10449 #line 10449 "configure"
10450 #include "confdefs.h"
10451 #include <sys/types.h>
10452 int
10453 main (void)
10454 {
10455
10456 #ifdef _POSIX_SOURCE
10457 make an error
10458 #endif
10459   ;
10460   return 0;
10461 }
10462 _ACEOF
10463 rm -f "conftest.$ac_objext"
10464 if { (eval echo "$as_me:10464: \"$ac_compile\"") >&5
10465   (eval $ac_compile) 2>&5
10466   ac_status=$?
10467   echo "$as_me:10467: \$? = $ac_status" >&5
10468   (exit "$ac_status"); } &&
10469          { ac_try='test -s "conftest.$ac_objext"'
10470   { (eval echo "$as_me:10470: \"$ac_try\"") >&5
10471   (eval $ac_try) 2>&5
10472   ac_status=$?
10473   echo "$as_me:10473: \$? = $ac_status" >&5
10474   (exit "$ac_status"); }; }; then
10475   :
10476 else
10477   echo "$as_me: failed program was:" >&5
10478 cat "conftest.$ac_ext" >&5
10479 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10480 fi
10481 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10482          fi
10483
10484 echo "${as_me:-configure}:10484: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10485
10486          CFLAGS="$cf_trim_CFLAGS"
10487          CPPFLAGS="$cf_trim_CPPFLAGS"
10488
10489         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10490         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10491
10492 echo "${as_me:-configure}:10492: testing if the second compile does not leave our definition intact error ..." 1>&5
10493
10494          cat >"conftest.$ac_ext" <<_ACEOF
10495 #line 10495 "configure"
10496 #include "confdefs.h"
10497 #include <sys/types.h>
10498 int
10499 main (void)
10500 {
10501
10502 #ifndef _POSIX_C_SOURCE
10503 make an error
10504 #endif
10505   ;
10506   return 0;
10507 }
10508 _ACEOF
10509 rm -f "conftest.$ac_objext"
10510 if { (eval echo "$as_me:10510: \"$ac_compile\"") >&5
10511   (eval $ac_compile) 2>&5
10512   ac_status=$?
10513   echo "$as_me:10513: \$? = $ac_status" >&5
10514   (exit "$ac_status"); } &&
10515          { ac_try='test -s "conftest.$ac_objext"'
10516   { (eval echo "$as_me:10516: \"$ac_try\"") >&5
10517   (eval $ac_try) 2>&5
10518   ac_status=$?
10519   echo "$as_me:10519: \$? = $ac_status" >&5
10520   (exit "$ac_status"); }; }; then
10521   :
10522 else
10523   echo "$as_me: failed program was:" >&5
10524 cat "conftest.$ac_ext" >&5
10525 cf_cv_posix_c_source=no
10526 fi
10527 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10528          CFLAGS="$cf_save_CFLAGS"
10529          CPPFLAGS="$cf_save_CPPFLAGS"
10530
10531 fi
10532 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10533
10534 fi
10535 echo "$as_me:10535: result: $cf_cv_posix_c_source" >&5
10536 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10537
10538 if test "$cf_cv_posix_c_source" != no ; then
10539         CFLAGS="$cf_trim_CFLAGS"
10540         CPPFLAGS="$cf_trim_CPPFLAGS"
10541
10542 cf_fix_cppflags=no
10543 cf_new_cflags=
10544 cf_new_cppflags=
10545 cf_new_extra_cppflags=
10546
10547 for cf_add_cflags in $cf_cv_posix_c_source
10548 do
10549 case "$cf_fix_cppflags" in
10550 (no)
10551         case "$cf_add_cflags" in
10552         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10553                 case "$cf_add_cflags" in
10554                 (-D*)
10555                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10556
10557                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10558                                 && test -z "${cf_tst_cflags}" \
10559                                 && cf_fix_cppflags=yes
10560
10561                         if test "$cf_fix_cppflags" = yes ; then
10562
10563         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10564         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10565
10566                                 continue
10567                         elif test "${cf_tst_cflags}" = "\"'" ; then
10568
10569         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10570         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10571
10572                                 continue
10573                         fi
10574                         ;;
10575                 esac
10576                 case "$CPPFLAGS" in
10577                 (*$cf_add_cflags)
10578                         ;;
10579                 (*)
10580                         case "$cf_add_cflags" in
10581                         (-D*)
10582                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10583
10584 CPPFLAGS=`echo "$CPPFLAGS" | \
10585         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10586                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10587
10588                                 ;;
10589                         esac
10590
10591         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10592         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10593
10594                         ;;
10595                 esac
10596                 ;;
10597         (*)
10598
10599         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10600         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10601
10602                 ;;
10603         esac
10604         ;;
10605 (yes)
10606
10607         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10608         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10609
10610         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10611
10612         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10613                 && test -z "${cf_tst_cflags}" \
10614                 && cf_fix_cppflags=no
10615         ;;
10616 esac
10617 done
10618
10619 if test -n "$cf_new_cflags" ; then
10620
10621         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10622         CFLAGS="${CFLAGS}$cf_new_cflags"
10623
10624 fi
10625
10626 if test -n "$cf_new_cppflags" ; then
10627
10628         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10629         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10630
10631 fi
10632
10633 if test -n "$cf_new_extra_cppflags" ; then
10634
10635         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10636         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10637
10638 fi
10639
10640 fi
10641
10642 fi # cf_cv_posix_visible
10643
10644         ;;
10645 (netbsd*)
10646         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10647         ;;
10648 (openbsd[6-9]*)
10649         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10650         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10651         # Abusing the conformance level is a workaround.
10652         { echo "$as_me:10652: WARNING: this system does not provide usable locale support" >&5
10653 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10654         cf_xopen_source="-D_BSD_SOURCE"
10655         cf_XOPEN_SOURCE=700
10656         ;;
10657 (openbsd[4-5]*)
10658         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10659         cf_xopen_source="-D_BSD_SOURCE"
10660         cf_XOPEN_SOURCE=600
10661         ;;
10662 (openbsd*)
10663         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10664         ;;
10665 (osf[45]*)
10666         cf_xopen_source="-D_OSF_SOURCE"
10667         ;;
10668 (nto-qnx*)
10669         cf_xopen_source="-D_QNX_SOURCE"
10670         ;;
10671 (sco*)
10672         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10673         ;;
10674 (solaris2.*)
10675         cf_xopen_source="-D__EXTENSIONS__"
10676         cf_cv_xopen_source=broken
10677         ;;
10678 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10679         cf_XOPEN_SOURCE=
10680         cf_POSIX_C_SOURCE=
10681         ;;
10682 (*)
10683
10684 echo "$as_me:10684: checking if we should define _XOPEN_SOURCE" >&5
10685 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10686 if test "${cf_cv_xopen_source+set}" = set; then
10687   echo $ECHO_N "(cached) $ECHO_C" >&6
10688 else
10689
10690         cat >"conftest.$ac_ext" <<_ACEOF
10691 #line 10691 "configure"
10692 #include "confdefs.h"
10693
10694 #include <stdlib.h>
10695 #include <string.h>
10696 #include <sys/types.h>
10697
10698 int
10699 main (void)
10700 {
10701
10702 #ifndef _XOPEN_SOURCE
10703 make an error
10704 #endif
10705   ;
10706   return 0;
10707 }
10708 _ACEOF
10709 rm -f "conftest.$ac_objext"
10710 if { (eval echo "$as_me:10710: \"$ac_compile\"") >&5
10711   (eval $ac_compile) 2>&5
10712   ac_status=$?
10713   echo "$as_me:10713: \$? = $ac_status" >&5
10714   (exit "$ac_status"); } &&
10715          { ac_try='test -s "conftest.$ac_objext"'
10716   { (eval echo "$as_me:10716: \"$ac_try\"") >&5
10717   (eval $ac_try) 2>&5
10718   ac_status=$?
10719   echo "$as_me:10719: \$? = $ac_status" >&5
10720   (exit "$ac_status"); }; }; then
10721   cf_cv_xopen_source=no
10722 else
10723   echo "$as_me: failed program was:" >&5
10724 cat "conftest.$ac_ext" >&5
10725 cf_save="$CPPFLAGS"
10726
10727         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10728         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10729
10730          cat >"conftest.$ac_ext" <<_ACEOF
10731 #line 10731 "configure"
10732 #include "confdefs.h"
10733
10734 #include <stdlib.h>
10735 #include <string.h>
10736 #include <sys/types.h>
10737
10738 int
10739 main (void)
10740 {
10741
10742 #ifdef _XOPEN_SOURCE
10743 make an error
10744 #endif
10745   ;
10746   return 0;
10747 }
10748 _ACEOF
10749 rm -f "conftest.$ac_objext"
10750 if { (eval echo "$as_me:10750: \"$ac_compile\"") >&5
10751   (eval $ac_compile) 2>&5
10752   ac_status=$?
10753   echo "$as_me:10753: \$? = $ac_status" >&5
10754   (exit "$ac_status"); } &&
10755          { ac_try='test -s "conftest.$ac_objext"'
10756   { (eval echo "$as_me:10756: \"$ac_try\"") >&5
10757   (eval $ac_try) 2>&5
10758   ac_status=$?
10759   echo "$as_me:10759: \$? = $ac_status" >&5
10760   (exit "$ac_status"); }; }; then
10761   cf_cv_xopen_source=no
10762 else
10763   echo "$as_me: failed program was:" >&5
10764 cat "conftest.$ac_ext" >&5
10765 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10766 fi
10767 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10768         CPPFLAGS="$cf_save"
10769
10770 fi
10771 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10772
10773 fi
10774 echo "$as_me:10774: result: $cf_cv_xopen_source" >&5
10775 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10776
10777 if test "$cf_cv_xopen_source" != no ; then
10778
10779 CFLAGS=`echo "$CFLAGS" | \
10780         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10781                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10782
10783 CPPFLAGS=`echo "$CPPFLAGS" | \
10784         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10785                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10786
10787         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10788
10789 for cf_add_cflags in $cf_temp_xopen_source
10790 do
10791
10792 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10793 cf_old_cflag="$CFLAGS"
10794
10795 case "$CFLAGS" in
10796 (*$cf_add_cflags=*)
10797         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^    ]*%%g"`
10798         ;;
10799 (*$cf_add_cflags\ *)
10800         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
10801         ;;
10802 (*$cf_add_cflags)
10803         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
10804         ;;
10805 esac
10806
10807 if test "$CFLAGS" != "$cf_old_cflag" ;
10808 then
10809
10810         CFLAGS="$cf_new_cflag"
10811 fi
10812
10813 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10814 cf_old_cflag="$CPPFLAGS"
10815
10816 case "$CPPFLAGS" in
10817 (*$cf_add_cflags=*)
10818         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^    ]*%%g"`
10819         ;;
10820 (*$cf_add_cflags\ *)
10821         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
10822         ;;
10823 (*$cf_add_cflags)
10824         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
10825         ;;
10826 esac
10827
10828 if test "$CPPFLAGS" != "$cf_old_cflag" ;
10829 then
10830
10831         CPPFLAGS="$cf_new_cflag"
10832 fi
10833
10834 done
10835
10836 cf_fix_cppflags=no
10837 cf_new_cflags=
10838 cf_new_cppflags=
10839 cf_new_extra_cppflags=
10840
10841 for cf_add_cflags in $cf_temp_xopen_source
10842 do
10843 case "$cf_fix_cppflags" in
10844 (no)
10845         case "$cf_add_cflags" in
10846         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10847                 case "$cf_add_cflags" in
10848                 (-D*)
10849                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10850
10851                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10852                                 && test -z "${cf_tst_cflags}" \
10853                                 && cf_fix_cppflags=yes
10854
10855                         if test "$cf_fix_cppflags" = yes ; then
10856
10857         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10858         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10859
10860                                 continue
10861                         elif test "${cf_tst_cflags}" = "\"'" ; then
10862
10863         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10864         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10865
10866                                 continue
10867                         fi
10868                         ;;
10869                 esac
10870                 case "$CPPFLAGS" in
10871                 (*$cf_add_cflags)
10872                         ;;
10873                 (*)
10874                         case "$cf_add_cflags" in
10875                         (-D*)
10876                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10877
10878 CPPFLAGS=`echo "$CPPFLAGS" | \
10879         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10880                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10881
10882                                 ;;
10883                         esac
10884
10885         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10886         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10887
10888                         ;;
10889                 esac
10890                 ;;
10891         (*)
10892
10893         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10894         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10895
10896                 ;;
10897         esac
10898         ;;
10899 (yes)
10900
10901         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10902         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10903
10904         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10905
10906         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10907                 && test -z "${cf_tst_cflags}" \
10908                 && cf_fix_cppflags=no
10909         ;;
10910 esac
10911 done
10912
10913 if test -n "$cf_new_cflags" ; then
10914
10915         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10916         CFLAGS="${CFLAGS}$cf_new_cflags"
10917
10918 fi
10919
10920 if test -n "$cf_new_cppflags" ; then
10921
10922         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10923         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10924
10925 fi
10926
10927 if test -n "$cf_new_extra_cppflags" ; then
10928
10929         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10930         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10931
10932 fi
10933
10934 fi
10935
10936 if test "$cf_cv_posix_visible" = no; then
10937
10938 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10939
10940 cf_save_CFLAGS="$CFLAGS"
10941 cf_save_CPPFLAGS="$CPPFLAGS"
10942
10943 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10944         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10945                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10946
10947 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10948         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10949                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10950
10951 echo "$as_me:10951: checking if we should define _POSIX_C_SOURCE" >&5
10952 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10953 if test "${cf_cv_posix_c_source+set}" = set; then
10954   echo $ECHO_N "(cached) $ECHO_C" >&6
10955 else
10956
10957 echo "${as_me:-configure}:10957: testing if the symbol is already defined go no further ..." 1>&5
10958
10959         cat >"conftest.$ac_ext" <<_ACEOF
10960 #line 10960 "configure"
10961 #include "confdefs.h"
10962 #include <sys/types.h>
10963 int
10964 main (void)
10965 {
10966
10967 #ifndef _POSIX_C_SOURCE
10968 make an error
10969 #endif
10970   ;
10971   return 0;
10972 }
10973 _ACEOF
10974 rm -f "conftest.$ac_objext"
10975 if { (eval echo "$as_me:10975: \"$ac_compile\"") >&5
10976   (eval $ac_compile) 2>&5
10977   ac_status=$?
10978   echo "$as_me:10978: \$? = $ac_status" >&5
10979   (exit "$ac_status"); } &&
10980          { ac_try='test -s "conftest.$ac_objext"'
10981   { (eval echo "$as_me:10981: \"$ac_try\"") >&5
10982   (eval $ac_try) 2>&5
10983   ac_status=$?
10984   echo "$as_me:10984: \$? = $ac_status" >&5
10985   (exit "$ac_status"); }; }; then
10986   cf_cv_posix_c_source=no
10987 else
10988   echo "$as_me: failed program was:" >&5
10989 cat "conftest.$ac_ext" >&5
10990 cf_want_posix_source=no
10991          case .$cf_POSIX_C_SOURCE in
10992          (.[12]??*)
10993                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10994                 ;;
10995          (.2)
10996                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10997                 cf_want_posix_source=yes
10998                 ;;
10999          (.*)
11000                 cf_want_posix_source=yes
11001                 ;;
11002          esac
11003          if test "$cf_want_posix_source" = yes ; then
11004                 cat >"conftest.$ac_ext" <<_ACEOF
11005 #line 11005 "configure"
11006 #include "confdefs.h"
11007 #include <sys/types.h>
11008 int
11009 main (void)
11010 {
11011
11012 #ifdef _POSIX_SOURCE
11013 make an error
11014 #endif
11015   ;
11016   return 0;
11017 }
11018 _ACEOF
11019 rm -f "conftest.$ac_objext"
11020 if { (eval echo "$as_me:11020: \"$ac_compile\"") >&5
11021   (eval $ac_compile) 2>&5
11022   ac_status=$?
11023   echo "$as_me:11023: \$? = $ac_status" >&5
11024   (exit "$ac_status"); } &&
11025          { ac_try='test -s "conftest.$ac_objext"'
11026   { (eval echo "$as_me:11026: \"$ac_try\"") >&5
11027   (eval $ac_try) 2>&5
11028   ac_status=$?
11029   echo "$as_me:11029: \$? = $ac_status" >&5
11030   (exit "$ac_status"); }; }; then
11031   :
11032 else
11033   echo "$as_me: failed program was:" >&5
11034 cat "conftest.$ac_ext" >&5
11035 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11036 fi
11037 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11038          fi
11039
11040 echo "${as_me:-configure}:11040: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11041
11042          CFLAGS="$cf_trim_CFLAGS"
11043          CPPFLAGS="$cf_trim_CPPFLAGS"
11044
11045         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11046         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11047
11048 echo "${as_me:-configure}:11048: testing if the second compile does not leave our definition intact error ..." 1>&5
11049
11050          cat >"conftest.$ac_ext" <<_ACEOF
11051 #line 11051 "configure"
11052 #include "confdefs.h"
11053 #include <sys/types.h>
11054 int
11055 main (void)
11056 {
11057
11058 #ifndef _POSIX_C_SOURCE
11059 make an error
11060 #endif
11061   ;
11062   return 0;
11063 }
11064 _ACEOF
11065 rm -f "conftest.$ac_objext"
11066 if { (eval echo "$as_me:11066: \"$ac_compile\"") >&5
11067   (eval $ac_compile) 2>&5
11068   ac_status=$?
11069   echo "$as_me:11069: \$? = $ac_status" >&5
11070   (exit "$ac_status"); } &&
11071          { ac_try='test -s "conftest.$ac_objext"'
11072   { (eval echo "$as_me:11072: \"$ac_try\"") >&5
11073   (eval $ac_try) 2>&5
11074   ac_status=$?
11075   echo "$as_me:11075: \$? = $ac_status" >&5
11076   (exit "$ac_status"); }; }; then
11077   :
11078 else
11079   echo "$as_me: failed program was:" >&5
11080 cat "conftest.$ac_ext" >&5
11081 cf_cv_posix_c_source=no
11082 fi
11083 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11084          CFLAGS="$cf_save_CFLAGS"
11085          CPPFLAGS="$cf_save_CPPFLAGS"
11086
11087 fi
11088 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11089
11090 fi
11091 echo "$as_me:11091: result: $cf_cv_posix_c_source" >&5
11092 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11093
11094 if test "$cf_cv_posix_c_source" != no ; then
11095         CFLAGS="$cf_trim_CFLAGS"
11096         CPPFLAGS="$cf_trim_CPPFLAGS"
11097
11098 cf_fix_cppflags=no
11099 cf_new_cflags=
11100 cf_new_cppflags=
11101 cf_new_extra_cppflags=
11102
11103 for cf_add_cflags in $cf_cv_posix_c_source
11104 do
11105 case "$cf_fix_cppflags" in
11106 (no)
11107         case "$cf_add_cflags" in
11108         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11109                 case "$cf_add_cflags" in
11110                 (-D*)
11111                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11112
11113                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11114                                 && test -z "${cf_tst_cflags}" \
11115                                 && cf_fix_cppflags=yes
11116
11117                         if test "$cf_fix_cppflags" = yes ; then
11118
11119         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11120         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11121
11122                                 continue
11123                         elif test "${cf_tst_cflags}" = "\"'" ; then
11124
11125         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11126         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11127
11128                                 continue
11129                         fi
11130                         ;;
11131                 esac
11132                 case "$CPPFLAGS" in
11133                 (*$cf_add_cflags)
11134                         ;;
11135                 (*)
11136                         case "$cf_add_cflags" in
11137                         (-D*)
11138                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11139
11140 CPPFLAGS=`echo "$CPPFLAGS" | \
11141         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11142                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11143
11144                                 ;;
11145                         esac
11146
11147         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11148         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11149
11150                         ;;
11151                 esac
11152                 ;;
11153         (*)
11154
11155         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11156         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11157
11158                 ;;
11159         esac
11160         ;;
11161 (yes)
11162
11163         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11164         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11165
11166         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11167
11168         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11169                 && test -z "${cf_tst_cflags}" \
11170                 && cf_fix_cppflags=no
11171         ;;
11172 esac
11173 done
11174
11175 if test -n "$cf_new_cflags" ; then
11176
11177         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11178         CFLAGS="${CFLAGS}$cf_new_cflags"
11179
11180 fi
11181
11182 if test -n "$cf_new_cppflags" ; then
11183
11184         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11185         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11186
11187 fi
11188
11189 if test -n "$cf_new_extra_cppflags" ; then
11190
11191         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11192         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11193
11194 fi
11195
11196 fi
11197
11198 fi # cf_cv_posix_visible
11199
11200         ;;
11201 esac
11202
11203 if test -n "$cf_xopen_source" ; then
11204
11205 for cf_add_cflags in $cf_xopen_source
11206 do
11207
11208 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11209 cf_old_cflag="$CFLAGS"
11210
11211 case "$CFLAGS" in
11212 (*$cf_add_cflags=*)
11213         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^    ]*%%g"`
11214         ;;
11215 (*$cf_add_cflags\ *)
11216         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
11217         ;;
11218 (*$cf_add_cflags)
11219         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
11220         ;;
11221 esac
11222
11223 if test "$CFLAGS" != "$cf_old_cflag" ;
11224 then
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_new_cflag"
11230 fi
11231
11232 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11233 cf_old_cflag="$CPPFLAGS"
11234
11235 case "$CPPFLAGS" in
11236 (*$cf_add_cflags=*)
11237         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^    ]*%%g"`
11238         ;;
11239 (*$cf_add_cflags\ *)
11240         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
11241         ;;
11242 (*$cf_add_cflags)
11243         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
11244         ;;
11245 esac
11246
11247 if test "$CPPFLAGS" != "$cf_old_cflag" ;
11248 then
11249         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11250
11251 echo "${as_me:-configure}:11251: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11252
11253         CPPFLAGS="$cf_new_cflag"
11254 fi
11255
11256 done
11257
11258 cf_fix_cppflags=no
11259 cf_new_cflags=
11260 cf_new_cppflags=
11261 cf_new_extra_cppflags=
11262
11263 for cf_add_cflags in $cf_xopen_source
11264 do
11265 case "$cf_fix_cppflags" in
11266 (no)
11267         case "$cf_add_cflags" in
11268         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11269                 case "$cf_add_cflags" in
11270                 (-D*)
11271                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11272
11273                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11274                                 && test -z "${cf_tst_cflags}" \
11275                                 && cf_fix_cppflags=yes
11276
11277                         if test "$cf_fix_cppflags" = yes ; then
11278
11279         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11280         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11281
11282                                 continue
11283                         elif test "${cf_tst_cflags}" = "\"'" ; then
11284
11285         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11286         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11287
11288                                 continue
11289                         fi
11290                         ;;
11291                 esac
11292                 case "$CPPFLAGS" in
11293                 (*$cf_add_cflags)
11294                         ;;
11295                 (*)
11296                         case "$cf_add_cflags" in
11297                         (-D*)
11298                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11299
11300 CPPFLAGS=`echo "$CPPFLAGS" | \
11301         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11302                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11303
11304                                 ;;
11305                         esac
11306
11307         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11308         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11309
11310                         ;;
11311                 esac
11312                 ;;
11313         (*)
11314
11315         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11316         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11317
11318                 ;;
11319         esac
11320         ;;
11321 (yes)
11322
11323         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11324         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11325
11326         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11327
11328         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11329                 && test -z "${cf_tst_cflags}" \
11330                 && cf_fix_cppflags=no
11331         ;;
11332 esac
11333 done
11334
11335 if test -n "$cf_new_cflags" ; then
11336         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11337
11338 echo "${as_me:-configure}:11338: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11339
11340         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11341         CFLAGS="${CFLAGS}$cf_new_cflags"
11342
11343 fi
11344
11345 if test -n "$cf_new_cppflags" ; then
11346         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11347
11348 echo "${as_me:-configure}:11348: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11349
11350         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11351         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11352
11353 fi
11354
11355 if test -n "$cf_new_extra_cppflags" ; then
11356         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11357
11358 echo "${as_me:-configure}:11358: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11359
11360         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11361         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11362
11363 fi
11364
11365 fi
11366
11367 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11368         echo "$as_me:11368: checking if _XOPEN_SOURCE really is set" >&5
11369 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11370         cat >"conftest.$ac_ext" <<_ACEOF
11371 #line 11371 "configure"
11372 #include "confdefs.h"
11373 #include <stdlib.h>
11374 int
11375 main (void)
11376 {
11377
11378 #ifndef _XOPEN_SOURCE
11379 make an error
11380 #endif
11381   ;
11382   return 0;
11383 }
11384 _ACEOF
11385 rm -f "conftest.$ac_objext"
11386 if { (eval echo "$as_me:11386: \"$ac_compile\"") >&5
11387   (eval $ac_compile) 2>&5
11388   ac_status=$?
11389   echo "$as_me:11389: \$? = $ac_status" >&5
11390   (exit "$ac_status"); } &&
11391          { ac_try='test -s "conftest.$ac_objext"'
11392   { (eval echo "$as_me:11392: \"$ac_try\"") >&5
11393   (eval $ac_try) 2>&5
11394   ac_status=$?
11395   echo "$as_me:11395: \$? = $ac_status" >&5
11396   (exit "$ac_status"); }; }; then
11397   cf_XOPEN_SOURCE_set=yes
11398 else
11399   echo "$as_me: failed program was:" >&5
11400 cat "conftest.$ac_ext" >&5
11401 cf_XOPEN_SOURCE_set=no
11402 fi
11403 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11404         echo "$as_me:11404: result: $cf_XOPEN_SOURCE_set" >&5
11405 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11406         if test "$cf_XOPEN_SOURCE_set" = yes
11407         then
11408                 cat >"conftest.$ac_ext" <<_ACEOF
11409 #line 11409 "configure"
11410 #include "confdefs.h"
11411 #include <stdlib.h>
11412 int
11413 main (void)
11414 {
11415
11416 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11417 make an error
11418 #endif
11419   ;
11420   return 0;
11421 }
11422 _ACEOF
11423 rm -f "conftest.$ac_objext"
11424 if { (eval echo "$as_me:11424: \"$ac_compile\"") >&5
11425   (eval $ac_compile) 2>&5
11426   ac_status=$?
11427   echo "$as_me:11427: \$? = $ac_status" >&5
11428   (exit "$ac_status"); } &&
11429          { ac_try='test -s "conftest.$ac_objext"'
11430   { (eval echo "$as_me:11430: \"$ac_try\"") >&5
11431   (eval $ac_try) 2>&5
11432   ac_status=$?
11433   echo "$as_me:11433: \$? = $ac_status" >&5
11434   (exit "$ac_status"); }; }; then
11435   cf_XOPEN_SOURCE_set_ok=yes
11436 else
11437   echo "$as_me: failed program was:" >&5
11438 cat "conftest.$ac_ext" >&5
11439 cf_XOPEN_SOURCE_set_ok=no
11440 fi
11441 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11442                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11443                 then
11444                         { echo "$as_me:11444: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11445 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11446                 fi
11447         else
11448
11449 echo "$as_me:11449: checking if we should define _XOPEN_SOURCE" >&5
11450 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11451 if test "${cf_cv_xopen_source+set}" = set; then
11452   echo $ECHO_N "(cached) $ECHO_C" >&6
11453 else
11454
11455         cat >"conftest.$ac_ext" <<_ACEOF
11456 #line 11456 "configure"
11457 #include "confdefs.h"
11458
11459 #include <stdlib.h>
11460 #include <string.h>
11461 #include <sys/types.h>
11462
11463 int
11464 main (void)
11465 {
11466
11467 #ifndef _XOPEN_SOURCE
11468 make an error
11469 #endif
11470   ;
11471   return 0;
11472 }
11473 _ACEOF
11474 rm -f "conftest.$ac_objext"
11475 if { (eval echo "$as_me:11475: \"$ac_compile\"") >&5
11476   (eval $ac_compile) 2>&5
11477   ac_status=$?
11478   echo "$as_me:11478: \$? = $ac_status" >&5
11479   (exit "$ac_status"); } &&
11480          { ac_try='test -s "conftest.$ac_objext"'
11481   { (eval echo "$as_me:11481: \"$ac_try\"") >&5
11482   (eval $ac_try) 2>&5
11483   ac_status=$?
11484   echo "$as_me:11484: \$? = $ac_status" >&5
11485   (exit "$ac_status"); }; }; then
11486   cf_cv_xopen_source=no
11487 else
11488   echo "$as_me: failed program was:" >&5
11489 cat "conftest.$ac_ext" >&5
11490 cf_save="$CPPFLAGS"
11491
11492         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11493         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11494
11495          cat >"conftest.$ac_ext" <<_ACEOF
11496 #line 11496 "configure"
11497 #include "confdefs.h"
11498
11499 #include <stdlib.h>
11500 #include <string.h>
11501 #include <sys/types.h>
11502
11503 int
11504 main (void)
11505 {
11506
11507 #ifdef _XOPEN_SOURCE
11508 make an error
11509 #endif
11510   ;
11511   return 0;
11512 }
11513 _ACEOF
11514 rm -f "conftest.$ac_objext"
11515 if { (eval echo "$as_me:11515: \"$ac_compile\"") >&5
11516   (eval $ac_compile) 2>&5
11517   ac_status=$?
11518   echo "$as_me:11518: \$? = $ac_status" >&5
11519   (exit "$ac_status"); } &&
11520          { ac_try='test -s "conftest.$ac_objext"'
11521   { (eval echo "$as_me:11521: \"$ac_try\"") >&5
11522   (eval $ac_try) 2>&5
11523   ac_status=$?
11524   echo "$as_me:11524: \$? = $ac_status" >&5
11525   (exit "$ac_status"); }; }; then
11526   cf_cv_xopen_source=no
11527 else
11528   echo "$as_me: failed program was:" >&5
11529 cat "conftest.$ac_ext" >&5
11530 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11531 fi
11532 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11533         CPPFLAGS="$cf_save"
11534
11535 fi
11536 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11537
11538 fi
11539 echo "$as_me:11539: result: $cf_cv_xopen_source" >&5
11540 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11541
11542 if test "$cf_cv_xopen_source" != no ; then
11543
11544 CFLAGS=`echo "$CFLAGS" | \
11545         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11546                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11547
11548 CPPFLAGS=`echo "$CPPFLAGS" | \
11549         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11550                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11551
11552         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11553
11554 for cf_add_cflags in $cf_temp_xopen_source
11555 do
11556
11557 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11558 cf_old_cflag="$CFLAGS"
11559
11560 case "$CFLAGS" in
11561 (*$cf_add_cflags=*)
11562         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^    ]*%%g"`
11563         ;;
11564 (*$cf_add_cflags\ *)
11565         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
11566         ;;
11567 (*$cf_add_cflags)
11568         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
11569         ;;
11570 esac
11571
11572 if test "$CFLAGS" != "$cf_old_cflag" ;
11573 then
11574
11575         CFLAGS="$cf_new_cflag"
11576 fi
11577
11578 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11579 cf_old_cflag="$CPPFLAGS"
11580
11581 case "$CPPFLAGS" in
11582 (*$cf_add_cflags=*)
11583         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag=[^    ]*%%g"`
11584         ;;
11585 (*$cf_add_cflags\ *)
11586         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%${cf_tmp_cflag}.%%"`
11587         ;;
11588 (*$cf_add_cflags)
11589         cf_old_cflag=`echo "x$cf_old_cflag" | sed -e 's/^.//' -e "s%$cf_tmp_cflag%%"`
11590         ;;
11591 esac
11592
11593 if test "$CPPFLAGS" != "$cf_old_cflag" ;
11594 then
11595
11596         CPPFLAGS="$cf_new_cflag"
11597 fi
11598
11599 done
11600
11601 cf_fix_cppflags=no
11602 cf_new_cflags=
11603 cf_new_cppflags=
11604 cf_new_extra_cppflags=
11605
11606 for cf_add_cflags in $cf_temp_xopen_source
11607 do
11608 case "$cf_fix_cppflags" in
11609 (no)
11610         case "$cf_add_cflags" in
11611         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11612                 case "$cf_add_cflags" in
11613                 (-D*)
11614                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11615
11616                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11617                                 && test -z "${cf_tst_cflags}" \
11618                                 && cf_fix_cppflags=yes
11619
11620                         if test "$cf_fix_cppflags" = yes ; then
11621
11622         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11623         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11624
11625                                 continue
11626                         elif test "${cf_tst_cflags}" = "\"'" ; then
11627
11628         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11629         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11630
11631                                 continue
11632                         fi
11633                         ;;
11634                 esac
11635                 case "$CPPFLAGS" in
11636                 (*$cf_add_cflags)
11637                         ;;
11638                 (*)
11639                         case "$cf_add_cflags" in
11640                         (-D*)
11641                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11642
11643 CPPFLAGS=`echo "$CPPFLAGS" | \
11644         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11645                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11646
11647                                 ;;
11648                         esac
11649
11650         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11651         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11652
11653                         ;;
11654                 esac
11655                 ;;
11656         (*)
11657
11658         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11659         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11660
11661                 ;;
11662         esac
11663         ;;
11664 (yes)
11665
11666         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11667         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11668
11669         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11670
11671         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11672                 && test -z "${cf_tst_cflags}" \
11673                 && cf_fix_cppflags=no
11674         ;;
11675 esac
11676 done
11677
11678 if test -n "$cf_new_cflags" ; then
11679
11680         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11681         CFLAGS="${CFLAGS}$cf_new_cflags"
11682
11683 fi
11684
11685 if test -n "$cf_new_cppflags" ; then
11686
11687         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11688         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11689
11690 fi
11691
11692 if test -n "$cf_new_extra_cppflags" ; then
11693
11694         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11695         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11696
11697 fi
11698
11699 fi
11700
11701         fi
11702 fi
11703 fi # cf_cv_posix_visible
11704
11705 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11706
11707 # Work around breakage on OS X
11708
11709 echo "$as_me:11709: checking if SIGWINCH is defined" >&5
11710 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11711 if test "${cf_cv_define_sigwinch+set}" = set; then
11712   echo $ECHO_N "(cached) $ECHO_C" >&6
11713 else
11714
11715         cat >"conftest.$ac_ext" <<_ACEOF
11716 #line 11716 "configure"
11717 #include "confdefs.h"
11718
11719 #include <sys/types.h>
11720 #include <sys/signal.h>
11721
11722 int
11723 main (void)
11724 {
11725 int x = SIGWINCH; (void)x
11726   ;
11727   return 0;
11728 }
11729 _ACEOF
11730 rm -f "conftest.$ac_objext"
11731 if { (eval echo "$as_me:11731: \"$ac_compile\"") >&5
11732   (eval $ac_compile) 2>&5
11733   ac_status=$?
11734   echo "$as_me:11734: \$? = $ac_status" >&5
11735   (exit "$ac_status"); } &&
11736          { ac_try='test -s "conftest.$ac_objext"'
11737   { (eval echo "$as_me:11737: \"$ac_try\"") >&5
11738   (eval $ac_try) 2>&5
11739   ac_status=$?
11740   echo "$as_me:11740: \$? = $ac_status" >&5
11741   (exit "$ac_status"); }; }; then
11742   cf_cv_define_sigwinch=yes
11743 else
11744   echo "$as_me: failed program was:" >&5
11745 cat "conftest.$ac_ext" >&5
11746 cat >"conftest.$ac_ext" <<_ACEOF
11747 #line 11747 "configure"
11748 #include "confdefs.h"
11749
11750 #undef _XOPEN_SOURCE
11751 #undef _POSIX_SOURCE
11752 #undef _POSIX_C_SOURCE
11753 #include <sys/types.h>
11754 #include <sys/signal.h>
11755
11756 int
11757 main (void)
11758 {
11759 int x = SIGWINCH; (void)x
11760   ;
11761   return 0;
11762 }
11763 _ACEOF
11764 rm -f "conftest.$ac_objext"
11765 if { (eval echo "$as_me:11765: \"$ac_compile\"") >&5
11766   (eval $ac_compile) 2>&5
11767   ac_status=$?
11768   echo "$as_me:11768: \$? = $ac_status" >&5
11769   (exit "$ac_status"); } &&
11770          { ac_try='test -s "conftest.$ac_objext"'
11771   { (eval echo "$as_me:11771: \"$ac_try\"") >&5
11772   (eval $ac_try) 2>&5
11773   ac_status=$?
11774   echo "$as_me:11774: \$? = $ac_status" >&5
11775   (exit "$ac_status"); }; }; then
11776   cf_cv_define_sigwinch=maybe
11777 else
11778   echo "$as_me: failed program was:" >&5
11779 cat "conftest.$ac_ext" >&5
11780 cf_cv_define_sigwinch=no
11781 fi
11782 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11783
11784 fi
11785 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11786
11787 fi
11788 echo "$as_me:11788: result: $cf_cv_define_sigwinch" >&5
11789 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11790
11791 if test "$cf_cv_define_sigwinch" = maybe ; then
11792 echo "$as_me:11792: checking for actual SIGWINCH definition" >&5
11793 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11794 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11795   echo $ECHO_N "(cached) $ECHO_C" >&6
11796 else
11797
11798 cf_cv_fixup_sigwinch=unknown
11799 cf_sigwinch=32
11800 while test "$cf_sigwinch" != 1
11801 do
11802         cat >"conftest.$ac_ext" <<_ACEOF
11803 #line 11803 "configure"
11804 #include "confdefs.h"
11805
11806 #undef _XOPEN_SOURCE
11807 #undef _POSIX_SOURCE
11808 #undef _POSIX_C_SOURCE
11809 #include <sys/types.h>
11810 #include <sys/signal.h>
11811
11812 int
11813 main (void)
11814 {
11815
11816 #if SIGWINCH != $cf_sigwinch
11817 make an error
11818 #endif
11819 int x = SIGWINCH; (void)x
11820   ;
11821   return 0;
11822 }
11823 _ACEOF
11824 rm -f "conftest.$ac_objext"
11825 if { (eval echo "$as_me:11825: \"$ac_compile\"") >&5
11826   (eval $ac_compile) 2>&5
11827   ac_status=$?
11828   echo "$as_me:11828: \$? = $ac_status" >&5
11829   (exit "$ac_status"); } &&
11830          { ac_try='test -s "conftest.$ac_objext"'
11831   { (eval echo "$as_me:11831: \"$ac_try\"") >&5
11832   (eval $ac_try) 2>&5
11833   ac_status=$?
11834   echo "$as_me:11834: \$? = $ac_status" >&5
11835   (exit "$ac_status"); }; }; then
11836   cf_cv_fixup_sigwinch=$cf_sigwinch
11837          break
11838 else
11839   echo "$as_me: failed program was:" >&5
11840 cat "conftest.$ac_ext" >&5
11841 fi
11842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11843
11844 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11845 done
11846
11847 fi
11848 echo "$as_me:11848: result: $cf_cv_fixup_sigwinch" >&5
11849 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11850
11851         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11852                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11853         fi
11854 fi
11855
11856 # Checks for CODESET support.
11857
11858 echo "$as_me:11858: checking for nl_langinfo and CODESET" >&5
11859 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11860 if test "${am_cv_langinfo_codeset+set}" = set; then
11861   echo $ECHO_N "(cached) $ECHO_C" >&6
11862 else
11863   cat >"conftest.$ac_ext" <<_ACEOF
11864 #line 11864 "configure"
11865 #include "confdefs.h"
11866 #include <langinfo.h>
11867 int
11868 main (void)
11869 {
11870 char* cs = nl_langinfo(CODESET); (void)cs
11871   ;
11872   return 0;
11873 }
11874 _ACEOF
11875 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11876 if { (eval echo "$as_me:11876: \"$ac_link\"") >&5
11877   (eval $ac_link) 2>&5
11878   ac_status=$?
11879   echo "$as_me:11879: \$? = $ac_status" >&5
11880   (exit "$ac_status"); } &&
11881          { ac_try='test -s "conftest$ac_exeext"'
11882   { (eval echo "$as_me:11882: \"$ac_try\"") >&5
11883   (eval $ac_try) 2>&5
11884   ac_status=$?
11885   echo "$as_me:11885: \$? = $ac_status" >&5
11886   (exit "$ac_status"); }; }; then
11887   am_cv_langinfo_codeset=yes
11888 else
11889   echo "$as_me: failed program was:" >&5
11890 cat "conftest.$ac_ext" >&5
11891 am_cv_langinfo_codeset=no
11892 fi
11893 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11894
11895 fi
11896 echo "$as_me:11896: result: $am_cv_langinfo_codeset" >&5
11897 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11898         if test "$am_cv_langinfo_codeset" = yes; then
11899
11900 cat >>confdefs.h <<\EOF
11901 #define HAVE_LANGINFO_CODESET 1
11902 EOF
11903
11904         fi
11905
11906 # use these variables to work around a defect in gcc's fixincludes.
11907 NCURSES_OK_WCHAR_T=
11908 NCURSES_OK_WINT_T=
11909
11910 echo "$as_me:11910: checking if you want wide-character code" >&5
11911 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11912
11913 # Check whether --enable-widec or --disable-widec was given.
11914 if test "${enable_widec+set}" = set; then
11915   enableval="$enable_widec"
11916   with_widec=$enableval
11917 else
11918   with_widec=no
11919 fi;
11920 echo "$as_me:11920: result: $with_widec" >&5
11921 echo "${ECHO_T}$with_widec" >&6
11922
11923 NCURSES_WCWIDTH_GRAPHICS=1
11924
11925 if test "x$with_widec" = xyes ; then
11926         if test "x$disable_lib_suffixes" = xno ; then
11927                 LIB_SUFFIX="w${LIB_SUFFIX}"
11928         fi
11929
11930 cat >>confdefs.h <<\EOF
11931 #define USE_WIDEC_SUPPORT 1
11932 EOF
11933
11934 cat >>confdefs.h <<\EOF
11935 #define NCURSES_WIDECHAR 1
11936 EOF
11937
11938 for ac_header in \
11939 wchar.h \
11940 wctype.h \
11941
11942 do
11943 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11944 echo "$as_me:11944: checking for $ac_header" >&5
11945 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11946 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11947   echo $ECHO_N "(cached) $ECHO_C" >&6
11948 else
11949   cat >"conftest.$ac_ext" <<_ACEOF
11950 #line 11950 "configure"
11951 #include "confdefs.h"
11952 #include <$ac_header>
11953 _ACEOF
11954 if { (eval echo "$as_me:11954: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11955   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11956   ac_status=$?
11957   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11958   rm -f conftest.er1
11959   cat conftest.err >&5
11960   echo "$as_me:11960: \$? = $ac_status" >&5
11961   (exit "$ac_status"); } >/dev/null; then
11962   if test -s conftest.err; then
11963     ac_cpp_err=$ac_c_preproc_warn_flag
11964   else
11965     ac_cpp_err=
11966   fi
11967 else
11968   ac_cpp_err=yes
11969 fi
11970 if test -z "$ac_cpp_err"; then
11971   eval "$as_ac_Header=yes"
11972 else
11973   echo "$as_me: failed program was:" >&5
11974   cat "conftest.$ac_ext" >&5
11975   eval "$as_ac_Header=no"
11976 fi
11977 rm -f conftest.err "conftest.$ac_ext"
11978 fi
11979 echo "$as_me:11979: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11980 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11981 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11982   cat >>confdefs.h <<EOF
11983 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11984 EOF
11985
11986 fi
11987 done
11988
11989 echo "$as_me:11989: checking if wchar.h can be used as is" >&5
11990 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11991 if test "${cf_cv_wchar_h_okay+set}" = set; then
11992   echo $ECHO_N "(cached) $ECHO_C" >&6
11993 else
11994
11995 cat >"conftest.$ac_ext" <<_ACEOF
11996 #line 11996 "configure"
11997 #include "confdefs.h"
11998
11999 #include <stdlib.h>
12000 #ifdef HAVE_WCHAR_H
12001 #include <wchar.h>
12002 #endif
12003 #ifdef HAVE_WCTYPE_H
12004 #include <wctype.h>
12005 #endif
12006
12007 int
12008 main (void)
12009 {
12010
12011         wint_t foo = 0;
12012         int bar = iswpunct(foo)
12013   ;
12014   return 0;
12015 }
12016 _ACEOF
12017 rm -f "conftest.$ac_objext"
12018 if { (eval echo "$as_me:12018: \"$ac_compile\"") >&5
12019   (eval $ac_compile) 2>&5
12020   ac_status=$?
12021   echo "$as_me:12021: \$? = $ac_status" >&5
12022   (exit "$ac_status"); } &&
12023          { ac_try='test -s "conftest.$ac_objext"'
12024   { (eval echo "$as_me:12024: \"$ac_try\"") >&5
12025   (eval $ac_try) 2>&5
12026   ac_status=$?
12027   echo "$as_me:12027: \$? = $ac_status" >&5
12028   (exit "$ac_status"); }; }; then
12029   cf_cv_wchar_h_okay=yes
12030 else
12031   echo "$as_me: failed program was:" >&5
12032 cat "conftest.$ac_ext" >&5
12033 cf_cv_wchar_h_okay=no
12034 fi
12035 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12036 fi
12037 echo "$as_me:12037: result: $cf_cv_wchar_h_okay" >&5
12038 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12039
12040 if test "$cf_cv_wchar_h_okay" = no
12041 then
12042
12043 echo "$as_me:12043: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12044 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12045 cat >"conftest.$ac_ext" <<_ACEOF
12046 #line 12046 "configure"
12047 #include "confdefs.h"
12048 #include <sys/types.h>
12049
12050 int
12051 main (void)
12052 {
12053
12054 #ifndef _XOPEN_SOURCE_EXTENDED
12055 make an error
12056 #endif
12057   ;
12058   return 0;
12059 }
12060 _ACEOF
12061 rm -f "conftest.$ac_objext"
12062 if { (eval echo "$as_me:12062: \"$ac_compile\"") >&5
12063   (eval $ac_compile) 2>&5
12064   ac_status=$?
12065   echo "$as_me:12065: \$? = $ac_status" >&5
12066   (exit "$ac_status"); } &&
12067          { ac_try='test -s "conftest.$ac_objext"'
12068   { (eval echo "$as_me:12068: \"$ac_try\"") >&5
12069   (eval $ac_try) 2>&5
12070   ac_status=$?
12071   echo "$as_me:12071: \$? = $ac_status" >&5
12072   (exit "$ac_status"); }; }; then
12073   cf_result=no
12074 else
12075   echo "$as_me: failed program was:" >&5
12076 cat "conftest.$ac_ext" >&5
12077 cf_result=yes
12078 fi
12079 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12080 echo "$as_me:12080: result: $cf_result" >&5
12081 echo "${ECHO_T}$cf_result" >&6
12082
12083 if test "$cf_result" = yes ; then
12084         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12085 elif test "x" != "x" ; then
12086         echo "$as_me:12086: checking checking for compatible value versus " >&5
12087 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12088         cat >"conftest.$ac_ext" <<_ACEOF
12089 #line 12089 "configure"
12090 #include "confdefs.h"
12091 #include <sys/types.h>
12092
12093 int
12094 main (void)
12095 {
12096
12097 #if _XOPEN_SOURCE_EXTENDED- < 0
12098 make an error
12099 #endif
12100   ;
12101   return 0;
12102 }
12103 _ACEOF
12104 rm -f "conftest.$ac_objext"
12105 if { (eval echo "$as_me:12105: \"$ac_compile\"") >&5
12106   (eval $ac_compile) 2>&5
12107   ac_status=$?
12108   echo "$as_me:12108: \$? = $ac_status" >&5
12109   (exit "$ac_status"); } &&
12110          { ac_try='test -s "conftest.$ac_objext"'
12111   { (eval echo "$as_me:12111: \"$ac_try\"") >&5
12112   (eval $ac_try) 2>&5
12113   ac_status=$?
12114   echo "$as_me:12114: \$? = $ac_status" >&5
12115   (exit "$ac_status"); }; }; then
12116   cf_result=yes
12117 else
12118   echo "$as_me: failed program was:" >&5
12119 cat "conftest.$ac_ext" >&5
12120 cf_result=no
12121 fi
12122 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12123         echo "$as_me:12123: result: $cf_result" >&5
12124 echo "${ECHO_T}$cf_result" >&6
12125         if test "$cf_result" = no ; then
12126                 # perhaps we can override it - try...
12127                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12128         fi
12129 fi
12130
12131 fi
12132
12133 echo "$as_me:12133: checking if wcwidth agrees graphics are single-width" >&5
12134 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12135 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12136   echo $ECHO_N "(cached) $ECHO_C" >&6
12137 else
12138
12139 cat >conftest.in <<CF_EOF
12140 -       VT100 symbols
12141 0x250c  upper left corner
12142 0x2514  lower left corner
12143 0x2510  upper right corner
12144 0x2518  lower right corner
12145 0x251c  tee pointing left
12146 0x2524  tee pointing right
12147 0x2534  tee pointing up
12148 0x252c  tee pointing down
12149 0x2500  horizontal line
12150 0x2502  vertical line
12151 0x253c  large plus or crossover
12152 0x23ba  scan line 1
12153 0x23bd  scan line 9
12154 0x25c6  diamond
12155 0x2592  checker board (stipple)
12156 0x00b0  degree symbol
12157 0x00b1  plus/minus
12158 0x00b7  bullet
12159 -       Teletype 5410v1 symbols
12160 0x2190  arrow pointing left
12161 0x2192  arrow pointing right
12162 0x2193  arrow pointing down
12163 0x2191  arrow pointing up
12164 0x2592  board of squares
12165 0x2603  lantern symbol
12166 0x25ae  solid square block
12167 -       these defaults were invented for ncurses
12168 0x23bb  scan line 3
12169 0x23bc  scan line 7
12170 0x2264  less-than-or-equal-to
12171 0x2265  greater-than-or-equal-to
12172 0x03c0  greek pi
12173 0x2260  not-equal
12174 0x00a3  pound-sterling symbol
12175 -       thick-line-drawing
12176 0x250f  upper left corner
12177 0x2517  lower left corner
12178 0x2513  upper right corner
12179 0x251b  lower right corner
12180 0x2523  tee pointing left
12181 0x252b  tee pointing right
12182 0x253b  tee pointing up
12183 0x2533  tee pointing down
12184 0x2501  horizontal line
12185 0x2503  vertical line
12186 0x254b  large plus or crossover
12187 -       double-line-drawing
12188 0x2554  upper left corner
12189 0x255a  lower left corner
12190 0x2557  upper right corner
12191 0x255d  lower right corner
12192 0x2563  tee pointing left
12193 0x2560  tee pointing right
12194 0x2569  tee pointing up
12195 0x2566  tee pointing down
12196 0x2550  horizontal line
12197 0x2551  vertical line
12198 0x256c  large plus or crossover
12199 CF_EOF
12200 if test "$cross_compiling" = yes; then
12201   cf_cv_wcwidth_graphics=unknown
12202 else
12203   cat >"conftest.$ac_ext" <<_ACEOF
12204 #line 12204 "configure"
12205 #include "confdefs.h"
12206
12207 #include <locale.h>
12208 #include <stdio.h>
12209 #include <wchar.h>
12210
12211 #define MY_LEN 80
12212
12213 int
12214 main(void)
12215 {
12216         FILE *fp;
12217         int value;
12218         char buffer[MY_LEN + 1];
12219         char notes[MY_LEN + 1];
12220         int totals = 0;
12221         int passed = 0;
12222
12223         if (setlocale(LC_ALL, "en_US.UTF8") ||
12224                 setlocale(LC_ALL, "en_US.UTF-8") ||
12225                 setlocale(LC_ALL, "en_US.utf8") ||
12226                 setlocale(LC_ALL, "en_US.utf-8")) {
12227                 if ((fp = fopen("conftest.in", "r")) != 0) {
12228                         while (fgets(buffer, MY_LEN, fp) != 0) {
12229                                 if (*buffer == '-') {
12230                                         fprintf(stderr, "\\t%s", buffer);
12231                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12232                                         ++totals;
12233                                         if (wcwidth(value) == 1)
12234                                                 ++passed;
12235                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12236                                 } else {
12237                                         fprintf(stderr, "?\\t%s", buffer);
12238                                 }
12239                         }
12240                 }
12241         }
12242         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12243         return (totals == passed) ? 0 : 1;
12244 }
12245
12246 _ACEOF
12247 rm -f "conftest$ac_exeext"
12248 if { (eval echo "$as_me:12248: \"$ac_link\"") >&5
12249   (eval $ac_link) 2>&5
12250   ac_status=$?
12251   echo "$as_me:12251: \$? = $ac_status" >&5
12252   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12253   { (eval echo "$as_me:12253: \"$ac_try\"") >&5
12254   (eval $ac_try) 2>&5
12255   ac_status=$?
12256   echo "$as_me:12256: \$? = $ac_status" >&5
12257   (exit "$ac_status"); }; }; then
12258   cf_cv_wcwidth_graphics=yes
12259 else
12260   echo "$as_me: program exited with status $ac_status" >&5
12261 echo "$as_me: failed program was:" >&5
12262 cat "conftest.$ac_ext" >&5
12263 cf_cv_wcwidth_graphics=no
12264 fi
12265 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12266 fi
12267
12268 fi
12269 echo "$as_me:12269: result: $cf_cv_wcwidth_graphics" >&5
12270 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12271
12272         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12273
12274         # with_overwrite=no
12275         NCURSES_CH_T=cchar_t
12276
12277 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12278 do
12279 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12280 echo "$as_me:12280: checking for $ac_func" >&5
12281 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12282 if eval "test \"\${$as_ac_var+set}\" = set"; then
12283   echo $ECHO_N "(cached) $ECHO_C" >&6
12284 else
12285   cat >"conftest.$ac_ext" <<_ACEOF
12286 #line 12286 "configure"
12287 #include "confdefs.h"
12288 #define $ac_func autoconf_temporary
12289 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12290 #undef $ac_func
12291
12292 #ifdef __cplusplus
12293 extern "C"
12294 #endif
12295
12296 /* We use char because int might match the return type of a gcc2
12297    builtin and then its argument prototype would still apply.  */
12298 char $ac_func (void);
12299
12300 int
12301 main (void)
12302 {
12303
12304 /* The GNU C library defines stubs for functions which it implements
12305     to always fail with ENOSYS.  Some functions are actually named
12306     something starting with __ and the normal name is an alias.  */
12307 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12308 #error found stub for $ac_func
12309 #endif
12310
12311         return $ac_func ();
12312   ;
12313   return 0;
12314 }
12315 _ACEOF
12316 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12317 if { (eval echo "$as_me:12317: \"$ac_link\"") >&5
12318   (eval $ac_link) 2>&5
12319   ac_status=$?
12320   echo "$as_me:12320: \$? = $ac_status" >&5
12321   (exit "$ac_status"); } &&
12322          { ac_try='test -s "conftest$ac_exeext"'
12323   { (eval echo "$as_me:12323: \"$ac_try\"") >&5
12324   (eval $ac_try) 2>&5
12325   ac_status=$?
12326   echo "$as_me:12326: \$? = $ac_status" >&5
12327   (exit "$ac_status"); }; }; then
12328   eval "$as_ac_var=yes"
12329 else
12330   echo "$as_me: failed program was:" >&5
12331 cat "conftest.$ac_ext" >&5
12332 eval "$as_ac_var=no"
12333 fi
12334 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12335 fi
12336 echo "$as_me:12336: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12337 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12338 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12339   cat >>confdefs.h <<EOF
12340 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12341 EOF
12342
12343 fi
12344 done
12345
12346         if test "x$ac_cv_func_putwc" != xyes ; then
12347
12348 for ac_header in wchar.h
12349 do
12350 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12351 echo "$as_me:12351: checking for $ac_header" >&5
12352 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12353 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12354   echo $ECHO_N "(cached) $ECHO_C" >&6
12355 else
12356   cat >"conftest.$ac_ext" <<_ACEOF
12357 #line 12357 "configure"
12358 #include "confdefs.h"
12359 #include <$ac_header>
12360 _ACEOF
12361 if { (eval echo "$as_me:12361: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12362   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12363   ac_status=$?
12364   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12365   rm -f conftest.er1
12366   cat conftest.err >&5
12367   echo "$as_me:12367: \$? = $ac_status" >&5
12368   (exit "$ac_status"); } >/dev/null; then
12369   if test -s conftest.err; then
12370     ac_cpp_err=$ac_c_preproc_warn_flag
12371   else
12372     ac_cpp_err=
12373   fi
12374 else
12375   ac_cpp_err=yes
12376 fi
12377 if test -z "$ac_cpp_err"; then
12378   eval "$as_ac_Header=yes"
12379 else
12380   echo "$as_me: failed program was:" >&5
12381   cat "conftest.$ac_ext" >&5
12382   eval "$as_ac_Header=no"
12383 fi
12384 rm -f conftest.err "conftest.$ac_ext"
12385 fi
12386 echo "$as_me:12386: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12387 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12388 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12389   cat >>confdefs.h <<EOF
12390 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12391 EOF
12392
12393 fi
12394 done
12395
12396 echo "$as_me:12396: checking for multibyte character support" >&5
12397 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12398 if test "${cf_cv_utf8_lib+set}" = set; then
12399   echo $ECHO_N "(cached) $ECHO_C" >&6
12400 else
12401
12402         cf_save_LIBS="$LIBS"
12403         cat >"conftest.$ac_ext" <<_ACEOF
12404 #line 12404 "configure"
12405 #include "confdefs.h"
12406
12407 #include <stdlib.h>
12408 #include <stdio.h>
12409 #ifdef HAVE_WCHAR_H
12410 #include <wchar.h>
12411 #endif
12412
12413 int
12414 main (void)
12415 {
12416 putwc(0,0);
12417   ;
12418   return 0;
12419 }
12420 _ACEOF
12421 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12422 if { (eval echo "$as_me:12422: \"$ac_link\"") >&5
12423   (eval $ac_link) 2>&5
12424   ac_status=$?
12425   echo "$as_me:12425: \$? = $ac_status" >&5
12426   (exit "$ac_status"); } &&
12427          { ac_try='test -s "conftest$ac_exeext"'
12428   { (eval echo "$as_me:12428: \"$ac_try\"") >&5
12429   (eval $ac_try) 2>&5
12430   ac_status=$?
12431   echo "$as_me:12431: \$? = $ac_status" >&5
12432   (exit "$ac_status"); }; }; then
12433   cf_cv_utf8_lib=yes
12434 else
12435   echo "$as_me: failed program was:" >&5
12436 cat "conftest.$ac_ext" >&5
12437
12438 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12439 # will be set on completion of the AC_TRY_LINK below.
12440 cf_cv_header_path_utf8=
12441 cf_cv_library_path_utf8=
12442
12443 echo "${as_me:-configure}:12443: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12444
12445 cf_save_LIBS="$LIBS"
12446
12447 cat >"conftest.$ac_ext" <<_ACEOF
12448 #line 12448 "configure"
12449 #include "confdefs.h"
12450
12451 #include <libutf8.h>
12452 int
12453 main (void)
12454 {
12455 putwc(0,0);
12456   ;
12457   return 0;
12458 }
12459 _ACEOF
12460 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12461 if { (eval echo "$as_me:12461: \"$ac_link\"") >&5
12462   (eval $ac_link) 2>&5
12463   ac_status=$?
12464   echo "$as_me:12464: \$? = $ac_status" >&5
12465   (exit "$ac_status"); } &&
12466          { ac_try='test -s "conftest$ac_exeext"'
12467   { (eval echo "$as_me:12467: \"$ac_try\"") >&5
12468   (eval $ac_try) 2>&5
12469   ac_status=$?
12470   echo "$as_me:12470: \$? = $ac_status" >&5
12471   (exit "$ac_status"); }; }; then
12472
12473         cf_cv_find_linkage_utf8=yes
12474         cf_cv_header_path_utf8=/usr/include
12475         cf_cv_library_path_utf8=/usr/lib
12476
12477 else
12478   echo "$as_me: failed program was:" >&5
12479 cat "conftest.$ac_ext" >&5
12480
12481 LIBS="-lutf8  $cf_save_LIBS"
12482
12483 cat >"conftest.$ac_ext" <<_ACEOF
12484 #line 12484 "configure"
12485 #include "confdefs.h"
12486
12487 #include <libutf8.h>
12488 int
12489 main (void)
12490 {
12491 putwc(0,0);
12492   ;
12493   return 0;
12494 }
12495 _ACEOF
12496 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12497 if { (eval echo "$as_me:12497: \"$ac_link\"") >&5
12498   (eval $ac_link) 2>&5
12499   ac_status=$?
12500   echo "$as_me:12500: \$? = $ac_status" >&5
12501   (exit "$ac_status"); } &&
12502          { ac_try='test -s "conftest$ac_exeext"'
12503   { (eval echo "$as_me:12503: \"$ac_try\"") >&5
12504   (eval $ac_try) 2>&5
12505   ac_status=$?
12506   echo "$as_me:12506: \$? = $ac_status" >&5
12507   (exit "$ac_status"); }; }; then
12508
12509         cf_cv_find_linkage_utf8=yes
12510         cf_cv_header_path_utf8=/usr/include
12511         cf_cv_library_path_utf8=/usr/lib
12512         cf_cv_library_file_utf8="-lutf8"
12513
12514 else
12515   echo "$as_me: failed program was:" >&5
12516 cat "conftest.$ac_ext" >&5
12517
12518         cf_cv_find_linkage_utf8=no
12519         LIBS="$cf_save_LIBS"
12520
12521         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12522
12523 echo "${as_me:-configure}:12523: testing find linkage for utf8 library ..." 1>&5
12524
12525 echo "${as_me:-configure}:12525: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12526
12527         cf_save_CPPFLAGS="$CPPFLAGS"
12528         cf_test_CPPFLAGS="$CPPFLAGS"
12529
12530 cf_search=
12531
12532 # collect the current set of include-directories from compiler flags
12533 cf_header_path_list=""
12534 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12535         for cf_header_path in $CPPFLAGS $CFLAGS
12536         do
12537                 case "$cf_header_path" in
12538                 (-I*)
12539                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12540
12541 test "x$cf_header_path" != "xNONE" && \
12542 test -d "$cf_header_path" && \
12543  {
12544         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12545         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12546         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12547         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12548         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12549         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12550 }
12551
12552                         cf_header_path_list="$cf_header_path_list $cf_search"
12553                         ;;
12554                 esac
12555         done
12556 fi
12557
12558 # add the variations for the package we are looking for
12559
12560 cf_search=
12561
12562 test "x$prefix" != "xNONE" && \
12563 test -d "$prefix" && \
12564  {
12565         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12566         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12567         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12568         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12569         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12570         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12571 }
12572
12573 for cf_subdir_prefix in \
12574         /usr \
12575         /usr/local \
12576         /usr/pkg \
12577         /opt \
12578         /opt/local \
12579         $HOME
12580 do
12581
12582 test "x$cf_subdir_prefix" != "x$prefix" && \
12583 test -d "$cf_subdir_prefix" && \
12584 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12585         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12586         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12587         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12588         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12589         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12590         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12591 }
12592
12593 done
12594
12595 test "$includedir" != NONE && \
12596 test "$includedir" != "/usr/include" && \
12597 test -d "$includedir" && {
12598         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12599         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12600 }
12601
12602 test "$oldincludedir" != NONE && \
12603 test "$oldincludedir" != "/usr/include" && \
12604 test -d "$oldincludedir" && {
12605         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12606         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12607 }
12608
12609 cf_search="$cf_search $cf_header_path_list"
12610
12611         for cf_cv_header_path_utf8 in $cf_search
12612         do
12613                 if test -d "$cf_cv_header_path_utf8" ; then
12614                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12615
12616 echo "${as_me:-configure}:12616: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12617
12618                         CPPFLAGS="$cf_save_CPPFLAGS"
12619
12620         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12621         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12622
12623                         cat >"conftest.$ac_ext" <<_ACEOF
12624 #line 12624 "configure"
12625 #include "confdefs.h"
12626
12627 #include <libutf8.h>
12628 int
12629 main (void)
12630 {
12631 putwc(0,0);
12632   ;
12633   return 0;
12634 }
12635 _ACEOF
12636 rm -f "conftest.$ac_objext"
12637 if { (eval echo "$as_me:12637: \"$ac_compile\"") >&5
12638   (eval $ac_compile) 2>&5
12639   ac_status=$?
12640   echo "$as_me:12640: \$? = $ac_status" >&5
12641   (exit "$ac_status"); } &&
12642          { ac_try='test -s "conftest.$ac_objext"'
12643   { (eval echo "$as_me:12643: \"$ac_try\"") >&5
12644   (eval $ac_try) 2>&5
12645   ac_status=$?
12646   echo "$as_me:12646: \$? = $ac_status" >&5
12647   (exit "$ac_status"); }; }; then
12648
12649                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12650
12651 echo "${as_me:-configure}:12651: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12652
12653                                 cf_cv_find_linkage_utf8=maybe
12654                                 cf_test_CPPFLAGS="$CPPFLAGS"
12655                                 break
12656 else
12657   echo "$as_me: failed program was:" >&5
12658 cat "conftest.$ac_ext" >&5
12659
12660                                 CPPFLAGS="$cf_save_CPPFLAGS"
12661
12662 fi
12663 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12664                 fi
12665         done
12666
12667         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12668
12669 echo "${as_me:-configure}:12669: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12670
12671                 cf_save_LIBS="$LIBS"
12672                 cf_save_LDFLAGS="$LDFLAGS"
12673
12674                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12675
12676 cf_search=
12677 cf_library_path_list=""
12678 if test -n "${LDFLAGS}${LIBS}" ; then
12679         for cf_library_path in $LDFLAGS $LIBS
12680         do
12681                 case "$cf_library_path" in
12682                 (-L*)
12683                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12684
12685 test "x$cf_library_path" != "xNONE" && \
12686 test -d "$cf_library_path" && \
12687  {
12688         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12689         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12690         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12691         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12692         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12693         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12694 }
12695
12696                         cf_library_path_list="$cf_library_path_list $cf_search"
12697                         ;;
12698                 esac
12699         done
12700 fi
12701
12702 cf_search=
12703
12704 test "x$prefix" != "xNONE" && \
12705 test -d "$prefix" && \
12706  {
12707         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12708         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12709         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12710         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12711         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12712         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12713 }
12714
12715 for cf_subdir_prefix in \
12716         /usr \
12717         /usr/local \
12718         /usr/pkg \
12719         /opt \
12720         /opt/local \
12721         $HOME
12722 do
12723
12724 test "x$cf_subdir_prefix" != "x$prefix" && \
12725 test -d "$cf_subdir_prefix" && \
12726 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12727         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12728         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12729         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12730         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12731         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12732         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12733 }
12734
12735 done
12736
12737 cf_search="$cf_library_path_list $cf_search"
12738
12739                         for cf_cv_library_path_utf8 in $cf_search
12740                         do
12741                                 if test -d "$cf_cv_library_path_utf8" ; then
12742                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12743
12744 echo "${as_me:-configure}:12744: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12745
12746                                         CPPFLAGS="$cf_test_CPPFLAGS"
12747                                         LIBS="-lutf8  $cf_save_LIBS"
12748                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12749                                         cat >"conftest.$ac_ext" <<_ACEOF
12750 #line 12750 "configure"
12751 #include "confdefs.h"
12752
12753 #include <libutf8.h>
12754 int
12755 main (void)
12756 {
12757 putwc(0,0);
12758   ;
12759   return 0;
12760 }
12761 _ACEOF
12762 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12763 if { (eval echo "$as_me:12763: \"$ac_link\"") >&5
12764   (eval $ac_link) 2>&5
12765   ac_status=$?
12766   echo "$as_me:12766: \$? = $ac_status" >&5
12767   (exit "$ac_status"); } &&
12768          { ac_try='test -s "conftest$ac_exeext"'
12769   { (eval echo "$as_me:12769: \"$ac_try\"") >&5
12770   (eval $ac_try) 2>&5
12771   ac_status=$?
12772   echo "$as_me:12772: \$? = $ac_status" >&5
12773   (exit "$ac_status"); }; }; then
12774
12775                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12776
12777 echo "${as_me:-configure}:12777: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12778
12779                                         cf_cv_find_linkage_utf8=yes
12780                                         cf_cv_library_file_utf8="-lutf8"
12781                                         break
12782 else
12783   echo "$as_me: failed program was:" >&5
12784 cat "conftest.$ac_ext" >&5
12785
12786                                         CPPFLAGS="$cf_save_CPPFLAGS"
12787                                         LIBS="$cf_save_LIBS"
12788                                         LDFLAGS="$cf_save_LDFLAGS"
12789
12790 fi
12791 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12792                                 fi
12793                         done
12794                         CPPFLAGS="$cf_save_CPPFLAGS"
12795                         LDFLAGS="$cf_save_LDFLAGS"
12796                 fi
12797
12798         else
12799                 cf_cv_find_linkage_utf8=no
12800         fi
12801
12802 fi
12803 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12804
12805 fi
12806 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12807
12808 LIBS="$cf_save_LIBS"
12809
12810 if test "$cf_cv_find_linkage_utf8" = yes ; then
12811 cf_cv_utf8_lib=add-on
12812 else
12813 cf_cv_utf8_lib=no
12814 fi
12815
12816 fi
12817 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12818 fi
12819 echo "$as_me:12819: result: $cf_cv_utf8_lib" >&5
12820 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12821
12822 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12823 # ncurses/ncursesw:
12824 if test "$cf_cv_utf8_lib" = "add-on" ; then
12825
12826 cat >>confdefs.h <<\EOF
12827 #define HAVE_LIBUTF8_H 1
12828 EOF
12829
12830 if test -n "$cf_cv_header_path_utf8" ; then
12831   for cf_add_incdir in $cf_cv_header_path_utf8
12832   do
12833         while test "$cf_add_incdir" != /usr/include
12834         do
12835           if test -d "$cf_add_incdir"
12836           then
12837                 cf_have_incdir=no
12838                 if test -n "$CFLAGS$CPPFLAGS" ; then
12839                   # a loop is needed to ensure we can add subdirs of existing dirs
12840                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12841                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12842                           cf_have_incdir=yes; break
12843                         fi
12844                   done
12845                 fi
12846
12847                 if test "$cf_have_incdir" = no ; then
12848                   if test "$cf_add_incdir" = /usr/local/include ; then
12849                         if test "$GCC" = yes
12850                         then
12851                           cf_save_CPPFLAGS=$CPPFLAGS
12852
12853         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12854         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12855
12856                           cat >"conftest.$ac_ext" <<_ACEOF
12857 #line 12857 "configure"
12858 #include "confdefs.h"
12859 #include <stdio.h>
12860 int
12861 main (void)
12862 {
12863 printf("Hello")
12864   ;
12865   return 0;
12866 }
12867 _ACEOF
12868 rm -f "conftest.$ac_objext"
12869 if { (eval echo "$as_me:12869: \"$ac_compile\"") >&5
12870   (eval $ac_compile) 2>&5
12871   ac_status=$?
12872   echo "$as_me:12872: \$? = $ac_status" >&5
12873   (exit "$ac_status"); } &&
12874          { ac_try='test -s "conftest.$ac_objext"'
12875   { (eval echo "$as_me:12875: \"$ac_try\"") >&5
12876   (eval $ac_try) 2>&5
12877   ac_status=$?
12878   echo "$as_me:12878: \$? = $ac_status" >&5
12879   (exit "$ac_status"); }; }; then
12880   :
12881 else
12882   echo "$as_me: failed program was:" >&5
12883 cat "conftest.$ac_ext" >&5
12884 cf_have_incdir=yes
12885 fi
12886 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12887                           CPPFLAGS=$cf_save_CPPFLAGS
12888                         fi
12889                   fi
12890                 fi
12891
12892                 if test "$cf_have_incdir" = no ; then
12893                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12894
12895 echo "${as_me:-configure}:12895: testing adding $cf_add_incdir to include-path ..." 1>&5
12896
12897                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12898
12899                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12900                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12901                   cf_add_incdir="$cf_top_incdir"
12902                 else
12903                   break
12904                 fi
12905           else
12906                 break
12907           fi
12908         done
12909   done
12910 fi
12911
12912 if test -n "$cf_cv_library_path_utf8" ; then
12913         for cf_add_libdir in $cf_cv_library_path_utf8
12914         do
12915                 if test "$cf_add_libdir" = /usr/lib ; then
12916                         :
12917                 elif test -d "$cf_add_libdir"
12918                 then
12919                         cf_have_libdir=no
12920                         if test -n "$LDFLAGS$LIBS" ; then
12921                                 # a loop is needed to ensure we can add subdirs of existing dirs
12922                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12923                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12924                                                 cf_have_libdir=yes; break
12925                                         fi
12926                                 done
12927                         fi
12928                         if test "$cf_have_libdir" = no ; then
12929                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12930
12931 echo "${as_me:-configure}:12931: testing adding $cf_add_libdir to library-path ..." 1>&5
12932
12933                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12934                         fi
12935                 fi
12936         done
12937 fi
12938
12939 cf_add_libs="$LIBS"
12940 # reverse order
12941 cf_add_0lib=
12942 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12943 # filter duplicates
12944 for cf_add_1lib in $cf_add_0lib; do
12945         for cf_add_2lib in $cf_add_libs; do
12946                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12947                         cf_add_1lib=
12948                         break
12949                 fi
12950         done
12951         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12952 done
12953 LIBS="$cf_add_libs"
12954
12955 fi
12956
12957                 if test "$cf_cv_utf8_lib" != no ; then
12958                         NCURSES_LIBUTF8=1
12959                 fi
12960         fi
12961
12962 # This is needed on Tru64 5.0 to declare mbstate_t
12963 echo "$as_me:12963: checking if we must include wchar.h to declare mbstate_t" >&5
12964 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12965 if test "${cf_cv_mbstate_t+set}" = set; then
12966   echo $ECHO_N "(cached) $ECHO_C" >&6
12967 else
12968
12969 cat >"conftest.$ac_ext" <<_ACEOF
12970 #line 12970 "configure"
12971 #include "confdefs.h"
12972
12973 #include <stdlib.h>
12974 #include <stdarg.h>
12975 #include <stdio.h>
12976 #ifdef HAVE_LIBUTF8_H
12977 #include <libutf8.h>
12978 #endif
12979 int
12980 main (void)
12981 {
12982 mbstate_t state
12983   ;
12984   return 0;
12985 }
12986 _ACEOF
12987 rm -f "conftest.$ac_objext"
12988 if { (eval echo "$as_me:12988: \"$ac_compile\"") >&5
12989   (eval $ac_compile) 2>&5
12990   ac_status=$?
12991   echo "$as_me:12991: \$? = $ac_status" >&5
12992   (exit "$ac_status"); } &&
12993          { ac_try='test -s "conftest.$ac_objext"'
12994   { (eval echo "$as_me:12994: \"$ac_try\"") >&5
12995   (eval $ac_try) 2>&5
12996   ac_status=$?
12997   echo "$as_me:12997: \$? = $ac_status" >&5
12998   (exit "$ac_status"); }; }; then
12999   cf_cv_mbstate_t=no
13000 else
13001   echo "$as_me: failed program was:" >&5
13002 cat "conftest.$ac_ext" >&5
13003 cat >"conftest.$ac_ext" <<_ACEOF
13004 #line 13004 "configure"
13005 #include "confdefs.h"
13006
13007 #include <stdlib.h>
13008 #include <stdarg.h>
13009 #include <stdio.h>
13010 #include <wchar.h>
13011 #ifdef HAVE_LIBUTF8_H
13012 #include <libutf8.h>
13013 #endif
13014 int
13015 main (void)
13016 {
13017 mbstate_t value
13018   ;
13019   return 0;
13020 }
13021 _ACEOF
13022 rm -f "conftest.$ac_objext"
13023 if { (eval echo "$as_me:13023: \"$ac_compile\"") >&5
13024   (eval $ac_compile) 2>&5
13025   ac_status=$?
13026   echo "$as_me:13026: \$? = $ac_status" >&5
13027   (exit "$ac_status"); } &&
13028          { ac_try='test -s "conftest.$ac_objext"'
13029   { (eval echo "$as_me:13029: \"$ac_try\"") >&5
13030   (eval $ac_try) 2>&5
13031   ac_status=$?
13032   echo "$as_me:13032: \$? = $ac_status" >&5
13033   (exit "$ac_status"); }; }; then
13034   cf_cv_mbstate_t=yes
13035 else
13036   echo "$as_me: failed program was:" >&5
13037 cat "conftest.$ac_ext" >&5
13038 cf_cv_mbstate_t=unknown
13039 fi
13040 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13041 fi
13042 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13043 fi
13044 echo "$as_me:13044: result: $cf_cv_mbstate_t" >&5
13045 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13046
13047 if test "$cf_cv_mbstate_t" = yes ; then
13048
13049 cat >>confdefs.h <<\EOF
13050 #define NEED_WCHAR_H 1
13051 EOF
13052
13053         NEED_WCHAR_H=1
13054 fi
13055
13056 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13057 if test "$cf_cv_mbstate_t" = unknown ; then
13058         NCURSES_MBSTATE_T=1
13059 fi
13060
13061 # This is needed on Tru64 5.0 to declare wchar_t
13062 echo "$as_me:13062: checking if we must include wchar.h to declare wchar_t" >&5
13063 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13064 if test "${cf_cv_wchar_t+set}" = set; then
13065   echo $ECHO_N "(cached) $ECHO_C" >&6
13066 else
13067
13068 cat >"conftest.$ac_ext" <<_ACEOF
13069 #line 13069 "configure"
13070 #include "confdefs.h"
13071
13072 #include <stdlib.h>
13073 #include <stdarg.h>
13074 #include <stdio.h>
13075 #ifdef HAVE_LIBUTF8_H
13076 #include <libutf8.h>
13077 #endif
13078 int
13079 main (void)
13080 {
13081 wchar_t state
13082   ;
13083   return 0;
13084 }
13085 _ACEOF
13086 rm -f "conftest.$ac_objext"
13087 if { (eval echo "$as_me:13087: \"$ac_compile\"") >&5
13088   (eval $ac_compile) 2>&5
13089   ac_status=$?
13090   echo "$as_me:13090: \$? = $ac_status" >&5
13091   (exit "$ac_status"); } &&
13092          { ac_try='test -s "conftest.$ac_objext"'
13093   { (eval echo "$as_me:13093: \"$ac_try\"") >&5
13094   (eval $ac_try) 2>&5
13095   ac_status=$?
13096   echo "$as_me:13096: \$? = $ac_status" >&5
13097   (exit "$ac_status"); }; }; then
13098   cf_cv_wchar_t=no
13099 else
13100   echo "$as_me: failed program was:" >&5
13101 cat "conftest.$ac_ext" >&5
13102 cat >"conftest.$ac_ext" <<_ACEOF
13103 #line 13103 "configure"
13104 #include "confdefs.h"
13105
13106 #include <stdlib.h>
13107 #include <stdarg.h>
13108 #include <stdio.h>
13109 #include <wchar.h>
13110 #ifdef HAVE_LIBUTF8_H
13111 #include <libutf8.h>
13112 #endif
13113 int
13114 main (void)
13115 {
13116 wchar_t value
13117   ;
13118   return 0;
13119 }
13120 _ACEOF
13121 rm -f "conftest.$ac_objext"
13122 if { (eval echo "$as_me:13122: \"$ac_compile\"") >&5
13123   (eval $ac_compile) 2>&5
13124   ac_status=$?
13125   echo "$as_me:13125: \$? = $ac_status" >&5
13126   (exit "$ac_status"); } &&
13127          { ac_try='test -s "conftest.$ac_objext"'
13128   { (eval echo "$as_me:13128: \"$ac_try\"") >&5
13129   (eval $ac_try) 2>&5
13130   ac_status=$?
13131   echo "$as_me:13131: \$? = $ac_status" >&5
13132   (exit "$ac_status"); }; }; then
13133   cf_cv_wchar_t=yes
13134 else
13135   echo "$as_me: failed program was:" >&5
13136 cat "conftest.$ac_ext" >&5
13137 cf_cv_wchar_t=unknown
13138 fi
13139 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13140 fi
13141 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13142 fi
13143 echo "$as_me:13143: result: $cf_cv_wchar_t" >&5
13144 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13145
13146 if test "$cf_cv_wchar_t" = yes ; then
13147
13148 cat >>confdefs.h <<\EOF
13149 #define NEED_WCHAR_H 1
13150 EOF
13151
13152         NEED_WCHAR_H=1
13153 fi
13154
13155 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13156 if test "$cf_cv_wchar_t" = unknown ; then
13157         NCURSES_WCHAR_T=1
13158 fi
13159
13160 # if we find wchar_t in either place, use substitution to provide a fallback.
13161 if test "$cf_cv_wchar_t" != unknown ; then
13162         NCURSES_OK_WCHAR_T=1
13163 fi
13164
13165 # This is needed on Tru64 5.0 to declare wint_t
13166 echo "$as_me:13166: checking if we must include wchar.h to declare wint_t" >&5
13167 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13168 if test "${cf_cv_wint_t+set}" = set; then
13169   echo $ECHO_N "(cached) $ECHO_C" >&6
13170 else
13171
13172 cat >"conftest.$ac_ext" <<_ACEOF
13173 #line 13173 "configure"
13174 #include "confdefs.h"
13175
13176 #include <stdlib.h>
13177 #include <stdarg.h>
13178 #include <stdio.h>
13179 #ifdef HAVE_LIBUTF8_H
13180 #include <libutf8.h>
13181 #endif
13182 int
13183 main (void)
13184 {
13185 wint_t state
13186   ;
13187   return 0;
13188 }
13189 _ACEOF
13190 rm -f "conftest.$ac_objext"
13191 if { (eval echo "$as_me:13191: \"$ac_compile\"") >&5
13192   (eval $ac_compile) 2>&5
13193   ac_status=$?
13194   echo "$as_me:13194: \$? = $ac_status" >&5
13195   (exit "$ac_status"); } &&
13196          { ac_try='test -s "conftest.$ac_objext"'
13197   { (eval echo "$as_me:13197: \"$ac_try\"") >&5
13198   (eval $ac_try) 2>&5
13199   ac_status=$?
13200   echo "$as_me:13200: \$? = $ac_status" >&5
13201   (exit "$ac_status"); }; }; then
13202   cf_cv_wint_t=no
13203 else
13204   echo "$as_me: failed program was:" >&5
13205 cat "conftest.$ac_ext" >&5
13206 cat >"conftest.$ac_ext" <<_ACEOF
13207 #line 13207 "configure"
13208 #include "confdefs.h"
13209
13210 #include <stdlib.h>
13211 #include <stdarg.h>
13212 #include <stdio.h>
13213 #include <wchar.h>
13214 #ifdef HAVE_LIBUTF8_H
13215 #include <libutf8.h>
13216 #endif
13217 int
13218 main (void)
13219 {
13220 wint_t value
13221   ;
13222   return 0;
13223 }
13224 _ACEOF
13225 rm -f "conftest.$ac_objext"
13226 if { (eval echo "$as_me:13226: \"$ac_compile\"") >&5
13227   (eval $ac_compile) 2>&5
13228   ac_status=$?
13229   echo "$as_me:13229: \$? = $ac_status" >&5
13230   (exit "$ac_status"); } &&
13231          { ac_try='test -s "conftest.$ac_objext"'
13232   { (eval echo "$as_me:13232: \"$ac_try\"") >&5
13233   (eval $ac_try) 2>&5
13234   ac_status=$?
13235   echo "$as_me:13235: \$? = $ac_status" >&5
13236   (exit "$ac_status"); }; }; then
13237   cf_cv_wint_t=yes
13238 else
13239   echo "$as_me: failed program was:" >&5
13240 cat "conftest.$ac_ext" >&5
13241 cf_cv_wint_t=unknown
13242 fi
13243 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13244 fi
13245 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13246 fi
13247 echo "$as_me:13247: result: $cf_cv_wint_t" >&5
13248 echo "${ECHO_T}$cf_cv_wint_t" >&6
13249
13250 if test "$cf_cv_wint_t" = yes ; then
13251
13252 cat >>confdefs.h <<\EOF
13253 #define NEED_WCHAR_H 1
13254 EOF
13255
13256         NEED_WCHAR_H=1
13257 fi
13258
13259 # if we do not find wint_t in either place, use substitution to provide a fallback.
13260 if test "$cf_cv_wint_t" = unknown ; then
13261         NCURSES_WINT_T=1
13262 fi
13263
13264 # if we find wint_t in either place, use substitution to provide a fallback.
13265 if test "$cf_cv_wint_t" != unknown ; then
13266         NCURSES_OK_WINT_T=1
13267 fi
13268
13269         if test "$NCURSES_MBSTATE_T" != 0; then
13270
13271 cat >>confdefs.h <<\EOF
13272 #define NEED_MBSTATE_T_DEF 1
13273 EOF
13274
13275         fi
13276 fi
13277
13278 ###   use option --disable-lp64 to allow long chtype
13279 echo "$as_me:13279: checking whether to enable _LP64 definition in curses.h" >&5
13280 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13281
13282 # Check whether --enable-lp64 or --disable-lp64 was given.
13283 if test "${enable_lp64+set}" = set; then
13284   enableval="$enable_lp64"
13285   with_lp64=$enableval
13286 else
13287   with_lp64=$cf_dft_with_lp64
13288 fi;
13289 echo "$as_me:13289: result: $with_lp64" >&5
13290 echo "${ECHO_T}$with_lp64" >&6
13291
13292 if test "x$with_lp64" = xyes ; then
13293         cf_cv_enable_lp64=1
13294 else
13295         cf_cv_enable_lp64=0
13296 fi
13297
13298 # Check whether --enable-largefile or --disable-largefile was given.
13299 if test "${enable_largefile+set}" = set; then
13300   enableval="$enable_largefile"
13301
13302 fi;
13303 if test "$enable_largefile" != no; then
13304
13305   echo "$as_me:13305: checking for special C compiler options needed for large files" >&5
13306 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13307 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13308   echo $ECHO_N "(cached) $ECHO_C" >&6
13309 else
13310   ac_cv_sys_largefile_CC=no
13311      if test "$GCC" != yes; then
13312        ac_save_CC=$CC
13313        while :; do
13314          # IRIX 6.2 and later do not support large files by default,
13315          # so use the C compiler's -n32 option if that helps.
13316          cat >"conftest.$ac_ext" <<_ACEOF
13317 #line 13317 "configure"
13318 #include "confdefs.h"
13319 #include <sys/types.h>
13320  /* Check that off_t can represent 2**63 - 1 correctly.
13321     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13322     since some C++ compilers masquerading as C compilers
13323     incorrectly reject 9223372036854775807.  */
13324 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13325   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13326                        && LARGE_OFF_T % 2147483647 == 1)
13327                       ? 1 : -1];
13328 int
13329 main (void)
13330 {
13331
13332   ;
13333   return 0;
13334 }
13335 _ACEOF
13336          rm -f "conftest.$ac_objext"
13337 if { (eval echo "$as_me:13337: \"$ac_compile\"") >&5
13338   (eval $ac_compile) 2>&5
13339   ac_status=$?
13340   echo "$as_me:13340: \$? = $ac_status" >&5
13341   (exit "$ac_status"); } &&
13342          { ac_try='test -s "conftest.$ac_objext"'
13343   { (eval echo "$as_me:13343: \"$ac_try\"") >&5
13344   (eval $ac_try) 2>&5
13345   ac_status=$?
13346   echo "$as_me:13346: \$? = $ac_status" >&5
13347   (exit "$ac_status"); }; }; then
13348   break
13349 else
13350   echo "$as_me: failed program was:" >&5
13351 cat "conftest.$ac_ext" >&5
13352 fi
13353 rm -f "conftest.$ac_objext"
13354          CC="$CC -n32"
13355          rm -f "conftest.$ac_objext"
13356 if { (eval echo "$as_me:13356: \"$ac_compile\"") >&5
13357   (eval $ac_compile) 2>&5
13358   ac_status=$?
13359   echo "$as_me:13359: \$? = $ac_status" >&5
13360   (exit "$ac_status"); } &&
13361          { ac_try='test -s "conftest.$ac_objext"'
13362   { (eval echo "$as_me:13362: \"$ac_try\"") >&5
13363   (eval $ac_try) 2>&5
13364   ac_status=$?
13365   echo "$as_me:13365: \$? = $ac_status" >&5
13366   (exit "$ac_status"); }; }; then
13367   ac_cv_sys_largefile_CC=' -n32'; break
13368 else
13369   echo "$as_me: failed program was:" >&5
13370 cat "conftest.$ac_ext" >&5
13371 fi
13372 rm -f "conftest.$ac_objext"
13373          break
13374        done
13375        CC=$ac_save_CC
13376        rm -f "conftest.$ac_ext"
13377     fi
13378 fi
13379 echo "$as_me:13379: result: $ac_cv_sys_largefile_CC" >&5
13380 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13381   if test "$ac_cv_sys_largefile_CC" != no; then
13382     CC=$CC$ac_cv_sys_largefile_CC
13383   fi
13384
13385   echo "$as_me:13385: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13386 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13387 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13388   echo $ECHO_N "(cached) $ECHO_C" >&6
13389 else
13390   while :; do
13391   ac_cv_sys_file_offset_bits=no
13392   cat >"conftest.$ac_ext" <<_ACEOF
13393 #line 13393 "configure"
13394 #include "confdefs.h"
13395 #include <sys/types.h>
13396  /* Check that off_t can represent 2**63 - 1 correctly.
13397     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13398     since some C++ compilers masquerading as C compilers
13399     incorrectly reject 9223372036854775807.  */
13400 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13401   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13402                        && LARGE_OFF_T % 2147483647 == 1)
13403                       ? 1 : -1];
13404 int
13405 main (void)
13406 {
13407
13408   ;
13409   return 0;
13410 }
13411 _ACEOF
13412 rm -f "conftest.$ac_objext"
13413 if { (eval echo "$as_me:13413: \"$ac_compile\"") >&5
13414   (eval $ac_compile) 2>&5
13415   ac_status=$?
13416   echo "$as_me:13416: \$? = $ac_status" >&5
13417   (exit "$ac_status"); } &&
13418          { ac_try='test -s "conftest.$ac_objext"'
13419   { (eval echo "$as_me:13419: \"$ac_try\"") >&5
13420   (eval $ac_try) 2>&5
13421   ac_status=$?
13422   echo "$as_me:13422: \$? = $ac_status" >&5
13423   (exit "$ac_status"); }; }; then
13424   break
13425 else
13426   echo "$as_me: failed program was:" >&5
13427 cat "conftest.$ac_ext" >&5
13428 fi
13429 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13430   cat >"conftest.$ac_ext" <<_ACEOF
13431 #line 13431 "configure"
13432 #include "confdefs.h"
13433 #define _FILE_OFFSET_BITS 64
13434 #include <sys/types.h>
13435  /* Check that off_t can represent 2**63 - 1 correctly.
13436     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13437     since some C++ compilers masquerading as C compilers
13438     incorrectly reject 9223372036854775807.  */
13439 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13440   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13441                        && LARGE_OFF_T % 2147483647 == 1)
13442                       ? 1 : -1];
13443 int
13444 main (void)
13445 {
13446
13447   ;
13448   return 0;
13449 }
13450 _ACEOF
13451 rm -f "conftest.$ac_objext"
13452 if { (eval echo "$as_me:13452: \"$ac_compile\"") >&5
13453   (eval $ac_compile) 2>&5
13454   ac_status=$?
13455   echo "$as_me:13455: \$? = $ac_status" >&5
13456   (exit "$ac_status"); } &&
13457          { ac_try='test -s "conftest.$ac_objext"'
13458   { (eval echo "$as_me:13458: \"$ac_try\"") >&5
13459   (eval $ac_try) 2>&5
13460   ac_status=$?
13461   echo "$as_me:13461: \$? = $ac_status" >&5
13462   (exit "$ac_status"); }; }; then
13463   ac_cv_sys_file_offset_bits=64; break
13464 else
13465   echo "$as_me: failed program was:" >&5
13466 cat "conftest.$ac_ext" >&5
13467 fi
13468 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13469   break
13470 done
13471 fi
13472 echo "$as_me:13472: result: $ac_cv_sys_file_offset_bits" >&5
13473 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13474 if test "$ac_cv_sys_file_offset_bits" != no; then
13475
13476 cat >>confdefs.h <<EOF
13477 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13478 EOF
13479
13480 fi
13481 rm -rf conftest*
13482   echo "$as_me:13482: checking for _LARGE_FILES value needed for large files" >&5
13483 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13484 if test "${ac_cv_sys_large_files+set}" = set; then
13485   echo $ECHO_N "(cached) $ECHO_C" >&6
13486 else
13487   while :; do
13488   ac_cv_sys_large_files=no
13489   cat >"conftest.$ac_ext" <<_ACEOF
13490 #line 13490 "configure"
13491 #include "confdefs.h"
13492 #include <sys/types.h>
13493  /* Check that off_t can represent 2**63 - 1 correctly.
13494     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13495     since some C++ compilers masquerading as C compilers
13496     incorrectly reject 9223372036854775807.  */
13497 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13498   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13499                        && LARGE_OFF_T % 2147483647 == 1)
13500                       ? 1 : -1];
13501 int
13502 main (void)
13503 {
13504
13505   ;
13506   return 0;
13507 }
13508 _ACEOF
13509 rm -f "conftest.$ac_objext"
13510 if { (eval echo "$as_me:13510: \"$ac_compile\"") >&5
13511   (eval $ac_compile) 2>&5
13512   ac_status=$?
13513   echo "$as_me:13513: \$? = $ac_status" >&5
13514   (exit "$ac_status"); } &&
13515          { ac_try='test -s "conftest.$ac_objext"'
13516   { (eval echo "$as_me:13516: \"$ac_try\"") >&5
13517   (eval $ac_try) 2>&5
13518   ac_status=$?
13519   echo "$as_me:13519: \$? = $ac_status" >&5
13520   (exit "$ac_status"); }; }; then
13521   break
13522 else
13523   echo "$as_me: failed program was:" >&5
13524 cat "conftest.$ac_ext" >&5
13525 fi
13526 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13527   cat >"conftest.$ac_ext" <<_ACEOF
13528 #line 13528 "configure"
13529 #include "confdefs.h"
13530 #define _LARGE_FILES 1
13531 #include <sys/types.h>
13532  /* Check that off_t can represent 2**63 - 1 correctly.
13533     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13534     since some C++ compilers masquerading as C compilers
13535     incorrectly reject 9223372036854775807.  */
13536 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13537   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13538                        && LARGE_OFF_T % 2147483647 == 1)
13539                       ? 1 : -1];
13540 int
13541 main (void)
13542 {
13543
13544   ;
13545   return 0;
13546 }
13547 _ACEOF
13548 rm -f "conftest.$ac_objext"
13549 if { (eval echo "$as_me:13549: \"$ac_compile\"") >&5
13550   (eval $ac_compile) 2>&5
13551   ac_status=$?
13552   echo "$as_me:13552: \$? = $ac_status" >&5
13553   (exit "$ac_status"); } &&
13554          { ac_try='test -s "conftest.$ac_objext"'
13555   { (eval echo "$as_me:13555: \"$ac_try\"") >&5
13556   (eval $ac_try) 2>&5
13557   ac_status=$?
13558   echo "$as_me:13558: \$? = $ac_status" >&5
13559   (exit "$ac_status"); }; }; then
13560   ac_cv_sys_large_files=1; break
13561 else
13562   echo "$as_me: failed program was:" >&5
13563 cat "conftest.$ac_ext" >&5
13564 fi
13565 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13566   break
13567 done
13568 fi
13569 echo "$as_me:13569: result: $ac_cv_sys_large_files" >&5
13570 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13571 if test "$ac_cv_sys_large_files" != no; then
13572
13573 cat >>confdefs.h <<EOF
13574 #define _LARGE_FILES $ac_cv_sys_large_files
13575 EOF
13576
13577 fi
13578 rm -rf conftest*
13579 fi
13580
13581         if test "$enable_largefile" != no ; then
13582         echo "$as_me:13582: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13583 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13584 if test "${ac_cv_sys_largefile_source+set}" = set; then
13585   echo $ECHO_N "(cached) $ECHO_C" >&6
13586 else
13587   while :; do
13588   ac_cv_sys_largefile_source=no
13589   cat >"conftest.$ac_ext" <<_ACEOF
13590 #line 13590 "configure"
13591 #include "confdefs.h"
13592 #include <stdio.h>
13593 int
13594 main (void)
13595 {
13596 return !fseeko;
13597   ;
13598   return 0;
13599 }
13600 _ACEOF
13601 rm -f "conftest.$ac_objext"
13602 if { (eval echo "$as_me:13602: \"$ac_compile\"") >&5
13603   (eval $ac_compile) 2>&5
13604   ac_status=$?
13605   echo "$as_me:13605: \$? = $ac_status" >&5
13606   (exit "$ac_status"); } &&
13607          { ac_try='test -s "conftest.$ac_objext"'
13608   { (eval echo "$as_me:13608: \"$ac_try\"") >&5
13609   (eval $ac_try) 2>&5
13610   ac_status=$?
13611   echo "$as_me:13611: \$? = $ac_status" >&5
13612   (exit "$ac_status"); }; }; then
13613   break
13614 else
13615   echo "$as_me: failed program was:" >&5
13616 cat "conftest.$ac_ext" >&5
13617 fi
13618 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13619   cat >"conftest.$ac_ext" <<_ACEOF
13620 #line 13620 "configure"
13621 #include "confdefs.h"
13622 #define _LARGEFILE_SOURCE 1
13623 #include <stdio.h>
13624 int
13625 main (void)
13626 {
13627 return !fseeko;
13628   ;
13629   return 0;
13630 }
13631 _ACEOF
13632 rm -f "conftest.$ac_objext"
13633 if { (eval echo "$as_me:13633: \"$ac_compile\"") >&5
13634   (eval $ac_compile) 2>&5
13635   ac_status=$?
13636   echo "$as_me:13636: \$? = $ac_status" >&5
13637   (exit "$ac_status"); } &&
13638          { ac_try='test -s "conftest.$ac_objext"'
13639   { (eval echo "$as_me:13639: \"$ac_try\"") >&5
13640   (eval $ac_try) 2>&5
13641   ac_status=$?
13642   echo "$as_me:13642: \$? = $ac_status" >&5
13643   (exit "$ac_status"); }; }; then
13644   ac_cv_sys_largefile_source=1; break
13645 else
13646   echo "$as_me: failed program was:" >&5
13647 cat "conftest.$ac_ext" >&5
13648 fi
13649 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13650   break
13651 done
13652 fi
13653 echo "$as_me:13653: result: $ac_cv_sys_largefile_source" >&5
13654 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13655 if test "$ac_cv_sys_largefile_source" != no; then
13656
13657 cat >>confdefs.h <<EOF
13658 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13659 EOF
13660
13661 fi
13662 rm -rf conftest*
13663
13664 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13665 # in glibc 2.1.3, but that breaks too many other things.
13666 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13667 echo "$as_me:13667: checking for fseeko" >&5
13668 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13669 if test "${ac_cv_func_fseeko+set}" = set; then
13670   echo $ECHO_N "(cached) $ECHO_C" >&6
13671 else
13672   cat >"conftest.$ac_ext" <<_ACEOF
13673 #line 13673 "configure"
13674 #include "confdefs.h"
13675 #include <stdio.h>
13676 int
13677 main (void)
13678 {
13679 return fseeko && fseeko (stdin, 0, 0);
13680   ;
13681   return 0;
13682 }
13683 _ACEOF
13684 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13685 if { (eval echo "$as_me:13685: \"$ac_link\"") >&5
13686   (eval $ac_link) 2>&5
13687   ac_status=$?
13688   echo "$as_me:13688: \$? = $ac_status" >&5
13689   (exit "$ac_status"); } &&
13690          { ac_try='test -s "conftest$ac_exeext"'
13691   { (eval echo "$as_me:13691: \"$ac_try\"") >&5
13692   (eval $ac_try) 2>&5
13693   ac_status=$?
13694   echo "$as_me:13694: \$? = $ac_status" >&5
13695   (exit "$ac_status"); }; }; then
13696   ac_cv_func_fseeko=yes
13697 else
13698   echo "$as_me: failed program was:" >&5
13699 cat "conftest.$ac_ext" >&5
13700 ac_cv_func_fseeko=no
13701 fi
13702 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13703 fi
13704 echo "$as_me:13704: result: $ac_cv_func_fseeko" >&5
13705 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13706 if test $ac_cv_func_fseeko = yes; then
13707
13708 cat >>confdefs.h <<\EOF
13709 #define HAVE_FSEEKO 1
13710 EOF
13711
13712 fi
13713
13714         # Normally we would collect these definitions in the config.h,
13715         # but (like _XOPEN_SOURCE), some environments rely on having these
13716         # defined before any of the system headers are included.  Another
13717         # case comes up with C++, e.g., on AIX the compiler compiles the
13718         # header files by themselves before looking at the body files it is
13719         # told to compile.  For ncurses, those header files do not include
13720         # the config.h
13721         if test "$ac_cv_sys_large_files" != no
13722         then
13723
13724         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13725         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13726
13727         fi
13728         if test "$ac_cv_sys_largefile_source" != no
13729         then
13730
13731         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13732         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13733
13734         fi
13735         if test "$ac_cv_sys_file_offset_bits" != no
13736         then
13737
13738         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13739         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13740
13741         fi
13742
13743         echo "$as_me:13743: checking whether to use struct dirent64" >&5
13744 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13745 if test "${cf_cv_struct_dirent64+set}" = set; then
13746   echo $ECHO_N "(cached) $ECHO_C" >&6
13747 else
13748
13749                 cat >"conftest.$ac_ext" <<_ACEOF
13750 #line 13750 "configure"
13751 #include "confdefs.h"
13752
13753 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13754 #include <sys/types.h>
13755 #include <dirent.h>
13756
13757 int
13758 main (void)
13759 {
13760
13761                 /* if transitional largefile support is setup, this is true */
13762                 extern struct dirent64 * readdir(DIR *);
13763                 struct dirent64 *x = readdir((DIR *)0);
13764                 struct dirent *y = readdir((DIR *)0);
13765                 int z = x - y;
13766                 (void)z;
13767
13768   ;
13769   return 0;
13770 }
13771 _ACEOF
13772 rm -f "conftest.$ac_objext"
13773 if { (eval echo "$as_me:13773: \"$ac_compile\"") >&5
13774   (eval $ac_compile) 2>&5
13775   ac_status=$?
13776   echo "$as_me:13776: \$? = $ac_status" >&5
13777   (exit "$ac_status"); } &&
13778          { ac_try='test -s "conftest.$ac_objext"'
13779   { (eval echo "$as_me:13779: \"$ac_try\"") >&5
13780   (eval $ac_try) 2>&5
13781   ac_status=$?
13782   echo "$as_me:13782: \$? = $ac_status" >&5
13783   (exit "$ac_status"); }; }; then
13784   cf_cv_struct_dirent64=yes
13785 else
13786   echo "$as_me: failed program was:" >&5
13787 cat "conftest.$ac_ext" >&5
13788 cf_cv_struct_dirent64=no
13789 fi
13790 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13791
13792 fi
13793 echo "$as_me:13793: result: $cf_cv_struct_dirent64" >&5
13794 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13795         test "$cf_cv_struct_dirent64" = yes &&
13796 cat >>confdefs.h <<\EOF
13797 #define HAVE_STRUCT_DIRENT64 1
13798 EOF
13799
13800         fi
13801
13802 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13803 echo "$as_me:13803: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13804 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13805
13806 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13807 if test "${enable_tparm_varargs+set}" = set; then
13808   enableval="$enable_tparm_varargs"
13809   with_tparm_varargs=$enableval
13810 else
13811   with_tparm_varargs=yes
13812 fi;
13813 echo "$as_me:13813: result: $with_tparm_varargs" >&5
13814 echo "${ECHO_T}$with_tparm_varargs" >&6
13815 NCURSES_TPARM_VARARGS=0
13816 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13817
13818 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13819 if test "$with_ticlib" != no ; then
13820 echo "$as_me:13820: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13821 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13822
13823 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13824 if test "${enable_tic_depends+set}" = set; then
13825   enableval="$enable_tic_depends"
13826   with_tic_depends=$enableval
13827 else
13828   with_tic_depends=yes
13829 fi;
13830 echo "$as_me:13830: result: $with_tic_depends" >&5
13831 echo "${ECHO_T}$with_tic_depends" >&6
13832 else
13833         with_tic_depends=no
13834 fi
13835
13836 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
13837 echo "$as_me:13837: checking if you want to enable wattr* macros" >&5
13838 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
13839
13840 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13841 if test "${enable_wattr_macros+set}" = set; then
13842   enableval="$enable_wattr_macros"
13843   with_wattr_macros=$enableval
13844 else
13845   with_wattr_macros=no
13846 fi;
13847 if [ "x$with_wattr_macros" != xyes ]; then
13848         NCURSES_WATTR_MACROS=0
13849         echo "$as_me:13849: result: no" >&5
13850 echo "${ECHO_T}no" >&6
13851 else
13852         NCURSES_WATTR_MACROS=1
13853         echo "$as_me:13853: result: yes" >&5
13854 echo "${ECHO_T}yes" >&6
13855 fi
13856
13857 echo "$as_me:13857: checking for X11 rgb file" >&5
13858 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13859
13860 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13861 if test "${with_x11_rgb+set}" = set; then
13862   withval="$with_x11_rgb"
13863   RGB_PATH=$withval
13864 else
13865   RGB_PATH=auto
13866 fi;
13867
13868 if test "x$RGB_PATH" = xauto
13869 then
13870         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13871         for cf_path in \
13872                 /opt/local/share/X11/rgb.txt \
13873                 /opt/X11/share/X11/rgb.txt \
13874                 /usr/share/X11/rgb.txt \
13875                 /usr/X11/share/X11/rgb.txt \
13876                 /usr/X11/lib/X11/rgb.txt \
13877                 /usr/lib/X11/rgb.txt \
13878                 /etc/X11/rgb.txt \
13879                 /usr/pkg/lib/X11/rgb.txt \
13880                 /usr/X11R7/lib/X11/rgb.txt \
13881                 /usr/X11R6/lib/X11/rgb.txt \
13882                 /usr/X11R5/lib/X11/rgb.txt \
13883                 /usr/X11R4/lib/X11/rgb.txt \
13884                 /usr/local/lib/X11/rgb.txt \
13885                 /usr/local/share/X11/rgb.txt \
13886                 /usr/lib64/X11/rgb.txt
13887         do
13888                 if test -f "$cf_path" ; then
13889                         RGB_PATH="$cf_path"
13890                         break
13891                 fi
13892         done
13893 else
13894         cf_path=$RGB_PATH
13895
13896 if test "x$prefix" != xNONE; then
13897         cf_path_syntax="$prefix"
13898 else
13899         cf_path_syntax="$ac_default_prefix"
13900 fi
13901
13902 case ".$cf_path" in
13903 (.\$\(*\)*|.\'*\'*)
13904         ;;
13905 (..|./*|.\\*)
13906         ;;
13907 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13908         ;;
13909 (.\$\{*prefix\}*|.\$\{*dir\}*)
13910         eval cf_path="$cf_path"
13911         case ".$cf_path" in
13912         (.NONE/*)
13913                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13914                 ;;
13915         esac
13916         ;;
13917 (.no|.NONE/*)
13918         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13919         ;;
13920 (*)
13921         { { echo "$as_me:13921: error: expected a pathname, not \"$cf_path\"" >&5
13922 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13923    { (exit 1); exit 1; }; }
13924         ;;
13925 esac
13926
13927 fi
13928
13929 echo "$as_me:13929: result: $RGB_PATH" >&5
13930 echo "${ECHO_T}$RGB_PATH" >&6
13931
13932 cat >>confdefs.h <<EOF
13933 #define RGB_PATH "$cf_path"
13934 EOF
13935
13936 no_x11_rgb=
13937 if test "$RGB_PATH" = no
13938 then
13939         no_x11_rgb="#"
13940 fi
13941
13942 ###   use option --with-bool to override bool's type
13943 echo "$as_me:13943: checking for type of bool" >&5
13944 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13945
13946 # Check whether --with-bool or --without-bool was given.
13947 if test "${with_bool+set}" = set; then
13948   withval="$with_bool"
13949   NCURSES_BOOL="$withval"
13950 else
13951   NCURSES_BOOL=auto
13952 fi;
13953 echo "$as_me:13953: result: $NCURSES_BOOL" >&5
13954 echo "${ECHO_T}$NCURSES_BOOL" >&6
13955
13956 echo "$as_me:13956: checking for alternate terminal capabilities file" >&5
13957 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13958
13959 # Check whether --with-caps or --without-caps was given.
13960 if test "${with_caps+set}" = set; then
13961   withval="$with_caps"
13962   TERMINFO_CAPS=Caps.$withval
13963 else
13964   TERMINFO_CAPS=Caps
13965 fi;
13966 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13967 echo "$as_me:13967: result: $TERMINFO_CAPS" >&5
13968 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13969
13970 ###   use option --with-chtype to override chtype's type
13971 echo "$as_me:13971: checking for type of chtype" >&5
13972 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13973
13974 # Check whether --with-chtype or --without-chtype was given.
13975 if test "${with_chtype+set}" = set; then
13976   withval="$with_chtype"
13977   NCURSES_CHTYPE="$withval"
13978 else
13979   NCURSES_CHTYPE=$cf_dft_chtype
13980 fi;
13981 echo "$as_me:13981: result: $NCURSES_CHTYPE" >&5
13982 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13983
13984 ###   use option --with-ospeed to override ospeed's type
13985 echo "$as_me:13985: checking for type of ospeed" >&5
13986 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13987
13988 # Check whether --with-ospeed or --without-ospeed was given.
13989 if test "${with_ospeed+set}" = set; then
13990   withval="$with_ospeed"
13991   NCURSES_OSPEED="$withval"
13992 else
13993   NCURSES_OSPEED=short
13994 fi;
13995 echo "$as_me:13995: result: $NCURSES_OSPEED" >&5
13996 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13997
13998 ###   use option --with-mmask-t to override mmask_t's type
13999 echo "$as_me:13999: checking for type of mmask_t" >&5
14000 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14001
14002 # Check whether --with-mmask-t or --without-mmask-t was given.
14003 if test "${with_mmask_t+set}" = set; then
14004   withval="$with_mmask_t"
14005   NCURSES_MMASK_T="$withval"
14006 else
14007   NCURSES_MMASK_T=$cf_dft_mmask_t
14008 fi;
14009 echo "$as_me:14009: result: $NCURSES_MMASK_T" >&5
14010 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14011
14012 ###   use option --with-ccharw-max to override CCHARW_MAX size
14013 echo "$as_me:14013: checking for size CCHARW_MAX" >&5
14014 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14015
14016 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14017 if test "${with_ccharw_max+set}" = set; then
14018   withval="$with_ccharw_max"
14019   NCURSES_CCHARW_MAX="$withval"
14020 else
14021   NCURSES_CCHARW_MAX=5
14022 fi;
14023 echo "$as_me:14023: result: $NCURSES_CCHARW_MAX" >&5
14024 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14025
14026 echo "$as_me:14026: checking for ANSI C header files" >&5
14027 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14028 if test "${ac_cv_header_stdc+set}" = set; then
14029   echo $ECHO_N "(cached) $ECHO_C" >&6
14030 else
14031   cat >"conftest.$ac_ext" <<_ACEOF
14032 #line 14032 "configure"
14033 #include "confdefs.h"
14034 #include <stdlib.h>
14035 #include <stdarg.h>
14036 #include <string.h>
14037 #include <float.h>
14038
14039 _ACEOF
14040 if { (eval echo "$as_me:14040: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14041   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14042   ac_status=$?
14043   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14044   rm -f conftest.er1
14045   cat conftest.err >&5
14046   echo "$as_me:14046: \$? = $ac_status" >&5
14047   (exit "$ac_status"); } >/dev/null; then
14048   if test -s conftest.err; then
14049     ac_cpp_err=$ac_c_preproc_warn_flag
14050   else
14051     ac_cpp_err=
14052   fi
14053 else
14054   ac_cpp_err=yes
14055 fi
14056 if test -z "$ac_cpp_err"; then
14057   ac_cv_header_stdc=yes
14058 else
14059   echo "$as_me: failed program was:" >&5
14060   cat "conftest.$ac_ext" >&5
14061   ac_cv_header_stdc=no
14062 fi
14063 rm -f conftest.err "conftest.$ac_ext"
14064
14065 if test $ac_cv_header_stdc = yes; then
14066   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14067   cat >"conftest.$ac_ext" <<_ACEOF
14068 #line 14068 "configure"
14069 #include "confdefs.h"
14070 #include <string.h>
14071
14072 _ACEOF
14073 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14074   $EGREP "memchr" >/dev/null 2>&1; then
14075   :
14076 else
14077   ac_cv_header_stdc=no
14078 fi
14079 rm -rf conftest*
14080
14081 fi
14082
14083 if test $ac_cv_header_stdc = yes; then
14084   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14085   cat >"conftest.$ac_ext" <<_ACEOF
14086 #line 14086 "configure"
14087 #include "confdefs.h"
14088 #include <stdlib.h>
14089
14090 _ACEOF
14091 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14092   $EGREP "free" >/dev/null 2>&1; then
14093   :
14094 else
14095   ac_cv_header_stdc=no
14096 fi
14097 rm -rf conftest*
14098
14099 fi
14100
14101 if test $ac_cv_header_stdc = yes; then
14102   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14103   if test "$cross_compiling" = yes; then
14104   :
14105 else
14106   cat >"conftest.$ac_ext" <<_ACEOF
14107 #line 14107 "configure"
14108 #include "confdefs.h"
14109 #include <ctype.h>
14110 #if ((' ' & 0x0FF) == 0x020)
14111 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14112 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14113 #else
14114 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14115                      || ('j' <= (c) && (c) <= 'r') \
14116                      || ('s' <= (c) && (c) <= 'z'))
14117 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14118 #endif
14119
14120 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14121 int
14122 main (void)
14123 {
14124   int i;
14125   for (i = 0; i < 256; i++)
14126     if (XOR (islower (i), ISLOWER (i))
14127         || toupper (i) != TOUPPER (i))
14128       $ac_main_return(2);
14129   $ac_main_return (0);
14130 }
14131 _ACEOF
14132 rm -f "conftest$ac_exeext"
14133 if { (eval echo "$as_me:14133: \"$ac_link\"") >&5
14134   (eval $ac_link) 2>&5
14135   ac_status=$?
14136   echo "$as_me:14136: \$? = $ac_status" >&5
14137   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14138   { (eval echo "$as_me:14138: \"$ac_try\"") >&5
14139   (eval $ac_try) 2>&5
14140   ac_status=$?
14141   echo "$as_me:14141: \$? = $ac_status" >&5
14142   (exit "$ac_status"); }; }; then
14143   :
14144 else
14145   echo "$as_me: program exited with status $ac_status" >&5
14146 echo "$as_me: failed program was:" >&5
14147 cat "conftest.$ac_ext" >&5
14148 ac_cv_header_stdc=no
14149 fi
14150 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14151 fi
14152 fi
14153 fi
14154 echo "$as_me:14154: result: $ac_cv_header_stdc" >&5
14155 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14156 if test $ac_cv_header_stdc = yes; then
14157
14158 cat >>confdefs.h <<\EOF
14159 #define STDC_HEADERS 1
14160 EOF
14161
14162 fi
14163
14164 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14165
14166 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14167                   inttypes.h stdint.h unistd.h
14168 do
14169 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14170 echo "$as_me:14170: checking for $ac_header" >&5
14171 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14172 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14173   echo $ECHO_N "(cached) $ECHO_C" >&6
14174 else
14175   cat >"conftest.$ac_ext" <<_ACEOF
14176 #line 14176 "configure"
14177 #include "confdefs.h"
14178 $ac_includes_default
14179 #include <$ac_header>
14180 _ACEOF
14181 rm -f "conftest.$ac_objext"
14182 if { (eval echo "$as_me:14182: \"$ac_compile\"") >&5
14183   (eval $ac_compile) 2>&5
14184   ac_status=$?
14185   echo "$as_me:14185: \$? = $ac_status" >&5
14186   (exit "$ac_status"); } &&
14187          { ac_try='test -s "conftest.$ac_objext"'
14188   { (eval echo "$as_me:14188: \"$ac_try\"") >&5
14189   (eval $ac_try) 2>&5
14190   ac_status=$?
14191   echo "$as_me:14191: \$? = $ac_status" >&5
14192   (exit "$ac_status"); }; }; then
14193   eval "$as_ac_Header=yes"
14194 else
14195   echo "$as_me: failed program was:" >&5
14196 cat "conftest.$ac_ext" >&5
14197 eval "$as_ac_Header=no"
14198 fi
14199 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14200 fi
14201 echo "$as_me:14201: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14202 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14203 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14204   cat >>confdefs.h <<EOF
14205 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14206 EOF
14207
14208 fi
14209 done
14210
14211 echo "$as_me:14211: checking for signed char" >&5
14212 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14213 if test "${ac_cv_type_signed_char+set}" = set; then
14214   echo $ECHO_N "(cached) $ECHO_C" >&6
14215 else
14216   cat >"conftest.$ac_ext" <<_ACEOF
14217 #line 14217 "configure"
14218 #include "confdefs.h"
14219 $ac_includes_default
14220 int
14221 main (void)
14222 {
14223 if ((signed char *) 0)
14224   return 0;
14225 if (sizeof (signed char))
14226   return 0;
14227   ;
14228   return 0;
14229 }
14230 _ACEOF
14231 rm -f "conftest.$ac_objext"
14232 if { (eval echo "$as_me:14232: \"$ac_compile\"") >&5
14233   (eval $ac_compile) 2>&5
14234   ac_status=$?
14235   echo "$as_me:14235: \$? = $ac_status" >&5
14236   (exit "$ac_status"); } &&
14237          { ac_try='test -s "conftest.$ac_objext"'
14238   { (eval echo "$as_me:14238: \"$ac_try\"") >&5
14239   (eval $ac_try) 2>&5
14240   ac_status=$?
14241   echo "$as_me:14241: \$? = $ac_status" >&5
14242   (exit "$ac_status"); }; }; then
14243   ac_cv_type_signed_char=yes
14244 else
14245   echo "$as_me: failed program was:" >&5
14246 cat "conftest.$ac_ext" >&5
14247 ac_cv_type_signed_char=no
14248 fi
14249 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14250 fi
14251 echo "$as_me:14251: result: $ac_cv_type_signed_char" >&5
14252 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14253
14254 echo "$as_me:14254: checking size of signed char" >&5
14255 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14256 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14257   echo $ECHO_N "(cached) $ECHO_C" >&6
14258 else
14259   if test "$ac_cv_type_signed_char" = yes; then
14260   if test "$cross_compiling" = yes; then
14261   # Depending upon the size, compute the lo and hi bounds.
14262 cat >"conftest.$ac_ext" <<_ACEOF
14263 #line 14263 "configure"
14264 #include "confdefs.h"
14265 $ac_includes_default
14266 int
14267 main (void)
14268 {
14269 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14270   ;
14271   return 0;
14272 }
14273 _ACEOF
14274 rm -f "conftest.$ac_objext"
14275 if { (eval echo "$as_me:14275: \"$ac_compile\"") >&5
14276   (eval $ac_compile) 2>&5
14277   ac_status=$?
14278   echo "$as_me:14278: \$? = $ac_status" >&5
14279   (exit "$ac_status"); } &&
14280          { ac_try='test -s "conftest.$ac_objext"'
14281   { (eval echo "$as_me:14281: \"$ac_try\"") >&5
14282   (eval $ac_try) 2>&5
14283   ac_status=$?
14284   echo "$as_me:14284: \$? = $ac_status" >&5
14285   (exit "$ac_status"); }; }; then
14286   ac_lo=0 ac_mid=0
14287   while :; do
14288     cat >"conftest.$ac_ext" <<_ACEOF
14289 #line 14289 "configure"
14290 #include "confdefs.h"
14291 $ac_includes_default
14292 int
14293 main (void)
14294 {
14295 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14296   ;
14297   return 0;
14298 }
14299 _ACEOF
14300 rm -f "conftest.$ac_objext"
14301 if { (eval echo "$as_me:14301: \"$ac_compile\"") >&5
14302   (eval $ac_compile) 2>&5
14303   ac_status=$?
14304   echo "$as_me:14304: \$? = $ac_status" >&5
14305   (exit "$ac_status"); } &&
14306          { ac_try='test -s "conftest.$ac_objext"'
14307   { (eval echo "$as_me:14307: \"$ac_try\"") >&5
14308   (eval $ac_try) 2>&5
14309   ac_status=$?
14310   echo "$as_me:14310: \$? = $ac_status" >&5
14311   (exit "$ac_status"); }; }; then
14312   ac_hi=$ac_mid; break
14313 else
14314   echo "$as_me: failed program was:" >&5
14315 cat "conftest.$ac_ext" >&5
14316 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14317 fi
14318 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14319   done
14320 else
14321   echo "$as_me: failed program was:" >&5
14322 cat "conftest.$ac_ext" >&5
14323 ac_hi=-1 ac_mid=-1
14324   while :; do
14325     cat >"conftest.$ac_ext" <<_ACEOF
14326 #line 14326 "configure"
14327 #include "confdefs.h"
14328 $ac_includes_default
14329 int
14330 main (void)
14331 {
14332 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14333   ;
14334   return 0;
14335 }
14336 _ACEOF
14337 rm -f "conftest.$ac_objext"
14338 if { (eval echo "$as_me:14338: \"$ac_compile\"") >&5
14339   (eval $ac_compile) 2>&5
14340   ac_status=$?
14341   echo "$as_me:14341: \$? = $ac_status" >&5
14342   (exit "$ac_status"); } &&
14343          { ac_try='test -s "conftest.$ac_objext"'
14344   { (eval echo "$as_me:14344: \"$ac_try\"") >&5
14345   (eval $ac_try) 2>&5
14346   ac_status=$?
14347   echo "$as_me:14347: \$? = $ac_status" >&5
14348   (exit "$ac_status"); }; }; then
14349   ac_lo=$ac_mid; break
14350 else
14351   echo "$as_me: failed program was:" >&5
14352 cat "conftest.$ac_ext" >&5
14353 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14354 fi
14355 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14356   done
14357 fi
14358 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14359 # Binary search between lo and hi bounds.
14360 while test "x$ac_lo" != "x$ac_hi"; do
14361   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14362   cat >"conftest.$ac_ext" <<_ACEOF
14363 #line 14363 "configure"
14364 #include "confdefs.h"
14365 $ac_includes_default
14366 int
14367 main (void)
14368 {
14369 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14370   ;
14371   return 0;
14372 }
14373 _ACEOF
14374 rm -f "conftest.$ac_objext"
14375 if { (eval echo "$as_me:14375: \"$ac_compile\"") >&5
14376   (eval $ac_compile) 2>&5
14377   ac_status=$?
14378   echo "$as_me:14378: \$? = $ac_status" >&5
14379   (exit "$ac_status"); } &&
14380          { ac_try='test -s "conftest.$ac_objext"'
14381   { (eval echo "$as_me:14381: \"$ac_try\"") >&5
14382   (eval $ac_try) 2>&5
14383   ac_status=$?
14384   echo "$as_me:14384: \$? = $ac_status" >&5
14385   (exit "$ac_status"); }; }; then
14386   ac_hi=$ac_mid
14387 else
14388   echo "$as_me: failed program was:" >&5
14389 cat "conftest.$ac_ext" >&5
14390 ac_lo=`expr "$ac_mid" + 1`
14391 fi
14392 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14393 done
14394 ac_cv_sizeof_signed_char=$ac_lo
14395 else
14396   if test "$cross_compiling" = yes; then
14397   { { echo "$as_me:14397: error: cannot run test program while cross compiling" >&5
14398 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14399    { (exit 1); exit 1; }; }
14400 else
14401   cat >"conftest.$ac_ext" <<_ACEOF
14402 #line 14402 "configure"
14403 #include "confdefs.h"
14404 $ac_includes_default
14405 int
14406 main (void)
14407 {
14408 FILE *f = fopen ("conftest.val", "w");
14409 if (!f)
14410   $ac_main_return (1);
14411 fprintf (f, "%ld", (long)(sizeof (signed char)));
14412 fclose (f);
14413   ;
14414   return 0;
14415 }
14416 _ACEOF
14417 rm -f "conftest$ac_exeext"
14418 if { (eval echo "$as_me:14418: \"$ac_link\"") >&5
14419   (eval $ac_link) 2>&5
14420   ac_status=$?
14421   echo "$as_me:14421: \$? = $ac_status" >&5
14422   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14423   { (eval echo "$as_me:14423: \"$ac_try\"") >&5
14424   (eval $ac_try) 2>&5
14425   ac_status=$?
14426   echo "$as_me:14426: \$? = $ac_status" >&5
14427   (exit "$ac_status"); }; }; then
14428   ac_cv_sizeof_signed_char=`cat conftest.val`
14429 else
14430   echo "$as_me: program exited with status $ac_status" >&5
14431 echo "$as_me: failed program was:" >&5
14432 cat "conftest.$ac_ext" >&5
14433 fi
14434 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14435 fi
14436 fi
14437 rm -f conftest.val
14438 else
14439   ac_cv_sizeof_signed_char=0
14440 fi
14441 fi
14442 echo "$as_me:14442: result: $ac_cv_sizeof_signed_char" >&5
14443 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14444 cat >>confdefs.h <<EOF
14445 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14446 EOF
14447
14448 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14449         NCURSES_SBOOL="signed char"
14450 else
14451         NCURSES_SBOOL="char"
14452 fi
14453 echo "$as_me:14453: checking if you want to use signed Boolean array in term.h" >&5
14454 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14455
14456 # Check whether --enable-signed-char or --disable-signed-char was given.
14457 if test "${enable_signed_char+set}" = set; then
14458   enableval="$enable_signed_char"
14459   with_signed_char=$enableval
14460 else
14461   with_signed_char=no
14462 fi;
14463 echo "$as_me:14463: result: $with_signed_char" >&5
14464 echo "${ECHO_T}$with_signed_char" >&6
14465 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14466
14467 ###   use option --with-tparm-arg to override tparm's argument type
14468 echo "$as_me:14468: checking for type of tparm args" >&5
14469 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14470
14471 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14472 if test "${with_tparm_arg+set}" = set; then
14473   withval="$with_tparm_arg"
14474   NCURSES_TPARM_ARG="$withval"
14475 else
14476   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14477 fi;
14478 echo "$as_me:14478: result: $NCURSES_TPARM_ARG" >&5
14479 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14480
14481 ### Enable compiling-in rcs id's
14482 echo "$as_me:14482: checking if RCS identifiers should be compiled-in" >&5
14483 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14484
14485 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14486 if test "${with_rcs_ids+set}" = set; then
14487   withval="$with_rcs_ids"
14488   with_rcs_ids=$withval
14489 else
14490   with_rcs_ids=no
14491 fi;
14492 echo "$as_me:14492: result: $with_rcs_ids" >&5
14493 echo "${ECHO_T}$with_rcs_ids" >&6
14494 test "x$with_rcs_ids" = xyes &&
14495 cat >>confdefs.h <<\EOF
14496 #define USE_RCS_IDS 1
14497 EOF
14498
14499 ###############################################################################
14500
14501 echo "$as_me:14501: checking format of man-pages" >&5
14502 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14503
14504 # Check whether --with-manpage-format or --without-manpage-format was given.
14505 if test "${with_manpage_format+set}" = set; then
14506   withval="$with_manpage_format"
14507   MANPAGE_FORMAT=$withval
14508 else
14509   MANPAGE_FORMAT=unknown
14510 fi;
14511
14512 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14513 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14514
14515 cf_unknown=
14516
14517 case "$MANPAGE_FORMAT" in
14518 (unknown)
14519         if test -z "$MANPATH" ; then
14520                 MANPATH="/usr/man:/usr/share/man"
14521         fi
14522
14523         # look for the 'date' man-page (it is most likely to be installed!)
14524         MANPAGE_FORMAT=
14525         cf_preform="no"
14526         cf_catonly="yes"
14527         cf_example="date"
14528
14529         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14530         for cf_dir in $MANPATH; do
14531                 test -z "$cf_dir" && cf_dir=/usr/man
14532                 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
14533                 do
14534                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14535                         if test "x$cf_test" = "x$cf_name" ; then
14536
14537                                 case "$cf_name" in
14538                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14539                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14540                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14541                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14542                                 esac
14543
14544                                 case "$cf_name" in
14545                                 ($cf_dir/man*)
14546                                         cf_catonly=no
14547                                         ;;
14548                                 ($cf_dir/cat*)
14549                                         cf_preform=yes
14550                                         ;;
14551                                 esac
14552                                 break
14553                         fi
14554
14555                         # if we found a match in either man* or cat*, stop looking
14556                         if test -n "$MANPAGE_FORMAT" ; then
14557                                 cf_found=no
14558                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14559                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14560                                 case "$cf_name" in
14561                                 ($cf_dir/cat*)
14562                                         cf_found=yes
14563                                         ;;
14564                                 esac
14565                                 test "$cf_found" = yes && break
14566                         fi
14567                 done
14568                 # only check the first directory in $MANPATH where we find manpages
14569                 if test -n "$MANPAGE_FORMAT" ; then
14570                         break
14571                 fi
14572         done
14573         # if we did not find the example, just assume it is normal
14574         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14575         IFS="$ac_save_ifs"
14576         ;;
14577 (*)
14578         for cf_option in $MANPAGE_FORMAT; do
14579         case "$cf_option" in
14580         (gzip|compress|BSDI|normal|formatted|catonly)
14581                 ;;
14582         (*)
14583                 cf_unknown="$cf_unknown $cf_option"
14584                 ;;
14585         esac
14586         done
14587         ;;
14588 esac
14589
14590 echo "$as_me:14590: result: $MANPAGE_FORMAT" >&5
14591 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14592 if test -n "$cf_unknown" ; then
14593         { echo "$as_me:14593: WARNING: Unexpected manpage-format $cf_unknown" >&5
14594 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14595 fi
14596
14597 echo "$as_me:14597: checking for manpage renaming" >&5
14598 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14599
14600 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14601 if test "${with_manpage_renames+set}" = set; then
14602   withval="$with_manpage_renames"
14603   MANPAGE_RENAMES=$withval
14604 else
14605   MANPAGE_RENAMES=yes
14606 fi;
14607
14608 case ".$MANPAGE_RENAMES" in
14609 (.no)
14610         ;;
14611 (.|.yes)
14612         # Debian 'man' program?
14613         if test -f /etc/debian_version ; then
14614                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14615         else
14616                 MANPAGE_RENAMES=no
14617         fi
14618         ;;
14619 esac
14620
14621 if test "$MANPAGE_RENAMES" != no ; then
14622         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14623                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14624         elif test ! -f "$MANPAGE_RENAMES" ; then
14625                 { { echo "$as_me:14625: error: not a filename: $MANPAGE_RENAMES" >&5
14626 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14627    { (exit 1); exit 1; }; }
14628         fi
14629
14630         test ! -d man && mkdir man
14631
14632         # Construct a sed-script to perform renaming within man-pages
14633         if test -n "$MANPAGE_RENAMES" ; then
14634                 test ! -d man && mkdir man
14635                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14636         fi
14637 fi
14638
14639 echo "$as_me:14639: result: $MANPAGE_RENAMES" >&5
14640 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14641
14642 echo "$as_me:14642: checking if manpage aliases will be installed" >&5
14643 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14644
14645 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14646 if test "${with_manpage_aliases+set}" = set; then
14647   withval="$with_manpage_aliases"
14648   MANPAGE_ALIASES=$withval
14649 else
14650   MANPAGE_ALIASES=yes
14651 fi;
14652
14653 echo "$as_me:14653: result: $MANPAGE_ALIASES" >&5
14654 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14655
14656 case "x$LN_S" in
14657 (xln*)
14658         cf_use_symlinks=yes
14659         ;;
14660 (*)
14661         cf_use_symlinks=no
14662         ;;
14663 esac
14664
14665 MANPAGE_SYMLINKS=no
14666 if test "$MANPAGE_ALIASES" = yes ; then
14667 echo "$as_me:14667: checking if manpage symlinks should be used" >&5
14668 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14669
14670 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14671 if test "${with_manpage_symlinks+set}" = set; then
14672   withval="$with_manpage_symlinks"
14673   MANPAGE_SYMLINKS=$withval
14674 else
14675   MANPAGE_SYMLINKS=$cf_use_symlinks
14676 fi;
14677
14678 if test "$$cf_use_symlinks" = no; then
14679 if test "$MANPAGE_SYMLINKS" = yes ; then
14680         { echo "$as_me:14680: WARNING: cannot make symlinks" >&5
14681 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14682         MANPAGE_SYMLINKS=no
14683 fi
14684 fi
14685
14686 echo "$as_me:14686: result: $MANPAGE_SYMLINKS" >&5
14687 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14688 fi
14689
14690 echo "$as_me:14690: checking for manpage tbl" >&5
14691 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14692
14693 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14694 if test "${with_manpage_tbl+set}" = set; then
14695   withval="$with_manpage_tbl"
14696   MANPAGE_TBL=$withval
14697 else
14698   MANPAGE_TBL=no
14699 fi;
14700
14701 echo "$as_me:14701: result: $MANPAGE_TBL" >&5
14702 echo "${ECHO_T}$MANPAGE_TBL" >&6
14703
14704 if test "$prefix" = "NONE" ; then
14705         cf_prefix="$ac_default_prefix"
14706 else
14707         cf_prefix="$prefix"
14708 fi
14709
14710 case "$MANPAGE_FORMAT" in
14711 (*catonly*)
14712         cf_format=yes
14713         cf_inboth=no
14714         ;;
14715 (*formatted*)
14716         cf_format=yes
14717         cf_inboth=yes
14718         ;;
14719 (*)
14720         cf_format=no
14721         cf_inboth=no
14722         ;;
14723 esac
14724
14725 test ! -d man && mkdir man
14726
14727 cf_so_strip=
14728 cf_compress=
14729 case "$MANPAGE_FORMAT" in
14730 (*compress*)
14731         cf_so_strip="Z"
14732         cf_compress=compress
14733         ;;
14734 (*gzip*)
14735         cf_so_strip="gz"
14736         cf_compress=gzip
14737         ;;
14738 esac
14739
14740 cf_edit_man=./edit_man.sh
14741 cf_man_alias=`pwd`/man_alias.sed
14742
14743 cat >$cf_edit_man <<CF_EOF
14744 #! $SHELL
14745 # this script is generated by the configure-script CF_MAN_PAGES macro.
14746
14747 prefix="$cf_prefix"
14748 datarootdir="$datarootdir"
14749 datadir="$datadir"
14750
14751 NCURSES_MAJOR="$NCURSES_MAJOR"
14752 NCURSES_MINOR="$NCURSES_MINOR"
14753 NCURSES_PATCH="$NCURSES_PATCH"
14754
14755 NCURSES_OSPEED="$NCURSES_OSPEED"
14756 TERMINFO="$TERMINFO"
14757
14758 INSTALL="$INSTALL"
14759 INSTALL_DATA="$INSTALL_DATA"
14760
14761 transform="$program_transform_name"
14762
14763 TMP=\${TMPDIR:=/tmp}/man\$\$
14764 trap "rm -f \$TMP" 0 1 2 3 15
14765
14766 form=\$1
14767 shift || exit 1
14768
14769 verb=\$1
14770 shift || exit 1
14771
14772 mandir=\$1
14773 shift || exit 1
14774
14775 srcdir=\$1
14776 top_srcdir=\$srcdir/..
14777 shift || exit 1
14778
14779 if test "\$form" = normal ; then
14780         if test "$cf_format" = yes ; then
14781         if test "$cf_inboth" = no ; then
14782                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14783                 exit $?
14784         fi
14785         fi
14786         cf_subdir=\$mandir/man
14787         cf_tables=$MANPAGE_TBL
14788 else
14789         cf_subdir=\$mandir/cat
14790         cf_tables=yes
14791 fi
14792
14793 # process the list of source-files
14794 for i in "\$@" ; do
14795 case \$i in
14796 (*.orig|*.rej) ;;
14797 (*.[0-9]*)
14798         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14799         if test "\$verb" = installing ; then
14800         if test ! -d "\$cf_subdir\${section}" ; then
14801                 mkdir -p "\$cf_subdir\$section"
14802         fi
14803         fi
14804
14805         # replace variables in man page
14806         if test ! -f "$cf_man_alias" ; then
14807 cat >>$cf_man_alias <<-CF_EOF2
14808                 s,@DATADIR@,\$datadir,g
14809                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14810                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14811                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14812                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14813                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14814                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14815 CF_EOF
14816
14817         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14818         do
14819                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14820                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14821 cat >>$cf_edit_man <<-CF_EOF
14822                 s,@$cf_NAME@,$cf_name,g
14823 CF_EOF
14824         done
14825
14826 cat >>$cf_edit_man <<CF_EOF
14827 CF_EOF2
14828                 echo "...made $cf_man_alias"
14829         fi
14830
14831         aliases=
14832         cf_source=\`basename "\$i"\`
14833         inalias=\$cf_source
14834         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14835         if test ! -f "\$inalias" ; then
14836                 echo ".. skipped \$cf_source"
14837                 continue
14838         fi
14839 CF_EOF
14840
14841 if test "$MANPAGE_ALIASES" != no ; then
14842 cat >>$cf_edit_man <<CF_EOF
14843         nCurses=ignore.3x
14844         test "$with_curses_h" = yes && nCurses=ncurses.3x
14845         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14846 CF_EOF
14847 fi
14848
14849 if test "$MANPAGE_RENAMES" = no ; then
14850 cat >>$cf_edit_man <<CF_EOF
14851         # perform program transformations for section 1 man pages
14852         if test \$section = 1 ; then
14853                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14854         else
14855                 cf_target=\$cf_subdir\${section}/\$cf_source
14856         fi
14857 CF_EOF
14858 else
14859 cat >>$cf_edit_man <<CF_EOF
14860         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14861         if test -z "\$cf_target" ; then
14862                 echo "? missing rename for \$cf_source"
14863                 cf_target="\$cf_source"
14864         fi
14865         cf_target="\$cf_subdir\${section}/\${cf_target}"
14866
14867 CF_EOF
14868 fi
14869
14870 cat >>$cf_edit_man <<CF_EOF
14871         sed     -f "$cf_man_alias" \\
14872 CF_EOF
14873
14874 if test -f "$MANPAGE_RENAMES" ; then
14875 cat >>$cf_edit_man <<CF_EOF
14876                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14877 CF_EOF
14878 else
14879 cat >>$cf_edit_man <<CF_EOF
14880                 < "\$i" >\$TMP
14881 CF_EOF
14882 fi
14883
14884 cat >>$cf_edit_man <<CF_EOF
14885 if test \$cf_tables = yes ; then
14886         tbl \$TMP >\$TMP.out
14887         mv \$TMP.out \$TMP
14888 fi
14889 CF_EOF
14890
14891 if test "$with_overwrite" != yes ; then
14892 cat >>$cf_edit_man <<CF_EOF
14893         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14894         mv \$TMP.out \$TMP
14895 CF_EOF
14896 fi
14897
14898 if test "$with_curses_h" != yes ; then
14899 cat >>$cf_edit_man <<CF_EOF
14900         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14901         mv \$TMP.out \$TMP
14902 CF_EOF
14903 fi
14904
14905 cat >>$cf_edit_man <<CF_EOF
14906         if test "\$form" = format ; then
14907                 nroff -man \$TMP >\$TMP.out
14908                 mv \$TMP.out \$TMP
14909         fi
14910 CF_EOF
14911
14912 if test -n "$cf_compress" ; then
14913 cat >>$cf_edit_man <<CF_EOF
14914         if test "\$verb" = installing ; then
14915         if ( "$cf_compress" -f \$TMP )
14916         then
14917                 mv \$TMP.$cf_so_strip \$TMP
14918         fi
14919         fi
14920         cf_target="\$cf_target.$cf_so_strip"
14921 CF_EOF
14922 fi
14923
14924 case "$MANPAGE_FORMAT" in
14925 (*BSDI*)
14926 cat >>$cf_edit_man <<CF_EOF
14927         if test "\$form" = format ; then
14928                 # BSDI installs only .0 suffixes in the cat directories
14929                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14930         fi
14931 CF_EOF
14932   ;;
14933 esac
14934
14935 cat >>$cf_edit_man <<CF_EOF
14936         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14937         if test "\$verb" = installing ; then
14938                 echo "\$verb \$cf_target"
14939                 \$INSTALL_DATA \$TMP "\$cf_target"
14940                 test -d "\$cf_subdir\${section}" &&
14941                 test -n "\$aliases" && (
14942                         cd "\$cf_subdir\${section}" && (
14943                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14944                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14945                                 cf_target=\`basename "\$cf_target"\`
14946                                 for cf_alias in \$aliases
14947                                 do
14948                                         if test "\$section" = 1 ; then
14949                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14950                                         fi
14951
14952                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14953                                                 if test -f "\$cf_alias\${suffix}" ; then
14954                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14955                                                         then
14956                                                                 continue
14957                                                         fi
14958                                                 fi
14959                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14960 CF_EOF
14961 case "x$LN_S" in
14962 (*-f)
14963 cat >>$cf_edit_man <<CF_EOF
14964                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14965 CF_EOF
14966         ;;
14967 (*)
14968 cat >>$cf_edit_man <<CF_EOF
14969                                                 rm -f "\$cf_alias\${suffix}"
14970                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14971 CF_EOF
14972         ;;
14973 esac
14974 cat >>$cf_edit_man <<CF_EOF
14975                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14976                                                 echo ".so \$cf_source" >\$TMP
14977 CF_EOF
14978 if test -n "$cf_compress" ; then
14979 cat >>$cf_edit_man <<CF_EOF
14980                                                 if test -n "$cf_so_strip" ; then
14981                                                         "$cf_compress" -f \$TMP
14982                                                         mv \$TMP.$cf_so_strip \$TMP
14983                                                 fi
14984 CF_EOF
14985 fi
14986 cat >>$cf_edit_man <<CF_EOF
14987                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14988                                                 rm -f "\$cf_alias\${suffix}"
14989                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14990                                         fi
14991                                 done
14992                         )
14993                 )
14994         elif test "\$verb" = removing ; then
14995                 test -f "\$cf_target" && (
14996                         echo "\$verb \$cf_target"
14997                         rm -f "\$cf_target"
14998                 )
14999                 test -d "\$cf_subdir\${section}" &&
15000                 test -n "\$aliases" && (
15001                         cd "\$cf_subdir\${section}" && (
15002                                 for cf_alias in \$aliases
15003                                 do
15004                                         if test "\$section" = 1 ; then
15005                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15006                                         fi
15007
15008                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15009                                         rm -f "\$cf_alias\${suffix}"
15010                                 done
15011                         )
15012                 )
15013         else
15014 #               echo ".hy 0"
15015                 cat \$TMP
15016         fi
15017         ;;
15018 esac
15019 done
15020
15021 if test "$cf_inboth" = yes ; then
15022 if test "\$form" != format ; then
15023         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15024 fi
15025 fi
15026
15027 exit 0
15028 CF_EOF
15029 chmod 755 "$cf_edit_man"
15030
15031 ###############################################################################
15032
15033 ### Note that some functions (such as const) are normally disabled anyway.
15034 echo "$as_me:15034: checking if you want to build with function extensions" >&5
15035 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15036
15037 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15038 if test "${enable_ext_funcs+set}" = set; then
15039   enableval="$enable_ext_funcs"
15040   with_ext_funcs=$enableval
15041 else
15042   with_ext_funcs=yes
15043 fi;
15044 echo "$as_me:15044: result: $with_ext_funcs" >&5
15045 echo "${ECHO_T}$with_ext_funcs" >&6
15046 if test "x$with_ext_funcs" = xyes ; then
15047         NCURSES_EXT_FUNCS=1
15048
15049 cat >>confdefs.h <<\EOF
15050 #define NCURSES_EXT_FUNCS 1
15051 EOF
15052
15053 cat >>confdefs.h <<\EOF
15054 #define HAVE_ASSUME_DEFAULT_COLORS 1
15055 EOF
15056
15057 cat >>confdefs.h <<\EOF
15058 #define HAVE_CURSES_VERSION 1
15059 EOF
15060
15061 cat >>confdefs.h <<\EOF
15062 #define HAVE_HAS_KEY 1
15063 EOF
15064
15065 cat >>confdefs.h <<\EOF
15066 #define HAVE_RESIZETERM 1
15067 EOF
15068
15069 cat >>confdefs.h <<\EOF
15070 #define HAVE_RESIZE_TERM 1
15071 EOF
15072
15073 cat >>confdefs.h <<\EOF
15074 #define HAVE_TERM_ENTRY_H 1
15075 EOF
15076
15077 cat >>confdefs.h <<\EOF
15078 #define HAVE_USE_DEFAULT_COLORS 1
15079 EOF
15080
15081 cat >>confdefs.h <<\EOF
15082 #define HAVE_USE_EXTENDED_NAMES 1
15083 EOF
15084
15085 cat >>confdefs.h <<\EOF
15086 #define HAVE_USE_SCREEN 1
15087 EOF
15088
15089 cat >>confdefs.h <<\EOF
15090 #define HAVE_USE_WINDOW 1
15091 EOF
15092
15093 cat >>confdefs.h <<\EOF
15094 #define HAVE_WRESIZE 1
15095 EOF
15096
15097         GENERATED_EXT_FUNCS=generated
15098         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15099 else
15100         NCURSES_EXT_FUNCS=0
15101         GENERATED_EXT_FUNCS=
15102 fi
15103
15104 echo "$as_me:15104: checking if you want to build with SCREEN extensions" >&5
15105 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15106
15107 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15108 if test "${enable_sp_funcs+set}" = set; then
15109   enableval="$enable_sp_funcs"
15110   with_sp_funcs=$enableval
15111 else
15112   with_sp_funcs=$cf_dft_ext_spfuncs
15113 fi;
15114 echo "$as_me:15114: result: $with_sp_funcs" >&5
15115 echo "${ECHO_T}$with_sp_funcs" >&6
15116 if test "x$with_sp_funcs" = xyes ; then
15117         NCURSES_SP_FUNCS=1
15118
15119 cat >>confdefs.h <<\EOF
15120 #define NCURSES_SP_FUNCS 1
15121 EOF
15122
15123 cat >>confdefs.h <<\EOF
15124 #define HAVE_TPUTS_SP 1
15125 EOF
15126
15127         GENERATED_SP_FUNCS=generated
15128 else
15129         NCURSES_SP_FUNCS=0
15130         GENERATED_SP_FUNCS=
15131 fi
15132
15133 echo "$as_me:15133: checking if you want to build with terminal-driver" >&5
15134 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15135
15136 # Check whether --enable-term-driver or --disable-term-driver was given.
15137 if test "${enable_term_driver+set}" = set; then
15138   enableval="$enable_term_driver"
15139   with_term_driver=$enableval
15140 else
15141   with_term_driver=no
15142 fi;
15143 echo "$as_me:15143: result: $with_term_driver" >&5
15144 echo "${ECHO_T}$with_term_driver" >&6
15145 if test "x$with_term_driver" = xyes ; then
15146
15147 cat >>confdefs.h <<\EOF
15148 #define USE_TERM_DRIVER 1
15149 EOF
15150
15151         if test "x$with_termlib" != xno ; then
15152                 { { echo "$as_me:15152: error: The term-driver option conflicts with the termlib option" >&5
15153 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15154    { (exit 1); exit 1; }; }
15155         fi
15156         if test "x$with_sp_funcs" != xyes ; then
15157                 { { echo "$as_me:15157: error: The term-driver option relies upon sp-funcs" >&5
15158 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15159    { (exit 1); exit 1; }; }
15160         fi
15161 fi
15162
15163 ###   use option --enable-const to turn on use of const beyond that in XSI.
15164 echo "$as_me:15164: checking for extended use of const keyword" >&5
15165 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15166
15167 # Check whether --enable-const or --disable-const was given.
15168 if test "${enable_const+set}" = set; then
15169   enableval="$enable_const"
15170   with_ext_const=$enableval
15171 else
15172   with_ext_const=$cf_dft_ext_const
15173 fi;
15174 echo "$as_me:15174: result: $with_ext_const" >&5
15175 echo "${ECHO_T}$with_ext_const" >&6
15176 NCURSES_CONST='/*nothing*/'
15177 if test "x$with_ext_const" = xyes ; then
15178         NCURSES_CONST=const
15179 fi
15180
15181 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15182 echo "$as_me:15182: checking if you want to use extended colors" >&5
15183 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15184
15185 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15186 if test "${enable_ext_colors+set}" = set; then
15187   enableval="$enable_ext_colors"
15188   with_ext_colors=$enableval
15189 else
15190   with_ext_colors=$cf_dft_ext_colors
15191 fi;
15192 echo "$as_me:15192: result: $with_ext_colors" >&5
15193 echo "${ECHO_T}$with_ext_colors" >&6
15194 NCURSES_EXT_COLORS=0
15195 if test "x$with_ext_colors" = xyes ; then
15196         if test "x$with_widec" != xyes ; then
15197                 { echo "$as_me:15197: WARNING: This option applies only to wide-character library" >&5
15198 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15199         else
15200                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15201
15202 if test "${with_abi_version+set}" != set; then
15203         case "$cf_cv_rel_version" in
15204         (5.*)
15205                 cf_cv_rel_version=6.0
15206                 cf_cv_abi_version=6
15207                 { echo "$as_me:15207: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15208 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15209                 ;;
15210         esac
15211 fi
15212
15213                 NCURSES_EXT_COLORS=1
15214
15215 cat >>confdefs.h <<\EOF
15216 #define NCURSES_EXT_COLORS 1
15217 EOF
15218
15219 cat >>confdefs.h <<\EOF
15220 #define HAVE_ALLOC_PAIR 1
15221 EOF
15222
15223 cat >>confdefs.h <<\EOF
15224 #define HAVE_INIT_EXTENDED_COLOR 1
15225 EOF
15226
15227 cat >>confdefs.h <<\EOF
15228 #define HAVE_RESET_COLOR_PAIRS 1
15229 EOF
15230
15231         fi
15232 fi
15233
15234 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15235 echo "$as_me:15235: checking if you want to use extended mouse encoding" >&5
15236 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15237
15238 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15239 if test "${enable_ext_mouse+set}" = set; then
15240   enableval="$enable_ext_mouse"
15241   with_ext_mouse=$enableval
15242 else
15243   with_ext_mouse=$cf_dft_ext_mouse
15244 fi;
15245 echo "$as_me:15245: result: $with_ext_mouse" >&5
15246 echo "${ECHO_T}$with_ext_mouse" >&6
15247 NCURSES_MOUSE_VERSION=1
15248 if test "x$with_ext_mouse" = xyes ; then
15249         NCURSES_MOUSE_VERSION=2
15250
15251 if test "${with_abi_version+set}" != set; then
15252         case "$cf_cv_rel_version" in
15253         (5.*)
15254                 cf_cv_rel_version=6.0
15255                 cf_cv_abi_version=6
15256                 { echo "$as_me:15256: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15257 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15258                 ;;
15259         esac
15260 fi
15261
15262 fi
15263
15264 ###   use option --enable-ext-putwin to turn on extended screendumps
15265 echo "$as_me:15265: checking if you want to use extended putwin/screendump" >&5
15266 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15267
15268 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15269 if test "${enable_ext_putwin+set}" = set; then
15270   enableval="$enable_ext_putwin"
15271   with_ext_putwin=$enableval
15272 else
15273   with_ext_putwin=$cf_dft_ext_putwin
15274 fi;
15275 echo "$as_me:15275: result: $with_ext_putwin" >&5
15276 echo "${ECHO_T}$with_ext_putwin" >&6
15277 if test "x$with_ext_putwin" = xyes ; then
15278
15279 cat >>confdefs.h <<\EOF
15280 #define NCURSES_EXT_PUTWIN 1
15281 EOF
15282
15283 fi
15284
15285 echo "$as_me:15285: checking if you want \$NCURSES_NO_PADDING code" >&5
15286 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15287
15288 # Check whether --enable-no-padding or --disable-no-padding was given.
15289 if test "${enable_no_padding+set}" = set; then
15290   enableval="$enable_no_padding"
15291   with_no_padding=$enableval
15292 else
15293   with_no_padding=$with_ext_funcs
15294 fi;
15295 echo "$as_me:15295: result: $with_no_padding" >&5
15296 echo "${ECHO_T}$with_no_padding" >&6
15297 test "x$with_no_padding" = xyes &&
15298 cat >>confdefs.h <<\EOF
15299 #define NCURSES_NO_PADDING 1
15300 EOF
15301
15302 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15303 echo "$as_me:15303: checking if you want SIGWINCH handler" >&5
15304 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15305
15306 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15307 if test "${enable_sigwinch+set}" = set; then
15308   enableval="$enable_sigwinch"
15309   with_sigwinch=$enableval
15310 else
15311   with_sigwinch=$with_ext_funcs
15312 fi;
15313 echo "$as_me:15313: result: $with_sigwinch" >&5
15314 echo "${ECHO_T}$with_sigwinch" >&6
15315 test "x$with_sigwinch" = xyes &&
15316 cat >>confdefs.h <<\EOF
15317 #define USE_SIGWINCH 1
15318 EOF
15319
15320 ###   use option --enable-tcap-names to allow user to define new capabilities
15321 echo "$as_me:15321: checking if you want user-definable terminal capabilities like termcap" >&5
15322 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15323
15324 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15325 if test "${enable_tcap_names+set}" = set; then
15326   enableval="$enable_tcap_names"
15327   with_tcap_names=$enableval
15328 else
15329   with_tcap_names=$with_ext_funcs
15330 fi;
15331 echo "$as_me:15331: result: $with_tcap_names" >&5
15332 echo "${ECHO_T}$with_tcap_names" >&6
15333 NCURSES_XNAMES=0
15334 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15335
15336 ##############################################################################
15337
15338 echo "$as_me:15338: checking if you want to link with the pthread library" >&5
15339 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15340
15341 # Check whether --with-pthread or --without-pthread was given.
15342 if test "${with_pthread+set}" = set; then
15343   withval="$with_pthread"
15344   with_pthread=$withval
15345 else
15346   with_pthread=no
15347 fi;
15348 echo "$as_me:15348: result: $with_pthread" >&5
15349 echo "${ECHO_T}$with_pthread" >&6
15350
15351 if test "$with_pthread" != no ; then
15352         echo "$as_me:15352: checking for pthread.h" >&5
15353 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15354 if test "${ac_cv_header_pthread_h+set}" = set; then
15355   echo $ECHO_N "(cached) $ECHO_C" >&6
15356 else
15357   cat >"conftest.$ac_ext" <<_ACEOF
15358 #line 15358 "configure"
15359 #include "confdefs.h"
15360 #include <pthread.h>
15361 _ACEOF
15362 if { (eval echo "$as_me:15362: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15363   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15364   ac_status=$?
15365   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15366   rm -f conftest.er1
15367   cat conftest.err >&5
15368   echo "$as_me:15368: \$? = $ac_status" >&5
15369   (exit "$ac_status"); } >/dev/null; then
15370   if test -s conftest.err; then
15371     ac_cpp_err=$ac_c_preproc_warn_flag
15372   else
15373     ac_cpp_err=
15374   fi
15375 else
15376   ac_cpp_err=yes
15377 fi
15378 if test -z "$ac_cpp_err"; then
15379   ac_cv_header_pthread_h=yes
15380 else
15381   echo "$as_me: failed program was:" >&5
15382   cat "conftest.$ac_ext" >&5
15383   ac_cv_header_pthread_h=no
15384 fi
15385 rm -f conftest.err "conftest.$ac_ext"
15386 fi
15387 echo "$as_me:15387: result: $ac_cv_header_pthread_h" >&5
15388 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15389 if test "$ac_cv_header_pthread_h" = yes; then
15390
15391 cat >>confdefs.h <<\EOF
15392 #define HAVE_PTHREADS_H 1
15393 EOF
15394
15395         for cf_lib_pthread in pthread c_r
15396         do
15397             echo "$as_me:15397: checking if we can link with the $cf_lib_pthread library" >&5
15398 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15399             cf_save_LIBS="$LIBS"
15400
15401 cf_add_libs="$LIBS"
15402 # reverse order
15403 cf_add_0lib=
15404 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15405 # filter duplicates
15406 for cf_add_1lib in $cf_add_0lib; do
15407         for cf_add_2lib in $cf_add_libs; do
15408                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15409                         cf_add_1lib=
15410                         break
15411                 fi
15412         done
15413         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15414 done
15415 LIBS="$cf_add_libs"
15416
15417             cat >"conftest.$ac_ext" <<_ACEOF
15418 #line 15418 "configure"
15419 #include "confdefs.h"
15420
15421 #include <pthread.h>
15422
15423 int
15424 main (void)
15425 {
15426
15427                 int rc = pthread_create(0,0,0,0);
15428                 int r2 = pthread_mutexattr_settype(0, 0);
15429
15430   ;
15431   return 0;
15432 }
15433 _ACEOF
15434 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15435 if { (eval echo "$as_me:15435: \"$ac_link\"") >&5
15436   (eval $ac_link) 2>&5
15437   ac_status=$?
15438   echo "$as_me:15438: \$? = $ac_status" >&5
15439   (exit "$ac_status"); } &&
15440          { ac_try='test -s "conftest$ac_exeext"'
15441   { (eval echo "$as_me:15441: \"$ac_try\"") >&5
15442   (eval $ac_try) 2>&5
15443   ac_status=$?
15444   echo "$as_me:15444: \$? = $ac_status" >&5
15445   (exit "$ac_status"); }; }; then
15446   with_pthread=yes
15447 else
15448   echo "$as_me: failed program was:" >&5
15449 cat "conftest.$ac_ext" >&5
15450 with_pthread=no
15451 fi
15452 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15453             LIBS="$cf_save_LIBS"
15454             echo "$as_me:15454: result: $with_pthread" >&5
15455 echo "${ECHO_T}$with_pthread" >&6
15456             test "$with_pthread" = yes && break
15457         done
15458
15459         if test "$with_pthread" = yes ; then
15460
15461 cf_add_libs="$LIBS"
15462 # reverse order
15463 cf_add_0lib=
15464 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15465 # filter duplicates
15466 for cf_add_1lib in $cf_add_0lib; do
15467         for cf_add_2lib in $cf_add_libs; do
15468                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15469                         cf_add_1lib=
15470                         break
15471                 fi
15472         done
15473         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15474 done
15475 LIBS="$cf_add_libs"
15476
15477 cat >>confdefs.h <<\EOF
15478 #define HAVE_LIBPTHREADS 1
15479 EOF
15480
15481         else
15482             { { echo "$as_me:15482: error: Cannot link with pthread library" >&5
15483 echo "$as_me: error: Cannot link with pthread library" >&2;}
15484    { (exit 1); exit 1; }; }
15485         fi
15486
15487 fi
15488
15489 fi
15490
15491 if test "x$with_pthread" != xno; then
15492         echo "$as_me:15492: checking for pthread_kill" >&5
15493 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15494 if test "${ac_cv_func_pthread_kill+set}" = set; then
15495   echo $ECHO_N "(cached) $ECHO_C" >&6
15496 else
15497   cat >"conftest.$ac_ext" <<_ACEOF
15498 #line 15498 "configure"
15499 #include "confdefs.h"
15500 #define pthread_kill autoconf_temporary
15501 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15502 #undef pthread_kill
15503
15504 #ifdef __cplusplus
15505 extern "C"
15506 #endif
15507
15508 /* We use char because int might match the return type of a gcc2
15509    builtin and then its argument prototype would still apply.  */
15510 char pthread_kill (void);
15511
15512 int
15513 main (void)
15514 {
15515
15516 /* The GNU C library defines stubs for functions which it implements
15517     to always fail with ENOSYS.  Some functions are actually named
15518     something starting with __ and the normal name is an alias.  */
15519 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15520 #error found stub for pthread_kill
15521 #endif
15522
15523         return pthread_kill ();
15524   ;
15525   return 0;
15526 }
15527 _ACEOF
15528 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15529 if { (eval echo "$as_me:15529: \"$ac_link\"") >&5
15530   (eval $ac_link) 2>&5
15531   ac_status=$?
15532   echo "$as_me:15532: \$? = $ac_status" >&5
15533   (exit "$ac_status"); } &&
15534          { ac_try='test -s "conftest$ac_exeext"'
15535   { (eval echo "$as_me:15535: \"$ac_try\"") >&5
15536   (eval $ac_try) 2>&5
15537   ac_status=$?
15538   echo "$as_me:15538: \$? = $ac_status" >&5
15539   (exit "$ac_status"); }; }; then
15540   ac_cv_func_pthread_kill=yes
15541 else
15542   echo "$as_me: failed program was:" >&5
15543 cat "conftest.$ac_ext" >&5
15544 ac_cv_func_pthread_kill=no
15545 fi
15546 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15547 fi
15548 echo "$as_me:15548: result: $ac_cv_func_pthread_kill" >&5
15549 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15550 if test "$ac_cv_func_pthread_kill" = yes; then
15551
15552                 echo "$as_me:15552: checking if you want to allow EINTR in wgetch with pthreads" >&5
15553 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15554
15555 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15556 if test "${enable_pthreads_eintr+set}" = set; then
15557   enableval="$enable_pthreads_eintr"
15558   use_pthreads_eintr=$enableval
15559 else
15560   use_pthreads_eintr=no
15561 fi;
15562                 echo "$as_me:15562: result: $use_pthreads_eintr" >&5
15563 echo "${ECHO_T}$use_pthreads_eintr" >&6
15564                 if test "x$use_pthreads_eintr" = xyes ; then
15565
15566 cat >>confdefs.h <<\EOF
15567 #define USE_PTHREADS_EINTR 1
15568 EOF
15569
15570                 fi
15571 fi
15572
15573         echo "$as_me:15573: checking if you want to use weak-symbols for pthreads" >&5
15574 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15575
15576 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15577 if test "${enable_weak_symbols+set}" = set; then
15578   enableval="$enable_weak_symbols"
15579   use_weak_symbols=$enableval
15580 else
15581   use_weak_symbols=no
15582 fi;
15583         echo "$as_me:15583: result: $use_weak_symbols" >&5
15584 echo "${ECHO_T}$use_weak_symbols" >&6
15585         if test "x$use_weak_symbols" = xyes ; then
15586
15587 echo "$as_me:15587: checking if $CC supports weak symbols" >&5
15588 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15589 if test "${cf_cv_weak_symbols+set}" = set; then
15590   echo $ECHO_N "(cached) $ECHO_C" >&6
15591 else
15592
15593 cat >"conftest.$ac_ext" <<_ACEOF
15594 #line 15594 "configure"
15595 #include "confdefs.h"
15596
15597 #include <stdio.h>
15598 int
15599 main (void)
15600 {
15601
15602 #if defined(__GNUC__)
15603 #  if defined __USE_ISOC99
15604 #    define _cat_pragma(exp)    _Pragma(#exp)
15605 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15606 #  else
15607 #    define _weak_pragma(exp)
15608 #  endif
15609 #  define _declare(name)        __extension__ extern __typeof__(name) name
15610 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15611 #endif
15612
15613 weak_symbol(fopen);
15614
15615   ;
15616   return 0;
15617 }
15618 _ACEOF
15619 rm -f "conftest.$ac_objext"
15620 if { (eval echo "$as_me:15620: \"$ac_compile\"") >&5
15621   (eval $ac_compile) 2>&5
15622   ac_status=$?
15623   echo "$as_me:15623: \$? = $ac_status" >&5
15624   (exit "$ac_status"); } &&
15625          { ac_try='test -s "conftest.$ac_objext"'
15626   { (eval echo "$as_me:15626: \"$ac_try\"") >&5
15627   (eval $ac_try) 2>&5
15628   ac_status=$?
15629   echo "$as_me:15629: \$? = $ac_status" >&5
15630   (exit "$ac_status"); }; }; then
15631   cf_cv_weak_symbols=yes
15632 else
15633   echo "$as_me: failed program was:" >&5
15634 cat "conftest.$ac_ext" >&5
15635 cf_cv_weak_symbols=no
15636 fi
15637 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15638
15639 fi
15640 echo "$as_me:15640: result: $cf_cv_weak_symbols" >&5
15641 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15642
15643         else
15644                 cf_cv_weak_symbols=no
15645         fi
15646
15647         if test "x$cf_cv_weak_symbols" = xyes ; then
15648
15649 cat >>confdefs.h <<\EOF
15650 #define USE_WEAK_SYMBOLS 1
15651 EOF
15652
15653         fi
15654 fi
15655
15656 PTHREAD=
15657 if test "x$with_pthread" = "xyes" ; then
15658
15659 cat >>confdefs.h <<\EOF
15660 #define USE_PTHREADS 1
15661 EOF
15662
15663         enable_reentrant=yes
15664         if test "x$cf_cv_weak_symbols" = xyes ; then
15665                 PTHREAD=-lpthread
15666
15667 cf_add_libs="$PRIVATE_LIBS"
15668 # reverse order
15669 cf_add_0lib=
15670 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15671 # filter duplicates
15672 for cf_add_1lib in $cf_add_0lib; do
15673         for cf_add_2lib in $cf_add_libs; do
15674                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15675                         cf_add_1lib=
15676                         break
15677                 fi
15678         done
15679         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15680 done
15681 PRIVATE_LIBS="$cf_add_libs"
15682
15683         fi
15684 fi
15685
15686 # Reentrant code has to be opaque; there's little advantage to making ncurses
15687 # opaque outside of that, so there is no --enable-opaque option.  We can use
15688 # this option without --with-pthreads, but this will be always set for
15689 # pthreads.
15690 echo "$as_me:15690: checking if you want reentrant code" >&5
15691 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15692
15693 # Check whether --enable-reentrant or --disable-reentrant was given.
15694 if test "${enable_reentrant+set}" = set; then
15695   enableval="$enable_reentrant"
15696   with_reentrant=$enableval
15697 else
15698   with_reentrant=no
15699 fi;
15700 echo "$as_me:15700: result: $with_reentrant" >&5
15701 echo "${ECHO_T}$with_reentrant" >&6
15702 if test "x$with_reentrant" = xyes ; then
15703         cf_cv_enable_reentrant=1
15704         cf_cv_enable_opaque="NCURSES_INTERNALS"
15705         NCURSES_SIZE_T=int
15706         if test "x$cf_cv_weak_symbols" = xyes ; then
15707
15708 # remove pthread library from $LIBS
15709 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15710
15711 cf_add_libs="$TEST_LIBS"
15712 # reverse order
15713 cf_add_0lib=
15714 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15715 # filter duplicates
15716 for cf_add_1lib in $cf_add_0lib; do
15717         for cf_add_2lib in $cf_add_libs; do
15718                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15719                         cf_add_1lib=
15720                         break
15721                 fi
15722         done
15723         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15724 done
15725 TEST_LIBS="$cf_add_libs"
15726
15727 cf_add_libs="$TEST_LIBS2"
15728 # reverse order
15729 cf_add_0lib=
15730 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15731 # filter duplicates
15732 for cf_add_1lib in $cf_add_0lib; do
15733         for cf_add_2lib in $cf_add_libs; do
15734                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15735                         cf_add_1lib=
15736                         break
15737                 fi
15738         done
15739         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15740 done
15741 TEST_LIBS2="$cf_add_libs"
15742
15743 cf_add_libs="$PRIVATE_LIBS"
15744 # reverse order
15745 cf_add_0lib=
15746 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15747 # filter duplicates
15748 for cf_add_1lib in $cf_add_0lib; do
15749         for cf_add_2lib in $cf_add_libs; do
15750                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15751                         cf_add_1lib=
15752                         break
15753                 fi
15754         done
15755         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15756 done
15757 PRIVATE_LIBS="$cf_add_libs"
15758
15759         else
15760                 # when not using weak symbols but with_reentrant,
15761                 # add 't' to the library suffix on all platforms
15762                 # except cygwin, where we only do that if ALSO
15763                 # compiling with full thread support.
15764                 case "$host" in
15765                 (*cygwin* | *msys*)
15766                         if test "$with_pthread" = "yes" ; then
15767                                 if test "x$disable_lib_suffixes" = "xno" ; then
15768                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15769                                 fi
15770                         fi ;;
15771                 (*)
15772                         if test "x$disable_lib_suffixes" = "xno" ; then
15773                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15774                         fi
15775                         ;;
15776                 esac
15777         fi
15778
15779 cat >>confdefs.h <<\EOF
15780 #define USE_REENTRANT 1
15781 EOF
15782
15783 if test "${with_abi_version+set}" != set; then
15784         case "$cf_cv_rel_version" in
15785         (5.*)
15786                 cf_cv_rel_version=6.0
15787                 cf_cv_abi_version=6
15788                 { echo "$as_me:15788: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15789 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15790                 ;;
15791         esac
15792 fi
15793
15794 else
15795         cf_cv_enable_reentrant=0
15796         cf_cv_enable_opaque="NCURSES_OPAQUE"
15797         NCURSES_SIZE_T=short
15798 fi
15799
15800 echo "$as_me:15800: checking if you want opaque curses-library structures" >&5
15801 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15802
15803 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15804 if test "${enable_opaque_curses+set}" = set; then
15805   enableval="$enable_opaque_curses"
15806   test "$enableval" != yes && enableval=no
15807         if test "$enableval" != "no" ; then
15808     enable_opaque_curses=yes
15809         else
15810
15811          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15812          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15813
15814         fi
15815 else
15816   enableval=no
15817
15818          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15819          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15820
15821 fi;
15822 echo "$as_me:15822: result: $enable_opaque_curses" >&5
15823 echo "${ECHO_T}$enable_opaque_curses" >&6
15824
15825 test "$cf_cv_enable_reentrant" = 1 && \
15826 test "$enable_opaque_curses" = no && \
15827 { { echo "$as_me:15827: error: reentrant configuration requires opaque library" >&5
15828 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15829    { (exit 1); exit 1; }; }
15830
15831 echo "$as_me:15831: checking if you want opaque form-library structures" >&5
15832 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15833
15834 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15835 if test "${enable_opaque_form+set}" = set; then
15836   enableval="$enable_opaque_form"
15837   enable_opaque_form=yes
15838 else
15839   enable_opaque_form=no
15840 fi;
15841 echo "$as_me:15841: result: $enable_opaque_form" >&5
15842 echo "${ECHO_T}$enable_opaque_form" >&6
15843
15844 echo "$as_me:15844: checking if you want opaque menu-library structures" >&5
15845 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15846
15847 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15848 if test "${enable_opaque_menu+set}" = set; then
15849   enableval="$enable_opaque_menu"
15850   enable_opaque_menu=yes
15851 else
15852   enable_opaque_menu=no
15853 fi;
15854 echo "$as_me:15854: result: $enable_opaque_menu" >&5
15855 echo "${ECHO_T}$enable_opaque_menu" >&6
15856
15857 echo "$as_me:15857: checking if you want opaque panel-library structures" >&5
15858 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15859
15860 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15861 if test "${enable_opaque_panel+set}" = set; then
15862   enableval="$enable_opaque_panel"
15863   enable_opaque_panel=yes
15864 else
15865   enable_opaque_panel=no
15866 fi;
15867 echo "$as_me:15867: result: $enable_opaque_panel" >&5
15868 echo "${ECHO_T}$enable_opaque_panel" >&6
15869
15870 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15871 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15872 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15873 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15874
15875 ### Allow using a different wrap-prefix
15876 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15877         echo "$as_me:15877: checking for prefix used to wrap public variables" >&5
15878 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15879
15880 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15881 if test "${with_wrap_prefix+set}" = set; then
15882   withval="$with_wrap_prefix"
15883   NCURSES_WRAP_PREFIX=$withval
15884 else
15885   NCURSES_WRAP_PREFIX=_nc_
15886 fi;
15887         echo "$as_me:15887: result: $NCURSES_WRAP_PREFIX" >&5
15888 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15889 else
15890         NCURSES_WRAP_PREFIX=_nc_
15891 fi
15892
15893 cat >>confdefs.h <<EOF
15894 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15895 EOF
15896
15897 ###############################################################################
15898 # These options are relatively safe to experiment with.
15899
15900 echo "$as_me:15900: checking if you want all development code" >&5
15901 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15902
15903 # Check whether --with-develop or --without-develop was given.
15904 if test "${with_develop+set}" = set; then
15905   withval="$with_develop"
15906   with_develop=$withval
15907 else
15908   with_develop=no
15909 fi;
15910 echo "$as_me:15910: result: $with_develop" >&5
15911 echo "${ECHO_T}$with_develop" >&6
15912
15913 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15914 echo "$as_me:15914: checking if you want hard-tabs code" >&5
15915 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15916
15917 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15918 if test "${enable_hard_tabs+set}" = set; then
15919   enableval="$enable_hard_tabs"
15920
15921 else
15922   enable_hard_tabs=$with_develop
15923 fi;
15924 echo "$as_me:15924: result: $enable_hard_tabs" >&5
15925 echo "${ECHO_T}$enable_hard_tabs" >&6
15926 test "x$enable_hard_tabs" = xyes &&
15927 cat >>confdefs.h <<\EOF
15928 #define USE_HARD_TABS 1
15929 EOF
15930
15931 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15932 echo "$as_me:15932: checking if you want limited support for xmc" >&5
15933 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15934
15935 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15936 if test "${enable_xmc_glitch+set}" = set; then
15937   enableval="$enable_xmc_glitch"
15938
15939 else
15940   enable_xmc_glitch=$with_develop
15941 fi;
15942 echo "$as_me:15942: result: $enable_xmc_glitch" >&5
15943 echo "${ECHO_T}$enable_xmc_glitch" >&6
15944 test "x$enable_xmc_glitch" = xyes &&
15945 cat >>confdefs.h <<\EOF
15946 #define USE_XMC_SUPPORT 1
15947 EOF
15948
15949 ###############################################################################
15950 # These are just experimental, probably should not be in a package:
15951
15952 echo "$as_me:15952: checking if you do not want to assume colors are white-on-black" >&5
15953 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15954
15955 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15956 if test "${enable_assumed_color+set}" = set; then
15957   enableval="$enable_assumed_color"
15958   with_assumed_color=$enableval
15959 else
15960   with_assumed_color=yes
15961 fi;
15962 echo "$as_me:15962: result: $with_assumed_color" >&5
15963 echo "${ECHO_T}$with_assumed_color" >&6
15964 test "x$with_assumed_color" = xyes &&
15965 cat >>confdefs.h <<\EOF
15966 #define USE_ASSUMED_COLOR 1
15967 EOF
15968
15969 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15970 echo "$as_me:15970: checking if you want hashmap scrolling-optimization code" >&5
15971 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15972
15973 # Check whether --enable-hashmap or --disable-hashmap was given.
15974 if test "${enable_hashmap+set}" = set; then
15975   enableval="$enable_hashmap"
15976   with_hashmap=$enableval
15977 else
15978   with_hashmap=yes
15979 fi;
15980 echo "$as_me:15980: result: $with_hashmap" >&5
15981 echo "${ECHO_T}$with_hashmap" >&6
15982 test "x$with_hashmap" = xyes &&
15983 cat >>confdefs.h <<\EOF
15984 #define USE_HASHMAP 1
15985 EOF
15986
15987 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15988 echo "$as_me:15988: checking if you want colorfgbg code" >&5
15989 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15990
15991 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15992 if test "${enable_colorfgbg+set}" = set; then
15993   enableval="$enable_colorfgbg"
15994   with_colorfgbg=$enableval
15995 else
15996   with_colorfgbg=no
15997 fi;
15998 echo "$as_me:15998: result: $with_colorfgbg" >&5
15999 echo "${ECHO_T}$with_colorfgbg" >&6
16000 test "x$with_colorfgbg" = xyes &&
16001 cat >>confdefs.h <<\EOF
16002 #define USE_COLORFGBG 1
16003 EOF
16004
16005 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16006 echo "$as_me:16006: checking if you want to use gcc -fvisibility option" >&5
16007 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16008
16009 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16010 if test "${enable_fvisibility+set}" = set; then
16011   enableval="$enable_fvisibility"
16012   cf_with_fvisibility=$enableval
16013 else
16014   cf_with_fvisibility=no
16015 fi;
16016 echo "$as_me:16016: result: $cf_with_fvisibility" >&5
16017 echo "${ECHO_T}$cf_with_fvisibility" >&6
16018
16019 NCURSES_IMPEXP=
16020 NCURSES_CXX_IMPEXP=
16021 if test "x$cf_with_fvisibility" = xyes; then
16022
16023 echo "$as_me:16023: checking if $CC -fvisibility=hidden option works" >&5
16024 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16025 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16026   echo $ECHO_N "(cached) $ECHO_C" >&6
16027 else
16028
16029     cf_save_cflags="$CFLAGS"
16030     CFLAGS="$CFLAGS -fvisibility=hidden"
16031     cat >"conftest.$ac_ext" <<_ACEOF
16032 #line 16032 "configure"
16033 #include "confdefs.h"
16034
16035 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16036
16037 int
16038 main (void)
16039 {
16040
16041         if (somefunc()) return 1;
16042
16043   ;
16044   return 0;
16045 }
16046 _ACEOF
16047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16048 if { (eval echo "$as_me:16048: \"$ac_link\"") >&5
16049   (eval $ac_link) 2>&5
16050   ac_status=$?
16051   echo "$as_me:16051: \$? = $ac_status" >&5
16052   (exit "$ac_status"); } &&
16053          { ac_try='test -s "conftest$ac_exeext"'
16054   { (eval echo "$as_me:16054: \"$ac_try\"") >&5
16055   (eval $ac_try) 2>&5
16056   ac_status=$?
16057   echo "$as_me:16057: \$? = $ac_status" >&5
16058   (exit "$ac_status"); }; }; then
16059   cf_cv_fvisibility_hidden=yes
16060 else
16061   echo "$as_me: failed program was:" >&5
16062 cat "conftest.$ac_ext" >&5
16063 cf_cv_fvisibility_hidden=no
16064 fi
16065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16066     CFLAGS=$cf_save_cflags
16067
16068 fi
16069 echo "$as_me:16069: result: $cf_cv_fvisibility_hidden" >&5
16070 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16071
16072         if test "x$cf_cv_fvisibility_hidden" = xyes
16073         then
16074
16075 cf_fix_cppflags=no
16076 cf_new_cflags=
16077 cf_new_cppflags=
16078 cf_new_extra_cppflags=
16079
16080 for cf_add_cflags in -fvisibility=hidden
16081 do
16082 case "$cf_fix_cppflags" in
16083 (no)
16084         case "$cf_add_cflags" in
16085         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16086                 case "$cf_add_cflags" in
16087                 (-D*)
16088                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16089
16090                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16091                                 && test -z "${cf_tst_cflags}" \
16092                                 && cf_fix_cppflags=yes
16093
16094                         if test "$cf_fix_cppflags" = yes ; then
16095
16096         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16097         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16098
16099                                 continue
16100                         elif test "${cf_tst_cflags}" = "\"'" ; then
16101
16102         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16103         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16104
16105                                 continue
16106                         fi
16107                         ;;
16108                 esac
16109                 case "$CPPFLAGS" in
16110                 (*$cf_add_cflags)
16111                         ;;
16112                 (*)
16113                         case "$cf_add_cflags" in
16114                         (-D*)
16115                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16116
16117 CPPFLAGS=`echo "$CPPFLAGS" | \
16118         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16119                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16120
16121                                 ;;
16122                         esac
16123
16124         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16125         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16126
16127                         ;;
16128                 esac
16129                 ;;
16130         (*)
16131
16132         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16133         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16134
16135                 ;;
16136         esac
16137         ;;
16138 (yes)
16139
16140         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16141         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16142
16143         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16144
16145         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16146                 && test -z "${cf_tst_cflags}" \
16147                 && cf_fix_cppflags=no
16148         ;;
16149 esac
16150 done
16151
16152 if test -n "$cf_new_cflags" ; then
16153
16154         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16155         CFLAGS="${CFLAGS}$cf_new_cflags"
16156
16157 fi
16158
16159 if test -n "$cf_new_cppflags" ; then
16160
16161         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16162         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16163
16164 fi
16165
16166 if test -n "$cf_new_extra_cppflags" ; then
16167
16168         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16169         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16170
16171 fi
16172
16173                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16174         fi
16175         if test -n "$CXX"
16176         then
16177                 ac_ext=cc
16178 ac_cpp='$CXXCPP $CPPFLAGS'
16179 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16180 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16181 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16182 ac_main_return="return"
16183
16184 echo "$as_me:16184: checking if $CXX -fvisibility=hidden option works" >&5
16185 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16186 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16187   echo $ECHO_N "(cached) $ECHO_C" >&6
16188 else
16189
16190     cf_save_cflags="$CXXFLAGS"
16191     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16192     cat >"conftest.$ac_ext" <<_ACEOF
16193 #line 16193 "configure"
16194 #include "confdefs.h"
16195
16196 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16197
16198 int
16199 main (void)
16200 {
16201
16202         if (somefunc()) return 1;
16203
16204   ;
16205   return 0;
16206 }
16207 _ACEOF
16208 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16209 if { (eval echo "$as_me:16209: \"$ac_link\"") >&5
16210   (eval $ac_link) 2>&5
16211   ac_status=$?
16212   echo "$as_me:16212: \$? = $ac_status" >&5
16213   (exit "$ac_status"); } &&
16214          { ac_try='test -s "conftest$ac_exeext"'
16215   { (eval echo "$as_me:16215: \"$ac_try\"") >&5
16216   (eval $ac_try) 2>&5
16217   ac_status=$?
16218   echo "$as_me:16218: \$? = $ac_status" >&5
16219   (exit "$ac_status"); }; }; then
16220   cf_cv_fvisibility_hidden2=yes
16221 else
16222   echo "$as_me: failed program was:" >&5
16223 cat "conftest.$ac_ext" >&5
16224 cf_cv_fvisibility_hidden2=no
16225 fi
16226 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16227     CXXFLAGS=$cf_save_cflags
16228
16229 fi
16230 echo "$as_me:16230: result: $cf_cv_fvisibility_hidden2" >&5
16231 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16232
16233                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16234                 then
16235
16236 cf_save_CXXFLAGS="$CFLAGS"
16237 CFLAGS="$CXXFLAGS"
16238
16239 cf_fix_cppflags=no
16240 cf_new_cflags=
16241 cf_new_cppflags=
16242 cf_new_extra_cppflags=
16243
16244 for cf_add_cflags in -fvisibility=hidden
16245 do
16246 case "$cf_fix_cppflags" in
16247 (no)
16248         case "$cf_add_cflags" in
16249         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16250                 case "$cf_add_cflags" in
16251                 (-D*)
16252                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16253
16254                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16255                                 && test -z "${cf_tst_cflags}" \
16256                                 && cf_fix_cppflags=yes
16257
16258                         if test "$cf_fix_cppflags" = yes ; then
16259
16260         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16261         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16262
16263                                 continue
16264                         elif test "${cf_tst_cflags}" = "\"'" ; then
16265
16266         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16267         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16268
16269                                 continue
16270                         fi
16271                         ;;
16272                 esac
16273                 case "$CPPFLAGS" in
16274                 (*$cf_add_cflags)
16275                         ;;
16276                 (*)
16277                         case "$cf_add_cflags" in
16278                         (-D*)
16279                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16280
16281 CPPFLAGS=`echo "$CPPFLAGS" | \
16282         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16283                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16284
16285                                 ;;
16286                         esac
16287
16288         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16289         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16290
16291                         ;;
16292                 esac
16293                 ;;
16294         (*)
16295
16296         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16297         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16298
16299                 ;;
16300         esac
16301         ;;
16302 (yes)
16303
16304         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16305         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16306
16307         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16308
16309         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16310                 && test -z "${cf_tst_cflags}" \
16311                 && cf_fix_cppflags=no
16312         ;;
16313 esac
16314 done
16315
16316 if test -n "$cf_new_cflags" ; then
16317
16318         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16319         CFLAGS="${CFLAGS}$cf_new_cflags"
16320
16321 fi
16322
16323 if test -n "$cf_new_cppflags" ; then
16324
16325         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16326         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16327
16328 fi
16329
16330 if test -n "$cf_new_extra_cppflags" ; then
16331
16332         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16333         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16334
16335 fi
16336
16337 CXXFLAGS="$CFLAGS"
16338 CFLAGS="$cf_save_CXXFLAGS"
16339
16340                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16341                 fi
16342                 ac_ext=c
16343 ac_cpp='$CPP $CPPFLAGS'
16344 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16345 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16346 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16347 ac_main_return="return"
16348
16349         fi
16350 fi
16351
16352 ###   use option --enable-interop to turn on use of bindings used for interop
16353 echo "$as_me:16353: checking if you want interop bindings" >&5
16354 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16355
16356 # Check whether --enable-interop or --disable-interop was given.
16357 if test "${enable_interop+set}" = set; then
16358   enableval="$enable_interop"
16359   with_exp_interop=$enableval
16360 else
16361   with_exp_interop=$cf_dft_interop
16362 fi;
16363 echo "$as_me:16363: result: $with_exp_interop" >&5
16364 echo "${ECHO_T}$with_exp_interop" >&6
16365
16366 NCURSES_INTEROP_FUNCS=0
16367 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16368
16369 echo "$as_me:16369: checking if you want experimental safe-sprintf code" >&5
16370 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16371
16372 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16373 if test "${enable_safe_sprintf+set}" = set; then
16374   enableval="$enable_safe_sprintf"
16375   with_safe_sprintf=$enableval
16376 else
16377   with_safe_sprintf=no
16378 fi;
16379 echo "$as_me:16379: result: $with_safe_sprintf" >&5
16380 echo "${ECHO_T}$with_safe_sprintf" >&6
16381
16382 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16383 # when hashmap is used scroll hints are useless
16384 if test "$with_hashmap" = no ; then
16385 echo "$as_me:16385: checking if you want to experiment without scrolling-hints code" >&5
16386 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16387
16388 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16389 if test "${enable_scroll_hints+set}" = set; then
16390   enableval="$enable_scroll_hints"
16391   with_scroll_hints=$enableval
16392 else
16393   with_scroll_hints=yes
16394 fi;
16395 echo "$as_me:16395: result: $with_scroll_hints" >&5
16396 echo "${ECHO_T}$with_scroll_hints" >&6
16397 test "x$with_scroll_hints" = xyes &&
16398 cat >>confdefs.h <<\EOF
16399 #define USE_SCROLL_HINTS 1
16400 EOF
16401
16402 fi
16403
16404 echo "$as_me:16404: checking if you want wgetch-events code" >&5
16405 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16406
16407 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16408 if test "${enable_wgetch_events+set}" = set; then
16409   enableval="$enable_wgetch_events"
16410   with_wgetch_events=$enableval
16411 else
16412   with_wgetch_events=no
16413 fi;
16414 echo "$as_me:16414: result: $with_wgetch_events" >&5
16415 echo "${ECHO_T}$with_wgetch_events" >&6
16416 if test "x$with_wgetch_events" = xyes ; then
16417
16418 cat >>confdefs.h <<\EOF
16419 #define NCURSES_WGETCH_EVENTS 1
16420 EOF
16421
16422         NCURSES_WGETCH_EVENTS=1
16423 else
16424         NCURSES_WGETCH_EVENTS=0
16425 fi
16426
16427 case "$cf_cv_system_name" in
16428 (*mingw32*|*mingw64*|*-msvc*)
16429         echo "$as_me:16429: checking if you want experimental-Windows driver" >&5
16430 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16431
16432 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16433 if test "${enable_exp_win32+set}" = set; then
16434   enableval="$enable_exp_win32"
16435   with_exp_win32=$enableval
16436 else
16437   with_exp_win32=no
16438 fi;
16439         echo "$as_me:16439: result: $with_exp_win32" >&5
16440 echo "${ECHO_T}$with_exp_win32" >&6
16441         if test "x$with_exp_win32" = xyes
16442         then
16443
16444 cat >>confdefs.h <<\EOF
16445 #define EXP_WIN32_DRIVER 1
16446 EOF
16447
16448                 EXP_WIN32_DRIVER=1
16449                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16450         else
16451                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16452                 EXP_WIN32_DRIVER=0
16453         fi
16454         ;;
16455 (*)
16456         EXP_WIN32_DRIVER=0
16457         INTERNALS_HDR=
16458         ;;
16459 esac
16460
16461 ###############################################################################
16462
16463 ###     use option --disable-echo to suppress full display compiling commands
16464
16465 echo "$as_me:16465: checking if you want to see long compiling messages" >&5
16466 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16467
16468 # Check whether --enable-echo or --disable-echo was given.
16469 if test "${enable_echo+set}" = set; then
16470   enableval="$enable_echo"
16471   test "$enableval" != no && enableval=yes
16472         if test "$enableval" != "yes" ; then
16473
16474         ECHO_LT='--silent'
16475         ECHO_LD='@echo linking $@;'
16476         RULE_CC='@echo compiling $<'
16477         SHOW_CC='@echo compiling $@'
16478         ECHO_CC='@'
16479
16480         else
16481
16482         ECHO_LT=''
16483         ECHO_LD=''
16484         RULE_CC=''
16485         SHOW_CC=''
16486         ECHO_CC=''
16487
16488         fi
16489 else
16490   enableval=yes
16491
16492         ECHO_LT=''
16493         ECHO_LD=''
16494         RULE_CC=''
16495         SHOW_CC=''
16496         ECHO_CC=''
16497
16498 fi;
16499 echo "$as_me:16499: result: $enableval" >&5
16500 echo "${ECHO_T}$enableval" >&6
16501
16502 if test "x$enable_echo" = xyes; then
16503         ECHO_LINK=
16504 else
16505         ECHO_LINK='@ echo linking $@ ... ;'
16506         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16507         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16508 fi
16509
16510 # --disable-stripping is used for debugging
16511
16512 echo "$as_me:16512: checking if you want to install stripped executables" >&5
16513 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16514
16515 # Check whether --enable-stripping or --disable-stripping was given.
16516 if test "${enable_stripping+set}" = set; then
16517   enableval="$enable_stripping"
16518   test "$enableval" != no && enableval=yes
16519         if test "$enableval" != "yes" ; then
16520     enable_stripping=no
16521         else
16522                 enable_stripping=yes
16523         fi
16524 else
16525   enableval=yes
16526         enable_stripping=yes
16527
16528 fi;
16529 echo "$as_me:16529: result: $enable_stripping" >&5
16530 echo "${ECHO_T}$enable_stripping" >&6
16531
16532 if test "$enable_stripping" = yes
16533 then
16534         INSTALL_OPT_S="-s"
16535 else
16536         INSTALL_OPT_S=
16537 fi
16538
16539 : "${INSTALL:=install}"
16540 echo "$as_me:16540: checking if install accepts -p option" >&5
16541 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16542 if test "${cf_cv_install_p+set}" = set; then
16543   echo $ECHO_N "(cached) $ECHO_C" >&6
16544 else
16545
16546         rm -rf ./conftest*
16547         date >conftest.in
16548         mkdir conftest.out
16549         sleep 3
16550         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16551         then
16552                 if test -f conftest.out/conftest.in
16553                 then
16554                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16555                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16556                         if test -s conftest.err
16557                         then
16558                                 cf_cv_install_p=no
16559                         else
16560                                 cf_cv_install_p=yes
16561                         fi
16562                 else
16563                         cf_cv_install_p=no
16564                 fi
16565         else
16566                 cf_cv_install_p=no
16567         fi
16568         rm -rf ./conftest*
16569
16570 fi
16571 echo "$as_me:16571: result: $cf_cv_install_p" >&5
16572 echo "${ECHO_T}$cf_cv_install_p" >&6
16573
16574 echo "$as_me:16574: checking if install needs to be told about ownership" >&5
16575 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16576 case `$ac_config_guess` in
16577 (*minix)
16578         with_install_o=yes
16579         ;;
16580 (*)
16581         with_install_o=no
16582         ;;
16583 esac
16584
16585 echo "$as_me:16585: result: $with_install_o" >&5
16586 echo "${ECHO_T}$with_install_o" >&6
16587 if test "x$with_install_o" = xyes
16588 then
16589         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'`"
16590 else
16591         INSTALL_OPT_O=
16592 fi
16593
16594 # If we're avoiding relinking of shared libraries during install, that is to
16595 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16596 # the install program has "-p" (for preserving timestamps).
16597 cf_cv_do_reranlib=yes
16598 if test "x$cf_cv_install_p" = xyes
16599 then
16600         if test "x$cf_cv_do_relink" != xyes
16601         then
16602                 cf_cv_do_reranlib=no
16603                 INSTALL_OPT_P="-p"
16604                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16605         fi
16606 fi
16607
16608 ###     use option --enable-warnings to turn on all gcc warnings
16609
16610 echo "$as_me:16610: checking if you want to use C11 _Noreturn feature" >&5
16611 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16612
16613 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16614 if test "${enable_stdnoreturn+set}" = set; then
16615   enableval="$enable_stdnoreturn"
16616   test "$enableval" != yes && enableval=no
16617         if test "$enableval" != "no" ; then
16618     enable_stdnoreturn=yes
16619         else
16620                 enable_stdnoreturn=no
16621         fi
16622 else
16623   enableval=no
16624         enable_stdnoreturn=no
16625
16626 fi;
16627 echo "$as_me:16627: result: $enable_stdnoreturn" >&5
16628 echo "${ECHO_T}$enable_stdnoreturn" >&6
16629
16630 if test $enable_stdnoreturn = yes; then
16631 echo "$as_me:16631: checking for C11 _Noreturn feature" >&5
16632 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16633 if test "${cf_cv_c11_noreturn+set}" = set; then
16634   echo $ECHO_N "(cached) $ECHO_C" >&6
16635 else
16636   cat >"conftest.$ac_ext" <<_ACEOF
16637 #line 16637 "configure"
16638 #include "confdefs.h"
16639
16640 #include <stdio.h>
16641 #include <stdlib.h>
16642 #include <stdnoreturn.h>
16643 static _Noreturn void giveup(void) { exit(0); }
16644
16645 int
16646 main (void)
16647 {
16648 if (feof(stdin)) giveup()
16649   ;
16650   return 0;
16651 }
16652 _ACEOF
16653 rm -f "conftest.$ac_objext"
16654 if { (eval echo "$as_me:16654: \"$ac_compile\"") >&5
16655   (eval $ac_compile) 2>&5
16656   ac_status=$?
16657   echo "$as_me:16657: \$? = $ac_status" >&5
16658   (exit "$ac_status"); } &&
16659          { ac_try='test -s "conftest.$ac_objext"'
16660   { (eval echo "$as_me:16660: \"$ac_try\"") >&5
16661   (eval $ac_try) 2>&5
16662   ac_status=$?
16663   echo "$as_me:16663: \$? = $ac_status" >&5
16664   (exit "$ac_status"); }; }; then
16665   cf_cv_c11_noreturn=yes
16666 else
16667   echo "$as_me: failed program was:" >&5
16668 cat "conftest.$ac_ext" >&5
16669 cf_cv_c11_noreturn=no
16670 fi
16671 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16672
16673 fi
16674 echo "$as_me:16674: result: $cf_cv_c11_noreturn" >&5
16675 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16676 else
16677         cf_cv_c11_noreturn=no,
16678 fi
16679
16680 if test "$cf_cv_c11_noreturn" = yes; then
16681
16682 cat >>confdefs.h <<\EOF
16683 #define HAVE_STDNORETURN_H 1
16684 EOF
16685
16686 cat >>confdefs.h <<EOF
16687 #define STDC_NORETURN _Noreturn
16688 EOF
16689
16690         HAVE_STDNORETURN_H=1
16691 else
16692         HAVE_STDNORETURN_H=0
16693 fi
16694
16695 if test "$GCC" = yes || test "$GXX" = yes
16696 then
16697
16698 if test "$GCC" = yes || test "$GXX" = yes
16699 then
16700         case $CFLAGS in
16701         (*-Werror=*)
16702                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16703
16704 echo "${as_me:-configure}:16704: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16705
16706                 cf_temp_flags=
16707                 for cf_temp_scan in $CFLAGS
16708                 do
16709                         case "x$cf_temp_scan" in
16710                         (x-Werror=*)
16711
16712         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16713         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16714
16715                                 ;;
16716                         (*)
16717
16718         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16719         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16720
16721                                 ;;
16722                         esac
16723                 done
16724                 CFLAGS="$cf_temp_flags"
16725                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16726
16727 echo "${as_me:-configure}:16727: testing ... fixed $CFLAGS ..." 1>&5
16728
16729                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16730
16731 echo "${as_me:-configure}:16731: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16732
16733                 ;;
16734         esac
16735 fi
16736
16737 if test "$GCC" = yes || test "$GXX" = yes
16738 then
16739         case $CPPFLAGS in
16740         (*-Werror=*)
16741                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16742
16743 echo "${as_me:-configure}:16743: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16744
16745                 cf_temp_flags=
16746                 for cf_temp_scan in $CPPFLAGS
16747                 do
16748                         case "x$cf_temp_scan" in
16749                         (x-Werror=*)
16750
16751         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16752         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16753
16754                                 ;;
16755                         (*)
16756
16757         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16758         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16759
16760                                 ;;
16761                         esac
16762                 done
16763                 CPPFLAGS="$cf_temp_flags"
16764                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16765
16766 echo "${as_me:-configure}:16766: testing ... fixed $CPPFLAGS ..." 1>&5
16767
16768                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16769
16770 echo "${as_me:-configure}:16770: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16771
16772                 ;;
16773         esac
16774 fi
16775
16776 if test "$GCC" = yes || test "$GXX" = yes
16777 then
16778         case $LDFLAGS in
16779         (*-Werror=*)
16780                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16781
16782 echo "${as_me:-configure}:16782: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16783
16784                 cf_temp_flags=
16785                 for cf_temp_scan in $LDFLAGS
16786                 do
16787                         case "x$cf_temp_scan" in
16788                         (x-Werror=*)
16789
16790         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16791         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16792
16793                                 ;;
16794                         (*)
16795
16796         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16797         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16798
16799                                 ;;
16800                         esac
16801                 done
16802                 LDFLAGS="$cf_temp_flags"
16803                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16804
16805 echo "${as_me:-configure}:16805: testing ... fixed $LDFLAGS ..." 1>&5
16806
16807                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16808
16809 echo "${as_me:-configure}:16809: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16810
16811                 ;;
16812         esac
16813 fi
16814
16815 echo "$as_me:16815: checking if you want to turn on gcc warnings" >&5
16816 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16817
16818 # Check whether --enable-warnings or --disable-warnings was given.
16819 if test "${enable_warnings+set}" = set; then
16820   enableval="$enable_warnings"
16821   test "$enableval" != yes && enableval=no
16822         if test "$enableval" != "no" ; then
16823     enable_warnings=yes
16824         else
16825                 enable_warnings=no
16826         fi
16827 else
16828   enableval=no
16829         enable_warnings=no
16830
16831 fi;
16832 echo "$as_me:16832: result: $enable_warnings" >&5
16833 echo "${ECHO_T}$enable_warnings" >&6
16834 if test "$enable_warnings" = "yes"
16835 then
16836
16837 if test "x$have_x" = xyes; then
16838
16839 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16840 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16841 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16842 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16843 for cf_X_CFLAGS in $X_CFLAGS
16844 do
16845         case "x$cf_X_CFLAGS" in
16846         x-[IUD]*)
16847                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16848                 ;;
16849         *)
16850                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16851                 ;;
16852         esac
16853 done
16854
16855 cat >"conftest.$ac_ext" <<_ACEOF
16856 #line 16856 "configure"
16857 #include "confdefs.h"
16858
16859 #include <stdlib.h>
16860 #include <X11/Intrinsic.h>
16861
16862 int
16863 main (void)
16864 {
16865 String foo = malloc(1); free((void*)foo)
16866   ;
16867   return 0;
16868 }
16869 _ACEOF
16870 rm -f "conftest.$ac_objext"
16871 if { (eval echo "$as_me:16871: \"$ac_compile\"") >&5
16872   (eval $ac_compile) 2>&5
16873   ac_status=$?
16874   echo "$as_me:16874: \$? = $ac_status" >&5
16875   (exit "$ac_status"); } &&
16876          { ac_try='test -s "conftest.$ac_objext"'
16877   { (eval echo "$as_me:16877: \"$ac_try\"") >&5
16878   (eval $ac_try) 2>&5
16879   ac_status=$?
16880   echo "$as_me:16880: \$? = $ac_status" >&5
16881   (exit "$ac_status"); }; }; then
16882
16883 echo "$as_me:16883: checking for X11/Xt const-feature" >&5
16884 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16885 if test "${cf_cv_const_x_string+set}" = set; then
16886   echo $ECHO_N "(cached) $ECHO_C" >&6
16887 else
16888
16889         cat >"conftest.$ac_ext" <<_ACEOF
16890 #line 16890 "configure"
16891 #include "confdefs.h"
16892
16893 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16894 #undef  XTSTRINGDEFINES /* X11R5 and later */
16895 #include <stdlib.h>
16896 #include <X11/Intrinsic.h>
16897
16898 int
16899 main (void)
16900 {
16901 String foo = malloc(1); *foo = 0
16902   ;
16903   return 0;
16904 }
16905 _ACEOF
16906 rm -f "conftest.$ac_objext"
16907 if { (eval echo "$as_me:16907: \"$ac_compile\"") >&5
16908   (eval $ac_compile) 2>&5
16909   ac_status=$?
16910   echo "$as_me:16910: \$? = $ac_status" >&5
16911   (exit "$ac_status"); } &&
16912          { ac_try='test -s "conftest.$ac_objext"'
16913   { (eval echo "$as_me:16913: \"$ac_try\"") >&5
16914   (eval $ac_try) 2>&5
16915   ac_status=$?
16916   echo "$as_me:16916: \$? = $ac_status" >&5
16917   (exit "$ac_status"); }; }; then
16918
16919                         cf_cv_const_x_string=no
16920
16921 else
16922   echo "$as_me: failed program was:" >&5
16923 cat "conftest.$ac_ext" >&5
16924
16925                         cf_cv_const_x_string=yes
16926
16927 fi
16928 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16929
16930 fi
16931 echo "$as_me:16931: result: $cf_cv_const_x_string" >&5
16932 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16933
16934 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16935 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16936 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16937
16938 case "$cf_cv_const_x_string" in
16939 (no)
16940
16941         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16942         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16943
16944         ;;
16945 (*)
16946
16947         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16948         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16949
16950         ;;
16951 esac
16952
16953 else
16954   echo "$as_me: failed program was:" >&5
16955 cat "conftest.$ac_ext" >&5
16956 fi
16957 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16958  fi
16959 cat > "conftest.$ac_ext" <<EOF
16960 #line 16960 "${as_me:-configure}"
16961 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16962 EOF
16963 if test "$INTEL_COMPILER" = yes
16964 then
16965 # The "-wdXXX" options suppress warnings:
16966 # remark #1419: external declaration in primary source file
16967 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16968 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16969 # remark #193: zero used for undefined preprocessing identifier
16970 # remark #593: variable "curs_sb_left_arrow" was set but never used
16971 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16972 # remark #869: parameter "tw" was never referenced
16973 # remark #981: operands are evaluated in unspecified order
16974 # warning #279: controlling expression is constant
16975
16976         { echo "$as_me:16976: checking for $CC warning options..." >&5
16977 echo "$as_me: checking for $CC warning options..." >&6;}
16978         cf_save_CFLAGS="$CFLAGS"
16979         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16980         for cf_opt in \
16981                 wd1419 \
16982                 wd1683 \
16983                 wd1684 \
16984                 wd193 \
16985                 wd593 \
16986                 wd279 \
16987                 wd810 \
16988                 wd869 \
16989                 wd981
16990         do
16991                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16992                 if { (eval echo "$as_me:16992: \"$ac_compile\"") >&5
16993   (eval $ac_compile) 2>&5
16994   ac_status=$?
16995   echo "$as_me:16995: \$? = $ac_status" >&5
16996   (exit "$ac_status"); }; then
16997                         test -n "$verbose" && echo "$as_me:16997: result: ... -$cf_opt" >&5
16998 echo "${ECHO_T}... -$cf_opt" >&6
16999                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17000                 fi
17001         done
17002         CFLAGS="$cf_save_CFLAGS"
17003 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17004 then
17005         { echo "$as_me:17005: checking for $CC warning options..." >&5
17006 echo "$as_me: checking for $CC warning options..." >&6;}
17007         cf_save_CFLAGS="$CFLAGS"
17008         cf_warn_CONST=""
17009         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17010         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17011         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17012         for cf_opt in W Wall \
17013                 Wbad-function-cast \
17014                 Wcast-align \
17015                 Wcast-qual \
17016                 Wdeclaration-after-statement \
17017                 Wextra \
17018                 Winline \
17019                 Wmissing-declarations \
17020                 Wmissing-prototypes \
17021                 Wnested-externs \
17022                 Wpointer-arith \
17023                 Wshadow \
17024                 Wstrict-prototypes \
17025                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17026         do
17027                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17028                 if { (eval echo "$as_me:17028: \"$ac_compile\"") >&5
17029   (eval $ac_compile) 2>&5
17030   ac_status=$?
17031   echo "$as_me:17031: \$? = $ac_status" >&5
17032   (exit "$ac_status"); }; then
17033                         test -n "$verbose" && echo "$as_me:17033: result: ... -$cf_opt" >&5
17034 echo "${ECHO_T}... -$cf_opt" >&6
17035                         case "$cf_opt" in
17036                         (Winline)
17037                                 case "$GCC_VERSION" in
17038                                 ([34].*)
17039                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17040
17041 echo "${as_me:-configure}:17041: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17042
17043                                         continue;;
17044                                 esac
17045                                 ;;
17046                         (Wpointer-arith)
17047                                 case "$GCC_VERSION" in
17048                                 ([12].*)
17049                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17050
17051 echo "${as_me:-configure}:17051: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17052
17053                                         continue;;
17054                                 esac
17055                                 ;;
17056                         esac
17057                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17058                 fi
17059         done
17060         CFLAGS="$cf_save_CFLAGS"
17061 fi
17062 rm -rf ./conftest*
17063
17064 fi
17065
17066 if test "$GCC" = yes || test "$GXX" = yes
17067 then
17068 cat > conftest.i <<EOF
17069 #ifndef GCC_PRINTF
17070 #define GCC_PRINTF 0
17071 #endif
17072 #ifndef GCC_SCANF
17073 #define GCC_SCANF 0
17074 #endif
17075 #ifndef GCC_NORETURN
17076 #define GCC_NORETURN /* nothing */
17077 #endif
17078 #ifndef GCC_UNUSED
17079 #define GCC_UNUSED /* nothing */
17080 #endif
17081 EOF
17082 if test "$GCC" = yes
17083 then
17084         { echo "$as_me:17084: checking for $CC __attribute__ directives..." >&5
17085 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17086 cat > "conftest.$ac_ext" <<EOF
17087 #line 17087 "${as_me:-configure}"
17088 #include "confdefs.h"
17089 #include "conftest.h"
17090 #include "conftest.i"
17091 #if     GCC_PRINTF
17092 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17093 #else
17094 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17095 #endif
17096 #if     GCC_SCANF
17097 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17098 #else
17099 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17100 #endif
17101 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17102 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17103 extern GCC_NORETURN void foo(void);
17104 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17105 EOF
17106         cf_printf_attribute=no
17107         cf_scanf_attribute=no
17108         for cf_attribute in scanf printf unused noreturn
17109         do
17110
17111 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17112
17113                 cf_directive="__attribute__(($cf_attribute))"
17114                 echo "checking for $CC $cf_directive" 1>&5
17115
17116                 case "$cf_attribute" in
17117                 (printf)
17118                         cf_printf_attribute=yes
17119                         cat >conftest.h <<EOF
17120 #define GCC_$cf_ATTRIBUTE 1
17121 EOF
17122                         ;;
17123                 (scanf)
17124                         cf_scanf_attribute=yes
17125                         cat >conftest.h <<EOF
17126 #define GCC_$cf_ATTRIBUTE 1
17127 EOF
17128                         ;;
17129                 (*)
17130                         cat >conftest.h <<EOF
17131 #define GCC_$cf_ATTRIBUTE $cf_directive
17132 EOF
17133                         ;;
17134                 esac
17135
17136                 if { (eval echo "$as_me:17136: \"$ac_compile\"") >&5
17137   (eval $ac_compile) 2>&5
17138   ac_status=$?
17139   echo "$as_me:17139: \$? = $ac_status" >&5
17140   (exit "$ac_status"); }; then
17141                         test -n "$verbose" && echo "$as_me:17141: result: ... $cf_attribute" >&5
17142 echo "${ECHO_T}... $cf_attribute" >&6
17143                         cat conftest.h >>confdefs.h
17144                         case "$cf_attribute" in
17145                         (noreturn)
17146
17147 cat >>confdefs.h <<EOF
17148 #define GCC_NORETURN $cf_directive
17149 EOF
17150
17151                                 ;;
17152                         (printf)
17153                                 cf_value='/* nothing */'
17154                                 if test "$cf_printf_attribute" != no ; then
17155                                         cf_value='__attribute__((format(printf,fmt,var)))'
17156
17157 cat >>confdefs.h <<\EOF
17158 #define GCC_PRINTF 1
17159 EOF
17160
17161                                 fi
17162
17163 cat >>confdefs.h <<EOF
17164 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17165 EOF
17166
17167                                 ;;
17168                         (scanf)
17169                                 cf_value='/* nothing */'
17170                                 if test "$cf_scanf_attribute" != no ; then
17171                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17172
17173 cat >>confdefs.h <<\EOF
17174 #define GCC_SCANF 1
17175 EOF
17176
17177                                 fi
17178
17179 cat >>confdefs.h <<EOF
17180 #define GCC_SCANFLIKE(fmt,var) $cf_value
17181 EOF
17182
17183                                 ;;
17184                         (unused)
17185
17186 cat >>confdefs.h <<EOF
17187 #define GCC_UNUSED $cf_directive
17188 EOF
17189
17190                                 ;;
17191                         esac
17192                 fi
17193         done
17194 else
17195         ${FGREP-fgrep} define conftest.i >>confdefs.h
17196 fi
17197 rm -rf ./conftest*
17198 fi
17199
17200 fi
17201
17202 if test "x$enable_warnings" = "xyes"; then
17203
17204         ADAFLAGS="$ADAFLAGS -gnatg"
17205
17206         if test "x$cf_with_cxx" = xyes ; then
17207
17208 INTEL_CPLUSPLUS=no
17209
17210 if test "$GCC" = yes ; then
17211         case "$host_os" in
17212         (linux*|gnu*)
17213                 echo "$as_me:17213: checking if this is really Intel C++ compiler" >&5
17214 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17215                 cf_save_CFLAGS="$CXXFLAGS"
17216                 CXXFLAGS="$CXXFLAGS -no-gcc"
17217                 cat >"conftest.$ac_ext" <<_ACEOF
17218 #line 17218 "configure"
17219 #include "confdefs.h"
17220
17221 int
17222 main (void)
17223 {
17224
17225 #ifdef __INTEL_COMPILER
17226 #else
17227 make an error
17228 #endif
17229
17230   ;
17231   return 0;
17232 }
17233 _ACEOF
17234 rm -f "conftest.$ac_objext"
17235 if { (eval echo "$as_me:17235: \"$ac_compile\"") >&5
17236   (eval $ac_compile) 2>&5
17237   ac_status=$?
17238   echo "$as_me:17238: \$? = $ac_status" >&5
17239   (exit "$ac_status"); } &&
17240          { ac_try='test -s "conftest.$ac_objext"'
17241   { (eval echo "$as_me:17241: \"$ac_try\"") >&5
17242   (eval $ac_try) 2>&5
17243   ac_status=$?
17244   echo "$as_me:17244: \$? = $ac_status" >&5
17245   (exit "$ac_status"); }; }; then
17246   INTEL_CPLUSPLUS=yes
17247 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17248
17249 else
17250   echo "$as_me: failed program was:" >&5
17251 cat "conftest.$ac_ext" >&5
17252 fi
17253 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17254                 CXXFLAGS="$cf_save_CFLAGS"
17255                 echo "$as_me:17255: result: $INTEL_CPLUSPLUS" >&5
17256 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17257                 ;;
17258         esac
17259 fi
17260
17261 CLANG_CPLUSPLUS=no
17262
17263 if test "$GCC" = yes ; then
17264         echo "$as_me:17264: checking if this is really Clang C++ compiler" >&5
17265 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17266         cf_save_CFLAGS="$CXXFLAGS"
17267         cat >"conftest.$ac_ext" <<_ACEOF
17268 #line 17268 "configure"
17269 #include "confdefs.h"
17270
17271 int
17272 main (void)
17273 {
17274
17275 #ifdef __clang__
17276 #else
17277 make an error
17278 #endif
17279
17280   ;
17281   return 0;
17282 }
17283 _ACEOF
17284 rm -f "conftest.$ac_objext"
17285 if { (eval echo "$as_me:17285: \"$ac_compile\"") >&5
17286   (eval $ac_compile) 2>&5
17287   ac_status=$?
17288   echo "$as_me:17288: \$? = $ac_status" >&5
17289   (exit "$ac_status"); } &&
17290          { ac_try='test -s "conftest.$ac_objext"'
17291   { (eval echo "$as_me:17291: \"$ac_try\"") >&5
17292   (eval $ac_try) 2>&5
17293   ac_status=$?
17294   echo "$as_me:17294: \$? = $ac_status" >&5
17295   (exit "$ac_status"); }; }; then
17296   CLANG_CPLUSPLUS=yes
17297
17298 else
17299   echo "$as_me: failed program was:" >&5
17300 cat "conftest.$ac_ext" >&5
17301 fi
17302 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17303         CXXFLAGS="$cf_save_CFLAGS"
17304         echo "$as_me:17304: result: $CLANG_CPLUSPLUS" >&5
17305 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17306 fi
17307
17308 CLANG_VERSION=none
17309
17310 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17311         case "$CC" in
17312         (c[1-9][0-9]|*/c[1-9][0-9])
17313                 { echo "$as_me:17313: WARNING: replacing broken compiler alias $CC" >&5
17314 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17315                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17316                 CC=clang
17317                 ;;
17318         esac
17319
17320         echo "$as_me:17320: checking version of $CC" >&5
17321 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17322         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.].*//'`"
17323         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17324         echo "$as_me:17324: result: $CLANG_VERSION" >&5
17325 echo "${ECHO_T}$CLANG_VERSION" >&6
17326
17327         for cf_clang_opt in \
17328                 -Qunused-arguments \
17329                 -Wno-error=implicit-function-declaration
17330         do
17331                 echo "$as_me:17331: checking if option $cf_clang_opt works" >&5
17332 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17333                 cf_save_CFLAGS="$CFLAGS"
17334                 CFLAGS="$CFLAGS $cf_clang_opt"
17335                 cat >"conftest.$ac_ext" <<_ACEOF
17336 #line 17336 "configure"
17337 #include "confdefs.h"
17338
17339                         #include <stdio.h>
17340 int
17341 main (void)
17342 {
17343
17344                         printf("hello!\\n");
17345   ;
17346   return 0;
17347 }
17348 _ACEOF
17349 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17350 if { (eval echo "$as_me:17350: \"$ac_link\"") >&5
17351   (eval $ac_link) 2>&5
17352   ac_status=$?
17353   echo "$as_me:17353: \$? = $ac_status" >&5
17354   (exit "$ac_status"); } &&
17355          { ac_try='test -s "conftest$ac_exeext"'
17356   { (eval echo "$as_me:17356: \"$ac_try\"") >&5
17357   (eval $ac_try) 2>&5
17358   ac_status=$?
17359   echo "$as_me:17359: \$? = $ac_status" >&5
17360   (exit "$ac_status"); }; }; then
17361
17362                         cf_clang_optok=yes
17363 else
17364   echo "$as_me: failed program was:" >&5
17365 cat "conftest.$ac_ext" >&5
17366
17367                         cf_clang_optok=no
17368 fi
17369 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17370                 echo "$as_me:17370: result: $cf_clang_optok" >&5
17371 echo "${ECHO_T}$cf_clang_optok" >&6
17372                 CFLAGS="$cf_save_CFLAGS"
17373                 if test "$cf_clang_optok" = yes; then
17374                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17375
17376 echo "${as_me:-configure}:17376: testing adding option $cf_clang_opt ..." 1>&5
17377
17378         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17379         CFLAGS="${CFLAGS}$cf_clang_opt"
17380
17381                 fi
17382         done
17383 fi
17384
17385 ac_ext=cc
17386 ac_cpp='$CXXCPP $CPPFLAGS'
17387 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17388 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17389 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17390 ac_main_return="return"
17391
17392 cat > conftest.$ac_ext <<EOF
17393 #line 17393 "configure"
17394 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17395 EOF
17396
17397 if test "$INTEL_CPLUSPLUS" = yes
17398 then
17399 # The "-wdXXX" options suppress warnings:
17400 # remark #1419: external declaration in primary source file
17401 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17402 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17403 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17404 # remark #193: zero used for undefined preprocessing identifier
17405 # remark #593: variable "curs_sb_left_arrow" was set but never used
17406 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17407 # remark #869: parameter "tw" was never referenced
17408 # remark #981: operands are evaluated in unspecified order
17409 # warning #269: invalid format string conversion
17410
17411         { echo "$as_me:17411: checking for $CC warning options..." >&5
17412 echo "$as_me: checking for $CC warning options..." >&6;}
17413         cf_save_CXXFLAGS="$CXXFLAGS"
17414         EXTRA_CXXFLAGS="-Wall"
17415         for cf_opt in \
17416                 wd1419 \
17417                 wd1682 \
17418                 wd1683 \
17419                 wd1684 \
17420                 wd193 \
17421                 wd279 \
17422                 wd593 \
17423                 wd810 \
17424                 wd869 \
17425                 wd981
17426         do
17427                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17428                 if { (eval echo "$as_me:17428: \"$ac_compile\"") >&5
17429   (eval $ac_compile) 2>&5
17430   ac_status=$?
17431   echo "$as_me:17431: \$? = $ac_status" >&5
17432   (exit "$ac_status"); }; then
17433                         test -n "$verbose" && echo "$as_me:17433: result: ... -$cf_opt" >&5
17434 echo "${ECHO_T}... -$cf_opt" >&6
17435                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17436                 fi
17437         done
17438         CXXFLAGS="$cf_save_CXXFLAGS"
17439
17440 elif test "$GXX" = yes
17441 then
17442         { echo "$as_me:17442: checking for $CXX warning options..." >&5
17443 echo "$as_me: checking for $CXX warning options..." >&6;}
17444         cf_save_CXXFLAGS="$CXXFLAGS"
17445         EXTRA_CXXFLAGS="-W -Wall"
17446         cf_gxx_extra_warnings=""
17447         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17448         case "$GXX_VERSION" in
17449         ([1-2].*)
17450                 ;;
17451         (*)
17452                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17453                 ;;
17454         esac
17455         for cf_opt in \
17456                 Wabi \
17457                 fabi-version=0 \
17458                 Wextra \
17459                 Wignored-qualifiers \
17460                 Wlogical-op \
17461                 Woverloaded-virtual \
17462                 Wsign-promo \
17463                 Wsynth \
17464                 Wold-style-cast \
17465                 Wcast-align \
17466                 Wcast-qual \
17467                 Wpointer-arith \
17468                 Wshadow \
17469                 Wundef $cf_gxx_extra_warnings Wno-unused
17470         do
17471                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17472                 if { (eval echo "$as_me:17472: \"$ac_compile\"") >&5
17473   (eval $ac_compile) 2>&5
17474   ac_status=$?
17475   echo "$as_me:17475: \$? = $ac_status" >&5
17476   (exit "$ac_status"); }; then
17477                         test -n "$verbose" && echo "$as_me:17477: result: ... -$cf_opt" >&5
17478 echo "${ECHO_T}... -$cf_opt" >&6
17479                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17480                 else
17481                         test -n "$verbose" && echo "$as_me:17481: result: ... no -$cf_opt" >&5
17482 echo "${ECHO_T}... no -$cf_opt" >&6
17483                 fi
17484         done
17485         CXXFLAGS="$cf_save_CXXFLAGS"
17486 fi
17487
17488 rm -rf ./conftest*
17489 ac_ext=c
17490 ac_cpp='$CPP $CPPFLAGS'
17491 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17492 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17493 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17494 ac_main_return="return"
17495
17496         fi
17497 fi
17498
17499 echo "$as_me:17499: checking if you want to work around bogus compiler/loader warnings" >&5
17500 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17501
17502 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17503 if test "${enable_string_hacks+set}" = set; then
17504   enableval="$enable_string_hacks"
17505   enable_string_hacks=$enableval
17506 else
17507   enable_string_hacks=no
17508 fi;
17509 echo "$as_me:17509: result: $enable_string_hacks" >&5
17510 echo "${ECHO_T}$enable_string_hacks" >&6
17511
17512 if test "x$enable_string_hacks" = "xyes"; then
17513
17514 cat >>confdefs.h <<\EOF
17515 #define USE_STRING_HACKS 1
17516 EOF
17517
17518         { echo "$as_me:17518: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17519 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17520         echo "$as_me:17520: checking for strlcat" >&5
17521 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17522 if test "${ac_cv_func_strlcat+set}" = set; then
17523   echo $ECHO_N "(cached) $ECHO_C" >&6
17524 else
17525   cat >"conftest.$ac_ext" <<_ACEOF
17526 #line 17526 "configure"
17527 #include "confdefs.h"
17528 #define strlcat autoconf_temporary
17529 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17530 #undef strlcat
17531
17532 #ifdef __cplusplus
17533 extern "C"
17534 #endif
17535
17536 /* We use char because int might match the return type of a gcc2
17537    builtin and then its argument prototype would still apply.  */
17538 char strlcat (void);
17539
17540 int
17541 main (void)
17542 {
17543
17544 /* The GNU C library defines stubs for functions which it implements
17545     to always fail with ENOSYS.  Some functions are actually named
17546     something starting with __ and the normal name is an alias.  */
17547 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17548 #error found stub for strlcat
17549 #endif
17550
17551         return strlcat ();
17552   ;
17553   return 0;
17554 }
17555 _ACEOF
17556 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17557 if { (eval echo "$as_me:17557: \"$ac_link\"") >&5
17558   (eval $ac_link) 2>&5
17559   ac_status=$?
17560   echo "$as_me:17560: \$? = $ac_status" >&5
17561   (exit "$ac_status"); } &&
17562          { ac_try='test -s "conftest$ac_exeext"'
17563   { (eval echo "$as_me:17563: \"$ac_try\"") >&5
17564   (eval $ac_try) 2>&5
17565   ac_status=$?
17566   echo "$as_me:17566: \$? = $ac_status" >&5
17567   (exit "$ac_status"); }; }; then
17568   ac_cv_func_strlcat=yes
17569 else
17570   echo "$as_me: failed program was:" >&5
17571 cat "conftest.$ac_ext" >&5
17572 ac_cv_func_strlcat=no
17573 fi
17574 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17575 fi
17576 echo "$as_me:17576: result: $ac_cv_func_strlcat" >&5
17577 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17578 if test "$ac_cv_func_strlcat" = yes; then
17579
17580 cat >>confdefs.h <<\EOF
17581 #define HAVE_STRLCAT 1
17582 EOF
17583
17584 else
17585
17586                 echo "$as_me:17586: checking for strlcat in -lbsd" >&5
17587 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17588 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17589   echo $ECHO_N "(cached) $ECHO_C" >&6
17590 else
17591   ac_check_lib_save_LIBS=$LIBS
17592 LIBS="-lbsd  $LIBS"
17593 cat >"conftest.$ac_ext" <<_ACEOF
17594 #line 17594 "configure"
17595 #include "confdefs.h"
17596
17597 /* Override any gcc2 internal prototype to avoid an error.  */
17598 #ifdef __cplusplus
17599 extern "C"
17600 #endif
17601 /* We use char because int might match the return type of a gcc2
17602    builtin and then its argument prototype would still apply.  */
17603 char strlcat ();
17604 int
17605 main (void)
17606 {
17607 strlcat ();
17608   ;
17609   return 0;
17610 }
17611 _ACEOF
17612 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17613 if { (eval echo "$as_me:17613: \"$ac_link\"") >&5
17614   (eval $ac_link) 2>&5
17615   ac_status=$?
17616   echo "$as_me:17616: \$? = $ac_status" >&5
17617   (exit "$ac_status"); } &&
17618          { ac_try='test -s "conftest$ac_exeext"'
17619   { (eval echo "$as_me:17619: \"$ac_try\"") >&5
17620   (eval $ac_try) 2>&5
17621   ac_status=$?
17622   echo "$as_me:17622: \$? = $ac_status" >&5
17623   (exit "$ac_status"); }; }; then
17624   ac_cv_lib_bsd_strlcat=yes
17625 else
17626   echo "$as_me: failed program was:" >&5
17627 cat "conftest.$ac_ext" >&5
17628 ac_cv_lib_bsd_strlcat=no
17629 fi
17630 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17631 LIBS=$ac_check_lib_save_LIBS
17632 fi
17633 echo "$as_me:17633: result: $ac_cv_lib_bsd_strlcat" >&5
17634 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17635 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17636
17637 cf_add_libs="$LIBS"
17638 # reverse order
17639 cf_add_0lib=
17640 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17641 # filter duplicates
17642 for cf_add_1lib in $cf_add_0lib; do
17643         for cf_add_2lib in $cf_add_libs; do
17644                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17645                         cf_add_1lib=
17646                         break
17647                 fi
17648         done
17649         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17650 done
17651 LIBS="$cf_add_libs"
17652
17653 for ac_header in bsd/string.h
17654 do
17655 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17656 echo "$as_me:17656: checking for $ac_header" >&5
17657 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17658 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17659   echo $ECHO_N "(cached) $ECHO_C" >&6
17660 else
17661   cat >"conftest.$ac_ext" <<_ACEOF
17662 #line 17662 "configure"
17663 #include "confdefs.h"
17664 #include <$ac_header>
17665 _ACEOF
17666 if { (eval echo "$as_me:17666: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17667   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17668   ac_status=$?
17669   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17670   rm -f conftest.er1
17671   cat conftest.err >&5
17672   echo "$as_me:17672: \$? = $ac_status" >&5
17673   (exit "$ac_status"); } >/dev/null; then
17674   if test -s conftest.err; then
17675     ac_cpp_err=$ac_c_preproc_warn_flag
17676   else
17677     ac_cpp_err=
17678   fi
17679 else
17680   ac_cpp_err=yes
17681 fi
17682 if test -z "$ac_cpp_err"; then
17683   eval "$as_ac_Header=yes"
17684 else
17685   echo "$as_me: failed program was:" >&5
17686   cat "conftest.$ac_ext" >&5
17687   eval "$as_ac_Header=no"
17688 fi
17689 rm -f conftest.err "conftest.$ac_ext"
17690 fi
17691 echo "$as_me:17691: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17692 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17693 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17694   cat >>confdefs.h <<EOF
17695 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17696 EOF
17697
17698 fi
17699 done
17700
17701 cat >>confdefs.h <<\EOF
17702 #define HAVE_STRLCAT 1
17703 EOF
17704
17705 fi
17706
17707 fi
17708
17709 for ac_func in strlcpy snprintf
17710 do
17711 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17712 echo "$as_me:17712: checking for $ac_func" >&5
17713 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17714 if eval "test \"\${$as_ac_var+set}\" = set"; then
17715   echo $ECHO_N "(cached) $ECHO_C" >&6
17716 else
17717   cat >"conftest.$ac_ext" <<_ACEOF
17718 #line 17718 "configure"
17719 #include "confdefs.h"
17720 #define $ac_func autoconf_temporary
17721 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17722 #undef $ac_func
17723
17724 #ifdef __cplusplus
17725 extern "C"
17726 #endif
17727
17728 /* We use char because int might match the return type of a gcc2
17729    builtin and then its argument prototype would still apply.  */
17730 char $ac_func (void);
17731
17732 int
17733 main (void)
17734 {
17735
17736 /* The GNU C library defines stubs for functions which it implements
17737     to always fail with ENOSYS.  Some functions are actually named
17738     something starting with __ and the normal name is an alias.  */
17739 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17740 #error found stub for $ac_func
17741 #endif
17742
17743         return $ac_func ();
17744   ;
17745   return 0;
17746 }
17747 _ACEOF
17748 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17749 if { (eval echo "$as_me:17749: \"$ac_link\"") >&5
17750   (eval $ac_link) 2>&5
17751   ac_status=$?
17752   echo "$as_me:17752: \$? = $ac_status" >&5
17753   (exit "$ac_status"); } &&
17754          { ac_try='test -s "conftest$ac_exeext"'
17755   { (eval echo "$as_me:17755: \"$ac_try\"") >&5
17756   (eval $ac_try) 2>&5
17757   ac_status=$?
17758   echo "$as_me:17758: \$? = $ac_status" >&5
17759   (exit "$ac_status"); }; }; then
17760   eval "$as_ac_var=yes"
17761 else
17762   echo "$as_me: failed program was:" >&5
17763 cat "conftest.$ac_ext" >&5
17764 eval "$as_ac_var=no"
17765 fi
17766 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17767 fi
17768 echo "$as_me:17768: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17769 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17770 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17771   cat >>confdefs.h <<EOF
17772 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17773 EOF
17774
17775 fi
17776 done
17777
17778 fi
17779
17780 ###     use option --enable-assertions to turn on generation of assertion code
17781 echo "$as_me:17781: checking if you want to enable runtime assertions" >&5
17782 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17783
17784 # Check whether --enable-assertions or --disable-assertions was given.
17785 if test "${enable_assertions+set}" = set; then
17786   enableval="$enable_assertions"
17787   with_assertions=$enableval
17788 else
17789   with_assertions=no
17790 fi;
17791 echo "$as_me:17791: result: $with_assertions" >&5
17792 echo "${ECHO_T}$with_assertions" >&6
17793 if test -n "$GCC"
17794 then
17795         if test "$with_assertions" = no
17796         then
17797                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17798         else
17799
17800         ADAFLAGS="$ADAFLAGS -gnata"
17801
17802         fi
17803 fi
17804
17805 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17806
17807 echo "$as_me:17807: checking if you want to use dmalloc for testing" >&5
17808 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17809
17810 # Check whether --with-dmalloc or --without-dmalloc was given.
17811 if test "${with_dmalloc+set}" = set; then
17812   withval="$with_dmalloc"
17813   case "x$withval" in
17814         (x|xno) ;;
17815         (*)
17816                 : "${with_cflags:=-g}"
17817                 : "${enable_leaks:=no}"
17818                 with_dmalloc=yes
17819
17820 cat >>confdefs.h <<EOF
17821 #define USE_DMALLOC 1
17822 EOF
17823
17824                 ;;
17825         esac
17826 else
17827   with_dmalloc=
17828 fi;
17829 echo "$as_me:17829: result: ${with_dmalloc:-no}" >&5
17830 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17831
17832 case ".$with_cflags" in
17833 (.*-g*)
17834         case .$CFLAGS in
17835         (.*-g*)
17836                 ;;
17837         (*)
17838
17839 cf_fix_cppflags=no
17840 cf_new_cflags=
17841 cf_new_cppflags=
17842 cf_new_extra_cppflags=
17843
17844 for cf_add_cflags in -g
17845 do
17846 case "$cf_fix_cppflags" in
17847 (no)
17848         case "$cf_add_cflags" in
17849         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17850                 case "$cf_add_cflags" in
17851                 (-D*)
17852                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17853
17854                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17855                                 && test -z "${cf_tst_cflags}" \
17856                                 && cf_fix_cppflags=yes
17857
17858                         if test "$cf_fix_cppflags" = yes ; then
17859
17860         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17861         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17862
17863                                 continue
17864                         elif test "${cf_tst_cflags}" = "\"'" ; then
17865
17866         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17867         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17868
17869                                 continue
17870                         fi
17871                         ;;
17872                 esac
17873                 case "$CPPFLAGS" in
17874                 (*$cf_add_cflags)
17875                         ;;
17876                 (*)
17877                         case "$cf_add_cflags" in
17878                         (-D*)
17879                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17880
17881 CPPFLAGS=`echo "$CPPFLAGS" | \
17882         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17883                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17884
17885                                 ;;
17886                         esac
17887
17888         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17889         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17890
17891                         ;;
17892                 esac
17893                 ;;
17894         (*)
17895
17896         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17897         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17898
17899                 ;;
17900         esac
17901         ;;
17902 (yes)
17903
17904         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17905         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17906
17907         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17908
17909         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17910                 && test -z "${cf_tst_cflags}" \
17911                 && cf_fix_cppflags=no
17912         ;;
17913 esac
17914 done
17915
17916 if test -n "$cf_new_cflags" ; then
17917
17918         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17919         CFLAGS="${CFLAGS}$cf_new_cflags"
17920
17921 fi
17922
17923 if test -n "$cf_new_cppflags" ; then
17924
17925         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17926         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17927
17928 fi
17929
17930 if test -n "$cf_new_extra_cppflags" ; then
17931
17932         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17933         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17934
17935 fi
17936
17937                 ;;
17938         esac
17939         ;;
17940 esac
17941
17942 if test "$with_dmalloc" = yes ; then
17943         echo "$as_me:17943: checking for dmalloc.h" >&5
17944 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17945 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17946   echo $ECHO_N "(cached) $ECHO_C" >&6
17947 else
17948   cat >"conftest.$ac_ext" <<_ACEOF
17949 #line 17949 "configure"
17950 #include "confdefs.h"
17951 #include <dmalloc.h>
17952 _ACEOF
17953 if { (eval echo "$as_me:17953: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17954   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17955   ac_status=$?
17956   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17957   rm -f conftest.er1
17958   cat conftest.err >&5
17959   echo "$as_me:17959: \$? = $ac_status" >&5
17960   (exit "$ac_status"); } >/dev/null; then
17961   if test -s conftest.err; then
17962     ac_cpp_err=$ac_c_preproc_warn_flag
17963   else
17964     ac_cpp_err=
17965   fi
17966 else
17967   ac_cpp_err=yes
17968 fi
17969 if test -z "$ac_cpp_err"; then
17970   ac_cv_header_dmalloc_h=yes
17971 else
17972   echo "$as_me: failed program was:" >&5
17973   cat "conftest.$ac_ext" >&5
17974   ac_cv_header_dmalloc_h=no
17975 fi
17976 rm -f conftest.err "conftest.$ac_ext"
17977 fi
17978 echo "$as_me:17978: result: $ac_cv_header_dmalloc_h" >&5
17979 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17980 if test "$ac_cv_header_dmalloc_h" = yes; then
17981
17982 echo "$as_me:17982: checking for dmalloc_debug in -ldmalloc" >&5
17983 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17984 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17985   echo $ECHO_N "(cached) $ECHO_C" >&6
17986 else
17987   ac_check_lib_save_LIBS=$LIBS
17988 LIBS="-ldmalloc  $LIBS"
17989 cat >"conftest.$ac_ext" <<_ACEOF
17990 #line 17990 "configure"
17991 #include "confdefs.h"
17992
17993 /* Override any gcc2 internal prototype to avoid an error.  */
17994 #ifdef __cplusplus
17995 extern "C"
17996 #endif
17997 /* We use char because int might match the return type of a gcc2
17998    builtin and then its argument prototype would still apply.  */
17999 char dmalloc_debug ();
18000 int
18001 main (void)
18002 {
18003 dmalloc_debug ();
18004   ;
18005   return 0;
18006 }
18007 _ACEOF
18008 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18009 if { (eval echo "$as_me:18009: \"$ac_link\"") >&5
18010   (eval $ac_link) 2>&5
18011   ac_status=$?
18012   echo "$as_me:18012: \$? = $ac_status" >&5
18013   (exit "$ac_status"); } &&
18014          { ac_try='test -s "conftest$ac_exeext"'
18015   { (eval echo "$as_me:18015: \"$ac_try\"") >&5
18016   (eval $ac_try) 2>&5
18017   ac_status=$?
18018   echo "$as_me:18018: \$? = $ac_status" >&5
18019   (exit "$ac_status"); }; }; then
18020   ac_cv_lib_dmalloc_dmalloc_debug=yes
18021 else
18022   echo "$as_me: failed program was:" >&5
18023 cat "conftest.$ac_ext" >&5
18024 ac_cv_lib_dmalloc_dmalloc_debug=no
18025 fi
18026 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18027 LIBS=$ac_check_lib_save_LIBS
18028 fi
18029 echo "$as_me:18029: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18030 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18031 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18032   cat >>confdefs.h <<EOF
18033 #define HAVE_LIBDMALLOC 1
18034 EOF
18035
18036   LIBS="-ldmalloc $LIBS"
18037
18038 fi
18039
18040 fi
18041
18042 fi
18043
18044 echo "$as_me:18044: checking if you want to use dbmalloc for testing" >&5
18045 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18046
18047 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18048 if test "${with_dbmalloc+set}" = set; then
18049   withval="$with_dbmalloc"
18050   case "x$withval" in
18051         (x|xno) ;;
18052         (*)
18053                 : "${with_cflags:=-g}"
18054                 : "${enable_leaks:=no}"
18055                 with_dbmalloc=yes
18056
18057 cat >>confdefs.h <<EOF
18058 #define USE_DBMALLOC 1
18059 EOF
18060
18061                 ;;
18062         esac
18063 else
18064   with_dbmalloc=
18065 fi;
18066 echo "$as_me:18066: result: ${with_dbmalloc:-no}" >&5
18067 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18068
18069 case ".$with_cflags" in
18070 (.*-g*)
18071         case .$CFLAGS in
18072         (.*-g*)
18073                 ;;
18074         (*)
18075
18076 cf_fix_cppflags=no
18077 cf_new_cflags=
18078 cf_new_cppflags=
18079 cf_new_extra_cppflags=
18080
18081 for cf_add_cflags in -g
18082 do
18083 case "$cf_fix_cppflags" in
18084 (no)
18085         case "$cf_add_cflags" in
18086         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18087                 case "$cf_add_cflags" in
18088                 (-D*)
18089                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18090
18091                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18092                                 && test -z "${cf_tst_cflags}" \
18093                                 && cf_fix_cppflags=yes
18094
18095                         if test "$cf_fix_cppflags" = yes ; then
18096
18097         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18098         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18099
18100                                 continue
18101                         elif test "${cf_tst_cflags}" = "\"'" ; then
18102
18103         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18104         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18105
18106                                 continue
18107                         fi
18108                         ;;
18109                 esac
18110                 case "$CPPFLAGS" in
18111                 (*$cf_add_cflags)
18112                         ;;
18113                 (*)
18114                         case "$cf_add_cflags" in
18115                         (-D*)
18116                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18117
18118 CPPFLAGS=`echo "$CPPFLAGS" | \
18119         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18120                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18121
18122                                 ;;
18123                         esac
18124
18125         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18126         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18127
18128                         ;;
18129                 esac
18130                 ;;
18131         (*)
18132
18133         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18134         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18135
18136                 ;;
18137         esac
18138         ;;
18139 (yes)
18140
18141         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18142         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18143
18144         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18145
18146         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18147                 && test -z "${cf_tst_cflags}" \
18148                 && cf_fix_cppflags=no
18149         ;;
18150 esac
18151 done
18152
18153 if test -n "$cf_new_cflags" ; then
18154
18155         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18156         CFLAGS="${CFLAGS}$cf_new_cflags"
18157
18158 fi
18159
18160 if test -n "$cf_new_cppflags" ; then
18161
18162         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18163         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18164
18165 fi
18166
18167 if test -n "$cf_new_extra_cppflags" ; then
18168
18169         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18170         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18171
18172 fi
18173
18174                 ;;
18175         esac
18176         ;;
18177 esac
18178
18179 if test "$with_dbmalloc" = yes ; then
18180         echo "$as_me:18180: checking for dbmalloc.h" >&5
18181 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18182 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18183   echo $ECHO_N "(cached) $ECHO_C" >&6
18184 else
18185   cat >"conftest.$ac_ext" <<_ACEOF
18186 #line 18186 "configure"
18187 #include "confdefs.h"
18188 #include <dbmalloc.h>
18189 _ACEOF
18190 if { (eval echo "$as_me:18190: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18191   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18192   ac_status=$?
18193   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18194   rm -f conftest.er1
18195   cat conftest.err >&5
18196   echo "$as_me:18196: \$? = $ac_status" >&5
18197   (exit "$ac_status"); } >/dev/null; then
18198   if test -s conftest.err; then
18199     ac_cpp_err=$ac_c_preproc_warn_flag
18200   else
18201     ac_cpp_err=
18202   fi
18203 else
18204   ac_cpp_err=yes
18205 fi
18206 if test -z "$ac_cpp_err"; then
18207   ac_cv_header_dbmalloc_h=yes
18208 else
18209   echo "$as_me: failed program was:" >&5
18210   cat "conftest.$ac_ext" >&5
18211   ac_cv_header_dbmalloc_h=no
18212 fi
18213 rm -f conftest.err "conftest.$ac_ext"
18214 fi
18215 echo "$as_me:18215: result: $ac_cv_header_dbmalloc_h" >&5
18216 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18217 if test "$ac_cv_header_dbmalloc_h" = yes; then
18218
18219 echo "$as_me:18219: checking for debug_malloc in -ldbmalloc" >&5
18220 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18221 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18222   echo $ECHO_N "(cached) $ECHO_C" >&6
18223 else
18224   ac_check_lib_save_LIBS=$LIBS
18225 LIBS="-ldbmalloc  $LIBS"
18226 cat >"conftest.$ac_ext" <<_ACEOF
18227 #line 18227 "configure"
18228 #include "confdefs.h"
18229
18230 /* Override any gcc2 internal prototype to avoid an error.  */
18231 #ifdef __cplusplus
18232 extern "C"
18233 #endif
18234 /* We use char because int might match the return type of a gcc2
18235    builtin and then its argument prototype would still apply.  */
18236 char debug_malloc ();
18237 int
18238 main (void)
18239 {
18240 debug_malloc ();
18241   ;
18242   return 0;
18243 }
18244 _ACEOF
18245 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18246 if { (eval echo "$as_me:18246: \"$ac_link\"") >&5
18247   (eval $ac_link) 2>&5
18248   ac_status=$?
18249   echo "$as_me:18249: \$? = $ac_status" >&5
18250   (exit "$ac_status"); } &&
18251          { ac_try='test -s "conftest$ac_exeext"'
18252   { (eval echo "$as_me:18252: \"$ac_try\"") >&5
18253   (eval $ac_try) 2>&5
18254   ac_status=$?
18255   echo "$as_me:18255: \$? = $ac_status" >&5
18256   (exit "$ac_status"); }; }; then
18257   ac_cv_lib_dbmalloc_debug_malloc=yes
18258 else
18259   echo "$as_me: failed program was:" >&5
18260 cat "conftest.$ac_ext" >&5
18261 ac_cv_lib_dbmalloc_debug_malloc=no
18262 fi
18263 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18264 LIBS=$ac_check_lib_save_LIBS
18265 fi
18266 echo "$as_me:18266: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18267 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18268 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18269   cat >>confdefs.h <<EOF
18270 #define HAVE_LIBDBMALLOC 1
18271 EOF
18272
18273   LIBS="-ldbmalloc $LIBS"
18274
18275 fi
18276
18277 fi
18278
18279 fi
18280
18281 echo "$as_me:18281: checking if you want to use valgrind for testing" >&5
18282 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18283
18284 # Check whether --with-valgrind or --without-valgrind was given.
18285 if test "${with_valgrind+set}" = set; then
18286   withval="$with_valgrind"
18287   case "x$withval" in
18288         (x|xno) ;;
18289         (*)
18290                 : "${with_cflags:=-g}"
18291                 : "${enable_leaks:=no}"
18292                 with_valgrind=yes
18293
18294 cat >>confdefs.h <<EOF
18295 #define USE_VALGRIND 1
18296 EOF
18297
18298                 ;;
18299         esac
18300 else
18301   with_valgrind=
18302 fi;
18303 echo "$as_me:18303: result: ${with_valgrind:-no}" >&5
18304 echo "${ECHO_T}${with_valgrind:-no}" >&6
18305
18306 case ".$with_cflags" in
18307 (.*-g*)
18308         case .$CFLAGS in
18309         (.*-g*)
18310                 ;;
18311         (*)
18312
18313 cf_fix_cppflags=no
18314 cf_new_cflags=
18315 cf_new_cppflags=
18316 cf_new_extra_cppflags=
18317
18318 for cf_add_cflags in -g
18319 do
18320 case "$cf_fix_cppflags" in
18321 (no)
18322         case "$cf_add_cflags" in
18323         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18324                 case "$cf_add_cflags" in
18325                 (-D*)
18326                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18327
18328                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18329                                 && test -z "${cf_tst_cflags}" \
18330                                 && cf_fix_cppflags=yes
18331
18332                         if test "$cf_fix_cppflags" = yes ; then
18333
18334         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18335         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18336
18337                                 continue
18338                         elif test "${cf_tst_cflags}" = "\"'" ; then
18339
18340         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18341         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18342
18343                                 continue
18344                         fi
18345                         ;;
18346                 esac
18347                 case "$CPPFLAGS" in
18348                 (*$cf_add_cflags)
18349                         ;;
18350                 (*)
18351                         case "$cf_add_cflags" in
18352                         (-D*)
18353                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18354
18355 CPPFLAGS=`echo "$CPPFLAGS" | \
18356         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18357                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18358
18359                                 ;;
18360                         esac
18361
18362         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18363         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18364
18365                         ;;
18366                 esac
18367                 ;;
18368         (*)
18369
18370         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18371         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18372
18373                 ;;
18374         esac
18375         ;;
18376 (yes)
18377
18378         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18379         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18380
18381         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18382
18383         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18384                 && test -z "${cf_tst_cflags}" \
18385                 && cf_fix_cppflags=no
18386         ;;
18387 esac
18388 done
18389
18390 if test -n "$cf_new_cflags" ; then
18391
18392         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18393         CFLAGS="${CFLAGS}$cf_new_cflags"
18394
18395 fi
18396
18397 if test -n "$cf_new_cppflags" ; then
18398
18399         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18400         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18401
18402 fi
18403
18404 if test -n "$cf_new_extra_cppflags" ; then
18405
18406         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18407         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18408
18409 fi
18410
18411                 ;;
18412         esac
18413         ;;
18414 esac
18415
18416 echo "$as_me:18416: checking if you want to perform memory-leak testing" >&5
18417 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18418
18419 # Check whether --enable-leaks or --disable-leaks was given.
18420 if test "${enable_leaks+set}" = set; then
18421   enableval="$enable_leaks"
18422   enable_leaks=$enableval
18423 else
18424   enable_leaks=yes
18425 fi;
18426 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18427 echo "$as_me:18427: result: $with_no_leaks" >&5
18428 echo "${ECHO_T}$with_no_leaks" >&6
18429
18430 if test "$enable_leaks" = no ; then
18431
18432 cat >>confdefs.h <<\EOF
18433 #define NO_LEAKS 1
18434 EOF
18435
18436 cat >>confdefs.h <<\EOF
18437 #define YY_NO_LEAKS 1
18438 EOF
18439
18440 fi
18441
18442 cat >>confdefs.h <<\EOF
18443 #define HAVE_NC_ALLOC_H 1
18444 EOF
18445
18446 ###     use option --enable-expanded to generate certain macros as functions
18447
18448 # Check whether --enable-expanded or --disable-expanded was given.
18449 if test "${enable_expanded+set}" = set; then
18450   enableval="$enable_expanded"
18451   test "x$enableval" = xyes &&
18452 cat >>confdefs.h <<\EOF
18453 #define NCURSES_EXPANDED 1
18454 EOF
18455
18456 fi;
18457
18458 ###     use option --disable-macros to suppress macros in favor of functions
18459
18460 # Check whether --enable-macros or --disable-macros was given.
18461 if test "${enable_macros+set}" = set; then
18462   enableval="$enable_macros"
18463   test "$enableval" = no &&
18464 cat >>confdefs.h <<\EOF
18465 #define NCURSES_NOMACROS 1
18466 EOF
18467
18468 fi;
18469
18470 # Normally we only add trace() to the debug-library.  Allow this to be
18471 # extended to all models of the ncurses library:
18472 cf_all_traces=no
18473 case "$CFLAGS $CPPFLAGS" in
18474 (*-DTRACE*)
18475         cf_all_traces=yes
18476         ;;
18477 esac
18478
18479 echo "$as_me:18479: checking whether to add trace feature to all models" >&5
18480 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18481
18482 # Check whether --with-trace or --without-trace was given.
18483 if test "${with_trace+set}" = set; then
18484   withval="$with_trace"
18485   cf_with_trace=$withval
18486 else
18487   cf_with_trace=$cf_all_traces
18488 fi;
18489 echo "$as_me:18489: result: $cf_with_trace" >&5
18490 echo "${ECHO_T}$cf_with_trace" >&6
18491
18492 if test "x$cf_with_trace" = xyes ; then
18493         LIB_TRACING=all
18494         ADA_TRACE=TRUE
18495
18496 cf_fix_cppflags=no
18497 cf_new_cflags=
18498 cf_new_cppflags=
18499 cf_new_extra_cppflags=
18500
18501 for cf_add_cflags in -DTRACE
18502 do
18503 case "$cf_fix_cppflags" in
18504 (no)
18505         case "$cf_add_cflags" in
18506         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18507                 case "$cf_add_cflags" in
18508                 (-D*)
18509                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18510
18511                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18512                                 && test -z "${cf_tst_cflags}" \
18513                                 && cf_fix_cppflags=yes
18514
18515                         if test "$cf_fix_cppflags" = yes ; then
18516
18517         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18518         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18519
18520                                 continue
18521                         elif test "${cf_tst_cflags}" = "\"'" ; then
18522
18523         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18524         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18525
18526                                 continue
18527                         fi
18528                         ;;
18529                 esac
18530                 case "$CPPFLAGS" in
18531                 (*$cf_add_cflags)
18532                         ;;
18533                 (*)
18534                         case "$cf_add_cflags" in
18535                         (-D*)
18536                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18537
18538 CPPFLAGS=`echo "$CPPFLAGS" | \
18539         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18540                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18541
18542                                 ;;
18543                         esac
18544
18545         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18546         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18547
18548                         ;;
18549                 esac
18550                 ;;
18551         (*)
18552
18553         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18554         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18555
18556                 ;;
18557         esac
18558         ;;
18559 (yes)
18560
18561         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18562         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18563
18564         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18565
18566         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18567                 && test -z "${cf_tst_cflags}" \
18568                 && cf_fix_cppflags=no
18569         ;;
18570 esac
18571 done
18572
18573 if test -n "$cf_new_cflags" ; then
18574
18575         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18576         CFLAGS="${CFLAGS}$cf_new_cflags"
18577
18578 fi
18579
18580 if test -n "$cf_new_cppflags" ; then
18581
18582         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18583         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18584
18585 fi
18586
18587 if test -n "$cf_new_extra_cppflags" ; then
18588
18589         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18590         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18591
18592 fi
18593
18594 cat >>confdefs.h <<\EOF
18595 #define HAVE__TRACEF 1
18596 EOF
18597
18598 else
18599         LIB_TRACING=DEBUG
18600         ADA_TRACE=FALSE
18601 fi
18602
18603 echo "$as_me:18603: checking if we want to use GNAT projects" >&5
18604 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18605
18606 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18607 if test "${enable_gnat_projects+set}" = set; then
18608   enableval="$enable_gnat_projects"
18609   test "$enableval" != no && enableval=yes
18610         if test "$enableval" != "yes" ; then
18611     enable_gnat_projects=no
18612         else
18613                 enable_gnat_projects=yes
18614         fi
18615 else
18616   enableval=yes
18617         enable_gnat_projects=yes
18618
18619 fi;
18620 echo "$as_me:18620: result: $enable_gnat_projects" >&5
18621 echo "${ECHO_T}$enable_gnat_projects" >&6
18622
18623 ###     Checks for libraries.
18624 case "$cf_cv_system_name" in
18625 (*mingw32*|*mingw64*)
18626         if test "x$with_exp_win32" = xyes ; then
18627         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18628         else
18629         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18630         fi
18631         # Note: WINVER may be a problem with Windows 10
18632         ;;
18633 (*)
18634 echo "$as_me:18634: checking for gettimeofday" >&5
18635 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18636 if test "${ac_cv_func_gettimeofday+set}" = set; then
18637   echo $ECHO_N "(cached) $ECHO_C" >&6
18638 else
18639   cat >"conftest.$ac_ext" <<_ACEOF
18640 #line 18640 "configure"
18641 #include "confdefs.h"
18642 #define gettimeofday autoconf_temporary
18643 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18644 #undef gettimeofday
18645
18646 #ifdef __cplusplus
18647 extern "C"
18648 #endif
18649
18650 /* We use char because int might match the return type of a gcc2
18651    builtin and then its argument prototype would still apply.  */
18652 char gettimeofday (void);
18653
18654 int
18655 main (void)
18656 {
18657
18658 /* The GNU C library defines stubs for functions which it implements
18659     to always fail with ENOSYS.  Some functions are actually named
18660     something starting with __ and the normal name is an alias.  */
18661 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18662 #error found stub for gettimeofday
18663 #endif
18664
18665         return gettimeofday ();
18666   ;
18667   return 0;
18668 }
18669 _ACEOF
18670 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18671 if { (eval echo "$as_me:18671: \"$ac_link\"") >&5
18672   (eval $ac_link) 2>&5
18673   ac_status=$?
18674   echo "$as_me:18674: \$? = $ac_status" >&5
18675   (exit "$ac_status"); } &&
18676          { ac_try='test -s "conftest$ac_exeext"'
18677   { (eval echo "$as_me:18677: \"$ac_try\"") >&5
18678   (eval $ac_try) 2>&5
18679   ac_status=$?
18680   echo "$as_me:18680: \$? = $ac_status" >&5
18681   (exit "$ac_status"); }; }; then
18682   ac_cv_func_gettimeofday=yes
18683 else
18684   echo "$as_me: failed program was:" >&5
18685 cat "conftest.$ac_ext" >&5
18686 ac_cv_func_gettimeofday=no
18687 fi
18688 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18689 fi
18690 echo "$as_me:18690: result: $ac_cv_func_gettimeofday" >&5
18691 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18692 if test "$ac_cv_func_gettimeofday" = yes; then
18693
18694 cat >>confdefs.h <<\EOF
18695 #define HAVE_GETTIMEOFDAY 1
18696 EOF
18697
18698 else
18699
18700 echo "$as_me:18700: checking for gettimeofday in -lbsd" >&5
18701 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18702 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18703   echo $ECHO_N "(cached) $ECHO_C" >&6
18704 else
18705   ac_check_lib_save_LIBS=$LIBS
18706 LIBS="-lbsd  $LIBS"
18707 cat >"conftest.$ac_ext" <<_ACEOF
18708 #line 18708 "configure"
18709 #include "confdefs.h"
18710
18711 /* Override any gcc2 internal prototype to avoid an error.  */
18712 #ifdef __cplusplus
18713 extern "C"
18714 #endif
18715 /* We use char because int might match the return type of a gcc2
18716    builtin and then its argument prototype would still apply.  */
18717 char gettimeofday ();
18718 int
18719 main (void)
18720 {
18721 gettimeofday ();
18722   ;
18723   return 0;
18724 }
18725 _ACEOF
18726 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18727 if { (eval echo "$as_me:18727: \"$ac_link\"") >&5
18728   (eval $ac_link) 2>&5
18729   ac_status=$?
18730   echo "$as_me:18730: \$? = $ac_status" >&5
18731   (exit "$ac_status"); } &&
18732          { ac_try='test -s "conftest$ac_exeext"'
18733   { (eval echo "$as_me:18733: \"$ac_try\"") >&5
18734   (eval $ac_try) 2>&5
18735   ac_status=$?
18736   echo "$as_me:18736: \$? = $ac_status" >&5
18737   (exit "$ac_status"); }; }; then
18738   ac_cv_lib_bsd_gettimeofday=yes
18739 else
18740   echo "$as_me: failed program was:" >&5
18741 cat "conftest.$ac_ext" >&5
18742 ac_cv_lib_bsd_gettimeofday=no
18743 fi
18744 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18745 LIBS=$ac_check_lib_save_LIBS
18746 fi
18747 echo "$as_me:18747: result: $ac_cv_lib_bsd_gettimeofday" >&5
18748 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18749 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18750
18751 cat >>confdefs.h <<\EOF
18752 #define HAVE_GETTIMEOFDAY 1
18753 EOF
18754
18755 cf_add_libs="$LIBS"
18756 # reverse order
18757 cf_add_0lib=
18758 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18759 # filter duplicates
18760 for cf_add_1lib in $cf_add_0lib; do
18761         for cf_add_2lib in $cf_add_libs; do
18762                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18763                         cf_add_1lib=
18764                         break
18765                 fi
18766         done
18767         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18768 done
18769 LIBS="$cf_add_libs"
18770
18771 fi
18772
18773 fi
18774         ;;
18775 esac
18776
18777 echo "$as_me:18777: checking if -lm needed for math functions" >&5
18778 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18779 if test "${cf_cv_need_libm+set}" = set; then
18780   echo $ECHO_N "(cached) $ECHO_C" >&6
18781 else
18782
18783         cat >"conftest.$ac_ext" <<_ACEOF
18784 #line 18784 "configure"
18785 #include "confdefs.h"
18786
18787         #include <stdio.h>
18788         #include <stdlib.h>
18789         #include <math.h>
18790
18791 int
18792 main (void)
18793 {
18794 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18795   ;
18796   return 0;
18797 }
18798 _ACEOF
18799 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18800 if { (eval echo "$as_me:18800: \"$ac_link\"") >&5
18801   (eval $ac_link) 2>&5
18802   ac_status=$?
18803   echo "$as_me:18803: \$? = $ac_status" >&5
18804   (exit "$ac_status"); } &&
18805          { ac_try='test -s "conftest$ac_exeext"'
18806   { (eval echo "$as_me:18806: \"$ac_try\"") >&5
18807   (eval $ac_try) 2>&5
18808   ac_status=$?
18809   echo "$as_me:18809: \$? = $ac_status" >&5
18810   (exit "$ac_status"); }; }; then
18811   cf_cv_need_libm=no
18812 else
18813   echo "$as_me: failed program was:" >&5
18814 cat "conftest.$ac_ext" >&5
18815 cf_cv_need_libm=yes
18816 fi
18817 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18818 fi
18819 echo "$as_me:18819: result: $cf_cv_need_libm" >&5
18820 echo "${ECHO_T}$cf_cv_need_libm" >&6
18821 if test "$cf_cv_need_libm" = yes
18822 then
18823 MATH_LIB=-lm
18824 fi
18825
18826 ###     Checks for header files.
18827 echo "$as_me:18827: checking for ANSI C header files" >&5
18828 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18829 if test "${ac_cv_header_stdc+set}" = set; then
18830   echo $ECHO_N "(cached) $ECHO_C" >&6
18831 else
18832   cat >"conftest.$ac_ext" <<_ACEOF
18833 #line 18833 "configure"
18834 #include "confdefs.h"
18835 #include <stdlib.h>
18836 #include <stdarg.h>
18837 #include <string.h>
18838 #include <float.h>
18839
18840 _ACEOF
18841 if { (eval echo "$as_me:18841: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18842   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18843   ac_status=$?
18844   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18845   rm -f conftest.er1
18846   cat conftest.err >&5
18847   echo "$as_me:18847: \$? = $ac_status" >&5
18848   (exit "$ac_status"); } >/dev/null; then
18849   if test -s conftest.err; then
18850     ac_cpp_err=$ac_c_preproc_warn_flag
18851   else
18852     ac_cpp_err=
18853   fi
18854 else
18855   ac_cpp_err=yes
18856 fi
18857 if test -z "$ac_cpp_err"; then
18858   ac_cv_header_stdc=yes
18859 else
18860   echo "$as_me: failed program was:" >&5
18861   cat "conftest.$ac_ext" >&5
18862   ac_cv_header_stdc=no
18863 fi
18864 rm -f conftest.err "conftest.$ac_ext"
18865
18866 if test $ac_cv_header_stdc = yes; then
18867   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18868   cat >"conftest.$ac_ext" <<_ACEOF
18869 #line 18869 "configure"
18870 #include "confdefs.h"
18871 #include <string.h>
18872
18873 _ACEOF
18874 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18875   $EGREP "memchr" >/dev/null 2>&1; then
18876   :
18877 else
18878   ac_cv_header_stdc=no
18879 fi
18880 rm -rf conftest*
18881
18882 fi
18883
18884 if test $ac_cv_header_stdc = yes; then
18885   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18886   cat >"conftest.$ac_ext" <<_ACEOF
18887 #line 18887 "configure"
18888 #include "confdefs.h"
18889 #include <stdlib.h>
18890
18891 _ACEOF
18892 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18893   $EGREP "free" >/dev/null 2>&1; then
18894   :
18895 else
18896   ac_cv_header_stdc=no
18897 fi
18898 rm -rf conftest*
18899
18900 fi
18901
18902 if test $ac_cv_header_stdc = yes; then
18903   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18904   if test "$cross_compiling" = yes; then
18905   :
18906 else
18907   cat >"conftest.$ac_ext" <<_ACEOF
18908 #line 18908 "configure"
18909 #include "confdefs.h"
18910 #include <ctype.h>
18911 #if ((' ' & 0x0FF) == 0x020)
18912 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18913 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18914 #else
18915 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18916                      || ('j' <= (c) && (c) <= 'r') \
18917                      || ('s' <= (c) && (c) <= 'z'))
18918 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18919 #endif
18920
18921 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18922 int
18923 main (void)
18924 {
18925   int i;
18926   for (i = 0; i < 256; i++)
18927     if (XOR (islower (i), ISLOWER (i))
18928         || toupper (i) != TOUPPER (i))
18929       $ac_main_return(2);
18930   $ac_main_return (0);
18931 }
18932 _ACEOF
18933 rm -f "conftest$ac_exeext"
18934 if { (eval echo "$as_me:18934: \"$ac_link\"") >&5
18935   (eval $ac_link) 2>&5
18936   ac_status=$?
18937   echo "$as_me:18937: \$? = $ac_status" >&5
18938   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18939   { (eval echo "$as_me:18939: \"$ac_try\"") >&5
18940   (eval $ac_try) 2>&5
18941   ac_status=$?
18942   echo "$as_me:18942: \$? = $ac_status" >&5
18943   (exit "$ac_status"); }; }; then
18944   :
18945 else
18946   echo "$as_me: program exited with status $ac_status" >&5
18947 echo "$as_me: failed program was:" >&5
18948 cat "conftest.$ac_ext" >&5
18949 ac_cv_header_stdc=no
18950 fi
18951 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18952 fi
18953 fi
18954 fi
18955 echo "$as_me:18955: result: $ac_cv_header_stdc" >&5
18956 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18957 if test $ac_cv_header_stdc = yes; then
18958
18959 cat >>confdefs.h <<\EOF
18960 #define STDC_HEADERS 1
18961 EOF
18962
18963 fi
18964
18965 ac_header_dirent=no
18966 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18967   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18968 echo "$as_me:18968: checking for $ac_hdr that defines DIR" >&5
18969 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18970 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18971   echo $ECHO_N "(cached) $ECHO_C" >&6
18972 else
18973   cat >"conftest.$ac_ext" <<_ACEOF
18974 #line 18974 "configure"
18975 #include "confdefs.h"
18976 #include <sys/types.h>
18977 #include <$ac_hdr>
18978
18979 int
18980 main (void)
18981 {
18982 if ((DIR *) 0)
18983 return 0;
18984   ;
18985   return 0;
18986 }
18987 _ACEOF
18988 rm -f "conftest.$ac_objext"
18989 if { (eval echo "$as_me:18989: \"$ac_compile\"") >&5
18990   (eval $ac_compile) 2>&5
18991   ac_status=$?
18992   echo "$as_me:18992: \$? = $ac_status" >&5
18993   (exit "$ac_status"); } &&
18994          { ac_try='test -s "conftest.$ac_objext"'
18995   { (eval echo "$as_me:18995: \"$ac_try\"") >&5
18996   (eval $ac_try) 2>&5
18997   ac_status=$?
18998   echo "$as_me:18998: \$? = $ac_status" >&5
18999   (exit "$ac_status"); }; }; then
19000   eval "$as_ac_Header=yes"
19001 else
19002   echo "$as_me: failed program was:" >&5
19003 cat "conftest.$ac_ext" >&5
19004 eval "$as_ac_Header=no"
19005 fi
19006 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19007 fi
19008 echo "$as_me:19008: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19009 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19010 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19011   cat >>confdefs.h <<EOF
19012 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
19013 EOF
19014
19015 ac_header_dirent=$ac_hdr; break
19016 fi
19017
19018 done
19019 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
19020 if test $ac_header_dirent = dirent.h; then
19021   echo "$as_me:19021: checking for opendir in -ldir" >&5
19022 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
19023 if test "${ac_cv_lib_dir_opendir+set}" = set; then
19024   echo $ECHO_N "(cached) $ECHO_C" >&6
19025 else
19026   ac_check_lib_save_LIBS=$LIBS
19027 LIBS="-ldir  $LIBS"
19028 cat >"conftest.$ac_ext" <<_ACEOF
19029 #line 19029 "configure"
19030 #include "confdefs.h"
19031
19032 /* Override any gcc2 internal prototype to avoid an error.  */
19033 #ifdef __cplusplus
19034 extern "C"
19035 #endif
19036 /* We use char because int might match the return type of a gcc2
19037    builtin and then its argument prototype would still apply.  */
19038 char opendir ();
19039 int
19040 main (void)
19041 {
19042 opendir ();
19043   ;
19044   return 0;
19045 }
19046 _ACEOF
19047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19048 if { (eval echo "$as_me:19048: \"$ac_link\"") >&5
19049   (eval $ac_link) 2>&5
19050   ac_status=$?
19051   echo "$as_me:19051: \$? = $ac_status" >&5
19052   (exit "$ac_status"); } &&
19053          { ac_try='test -s "conftest$ac_exeext"'
19054   { (eval echo "$as_me:19054: \"$ac_try\"") >&5
19055   (eval $ac_try) 2>&5
19056   ac_status=$?
19057   echo "$as_me:19057: \$? = $ac_status" >&5
19058   (exit "$ac_status"); }; }; then
19059   ac_cv_lib_dir_opendir=yes
19060 else
19061   echo "$as_me: failed program was:" >&5
19062 cat "conftest.$ac_ext" >&5
19063 ac_cv_lib_dir_opendir=no
19064 fi
19065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19066 LIBS=$ac_check_lib_save_LIBS
19067 fi
19068 echo "$as_me:19068: result: $ac_cv_lib_dir_opendir" >&5
19069 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
19070 if test "$ac_cv_lib_dir_opendir" = yes; then
19071   LIBS="$LIBS -ldir"
19072 fi
19073
19074 else
19075   echo "$as_me:19075: checking for opendir in -lx" >&5
19076 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
19077 if test "${ac_cv_lib_x_opendir+set}" = set; then
19078   echo $ECHO_N "(cached) $ECHO_C" >&6
19079 else
19080   ac_check_lib_save_LIBS=$LIBS
19081 LIBS="-lx  $LIBS"
19082 cat >"conftest.$ac_ext" <<_ACEOF
19083 #line 19083 "configure"
19084 #include "confdefs.h"
19085
19086 /* Override any gcc2 internal prototype to avoid an error.  */
19087 #ifdef __cplusplus
19088 extern "C"
19089 #endif
19090 /* We use char because int might match the return type of a gcc2
19091    builtin and then its argument prototype would still apply.  */
19092 char opendir ();
19093 int
19094 main (void)
19095 {
19096 opendir ();
19097   ;
19098   return 0;
19099 }
19100 _ACEOF
19101 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19102 if { (eval echo "$as_me:19102: \"$ac_link\"") >&5
19103   (eval $ac_link) 2>&5
19104   ac_status=$?
19105   echo "$as_me:19105: \$? = $ac_status" >&5
19106   (exit "$ac_status"); } &&
19107          { ac_try='test -s "conftest$ac_exeext"'
19108   { (eval echo "$as_me:19108: \"$ac_try\"") >&5
19109   (eval $ac_try) 2>&5
19110   ac_status=$?
19111   echo "$as_me:19111: \$? = $ac_status" >&5
19112   (exit "$ac_status"); }; }; then
19113   ac_cv_lib_x_opendir=yes
19114 else
19115   echo "$as_me: failed program was:" >&5
19116 cat "conftest.$ac_ext" >&5
19117 ac_cv_lib_x_opendir=no
19118 fi
19119 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19120 LIBS=$ac_check_lib_save_LIBS
19121 fi
19122 echo "$as_me:19122: result: $ac_cv_lib_x_opendir" >&5
19123 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
19124 if test "$ac_cv_lib_x_opendir" = yes; then
19125   LIBS="$LIBS -lx"
19126 fi
19127
19128 fi
19129
19130 echo "$as_me:19130: checking whether time.h and sys/time.h may both be included" >&5
19131 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19132 if test "${ac_cv_header_time+set}" = set; then
19133   echo $ECHO_N "(cached) $ECHO_C" >&6
19134 else
19135   cat >"conftest.$ac_ext" <<_ACEOF
19136 #line 19136 "configure"
19137 #include "confdefs.h"
19138 #include <sys/types.h>
19139 #include <sys/time.h>
19140 #include <time.h>
19141
19142 int
19143 main (void)
19144 {
19145 if ((struct tm *) 0)
19146 return 0;
19147   ;
19148   return 0;
19149 }
19150 _ACEOF
19151 rm -f "conftest.$ac_objext"
19152 if { (eval echo "$as_me:19152: \"$ac_compile\"") >&5
19153   (eval $ac_compile) 2>&5
19154   ac_status=$?
19155   echo "$as_me:19155: \$? = $ac_status" >&5
19156   (exit "$ac_status"); } &&
19157          { ac_try='test -s "conftest.$ac_objext"'
19158   { (eval echo "$as_me:19158: \"$ac_try\"") >&5
19159   (eval $ac_try) 2>&5
19160   ac_status=$?
19161   echo "$as_me:19161: \$? = $ac_status" >&5
19162   (exit "$ac_status"); }; }; then
19163   ac_cv_header_time=yes
19164 else
19165   echo "$as_me: failed program was:" >&5
19166 cat "conftest.$ac_ext" >&5
19167 ac_cv_header_time=no
19168 fi
19169 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19170 fi
19171 echo "$as_me:19171: result: $ac_cv_header_time" >&5
19172 echo "${ECHO_T}$ac_cv_header_time" >&6
19173 if test $ac_cv_header_time = yes; then
19174
19175 cat >>confdefs.h <<\EOF
19176 #define TIME_WITH_SYS_TIME 1
19177 EOF
19178
19179 fi
19180
19181 cf_regex_func=no
19182 cf_regex_libs=
19183 case "$host_os" in
19184 (mingw*)
19185         # -lsystre -ltre -lintl -liconv
19186         echo "$as_me:19186: checking for regcomp in -lsystre" >&5
19187 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19188 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19189   echo $ECHO_N "(cached) $ECHO_C" >&6
19190 else
19191   ac_check_lib_save_LIBS=$LIBS
19192 LIBS="-lsystre  $LIBS"
19193 cat >"conftest.$ac_ext" <<_ACEOF
19194 #line 19194 "configure"
19195 #include "confdefs.h"
19196
19197 /* Override any gcc2 internal prototype to avoid an error.  */
19198 #ifdef __cplusplus
19199 extern "C"
19200 #endif
19201 /* We use char because int might match the return type of a gcc2
19202    builtin and then its argument prototype would still apply.  */
19203 char regcomp ();
19204 int
19205 main (void)
19206 {
19207 regcomp ();
19208   ;
19209   return 0;
19210 }
19211 _ACEOF
19212 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19213 if { (eval echo "$as_me:19213: \"$ac_link\"") >&5
19214   (eval $ac_link) 2>&5
19215   ac_status=$?
19216   echo "$as_me:19216: \$? = $ac_status" >&5
19217   (exit "$ac_status"); } &&
19218          { ac_try='test -s "conftest$ac_exeext"'
19219   { (eval echo "$as_me:19219: \"$ac_try\"") >&5
19220   (eval $ac_try) 2>&5
19221   ac_status=$?
19222   echo "$as_me:19222: \$? = $ac_status" >&5
19223   (exit "$ac_status"); }; }; then
19224   ac_cv_lib_systre_regcomp=yes
19225 else
19226   echo "$as_me: failed program was:" >&5
19227 cat "conftest.$ac_ext" >&5
19228 ac_cv_lib_systre_regcomp=no
19229 fi
19230 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19231 LIBS=$ac_check_lib_save_LIBS
19232 fi
19233 echo "$as_me:19233: result: $ac_cv_lib_systre_regcomp" >&5
19234 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19235 if test "$ac_cv_lib_systre_regcomp" = yes; then
19236
19237                 echo "$as_me:19237: checking for libiconv_open in -liconv" >&5
19238 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19239 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19240   echo $ECHO_N "(cached) $ECHO_C" >&6
19241 else
19242   ac_check_lib_save_LIBS=$LIBS
19243 LIBS="-liconv  $LIBS"
19244 cat >"conftest.$ac_ext" <<_ACEOF
19245 #line 19245 "configure"
19246 #include "confdefs.h"
19247
19248 /* Override any gcc2 internal prototype to avoid an error.  */
19249 #ifdef __cplusplus
19250 extern "C"
19251 #endif
19252 /* We use char because int might match the return type of a gcc2
19253    builtin and then its argument prototype would still apply.  */
19254 char libiconv_open ();
19255 int
19256 main (void)
19257 {
19258 libiconv_open ();
19259   ;
19260   return 0;
19261 }
19262 _ACEOF
19263 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19264 if { (eval echo "$as_me:19264: \"$ac_link\"") >&5
19265   (eval $ac_link) 2>&5
19266   ac_status=$?
19267   echo "$as_me:19267: \$? = $ac_status" >&5
19268   (exit "$ac_status"); } &&
19269          { ac_try='test -s "conftest$ac_exeext"'
19270   { (eval echo "$as_me:19270: \"$ac_try\"") >&5
19271   (eval $ac_try) 2>&5
19272   ac_status=$?
19273   echo "$as_me:19273: \$? = $ac_status" >&5
19274   (exit "$ac_status"); }; }; then
19275   ac_cv_lib_iconv_libiconv_open=yes
19276 else
19277   echo "$as_me: failed program was:" >&5
19278 cat "conftest.$ac_ext" >&5
19279 ac_cv_lib_iconv_libiconv_open=no
19280 fi
19281 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19282 LIBS=$ac_check_lib_save_LIBS
19283 fi
19284 echo "$as_me:19284: result: $ac_cv_lib_iconv_libiconv_open" >&5
19285 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19286 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19287
19288 cf_add_libs="$LIBS"
19289 # reverse order
19290 cf_add_0lib=
19291 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19292 # filter duplicates
19293 for cf_add_1lib in $cf_add_0lib; do
19294         for cf_add_2lib in $cf_add_libs; do
19295                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19296                         cf_add_1lib=
19297                         break
19298                 fi
19299         done
19300         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19301 done
19302 LIBS="$cf_add_libs"
19303
19304 fi
19305
19306                 echo "$as_me:19306: checking for libintl_gettext in -lintl" >&5
19307 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19308 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19309   echo $ECHO_N "(cached) $ECHO_C" >&6
19310 else
19311   ac_check_lib_save_LIBS=$LIBS
19312 LIBS="-lintl  $LIBS"
19313 cat >"conftest.$ac_ext" <<_ACEOF
19314 #line 19314 "configure"
19315 #include "confdefs.h"
19316
19317 /* Override any gcc2 internal prototype to avoid an error.  */
19318 #ifdef __cplusplus
19319 extern "C"
19320 #endif
19321 /* We use char because int might match the return type of a gcc2
19322    builtin and then its argument prototype would still apply.  */
19323 char libintl_gettext ();
19324 int
19325 main (void)
19326 {
19327 libintl_gettext ();
19328   ;
19329   return 0;
19330 }
19331 _ACEOF
19332 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19333 if { (eval echo "$as_me:19333: \"$ac_link\"") >&5
19334   (eval $ac_link) 2>&5
19335   ac_status=$?
19336   echo "$as_me:19336: \$? = $ac_status" >&5
19337   (exit "$ac_status"); } &&
19338          { ac_try='test -s "conftest$ac_exeext"'
19339   { (eval echo "$as_me:19339: \"$ac_try\"") >&5
19340   (eval $ac_try) 2>&5
19341   ac_status=$?
19342   echo "$as_me:19342: \$? = $ac_status" >&5
19343   (exit "$ac_status"); }; }; then
19344   ac_cv_lib_intl_libintl_gettext=yes
19345 else
19346   echo "$as_me: failed program was:" >&5
19347 cat "conftest.$ac_ext" >&5
19348 ac_cv_lib_intl_libintl_gettext=no
19349 fi
19350 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19351 LIBS=$ac_check_lib_save_LIBS
19352 fi
19353 echo "$as_me:19353: result: $ac_cv_lib_intl_libintl_gettext" >&5
19354 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19355 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19356
19357 cf_add_libs="$LIBS"
19358 # reverse order
19359 cf_add_0lib=
19360 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19361 # filter duplicates
19362 for cf_add_1lib in $cf_add_0lib; do
19363         for cf_add_2lib in $cf_add_libs; do
19364                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19365                         cf_add_1lib=
19366                         break
19367                 fi
19368         done
19369         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19370 done
19371 LIBS="$cf_add_libs"
19372
19373 fi
19374
19375                 echo "$as_me:19375: checking for tre_regcomp in -ltre" >&5
19376 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19377 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19378   echo $ECHO_N "(cached) $ECHO_C" >&6
19379 else
19380   ac_check_lib_save_LIBS=$LIBS
19381 LIBS="-ltre  $LIBS"
19382 cat >"conftest.$ac_ext" <<_ACEOF
19383 #line 19383 "configure"
19384 #include "confdefs.h"
19385
19386 /* Override any gcc2 internal prototype to avoid an error.  */
19387 #ifdef __cplusplus
19388 extern "C"
19389 #endif
19390 /* We use char because int might match the return type of a gcc2
19391    builtin and then its argument prototype would still apply.  */
19392 char tre_regcomp ();
19393 int
19394 main (void)
19395 {
19396 tre_regcomp ();
19397   ;
19398   return 0;
19399 }
19400 _ACEOF
19401 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19402 if { (eval echo "$as_me:19402: \"$ac_link\"") >&5
19403   (eval $ac_link) 2>&5
19404   ac_status=$?
19405   echo "$as_me:19405: \$? = $ac_status" >&5
19406   (exit "$ac_status"); } &&
19407          { ac_try='test -s "conftest$ac_exeext"'
19408   { (eval echo "$as_me:19408: \"$ac_try\"") >&5
19409   (eval $ac_try) 2>&5
19410   ac_status=$?
19411   echo "$as_me:19411: \$? = $ac_status" >&5
19412   (exit "$ac_status"); }; }; then
19413   ac_cv_lib_tre_tre_regcomp=yes
19414 else
19415   echo "$as_me: failed program was:" >&5
19416 cat "conftest.$ac_ext" >&5
19417 ac_cv_lib_tre_tre_regcomp=no
19418 fi
19419 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19420 LIBS=$ac_check_lib_save_LIBS
19421 fi
19422 echo "$as_me:19422: result: $ac_cv_lib_tre_tre_regcomp" >&5
19423 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19424 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19425
19426 cf_add_libs="$LIBS"
19427 # reverse order
19428 cf_add_0lib=
19429 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19430 # filter duplicates
19431 for cf_add_1lib in $cf_add_0lib; do
19432         for cf_add_2lib in $cf_add_libs; do
19433                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19434                         cf_add_1lib=
19435                         break
19436                 fi
19437         done
19438         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19439 done
19440 LIBS="$cf_add_libs"
19441
19442 fi
19443
19444 cf_add_libs="$LIBS"
19445 # reverse order
19446 cf_add_0lib=
19447 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19448 # filter duplicates
19449 for cf_add_1lib in $cf_add_0lib; do
19450         for cf_add_2lib in $cf_add_libs; do
19451                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19452                         cf_add_1lib=
19453                         break
19454                 fi
19455         done
19456         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19457 done
19458 LIBS="$cf_add_libs"
19459
19460                 cf_regex_func=regcomp
19461
19462 else
19463
19464                 echo "$as_me:19464: checking for regcomp in -lgnurx" >&5
19465 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19466 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19467   echo $ECHO_N "(cached) $ECHO_C" >&6
19468 else
19469   ac_check_lib_save_LIBS=$LIBS
19470 LIBS="-lgnurx  $LIBS"
19471 cat >"conftest.$ac_ext" <<_ACEOF
19472 #line 19472 "configure"
19473 #include "confdefs.h"
19474
19475 /* Override any gcc2 internal prototype to avoid an error.  */
19476 #ifdef __cplusplus
19477 extern "C"
19478 #endif
19479 /* We use char because int might match the return type of a gcc2
19480    builtin and then its argument prototype would still apply.  */
19481 char regcomp ();
19482 int
19483 main (void)
19484 {
19485 regcomp ();
19486   ;
19487   return 0;
19488 }
19489 _ACEOF
19490 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19491 if { (eval echo "$as_me:19491: \"$ac_link\"") >&5
19492   (eval $ac_link) 2>&5
19493   ac_status=$?
19494   echo "$as_me:19494: \$? = $ac_status" >&5
19495   (exit "$ac_status"); } &&
19496          { ac_try='test -s "conftest$ac_exeext"'
19497   { (eval echo "$as_me:19497: \"$ac_try\"") >&5
19498   (eval $ac_try) 2>&5
19499   ac_status=$?
19500   echo "$as_me:19500: \$? = $ac_status" >&5
19501   (exit "$ac_status"); }; }; then
19502   ac_cv_lib_gnurx_regcomp=yes
19503 else
19504   echo "$as_me: failed program was:" >&5
19505 cat "conftest.$ac_ext" >&5
19506 ac_cv_lib_gnurx_regcomp=no
19507 fi
19508 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19509 LIBS=$ac_check_lib_save_LIBS
19510 fi
19511 echo "$as_me:19511: result: $ac_cv_lib_gnurx_regcomp" >&5
19512 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19513 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19514
19515 cf_add_libs="$LIBS"
19516 # reverse order
19517 cf_add_0lib=
19518 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19519 # filter duplicates
19520 for cf_add_1lib in $cf_add_0lib; do
19521         for cf_add_2lib in $cf_add_libs; do
19522                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19523                         cf_add_1lib=
19524                         break
19525                 fi
19526         done
19527         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19528 done
19529 LIBS="$cf_add_libs"
19530
19531                         cf_regex_func=regcomp
19532 fi
19533
19534 fi
19535
19536         ;;
19537 (*)
19538         cf_regex_libs="regex re"
19539         echo "$as_me:19539: checking for regcomp" >&5
19540 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19541 if test "${ac_cv_func_regcomp+set}" = set; then
19542   echo $ECHO_N "(cached) $ECHO_C" >&6
19543 else
19544   cat >"conftest.$ac_ext" <<_ACEOF
19545 #line 19545 "configure"
19546 #include "confdefs.h"
19547 #define regcomp autoconf_temporary
19548 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19549 #undef regcomp
19550
19551 #ifdef __cplusplus
19552 extern "C"
19553 #endif
19554
19555 /* We use char because int might match the return type of a gcc2
19556    builtin and then its argument prototype would still apply.  */
19557 char regcomp (void);
19558
19559 int
19560 main (void)
19561 {
19562
19563 /* The GNU C library defines stubs for functions which it implements
19564     to always fail with ENOSYS.  Some functions are actually named
19565     something starting with __ and the normal name is an alias.  */
19566 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19567 #error found stub for regcomp
19568 #endif
19569
19570         return regcomp ();
19571   ;
19572   return 0;
19573 }
19574 _ACEOF
19575 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19576 if { (eval echo "$as_me:19576: \"$ac_link\"") >&5
19577   (eval $ac_link) 2>&5
19578   ac_status=$?
19579   echo "$as_me:19579: \$? = $ac_status" >&5
19580   (exit "$ac_status"); } &&
19581          { ac_try='test -s "conftest$ac_exeext"'
19582   { (eval echo "$as_me:19582: \"$ac_try\"") >&5
19583   (eval $ac_try) 2>&5
19584   ac_status=$?
19585   echo "$as_me:19585: \$? = $ac_status" >&5
19586   (exit "$ac_status"); }; }; then
19587   ac_cv_func_regcomp=yes
19588 else
19589   echo "$as_me: failed program was:" >&5
19590 cat "conftest.$ac_ext" >&5
19591 ac_cv_func_regcomp=no
19592 fi
19593 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19594 fi
19595 echo "$as_me:19595: result: $ac_cv_func_regcomp" >&5
19596 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19597 if test "$ac_cv_func_regcomp" = yes; then
19598   cf_regex_func=regcomp
19599 else
19600
19601                 for cf_regex_lib in $cf_regex_libs
19602                 do
19603                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19604 echo "$as_me:19604: checking for regcomp in -l$cf_regex_lib" >&5
19605 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19606 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19607   echo $ECHO_N "(cached) $ECHO_C" >&6
19608 else
19609   ac_check_lib_save_LIBS=$LIBS
19610 LIBS="-l$cf_regex_lib  $LIBS"
19611 cat >"conftest.$ac_ext" <<_ACEOF
19612 #line 19612 "configure"
19613 #include "confdefs.h"
19614
19615 /* Override any gcc2 internal prototype to avoid an error.  */
19616 #ifdef __cplusplus
19617 extern "C"
19618 #endif
19619 /* We use char because int might match the return type of a gcc2
19620    builtin and then its argument prototype would still apply.  */
19621 char regcomp ();
19622 int
19623 main (void)
19624 {
19625 regcomp ();
19626   ;
19627   return 0;
19628 }
19629 _ACEOF
19630 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19631 if { (eval echo "$as_me:19631: \"$ac_link\"") >&5
19632   (eval $ac_link) 2>&5
19633   ac_status=$?
19634   echo "$as_me:19634: \$? = $ac_status" >&5
19635   (exit "$ac_status"); } &&
19636          { ac_try='test -s "conftest$ac_exeext"'
19637   { (eval echo "$as_me:19637: \"$ac_try\"") >&5
19638   (eval $ac_try) 2>&5
19639   ac_status=$?
19640   echo "$as_me:19640: \$? = $ac_status" >&5
19641   (exit "$ac_status"); }; }; then
19642   eval "$as_ac_Lib=yes"
19643 else
19644   echo "$as_me: failed program was:" >&5
19645 cat "conftest.$ac_ext" >&5
19646 eval "$as_ac_Lib=no"
19647 fi
19648 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19649 LIBS=$ac_check_lib_save_LIBS
19650 fi
19651 echo "$as_me:19651: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19652 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19653 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19654
19655 cf_add_libs="$LIBS"
19656 # reverse order
19657 cf_add_0lib=
19658 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19659 # filter duplicates
19660 for cf_add_1lib in $cf_add_0lib; do
19661         for cf_add_2lib in $cf_add_libs; do
19662                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19663                         cf_add_1lib=
19664                         break
19665                 fi
19666         done
19667         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19668 done
19669 LIBS="$cf_add_libs"
19670
19671                                         cf_regex_func=regcomp
19672                                         break
19673 fi
19674
19675                 done
19676
19677 fi
19678
19679         ;;
19680 esac
19681
19682 if test "$cf_regex_func" = no ; then
19683         echo "$as_me:19683: checking for compile" >&5
19684 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19685 if test "${ac_cv_func_compile+set}" = set; then
19686   echo $ECHO_N "(cached) $ECHO_C" >&6
19687 else
19688   cat >"conftest.$ac_ext" <<_ACEOF
19689 #line 19689 "configure"
19690 #include "confdefs.h"
19691 #define compile autoconf_temporary
19692 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19693 #undef compile
19694
19695 #ifdef __cplusplus
19696 extern "C"
19697 #endif
19698
19699 /* We use char because int might match the return type of a gcc2
19700    builtin and then its argument prototype would still apply.  */
19701 char compile (void);
19702
19703 int
19704 main (void)
19705 {
19706
19707 /* The GNU C library defines stubs for functions which it implements
19708     to always fail with ENOSYS.  Some functions are actually named
19709     something starting with __ and the normal name is an alias.  */
19710 #if defined (__stub_compile) || defined (__stub___compile)
19711 #error found stub for compile
19712 #endif
19713
19714         return compile ();
19715   ;
19716   return 0;
19717 }
19718 _ACEOF
19719 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19720 if { (eval echo "$as_me:19720: \"$ac_link\"") >&5
19721   (eval $ac_link) 2>&5
19722   ac_status=$?
19723   echo "$as_me:19723: \$? = $ac_status" >&5
19724   (exit "$ac_status"); } &&
19725          { ac_try='test -s "conftest$ac_exeext"'
19726   { (eval echo "$as_me:19726: \"$ac_try\"") >&5
19727   (eval $ac_try) 2>&5
19728   ac_status=$?
19729   echo "$as_me:19729: \$? = $ac_status" >&5
19730   (exit "$ac_status"); }; }; then
19731   ac_cv_func_compile=yes
19732 else
19733   echo "$as_me: failed program was:" >&5
19734 cat "conftest.$ac_ext" >&5
19735 ac_cv_func_compile=no
19736 fi
19737 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19738 fi
19739 echo "$as_me:19739: result: $ac_cv_func_compile" >&5
19740 echo "${ECHO_T}$ac_cv_func_compile" >&6
19741 if test "$ac_cv_func_compile" = yes; then
19742   cf_regex_func=compile
19743 else
19744
19745                 echo "$as_me:19745: checking for compile in -lgen" >&5
19746 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19747 if test "${ac_cv_lib_gen_compile+set}" = set; then
19748   echo $ECHO_N "(cached) $ECHO_C" >&6
19749 else
19750   ac_check_lib_save_LIBS=$LIBS
19751 LIBS="-lgen  $LIBS"
19752 cat >"conftest.$ac_ext" <<_ACEOF
19753 #line 19753 "configure"
19754 #include "confdefs.h"
19755
19756 /* Override any gcc2 internal prototype to avoid an error.  */
19757 #ifdef __cplusplus
19758 extern "C"
19759 #endif
19760 /* We use char because int might match the return type of a gcc2
19761    builtin and then its argument prototype would still apply.  */
19762 char compile ();
19763 int
19764 main (void)
19765 {
19766 compile ();
19767   ;
19768   return 0;
19769 }
19770 _ACEOF
19771 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19772 if { (eval echo "$as_me:19772: \"$ac_link\"") >&5
19773   (eval $ac_link) 2>&5
19774   ac_status=$?
19775   echo "$as_me:19775: \$? = $ac_status" >&5
19776   (exit "$ac_status"); } &&
19777          { ac_try='test -s "conftest$ac_exeext"'
19778   { (eval echo "$as_me:19778: \"$ac_try\"") >&5
19779   (eval $ac_try) 2>&5
19780   ac_status=$?
19781   echo "$as_me:19781: \$? = $ac_status" >&5
19782   (exit "$ac_status"); }; }; then
19783   ac_cv_lib_gen_compile=yes
19784 else
19785   echo "$as_me: failed program was:" >&5
19786 cat "conftest.$ac_ext" >&5
19787 ac_cv_lib_gen_compile=no
19788 fi
19789 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19790 LIBS=$ac_check_lib_save_LIBS
19791 fi
19792 echo "$as_me:19792: result: $ac_cv_lib_gen_compile" >&5
19793 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19794 if test "$ac_cv_lib_gen_compile" = yes; then
19795
19796 cf_add_libs="$LIBS"
19797 # reverse order
19798 cf_add_0lib=
19799 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19800 # filter duplicates
19801 for cf_add_1lib in $cf_add_0lib; do
19802         for cf_add_2lib in $cf_add_libs; do
19803                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19804                         cf_add_1lib=
19805                         break
19806                 fi
19807         done
19808         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19809 done
19810 LIBS="$cf_add_libs"
19811
19812                                 cf_regex_func=compile
19813 fi
19814
19815 fi
19816
19817 fi
19818
19819 if test "$cf_regex_func" = no ; then
19820         { echo "$as_me:19820: WARNING: cannot find regular expression library" >&5
19821 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19822 fi
19823
19824 echo "$as_me:19824: checking for regular-expression headers" >&5
19825 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19826 if test "${cf_cv_regex_hdrs+set}" = set; then
19827   echo $ECHO_N "(cached) $ECHO_C" >&6
19828 else
19829
19830 cf_cv_regex_hdrs=no
19831 case "$cf_regex_func" in
19832 (compile)
19833         for cf_regex_hdr in regexp.h regexpr.h
19834         do
19835                 cat >"conftest.$ac_ext" <<_ACEOF
19836 #line 19836 "configure"
19837 #include "confdefs.h"
19838 #include <$cf_regex_hdr>
19839 int
19840 main (void)
19841 {
19842
19843                         char *p = compile("", "", "", 0);
19844                         int x = step("", "");
19845                         (void)p;
19846                         (void)x;
19847
19848   ;
19849   return 0;
19850 }
19851 _ACEOF
19852 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19853 if { (eval echo "$as_me:19853: \"$ac_link\"") >&5
19854   (eval $ac_link) 2>&5
19855   ac_status=$?
19856   echo "$as_me:19856: \$? = $ac_status" >&5
19857   (exit "$ac_status"); } &&
19858          { ac_try='test -s "conftest$ac_exeext"'
19859   { (eval echo "$as_me:19859: \"$ac_try\"") >&5
19860   (eval $ac_try) 2>&5
19861   ac_status=$?
19862   echo "$as_me:19862: \$? = $ac_status" >&5
19863   (exit "$ac_status"); }; }; then
19864
19865                         cf_cv_regex_hdrs=$cf_regex_hdr
19866                         break
19867
19868 else
19869   echo "$as_me: failed program was:" >&5
19870 cat "conftest.$ac_ext" >&5
19871 fi
19872 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19873         done
19874         ;;
19875 (*)
19876         for cf_regex_hdr in regex.h
19877         do
19878                 cat >"conftest.$ac_ext" <<_ACEOF
19879 #line 19879 "configure"
19880 #include "confdefs.h"
19881 #include <sys/types.h>
19882 #include <$cf_regex_hdr>
19883 int
19884 main (void)
19885 {
19886
19887                         regex_t *p = 0;
19888                         int x = regcomp(p, "", 0);
19889                         int y = regexec(p, "", 0, 0, 0);
19890                         (void)x;
19891                         (void)y;
19892                         regfree(p);
19893
19894   ;
19895   return 0;
19896 }
19897 _ACEOF
19898 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19899 if { (eval echo "$as_me:19899: \"$ac_link\"") >&5
19900   (eval $ac_link) 2>&5
19901   ac_status=$?
19902   echo "$as_me:19902: \$? = $ac_status" >&5
19903   (exit "$ac_status"); } &&
19904          { ac_try='test -s "conftest$ac_exeext"'
19905   { (eval echo "$as_me:19905: \"$ac_try\"") >&5
19906   (eval $ac_try) 2>&5
19907   ac_status=$?
19908   echo "$as_me:19908: \$? = $ac_status" >&5
19909   (exit "$ac_status"); }; }; then
19910
19911                         cf_cv_regex_hdrs=$cf_regex_hdr
19912                         break
19913
19914 else
19915   echo "$as_me: failed program was:" >&5
19916 cat "conftest.$ac_ext" >&5
19917 fi
19918 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19919         done
19920         ;;
19921 esac
19922
19923 fi
19924 echo "$as_me:19924: result: $cf_cv_regex_hdrs" >&5
19925 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19926
19927 case "$cf_cv_regex_hdrs" in
19928         (no)            { echo "$as_me:19928: WARNING: no regular expression header found" >&5
19929 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19930         (regex.h)
19931 cat >>confdefs.h <<\EOF
19932 #define HAVE_REGEX_H_FUNCS 1
19933 EOF
19934  ;;
19935         (regexp.h)
19936 cat >>confdefs.h <<\EOF
19937 #define HAVE_REGEXP_H_FUNCS 1
19938 EOF
19939  ;;
19940         (regexpr.h)
19941 cat >>confdefs.h <<\EOF
19942 #define HAVE_REGEXPR_H_FUNCS 1
19943 EOF
19944  ;;
19945 esac
19946
19947 for ac_header in \
19948 fcntl.h \
19949 getopt.h \
19950 limits.h \
19951 locale.h \
19952 math.h \
19953 poll.h \
19954 sys/ioctl.h \
19955 sys/param.h \
19956 sys/poll.h \
19957 sys/select.h \
19958 sys/time.h \
19959 sys/times.h \
19960 ttyent.h \
19961 unistd.h \
19962 wctype.h \
19963
19964 do
19965 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19966 echo "$as_me:19966: checking for $ac_header" >&5
19967 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19968 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19969   echo $ECHO_N "(cached) $ECHO_C" >&6
19970 else
19971   cat >"conftest.$ac_ext" <<_ACEOF
19972 #line 19972 "configure"
19973 #include "confdefs.h"
19974 #include <$ac_header>
19975 _ACEOF
19976 if { (eval echo "$as_me:19976: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19977   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19978   ac_status=$?
19979   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19980   rm -f conftest.er1
19981   cat conftest.err >&5
19982   echo "$as_me:19982: \$? = $ac_status" >&5
19983   (exit "$ac_status"); } >/dev/null; then
19984   if test -s conftest.err; then
19985     ac_cpp_err=$ac_c_preproc_warn_flag
19986   else
19987     ac_cpp_err=
19988   fi
19989 else
19990   ac_cpp_err=yes
19991 fi
19992 if test -z "$ac_cpp_err"; then
19993   eval "$as_ac_Header=yes"
19994 else
19995   echo "$as_me: failed program was:" >&5
19996   cat "conftest.$ac_ext" >&5
19997   eval "$as_ac_Header=no"
19998 fi
19999 rm -f conftest.err "conftest.$ac_ext"
20000 fi
20001 echo "$as_me:20001: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20002 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20003 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20004   cat >>confdefs.h <<EOF
20005 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20006 EOF
20007
20008 fi
20009 done
20010
20011 for ac_header in unistd.h getopt.h
20012 do
20013 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20014 echo "$as_me:20014: checking for $ac_header" >&5
20015 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20016 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20017   echo $ECHO_N "(cached) $ECHO_C" >&6
20018 else
20019   cat >"conftest.$ac_ext" <<_ACEOF
20020 #line 20020 "configure"
20021 #include "confdefs.h"
20022 #include <$ac_header>
20023 _ACEOF
20024 if { (eval echo "$as_me:20024: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20025   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20026   ac_status=$?
20027   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20028   rm -f conftest.er1
20029   cat conftest.err >&5
20030   echo "$as_me:20030: \$? = $ac_status" >&5
20031   (exit "$ac_status"); } >/dev/null; then
20032   if test -s conftest.err; then
20033     ac_cpp_err=$ac_c_preproc_warn_flag
20034   else
20035     ac_cpp_err=
20036   fi
20037 else
20038   ac_cpp_err=yes
20039 fi
20040 if test -z "$ac_cpp_err"; then
20041   eval "$as_ac_Header=yes"
20042 else
20043   echo "$as_me: failed program was:" >&5
20044   cat "conftest.$ac_ext" >&5
20045   eval "$as_ac_Header=no"
20046 fi
20047 rm -f conftest.err "conftest.$ac_ext"
20048 fi
20049 echo "$as_me:20049: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20050 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20051 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20052   cat >>confdefs.h <<EOF
20053 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20054 EOF
20055
20056 fi
20057 done
20058
20059 echo "$as_me:20059: checking for header declaring getopt variables" >&5
20060 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20061 if test "${cf_cv_getopt_header+set}" = set; then
20062   echo $ECHO_N "(cached) $ECHO_C" >&6
20063 else
20064
20065 cf_cv_getopt_header=none
20066 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20067 do
20068 cat >"conftest.$ac_ext" <<_ACEOF
20069 #line 20069 "configure"
20070 #include "confdefs.h"
20071
20072 #include <$cf_header>
20073 int
20074 main (void)
20075 {
20076 int x = optind; char *y = optarg; (void)x; (void)y
20077   ;
20078   return 0;
20079 }
20080 _ACEOF
20081 rm -f "conftest.$ac_objext"
20082 if { (eval echo "$as_me:20082: \"$ac_compile\"") >&5
20083   (eval $ac_compile) 2>&5
20084   ac_status=$?
20085   echo "$as_me:20085: \$? = $ac_status" >&5
20086   (exit "$ac_status"); } &&
20087          { ac_try='test -s "conftest.$ac_objext"'
20088   { (eval echo "$as_me:20088: \"$ac_try\"") >&5
20089   (eval $ac_try) 2>&5
20090   ac_status=$?
20091   echo "$as_me:20091: \$? = $ac_status" >&5
20092   (exit "$ac_status"); }; }; then
20093   cf_cv_getopt_header=$cf_header
20094  break
20095 else
20096   echo "$as_me: failed program was:" >&5
20097 cat "conftest.$ac_ext" >&5
20098 fi
20099 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20100 done
20101
20102 fi
20103 echo "$as_me:20103: result: $cf_cv_getopt_header" >&5
20104 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20105 if test "$cf_cv_getopt_header" != none ; then
20106
20107 cat >>confdefs.h <<\EOF
20108 #define HAVE_GETOPT_HEADER 1
20109 EOF
20110
20111 fi
20112 if test "$cf_cv_getopt_header" = getopt.h ; then
20113
20114 cat >>confdefs.h <<\EOF
20115 #define NEED_GETOPT_H 1
20116 EOF
20117
20118 fi
20119
20120 echo "$as_me:20120: checking if external environ is declared" >&5
20121 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20122 if test "${cf_cv_dcl_environ+set}" = set; then
20123   echo $ECHO_N "(cached) $ECHO_C" >&6
20124 else
20125
20126     cat >"conftest.$ac_ext" <<_ACEOF
20127 #line 20127 "configure"
20128 #include "confdefs.h"
20129
20130 #ifdef HAVE_STDLIB_H
20131 #include <stdlib.h>
20132 #endif
20133 #include <unistd.h>
20134 int
20135 main (void)
20136 {
20137 int x = (int) environ
20138   ;
20139   return 0;
20140 }
20141 _ACEOF
20142 rm -f "conftest.$ac_objext"
20143 if { (eval echo "$as_me:20143: \"$ac_compile\"") >&5
20144   (eval $ac_compile) 2>&5
20145   ac_status=$?
20146   echo "$as_me:20146: \$? = $ac_status" >&5
20147   (exit "$ac_status"); } &&
20148          { ac_try='test -s "conftest.$ac_objext"'
20149   { (eval echo "$as_me:20149: \"$ac_try\"") >&5
20150   (eval $ac_try) 2>&5
20151   ac_status=$?
20152   echo "$as_me:20152: \$? = $ac_status" >&5
20153   (exit "$ac_status"); }; }; then
20154   cf_cv_dcl_environ=yes
20155 else
20156   echo "$as_me: failed program was:" >&5
20157 cat "conftest.$ac_ext" >&5
20158 cf_cv_dcl_environ=no
20159 fi
20160 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20161
20162 fi
20163 echo "$as_me:20163: result: $cf_cv_dcl_environ" >&5
20164 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20165
20166 if test "$cf_cv_dcl_environ" = no ; then
20167
20168 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20169
20170     cat >>confdefs.h <<EOF
20171 #define $cf_result 1
20172 EOF
20173
20174 fi
20175
20176 # It's possible (for near-UNIX clones) that the data doesn't exist
20177
20178 echo "$as_me:20178: checking if external environ exists" >&5
20179 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20180 if test "${cf_cv_have_environ+set}" = set; then
20181   echo $ECHO_N "(cached) $ECHO_C" >&6
20182 else
20183
20184         cat >"conftest.$ac_ext" <<_ACEOF
20185 #line 20185 "configure"
20186 #include "confdefs.h"
20187
20188 #undef environ
20189 extern int environ;
20190
20191 int
20192 main (void)
20193 {
20194 environ = 2
20195   ;
20196   return 0;
20197 }
20198 _ACEOF
20199 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20200 if { (eval echo "$as_me:20200: \"$ac_link\"") >&5
20201   (eval $ac_link) 2>&5
20202   ac_status=$?
20203   echo "$as_me:20203: \$? = $ac_status" >&5
20204   (exit "$ac_status"); } &&
20205          { ac_try='test -s "conftest$ac_exeext"'
20206   { (eval echo "$as_me:20206: \"$ac_try\"") >&5
20207   (eval $ac_try) 2>&5
20208   ac_status=$?
20209   echo "$as_me:20209: \$? = $ac_status" >&5
20210   (exit "$ac_status"); }; }; then
20211   cf_cv_have_environ=yes
20212 else
20213   echo "$as_me: failed program was:" >&5
20214 cat "conftest.$ac_ext" >&5
20215 cf_cv_have_environ=no
20216 fi
20217 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20218
20219 fi
20220 echo "$as_me:20220: result: $cf_cv_have_environ" >&5
20221 echo "${ECHO_T}$cf_cv_have_environ" >&6
20222
20223 if test "$cf_cv_have_environ" = yes ; then
20224
20225 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20226
20227         cat >>confdefs.h <<EOF
20228 #define $cf_result 1
20229 EOF
20230
20231 fi
20232
20233 echo "$as_me:20233: checking for getenv" >&5
20234 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20235 if test "${ac_cv_func_getenv+set}" = set; then
20236   echo $ECHO_N "(cached) $ECHO_C" >&6
20237 else
20238   cat >"conftest.$ac_ext" <<_ACEOF
20239 #line 20239 "configure"
20240 #include "confdefs.h"
20241 #define getenv autoconf_temporary
20242 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20243 #undef getenv
20244
20245 #ifdef __cplusplus
20246 extern "C"
20247 #endif
20248
20249 /* We use char because int might match the return type of a gcc2
20250    builtin and then its argument prototype would still apply.  */
20251 char getenv (void);
20252
20253 int
20254 main (void)
20255 {
20256
20257 /* The GNU C library defines stubs for functions which it implements
20258     to always fail with ENOSYS.  Some functions are actually named
20259     something starting with __ and the normal name is an alias.  */
20260 #if defined (__stub_getenv) || defined (__stub___getenv)
20261 #error found stub for getenv
20262 #endif
20263
20264         return getenv ();
20265   ;
20266   return 0;
20267 }
20268 _ACEOF
20269 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20270 if { (eval echo "$as_me:20270: \"$ac_link\"") >&5
20271   (eval $ac_link) 2>&5
20272   ac_status=$?
20273   echo "$as_me:20273: \$? = $ac_status" >&5
20274   (exit "$ac_status"); } &&
20275          { ac_try='test -s "conftest$ac_exeext"'
20276   { (eval echo "$as_me:20276: \"$ac_try\"") >&5
20277   (eval $ac_try) 2>&5
20278   ac_status=$?
20279   echo "$as_me:20279: \$? = $ac_status" >&5
20280   (exit "$ac_status"); }; }; then
20281   ac_cv_func_getenv=yes
20282 else
20283   echo "$as_me: failed program was:" >&5
20284 cat "conftest.$ac_ext" >&5
20285 ac_cv_func_getenv=no
20286 fi
20287 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20288 fi
20289 echo "$as_me:20289: result: $ac_cv_func_getenv" >&5
20290 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20291
20292 for ac_func in putenv setenv strdup
20293 do
20294 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20295 echo "$as_me:20295: checking for $ac_func" >&5
20296 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20297 if eval "test \"\${$as_ac_var+set}\" = set"; then
20298   echo $ECHO_N "(cached) $ECHO_C" >&6
20299 else
20300   cat >"conftest.$ac_ext" <<_ACEOF
20301 #line 20301 "configure"
20302 #include "confdefs.h"
20303 #define $ac_func autoconf_temporary
20304 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20305 #undef $ac_func
20306
20307 #ifdef __cplusplus
20308 extern "C"
20309 #endif
20310
20311 /* We use char because int might match the return type of a gcc2
20312    builtin and then its argument prototype would still apply.  */
20313 char $ac_func (void);
20314
20315 int
20316 main (void)
20317 {
20318
20319 /* The GNU C library defines stubs for functions which it implements
20320     to always fail with ENOSYS.  Some functions are actually named
20321     something starting with __ and the normal name is an alias.  */
20322 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20323 #error found stub for $ac_func
20324 #endif
20325
20326         return $ac_func ();
20327   ;
20328   return 0;
20329 }
20330 _ACEOF
20331 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20332 if { (eval echo "$as_me:20332: \"$ac_link\"") >&5
20333   (eval $ac_link) 2>&5
20334   ac_status=$?
20335   echo "$as_me:20335: \$? = $ac_status" >&5
20336   (exit "$ac_status"); } &&
20337          { ac_try='test -s "conftest$ac_exeext"'
20338   { (eval echo "$as_me:20338: \"$ac_try\"") >&5
20339   (eval $ac_try) 2>&5
20340   ac_status=$?
20341   echo "$as_me:20341: \$? = $ac_status" >&5
20342   (exit "$ac_status"); }; }; then
20343   eval "$as_ac_var=yes"
20344 else
20345   echo "$as_me: failed program was:" >&5
20346 cat "conftest.$ac_ext" >&5
20347 eval "$as_ac_var=no"
20348 fi
20349 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20350 fi
20351 echo "$as_me:20351: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20352 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20353 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20354   cat >>confdefs.h <<EOF
20355 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20356 EOF
20357
20358 fi
20359 done
20360
20361 echo "$as_me:20361: checking if getenv returns consistent values" >&5
20362 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20363 if test "${cf_cv_consistent_getenv+set}" = set; then
20364   echo $ECHO_N "(cached) $ECHO_C" >&6
20365 else
20366
20367 if test "$cross_compiling" = yes; then
20368   cf_cv_consistent_getenv=unknown
20369 else
20370   cat >"conftest.$ac_ext" <<_ACEOF
20371 #line 20371 "configure"
20372 #include "confdefs.h"
20373
20374 #include <stdlib.h>
20375 #include <unistd.h>
20376 #include <stdio.h>
20377 #include <string.h>
20378 #include <sys/types.h>
20379
20380 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20381 extern char **environ;  /* POSIX, but some systems are not... */
20382 #endif
20383
20384 #if defined(HAVE_STRDUP)
20385 #define str_alloc(s) strdup(s)
20386 #else
20387 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20388 #endif
20389
20390 static void set_value(const char *name, const char *value)
20391 {
20392 #if defined(HAVE_SETENV)
20393         setenv(name, value, 1);
20394 #elif defined(HAVE_PUTENV)
20395         char buffer[1024];
20396         sprintf(buffer, "%s=%s", name, value);
20397         putenv(str_alloc(buffer));
20398 #else
20399 #error neither putenv/setenv found
20400 #endif
20401 }
20402 int main(void)
20403 {
20404         int pass;
20405         size_t numenv, limit, j;
20406         char **mynames;
20407         char **myvalues;
20408         char **mypointer;
20409         char *equals;
20410         for (numenv = 0; environ[numenv]; ++numenv) ;
20411         limit = numenv + 10;
20412         mynames = (char **) calloc(limit + 1, sizeof(char *));
20413         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20414         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20415 #if defined(HAVE_ENVIRON)
20416         for (j = 0; environ[j]; ++j) {
20417                 mynames[j] = str_alloc(environ[j]);
20418                 equals = strchr(mynames[j], '=');
20419                 if (equals != 0) {
20420                         *equals++ = '\\0';
20421                         myvalues[j] = str_alloc(equals);
20422                 } else {
20423                         myvalues[j] = str_alloc("");
20424                 }
20425         }
20426 #endif
20427         for (j = numenv; j < limit; ++j) {
20428                 char name[80];
20429                 char value[80];
20430                 size_t found;
20431                 size_t k = 0;
20432                 do {
20433                         size_t jk;
20434                         found = 0;
20435                         sprintf(name, "TERM%lu", (unsigned long) k);
20436                         for (jk = 0; jk < j; ++jk) {
20437                                 if (!strcmp(name, mynames[jk])) {
20438                                         found = 1;
20439                                         ++k;
20440                                         break;
20441                                 }
20442                         }
20443                 } while (found);
20444                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20445                 set_value(name, value);
20446                 mynames[j] = str_alloc(name);
20447                 myvalues[j] = str_alloc(value);
20448         }
20449         for (pass = 0; pass < 3; ++pass) {
20450                 for (j = 0; j < limit; ++j) {
20451                         char *value = getenv(mynames[j]);
20452                         if (pass) {
20453                                 if (value == 0) {
20454                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20455                                         ${cf_cv_main_return:-return}(1);
20456                                 } else if (value != mypointer[j]) {
20457                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20458                                         ${cf_cv_main_return:-return}(1);
20459                                 } else if (strcmp(value, myvalues[j])) {
20460                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20461                                         ${cf_cv_main_return:-return}(1);
20462                                 }
20463                         } else {
20464                                 size_t k;
20465                                 mypointer[j] = value;
20466                                 for (k = 0; k < j; ++k) {
20467                                         if (mypointer[j] == mypointer[k]) {
20468                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20469                                                 ${cf_cv_main_return:-return}(1);
20470                                         }
20471                                 }
20472                         }
20473                 }
20474         }
20475         ${cf_cv_main_return:-return}(0);
20476 }
20477
20478 _ACEOF
20479 rm -f "conftest$ac_exeext"
20480 if { (eval echo "$as_me:20480: \"$ac_link\"") >&5
20481   (eval $ac_link) 2>&5
20482   ac_status=$?
20483   echo "$as_me:20483: \$? = $ac_status" >&5
20484   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20485   { (eval echo "$as_me:20485: \"$ac_try\"") >&5
20486   (eval $ac_try) 2>&5
20487   ac_status=$?
20488   echo "$as_me:20488: \$? = $ac_status" >&5
20489   (exit "$ac_status"); }; }; then
20490   cf_cv_consistent_getenv=yes
20491 else
20492   echo "$as_me: program exited with status $ac_status" >&5
20493 echo "$as_me: failed program was:" >&5
20494 cat "conftest.$ac_ext" >&5
20495 cf_cv_consistent_getenv=no
20496 fi
20497 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20498 fi
20499
20500 fi
20501 echo "$as_me:20501: result: $cf_cv_consistent_getenv" >&5
20502 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20503
20504 if test "x$cf_cv_consistent_getenv" = xno
20505 then
20506
20507 cat >>confdefs.h <<\EOF
20508 #define HAVE_CONSISTENT_GETENV 1
20509 EOF
20510
20511 fi
20512
20513 if test "x$cf_cv_consistent_getenv" = xno && \
20514         test "x$cf_with_trace" = xyes
20515 then
20516         { echo "$as_me:20516: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20517 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20518 fi
20519
20520 echo "$as_me:20520: checking if sys/time.h works with sys/select.h" >&5
20521 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20522 if test "${cf_cv_sys_time_select+set}" = set; then
20523   echo $ECHO_N "(cached) $ECHO_C" >&6
20524 else
20525
20526 cat >"conftest.$ac_ext" <<_ACEOF
20527 #line 20527 "configure"
20528 #include "confdefs.h"
20529
20530 #include <sys/types.h>
20531 #ifdef HAVE_SYS_TIME_H
20532 #include <sys/time.h>
20533 #endif
20534 #ifdef HAVE_SYS_SELECT_H
20535 #include <sys/select.h>
20536 #endif
20537
20538 int
20539 main (void)
20540 {
20541
20542   ;
20543   return 0;
20544 }
20545 _ACEOF
20546 rm -f "conftest.$ac_objext"
20547 if { (eval echo "$as_me:20547: \"$ac_compile\"") >&5
20548   (eval $ac_compile) 2>&5
20549   ac_status=$?
20550   echo "$as_me:20550: \$? = $ac_status" >&5
20551   (exit "$ac_status"); } &&
20552          { ac_try='test -s "conftest.$ac_objext"'
20553   { (eval echo "$as_me:20553: \"$ac_try\"") >&5
20554   (eval $ac_try) 2>&5
20555   ac_status=$?
20556   echo "$as_me:20556: \$? = $ac_status" >&5
20557   (exit "$ac_status"); }; }; then
20558   cf_cv_sys_time_select=yes
20559 else
20560   echo "$as_me: failed program was:" >&5
20561 cat "conftest.$ac_ext" >&5
20562 cf_cv_sys_time_select=no
20563 fi
20564 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20565
20566 fi
20567
20568 echo "$as_me:20568: result: $cf_cv_sys_time_select" >&5
20569 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20570 test "$cf_cv_sys_time_select" = yes &&
20571 cat >>confdefs.h <<\EOF
20572 #define HAVE_SYS_TIME_SELECT 1
20573 EOF
20574
20575 ###     checks for compiler characteristics
20576 ac_ext=c
20577 ac_cpp='$CPP $CPPFLAGS'
20578 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20579 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20580 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20581 ac_main_return="return"
20582
20583 echo "$as_me:20583: checking for an ANSI C-conforming const" >&5
20584 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20585 if test "${ac_cv_c_const+set}" = set; then
20586   echo $ECHO_N "(cached) $ECHO_C" >&6
20587 else
20588   cat >"conftest.$ac_ext" <<_ACEOF
20589 #line 20589 "configure"
20590 #include "confdefs.h"
20591
20592 int
20593 main (void)
20594 {
20595 /* FIXME: Include the comments suggested by Paul. */
20596 #ifndef __cplusplus
20597   /* Ultrix mips cc rejects this.  */
20598   typedef int charset[2];
20599   const charset x;
20600   /* SunOS 4.1.1 cc rejects this.  */
20601   char const *const *ccp;
20602   char **p;
20603   /* NEC SVR4.0.2 mips cc rejects this.  */
20604   struct point {int x, y;};
20605   static struct point const zero = {0,0};
20606   /* AIX XL C 1.02.0.0 rejects this.
20607      It does not let you subtract one const X* pointer from another in
20608      an arm of an if-expression whose if-part is not a constant
20609      expression */
20610   const char *g = "string";
20611   ccp = &g + (g ? g-g : 0);
20612   /* HPUX 7.0 cc rejects these. */
20613   ++ccp;
20614   p = (char**) ccp;
20615   ccp = (char const *const *) p;
20616   { /* SCO 3.2v4 cc rejects this.  */
20617     char *t;
20618     char const *s = 0 ? (char *) 0 : (char const *) 0;
20619
20620     *t++ = 0;
20621   }
20622   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20623     int x[] = {25, 17};
20624     const int *foo = &x[0];
20625     ++foo;
20626   }
20627   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20628     typedef const int *iptr;
20629     iptr p = 0;
20630     ++p;
20631   }
20632   { /* AIX XL C 1.02.0.0 rejects this saying
20633        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20634     struct s { int j; const int *ap[3]; };
20635     struct s *b; b->j = 5;
20636   }
20637   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20638     const int foo = 10;
20639   }
20640 #endif
20641
20642   ;
20643   return 0;
20644 }
20645 _ACEOF
20646 rm -f "conftest.$ac_objext"
20647 if { (eval echo "$as_me:20647: \"$ac_compile\"") >&5
20648   (eval $ac_compile) 2>&5
20649   ac_status=$?
20650   echo "$as_me:20650: \$? = $ac_status" >&5
20651   (exit "$ac_status"); } &&
20652          { ac_try='test -s "conftest.$ac_objext"'
20653   { (eval echo "$as_me:20653: \"$ac_try\"") >&5
20654   (eval $ac_try) 2>&5
20655   ac_status=$?
20656   echo "$as_me:20656: \$? = $ac_status" >&5
20657   (exit "$ac_status"); }; }; then
20658   ac_cv_c_const=yes
20659 else
20660   echo "$as_me: failed program was:" >&5
20661 cat "conftest.$ac_ext" >&5
20662 ac_cv_c_const=no
20663 fi
20664 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20665 fi
20666 echo "$as_me:20666: result: $ac_cv_c_const" >&5
20667 echo "${ECHO_T}$ac_cv_c_const" >&6
20668 if test $ac_cv_c_const = no; then
20669
20670 cat >>confdefs.h <<\EOF
20671 #define const
20672 EOF
20673
20674 fi
20675
20676 echo "$as_me:20676: checking for inline" >&5
20677 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20678 if test "${ac_cv_c_inline+set}" = set; then
20679   echo $ECHO_N "(cached) $ECHO_C" >&6
20680 else
20681   ac_cv_c_inline=no
20682 for ac_kw in inline __inline__ __inline; do
20683   cat >"conftest.$ac_ext" <<_ACEOF
20684 #line 20684 "configure"
20685 #include "confdefs.h"
20686 #ifndef __cplusplus
20687 static $ac_kw int static_foo () {return 0; }
20688 $ac_kw int foo () {return 0; }
20689 #endif
20690
20691 _ACEOF
20692 rm -f "conftest.$ac_objext"
20693 if { (eval echo "$as_me:20693: \"$ac_compile\"") >&5
20694   (eval $ac_compile) 2>&5
20695   ac_status=$?
20696   echo "$as_me:20696: \$? = $ac_status" >&5
20697   (exit "$ac_status"); } &&
20698          { ac_try='test -s "conftest.$ac_objext"'
20699   { (eval echo "$as_me:20699: \"$ac_try\"") >&5
20700   (eval $ac_try) 2>&5
20701   ac_status=$?
20702   echo "$as_me:20702: \$? = $ac_status" >&5
20703   (exit "$ac_status"); }; }; then
20704   ac_cv_c_inline=$ac_kw; break
20705 else
20706   echo "$as_me: failed program was:" >&5
20707 cat "conftest.$ac_ext" >&5
20708 fi
20709 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20710 done
20711
20712 fi
20713 echo "$as_me:20713: result: $ac_cv_c_inline" >&5
20714 echo "${ECHO_T}$ac_cv_c_inline" >&6
20715 case $ac_cv_c_inline in
20716   inline | yes) ;;
20717   no)
20718 cat >>confdefs.h <<\EOF
20719 #define inline
20720 EOF
20721  ;;
20722   *)  cat >>confdefs.h <<EOF
20723 #define inline $ac_cv_c_inline
20724 EOF
20725  ;;
20726 esac
20727
20728 NCURSES_INLINE=
20729 if test "$ac_cv_c_inline" != no ; then
20730         NCURSES_INLINE=inline
20731         if test "$INTEL_COMPILER" = yes
20732         then
20733                 :
20734         elif test "$CLANG_COMPILER" = yes
20735         then
20736                 :
20737         elif test "$GCC" = yes
20738         then
20739                 echo "$as_me:20739: checking if $CC supports options to tune inlining" >&5
20740 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20741 if test "${cf_cv_gcc_inline+set}" = set; then
20742   echo $ECHO_N "(cached) $ECHO_C" >&6
20743 else
20744
20745                 cf_save_CFLAGS=$CFLAGS
20746                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20747                 cat >"conftest.$ac_ext" <<_ACEOF
20748 #line 20748 "configure"
20749 #include "confdefs.h"
20750 inline int foo(void) { return 1; }
20751 int
20752 main (void)
20753 {
20754 ${cf_cv_main_return:-return} foo()
20755   ;
20756   return 0;
20757 }
20758 _ACEOF
20759 rm -f "conftest.$ac_objext"
20760 if { (eval echo "$as_me:20760: \"$ac_compile\"") >&5
20761   (eval $ac_compile) 2>&5
20762   ac_status=$?
20763   echo "$as_me:20763: \$? = $ac_status" >&5
20764   (exit "$ac_status"); } &&
20765          { ac_try='test -s "conftest.$ac_objext"'
20766   { (eval echo "$as_me:20766: \"$ac_try\"") >&5
20767   (eval $ac_try) 2>&5
20768   ac_status=$?
20769   echo "$as_me:20769: \$? = $ac_status" >&5
20770   (exit "$ac_status"); }; }; then
20771   cf_cv_gcc_inline=yes
20772 else
20773   echo "$as_me: failed program was:" >&5
20774 cat "conftest.$ac_ext" >&5
20775 cf_cv_gcc_inline=no
20776 fi
20777 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20778                 CFLAGS=$cf_save_CFLAGS
20779
20780 fi
20781 echo "$as_me:20781: result: $cf_cv_gcc_inline" >&5
20782 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20783                 if test "$cf_cv_gcc_inline" = yes ; then
20784
20785 cf_fix_cppflags=no
20786 cf_new_cflags=
20787 cf_new_cppflags=
20788 cf_new_extra_cppflags=
20789
20790 for cf_add_cflags in --param max-inline-insns-single=1200
20791 do
20792 case "$cf_fix_cppflags" in
20793 (no)
20794         case "$cf_add_cflags" in
20795         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20796                 case "$cf_add_cflags" in
20797                 (-D*)
20798                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20799
20800                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20801                                 && test -z "${cf_tst_cflags}" \
20802                                 && cf_fix_cppflags=yes
20803
20804                         if test "$cf_fix_cppflags" = yes ; then
20805
20806         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20807         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20808
20809                                 continue
20810                         elif test "${cf_tst_cflags}" = "\"'" ; then
20811
20812         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20813         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20814
20815                                 continue
20816                         fi
20817                         ;;
20818                 esac
20819                 case "$CPPFLAGS" in
20820                 (*$cf_add_cflags)
20821                         ;;
20822                 (*)
20823                         case "$cf_add_cflags" in
20824                         (-D*)
20825                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20826
20827 CPPFLAGS=`echo "$CPPFLAGS" | \
20828         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20829                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20830
20831                                 ;;
20832                         esac
20833
20834         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20835         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20836
20837                         ;;
20838                 esac
20839                 ;;
20840         (*)
20841
20842         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20843         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20844
20845                 ;;
20846         esac
20847         ;;
20848 (yes)
20849
20850         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20851         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20852
20853         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20854
20855         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20856                 && test -z "${cf_tst_cflags}" \
20857                 && cf_fix_cppflags=no
20858         ;;
20859 esac
20860 done
20861
20862 if test -n "$cf_new_cflags" ; then
20863
20864         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20865         CFLAGS="${CFLAGS}$cf_new_cflags"
20866
20867 fi
20868
20869 if test -n "$cf_new_cppflags" ; then
20870
20871         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20872         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20873
20874 fi
20875
20876 if test -n "$cf_new_extra_cppflags" ; then
20877
20878         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20879         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20880
20881 fi
20882
20883                 fi
20884         fi
20885 fi
20886
20887 echo "$as_me:20887: checking for signal global datatype" >&5
20888 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20889 if test "${cf_cv_sig_atomic_t+set}" = set; then
20890   echo $ECHO_N "(cached) $ECHO_C" >&6
20891 else
20892
20893         for cf_type in \
20894                 "volatile sig_atomic_t" \
20895                 "sig_atomic_t" \
20896                 "int"
20897         do
20898         cat >"conftest.$ac_ext" <<_ACEOF
20899 #line 20899 "configure"
20900 #include "confdefs.h"
20901
20902 #include <sys/types.h>
20903 #include <signal.h>
20904 #include <stdio.h>
20905
20906 extern $cf_type x;
20907 $cf_type x;
20908 static void handler(int sig)
20909 {
20910         (void)sig;
20911         x = 5;
20912 }
20913 int
20914 main (void)
20915 {
20916 signal(SIGINT, handler);
20917                  x = 1
20918   ;
20919   return 0;
20920 }
20921 _ACEOF
20922 rm -f "conftest.$ac_objext"
20923 if { (eval echo "$as_me:20923: \"$ac_compile\"") >&5
20924   (eval $ac_compile) 2>&5
20925   ac_status=$?
20926   echo "$as_me:20926: \$? = $ac_status" >&5
20927   (exit "$ac_status"); } &&
20928          { ac_try='test -s "conftest.$ac_objext"'
20929   { (eval echo "$as_me:20929: \"$ac_try\"") >&5
20930   (eval $ac_try) 2>&5
20931   ac_status=$?
20932   echo "$as_me:20932: \$? = $ac_status" >&5
20933   (exit "$ac_status"); }; }; then
20934   cf_cv_sig_atomic_t=$cf_type
20935 else
20936   echo "$as_me: failed program was:" >&5
20937 cat "conftest.$ac_ext" >&5
20938 cf_cv_sig_atomic_t=no
20939 fi
20940 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20941                 test "$cf_cv_sig_atomic_t" != no && break
20942         done
20943
20944 fi
20945
20946 echo "$as_me:20946: result: $cf_cv_sig_atomic_t" >&5
20947 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
20948 test "$cf_cv_sig_atomic_t" != no &&
20949 cat >>confdefs.h <<EOF
20950 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
20951 EOF
20952
20953 if test "$NCURSES_CHTYPE" = auto ; then
20954
20955 echo "$as_me:20955: checking for type of chtype" >&5
20956 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
20957 if test "${cf_cv_typeof_chtype+set}" = set; then
20958   echo $ECHO_N "(cached) $ECHO_C" >&6
20959 else
20960
20961                 if test "$cross_compiling" = yes; then
20962   cf_cv_typeof_chtype=long
20963 else
20964   cat >"conftest.$ac_ext" <<_ACEOF
20965 #line 20965 "configure"
20966 #include "confdefs.h"
20967
20968 #define WANT_BITS 31
20969 #include <stdio.h>
20970 int main(void)
20971 {
20972         FILE *fp = fopen("cf_test.out", "w");
20973         if (fp != 0) {
20974                 char *result = "long";
20975                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
20976                         int n;
20977                         unsigned int x, y;
20978                         for (n = 0; n < WANT_BITS; n++) {
20979                                 x = (1 << n);
20980                                 y = (x >> n);
20981                                 if (y != 1 || x == 0) {
20982                                         x = 0;
20983                                         break;
20984                                 }
20985                         }
20986                         /*
20987                          * If x is nonzero, an int is big enough for the bits
20988                          * that we want.
20989                          */
20990                         result = (x != 0) ? "int" : "long";
20991                 }
20992                 fputs(result, fp);
20993                 fclose(fp);
20994         }
20995         ${cf_cv_main_return:-return}(0);
20996 }
20997
20998 _ACEOF
20999 rm -f "conftest$ac_exeext"
21000 if { (eval echo "$as_me:21000: \"$ac_link\"") >&5
21001   (eval $ac_link) 2>&5
21002   ac_status=$?
21003   echo "$as_me:21003: \$? = $ac_status" >&5
21004   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21005   { (eval echo "$as_me:21005: \"$ac_try\"") >&5
21006   (eval $ac_try) 2>&5
21007   ac_status=$?
21008   echo "$as_me:21008: \$? = $ac_status" >&5
21009   (exit "$ac_status"); }; }; then
21010   cf_cv_typeof_chtype=`cat cf_test.out`
21011 else
21012   echo "$as_me: program exited with status $ac_status" >&5
21013 echo "$as_me: failed program was:" >&5
21014 cat "conftest.$ac_ext" >&5
21015 cf_cv_typeof_chtype=long
21016 fi
21017 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21018 fi
21019                 rm -f cf_test.out
21020
21021 fi
21022
21023 echo "$as_me:21023: result: $cf_cv_typeof_chtype" >&5
21024 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21025
21026 cat >>confdefs.h <<EOF
21027 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21028 EOF
21029
21030 else
21031         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21032 fi
21033 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21034
21035 echo "$as_me:21035: checking if unsigned literals are legal" >&5
21036 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21037 if test "${cf_cv_unsigned_literals+set}" = set; then
21038   echo $ECHO_N "(cached) $ECHO_C" >&6
21039 else
21040
21041         cat >"conftest.$ac_ext" <<_ACEOF
21042 #line 21042 "configure"
21043 #include "confdefs.h"
21044
21045 int
21046 main (void)
21047 {
21048 long x = 1L + 1UL + 1U + 1
21049   ;
21050   return 0;
21051 }
21052 _ACEOF
21053 rm -f "conftest.$ac_objext"
21054 if { (eval echo "$as_me:21054: \"$ac_compile\"") >&5
21055   (eval $ac_compile) 2>&5
21056   ac_status=$?
21057   echo "$as_me:21057: \$? = $ac_status" >&5
21058   (exit "$ac_status"); } &&
21059          { ac_try='test -s "conftest.$ac_objext"'
21060   { (eval echo "$as_me:21060: \"$ac_try\"") >&5
21061   (eval $ac_try) 2>&5
21062   ac_status=$?
21063   echo "$as_me:21063: \$? = $ac_status" >&5
21064   (exit "$ac_status"); }; }; then
21065   cf_cv_unsigned_literals=yes
21066 else
21067   echo "$as_me: failed program was:" >&5
21068 cat "conftest.$ac_ext" >&5
21069 cf_cv_unsigned_literals=no
21070 fi
21071 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21072
21073 fi
21074
21075 echo "$as_me:21075: result: $cf_cv_unsigned_literals" >&5
21076 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21077
21078 cf_cv_1UL="1"
21079 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21080 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21081
21082 if test "$NCURSES_MMASK_T" = auto ; then
21083         cf_cv_typeof_mmask_t=long
21084 else
21085         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21086 fi
21087 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21088
21089 ###     Checks for external-data
21090
21091 echo "$as_me:21091: checking if external errno is declared" >&5
21092 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21093 if test "${cf_cv_dcl_errno+set}" = set; then
21094   echo $ECHO_N "(cached) $ECHO_C" >&6
21095 else
21096
21097         cat >"conftest.$ac_ext" <<_ACEOF
21098 #line 21098 "configure"
21099 #include "confdefs.h"
21100
21101 #ifdef HAVE_STDLIB_H
21102 #include <stdlib.h>
21103 #endif
21104 #include <stdio.h>
21105 #include <sys/types.h>
21106 #include <errno.h>
21107 int
21108 main (void)
21109 {
21110 int x = (int) errno; (void)x
21111   ;
21112   return 0;
21113 }
21114 _ACEOF
21115 rm -f "conftest.$ac_objext"
21116 if { (eval echo "$as_me:21116: \"$ac_compile\"") >&5
21117   (eval $ac_compile) 2>&5
21118   ac_status=$?
21119   echo "$as_me:21119: \$? = $ac_status" >&5
21120   (exit "$ac_status"); } &&
21121          { ac_try='test -s "conftest.$ac_objext"'
21122   { (eval echo "$as_me:21122: \"$ac_try\"") >&5
21123   (eval $ac_try) 2>&5
21124   ac_status=$?
21125   echo "$as_me:21125: \$? = $ac_status" >&5
21126   (exit "$ac_status"); }; }; then
21127   cf_cv_dcl_errno=yes
21128 else
21129   echo "$as_me: failed program was:" >&5
21130 cat "conftest.$ac_ext" >&5
21131 cf_cv_dcl_errno=no
21132 fi
21133 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21134
21135 fi
21136 echo "$as_me:21136: result: $cf_cv_dcl_errno" >&5
21137 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21138
21139 if test "$cf_cv_dcl_errno" = no ; then
21140
21141 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21142
21143         cat >>confdefs.h <<EOF
21144 #define $cf_result 1
21145 EOF
21146
21147 fi
21148
21149 # It's possible (for near-UNIX clones) that the data doesn't exist
21150
21151 echo "$as_me:21151: checking if external errno exists" >&5
21152 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21153 if test "${cf_cv_have_errno+set}" = set; then
21154   echo $ECHO_N "(cached) $ECHO_C" >&6
21155 else
21156
21157         cat >"conftest.$ac_ext" <<_ACEOF
21158 #line 21158 "configure"
21159 #include "confdefs.h"
21160
21161 #undef errno
21162 extern int errno;
21163
21164 int
21165 main (void)
21166 {
21167 errno = 2
21168   ;
21169   return 0;
21170 }
21171 _ACEOF
21172 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21173 if { (eval echo "$as_me:21173: \"$ac_link\"") >&5
21174   (eval $ac_link) 2>&5
21175   ac_status=$?
21176   echo "$as_me:21176: \$? = $ac_status" >&5
21177   (exit "$ac_status"); } &&
21178          { ac_try='test -s "conftest$ac_exeext"'
21179   { (eval echo "$as_me:21179: \"$ac_try\"") >&5
21180   (eval $ac_try) 2>&5
21181   ac_status=$?
21182   echo "$as_me:21182: \$? = $ac_status" >&5
21183   (exit "$ac_status"); }; }; then
21184   cf_cv_have_errno=yes
21185 else
21186   echo "$as_me: failed program was:" >&5
21187 cat "conftest.$ac_ext" >&5
21188 cf_cv_have_errno=no
21189 fi
21190 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21191
21192 fi
21193 echo "$as_me:21193: result: $cf_cv_have_errno" >&5
21194 echo "${ECHO_T}$cf_cv_have_errno" >&6
21195
21196 if test "$cf_cv_have_errno" = yes ; then
21197
21198 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21199
21200         cat >>confdefs.h <<EOF
21201 #define $cf_result 1
21202 EOF
21203
21204 fi
21205
21206 echo "$as_me:21206: checking if data-only library module links" >&5
21207 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21208 if test "${cf_cv_link_dataonly+set}" = set; then
21209   echo $ECHO_N "(cached) $ECHO_C" >&6
21210 else
21211
21212         rm -f conftest.a
21213         cat >conftest.$ac_ext <<EOF
21214 #line 21214 "configure"
21215 int     testdata[3] = { 123, 456, 789 };
21216 EOF
21217         if { (eval echo "$as_me:21217: \"$ac_compile\"") >&5
21218   (eval $ac_compile) 2>&5
21219   ac_status=$?
21220   echo "$as_me:21220: \$? = $ac_status" >&5
21221   (exit "$ac_status"); } ; then
21222                 mv conftest.o data.o && \
21223                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21224         fi
21225         rm -f conftest.$ac_ext data.o
21226         cat >conftest.$ac_ext <<EOF
21227 #line 21227 "configure"
21228 int     testfunc(void)
21229 {
21230 #if defined(NeXT)
21231         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21232 #else
21233         extern int testdata[3];
21234         return testdata[0] == 123
21235            &&  testdata[1] == 456
21236            &&  testdata[2] == 789;
21237 #endif
21238 }
21239 EOF
21240         if { (eval echo "$as_me:21240: \"$ac_compile\"") >&5
21241   (eval $ac_compile) 2>&5
21242   ac_status=$?
21243   echo "$as_me:21243: \$? = $ac_status" >&5
21244   (exit "$ac_status"); }; then
21245                 mv conftest.o func.o && \
21246                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21247         fi
21248         rm -f conftest.$ac_ext func.o
21249         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21250         cf_saveLIBS="$LIBS"
21251         LIBS="conftest.a $LIBS"
21252         if test "$cross_compiling" = yes; then
21253   cf_cv_link_dataonly=unknown
21254 else
21255   cat >"conftest.$ac_ext" <<_ACEOF
21256 #line 21256 "configure"
21257 #include "confdefs.h"
21258
21259         int main(void)
21260         {
21261                 extern int testfunc();
21262                 ${cf_cv_main_return:-return} (!testfunc());
21263         }
21264
21265 _ACEOF
21266 rm -f "conftest$ac_exeext"
21267 if { (eval echo "$as_me:21267: \"$ac_link\"") >&5
21268   (eval $ac_link) 2>&5
21269   ac_status=$?
21270   echo "$as_me:21270: \$? = $ac_status" >&5
21271   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21272   { (eval echo "$as_me:21272: \"$ac_try\"") >&5
21273   (eval $ac_try) 2>&5
21274   ac_status=$?
21275   echo "$as_me:21275: \$? = $ac_status" >&5
21276   (exit "$ac_status"); }; }; then
21277   cf_cv_link_dataonly=yes
21278 else
21279   echo "$as_me: program exited with status $ac_status" >&5
21280 echo "$as_me: failed program was:" >&5
21281 cat "conftest.$ac_ext" >&5
21282 cf_cv_link_dataonly=no
21283 fi
21284 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21285 fi
21286         LIBS="$cf_saveLIBS"
21287
21288 fi
21289
21290 echo "$as_me:21290: result: $cf_cv_link_dataonly" >&5
21291 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21292
21293 if test "$cf_cv_link_dataonly" = no ; then
21294
21295 cat >>confdefs.h <<\EOF
21296 #define BROKEN_LINKER 1
21297 EOF
21298
21299         BROKEN_LINKER=1
21300 fi
21301
21302 ###     Checks for library functions.
21303
21304 for ac_func in \
21305 getcwd \
21306 getegid \
21307 geteuid \
21308 getopt \
21309 getttynam \
21310 issetugid \
21311 localeconv \
21312 poll \
21313 putenv \
21314 remove \
21315 select \
21316 setbuf \
21317 setbuffer \
21318 setenv \
21319 setfsuid \
21320 setvbuf \
21321 sigaction \
21322 sigvec \
21323 snprintf \
21324 strdup \
21325 strstr \
21326 sysconf \
21327 tcgetpgrp \
21328 times \
21329 tsearch \
21330 vsnprintf \
21331
21332 do
21333 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21334 echo "$as_me:21334: checking for $ac_func" >&5
21335 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21336 if eval "test \"\${$as_ac_var+set}\" = set"; then
21337   echo $ECHO_N "(cached) $ECHO_C" >&6
21338 else
21339   cat >"conftest.$ac_ext" <<_ACEOF
21340 #line 21340 "configure"
21341 #include "confdefs.h"
21342 #define $ac_func autoconf_temporary
21343 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21344 #undef $ac_func
21345
21346 #ifdef __cplusplus
21347 extern "C"
21348 #endif
21349
21350 /* We use char because int might match the return type of a gcc2
21351    builtin and then its argument prototype would still apply.  */
21352 char $ac_func (void);
21353
21354 int
21355 main (void)
21356 {
21357
21358 /* The GNU C library defines stubs for functions which it implements
21359     to always fail with ENOSYS.  Some functions are actually named
21360     something starting with __ and the normal name is an alias.  */
21361 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21362 #error found stub for $ac_func
21363 #endif
21364
21365         return $ac_func ();
21366   ;
21367   return 0;
21368 }
21369 _ACEOF
21370 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21371 if { (eval echo "$as_me:21371: \"$ac_link\"") >&5
21372   (eval $ac_link) 2>&5
21373   ac_status=$?
21374   echo "$as_me:21374: \$? = $ac_status" >&5
21375   (exit "$ac_status"); } &&
21376          { ac_try='test -s "conftest$ac_exeext"'
21377   { (eval echo "$as_me:21377: \"$ac_try\"") >&5
21378   (eval $ac_try) 2>&5
21379   ac_status=$?
21380   echo "$as_me:21380: \$? = $ac_status" >&5
21381   (exit "$ac_status"); }; }; then
21382   eval "$as_ac_var=yes"
21383 else
21384   echo "$as_me: failed program was:" >&5
21385 cat "conftest.$ac_ext" >&5
21386 eval "$as_ac_var=no"
21387 fi
21388 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21389 fi
21390 echo "$as_me:21390: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21391 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21392 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21393   cat >>confdefs.h <<EOF
21394 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21395 EOF
21396
21397 fi
21398 done
21399
21400 if test "x$ac_cv_func_getopt" = xno && \
21401    test "x$cf_with_progs$cf_with_tests" != xnono; then
21402         { { echo "$as_me:21402: error: getopt is required for building programs" >&5
21403 echo "$as_me: error: getopt is required for building programs" >&2;}
21404    { (exit 1); exit 1; }; }
21405 fi
21406
21407 if test "x$with_safe_sprintf" = xyes
21408 then
21409         if test "x$ac_cv_func_vsnprintf" = xyes
21410         then
21411                 { echo "$as_me:21411: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21412 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21413         else
21414
21415 cat >>confdefs.h <<\EOF
21416 #define USE_SAFE_SPRINTF 1
21417 EOF
21418
21419         fi
21420 fi
21421
21422 if test "x$with_getcap" = "xyes" ; then
21423
21424 echo "$as_me:21424: checking for terminal-capability database functions" >&5
21425 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21426 if test "${cf_cv_cgetent+set}" = set; then
21427   echo $ECHO_N "(cached) $ECHO_C" >&6
21428 else
21429
21430 cat >"conftest.$ac_ext" <<_ACEOF
21431 #line 21431 "configure"
21432 #include "confdefs.h"
21433
21434 #include <stdlib.h>
21435 int
21436 main (void)
21437 {
21438
21439         char temp[128];
21440         char *buf = temp;
21441         char *db_array = temp;
21442         cgetent(&buf, &db_array, "vt100");
21443         cgetcap(buf, "tc", '=');
21444         cgetmatch(buf, "tc");
21445
21446   ;
21447   return 0;
21448 }
21449 _ACEOF
21450 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21451 if { (eval echo "$as_me:21451: \"$ac_link\"") >&5
21452   (eval $ac_link) 2>&5
21453   ac_status=$?
21454   echo "$as_me:21454: \$? = $ac_status" >&5
21455   (exit "$ac_status"); } &&
21456          { ac_try='test -s "conftest$ac_exeext"'
21457   { (eval echo "$as_me:21457: \"$ac_try\"") >&5
21458   (eval $ac_try) 2>&5
21459   ac_status=$?
21460   echo "$as_me:21460: \$? = $ac_status" >&5
21461   (exit "$ac_status"); }; }; then
21462   cf_cv_cgetent=yes
21463 else
21464   echo "$as_me: failed program was:" >&5
21465 cat "conftest.$ac_ext" >&5
21466 cf_cv_cgetent=no
21467 fi
21468 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21469
21470 fi
21471 echo "$as_me:21471: result: $cf_cv_cgetent" >&5
21472 echo "${ECHO_T}$cf_cv_cgetent" >&6
21473
21474 if test "$cf_cv_cgetent" = yes
21475 then
21476
21477 cat >>confdefs.h <<\EOF
21478 #define HAVE_BSD_CGETENT 1
21479 EOF
21480
21481 echo "$as_me:21481: checking if cgetent uses const parameter" >&5
21482 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21483 if test "${cf_cv_cgetent_const+set}" = set; then
21484   echo $ECHO_N "(cached) $ECHO_C" >&6
21485 else
21486
21487 cat >"conftest.$ac_ext" <<_ACEOF
21488 #line 21488 "configure"
21489 #include "confdefs.h"
21490
21491 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21492 #include <stdlib.h>
21493 int
21494 main (void)
21495 {
21496
21497         char temp[128];
21498         char *buf = temp;
21499 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21500         const char *db_array = temp;
21501         cgetent(&buf, &db_array, "vt100");
21502 #endif
21503         cgetcap(buf, "tc", '=');
21504         cgetmatch(buf, "tc");
21505
21506   ;
21507   return 0;
21508 }
21509 _ACEOF
21510 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21511 if { (eval echo "$as_me:21511: \"$ac_link\"") >&5
21512   (eval $ac_link) 2>&5
21513   ac_status=$?
21514   echo "$as_me:21514: \$? = $ac_status" >&5
21515   (exit "$ac_status"); } &&
21516          { ac_try='test -s "conftest$ac_exeext"'
21517   { (eval echo "$as_me:21517: \"$ac_try\"") >&5
21518   (eval $ac_try) 2>&5
21519   ac_status=$?
21520   echo "$as_me:21520: \$? = $ac_status" >&5
21521   (exit "$ac_status"); }; }; then
21522   cf_cv_cgetent_const=yes
21523 else
21524   echo "$as_me: failed program was:" >&5
21525 cat "conftest.$ac_ext" >&5
21526 cf_cv_cgetent_const=no
21527 fi
21528 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21529
21530 fi
21531 echo "$as_me:21531: result: $cf_cv_cgetent_const" >&5
21532 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21533         if test "$cf_cv_cgetent_const" = yes
21534         then
21535
21536 cat >>confdefs.h <<EOF
21537 #define CGETENT_CONST const
21538 EOF
21539
21540         fi
21541 fi
21542
21543 fi
21544
21545 echo "$as_me:21545: checking for isascii" >&5
21546 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21547 if test "${cf_cv_have_isascii+set}" = set; then
21548   echo $ECHO_N "(cached) $ECHO_C" >&6
21549 else
21550
21551         cat >"conftest.$ac_ext" <<_ACEOF
21552 #line 21552 "configure"
21553 #include "confdefs.h"
21554 #include <ctype.h>
21555 int
21556 main (void)
21557 {
21558 int x = isascii(' ')
21559   ;
21560   return 0;
21561 }
21562 _ACEOF
21563 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21564 if { (eval echo "$as_me:21564: \"$ac_link\"") >&5
21565   (eval $ac_link) 2>&5
21566   ac_status=$?
21567   echo "$as_me:21567: \$? = $ac_status" >&5
21568   (exit "$ac_status"); } &&
21569          { ac_try='test -s "conftest$ac_exeext"'
21570   { (eval echo "$as_me:21570: \"$ac_try\"") >&5
21571   (eval $ac_try) 2>&5
21572   ac_status=$?
21573   echo "$as_me:21573: \$? = $ac_status" >&5
21574   (exit "$ac_status"); }; }; then
21575   cf_cv_have_isascii=yes
21576 else
21577   echo "$as_me: failed program was:" >&5
21578 cat "conftest.$ac_ext" >&5
21579 cf_cv_have_isascii=no
21580 fi
21581 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21582
21583 fi
21584 echo "$as_me:21584: result: $cf_cv_have_isascii" >&5
21585 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21586 test "$cf_cv_have_isascii" = yes &&
21587 cat >>confdefs.h <<\EOF
21588 #define HAVE_ISASCII 1
21589 EOF
21590
21591 if test "$ac_cv_func_sigaction" = yes; then
21592 echo "$as_me:21592: checking whether sigaction needs _POSIX_SOURCE" >&5
21593 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21594 cat >"conftest.$ac_ext" <<_ACEOF
21595 #line 21595 "configure"
21596 #include "confdefs.h"
21597
21598 #include <sys/types.h>
21599 #include <signal.h>
21600 int
21601 main (void)
21602 {
21603 struct sigaction act
21604   ;
21605   return 0;
21606 }
21607 _ACEOF
21608 rm -f "conftest.$ac_objext"
21609 if { (eval echo "$as_me:21609: \"$ac_compile\"") >&5
21610   (eval $ac_compile) 2>&5
21611   ac_status=$?
21612   echo "$as_me:21612: \$? = $ac_status" >&5
21613   (exit "$ac_status"); } &&
21614          { ac_try='test -s "conftest.$ac_objext"'
21615   { (eval echo "$as_me:21615: \"$ac_try\"") >&5
21616   (eval $ac_try) 2>&5
21617   ac_status=$?
21618   echo "$as_me:21618: \$? = $ac_status" >&5
21619   (exit "$ac_status"); }; }; then
21620   sigact_bad=no
21621 else
21622   echo "$as_me: failed program was:" >&5
21623 cat "conftest.$ac_ext" >&5
21624
21625 cat >"conftest.$ac_ext" <<_ACEOF
21626 #line 21626 "configure"
21627 #include "confdefs.h"
21628
21629 #define _POSIX_SOURCE
21630 #include <sys/types.h>
21631 #include <signal.h>
21632 int
21633 main (void)
21634 {
21635 struct sigaction act
21636   ;
21637   return 0;
21638 }
21639 _ACEOF
21640 rm -f "conftest.$ac_objext"
21641 if { (eval echo "$as_me:21641: \"$ac_compile\"") >&5
21642   (eval $ac_compile) 2>&5
21643   ac_status=$?
21644   echo "$as_me:21644: \$? = $ac_status" >&5
21645   (exit "$ac_status"); } &&
21646          { ac_try='test -s "conftest.$ac_objext"'
21647   { (eval echo "$as_me:21647: \"$ac_try\"") >&5
21648   (eval $ac_try) 2>&5
21649   ac_status=$?
21650   echo "$as_me:21650: \$? = $ac_status" >&5
21651   (exit "$ac_status"); }; }; then
21652   sigact_bad=yes
21653
21654 cat >>confdefs.h <<\EOF
21655 #define _POSIX_SOURCE 1
21656 EOF
21657
21658 else
21659   echo "$as_me: failed program was:" >&5
21660 cat "conftest.$ac_ext" >&5
21661 sigact_bad=unknown
21662 fi
21663 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21664 fi
21665 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21666 echo "$as_me:21666: result: $sigact_bad" >&5
21667 echo "${ECHO_T}$sigact_bad" >&6
21668 fi
21669
21670 echo "$as_me:21670: checking if nanosleep really works" >&5
21671 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21672 if test "${cf_cv_func_nanosleep+set}" = set; then
21673   echo $ECHO_N "(cached) $ECHO_C" >&6
21674 else
21675
21676 if test "$cross_compiling" = yes; then
21677   cf_cv_func_nanosleep=unknown
21678 else
21679   cat >"conftest.$ac_ext" <<_ACEOF
21680 #line 21680 "configure"
21681 #include "confdefs.h"
21682
21683 #include <stdio.h>
21684 #include <errno.h>
21685 #include <time.h>
21686
21687 #ifdef HAVE_SYS_TIME_H
21688 #include <sys/time.h>
21689 #endif
21690
21691 int main(void) {
21692         struct timespec ts1, ts2;
21693         int code;
21694         ts1.tv_sec  = 0;
21695         ts1.tv_nsec = 750000000;
21696         ts2.tv_sec  = 0;
21697         ts2.tv_nsec = 0;
21698         errno = 0;
21699         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21700         ${cf_cv_main_return:-return}(code != 0);
21701 }
21702
21703 _ACEOF
21704 rm -f "conftest$ac_exeext"
21705 if { (eval echo "$as_me:21705: \"$ac_link\"") >&5
21706   (eval $ac_link) 2>&5
21707   ac_status=$?
21708   echo "$as_me:21708: \$? = $ac_status" >&5
21709   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21710   { (eval echo "$as_me:21710: \"$ac_try\"") >&5
21711   (eval $ac_try) 2>&5
21712   ac_status=$?
21713   echo "$as_me:21713: \$? = $ac_status" >&5
21714   (exit "$ac_status"); }; }; then
21715   cf_cv_func_nanosleep=yes
21716 else
21717   echo "$as_me: program exited with status $ac_status" >&5
21718 echo "$as_me: failed program was:" >&5
21719 cat "conftest.$ac_ext" >&5
21720 cf_cv_func_nanosleep=no
21721 fi
21722 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21723 fi
21724 fi
21725 echo "$as_me:21725: result: $cf_cv_func_nanosleep" >&5
21726 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21727
21728 test "$cf_cv_func_nanosleep" = "yes" &&
21729 cat >>confdefs.h <<\EOF
21730 #define HAVE_NANOSLEEP 1
21731 EOF
21732
21733 for ac_header in \
21734 termio.h \
21735 termios.h \
21736 unistd.h \
21737 sys/ioctl.h \
21738 sys/termio.h \
21739
21740 do
21741 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21742 echo "$as_me:21742: checking for $ac_header" >&5
21743 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21744 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21745   echo $ECHO_N "(cached) $ECHO_C" >&6
21746 else
21747   cat >"conftest.$ac_ext" <<_ACEOF
21748 #line 21748 "configure"
21749 #include "confdefs.h"
21750 #include <$ac_header>
21751 _ACEOF
21752 if { (eval echo "$as_me:21752: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21753   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21754   ac_status=$?
21755   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21756   rm -f conftest.er1
21757   cat conftest.err >&5
21758   echo "$as_me:21758: \$? = $ac_status" >&5
21759   (exit "$ac_status"); } >/dev/null; then
21760   if test -s conftest.err; then
21761     ac_cpp_err=$ac_c_preproc_warn_flag
21762   else
21763     ac_cpp_err=
21764   fi
21765 else
21766   ac_cpp_err=yes
21767 fi
21768 if test -z "$ac_cpp_err"; then
21769   eval "$as_ac_Header=yes"
21770 else
21771   echo "$as_me: failed program was:" >&5
21772   cat "conftest.$ac_ext" >&5
21773   eval "$as_ac_Header=no"
21774 fi
21775 rm -f conftest.err "conftest.$ac_ext"
21776 fi
21777 echo "$as_me:21777: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21778 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21779 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21780   cat >>confdefs.h <<EOF
21781 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21782 EOF
21783
21784 fi
21785 done
21786
21787 if test "$ac_cv_header_termios_h" = yes ; then
21788         case "$CFLAGS $CPPFLAGS" in
21789         (*-D_POSIX_SOURCE*)
21790                 termios_bad=dunno ;;
21791         (*)     termios_bad=maybe ;;
21792         esac
21793         if test "$termios_bad" = maybe ; then
21794         echo "$as_me:21794: checking whether termios.h needs _POSIX_SOURCE" >&5
21795 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21796         cat >"conftest.$ac_ext" <<_ACEOF
21797 #line 21797 "configure"
21798 #include "confdefs.h"
21799 #include <termios.h>
21800 int
21801 main (void)
21802 {
21803 struct termios foo; int x = foo.c_iflag = 1; (void)x
21804   ;
21805   return 0;
21806 }
21807 _ACEOF
21808 rm -f "conftest.$ac_objext"
21809 if { (eval echo "$as_me:21809: \"$ac_compile\"") >&5
21810   (eval $ac_compile) 2>&5
21811   ac_status=$?
21812   echo "$as_me:21812: \$? = $ac_status" >&5
21813   (exit "$ac_status"); } &&
21814          { ac_try='test -s "conftest.$ac_objext"'
21815   { (eval echo "$as_me:21815: \"$ac_try\"") >&5
21816   (eval $ac_try) 2>&5
21817   ac_status=$?
21818   echo "$as_me:21818: \$? = $ac_status" >&5
21819   (exit "$ac_status"); }; }; then
21820   termios_bad=no
21821 else
21822   echo "$as_me: failed program was:" >&5
21823 cat "conftest.$ac_ext" >&5
21824
21825                 cat >"conftest.$ac_ext" <<_ACEOF
21826 #line 21826 "configure"
21827 #include "confdefs.h"
21828
21829 #define _POSIX_SOURCE
21830 #include <termios.h>
21831 int
21832 main (void)
21833 {
21834 struct termios foo; int x = foo.c_iflag = 2; (void)x
21835   ;
21836   return 0;
21837 }
21838 _ACEOF
21839 rm -f "conftest.$ac_objext"
21840 if { (eval echo "$as_me:21840: \"$ac_compile\"") >&5
21841   (eval $ac_compile) 2>&5
21842   ac_status=$?
21843   echo "$as_me:21843: \$? = $ac_status" >&5
21844   (exit "$ac_status"); } &&
21845          { ac_try='test -s "conftest.$ac_objext"'
21846   { (eval echo "$as_me:21846: \"$ac_try\"") >&5
21847   (eval $ac_try) 2>&5
21848   ac_status=$?
21849   echo "$as_me:21849: \$? = $ac_status" >&5
21850   (exit "$ac_status"); }; }; then
21851   termios_bad=unknown
21852 else
21853   echo "$as_me: failed program was:" >&5
21854 cat "conftest.$ac_ext" >&5
21855 termios_bad=yes
21856 cat >>confdefs.h <<\EOF
21857 #define _POSIX_SOURCE 1
21858 EOF
21859
21860 fi
21861 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21862
21863 fi
21864 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21865         echo "$as_me:21865: result: $termios_bad" >&5
21866 echo "${ECHO_T}$termios_bad" >&6
21867         fi
21868 fi
21869
21870 echo "$as_me:21870: checking for tcgetattr" >&5
21871 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21872 if test "${cf_cv_have_tcgetattr+set}" = set; then
21873   echo $ECHO_N "(cached) $ECHO_C" >&6
21874 else
21875
21876 cat >"conftest.$ac_ext" <<_ACEOF
21877 #line 21877 "configure"
21878 #include "confdefs.h"
21879
21880 #include <sys/types.h>
21881 #ifdef HAVE_UNISTD_H
21882 #include <unistd.h>
21883 #endif
21884 #ifdef HAVE_TERMIOS_H
21885 #include <termios.h>
21886 #define TTY struct termios
21887 #else
21888 #ifdef HAVE_TERMIO_H
21889 #include <termio.h>
21890 #define TTY struct termio
21891 #endif
21892 #endif
21893
21894 int
21895 main (void)
21896 {
21897
21898 TTY foo;
21899 tcgetattr(1, &foo);
21900   ;
21901   return 0;
21902 }
21903 _ACEOF
21904 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21905 if { (eval echo "$as_me:21905: \"$ac_link\"") >&5
21906   (eval $ac_link) 2>&5
21907   ac_status=$?
21908   echo "$as_me:21908: \$? = $ac_status" >&5
21909   (exit "$ac_status"); } &&
21910          { ac_try='test -s "conftest$ac_exeext"'
21911   { (eval echo "$as_me:21911: \"$ac_try\"") >&5
21912   (eval $ac_try) 2>&5
21913   ac_status=$?
21914   echo "$as_me:21914: \$? = $ac_status" >&5
21915   (exit "$ac_status"); }; }; then
21916   cf_cv_have_tcgetattr=yes
21917 else
21918   echo "$as_me: failed program was:" >&5
21919 cat "conftest.$ac_ext" >&5
21920 cf_cv_have_tcgetattr=no
21921 fi
21922 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21923 fi
21924 echo "$as_me:21924: result: $cf_cv_have_tcgetattr" >&5
21925 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
21926 test "$cf_cv_have_tcgetattr" = yes &&
21927 cat >>confdefs.h <<\EOF
21928 #define HAVE_TCGETATTR 1
21929 EOF
21930
21931 echo "$as_me:21931: checking for vsscanf function or workaround" >&5
21932 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
21933 if test "${cf_cv_func_vsscanf+set}" = set; then
21934   echo $ECHO_N "(cached) $ECHO_C" >&6
21935 else
21936
21937 cat >"conftest.$ac_ext" <<_ACEOF
21938 #line 21938 "configure"
21939 #include "confdefs.h"
21940
21941 #include <stdarg.h>
21942 #include <stdio.h>
21943 int
21944 main (void)
21945 {
21946
21947         va_list ap;
21948         vsscanf("from", "%d", ap)
21949   ;
21950   return 0;
21951 }
21952 _ACEOF
21953 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21954 if { (eval echo "$as_me:21954: \"$ac_link\"") >&5
21955   (eval $ac_link) 2>&5
21956   ac_status=$?
21957   echo "$as_me:21957: \$? = $ac_status" >&5
21958   (exit "$ac_status"); } &&
21959          { ac_try='test -s "conftest$ac_exeext"'
21960   { (eval echo "$as_me:21960: \"$ac_try\"") >&5
21961   (eval $ac_try) 2>&5
21962   ac_status=$?
21963   echo "$as_me:21963: \$? = $ac_status" >&5
21964   (exit "$ac_status"); }; }; then
21965   cf_cv_func_vsscanf=vsscanf
21966 else
21967   echo "$as_me: failed program was:" >&5
21968 cat "conftest.$ac_ext" >&5
21969
21970 cat >"conftest.$ac_ext" <<_ACEOF
21971 #line 21971 "configure"
21972 #include "confdefs.h"
21973
21974 #include <stdarg.h>
21975 #include <stdio.h>
21976 int
21977 main (void)
21978 {
21979
21980         FILE strbuf;
21981         char *str = "from";
21982
21983         strbuf._flag = _IOREAD;
21984         strbuf._ptr = strbuf._base = (unsigned char *) str;
21985         strbuf._cnt = strlen(str);
21986         strbuf._file = _NFILE;
21987         return (vfscanf(&strbuf, "%d", ap))
21988   ;
21989   return 0;
21990 }
21991 _ACEOF
21992 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21993 if { (eval echo "$as_me:21993: \"$ac_link\"") >&5
21994   (eval $ac_link) 2>&5
21995   ac_status=$?
21996   echo "$as_me:21996: \$? = $ac_status" >&5
21997   (exit "$ac_status"); } &&
21998          { ac_try='test -s "conftest$ac_exeext"'
21999   { (eval echo "$as_me:21999: \"$ac_try\"") >&5
22000   (eval $ac_try) 2>&5
22001   ac_status=$?
22002   echo "$as_me:22002: \$? = $ac_status" >&5
22003   (exit "$ac_status"); }; }; then
22004   cf_cv_func_vsscanf=vfscanf
22005 else
22006   echo "$as_me: failed program was:" >&5
22007 cat "conftest.$ac_ext" >&5
22008
22009 cat >"conftest.$ac_ext" <<_ACEOF
22010 #line 22010 "configure"
22011 #include "confdefs.h"
22012
22013 #include <stdarg.h>
22014 #include <stdio.h>
22015 int
22016 main (void)
22017 {
22018
22019         FILE strbuf;
22020         char *str = "from";
22021
22022         strbuf._flag = _IOREAD;
22023         strbuf._ptr = strbuf._base = (unsigned char *) str;
22024         strbuf._cnt = strlen(str);
22025         strbuf._file = _NFILE;
22026         return (_doscan(&strbuf, "%d", ap))
22027   ;
22028   return 0;
22029 }
22030 _ACEOF
22031 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22032 if { (eval echo "$as_me:22032: \"$ac_link\"") >&5
22033   (eval $ac_link) 2>&5
22034   ac_status=$?
22035   echo "$as_me:22035: \$? = $ac_status" >&5
22036   (exit "$ac_status"); } &&
22037          { ac_try='test -s "conftest$ac_exeext"'
22038   { (eval echo "$as_me:22038: \"$ac_try\"") >&5
22039   (eval $ac_try) 2>&5
22040   ac_status=$?
22041   echo "$as_me:22041: \$? = $ac_status" >&5
22042   (exit "$ac_status"); }; }; then
22043   cf_cv_func_vsscanf=_doscan
22044 else
22045   echo "$as_me: failed program was:" >&5
22046 cat "conftest.$ac_ext" >&5
22047
22048 cf_cv_func_vsscanf=no
22049 fi
22050 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22051 fi
22052 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22053 fi
22054 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22055 fi
22056 echo "$as_me:22056: result: $cf_cv_func_vsscanf" >&5
22057 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22058
22059 case "$cf_cv_func_vsscanf" in
22060 (vsscanf)
22061 cat >>confdefs.h <<\EOF
22062 #define HAVE_VSSCANF 1
22063 EOF
22064 ;;
22065 (vfscanf)
22066 cat >>confdefs.h <<\EOF
22067 #define HAVE_VFSCANF 1
22068 EOF
22069 ;;
22070 (_doscan)
22071 cat >>confdefs.h <<\EOF
22072 #define HAVE__DOSCAN 1
22073 EOF
22074 ;;
22075 esac
22076
22077 for ac_header in \
22078 unistd.h \
22079
22080 do
22081 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22082 echo "$as_me:22082: checking for $ac_header" >&5
22083 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22084 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22085   echo $ECHO_N "(cached) $ECHO_C" >&6
22086 else
22087   cat >"conftest.$ac_ext" <<_ACEOF
22088 #line 22088 "configure"
22089 #include "confdefs.h"
22090 #include <$ac_header>
22091 _ACEOF
22092 if { (eval echo "$as_me:22092: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22093   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22094   ac_status=$?
22095   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22096   rm -f conftest.er1
22097   cat conftest.err >&5
22098   echo "$as_me:22098: \$? = $ac_status" >&5
22099   (exit "$ac_status"); } >/dev/null; then
22100   if test -s conftest.err; then
22101     ac_cpp_err=$ac_c_preproc_warn_flag
22102   else
22103     ac_cpp_err=
22104   fi
22105 else
22106   ac_cpp_err=yes
22107 fi
22108 if test -z "$ac_cpp_err"; then
22109   eval "$as_ac_Header=yes"
22110 else
22111   echo "$as_me: failed program was:" >&5
22112   cat "conftest.$ac_ext" >&5
22113   eval "$as_ac_Header=no"
22114 fi
22115 rm -f conftest.err "conftest.$ac_ext"
22116 fi
22117 echo "$as_me:22117: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22118 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22119 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22120   cat >>confdefs.h <<EOF
22121 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22122 EOF
22123
22124 fi
22125 done
22126
22127 echo "$as_me:22127: checking for working mkstemp" >&5
22128 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22129 if test "${cf_cv_func_mkstemp+set}" = set; then
22130   echo $ECHO_N "(cached) $ECHO_C" >&6
22131 else
22132
22133 rm -rf ./conftest*
22134 if test "$cross_compiling" = yes; then
22135   cf_cv_func_mkstemp=maybe
22136 else
22137   cat >"conftest.$ac_ext" <<_ACEOF
22138 #line 22138 "configure"
22139 #include "confdefs.h"
22140
22141 #include <sys/types.h>
22142 #ifdef HAVE_UNISTD_H
22143 #include <unistd.h>
22144 #endif
22145 #include <stdlib.h>
22146 #include <stdio.h>
22147 #include <string.h>
22148 #include <sys/stat.h>
22149 int main(void)
22150 {
22151         char *tmpl = "conftestXXXXXX";
22152         char name[2][80];
22153         int n;
22154         int result = 0;
22155         int fd;
22156         struct stat sb;
22157
22158         umask(077);
22159         for (n = 0; n < 2; ++n) {
22160                 strcpy(name[n], tmpl);
22161                 if ((fd = mkstemp(name[n])) >= 0) {
22162                         if (!strcmp(name[n], tmpl)
22163                          || stat(name[n], &sb) != 0
22164                          || (sb.st_mode & S_IFMT) != S_IFREG
22165                          || (sb.st_mode & 077) != 0) {
22166                                 result = 1;
22167                         }
22168                         close(fd);
22169                 }
22170         }
22171         if (result == 0
22172          && !strcmp(name[0], name[1]))
22173                 result = 1;
22174         ${cf_cv_main_return:-return}(result);
22175 }
22176
22177 _ACEOF
22178 rm -f "conftest$ac_exeext"
22179 if { (eval echo "$as_me:22179: \"$ac_link\"") >&5
22180   (eval $ac_link) 2>&5
22181   ac_status=$?
22182   echo "$as_me:22182: \$? = $ac_status" >&5
22183   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22184   { (eval echo "$as_me:22184: \"$ac_try\"") >&5
22185   (eval $ac_try) 2>&5
22186   ac_status=$?
22187   echo "$as_me:22187: \$? = $ac_status" >&5
22188   (exit "$ac_status"); }; }; then
22189   cf_cv_func_mkstemp=yes
22190
22191 else
22192   echo "$as_me: program exited with status $ac_status" >&5
22193 echo "$as_me: failed program was:" >&5
22194 cat "conftest.$ac_ext" >&5
22195 cf_cv_func_mkstemp=no
22196
22197 fi
22198 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22199 fi
22200
22201 fi
22202 echo "$as_me:22202: result: $cf_cv_func_mkstemp" >&5
22203 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22204 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22205         echo "$as_me:22205: checking for mkstemp" >&5
22206 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22207 if test "${ac_cv_func_mkstemp+set}" = set; then
22208   echo $ECHO_N "(cached) $ECHO_C" >&6
22209 else
22210   cat >"conftest.$ac_ext" <<_ACEOF
22211 #line 22211 "configure"
22212 #include "confdefs.h"
22213 #define mkstemp autoconf_temporary
22214 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22215 #undef mkstemp
22216
22217 #ifdef __cplusplus
22218 extern "C"
22219 #endif
22220
22221 /* We use char because int might match the return type of a gcc2
22222    builtin and then its argument prototype would still apply.  */
22223 char mkstemp (void);
22224
22225 int
22226 main (void)
22227 {
22228
22229 /* The GNU C library defines stubs for functions which it implements
22230     to always fail with ENOSYS.  Some functions are actually named
22231     something starting with __ and the normal name is an alias.  */
22232 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22233 #error found stub for mkstemp
22234 #endif
22235
22236         return mkstemp ();
22237   ;
22238   return 0;
22239 }
22240 _ACEOF
22241 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22242 if { (eval echo "$as_me:22242: \"$ac_link\"") >&5
22243   (eval $ac_link) 2>&5
22244   ac_status=$?
22245   echo "$as_me:22245: \$? = $ac_status" >&5
22246   (exit "$ac_status"); } &&
22247          { ac_try='test -s "conftest$ac_exeext"'
22248   { (eval echo "$as_me:22248: \"$ac_try\"") >&5
22249   (eval $ac_try) 2>&5
22250   ac_status=$?
22251   echo "$as_me:22251: \$? = $ac_status" >&5
22252   (exit "$ac_status"); }; }; then
22253   ac_cv_func_mkstemp=yes
22254 else
22255   echo "$as_me: failed program was:" >&5
22256 cat "conftest.$ac_ext" >&5
22257 ac_cv_func_mkstemp=no
22258 fi
22259 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22260 fi
22261 echo "$as_me:22261: result: $ac_cv_func_mkstemp" >&5
22262 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22263
22264 fi
22265 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22266
22267 cat >>confdefs.h <<\EOF
22268 #define HAVE_MKSTEMP 1
22269 EOF
22270
22271 fi
22272
22273 # setup for prototype of fallback for vsscanf()
22274
22275 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22276         HAVE_VSSCANF=1
22277 else
22278         HAVE_VSSCANF=0
22279 fi
22280
22281 if test "x$cross_compiling" = xyes ; then
22282         { echo "$as_me:22282: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22283 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22284 else
22285         echo "$as_me:22285: checking whether setvbuf arguments are reversed" >&5
22286 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22287 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22288   echo $ECHO_N "(cached) $ECHO_C" >&6
22289 else
22290   if test "$cross_compiling" = yes; then
22291   { { echo "$as_me:22291: error: cannot run test program while cross compiling" >&5
22292 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22293    { (exit 1); exit 1; }; }
22294 else
22295   cat >"conftest.$ac_ext" <<_ACEOF
22296 #line 22296 "configure"
22297 #include "confdefs.h"
22298 #include <stdio.h>
22299 /* If setvbuf has the reversed format, exit 0. */
22300 int
22301 main (void)
22302 {
22303   /* This call has the arguments reversed.
22304      A reversed system may check and see that the address of main
22305      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22306   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22307     $ac_main_return(1);
22308   putc('\r', stdout);
22309   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22310 }
22311 _ACEOF
22312 rm -f "conftest$ac_exeext"
22313 if { (eval echo "$as_me:22313: \"$ac_link\"") >&5
22314   (eval $ac_link) 2>&5
22315   ac_status=$?
22316   echo "$as_me:22316: \$? = $ac_status" >&5
22317   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22318   { (eval echo "$as_me:22318: \"$ac_try\"") >&5
22319   (eval $ac_try) 2>&5
22320   ac_status=$?
22321   echo "$as_me:22321: \$? = $ac_status" >&5
22322   (exit "$ac_status"); }; }; then
22323   ac_cv_func_setvbuf_reversed=yes
22324 else
22325   echo "$as_me: program exited with status $ac_status" >&5
22326 echo "$as_me: failed program was:" >&5
22327 cat "conftest.$ac_ext" >&5
22328 ac_cv_func_setvbuf_reversed=no
22329 fi
22330 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22331 fi
22332 rm -f core ./core.* ./*.core
22333 fi
22334 echo "$as_me:22334: result: $ac_cv_func_setvbuf_reversed" >&5
22335 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22336 if test $ac_cv_func_setvbuf_reversed = yes; then
22337
22338 cat >>confdefs.h <<\EOF
22339 #define SETVBUF_REVERSED 1
22340 EOF
22341
22342 fi
22343
22344 fi
22345 echo "$as_me:22345: checking for intptr_t" >&5
22346 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22347 if test "${ac_cv_type_intptr_t+set}" = set; then
22348   echo $ECHO_N "(cached) $ECHO_C" >&6
22349 else
22350   cat >"conftest.$ac_ext" <<_ACEOF
22351 #line 22351 "configure"
22352 #include "confdefs.h"
22353 $ac_includes_default
22354 int
22355 main (void)
22356 {
22357 if ((intptr_t *) 0)
22358   return 0;
22359 if (sizeof (intptr_t))
22360   return 0;
22361   ;
22362   return 0;
22363 }
22364 _ACEOF
22365 rm -f "conftest.$ac_objext"
22366 if { (eval echo "$as_me:22366: \"$ac_compile\"") >&5
22367   (eval $ac_compile) 2>&5
22368   ac_status=$?
22369   echo "$as_me:22369: \$? = $ac_status" >&5
22370   (exit "$ac_status"); } &&
22371          { ac_try='test -s "conftest.$ac_objext"'
22372   { (eval echo "$as_me:22372: \"$ac_try\"") >&5
22373   (eval $ac_try) 2>&5
22374   ac_status=$?
22375   echo "$as_me:22375: \$? = $ac_status" >&5
22376   (exit "$ac_status"); }; }; then
22377   ac_cv_type_intptr_t=yes
22378 else
22379   echo "$as_me: failed program was:" >&5
22380 cat "conftest.$ac_ext" >&5
22381 ac_cv_type_intptr_t=no
22382 fi
22383 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22384 fi
22385 echo "$as_me:22385: result: $ac_cv_type_intptr_t" >&5
22386 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22387 if test "$ac_cv_type_intptr_t" = yes; then
22388   :
22389 else
22390
22391 cat >>confdefs.h <<EOF
22392 #define intptr_t long
22393 EOF
22394
22395 fi
22396
22397 echo "$as_me:22397: checking for ssize_t" >&5
22398 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22399 if test "${ac_cv_type_ssize_t+set}" = set; then
22400   echo $ECHO_N "(cached) $ECHO_C" >&6
22401 else
22402   cat >"conftest.$ac_ext" <<_ACEOF
22403 #line 22403 "configure"
22404 #include "confdefs.h"
22405 $ac_includes_default
22406 int
22407 main (void)
22408 {
22409 if ((ssize_t *) 0)
22410   return 0;
22411 if (sizeof (ssize_t))
22412   return 0;
22413   ;
22414   return 0;
22415 }
22416 _ACEOF
22417 rm -f "conftest.$ac_objext"
22418 if { (eval echo "$as_me:22418: \"$ac_compile\"") >&5
22419   (eval $ac_compile) 2>&5
22420   ac_status=$?
22421   echo "$as_me:22421: \$? = $ac_status" >&5
22422   (exit "$ac_status"); } &&
22423          { ac_try='test -s "conftest.$ac_objext"'
22424   { (eval echo "$as_me:22424: \"$ac_try\"") >&5
22425   (eval $ac_try) 2>&5
22426   ac_status=$?
22427   echo "$as_me:22427: \$? = $ac_status" >&5
22428   (exit "$ac_status"); }; }; then
22429   ac_cv_type_ssize_t=yes
22430 else
22431   echo "$as_me: failed program was:" >&5
22432 cat "conftest.$ac_ext" >&5
22433 ac_cv_type_ssize_t=no
22434 fi
22435 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22436 fi
22437 echo "$as_me:22437: result: $ac_cv_type_ssize_t" >&5
22438 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22439 if test "$ac_cv_type_ssize_t" = yes; then
22440   :
22441 else
22442
22443 cat >>confdefs.h <<EOF
22444 #define ssize_t int
22445 EOF
22446
22447 fi
22448
22449 echo "$as_me:22449: checking for type sigaction_t" >&5
22450 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22451 if test "${cf_cv_type_sigaction+set}" = set; then
22452   echo $ECHO_N "(cached) $ECHO_C" >&6
22453 else
22454
22455         cat >"conftest.$ac_ext" <<_ACEOF
22456 #line 22456 "configure"
22457 #include "confdefs.h"
22458
22459 #include <signal.h>
22460 int
22461 main (void)
22462 {
22463 sigaction_t x
22464   ;
22465   return 0;
22466 }
22467 _ACEOF
22468 rm -f "conftest.$ac_objext"
22469 if { (eval echo "$as_me:22469: \"$ac_compile\"") >&5
22470   (eval $ac_compile) 2>&5
22471   ac_status=$?
22472   echo "$as_me:22472: \$? = $ac_status" >&5
22473   (exit "$ac_status"); } &&
22474          { ac_try='test -s "conftest.$ac_objext"'
22475   { (eval echo "$as_me:22475: \"$ac_try\"") >&5
22476   (eval $ac_try) 2>&5
22477   ac_status=$?
22478   echo "$as_me:22478: \$? = $ac_status" >&5
22479   (exit "$ac_status"); }; }; then
22480   cf_cv_type_sigaction=yes
22481 else
22482   echo "$as_me: failed program was:" >&5
22483 cat "conftest.$ac_ext" >&5
22484 cf_cv_type_sigaction=no
22485 fi
22486 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22487 fi
22488
22489 echo "$as_me:22489: result: $cf_cv_type_sigaction" >&5
22490 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22491 test "$cf_cv_type_sigaction" = yes &&
22492 cat >>confdefs.h <<\EOF
22493 #define HAVE_TYPE_SIGACTION 1
22494 EOF
22495
22496 echo "$as_me:22496: checking declaration of size-change" >&5
22497 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22498 if test "${cf_cv_sizechange+set}" = set; then
22499   echo $ECHO_N "(cached) $ECHO_C" >&6
22500 else
22501
22502         cf_cv_sizechange=unknown
22503         cf_save_CPPFLAGS="$CPPFLAGS"
22504
22505 for cf_opts in "" "NEED_PTEM_H"
22506 do
22507
22508         CPPFLAGS="$cf_save_CPPFLAGS"
22509         if test -n "$cf_opts"
22510         then
22511
22512         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22513         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22514
22515         fi
22516         cat >"conftest.$ac_ext" <<_ACEOF
22517 #line 22517 "configure"
22518 #include "confdefs.h"
22519 #include <sys/types.h>
22520 #ifdef HAVE_TERMIOS_H
22521 #include <termios.h>
22522 #else
22523 #ifdef HAVE_TERMIO_H
22524 #include <termio.h>
22525 #endif
22526 #endif
22527
22528 #ifdef NEED_PTEM_H
22529 /* This is a workaround for SCO:  they neglected to define struct winsize in
22530  * termios.h -- it is only in termio.h and ptem.h
22531  */
22532 #include <sys/stream.h>
22533 #include <sys/ptem.h>
22534 #endif
22535
22536 #ifdef HAVE_SYS_IOCTL_H
22537 #include <sys/ioctl.h>
22538 #endif
22539
22540 int
22541 main (void)
22542 {
22543
22544 #ifdef TIOCGSIZE
22545         struct ttysize win;     /* SunOS 3.0... */
22546         int y = win.ts_lines = 2;
22547         int x = win.ts_cols = 1;
22548         (void)y;
22549         (void)x;
22550 #else
22551 #ifdef TIOCGWINSZ
22552         struct winsize win;     /* everything else */
22553         int y = win.ws_row = 2;
22554         int x = win.ws_col = 1;
22555         (void)y;
22556         (void)x;
22557 #else
22558         no TIOCGSIZE or TIOCGWINSZ
22559 #endif /* TIOCGWINSZ */
22560 #endif /* TIOCGSIZE */
22561
22562   ;
22563   return 0;
22564 }
22565 _ACEOF
22566 rm -f "conftest.$ac_objext"
22567 if { (eval echo "$as_me:22567: \"$ac_compile\"") >&5
22568   (eval $ac_compile) 2>&5
22569   ac_status=$?
22570   echo "$as_me:22570: \$? = $ac_status" >&5
22571   (exit "$ac_status"); } &&
22572          { ac_try='test -s "conftest.$ac_objext"'
22573   { (eval echo "$as_me:22573: \"$ac_try\"") >&5
22574   (eval $ac_try) 2>&5
22575   ac_status=$?
22576   echo "$as_me:22576: \$? = $ac_status" >&5
22577   (exit "$ac_status"); }; }; then
22578   cf_cv_sizechange=yes
22579 else
22580   echo "$as_me: failed program was:" >&5
22581 cat "conftest.$ac_ext" >&5
22582 cf_cv_sizechange=no
22583 fi
22584 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22585
22586         CPPFLAGS="$cf_save_CPPFLAGS"
22587         if test "$cf_cv_sizechange" = yes ; then
22588                 echo "size-change succeeded ($cf_opts)" >&5
22589                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22590                 break
22591         fi
22592 done
22593
22594 fi
22595 echo "$as_me:22595: result: $cf_cv_sizechange" >&5
22596 echo "${ECHO_T}$cf_cv_sizechange" >&6
22597 if test "$cf_cv_sizechange" != no ; then
22598
22599 cat >>confdefs.h <<\EOF
22600 #define HAVE_SIZECHANGE 1
22601 EOF
22602
22603         case "$cf_cv_sizechange" in
22604         (NEED*)
22605                 cat >>confdefs.h <<EOF
22606 #define $cf_cv_sizechange  1
22607 EOF
22608
22609                 ;;
22610         esac
22611 fi
22612
22613 echo "$as_me:22613: checking for memmove" >&5
22614 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22615 if test "${ac_cv_func_memmove+set}" = set; then
22616   echo $ECHO_N "(cached) $ECHO_C" >&6
22617 else
22618   cat >"conftest.$ac_ext" <<_ACEOF
22619 #line 22619 "configure"
22620 #include "confdefs.h"
22621 #define memmove autoconf_temporary
22622 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22623 #undef memmove
22624
22625 #ifdef __cplusplus
22626 extern "C"
22627 #endif
22628
22629 /* We use char because int might match the return type of a gcc2
22630    builtin and then its argument prototype would still apply.  */
22631 char memmove (void);
22632
22633 int
22634 main (void)
22635 {
22636
22637 /* The GNU C library defines stubs for functions which it implements
22638     to always fail with ENOSYS.  Some functions are actually named
22639     something starting with __ and the normal name is an alias.  */
22640 #if defined (__stub_memmove) || defined (__stub___memmove)
22641 #error found stub for memmove
22642 #endif
22643
22644         return memmove ();
22645   ;
22646   return 0;
22647 }
22648 _ACEOF
22649 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22650 if { (eval echo "$as_me:22650: \"$ac_link\"") >&5
22651   (eval $ac_link) 2>&5
22652   ac_status=$?
22653   echo "$as_me:22653: \$? = $ac_status" >&5
22654   (exit "$ac_status"); } &&
22655          { ac_try='test -s "conftest$ac_exeext"'
22656   { (eval echo "$as_me:22656: \"$ac_try\"") >&5
22657   (eval $ac_try) 2>&5
22658   ac_status=$?
22659   echo "$as_me:22659: \$? = $ac_status" >&5
22660   (exit "$ac_status"); }; }; then
22661   ac_cv_func_memmove=yes
22662 else
22663   echo "$as_me: failed program was:" >&5
22664 cat "conftest.$ac_ext" >&5
22665 ac_cv_func_memmove=no
22666 fi
22667 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22668 fi
22669 echo "$as_me:22669: result: $ac_cv_func_memmove" >&5
22670 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22671 if test "$ac_cv_func_memmove" = yes; then
22672   :
22673 else
22674
22675 echo "$as_me:22675: checking for bcopy" >&5
22676 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22677 if test "${ac_cv_func_bcopy+set}" = set; then
22678   echo $ECHO_N "(cached) $ECHO_C" >&6
22679 else
22680   cat >"conftest.$ac_ext" <<_ACEOF
22681 #line 22681 "configure"
22682 #include "confdefs.h"
22683 #define bcopy autoconf_temporary
22684 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22685 #undef bcopy
22686
22687 #ifdef __cplusplus
22688 extern "C"
22689 #endif
22690
22691 /* We use char because int might match the return type of a gcc2
22692    builtin and then its argument prototype would still apply.  */
22693 char bcopy (void);
22694
22695 int
22696 main (void)
22697 {
22698
22699 /* The GNU C library defines stubs for functions which it implements
22700     to always fail with ENOSYS.  Some functions are actually named
22701     something starting with __ and the normal name is an alias.  */
22702 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22703 #error found stub for bcopy
22704 #endif
22705
22706         return bcopy ();
22707   ;
22708   return 0;
22709 }
22710 _ACEOF
22711 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22712 if { (eval echo "$as_me:22712: \"$ac_link\"") >&5
22713   (eval $ac_link) 2>&5
22714   ac_status=$?
22715   echo "$as_me:22715: \$? = $ac_status" >&5
22716   (exit "$ac_status"); } &&
22717          { ac_try='test -s "conftest$ac_exeext"'
22718   { (eval echo "$as_me:22718: \"$ac_try\"") >&5
22719   (eval $ac_try) 2>&5
22720   ac_status=$?
22721   echo "$as_me:22721: \$? = $ac_status" >&5
22722   (exit "$ac_status"); }; }; then
22723   ac_cv_func_bcopy=yes
22724 else
22725   echo "$as_me: failed program was:" >&5
22726 cat "conftest.$ac_ext" >&5
22727 ac_cv_func_bcopy=no
22728 fi
22729 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22730 fi
22731 echo "$as_me:22731: result: $ac_cv_func_bcopy" >&5
22732 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22733 if test "$ac_cv_func_bcopy" = yes; then
22734
22735         echo "$as_me:22735: checking if bcopy does overlapping moves" >&5
22736 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22737 if test "${cf_cv_good_bcopy+set}" = set; then
22738   echo $ECHO_N "(cached) $ECHO_C" >&6
22739 else
22740
22741                 if test "$cross_compiling" = yes; then
22742   cf_cv_good_bcopy=unknown
22743 else
22744   cat >"conftest.$ac_ext" <<_ACEOF
22745 #line 22745 "configure"
22746 #include "confdefs.h"
22747
22748 int main(void) {
22749         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22750         char temp[40];
22751         bcopy(data, temp, sizeof(data));
22752         bcopy(temp+10, temp, 15);
22753         bcopy(temp+5, temp+15, 10);
22754         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22755 }
22756
22757 _ACEOF
22758 rm -f "conftest$ac_exeext"
22759 if { (eval echo "$as_me:22759: \"$ac_link\"") >&5
22760   (eval $ac_link) 2>&5
22761   ac_status=$?
22762   echo "$as_me:22762: \$? = $ac_status" >&5
22763   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22764   { (eval echo "$as_me:22764: \"$ac_try\"") >&5
22765   (eval $ac_try) 2>&5
22766   ac_status=$?
22767   echo "$as_me:22767: \$? = $ac_status" >&5
22768   (exit "$ac_status"); }; }; then
22769   cf_cv_good_bcopy=yes
22770 else
22771   echo "$as_me: program exited with status $ac_status" >&5
22772 echo "$as_me: failed program was:" >&5
22773 cat "conftest.$ac_ext" >&5
22774 cf_cv_good_bcopy=no
22775 fi
22776 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22777 fi
22778
22779 fi
22780 echo "$as_me:22780: result: $cf_cv_good_bcopy" >&5
22781 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22782
22783 else
22784   cf_cv_good_bcopy=no
22785 fi
22786
22787         if test "$cf_cv_good_bcopy" = yes ; then
22788
22789 cat >>confdefs.h <<\EOF
22790 #define USE_OK_BCOPY 1
22791 EOF
22792
22793         else
22794
22795 cat >>confdefs.h <<\EOF
22796 #define USE_MY_MEMMOVE 1
22797 EOF
22798
22799         fi
22800
22801 fi
22802
22803 tty >/dev/null 2>&1 || {
22804 for ac_func in posix_openpt
22805 do
22806 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22807 echo "$as_me:22807: checking for $ac_func" >&5
22808 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22809 if eval "test \"\${$as_ac_var+set}\" = set"; then
22810   echo $ECHO_N "(cached) $ECHO_C" >&6
22811 else
22812   cat >"conftest.$ac_ext" <<_ACEOF
22813 #line 22813 "configure"
22814 #include "confdefs.h"
22815 #define $ac_func autoconf_temporary
22816 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22817 #undef $ac_func
22818
22819 #ifdef __cplusplus
22820 extern "C"
22821 #endif
22822
22823 /* We use char because int might match the return type of a gcc2
22824    builtin and then its argument prototype would still apply.  */
22825 char $ac_func (void);
22826
22827 int
22828 main (void)
22829 {
22830
22831 /* The GNU C library defines stubs for functions which it implements
22832     to always fail with ENOSYS.  Some functions are actually named
22833     something starting with __ and the normal name is an alias.  */
22834 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22835 #error found stub for $ac_func
22836 #endif
22837
22838         return $ac_func ();
22839   ;
22840   return 0;
22841 }
22842 _ACEOF
22843 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22844 if { (eval echo "$as_me:22844: \"$ac_link\"") >&5
22845   (eval $ac_link) 2>&5
22846   ac_status=$?
22847   echo "$as_me:22847: \$? = $ac_status" >&5
22848   (exit "$ac_status"); } &&
22849          { ac_try='test -s "conftest$ac_exeext"'
22850   { (eval echo "$as_me:22850: \"$ac_try\"") >&5
22851   (eval $ac_try) 2>&5
22852   ac_status=$?
22853   echo "$as_me:22853: \$? = $ac_status" >&5
22854   (exit "$ac_status"); }; }; then
22855   eval "$as_ac_var=yes"
22856 else
22857   echo "$as_me: failed program was:" >&5
22858 cat "conftest.$ac_ext" >&5
22859 eval "$as_ac_var=no"
22860 fi
22861 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22862 fi
22863 echo "$as_me:22863: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22864 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22865 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22866   cat >>confdefs.h <<EOF
22867 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22868 EOF
22869
22870 fi
22871 done
22872  }
22873 echo "$as_me:22873: checking if poll really works" >&5
22874 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22875 if test "${cf_cv_working_poll+set}" = set; then
22876   echo $ECHO_N "(cached) $ECHO_C" >&6
22877 else
22878
22879 if test "$cross_compiling" = yes; then
22880   cf_cv_working_poll=unknown
22881 else
22882   cat >"conftest.$ac_ext" <<_ACEOF
22883 #line 22883 "configure"
22884 #include "confdefs.h"
22885
22886 #include <stdlib.h>
22887 #include <stdio.h>
22888 #include <unistd.h>
22889 #include <fcntl.h>
22890 #ifdef HAVE_POLL_H
22891 #include <poll.h>
22892 #else
22893 #include <sys/poll.h>
22894 #endif
22895 int main(void) {
22896         struct pollfd myfds;
22897         int ret;
22898
22899         /* check for Darwin bug with respect to "devices" */
22900         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22901         if (myfds.fd < 0)
22902                 myfds.fd = 0;
22903         myfds.events = POLLIN;
22904         myfds.revents = 0;
22905
22906         ret = poll(&myfds, 1, 100);
22907
22908         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22909                 ret = -1;
22910         } else {
22911                 int fd = 0;
22912                 if (!isatty(fd)) {
22913                         fd = open("/dev/tty", 2);       /* O_RDWR */
22914                 }
22915 #ifdef HAVE_POSIX_OPENPT
22916                 if (fd < 0) {
22917                         fd = posix_openpt(O_RDWR);
22918                 }
22919 #endif
22920
22921                 if (fd >= 0) {
22922                         /* also check with standard input */
22923                         myfds.fd = fd;
22924                         myfds.events = POLLIN;
22925                         myfds.revents = 0;
22926                         ret = poll(&myfds, 1, 100);
22927                 } else {
22928                         ret = -1;
22929                 }
22930         }
22931         ${cf_cv_main_return:-return}(ret < 0);
22932 }
22933 _ACEOF
22934 rm -f "conftest$ac_exeext"
22935 if { (eval echo "$as_me:22935: \"$ac_link\"") >&5
22936   (eval $ac_link) 2>&5
22937   ac_status=$?
22938   echo "$as_me:22938: \$? = $ac_status" >&5
22939   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22940   { (eval echo "$as_me:22940: \"$ac_try\"") >&5
22941   (eval $ac_try) 2>&5
22942   ac_status=$?
22943   echo "$as_me:22943: \$? = $ac_status" >&5
22944   (exit "$ac_status"); }; }; then
22945   cf_cv_working_poll=yes
22946 else
22947   echo "$as_me: program exited with status $ac_status" >&5
22948 echo "$as_me: failed program was:" >&5
22949 cat "conftest.$ac_ext" >&5
22950 cf_cv_working_poll=no
22951 fi
22952 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22953 fi
22954 fi
22955 echo "$as_me:22955: result: $cf_cv_working_poll" >&5
22956 echo "${ECHO_T}$cf_cv_working_poll" >&6
22957 test "$cf_cv_working_poll" = "yes" &&
22958 cat >>confdefs.h <<\EOF
22959 #define HAVE_WORKING_POLL 1
22960 EOF
22961
22962 echo "$as_me:22962: checking for va_copy" >&5
22963 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
22964 if test "${cf_cv_have_va_copy+set}" = set; then
22965   echo $ECHO_N "(cached) $ECHO_C" >&6
22966 else
22967
22968 cat >"conftest.$ac_ext" <<_ACEOF
22969 #line 22969 "configure"
22970 #include "confdefs.h"
22971
22972 #include <stdarg.h>
22973
22974 int
22975 main (void)
22976 {
22977
22978         static va_list dst;
22979         static va_list src;
22980         va_copy(dst, src)
22981   ;
22982   return 0;
22983 }
22984 _ACEOF
22985 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22986 if { (eval echo "$as_me:22986: \"$ac_link\"") >&5
22987   (eval $ac_link) 2>&5
22988   ac_status=$?
22989   echo "$as_me:22989: \$? = $ac_status" >&5
22990   (exit "$ac_status"); } &&
22991          { ac_try='test -s "conftest$ac_exeext"'
22992   { (eval echo "$as_me:22992: \"$ac_try\"") >&5
22993   (eval $ac_try) 2>&5
22994   ac_status=$?
22995   echo "$as_me:22995: \$? = $ac_status" >&5
22996   (exit "$ac_status"); }; }; then
22997   cf_cv_have_va_copy=yes
22998 else
22999   echo "$as_me: failed program was:" >&5
23000 cat "conftest.$ac_ext" >&5
23001 cf_cv_have_va_copy=no
23002 fi
23003 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23004 fi
23005 echo "$as_me:23005: result: $cf_cv_have_va_copy" >&5
23006 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23007
23008 if test "$cf_cv_have_va_copy" = yes;
23009 then
23010
23011 cat >>confdefs.h <<\EOF
23012 #define HAVE_VA_COPY 1
23013 EOF
23014
23015 else # !cf_cv_have_va_copy
23016
23017 echo "$as_me:23017: checking for __va_copy" >&5
23018 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23019 if test "${cf_cv_have___va_copy+set}" = set; then
23020   echo $ECHO_N "(cached) $ECHO_C" >&6
23021 else
23022
23023 cat >"conftest.$ac_ext" <<_ACEOF
23024 #line 23024 "configure"
23025 #include "confdefs.h"
23026
23027 #include <stdarg.h>
23028
23029 int
23030 main (void)
23031 {
23032
23033         static va_list dst;
23034         static va_list src;
23035         __va_copy(dst, src)
23036   ;
23037   return 0;
23038 }
23039 _ACEOF
23040 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23041 if { (eval echo "$as_me:23041: \"$ac_link\"") >&5
23042   (eval $ac_link) 2>&5
23043   ac_status=$?
23044   echo "$as_me:23044: \$? = $ac_status" >&5
23045   (exit "$ac_status"); } &&
23046          { ac_try='test -s "conftest$ac_exeext"'
23047   { (eval echo "$as_me:23047: \"$ac_try\"") >&5
23048   (eval $ac_try) 2>&5
23049   ac_status=$?
23050   echo "$as_me:23050: \$? = $ac_status" >&5
23051   (exit "$ac_status"); }; }; then
23052   cf_cv_have___va_copy=yes
23053 else
23054   echo "$as_me: failed program was:" >&5
23055 cat "conftest.$ac_ext" >&5
23056 cf_cv_have___va_copy=no
23057 fi
23058 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23059 fi
23060 echo "$as_me:23060: result: $cf_cv_have___va_copy" >&5
23061 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23062
23063 if test "$cf_cv_have___va_copy" = yes
23064 then
23065
23066 cat >>confdefs.h <<\EOF
23067 #define HAVE___VA_COPY 1
23068 EOF
23069
23070 else # !cf_cv_have___va_copy
23071
23072 echo "$as_me:23072: checking for __builtin_va_copy" >&5
23073 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23074 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23075   echo $ECHO_N "(cached) $ECHO_C" >&6
23076 else
23077
23078 cat >"conftest.$ac_ext" <<_ACEOF
23079 #line 23079 "configure"
23080 #include "confdefs.h"
23081
23082 #include <stdarg.h>
23083
23084 int
23085 main (void)
23086 {
23087
23088         static va_list dst;
23089         static va_list src;
23090         __builtin_va_copy(dst, src)
23091   ;
23092   return 0;
23093 }
23094 _ACEOF
23095 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23096 if { (eval echo "$as_me:23096: \"$ac_link\"") >&5
23097   (eval $ac_link) 2>&5
23098   ac_status=$?
23099   echo "$as_me:23099: \$? = $ac_status" >&5
23100   (exit "$ac_status"); } &&
23101          { ac_try='test -s "conftest$ac_exeext"'
23102   { (eval echo "$as_me:23102: \"$ac_try\"") >&5
23103   (eval $ac_try) 2>&5
23104   ac_status=$?
23105   echo "$as_me:23105: \$? = $ac_status" >&5
23106   (exit "$ac_status"); }; }; then
23107   cf_cv_have___builtin_va_copy=yes
23108 else
23109   echo "$as_me: failed program was:" >&5
23110 cat "conftest.$ac_ext" >&5
23111 cf_cv_have___builtin_va_copy=no
23112 fi
23113 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23114 fi
23115 echo "$as_me:23115: result: $cf_cv_have___builtin_va_copy" >&5
23116 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23117
23118 test "$cf_cv_have___builtin_va_copy" = yes &&
23119
23120 cat >>confdefs.h <<\EOF
23121 #define HAVE___BUILTIN_VA_COPY 1
23122 EOF
23123
23124 fi # cf_cv_have___va_copy
23125
23126 fi # cf_cv_have_va_copy
23127
23128 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23129 (*yes*)
23130         ;;
23131
23132 (*)
23133         echo "$as_me:23133: checking if we can simply copy va_list" >&5
23134 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23135 if test "${cf_cv_pointer_va_list+set}" = set; then
23136   echo $ECHO_N "(cached) $ECHO_C" >&6
23137 else
23138
23139 cat >"conftest.$ac_ext" <<_ACEOF
23140 #line 23140 "configure"
23141 #include "confdefs.h"
23142
23143 #include <stdarg.h>
23144
23145 int
23146 main (void)
23147 {
23148
23149         va_list dst;
23150         va_list src;
23151         dst = src
23152   ;
23153   return 0;
23154 }
23155 _ACEOF
23156 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23157 if { (eval echo "$as_me:23157: \"$ac_link\"") >&5
23158   (eval $ac_link) 2>&5
23159   ac_status=$?
23160   echo "$as_me:23160: \$? = $ac_status" >&5
23161   (exit "$ac_status"); } &&
23162          { ac_try='test -s "conftest$ac_exeext"'
23163   { (eval echo "$as_me:23163: \"$ac_try\"") >&5
23164   (eval $ac_try) 2>&5
23165   ac_status=$?
23166   echo "$as_me:23166: \$? = $ac_status" >&5
23167   (exit "$ac_status"); }; }; then
23168   cf_cv_pointer_va_list=yes
23169 else
23170   echo "$as_me: failed program was:" >&5
23171 cat "conftest.$ac_ext" >&5
23172 cf_cv_pointer_va_list=no
23173 fi
23174 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23175 fi
23176 echo "$as_me:23176: result: $cf_cv_pointer_va_list" >&5
23177 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23178
23179         if test "$cf_cv_pointer_va_list" = no
23180         then
23181                 echo "$as_me:23181: checking if we can copy va_list indirectly" >&5
23182 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23183 if test "${cf_cv_array_va_list+set}" = set; then
23184   echo $ECHO_N "(cached) $ECHO_C" >&6
23185 else
23186
23187 cat >"conftest.$ac_ext" <<_ACEOF
23188 #line 23188 "configure"
23189 #include "confdefs.h"
23190
23191 #include <stdarg.h>
23192
23193 int
23194 main (void)
23195 {
23196
23197         va_list dst;
23198         va_list src;
23199         *dst = *src
23200   ;
23201   return 0;
23202 }
23203 _ACEOF
23204 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23205 if { (eval echo "$as_me:23205: \"$ac_link\"") >&5
23206   (eval $ac_link) 2>&5
23207   ac_status=$?
23208   echo "$as_me:23208: \$? = $ac_status" >&5
23209   (exit "$ac_status"); } &&
23210          { ac_try='test -s "conftest$ac_exeext"'
23211   { (eval echo "$as_me:23211: \"$ac_try\"") >&5
23212   (eval $ac_try) 2>&5
23213   ac_status=$?
23214   echo "$as_me:23214: \$? = $ac_status" >&5
23215   (exit "$ac_status"); }; }; then
23216   cf_cv_array_va_list=yes
23217 else
23218   echo "$as_me: failed program was:" >&5
23219 cat "conftest.$ac_ext" >&5
23220 cf_cv_array_va_list=no
23221 fi
23222 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23223 fi
23224 echo "$as_me:23224: result: $cf_cv_array_va_list" >&5
23225 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23226                 test "$cf_cv_array_va_list" = yes &&
23227 cat >>confdefs.h <<\EOF
23228 #define ARRAY_VA_LIST 1
23229 EOF
23230
23231         fi
23232         ;;
23233 esac
23234
23235 echo "$as_me:23235: checking for pid_t" >&5
23236 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23237 if test "${ac_cv_type_pid_t+set}" = set; then
23238   echo $ECHO_N "(cached) $ECHO_C" >&6
23239 else
23240   cat >"conftest.$ac_ext" <<_ACEOF
23241 #line 23241 "configure"
23242 #include "confdefs.h"
23243 $ac_includes_default
23244 int
23245 main (void)
23246 {
23247 if ((pid_t *) 0)
23248   return 0;
23249 if (sizeof (pid_t))
23250   return 0;
23251   ;
23252   return 0;
23253 }
23254 _ACEOF
23255 rm -f "conftest.$ac_objext"
23256 if { (eval echo "$as_me:23256: \"$ac_compile\"") >&5
23257   (eval $ac_compile) 2>&5
23258   ac_status=$?
23259   echo "$as_me:23259: \$? = $ac_status" >&5
23260   (exit "$ac_status"); } &&
23261          { ac_try='test -s "conftest.$ac_objext"'
23262   { (eval echo "$as_me:23262: \"$ac_try\"") >&5
23263   (eval $ac_try) 2>&5
23264   ac_status=$?
23265   echo "$as_me:23265: \$? = $ac_status" >&5
23266   (exit "$ac_status"); }; }; then
23267   ac_cv_type_pid_t=yes
23268 else
23269   echo "$as_me: failed program was:" >&5
23270 cat "conftest.$ac_ext" >&5
23271 ac_cv_type_pid_t=no
23272 fi
23273 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23274 fi
23275 echo "$as_me:23275: result: $ac_cv_type_pid_t" >&5
23276 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23277 if test "$ac_cv_type_pid_t" = yes; then
23278   :
23279 else
23280
23281 cat >>confdefs.h <<EOF
23282 #define pid_t int
23283 EOF
23284
23285 fi
23286
23287 for ac_header in unistd.h vfork.h
23288 do
23289 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23290 echo "$as_me:23290: checking for $ac_header" >&5
23291 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23292 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23293   echo $ECHO_N "(cached) $ECHO_C" >&6
23294 else
23295   cat >"conftest.$ac_ext" <<_ACEOF
23296 #line 23296 "configure"
23297 #include "confdefs.h"
23298 #include <$ac_header>
23299 _ACEOF
23300 if { (eval echo "$as_me:23300: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23301   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23302   ac_status=$?
23303   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23304   rm -f conftest.er1
23305   cat conftest.err >&5
23306   echo "$as_me:23306: \$? = $ac_status" >&5
23307   (exit "$ac_status"); } >/dev/null; then
23308   if test -s conftest.err; then
23309     ac_cpp_err=$ac_c_preproc_warn_flag
23310   else
23311     ac_cpp_err=
23312   fi
23313 else
23314   ac_cpp_err=yes
23315 fi
23316 if test -z "$ac_cpp_err"; then
23317   eval "$as_ac_Header=yes"
23318 else
23319   echo "$as_me: failed program was:" >&5
23320   cat "conftest.$ac_ext" >&5
23321   eval "$as_ac_Header=no"
23322 fi
23323 rm -f conftest.err "conftest.$ac_ext"
23324 fi
23325 echo "$as_me:23325: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23326 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23327 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23328   cat >>confdefs.h <<EOF
23329 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23330 EOF
23331
23332 fi
23333 done
23334
23335 for ac_func in fork vfork
23336 do
23337 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23338 echo "$as_me:23338: checking for $ac_func" >&5
23339 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23340 if eval "test \"\${$as_ac_var+set}\" = set"; then
23341   echo $ECHO_N "(cached) $ECHO_C" >&6
23342 else
23343   cat >"conftest.$ac_ext" <<_ACEOF
23344 #line 23344 "configure"
23345 #include "confdefs.h"
23346 #define $ac_func autoconf_temporary
23347 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23348 #undef $ac_func
23349
23350 #ifdef __cplusplus
23351 extern "C"
23352 #endif
23353
23354 /* We use char because int might match the return type of a gcc2
23355    builtin and then its argument prototype would still apply.  */
23356 char $ac_func (void);
23357
23358 int
23359 main (void)
23360 {
23361
23362 /* The GNU C library defines stubs for functions which it implements
23363     to always fail with ENOSYS.  Some functions are actually named
23364     something starting with __ and the normal name is an alias.  */
23365 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23366 #error found stub for $ac_func
23367 #endif
23368
23369         return $ac_func ();
23370   ;
23371   return 0;
23372 }
23373 _ACEOF
23374 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23375 if { (eval echo "$as_me:23375: \"$ac_link\"") >&5
23376   (eval $ac_link) 2>&5
23377   ac_status=$?
23378   echo "$as_me:23378: \$? = $ac_status" >&5
23379   (exit "$ac_status"); } &&
23380          { ac_try='test -s "conftest$ac_exeext"'
23381   { (eval echo "$as_me:23381: \"$ac_try\"") >&5
23382   (eval $ac_try) 2>&5
23383   ac_status=$?
23384   echo "$as_me:23384: \$? = $ac_status" >&5
23385   (exit "$ac_status"); }; }; then
23386   eval "$as_ac_var=yes"
23387 else
23388   echo "$as_me: failed program was:" >&5
23389 cat "conftest.$ac_ext" >&5
23390 eval "$as_ac_var=no"
23391 fi
23392 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23393 fi
23394 echo "$as_me:23394: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23395 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23396 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23397   cat >>confdefs.h <<EOF
23398 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23399 EOF
23400
23401 fi
23402 done
23403
23404 ac_cv_func_fork_works=$ac_cv_func_fork
23405 if test "x$ac_cv_func_fork" = xyes; then
23406   echo "$as_me:23406: checking for working fork" >&5
23407 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23408 if test "${ac_cv_func_fork_works+set}" = set; then
23409   echo $ECHO_N "(cached) $ECHO_C" >&6
23410 else
23411   if test "$cross_compiling" = yes; then
23412   ac_cv_func_fork_works=cross
23413 else
23414   cat >"conftest.$ac_ext" <<_ACEOF
23415 /* By Rüdiger Kuhlmann. */
23416       #include <sys/types.h>
23417       #if HAVE_UNISTD_H
23418       # include <unistd.h>
23419       #endif
23420       /* Some systems only have a dummy stub for fork() */
23421       int main (void)
23422       {
23423         if (fork() < 0)
23424           $ac_main_return (1);
23425         $ac_main_return (0);
23426       }
23427 _ACEOF
23428 rm -f "conftest$ac_exeext"
23429 if { (eval echo "$as_me:23429: \"$ac_link\"") >&5
23430   (eval $ac_link) 2>&5
23431   ac_status=$?
23432   echo "$as_me:23432: \$? = $ac_status" >&5
23433   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23434   { (eval echo "$as_me:23434: \"$ac_try\"") >&5
23435   (eval $ac_try) 2>&5
23436   ac_status=$?
23437   echo "$as_me:23437: \$? = $ac_status" >&5
23438   (exit "$ac_status"); }; }; then
23439   ac_cv_func_fork_works=yes
23440 else
23441   echo "$as_me: program exited with status $ac_status" >&5
23442 echo "$as_me: failed program was:" >&5
23443 cat "conftest.$ac_ext" >&5
23444 ac_cv_func_fork_works=no
23445 fi
23446 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23447 fi
23448 fi
23449 echo "$as_me:23449: result: $ac_cv_func_fork_works" >&5
23450 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23451
23452 fi
23453 if test "x$ac_cv_func_fork_works" = xcross; then
23454   case $host in
23455     *-*-amigaos* | *-*-msdosdjgpp*)
23456       # Override, as these systems have only a dummy fork() stub
23457       ac_cv_func_fork_works=no
23458       ;;
23459     *)
23460       ac_cv_func_fork_works=yes
23461       ;;
23462   esac
23463   { echo "$as_me:23463: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23464 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23465 fi
23466 ac_cv_func_vfork_works=$ac_cv_func_vfork
23467 if test "x$ac_cv_func_vfork" = xyes; then
23468   echo "$as_me:23468: checking for working vfork" >&5
23469 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23470 if test "${ac_cv_func_vfork_works+set}" = set; then
23471   echo $ECHO_N "(cached) $ECHO_C" >&6
23472 else
23473   if test "$cross_compiling" = yes; then
23474   ac_cv_func_vfork_works=cross
23475 else
23476   cat >"conftest.$ac_ext" <<_ACEOF
23477 #line 23477 "configure"
23478 #include "confdefs.h"
23479 /* Thanks to Paul Eggert for this test.  */
23480 #include <stdio.h>
23481 #include <sys/types.h>
23482 #include <sys/stat.h>
23483 #if HAVE_UNISTD_H
23484 # include <unistd.h>
23485 #endif
23486 #if HAVE_VFORK_H
23487 # include <vfork.h>
23488 #endif
23489 /* On some sparc systems, changes by the child to local and incoming
23490    argument registers are propagated back to the parent.  The compiler
23491    is told about this with #include <vfork.h>, but some compilers
23492    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23493    static variable whose address is put into a register that is
23494    clobbered by the vfork.  */
23495 static
23496 #ifdef __cplusplus
23497 sparc_address_test (int arg)
23498 # else
23499 sparc_address_test (arg) int arg;
23500 #endif
23501 {
23502   static pid_t child;
23503   if (!child) {
23504     child = vfork ();
23505     if (child < 0) {
23506       perror ("vfork");
23507       _exit(2);
23508     }
23509     if (!child) {
23510       arg = getpid();
23511       write(-1, "", 0);
23512       _exit (arg);
23513     }
23514   }
23515 }
23516
23517 int
23518 main (void)
23519 {
23520   pid_t parent = getpid ();
23521   pid_t child;
23522
23523   sparc_address_test ();
23524
23525   child = vfork ();
23526
23527   if (child == 0) {
23528     /* Here is another test for sparc vfork register problems.  This
23529        test uses lots of local variables, at least as many local
23530        variables as main has allocated so far including compiler
23531        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23532        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23533        reuse the register of parent for one of the local variables,
23534        since it will think that parent can't possibly be used any more
23535        in this routine.  Assigning to the local variable will thus
23536        munge parent in the parent process.  */
23537     pid_t
23538       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23539       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23540     /* Convince the compiler that p..p7 are live; otherwise, it might
23541        use the same hardware register for all 8 local variables.  */
23542     if (p != p1 || p != p2 || p != p3 || p != p4
23543         || p != p5 || p != p6 || p != p7)
23544       _exit(1);
23545
23546     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23547        from child file descriptors.  If the child closes a descriptor
23548        before it execs or exits, this munges the parent's descriptor
23549        as well.  Test for this by closing stdout in the child.  */
23550     _exit(close(fileno(stdout)) != 0);
23551   } else {
23552     int status;
23553     struct stat st;
23554
23555     while (wait(&status) != child)
23556       ;
23557     $ac_main_return(
23558          /* Was there some problem with vforking?  */
23559          child < 0
23560
23561          /* Did the child fail?  (This shouldn't happen.)  */
23562          || status
23563
23564          /* Did the vfork/compiler bug occur?  */
23565          || parent != getpid()
23566
23567          /* Did the file descriptor bug occur?  */
23568          || fstat(fileno(stdout), &st) != 0
23569          );
23570   }
23571 }
23572 _ACEOF
23573 rm -f "conftest$ac_exeext"
23574 if { (eval echo "$as_me:23574: \"$ac_link\"") >&5
23575   (eval $ac_link) 2>&5
23576   ac_status=$?
23577   echo "$as_me:23577: \$? = $ac_status" >&5
23578   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23579   { (eval echo "$as_me:23579: \"$ac_try\"") >&5
23580   (eval $ac_try) 2>&5
23581   ac_status=$?
23582   echo "$as_me:23582: \$? = $ac_status" >&5
23583   (exit "$ac_status"); }; }; then
23584   ac_cv_func_vfork_works=yes
23585 else
23586   echo "$as_me: program exited with status $ac_status" >&5
23587 echo "$as_me: failed program was:" >&5
23588 cat "conftest.$ac_ext" >&5
23589 ac_cv_func_vfork_works=no
23590 fi
23591 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23592 fi
23593 fi
23594 echo "$as_me:23594: result: $ac_cv_func_vfork_works" >&5
23595 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23596
23597 fi;
23598 if test "x$ac_cv_func_fork_works" = xcross; then
23599   ac_cv_func_vfork_works=ac_cv_func_vfork
23600   { echo "$as_me:23600: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23601 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23602 fi
23603
23604 if test "x$ac_cv_func_vfork_works" = xyes; then
23605
23606 cat >>confdefs.h <<\EOF
23607 #define HAVE_WORKING_VFORK 1
23608 EOF
23609
23610 else
23611
23612 cat >>confdefs.h <<\EOF
23613 #define vfork fork
23614 EOF
23615
23616 fi
23617 if test "x$ac_cv_func_fork_works" = xyes; then
23618
23619 cat >>confdefs.h <<\EOF
23620 #define HAVE_WORKING_FORK 1
23621 EOF
23622
23623 fi
23624
23625 echo "$as_me:23625: checking if fopen accepts explicit binary mode" >&5
23626 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23627 if test "${cf_cv_fopen_bin_r+set}" = set; then
23628   echo $ECHO_N "(cached) $ECHO_C" >&6
23629 else
23630
23631         if test "$cross_compiling" = yes; then
23632   cf_cv_fopen_bin_r=unknown
23633 else
23634   cat >"conftest.$ac_ext" <<_ACEOF
23635 #line 23635 "configure"
23636 #include "confdefs.h"
23637
23638 #include <stdio.h>
23639 int main(void) {
23640         FILE *fp = fopen("conftest.tmp", "wb");
23641         int rc = 0;
23642         if (fp != 0) {
23643                 int p, q;
23644                 for (p = 0; p < 256; ++p) {
23645                         fputc(p, fp);
23646                 }
23647                 fclose(fp);
23648                 fp = fopen("conftest.tmp", "rb");
23649                 if (fp != 0) {
23650                         for (p = 0; p < 256; ++p) {
23651                                 q = fgetc(fp);
23652                                 if (q != p) {
23653                                         rc = 1;
23654                                         break;
23655                                 }
23656                         }
23657                 } else {
23658                         rc = 1;
23659                 }
23660         } else {
23661                 rc = 1;
23662         }
23663         ${cf_cv_main_return:-return} (rc);
23664 }
23665
23666 _ACEOF
23667 rm -f "conftest$ac_exeext"
23668 if { (eval echo "$as_me:23668: \"$ac_link\"") >&5
23669   (eval $ac_link) 2>&5
23670   ac_status=$?
23671   echo "$as_me:23671: \$? = $ac_status" >&5
23672   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23673   { (eval echo "$as_me:23673: \"$ac_try\"") >&5
23674   (eval $ac_try) 2>&5
23675   ac_status=$?
23676   echo "$as_me:23676: \$? = $ac_status" >&5
23677   (exit "$ac_status"); }; }; then
23678   cf_cv_fopen_bin_r=yes
23679 else
23680   echo "$as_me: program exited with status $ac_status" >&5
23681 echo "$as_me: failed program was:" >&5
23682 cat "conftest.$ac_ext" >&5
23683 cf_cv_fopen_bin_r=no
23684 fi
23685 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23686 fi
23687
23688 fi
23689 echo "$as_me:23689: result: $cf_cv_fopen_bin_r" >&5
23690 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23691 test "x$cf_cv_fopen_bin_r" != xno &&
23692 cat >>confdefs.h <<\EOF
23693 #define USE_FOPEN_BIN_R 1
23694 EOF
23695
23696 # special check for test/ditto.c
23697
23698 echo "$as_me:23698: checking for openpty in -lutil" >&5
23699 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23700 if test "${ac_cv_lib_util_openpty+set}" = set; then
23701   echo $ECHO_N "(cached) $ECHO_C" >&6
23702 else
23703   ac_check_lib_save_LIBS=$LIBS
23704 LIBS="-lutil  $LIBS"
23705 cat >"conftest.$ac_ext" <<_ACEOF
23706 #line 23706 "configure"
23707 #include "confdefs.h"
23708
23709 /* Override any gcc2 internal prototype to avoid an error.  */
23710 #ifdef __cplusplus
23711 extern "C"
23712 #endif
23713 /* We use char because int might match the return type of a gcc2
23714    builtin and then its argument prototype would still apply.  */
23715 char openpty ();
23716 int
23717 main (void)
23718 {
23719 openpty ();
23720   ;
23721   return 0;
23722 }
23723 _ACEOF
23724 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23725 if { (eval echo "$as_me:23725: \"$ac_link\"") >&5
23726   (eval $ac_link) 2>&5
23727   ac_status=$?
23728   echo "$as_me:23728: \$? = $ac_status" >&5
23729   (exit "$ac_status"); } &&
23730          { ac_try='test -s "conftest$ac_exeext"'
23731   { (eval echo "$as_me:23731: \"$ac_try\"") >&5
23732   (eval $ac_try) 2>&5
23733   ac_status=$?
23734   echo "$as_me:23734: \$? = $ac_status" >&5
23735   (exit "$ac_status"); }; }; then
23736   ac_cv_lib_util_openpty=yes
23737 else
23738   echo "$as_me: failed program was:" >&5
23739 cat "conftest.$ac_ext" >&5
23740 ac_cv_lib_util_openpty=no
23741 fi
23742 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23743 LIBS=$ac_check_lib_save_LIBS
23744 fi
23745 echo "$as_me:23745: result: $ac_cv_lib_util_openpty" >&5
23746 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23747 if test "$ac_cv_lib_util_openpty" = yes; then
23748   cf_cv_lib_util=yes
23749 else
23750   cf_cv_lib_util=no
23751 fi
23752
23753 echo "$as_me:23753: checking for openpty header" >&5
23754 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23755 if test "${cf_cv_func_openpty+set}" = set; then
23756   echo $ECHO_N "(cached) $ECHO_C" >&6
23757 else
23758
23759         cf_save_LIBS="$LIBS"
23760         test "$cf_cv_lib_util" = yes && {
23761 cf_add_libs="$LIBS"
23762 # reverse order
23763 cf_add_0lib=
23764 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23765 # filter duplicates
23766 for cf_add_1lib in $cf_add_0lib; do
23767         for cf_add_2lib in $cf_add_libs; do
23768                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23769                         cf_add_1lib=
23770                         break
23771                 fi
23772         done
23773         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23774 done
23775 LIBS="$cf_add_libs"
23776  }
23777         for cf_header in pty.h libutil.h util.h
23778         do
23779         cat >"conftest.$ac_ext" <<_ACEOF
23780 #line 23780 "configure"
23781 #include "confdefs.h"
23782
23783 #include <$cf_header>
23784
23785 int
23786 main (void)
23787 {
23788
23789         int x = openpty((int *)0, (int *)0, (char *)0,
23790                                    (struct termios *)0, (struct winsize *)0);
23791
23792   ;
23793   return 0;
23794 }
23795 _ACEOF
23796 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23797 if { (eval echo "$as_me:23797: \"$ac_link\"") >&5
23798   (eval $ac_link) 2>&5
23799   ac_status=$?
23800   echo "$as_me:23800: \$? = $ac_status" >&5
23801   (exit "$ac_status"); } &&
23802          { ac_try='test -s "conftest$ac_exeext"'
23803   { (eval echo "$as_me:23803: \"$ac_try\"") >&5
23804   (eval $ac_try) 2>&5
23805   ac_status=$?
23806   echo "$as_me:23806: \$? = $ac_status" >&5
23807   (exit "$ac_status"); }; }; then
23808
23809                 cf_cv_func_openpty=$cf_header
23810                 break
23811
23812 else
23813   echo "$as_me: failed program was:" >&5
23814 cat "conftest.$ac_ext" >&5
23815
23816                 cf_cv_func_openpty=no
23817
23818 fi
23819 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23820         done
23821         LIBS="$cf_save_LIBS"
23822
23823 fi
23824 echo "$as_me:23824: result: $cf_cv_func_openpty" >&5
23825 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23826
23827 if test "$cf_cv_func_openpty" != no ; then
23828
23829 cat >>confdefs.h <<EOF
23830 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23831 EOF
23832
23833 cat >>confdefs.h <<\EOF
23834 #define USE_XTERM_PTY 1
23835 EOF
23836
23837         if test "x$cf_cv_lib_util" = xyes ; then
23838
23839 cf_add_libs="$TEST_LIBS"
23840 # reverse order
23841 cf_add_0lib=
23842 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23843 # filter duplicates
23844 for cf_add_1lib in $cf_add_0lib; do
23845         for cf_add_2lib in $cf_add_libs; do
23846                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23847                         cf_add_1lib=
23848                         break
23849                 fi
23850         done
23851         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23852 done
23853 TEST_LIBS="$cf_add_libs"
23854
23855         fi
23856 fi
23857
23858 if test "$with_hashed_db" != no ; then
23859
23860 cat >>confdefs.h <<\EOF
23861 #define USE_HASHED_DB 1
23862 EOF
23863
23864 case $with_hashed_db in
23865 (yes|*able*)
23866         ;;
23867 (*)
23868         if test -d "$with_hashed_db" ; then
23869
23870 if test -n "$with_hashed_db/include" ; then
23871   for cf_add_incdir in $with_hashed_db/include
23872   do
23873         while test "$cf_add_incdir" != /usr/include
23874         do
23875           if test -d "$cf_add_incdir"
23876           then
23877                 cf_have_incdir=no
23878                 if test -n "$CFLAGS$CPPFLAGS" ; then
23879                   # a loop is needed to ensure we can add subdirs of existing dirs
23880                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23881                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23882                           cf_have_incdir=yes; break
23883                         fi
23884                   done
23885                 fi
23886
23887                 if test "$cf_have_incdir" = no ; then
23888                   if test "$cf_add_incdir" = /usr/local/include ; then
23889                         if test "$GCC" = yes
23890                         then
23891                           cf_save_CPPFLAGS=$CPPFLAGS
23892
23893         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23894         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23895
23896                           cat >"conftest.$ac_ext" <<_ACEOF
23897 #line 23897 "configure"
23898 #include "confdefs.h"
23899 #include <stdio.h>
23900 int
23901 main (void)
23902 {
23903 printf("Hello")
23904   ;
23905   return 0;
23906 }
23907 _ACEOF
23908 rm -f "conftest.$ac_objext"
23909 if { (eval echo "$as_me:23909: \"$ac_compile\"") >&5
23910   (eval $ac_compile) 2>&5
23911   ac_status=$?
23912   echo "$as_me:23912: \$? = $ac_status" >&5
23913   (exit "$ac_status"); } &&
23914          { ac_try='test -s "conftest.$ac_objext"'
23915   { (eval echo "$as_me:23915: \"$ac_try\"") >&5
23916   (eval $ac_try) 2>&5
23917   ac_status=$?
23918   echo "$as_me:23918: \$? = $ac_status" >&5
23919   (exit "$ac_status"); }; }; then
23920   :
23921 else
23922   echo "$as_me: failed program was:" >&5
23923 cat "conftest.$ac_ext" >&5
23924 cf_have_incdir=yes
23925 fi
23926 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23927                           CPPFLAGS=$cf_save_CPPFLAGS
23928                         fi
23929                   fi
23930                 fi
23931
23932                 if test "$cf_have_incdir" = no ; then
23933                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23934
23935 echo "${as_me:-configure}:23935: testing adding $cf_add_incdir to include-path ..." 1>&5
23936
23937                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23938
23939                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23940                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23941                   cf_add_incdir="$cf_top_incdir"
23942                 else
23943                   break
23944                 fi
23945           else
23946                 break
23947           fi
23948         done
23949   done
23950 fi
23951
23952 if test -n "$with_hashed_db/lib" ; then
23953         for cf_add_libdir in $with_hashed_db/lib
23954         do
23955                 if test "$cf_add_libdir" = /usr/lib ; then
23956                         :
23957                 elif test -d "$cf_add_libdir"
23958                 then
23959                         cf_have_libdir=no
23960                         if test -n "$LDFLAGS$LIBS" ; then
23961                                 # a loop is needed to ensure we can add subdirs of existing dirs
23962                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23963                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23964                                                 cf_have_libdir=yes; break
23965                                         fi
23966                                 done
23967                         fi
23968                         if test "$cf_have_libdir" = no ; then
23969                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23970
23971 echo "${as_me:-configure}:23971: testing adding $cf_add_libdir to library-path ..." 1>&5
23972
23973                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23974                         fi
23975                 fi
23976         done
23977 fi
23978
23979         else
23980                 case "$with_hashed_db" in
23981                 (./*|../*|/*)
23982                         { echo "$as_me:23982: WARNING: no such directory $with_hashed_db" >&5
23983 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
23984                         ;;
23985                 (*)
23986
23987 cf_search=
23988
23989 test "x$prefix" != "xNONE" && \
23990 test -d "$prefix" && \
23991  {
23992         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
23993         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
23994         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
23995         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
23996         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
23997         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
23998 }
23999
24000 for cf_subdir_prefix in \
24001         /usr \
24002         /usr/local \
24003         /usr/pkg \
24004         /opt \
24005         /opt/local \
24006         $HOME
24007 do
24008
24009 test "x$cf_subdir_prefix" != "x$prefix" && \
24010 test -d "$cf_subdir_prefix" && \
24011 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24012         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24013         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24014         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24015         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24016         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24017         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"
24018 }
24019
24020 done
24021
24022         for cf_item in $cf_search
24023         do
24024                 case "$cf_item" in
24025                 (*/$with_hashed_db)
24026
24027 if test -n "$cf_item" ; then
24028   for cf_add_incdir in $cf_item
24029   do
24030         while test "$cf_add_incdir" != /usr/include
24031         do
24032           if test -d "$cf_add_incdir"
24033           then
24034                 cf_have_incdir=no
24035                 if test -n "$CFLAGS$CPPFLAGS" ; then
24036                   # a loop is needed to ensure we can add subdirs of existing dirs
24037                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24038                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24039                           cf_have_incdir=yes; break
24040                         fi
24041                   done
24042                 fi
24043
24044                 if test "$cf_have_incdir" = no ; then
24045                   if test "$cf_add_incdir" = /usr/local/include ; then
24046                         if test "$GCC" = yes
24047                         then
24048                           cf_save_CPPFLAGS=$CPPFLAGS
24049
24050         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24051         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24052
24053                           cat >"conftest.$ac_ext" <<_ACEOF
24054 #line 24054 "configure"
24055 #include "confdefs.h"
24056 #include <stdio.h>
24057 int
24058 main (void)
24059 {
24060 printf("Hello")
24061   ;
24062   return 0;
24063 }
24064 _ACEOF
24065 rm -f "conftest.$ac_objext"
24066 if { (eval echo "$as_me:24066: \"$ac_compile\"") >&5
24067   (eval $ac_compile) 2>&5
24068   ac_status=$?
24069   echo "$as_me:24069: \$? = $ac_status" >&5
24070   (exit "$ac_status"); } &&
24071          { ac_try='test -s "conftest.$ac_objext"'
24072   { (eval echo "$as_me:24072: \"$ac_try\"") >&5
24073   (eval $ac_try) 2>&5
24074   ac_status=$?
24075   echo "$as_me:24075: \$? = $ac_status" >&5
24076   (exit "$ac_status"); }; }; then
24077   :
24078 else
24079   echo "$as_me: failed program was:" >&5
24080 cat "conftest.$ac_ext" >&5
24081 cf_have_incdir=yes
24082 fi
24083 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24084                           CPPFLAGS=$cf_save_CPPFLAGS
24085                         fi
24086                   fi
24087                 fi
24088
24089                 if test "$cf_have_incdir" = no ; then
24090                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24091
24092 echo "${as_me:-configure}:24092: testing adding $cf_add_incdir to include-path ..." 1>&5
24093
24094                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24095
24096                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24097                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24098                   cf_add_incdir="$cf_top_incdir"
24099                 else
24100                   break
24101                 fi
24102           else
24103                 break
24104           fi
24105         done
24106   done
24107 fi
24108
24109                         ;;
24110                 esac
24111         done
24112
24113 cf_search=
24114
24115 test "x$prefix" != "xNONE" && \
24116 test -d "$prefix" && \
24117  {
24118         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24119         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24120         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24121         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24122         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24123         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24124 }
24125
24126 for cf_subdir_prefix in \
24127         /usr \
24128         /usr/local \
24129         /usr/pkg \
24130         /opt \
24131         /opt/local \
24132         $HOME
24133 do
24134
24135 test "x$cf_subdir_prefix" != "x$prefix" && \
24136 test -d "$cf_subdir_prefix" && \
24137 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24138         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24139         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24140         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24141         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24142         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24143         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"
24144 }
24145
24146 done
24147
24148         for cf_item in $cf_search
24149         do
24150                 case "$cf_item" in
24151                 (*/$with_hashed_db)
24152
24153 if test -n "$cf_item" ; then
24154         for cf_add_libdir in $cf_item
24155         do
24156                 if test "$cf_add_libdir" = /usr/lib ; then
24157                         :
24158                 elif test -d "$cf_add_libdir"
24159                 then
24160                         cf_have_libdir=no
24161                         if test -n "$LDFLAGS$LIBS" ; then
24162                                 # a loop is needed to ensure we can add subdirs of existing dirs
24163                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24164                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24165                                                 cf_have_libdir=yes; break
24166                                         fi
24167                                 done
24168                         fi
24169                         if test "$cf_have_libdir" = no ; then
24170                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24171
24172 echo "${as_me:-configure}:24172: testing adding $cf_add_libdir to library-path ..." 1>&5
24173
24174                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24175                         fi
24176                 fi
24177         done
24178 fi
24179
24180                         ;;
24181                 esac
24182         done
24183
24184                         ;;
24185                 esac
24186         fi
24187 esac
24188
24189 echo "$as_me:24189: checking for db.h" >&5
24190 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24191 if test "${ac_cv_header_db_h+set}" = set; then
24192   echo $ECHO_N "(cached) $ECHO_C" >&6
24193 else
24194   cat >"conftest.$ac_ext" <<_ACEOF
24195 #line 24195 "configure"
24196 #include "confdefs.h"
24197 #include <db.h>
24198 _ACEOF
24199 if { (eval echo "$as_me:24199: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24200   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24201   ac_status=$?
24202   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24203   rm -f conftest.er1
24204   cat conftest.err >&5
24205   echo "$as_me:24205: \$? = $ac_status" >&5
24206   (exit "$ac_status"); } >/dev/null; then
24207   if test -s conftest.err; then
24208     ac_cpp_err=$ac_c_preproc_warn_flag
24209   else
24210     ac_cpp_err=
24211   fi
24212 else
24213   ac_cpp_err=yes
24214 fi
24215 if test -z "$ac_cpp_err"; then
24216   ac_cv_header_db_h=yes
24217 else
24218   echo "$as_me: failed program was:" >&5
24219   cat "conftest.$ac_ext" >&5
24220   ac_cv_header_db_h=no
24221 fi
24222 rm -f conftest.err "conftest.$ac_ext"
24223 fi
24224 echo "$as_me:24224: result: $ac_cv_header_db_h" >&5
24225 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24226 if test "$ac_cv_header_db_h" = yes; then
24227
24228 echo "$as_me:24228: checking for version of db" >&5
24229 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24230 if test "${cf_cv_hashed_db_version+set}" = set; then
24231   echo $ECHO_N "(cached) $ECHO_C" >&6
24232 else
24233
24234 cf_cv_hashed_db_version=unknown
24235
24236 for cf_db_version in 1 2 3 4 5 6
24237 do
24238
24239 echo "${as_me:-configure}:24239: testing checking for db version $cf_db_version ..." 1>&5
24240
24241         cat >"conftest.$ac_ext" <<_ACEOF
24242 #line 24242 "configure"
24243 #include "confdefs.h"
24244
24245 $ac_includes_default
24246 #include <db.h>
24247
24248 #ifdef DB_VERSION_MAJOR
24249         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24250 #if $cf_db_version == DB_VERSION_MAJOR
24251         /* ok */
24252 #else
24253         make an error
24254 #endif
24255 #else
24256 #if $cf_db_version == 1
24257         /* ok: assuming this is DB 1.8.5 */
24258 #else
24259         make an error
24260 #endif
24261 #endif
24262
24263 int
24264 main (void)
24265 {
24266 DBT *foo = 0
24267   ;
24268   return 0;
24269 }
24270 _ACEOF
24271 rm -f "conftest.$ac_objext"
24272 if { (eval echo "$as_me:24272: \"$ac_compile\"") >&5
24273   (eval $ac_compile) 2>&5
24274   ac_status=$?
24275   echo "$as_me:24275: \$? = $ac_status" >&5
24276   (exit "$ac_status"); } &&
24277          { ac_try='test -s "conftest.$ac_objext"'
24278   { (eval echo "$as_me:24278: \"$ac_try\"") >&5
24279   (eval $ac_try) 2>&5
24280   ac_status=$?
24281   echo "$as_me:24281: \$? = $ac_status" >&5
24282   (exit "$ac_status"); }; }; then
24283
24284         cf_cv_hashed_db_version=$cf_db_version
24285         break
24286
24287 else
24288   echo "$as_me: failed program was:" >&5
24289 cat "conftest.$ac_ext" >&5
24290 fi
24291 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24292 done
24293
24294 fi
24295 echo "$as_me:24295: result: $cf_cv_hashed_db_version" >&5
24296 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24297
24298 if test "$cf_cv_hashed_db_version" = unknown ; then
24299         { { echo "$as_me:24299: error: Cannot determine version of db" >&5
24300 echo "$as_me: error: Cannot determine version of db" >&2;}
24301    { (exit 1); exit 1; }; }
24302 else
24303
24304 echo "$as_me:24304: checking for db libraries" >&5
24305 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24306 if test "${cf_cv_hashed_db_libs+set}" = set; then
24307   echo $ECHO_N "(cached) $ECHO_C" >&6
24308 else
24309
24310 cf_cv_hashed_db_libs=unknown
24311 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24312 do
24313         cf_save_libs="$LIBS"
24314         if test -n "$cf_db_libs"; then
24315
24316 cf_add_libs="$LIBS"
24317 # reverse order
24318 cf_add_0lib=
24319 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24320 # filter duplicates
24321 for cf_add_1lib in $cf_add_0lib; do
24322         for cf_add_2lib in $cf_add_libs; do
24323                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24324                         cf_add_1lib=
24325                         break
24326                 fi
24327         done
24328         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24329 done
24330 LIBS="$cf_add_libs"
24331
24332         fi
24333
24334 echo "${as_me:-configure}:24334: testing checking for library $cf_db_libs ..." 1>&5
24335
24336         cat >"conftest.$ac_ext" <<_ACEOF
24337 #line 24337 "configure"
24338 #include "confdefs.h"
24339
24340 $ac_includes_default
24341 #include <db.h>
24342
24343 int
24344 main (void)
24345 {
24346
24347         char *path = "/tmp/foo";
24348 #ifdef DB_VERSION_MAJOR
24349 #if DB_VERSION_MAJOR >= 4
24350         DB *result = 0;
24351         db_create(&result, NULL, 0);
24352         result->open(result,
24353                 NULL,
24354                 path,
24355                 path,
24356                 DB_HASH,
24357                 DB_CREATE,
24358                 0644);
24359 #elif DB_VERSION_MAJOR >= 3
24360         DB *result = 0;
24361         db_create(&result, NULL, 0);
24362         result->open(result,
24363                 path,
24364                 path,
24365                 DB_HASH,
24366                 DB_CREATE,
24367                 0644);
24368 #elif DB_VERSION_MAJOR >= 2
24369         DB *result = 0;
24370         db_open(path,
24371                 DB_HASH,
24372                 DB_CREATE,
24373                 0644,
24374                 (DB_ENV *) 0,
24375                 (DB_INFO *) 0,
24376                 &result);
24377 #endif /* DB_VERSION_MAJOR */
24378 #else
24379         DB *result = dbopen(path,
24380                      2,
24381                      0644,
24382                      DB_HASH,
24383                      0);
24384 #endif
24385         ${cf_cv_main_return:-return}(result != 0)
24386
24387   ;
24388   return 0;
24389 }
24390 _ACEOF
24391 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24392 if { (eval echo "$as_me:24392: \"$ac_link\"") >&5
24393   (eval $ac_link) 2>&5
24394   ac_status=$?
24395   echo "$as_me:24395: \$? = $ac_status" >&5
24396   (exit "$ac_status"); } &&
24397          { ac_try='test -s "conftest$ac_exeext"'
24398   { (eval echo "$as_me:24398: \"$ac_try\"") >&5
24399   (eval $ac_try) 2>&5
24400   ac_status=$?
24401   echo "$as_me:24401: \$? = $ac_status" >&5
24402   (exit "$ac_status"); }; }; then
24403
24404         if test -n "$cf_db_libs" ; then
24405                 cf_cv_hashed_db_libs=$cf_db_libs
24406         else
24407                 cf_cv_hashed_db_libs=default
24408         fi
24409         LIBS="$cf_save_libs"
24410         break
24411
24412 else
24413   echo "$as_me: failed program was:" >&5
24414 cat "conftest.$ac_ext" >&5
24415 fi
24416 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24417         LIBS="$cf_save_libs"
24418 done
24419
24420 fi
24421 echo "$as_me:24421: result: $cf_cv_hashed_db_libs" >&5
24422 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24423
24424         if test "$cf_cv_hashed_db_libs" = unknown ; then
24425                 { { echo "$as_me:24425: error: Cannot determine library for db" >&5
24426 echo "$as_me: error: Cannot determine library for db" >&2;}
24427    { (exit 1); exit 1; }; }
24428         elif test "$cf_cv_hashed_db_libs" != default ; then
24429
24430 cf_add_libs="$LIBS"
24431 # reverse order
24432 cf_add_0lib=
24433 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24434 # filter duplicates
24435 for cf_add_1lib in $cf_add_0lib; do
24436         for cf_add_2lib in $cf_add_libs; do
24437                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24438                         cf_add_1lib=
24439                         break
24440                 fi
24441         done
24442         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24443 done
24444 LIBS="$cf_add_libs"
24445
24446         fi
24447 fi
24448
24449 else
24450
24451         { { echo "$as_me:24451: error: Cannot find db.h" >&5
24452 echo "$as_me: error: Cannot find db.h" >&2;}
24453    { (exit 1); exit 1; }; }
24454
24455 fi
24456
24457 fi
24458
24459 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24460         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24461         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24462 fi
24463
24464 # Just in case, check if the C compiler has a bool type.
24465
24466 echo "$as_me:24466: checking if we should include stdbool.h" >&5
24467 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24468
24469 if test "${cf_cv_header_stdbool_h+set}" = set; then
24470   echo $ECHO_N "(cached) $ECHO_C" >&6
24471 else
24472
24473         cat >"conftest.$ac_ext" <<_ACEOF
24474 #line 24474 "configure"
24475 #include "confdefs.h"
24476
24477 int
24478 main (void)
24479 {
24480 bool foo = false
24481   ;
24482   return 0;
24483 }
24484 _ACEOF
24485 rm -f "conftest.$ac_objext"
24486 if { (eval echo "$as_me:24486: \"$ac_compile\"") >&5
24487   (eval $ac_compile) 2>&5
24488   ac_status=$?
24489   echo "$as_me:24489: \$? = $ac_status" >&5
24490   (exit "$ac_status"); } &&
24491          { ac_try='test -s "conftest.$ac_objext"'
24492   { (eval echo "$as_me:24492: \"$ac_try\"") >&5
24493   (eval $ac_try) 2>&5
24494   ac_status=$?
24495   echo "$as_me:24495: \$? = $ac_status" >&5
24496   (exit "$ac_status"); }; }; then
24497   cf_cv_header_stdbool_h=0
24498 else
24499   echo "$as_me: failed program was:" >&5
24500 cat "conftest.$ac_ext" >&5
24501 cat >"conftest.$ac_ext" <<_ACEOF
24502 #line 24502 "configure"
24503 #include "confdefs.h"
24504
24505 #ifndef __BEOS__
24506 #include <stdbool.h>
24507 #endif
24508
24509 int
24510 main (void)
24511 {
24512 bool foo = false
24513   ;
24514   return 0;
24515 }
24516 _ACEOF
24517 rm -f "conftest.$ac_objext"
24518 if { (eval echo "$as_me:24518: \"$ac_compile\"") >&5
24519   (eval $ac_compile) 2>&5
24520   ac_status=$?
24521   echo "$as_me:24521: \$? = $ac_status" >&5
24522   (exit "$ac_status"); } &&
24523          { ac_try='test -s "conftest.$ac_objext"'
24524   { (eval echo "$as_me:24524: \"$ac_try\"") >&5
24525   (eval $ac_try) 2>&5
24526   ac_status=$?
24527   echo "$as_me:24527: \$? = $ac_status" >&5
24528   (exit "$ac_status"); }; }; then
24529   cf_cv_header_stdbool_h=1
24530 else
24531   echo "$as_me: failed program was:" >&5
24532 cat "conftest.$ac_ext" >&5
24533 cf_cv_header_stdbool_h=0
24534 fi
24535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24536 fi
24537 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24538 fi
24539
24540 if test "$cf_cv_header_stdbool_h" = 1
24541 then    echo "$as_me:24541: result: yes" >&5
24542 echo "${ECHO_T}yes" >&6
24543 else    echo "$as_me:24543: result: no" >&5
24544 echo "${ECHO_T}no" >&6
24545 fi
24546
24547 echo "$as_me:24547: checking for builtin bool type" >&5
24548 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24549
24550 if test "${cf_cv_cc_bool_type+set}" = set; then
24551   echo $ECHO_N "(cached) $ECHO_C" >&6
24552 else
24553
24554         cat >"conftest.$ac_ext" <<_ACEOF
24555 #line 24555 "configure"
24556 #include "confdefs.h"
24557
24558 #include <stdio.h>
24559 #include <sys/types.h>
24560
24561 int
24562 main (void)
24563 {
24564 bool x = false
24565   ;
24566   return 0;
24567 }
24568 _ACEOF
24569 rm -f "conftest.$ac_objext"
24570 if { (eval echo "$as_me:24570: \"$ac_compile\"") >&5
24571   (eval $ac_compile) 2>&5
24572   ac_status=$?
24573   echo "$as_me:24573: \$? = $ac_status" >&5
24574   (exit "$ac_status"); } &&
24575          { ac_try='test -s "conftest.$ac_objext"'
24576   { (eval echo "$as_me:24576: \"$ac_try\"") >&5
24577   (eval $ac_try) 2>&5
24578   ac_status=$?
24579   echo "$as_me:24579: \$? = $ac_status" >&5
24580   (exit "$ac_status"); }; }; then
24581   cf_cv_cc_bool_type=1
24582 else
24583   echo "$as_me: failed program was:" >&5
24584 cat "conftest.$ac_ext" >&5
24585 cf_cv_cc_bool_type=0
24586 fi
24587 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24588
24589 fi
24590
24591 if test "$cf_cv_cc_bool_type" = 1
24592 then    echo "$as_me:24592: result: yes" >&5
24593 echo "${ECHO_T}yes" >&6
24594 else    echo "$as_me:24594: result: no" >&5
24595 echo "${ECHO_T}no" >&6
24596 fi
24597
24598 # Check for C++ compiler characteristics (and ensure that it's there!)
24599 if test -n "$CXX" ; then
24600         ac_ext=cc
24601 ac_cpp='$CXXCPP $CPPFLAGS'
24602 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24603 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24604 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24605 ac_main_return="return"
24606
24607 if test -n "$GXX" ; then
24608
24609         cf_save="$LIBS"
24610         LIBS="$LIBS $CXXLIBS"
24611         echo "$as_me:24611: checking if we already have C++ library" >&5
24612 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24613         cat >"conftest.$ac_ext" <<_ACEOF
24614 #line 24614 "configure"
24615 #include "confdefs.h"
24616
24617                         #include <iostream>
24618 int
24619 main (void)
24620 {
24621
24622                         std::cout << "Hello World!" << std::endl;
24623   ;
24624   return 0;
24625 }
24626 _ACEOF
24627 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24628 if { (eval echo "$as_me:24628: \"$ac_link\"") >&5
24629   (eval $ac_link) 2>&5
24630   ac_status=$?
24631   echo "$as_me:24631: \$? = $ac_status" >&5
24632   (exit "$ac_status"); } &&
24633          { ac_try='test -s "conftest$ac_exeext"'
24634   { (eval echo "$as_me:24634: \"$ac_try\"") >&5
24635   (eval $ac_try) 2>&5
24636   ac_status=$?
24637   echo "$as_me:24637: \$? = $ac_status" >&5
24638   (exit "$ac_status"); }; }; then
24639   cf_have_libstdcpp=yes
24640 else
24641   echo "$as_me: failed program was:" >&5
24642 cat "conftest.$ac_ext" >&5
24643 cf_have_libstdcpp=no
24644 fi
24645 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24646         echo "$as_me:24646: result: $cf_have_libstdcpp" >&5
24647 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24648         LIBS="$cf_save"
24649
24650         if test "$cf_have_libstdcpp" != yes
24651         then
24652                 case "$cf_cv_system_name" in
24653                 (os2*)
24654                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24655                                 cf_stdcpp_libname=stdcpp
24656                         else
24657                                 cf_stdcpp_libname=stdc++
24658                         fi
24659                         ;;
24660                 (*)
24661                         cf_stdcpp_libname=stdc++
24662                         ;;
24663                 esac
24664
24665                 echo "$as_me:24665: checking for library $cf_stdcpp_libname" >&5
24666 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24667 if test "${cf_cv_libstdcpp+set}" = set; then
24668   echo $ECHO_N "(cached) $ECHO_C" >&6
24669 else
24670
24671                         cf_save="$LIBS"
24672                         LIBS="$LIBS $CXXLIBS"
24673
24674 cf_add_libs="$LIBS"
24675 # reverse order
24676 cf_add_0lib=
24677 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24678 # filter duplicates
24679 for cf_add_1lib in $cf_add_0lib; do
24680         for cf_add_2lib in $cf_add_libs; do
24681                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24682                         cf_add_1lib=
24683                         break
24684                 fi
24685         done
24686         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24687 done
24688 LIBS="$cf_add_libs"
24689
24690                 cat >"conftest.$ac_ext" <<_ACEOF
24691 #line 24691 "configure"
24692 #include "confdefs.h"
24693
24694                                 #include <iostream>
24695 int
24696 main (void)
24697 {
24698
24699                                 std::cout << "Hello World!" << std::endl;
24700   ;
24701   return 0;
24702 }
24703 _ACEOF
24704 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24705 if { (eval echo "$as_me:24705: \"$ac_link\"") >&5
24706   (eval $ac_link) 2>&5
24707   ac_status=$?
24708   echo "$as_me:24708: \$? = $ac_status" >&5
24709   (exit "$ac_status"); } &&
24710          { ac_try='test -s "conftest$ac_exeext"'
24711   { (eval echo "$as_me:24711: \"$ac_try\"") >&5
24712   (eval $ac_try) 2>&5
24713   ac_status=$?
24714   echo "$as_me:24714: \$? = $ac_status" >&5
24715   (exit "$ac_status"); }; }; then
24716   cf_cv_libstdcpp=yes
24717 else
24718   echo "$as_me: failed program was:" >&5
24719 cat "conftest.$ac_ext" >&5
24720 cf_cv_libstdcpp=no
24721 fi
24722 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24723                         LIBS="$cf_save"
24724
24725 fi
24726 echo "$as_me:24726: result: $cf_cv_libstdcpp" >&5
24727 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24728                 test "$cf_cv_libstdcpp" = yes && {
24729 cf_add_libs="$CXXLIBS"
24730 # reverse order
24731 cf_add_0lib=
24732 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24733 # filter duplicates
24734 for cf_add_1lib in $cf_add_0lib; do
24735         for cf_add_2lib in $cf_add_libs; do
24736                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24737                         cf_add_1lib=
24738                         break
24739                 fi
24740         done
24741         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24742 done
24743 CXXLIBS="$cf_add_libs"
24744  }
24745         fi
24746 fi
24747
24748         echo "$as_me:24748: checking whether $CXX understands -c and -o together" >&5
24749 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24750 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24751   echo $ECHO_N "(cached) $ECHO_C" >&6
24752 else
24753
24754 cat > conftest.$ac_ext <<CF_EOF
24755 int main(void)
24756 {
24757         ${cf_cv_main_return:-return}(0);
24758 }
24759 CF_EOF
24760 # We do the test twice because some compilers refuse to overwrite an
24761 # existing .o file with -o, though they will create one.
24762 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24763 if { (eval echo "$as_me:24763: \"$ac_try\"") >&5
24764   (eval $ac_try) 2>&5
24765   ac_status=$?
24766   echo "$as_me:24766: \$? = $ac_status" >&5
24767   (exit "$ac_status"); } &&
24768   test -f conftest2.$ac_objext && { (eval echo "$as_me:24768: \"$ac_try\"") >&5
24769   (eval $ac_try) 2>&5
24770   ac_status=$?
24771   echo "$as_me:24771: \$? = $ac_status" >&5
24772   (exit "$ac_status"); };
24773 then
24774   eval cf_cv_prog_CXX_c_o=yes
24775 else
24776   eval cf_cv_prog_CXX_c_o=no
24777 fi
24778 rm -rf ./conftest*
24779
24780 fi
24781 if test "$cf_cv_prog_CXX_c_o" = yes; then
24782   echo "$as_me:24782: result: yes" >&5
24783 echo "${ECHO_T}yes" >&6
24784 else
24785   echo "$as_me:24785: result: no" >&5
24786 echo "${ECHO_T}no" >&6
24787 fi
24788
24789         case "$GXX_VERSION" in
24790         (1.*|2.[0-6]*|[1-9][0-9].*)
24791                 cf_cxx_library=yes
24792                 ;;
24793         (*-2.7*|2.7*)
24794
24795 cf_cxx_library=unknown
24796 case "$cf_cv_system_name" in
24797 (os2*)
24798         cf_gpp_libname=gpp
24799         ;;
24800 (*)
24801         cf_gpp_libname=g++
24802         ;;
24803 esac
24804 if test "$GXX" = yes; then
24805         echo "$as_me:24805: checking for lib$cf_gpp_libname" >&5
24806 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24807         cf_save="$LIBS"
24808
24809 cf_add_libs="$LIBS"
24810 # reverse order
24811 cf_add_0lib=
24812 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24813 # filter duplicates
24814 for cf_add_1lib in $cf_add_0lib; do
24815         for cf_add_2lib in $cf_add_libs; do
24816                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24817                         cf_add_1lib=
24818                         break
24819                 fi
24820         done
24821         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24822 done
24823 LIBS="$cf_add_libs"
24824
24825         cat >"conftest.$ac_ext" <<_ACEOF
24826 #line 24826 "configure"
24827 #include "confdefs.h"
24828
24829 #include <$cf_gpp_libname/builtin.h>
24830
24831 int
24832 main (void)
24833 {
24834 two_arg_error_handler_t foo2 = lib_error_handler
24835   ;
24836   return 0;
24837 }
24838 _ACEOF
24839 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24840 if { (eval echo "$as_me:24840: \"$ac_link\"") >&5
24841   (eval $ac_link) 2>&5
24842   ac_status=$?
24843   echo "$as_me:24843: \$? = $ac_status" >&5
24844   (exit "$ac_status"); } &&
24845          { ac_try='test -s "conftest$ac_exeext"'
24846   { (eval echo "$as_me:24846: \"$ac_try\"") >&5
24847   (eval $ac_try) 2>&5
24848   ac_status=$?
24849   echo "$as_me:24849: \$? = $ac_status" >&5
24850   (exit "$ac_status"); }; }; then
24851   cf_cxx_library=yes
24852
24853 cf_add_libs="$CXXLIBS"
24854 # reverse order
24855 cf_add_0lib=
24856 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24857 # filter duplicates
24858 for cf_add_1lib in $cf_add_0lib; do
24859         for cf_add_2lib in $cf_add_libs; do
24860                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24861                         cf_add_1lib=
24862                         break
24863                 fi
24864         done
24865         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24866 done
24867 CXXLIBS="$cf_add_libs"
24868
24869          if test "$cf_gpp_libname" = cpp ; then
24870
24871 cat >>confdefs.h <<\EOF
24872 #define HAVE_GPP_BUILTIN_H 1
24873 EOF
24874
24875          else
24876
24877 cat >>confdefs.h <<\EOF
24878 #define HAVE_GXX_BUILTIN_H 1
24879 EOF
24880
24881          fi
24882 else
24883   echo "$as_me: failed program was:" >&5
24884 cat "conftest.$ac_ext" >&5
24885 cat >"conftest.$ac_ext" <<_ACEOF
24886 #line 24886 "configure"
24887 #include "confdefs.h"
24888
24889 #include <builtin.h>
24890
24891 int
24892 main (void)
24893 {
24894 two_arg_error_handler_t foo2 = lib_error_handler
24895   ;
24896   return 0;
24897 }
24898 _ACEOF
24899 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24900 if { (eval echo "$as_me:24900: \"$ac_link\"") >&5
24901   (eval $ac_link) 2>&5
24902   ac_status=$?
24903   echo "$as_me:24903: \$? = $ac_status" >&5
24904   (exit "$ac_status"); } &&
24905          { ac_try='test -s "conftest$ac_exeext"'
24906   { (eval echo "$as_me:24906: \"$ac_try\"") >&5
24907   (eval $ac_try) 2>&5
24908   ac_status=$?
24909   echo "$as_me:24909: \$? = $ac_status" >&5
24910   (exit "$ac_status"); }; }; then
24911   cf_cxx_library=yes
24912
24913 cf_add_libs="$CXXLIBS"
24914 # reverse order
24915 cf_add_0lib=
24916 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24917 # filter duplicates
24918 for cf_add_1lib in $cf_add_0lib; do
24919         for cf_add_2lib in $cf_add_libs; do
24920                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24921                         cf_add_1lib=
24922                         break
24923                 fi
24924         done
24925         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24926 done
24927 CXXLIBS="$cf_add_libs"
24928
24929 cat >>confdefs.h <<\EOF
24930 #define HAVE_BUILTIN_H 1
24931 EOF
24932
24933 else
24934   echo "$as_me: failed program was:" >&5
24935 cat "conftest.$ac_ext" >&5
24936 cf_cxx_library=no
24937 fi
24938 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24939 fi
24940 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24941         LIBS="$cf_save"
24942         echo "$as_me:24942: result: $cf_cxx_library" >&5
24943 echo "${ECHO_T}$cf_cxx_library" >&6
24944 fi
24945
24946                 ;;
24947         (*)
24948                 cf_cxx_library=no
24949                 ;;
24950         esac
24951
24952         ac_ext=cc
24953 ac_cpp='$CXXCPP $CPPFLAGS'
24954 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24955 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24956 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24957 ac_main_return="return"
24958 echo "$as_me:24958: checking how to run the C++ preprocessor" >&5
24959 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
24960 if test -z "$CXXCPP"; then
24961   if test "${ac_cv_prog_CXXCPP+set}" = set; then
24962   echo $ECHO_N "(cached) $ECHO_C" >&6
24963 else
24964       # Double quotes because CXXCPP needs to be expanded
24965     for CXXCPP in "$CXX -E" "/lib/cpp"
24966     do
24967       ac_preproc_ok=false
24968 for ac_cxx_preproc_warn_flag in '' yes
24969 do
24970   # Use a header file that comes with gcc, so configuring glibc
24971   # with a fresh cross-compiler works.
24972   # On the NeXT, cc -E runs the code through the compiler's parser,
24973   # not just through cpp. "Syntax error" is here to catch this case.
24974   cat >"conftest.$ac_ext" <<_ACEOF
24975 #line 24975 "configure"
24976 #include "confdefs.h"
24977 #include <assert.h>
24978                      Syntax error
24979 _ACEOF
24980 if { (eval echo "$as_me:24980: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24981   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24982   ac_status=$?
24983   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24984   rm -f conftest.er1
24985   cat conftest.err >&5
24986   echo "$as_me:24986: \$? = $ac_status" >&5
24987   (exit "$ac_status"); } >/dev/null; then
24988   if test -s conftest.err; then
24989     ac_cpp_err=$ac_cxx_preproc_warn_flag
24990   else
24991     ac_cpp_err=
24992   fi
24993 else
24994   ac_cpp_err=yes
24995 fi
24996 if test -z "$ac_cpp_err"; then
24997   :
24998 else
24999   echo "$as_me: failed program was:" >&5
25000   cat "conftest.$ac_ext" >&5
25001   # Broken: fails on valid input.
25002 continue
25003 fi
25004 rm -f conftest.err "conftest.$ac_ext"
25005
25006   # OK, works on sane cases.  Now check whether non-existent headers
25007   # can be detected and how.
25008   cat >"conftest.$ac_ext" <<_ACEOF
25009 #line 25009 "configure"
25010 #include "confdefs.h"
25011 #include <ac_nonexistent.h>
25012 _ACEOF
25013 if { (eval echo "$as_me:25013: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25014   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25015   ac_status=$?
25016   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25017   rm -f conftest.er1
25018   cat conftest.err >&5
25019   echo "$as_me:25019: \$? = $ac_status" >&5
25020   (exit "$ac_status"); } >/dev/null; then
25021   if test -s conftest.err; then
25022     ac_cpp_err=$ac_cxx_preproc_warn_flag
25023   else
25024     ac_cpp_err=
25025   fi
25026 else
25027   ac_cpp_err=yes
25028 fi
25029 if test -z "$ac_cpp_err"; then
25030   # Broken: success on invalid input.
25031 continue
25032 else
25033   echo "$as_me: failed program was:" >&5
25034   cat "conftest.$ac_ext" >&5
25035   # Passes both tests.
25036 ac_preproc_ok=:
25037 break
25038 fi
25039 rm -f conftest.err "conftest.$ac_ext"
25040
25041 done
25042 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25043 rm -f conftest.err "conftest.$ac_ext"
25044 if $ac_preproc_ok; then
25045   break
25046 fi
25047
25048     done
25049     ac_cv_prog_CXXCPP=$CXXCPP
25050
25051 fi
25052   CXXCPP=$ac_cv_prog_CXXCPP
25053 else
25054   ac_cv_prog_CXXCPP=$CXXCPP
25055 fi
25056 echo "$as_me:25056: result: $CXXCPP" >&5
25057 echo "${ECHO_T}$CXXCPP" >&6
25058 ac_preproc_ok=false
25059 for ac_cxx_preproc_warn_flag in '' yes
25060 do
25061   # Use a header file that comes with gcc, so configuring glibc
25062   # with a fresh cross-compiler works.
25063   # On the NeXT, cc -E runs the code through the compiler's parser,
25064   # not just through cpp. "Syntax error" is here to catch this case.
25065   cat >"conftest.$ac_ext" <<_ACEOF
25066 #line 25066 "configure"
25067 #include "confdefs.h"
25068 #include <assert.h>
25069                      Syntax error
25070 _ACEOF
25071 if { (eval echo "$as_me:25071: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25072   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25073   ac_status=$?
25074   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25075   rm -f conftest.er1
25076   cat conftest.err >&5
25077   echo "$as_me:25077: \$? = $ac_status" >&5
25078   (exit "$ac_status"); } >/dev/null; then
25079   if test -s conftest.err; then
25080     ac_cpp_err=$ac_cxx_preproc_warn_flag
25081   else
25082     ac_cpp_err=
25083   fi
25084 else
25085   ac_cpp_err=yes
25086 fi
25087 if test -z "$ac_cpp_err"; then
25088   :
25089 else
25090   echo "$as_me: failed program was:" >&5
25091   cat "conftest.$ac_ext" >&5
25092   # Broken: fails on valid input.
25093 continue
25094 fi
25095 rm -f conftest.err "conftest.$ac_ext"
25096
25097   # OK, works on sane cases.  Now check whether non-existent headers
25098   # can be detected and how.
25099   cat >"conftest.$ac_ext" <<_ACEOF
25100 #line 25100 "configure"
25101 #include "confdefs.h"
25102 #include <ac_nonexistent.h>
25103 _ACEOF
25104 if { (eval echo "$as_me:25104: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25105   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25106   ac_status=$?
25107   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25108   rm -f conftest.er1
25109   cat conftest.err >&5
25110   echo "$as_me:25110: \$? = $ac_status" >&5
25111   (exit "$ac_status"); } >/dev/null; then
25112   if test -s conftest.err; then
25113     ac_cpp_err=$ac_cxx_preproc_warn_flag
25114   else
25115     ac_cpp_err=
25116   fi
25117 else
25118   ac_cpp_err=yes
25119 fi
25120 if test -z "$ac_cpp_err"; then
25121   # Broken: success on invalid input.
25122 continue
25123 else
25124   echo "$as_me: failed program was:" >&5
25125   cat "conftest.$ac_ext" >&5
25126   # Passes both tests.
25127 ac_preproc_ok=:
25128 break
25129 fi
25130 rm -f conftest.err "conftest.$ac_ext"
25131
25132 done
25133 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25134 rm -f conftest.err "conftest.$ac_ext"
25135 if $ac_preproc_ok; then
25136   :
25137 else
25138   { { echo "$as_me:25138: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25139 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25140    { (exit 1); exit 1; }; }
25141 fi
25142
25143 ac_ext=cc
25144 ac_cpp='$CXXCPP $CPPFLAGS'
25145 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25146 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25147 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25148 ac_main_return="return"
25149
25150 for ac_header in typeinfo
25151 do
25152 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25153 echo "$as_me:25153: checking for $ac_header" >&5
25154 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25155 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25156   echo $ECHO_N "(cached) $ECHO_C" >&6
25157 else
25158   cat >"conftest.$ac_ext" <<_ACEOF
25159 #line 25159 "configure"
25160 #include "confdefs.h"
25161 #include <$ac_header>
25162 _ACEOF
25163 if { (eval echo "$as_me:25163: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25164   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25165   ac_status=$?
25166   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25167   rm -f conftest.er1
25168   cat conftest.err >&5
25169   echo "$as_me:25169: \$? = $ac_status" >&5
25170   (exit "$ac_status"); } >/dev/null; then
25171   if test -s conftest.err; then
25172     ac_cpp_err=$ac_cxx_preproc_warn_flag
25173   else
25174     ac_cpp_err=
25175   fi
25176 else
25177   ac_cpp_err=yes
25178 fi
25179 if test -z "$ac_cpp_err"; then
25180   eval "$as_ac_Header=yes"
25181 else
25182   echo "$as_me: failed program was:" >&5
25183   cat "conftest.$ac_ext" >&5
25184   eval "$as_ac_Header=no"
25185 fi
25186 rm -f conftest.err "conftest.$ac_ext"
25187 fi
25188 echo "$as_me:25188: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25189 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25190 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25191   cat >>confdefs.h <<EOF
25192 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25193 EOF
25194
25195 fi
25196 done
25197
25198 for ac_header in iostream
25199 do
25200 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25201 echo "$as_me:25201: checking for $ac_header" >&5
25202 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25203 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25204   echo $ECHO_N "(cached) $ECHO_C" >&6
25205 else
25206   cat >"conftest.$ac_ext" <<_ACEOF
25207 #line 25207 "configure"
25208 #include "confdefs.h"
25209 #include <$ac_header>
25210 _ACEOF
25211 if { (eval echo "$as_me:25211: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25212   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25213   ac_status=$?
25214   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25215   rm -f conftest.er1
25216   cat conftest.err >&5
25217   echo "$as_me:25217: \$? = $ac_status" >&5
25218   (exit "$ac_status"); } >/dev/null; then
25219   if test -s conftest.err; then
25220     ac_cpp_err=$ac_cxx_preproc_warn_flag
25221   else
25222     ac_cpp_err=
25223   fi
25224 else
25225   ac_cpp_err=yes
25226 fi
25227 if test -z "$ac_cpp_err"; then
25228   eval "$as_ac_Header=yes"
25229 else
25230   echo "$as_me: failed program was:" >&5
25231   cat "conftest.$ac_ext" >&5
25232   eval "$as_ac_Header=no"
25233 fi
25234 rm -f conftest.err "conftest.$ac_ext"
25235 fi
25236 echo "$as_me:25236: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25237 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25238 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25239   cat >>confdefs.h <<EOF
25240 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25241 EOF
25242
25243 fi
25244 done
25245
25246 if test x"$ac_cv_header_iostream" = xyes ; then
25247         echo "$as_me:25247: checking if iostream uses std-namespace" >&5
25248 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25249         cat >"conftest.$ac_ext" <<_ACEOF
25250 #line 25250 "configure"
25251 #include "confdefs.h"
25252
25253 #include <iostream>
25254 using std::endl;
25255 using std::cerr;
25256 int
25257 main (void)
25258 {
25259
25260 cerr << "testing" << endl;
25261
25262   ;
25263   return 0;
25264 }
25265 _ACEOF
25266 rm -f "conftest.$ac_objext"
25267 if { (eval echo "$as_me:25267: \"$ac_compile\"") >&5
25268   (eval $ac_compile) 2>&5
25269   ac_status=$?
25270   echo "$as_me:25270: \$? = $ac_status" >&5
25271   (exit "$ac_status"); } &&
25272          { ac_try='test -s "conftest.$ac_objext"'
25273   { (eval echo "$as_me:25273: \"$ac_try\"") >&5
25274   (eval $ac_try) 2>&5
25275   ac_status=$?
25276   echo "$as_me:25276: \$? = $ac_status" >&5
25277   (exit "$ac_status"); }; }; then
25278   cf_iostream_namespace=yes
25279 else
25280   echo "$as_me: failed program was:" >&5
25281 cat "conftest.$ac_ext" >&5
25282 cf_iostream_namespace=no
25283 fi
25284 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25285         echo "$as_me:25285: result: $cf_iostream_namespace" >&5
25286 echo "${ECHO_T}$cf_iostream_namespace" >&6
25287         if test "$cf_iostream_namespace" = yes ; then
25288
25289 cat >>confdefs.h <<\EOF
25290 #define IOSTREAM_NAMESPACE 1
25291 EOF
25292
25293         fi
25294 fi
25295
25296 echo "$as_me:25296: checking if we should include stdbool.h" >&5
25297 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25298
25299 if test "${cf_cv_header_stdbool_h+set}" = set; then
25300   echo $ECHO_N "(cached) $ECHO_C" >&6
25301 else
25302
25303         cat >"conftest.$ac_ext" <<_ACEOF
25304 #line 25304 "configure"
25305 #include "confdefs.h"
25306
25307 int
25308 main (void)
25309 {
25310 bool foo = false
25311   ;
25312   return 0;
25313 }
25314 _ACEOF
25315 rm -f "conftest.$ac_objext"
25316 if { (eval echo "$as_me:25316: \"$ac_compile\"") >&5
25317   (eval $ac_compile) 2>&5
25318   ac_status=$?
25319   echo "$as_me:25319: \$? = $ac_status" >&5
25320   (exit "$ac_status"); } &&
25321          { ac_try='test -s "conftest.$ac_objext"'
25322   { (eval echo "$as_me:25322: \"$ac_try\"") >&5
25323   (eval $ac_try) 2>&5
25324   ac_status=$?
25325   echo "$as_me:25325: \$? = $ac_status" >&5
25326   (exit "$ac_status"); }; }; then
25327   cf_cv_header_stdbool_h=0
25328 else
25329   echo "$as_me: failed program was:" >&5
25330 cat "conftest.$ac_ext" >&5
25331 cat >"conftest.$ac_ext" <<_ACEOF
25332 #line 25332 "configure"
25333 #include "confdefs.h"
25334
25335 #ifndef __BEOS__
25336 #include <stdbool.h>
25337 #endif
25338
25339 int
25340 main (void)
25341 {
25342 bool foo = false
25343   ;
25344   return 0;
25345 }
25346 _ACEOF
25347 rm -f "conftest.$ac_objext"
25348 if { (eval echo "$as_me:25348: \"$ac_compile\"") >&5
25349   (eval $ac_compile) 2>&5
25350   ac_status=$?
25351   echo "$as_me:25351: \$? = $ac_status" >&5
25352   (exit "$ac_status"); } &&
25353          { ac_try='test -s "conftest.$ac_objext"'
25354   { (eval echo "$as_me:25354: \"$ac_try\"") >&5
25355   (eval $ac_try) 2>&5
25356   ac_status=$?
25357   echo "$as_me:25357: \$? = $ac_status" >&5
25358   (exit "$ac_status"); }; }; then
25359   cf_cv_header_stdbool_h=1
25360 else
25361   echo "$as_me: failed program was:" >&5
25362 cat "conftest.$ac_ext" >&5
25363 cf_cv_header_stdbool_h=0
25364 fi
25365 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25366 fi
25367 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25368 fi
25369
25370 if test "$cf_cv_header_stdbool_h" = 1
25371 then    echo "$as_me:25371: result: yes" >&5
25372 echo "${ECHO_T}yes" >&6
25373 else    echo "$as_me:25373: result: no" >&5
25374 echo "${ECHO_T}no" >&6
25375 fi
25376
25377 echo "$as_me:25377: checking for builtin bool type" >&5
25378 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25379
25380 if test "${cf_cv_builtin_bool+set}" = set; then
25381   echo $ECHO_N "(cached) $ECHO_C" >&6
25382 else
25383
25384         cat >"conftest.$ac_ext" <<_ACEOF
25385 #line 25385 "configure"
25386 #include "confdefs.h"
25387
25388 #include <stdio.h>
25389 #include <sys/types.h>
25390
25391 int
25392 main (void)
25393 {
25394 bool x = false
25395   ;
25396   return 0;
25397 }
25398 _ACEOF
25399 rm -f "conftest.$ac_objext"
25400 if { (eval echo "$as_me:25400: \"$ac_compile\"") >&5
25401   (eval $ac_compile) 2>&5
25402   ac_status=$?
25403   echo "$as_me:25403: \$? = $ac_status" >&5
25404   (exit "$ac_status"); } &&
25405          { ac_try='test -s "conftest.$ac_objext"'
25406   { (eval echo "$as_me:25406: \"$ac_try\"") >&5
25407   (eval $ac_try) 2>&5
25408   ac_status=$?
25409   echo "$as_me:25409: \$? = $ac_status" >&5
25410   (exit "$ac_status"); }; }; then
25411   cf_cv_builtin_bool=1
25412 else
25413   echo "$as_me: failed program was:" >&5
25414 cat "conftest.$ac_ext" >&5
25415 cf_cv_builtin_bool=0
25416 fi
25417 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25418
25419 fi
25420
25421 if test "$cf_cv_builtin_bool" = 1
25422 then    echo "$as_me:25422: result: yes" >&5
25423 echo "${ECHO_T}yes" >&6
25424 else    echo "$as_me:25424: result: no" >&5
25425 echo "${ECHO_T}no" >&6
25426 fi
25427
25428 echo "$as_me:25428: checking for bool" >&5
25429 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25430 if test "${ac_cv_type_bool+set}" = set; then
25431   echo $ECHO_N "(cached) $ECHO_C" >&6
25432 else
25433   cat >"conftest.$ac_ext" <<_ACEOF
25434 #line 25434 "configure"
25435 #include "confdefs.h"
25436
25437 #include <stdlib.h>
25438 #include <stdio.h>
25439
25440 #if defined(__cplusplus)
25441
25442 #ifdef HAVE_GXX_BUILTIN_H
25443 #include <g++/builtin.h>
25444 #elif HAVE_GPP_BUILTIN_H
25445 #include <gpp/builtin.h>
25446 #elif HAVE_BUILTIN_H
25447 #include <builtin.h>
25448 #endif
25449
25450 #else
25451
25452 #if $cf_cv_header_stdbool_h
25453 #include <stdbool.h>
25454 #endif
25455
25456 #endif
25457
25458 int
25459 main (void)
25460 {
25461 if ((bool *) 0)
25462   return 0;
25463 if (sizeof (bool))
25464   return 0;
25465   ;
25466   return 0;
25467 }
25468 _ACEOF
25469 rm -f "conftest.$ac_objext"
25470 if { (eval echo "$as_me:25470: \"$ac_compile\"") >&5
25471   (eval $ac_compile) 2>&5
25472   ac_status=$?
25473   echo "$as_me:25473: \$? = $ac_status" >&5
25474   (exit "$ac_status"); } &&
25475          { ac_try='test -s "conftest.$ac_objext"'
25476   { (eval echo "$as_me:25476: \"$ac_try\"") >&5
25477   (eval $ac_try) 2>&5
25478   ac_status=$?
25479   echo "$as_me:25479: \$? = $ac_status" >&5
25480   (exit "$ac_status"); }; }; then
25481   ac_cv_type_bool=yes
25482 else
25483   echo "$as_me: failed program was:" >&5
25484 cat "conftest.$ac_ext" >&5
25485 ac_cv_type_bool=no
25486 fi
25487 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25488 fi
25489 echo "$as_me:25489: result: $ac_cv_type_bool" >&5
25490 echo "${ECHO_T}$ac_cv_type_bool" >&6
25491
25492 echo "$as_me:25492: checking size of bool" >&5
25493 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25494 if test "${ac_cv_sizeof_bool+set}" = set; then
25495   echo $ECHO_N "(cached) $ECHO_C" >&6
25496 else
25497   if test "$ac_cv_type_bool" = yes; then
25498   if test "$cross_compiling" = yes; then
25499   # Depending upon the size, compute the lo and hi bounds.
25500 cat >"conftest.$ac_ext" <<_ACEOF
25501 #line 25501 "configure"
25502 #include "confdefs.h"
25503
25504 #include <stdlib.h>
25505 #include <stdio.h>
25506
25507 #if defined(__cplusplus)
25508
25509 #ifdef HAVE_GXX_BUILTIN_H
25510 #include <g++/builtin.h>
25511 #elif HAVE_GPP_BUILTIN_H
25512 #include <gpp/builtin.h>
25513 #elif HAVE_BUILTIN_H
25514 #include <builtin.h>
25515 #endif
25516
25517 #else
25518
25519 #if $cf_cv_header_stdbool_h
25520 #include <stdbool.h>
25521 #endif
25522
25523 #endif
25524
25525 int
25526 main (void)
25527 {
25528 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25529   ;
25530   return 0;
25531 }
25532 _ACEOF
25533 rm -f "conftest.$ac_objext"
25534 if { (eval echo "$as_me:25534: \"$ac_compile\"") >&5
25535   (eval $ac_compile) 2>&5
25536   ac_status=$?
25537   echo "$as_me:25537: \$? = $ac_status" >&5
25538   (exit "$ac_status"); } &&
25539          { ac_try='test -s "conftest.$ac_objext"'
25540   { (eval echo "$as_me:25540: \"$ac_try\"") >&5
25541   (eval $ac_try) 2>&5
25542   ac_status=$?
25543   echo "$as_me:25543: \$? = $ac_status" >&5
25544   (exit "$ac_status"); }; }; then
25545   ac_lo=0 ac_mid=0
25546   while :; do
25547     cat >"conftest.$ac_ext" <<_ACEOF
25548 #line 25548 "configure"
25549 #include "confdefs.h"
25550
25551 #include <stdlib.h>
25552 #include <stdio.h>
25553
25554 #if defined(__cplusplus)
25555
25556 #ifdef HAVE_GXX_BUILTIN_H
25557 #include <g++/builtin.h>
25558 #elif HAVE_GPP_BUILTIN_H
25559 #include <gpp/builtin.h>
25560 #elif HAVE_BUILTIN_H
25561 #include <builtin.h>
25562 #endif
25563
25564 #else
25565
25566 #if $cf_cv_header_stdbool_h
25567 #include <stdbool.h>
25568 #endif
25569
25570 #endif
25571
25572 int
25573 main (void)
25574 {
25575 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25576   ;
25577   return 0;
25578 }
25579 _ACEOF
25580 rm -f "conftest.$ac_objext"
25581 if { (eval echo "$as_me:25581: \"$ac_compile\"") >&5
25582   (eval $ac_compile) 2>&5
25583   ac_status=$?
25584   echo "$as_me:25584: \$? = $ac_status" >&5
25585   (exit "$ac_status"); } &&
25586          { ac_try='test -s "conftest.$ac_objext"'
25587   { (eval echo "$as_me:25587: \"$ac_try\"") >&5
25588   (eval $ac_try) 2>&5
25589   ac_status=$?
25590   echo "$as_me:25590: \$? = $ac_status" >&5
25591   (exit "$ac_status"); }; }; then
25592   ac_hi=$ac_mid; break
25593 else
25594   echo "$as_me: failed program was:" >&5
25595 cat "conftest.$ac_ext" >&5
25596 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25597 fi
25598 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25599   done
25600 else
25601   echo "$as_me: failed program was:" >&5
25602 cat "conftest.$ac_ext" >&5
25603 ac_hi=-1 ac_mid=-1
25604   while :; do
25605     cat >"conftest.$ac_ext" <<_ACEOF
25606 #line 25606 "configure"
25607 #include "confdefs.h"
25608
25609 #include <stdlib.h>
25610 #include <stdio.h>
25611
25612 #if defined(__cplusplus)
25613
25614 #ifdef HAVE_GXX_BUILTIN_H
25615 #include <g++/builtin.h>
25616 #elif HAVE_GPP_BUILTIN_H
25617 #include <gpp/builtin.h>
25618 #elif HAVE_BUILTIN_H
25619 #include <builtin.h>
25620 #endif
25621
25622 #else
25623
25624 #if $cf_cv_header_stdbool_h
25625 #include <stdbool.h>
25626 #endif
25627
25628 #endif
25629
25630 int
25631 main (void)
25632 {
25633 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25634   ;
25635   return 0;
25636 }
25637 _ACEOF
25638 rm -f "conftest.$ac_objext"
25639 if { (eval echo "$as_me:25639: \"$ac_compile\"") >&5
25640   (eval $ac_compile) 2>&5
25641   ac_status=$?
25642   echo "$as_me:25642: \$? = $ac_status" >&5
25643   (exit "$ac_status"); } &&
25644          { ac_try='test -s "conftest.$ac_objext"'
25645   { (eval echo "$as_me:25645: \"$ac_try\"") >&5
25646   (eval $ac_try) 2>&5
25647   ac_status=$?
25648   echo "$as_me:25648: \$? = $ac_status" >&5
25649   (exit "$ac_status"); }; }; then
25650   ac_lo=$ac_mid; break
25651 else
25652   echo "$as_me: failed program was:" >&5
25653 cat "conftest.$ac_ext" >&5
25654 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25655 fi
25656 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25657   done
25658 fi
25659 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25660 # Binary search between lo and hi bounds.
25661 while test "x$ac_lo" != "x$ac_hi"; do
25662   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25663   cat >"conftest.$ac_ext" <<_ACEOF
25664 #line 25664 "configure"
25665 #include "confdefs.h"
25666
25667 #include <stdlib.h>
25668 #include <stdio.h>
25669
25670 #if defined(__cplusplus)
25671
25672 #ifdef HAVE_GXX_BUILTIN_H
25673 #include <g++/builtin.h>
25674 #elif HAVE_GPP_BUILTIN_H
25675 #include <gpp/builtin.h>
25676 #elif HAVE_BUILTIN_H
25677 #include <builtin.h>
25678 #endif
25679
25680 #else
25681
25682 #if $cf_cv_header_stdbool_h
25683 #include <stdbool.h>
25684 #endif
25685
25686 #endif
25687
25688 int
25689 main (void)
25690 {
25691 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25692   ;
25693   return 0;
25694 }
25695 _ACEOF
25696 rm -f "conftest.$ac_objext"
25697 if { (eval echo "$as_me:25697: \"$ac_compile\"") >&5
25698   (eval $ac_compile) 2>&5
25699   ac_status=$?
25700   echo "$as_me:25700: \$? = $ac_status" >&5
25701   (exit "$ac_status"); } &&
25702          { ac_try='test -s "conftest.$ac_objext"'
25703   { (eval echo "$as_me:25703: \"$ac_try\"") >&5
25704   (eval $ac_try) 2>&5
25705   ac_status=$?
25706   echo "$as_me:25706: \$? = $ac_status" >&5
25707   (exit "$ac_status"); }; }; then
25708   ac_hi=$ac_mid
25709 else
25710   echo "$as_me: failed program was:" >&5
25711 cat "conftest.$ac_ext" >&5
25712 ac_lo=`expr "$ac_mid" + 1`
25713 fi
25714 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25715 done
25716 ac_cv_sizeof_bool=$ac_lo
25717 else
25718   if test "$cross_compiling" = yes; then
25719   { { echo "$as_me:25719: error: cannot run test program while cross compiling" >&5
25720 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25721    { (exit 1); exit 1; }; }
25722 else
25723   cat >"conftest.$ac_ext" <<_ACEOF
25724 #line 25724 "configure"
25725 #include "confdefs.h"
25726
25727 #include <stdlib.h>
25728 #include <stdio.h>
25729
25730 #if defined(__cplusplus)
25731
25732 #ifdef HAVE_GXX_BUILTIN_H
25733 #include <g++/builtin.h>
25734 #elif HAVE_GPP_BUILTIN_H
25735 #include <gpp/builtin.h>
25736 #elif HAVE_BUILTIN_H
25737 #include <builtin.h>
25738 #endif
25739
25740 #else
25741
25742 #if $cf_cv_header_stdbool_h
25743 #include <stdbool.h>
25744 #endif
25745
25746 #endif
25747
25748 int
25749 main (void)
25750 {
25751 FILE *f = fopen ("conftest.val", "w");
25752 if (!f)
25753   $ac_main_return (1);
25754 fprintf (f, "%ld", (long)(sizeof (bool)));
25755 fclose (f);
25756   ;
25757   return 0;
25758 }
25759 _ACEOF
25760 rm -f "conftest$ac_exeext"
25761 if { (eval echo "$as_me:25761: \"$ac_link\"") >&5
25762   (eval $ac_link) 2>&5
25763   ac_status=$?
25764   echo "$as_me:25764: \$? = $ac_status" >&5
25765   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25766   { (eval echo "$as_me:25766: \"$ac_try\"") >&5
25767   (eval $ac_try) 2>&5
25768   ac_status=$?
25769   echo "$as_me:25769: \$? = $ac_status" >&5
25770   (exit "$ac_status"); }; }; then
25771   ac_cv_sizeof_bool=`cat conftest.val`
25772 else
25773   echo "$as_me: program exited with status $ac_status" >&5
25774 echo "$as_me: failed program was:" >&5
25775 cat "conftest.$ac_ext" >&5
25776 fi
25777 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25778 fi
25779 fi
25780 rm -f conftest.val
25781 else
25782   ac_cv_sizeof_bool=0
25783 fi
25784 fi
25785 echo "$as_me:25785: result: $ac_cv_sizeof_bool" >&5
25786 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25787 cat >>confdefs.h <<EOF
25788 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25789 EOF
25790
25791 echo "$as_me:25791: checking for type of bool" >&5
25792 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25793 if test "${cf_cv_type_of_bool+set}" = set; then
25794   echo $ECHO_N "(cached) $ECHO_C" >&6
25795 else
25796
25797         rm -f cf_test.out
25798         if test "$cross_compiling" = yes; then
25799
25800                 case x$ac_cv_sizeof_bool in
25801                 (x1) cf_cv_type_of_bool="unsigned char";;
25802                 (x2) cf_cv_type_of_bool="unsigned short";;
25803                 (x4) cf_cv_type_of_bool="unsigned int";;
25804                 (x8) cf_cv_type_of_bool="unsigned long";;
25805                 (*)  cf_cv_type_of_bool=unknown;;
25806                 esac
25807
25808 else
25809   cat >"conftest.$ac_ext" <<_ACEOF
25810 #line 25810 "configure"
25811 #include "confdefs.h"
25812
25813 #include <stdlib.h>
25814 #include <stdio.h>
25815
25816 #if defined(__cplusplus)
25817
25818 #ifdef HAVE_GXX_BUILTIN_H
25819 #include <g++/builtin.h>
25820 #elif HAVE_GPP_BUILTIN_H
25821 #include <gpp/builtin.h>
25822 #elif HAVE_BUILTIN_H
25823 #include <builtin.h>
25824 #endif
25825
25826 #else
25827
25828 #if $cf_cv_header_stdbool_h
25829 #include <stdbool.h>
25830 #endif
25831
25832 #endif
25833
25834 int main(void)
25835 {
25836         FILE *fp = fopen("cf_test.out", "w");
25837         if (fp != 0) {
25838                 bool x = true;
25839                 if ((bool)(-x) >= 0)
25840                         fputs("unsigned ", fp);
25841                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25842                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25843                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25844                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25845                 fclose(fp);
25846         }
25847         ${cf_cv_main_return:-return}(0);
25848 }
25849
25850 _ACEOF
25851 rm -f "conftest$ac_exeext"
25852 if { (eval echo "$as_me:25852: \"$ac_link\"") >&5
25853   (eval $ac_link) 2>&5
25854   ac_status=$?
25855   echo "$as_me:25855: \$? = $ac_status" >&5
25856   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25857   { (eval echo "$as_me:25857: \"$ac_try\"") >&5
25858   (eval $ac_try) 2>&5
25859   ac_status=$?
25860   echo "$as_me:25860: \$? = $ac_status" >&5
25861   (exit "$ac_status"); }; }; then
25862   cf_cv_type_of_bool=`cat cf_test.out`
25863                  if test -z "$cf_cv_type_of_bool"; then
25864                    cf_cv_type_of_bool=unknown
25865                  fi
25866 else
25867   echo "$as_me: program exited with status $ac_status" >&5
25868 echo "$as_me: failed program was:" >&5
25869 cat "conftest.$ac_ext" >&5
25870 cf_cv_type_of_bool=unknown
25871 fi
25872 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25873 fi
25874         rm -f cf_test.out
25875
25876 fi
25877 echo "$as_me:25877: result: $cf_cv_type_of_bool" >&5
25878 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25879
25880 if test "$cf_cv_type_of_bool" = unknown ; then
25881         case .$NCURSES_BOOL in
25882         (.auto|.) NCURSES_BOOL=unsigned;;
25883         esac
25884         { echo "$as_me:25884: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25885 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25886         cf_cv_type_of_bool=$NCURSES_BOOL
25887 fi
25888
25889 echo "$as_me:25889: checking for special defines needed for etip.h" >&5
25890 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25891 cf_save_CXXFLAGS="$CXXFLAGS"
25892 cf_result="none"
25893
25894 # etip.h includes ncurses.h which includes ncurses_dll.h
25895 # But ncurses_dll.h is generated - fix here.
25896 test -d include || mkdir include
25897 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
25898
25899 for cf_math in "" MATH_H
25900 do
25901 for cf_excp in "" MATH_EXCEPTION
25902 do
25903         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25904         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25905         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25906 cat >"conftest.$ac_ext" <<_ACEOF
25907 #line 25907 "configure"
25908 #include "confdefs.h"
25909
25910 #include <etip.h.in>
25911
25912 int
25913 main (void)
25914 {
25915
25916   ;
25917   return 0;
25918 }
25919 _ACEOF
25920 rm -f "conftest.$ac_objext"
25921 if { (eval echo "$as_me:25921: \"$ac_compile\"") >&5
25922   (eval $ac_compile) 2>&5
25923   ac_status=$?
25924   echo "$as_me:25924: \$? = $ac_status" >&5
25925   (exit "$ac_status"); } &&
25926          { ac_try='test -s "conftest.$ac_objext"'
25927   { (eval echo "$as_me:25927: \"$ac_try\"") >&5
25928   (eval $ac_try) 2>&5
25929   ac_status=$?
25930   echo "$as_me:25930: \$? = $ac_status" >&5
25931   (exit "$ac_status"); }; }; then
25932
25933         test -n "$cf_math" && cat >>confdefs.h <<EOF
25934 #define ETIP_NEEDS_${cf_math} 1
25935 EOF
25936
25937         test -n "$cf_excp" && cat >>confdefs.h <<EOF
25938 #define ETIP_NEEDS_${cf_excp} 1
25939 EOF
25940
25941         cf_result="$cf_math $cf_excp"
25942         break 2
25943
25944 else
25945   echo "$as_me: failed program was:" >&5
25946 cat "conftest.$ac_ext" >&5
25947 fi
25948 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25949 done
25950 done
25951 echo "$as_me:25951: result: $cf_result" >&5
25952 echo "${ECHO_T}$cf_result" >&6
25953 CXXFLAGS="$cf_save_CXXFLAGS"
25954
25955 if test -n "$CXX"; then
25956 echo "$as_me:25956: checking if $CXX accepts parameter initialization" >&5
25957 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
25958 if test "${cf_cv_cpp_param_init+set}" = set; then
25959   echo $ECHO_N "(cached) $ECHO_C" >&6
25960 else
25961
25962         ac_ext=cc
25963 ac_cpp='$CXXCPP $CPPFLAGS'
25964 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25965 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25966 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25967 ac_main_return="return"
25968
25969         if test "$cross_compiling" = yes; then
25970   cf_cv_cpp_param_init=unknown
25971 else
25972   cat >"conftest.$ac_ext" <<_ACEOF
25973 #line 25973 "configure"
25974 #include "confdefs.h"
25975
25976 class TEST {
25977 private:
25978         int value;
25979 public:
25980         TEST(int x = 1);
25981         ~TEST();
25982 };
25983
25984 TEST::TEST(int x = 1)   // some compilers do not like second initializer
25985 {
25986         value = x;
25987 }
25988 int main(void) { }
25989
25990 _ACEOF
25991 rm -f "conftest$ac_exeext"
25992 if { (eval echo "$as_me:25992: \"$ac_link\"") >&5
25993   (eval $ac_link) 2>&5
25994   ac_status=$?
25995   echo "$as_me:25995: \$? = $ac_status" >&5
25996   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25997   { (eval echo "$as_me:25997: \"$ac_try\"") >&5
25998   (eval $ac_try) 2>&5
25999   ac_status=$?
26000   echo "$as_me:26000: \$? = $ac_status" >&5
26001   (exit "$ac_status"); }; }; then
26002   cf_cv_cpp_param_init=yes
26003 else
26004   echo "$as_me: program exited with status $ac_status" >&5
26005 echo "$as_me: failed program was:" >&5
26006 cat "conftest.$ac_ext" >&5
26007 cf_cv_cpp_param_init=no
26008 fi
26009 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26010 fi
26011         ac_ext=cc
26012 ac_cpp='$CXXCPP $CPPFLAGS'
26013 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26014 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26015 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26016 ac_main_return="return"
26017
26018 fi
26019 echo "$as_me:26019: result: $cf_cv_cpp_param_init" >&5
26020 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26021 fi
26022 test "$cf_cv_cpp_param_init" = yes &&
26023 cat >>confdefs.h <<\EOF
26024 #define CPP_HAS_PARAM_INIT 1
26025 EOF
26026
26027 if test -n "$CXX"; then
26028
26029 echo "$as_me:26029: checking if $CXX accepts static_cast" >&5
26030 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26031 if test "${cf_cv_cpp_static_cast+set}" = set; then
26032   echo $ECHO_N "(cached) $ECHO_C" >&6
26033 else
26034
26035         ac_ext=cc
26036 ac_cpp='$CXXCPP $CPPFLAGS'
26037 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26038 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26039 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26040 ac_main_return="return"
26041
26042         cat >"conftest.$ac_ext" <<_ACEOF
26043 #line 26043 "configure"
26044 #include "confdefs.h"
26045
26046 class NCursesPanel
26047 {
26048 public:
26049   NCursesPanel(int nlines,
26050                int ncols,
26051                int begin_y = 0,
26052                int begin_x = 0)
26053   {
26054   }
26055   NCursesPanel();
26056   ~NCursesPanel();
26057 };
26058
26059 template<class T> class NCursesUserPanel : public NCursesPanel
26060 {
26061 public:
26062   NCursesUserPanel (int nlines,
26063                     int ncols,
26064                     int begin_y = 0,
26065                     int begin_x = 0,
26066                     const T* p_UserData = static_cast<T*>(0))
26067     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26068   {
26069   };
26070   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26071   {
26072   };
26073
26074   virtual ~NCursesUserPanel() {};
26075 };
26076
26077 int
26078 main (void)
26079 {
26080
26081         const char* p_UserData = static_cast<char*>(0)
26082   ;
26083   return 0;
26084 }
26085 _ACEOF
26086 rm -f "conftest.$ac_objext"
26087 if { (eval echo "$as_me:26087: \"$ac_compile\"") >&5
26088   (eval $ac_compile) 2>&5
26089   ac_status=$?
26090   echo "$as_me:26090: \$? = $ac_status" >&5
26091   (exit "$ac_status"); } &&
26092          { ac_try='test -s "conftest.$ac_objext"'
26093   { (eval echo "$as_me:26093: \"$ac_try\"") >&5
26094   (eval $ac_try) 2>&5
26095   ac_status=$?
26096   echo "$as_me:26096: \$? = $ac_status" >&5
26097   (exit "$ac_status"); }; }; then
26098   cf_cv_cpp_static_cast=yes
26099 else
26100   echo "$as_me: failed program was:" >&5
26101 cat "conftest.$ac_ext" >&5
26102 cf_cv_cpp_static_cast=no
26103 fi
26104 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26105
26106         ac_ext=cc
26107 ac_cpp='$CXXCPP $CPPFLAGS'
26108 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26109 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26110 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26111 ac_main_return="return"
26112
26113 fi
26114 echo "$as_me:26114: result: $cf_cv_cpp_static_cast" >&5
26115 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26116
26117 fi
26118
26119 test "$cf_cv_cpp_static_cast" = yes &&
26120 cat >>confdefs.h <<\EOF
26121 #define CPP_HAS_STATIC_CAST 1
26122 EOF
26123
26124         CXX_AR='$(AR)'
26125         CXX_ARFLAGS='$(ARFLAGS)'
26126         case "$cf_cv_system_name" in
26127         (irix*)
26128             if test "$GXX" != yes ; then
26129                 CXX_AR='$(CXX)'
26130                 CXX_ARFLAGS='-ar -o'
26131             fi
26132             ;;
26133         (sco3.2v5*)
26134             CXXLDFLAGS="-u main"
26135             ;;
26136         (solaris2*)
26137             if test "$GXX" != yes ; then
26138                 CXX_AR='$(CXX)'
26139                 CXX_ARFLAGS='-xar -o'
26140             fi
26141             ;;
26142         esac
26143
26144 else
26145         cf_cxx_library=no
26146         cf_cv_builtin_bool=1
26147
26148         # Just because we are not configuring against C++ right now does not
26149         # mean that a user will not want to use C++.  Some distributors disable
26150         # the C++ portion of this configuration as a shortcut (or just to avoid
26151         # compiling the demo in the c++ directory).  So we need a reasonable
26152         # default for the 'bool' type.
26153         #
26154         # Caveat: since the storage of the bool type is not standardized, it
26155         # may change.
26156
26157         if test "$NCURSES_BOOL" != auto ; then
26158                 cf_cv_type_of_bool=$NCURSES_BOOL
26159                 cf_cv_header_stdbool_h=0
26160         else
26161                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26162
26163 echo "$as_me:26163: checking for bool" >&5
26164 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26165 if test "${ac_cv_type_bool+set}" = set; then
26166   echo $ECHO_N "(cached) $ECHO_C" >&6
26167 else
26168   cat >"conftest.$ac_ext" <<_ACEOF
26169 #line 26169 "configure"
26170 #include "confdefs.h"
26171
26172 #include <stdlib.h>
26173 #include <stdio.h>
26174
26175 #if defined(__cplusplus)
26176
26177 #ifdef HAVE_GXX_BUILTIN_H
26178 #include <g++/builtin.h>
26179 #elif HAVE_GPP_BUILTIN_H
26180 #include <gpp/builtin.h>
26181 #elif HAVE_BUILTIN_H
26182 #include <builtin.h>
26183 #endif
26184
26185 #else
26186
26187 #if $cf_cv_header_stdbool_h
26188 #include <stdbool.h>
26189 #endif
26190
26191 #endif
26192
26193 int
26194 main (void)
26195 {
26196 if ((bool *) 0)
26197   return 0;
26198 if (sizeof (bool))
26199   return 0;
26200   ;
26201   return 0;
26202 }
26203 _ACEOF
26204 rm -f "conftest.$ac_objext"
26205 if { (eval echo "$as_me:26205: \"$ac_compile\"") >&5
26206   (eval $ac_compile) 2>&5
26207   ac_status=$?
26208   echo "$as_me:26208: \$? = $ac_status" >&5
26209   (exit "$ac_status"); } &&
26210          { ac_try='test -s "conftest.$ac_objext"'
26211   { (eval echo "$as_me:26211: \"$ac_try\"") >&5
26212   (eval $ac_try) 2>&5
26213   ac_status=$?
26214   echo "$as_me:26214: \$? = $ac_status" >&5
26215   (exit "$ac_status"); }; }; then
26216   ac_cv_type_bool=yes
26217 else
26218   echo "$as_me: failed program was:" >&5
26219 cat "conftest.$ac_ext" >&5
26220 ac_cv_type_bool=no
26221 fi
26222 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26223 fi
26224 echo "$as_me:26224: result: $ac_cv_type_bool" >&5
26225 echo "${ECHO_T}$ac_cv_type_bool" >&6
26226
26227 echo "$as_me:26227: checking size of bool" >&5
26228 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26229 if test "${ac_cv_sizeof_bool+set}" = set; then
26230   echo $ECHO_N "(cached) $ECHO_C" >&6
26231 else
26232   if test "$ac_cv_type_bool" = yes; then
26233   if test "$cross_compiling" = yes; then
26234   # Depending upon the size, compute the lo and hi bounds.
26235 cat >"conftest.$ac_ext" <<_ACEOF
26236 #line 26236 "configure"
26237 #include "confdefs.h"
26238
26239 #include <stdlib.h>
26240 #include <stdio.h>
26241
26242 #if defined(__cplusplus)
26243
26244 #ifdef HAVE_GXX_BUILTIN_H
26245 #include <g++/builtin.h>
26246 #elif HAVE_GPP_BUILTIN_H
26247 #include <gpp/builtin.h>
26248 #elif HAVE_BUILTIN_H
26249 #include <builtin.h>
26250 #endif
26251
26252 #else
26253
26254 #if $cf_cv_header_stdbool_h
26255 #include <stdbool.h>
26256 #endif
26257
26258 #endif
26259
26260 int
26261 main (void)
26262 {
26263 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26264   ;
26265   return 0;
26266 }
26267 _ACEOF
26268 rm -f "conftest.$ac_objext"
26269 if { (eval echo "$as_me:26269: \"$ac_compile\"") >&5
26270   (eval $ac_compile) 2>&5
26271   ac_status=$?
26272   echo "$as_me:26272: \$? = $ac_status" >&5
26273   (exit "$ac_status"); } &&
26274          { ac_try='test -s "conftest.$ac_objext"'
26275   { (eval echo "$as_me:26275: \"$ac_try\"") >&5
26276   (eval $ac_try) 2>&5
26277   ac_status=$?
26278   echo "$as_me:26278: \$? = $ac_status" >&5
26279   (exit "$ac_status"); }; }; then
26280   ac_lo=0 ac_mid=0
26281   while :; do
26282     cat >"conftest.$ac_ext" <<_ACEOF
26283 #line 26283 "configure"
26284 #include "confdefs.h"
26285
26286 #include <stdlib.h>
26287 #include <stdio.h>
26288
26289 #if defined(__cplusplus)
26290
26291 #ifdef HAVE_GXX_BUILTIN_H
26292 #include <g++/builtin.h>
26293 #elif HAVE_GPP_BUILTIN_H
26294 #include <gpp/builtin.h>
26295 #elif HAVE_BUILTIN_H
26296 #include <builtin.h>
26297 #endif
26298
26299 #else
26300
26301 #if $cf_cv_header_stdbool_h
26302 #include <stdbool.h>
26303 #endif
26304
26305 #endif
26306
26307 int
26308 main (void)
26309 {
26310 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26311   ;
26312   return 0;
26313 }
26314 _ACEOF
26315 rm -f "conftest.$ac_objext"
26316 if { (eval echo "$as_me:26316: \"$ac_compile\"") >&5
26317   (eval $ac_compile) 2>&5
26318   ac_status=$?
26319   echo "$as_me:26319: \$? = $ac_status" >&5
26320   (exit "$ac_status"); } &&
26321          { ac_try='test -s "conftest.$ac_objext"'
26322   { (eval echo "$as_me:26322: \"$ac_try\"") >&5
26323   (eval $ac_try) 2>&5
26324   ac_status=$?
26325   echo "$as_me:26325: \$? = $ac_status" >&5
26326   (exit "$ac_status"); }; }; then
26327   ac_hi=$ac_mid; break
26328 else
26329   echo "$as_me: failed program was:" >&5
26330 cat "conftest.$ac_ext" >&5
26331 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26332 fi
26333 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26334   done
26335 else
26336   echo "$as_me: failed program was:" >&5
26337 cat "conftest.$ac_ext" >&5
26338 ac_hi=-1 ac_mid=-1
26339   while :; do
26340     cat >"conftest.$ac_ext" <<_ACEOF
26341 #line 26341 "configure"
26342 #include "confdefs.h"
26343
26344 #include <stdlib.h>
26345 #include <stdio.h>
26346
26347 #if defined(__cplusplus)
26348
26349 #ifdef HAVE_GXX_BUILTIN_H
26350 #include <g++/builtin.h>
26351 #elif HAVE_GPP_BUILTIN_H
26352 #include <gpp/builtin.h>
26353 #elif HAVE_BUILTIN_H
26354 #include <builtin.h>
26355 #endif
26356
26357 #else
26358
26359 #if $cf_cv_header_stdbool_h
26360 #include <stdbool.h>
26361 #endif
26362
26363 #endif
26364
26365 int
26366 main (void)
26367 {
26368 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26369   ;
26370   return 0;
26371 }
26372 _ACEOF
26373 rm -f "conftest.$ac_objext"
26374 if { (eval echo "$as_me:26374: \"$ac_compile\"") >&5
26375   (eval $ac_compile) 2>&5
26376   ac_status=$?
26377   echo "$as_me:26377: \$? = $ac_status" >&5
26378   (exit "$ac_status"); } &&
26379          { ac_try='test -s "conftest.$ac_objext"'
26380   { (eval echo "$as_me:26380: \"$ac_try\"") >&5
26381   (eval $ac_try) 2>&5
26382   ac_status=$?
26383   echo "$as_me:26383: \$? = $ac_status" >&5
26384   (exit "$ac_status"); }; }; then
26385   ac_lo=$ac_mid; break
26386 else
26387   echo "$as_me: failed program was:" >&5
26388 cat "conftest.$ac_ext" >&5
26389 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26390 fi
26391 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26392   done
26393 fi
26394 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26395 # Binary search between lo and hi bounds.
26396 while test "x$ac_lo" != "x$ac_hi"; do
26397   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26398   cat >"conftest.$ac_ext" <<_ACEOF
26399 #line 26399 "configure"
26400 #include "confdefs.h"
26401
26402 #include <stdlib.h>
26403 #include <stdio.h>
26404
26405 #if defined(__cplusplus)
26406
26407 #ifdef HAVE_GXX_BUILTIN_H
26408 #include <g++/builtin.h>
26409 #elif HAVE_GPP_BUILTIN_H
26410 #include <gpp/builtin.h>
26411 #elif HAVE_BUILTIN_H
26412 #include <builtin.h>
26413 #endif
26414
26415 #else
26416
26417 #if $cf_cv_header_stdbool_h
26418 #include <stdbool.h>
26419 #endif
26420
26421 #endif
26422
26423 int
26424 main (void)
26425 {
26426 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26427   ;
26428   return 0;
26429 }
26430 _ACEOF
26431 rm -f "conftest.$ac_objext"
26432 if { (eval echo "$as_me:26432: \"$ac_compile\"") >&5
26433   (eval $ac_compile) 2>&5
26434   ac_status=$?
26435   echo "$as_me:26435: \$? = $ac_status" >&5
26436   (exit "$ac_status"); } &&
26437          { ac_try='test -s "conftest.$ac_objext"'
26438   { (eval echo "$as_me:26438: \"$ac_try\"") >&5
26439   (eval $ac_try) 2>&5
26440   ac_status=$?
26441   echo "$as_me:26441: \$? = $ac_status" >&5
26442   (exit "$ac_status"); }; }; then
26443   ac_hi=$ac_mid
26444 else
26445   echo "$as_me: failed program was:" >&5
26446 cat "conftest.$ac_ext" >&5
26447 ac_lo=`expr "$ac_mid" + 1`
26448 fi
26449 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26450 done
26451 ac_cv_sizeof_bool=$ac_lo
26452 else
26453   if test "$cross_compiling" = yes; then
26454   { { echo "$as_me:26454: error: cannot run test program while cross compiling" >&5
26455 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26456    { (exit 1); exit 1; }; }
26457 else
26458   cat >"conftest.$ac_ext" <<_ACEOF
26459 #line 26459 "configure"
26460 #include "confdefs.h"
26461
26462 #include <stdlib.h>
26463 #include <stdio.h>
26464
26465 #if defined(__cplusplus)
26466
26467 #ifdef HAVE_GXX_BUILTIN_H
26468 #include <g++/builtin.h>
26469 #elif HAVE_GPP_BUILTIN_H
26470 #include <gpp/builtin.h>
26471 #elif HAVE_BUILTIN_H
26472 #include <builtin.h>
26473 #endif
26474
26475 #else
26476
26477 #if $cf_cv_header_stdbool_h
26478 #include <stdbool.h>
26479 #endif
26480
26481 #endif
26482
26483 int
26484 main (void)
26485 {
26486 FILE *f = fopen ("conftest.val", "w");
26487 if (!f)
26488   $ac_main_return (1);
26489 fprintf (f, "%ld", (long)(sizeof (bool)));
26490 fclose (f);
26491   ;
26492   return 0;
26493 }
26494 _ACEOF
26495 rm -f "conftest$ac_exeext"
26496 if { (eval echo "$as_me:26496: \"$ac_link\"") >&5
26497   (eval $ac_link) 2>&5
26498   ac_status=$?
26499   echo "$as_me:26499: \$? = $ac_status" >&5
26500   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26501   { (eval echo "$as_me:26501: \"$ac_try\"") >&5
26502   (eval $ac_try) 2>&5
26503   ac_status=$?
26504   echo "$as_me:26504: \$? = $ac_status" >&5
26505   (exit "$ac_status"); }; }; then
26506   ac_cv_sizeof_bool=`cat conftest.val`
26507 else
26508   echo "$as_me: program exited with status $ac_status" >&5
26509 echo "$as_me: failed program was:" >&5
26510 cat "conftest.$ac_ext" >&5
26511 fi
26512 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26513 fi
26514 fi
26515 rm -f conftest.val
26516 else
26517   ac_cv_sizeof_bool=0
26518 fi
26519 fi
26520 echo "$as_me:26520: result: $ac_cv_sizeof_bool" >&5
26521 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26522 cat >>confdefs.h <<EOF
26523 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26524 EOF
26525
26526 echo "$as_me:26526: checking for type of bool" >&5
26527 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26528 if test "${cf_cv_type_of_bool+set}" = set; then
26529   echo $ECHO_N "(cached) $ECHO_C" >&6
26530 else
26531
26532         rm -f cf_test.out
26533         if test "$cross_compiling" = yes; then
26534
26535                 case x$ac_cv_sizeof_bool in
26536                 (x1) cf_cv_type_of_bool="unsigned char";;
26537                 (x2) cf_cv_type_of_bool="unsigned short";;
26538                 (x4) cf_cv_type_of_bool="unsigned int";;
26539                 (x8) cf_cv_type_of_bool="unsigned long";;
26540                 (*)  cf_cv_type_of_bool=unknown;;
26541                 esac
26542
26543 else
26544   cat >"conftest.$ac_ext" <<_ACEOF
26545 #line 26545 "configure"
26546 #include "confdefs.h"
26547
26548 #include <stdlib.h>
26549 #include <stdio.h>
26550
26551 #if defined(__cplusplus)
26552
26553 #ifdef HAVE_GXX_BUILTIN_H
26554 #include <g++/builtin.h>
26555 #elif HAVE_GPP_BUILTIN_H
26556 #include <gpp/builtin.h>
26557 #elif HAVE_BUILTIN_H
26558 #include <builtin.h>
26559 #endif
26560
26561 #else
26562
26563 #if $cf_cv_header_stdbool_h
26564 #include <stdbool.h>
26565 #endif
26566
26567 #endif
26568
26569 int main(void)
26570 {
26571         FILE *fp = fopen("cf_test.out", "w");
26572         if (fp != 0) {
26573                 bool x = true;
26574                 if ((bool)(-x) >= 0)
26575                         fputs("unsigned ", fp);
26576                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26577                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26578                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26579                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26580                 fclose(fp);
26581         }
26582         ${cf_cv_main_return:-return}(0);
26583 }
26584
26585 _ACEOF
26586 rm -f "conftest$ac_exeext"
26587 if { (eval echo "$as_me:26587: \"$ac_link\"") >&5
26588   (eval $ac_link) 2>&5
26589   ac_status=$?
26590   echo "$as_me:26590: \$? = $ac_status" >&5
26591   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26592   { (eval echo "$as_me:26592: \"$ac_try\"") >&5
26593   (eval $ac_try) 2>&5
26594   ac_status=$?
26595   echo "$as_me:26595: \$? = $ac_status" >&5
26596   (exit "$ac_status"); }; }; then
26597   cf_cv_type_of_bool=`cat cf_test.out`
26598                  if test -z "$cf_cv_type_of_bool"; then
26599                    cf_cv_type_of_bool=unknown
26600                  fi
26601 else
26602   echo "$as_me: program exited with status $ac_status" >&5
26603 echo "$as_me: failed program was:" >&5
26604 cat "conftest.$ac_ext" >&5
26605 cf_cv_type_of_bool=unknown
26606 fi
26607 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26608 fi
26609         rm -f cf_test.out
26610
26611 fi
26612 echo "$as_me:26612: result: $cf_cv_type_of_bool" >&5
26613 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26614
26615 if test "$cf_cv_type_of_bool" = unknown ; then
26616         case .$NCURSES_BOOL in
26617         (.auto|.) NCURSES_BOOL=unsigned;;
26618         esac
26619         { echo "$as_me:26619: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26620 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26621         cf_cv_type_of_bool=$NCURSES_BOOL
26622 fi
26623
26624                 else
26625                         echo "$as_me:26625: checking for fallback type of bool" >&5
26626 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26627                         case "$host_cpu" in
26628                         (i?86)  cf_cv_type_of_bool=char ;;
26629                         (*)     cf_cv_type_of_bool=int  ;;
26630                         esac
26631                         echo "$as_me:26631: result: $cf_cv_type_of_bool" >&5
26632 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26633                 fi
26634         fi
26635 fi
26636
26637 # If the C compiler did not declare bool, and we did not determine that the C++
26638 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26639 # ncurses library use the same type as C++ bool.  Note that this allows one to
26640 # specify the type of bool in a configure-script option and postpone
26641 # integration with the C++ compiler provided that the types are compatible.
26642 USE_CXX_BOOL=1
26643 if test "$cf_cv_cc_bool_type" = 1
26644 then
26645         # oops: C has a bool.  Unlikely, but C++ could differ.
26646         USE_CXX_BOOL=0
26647 elif test "$cf_cv_builtin_bool" = 0
26648 then
26649         # C++ has no bool
26650         USE_CXX_BOOL=0
26651 else
26652         # this is the normal case
26653         USE_CXX_BOOL='defined(__cplusplus)'
26654 fi
26655
26656 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26657
26658         if test "$cf_with_ada" != "no" ; then
26659                 if test "$with_libtool" != "no"; then
26660                         { echo "$as_me:26660: WARNING: libtool does not support Ada - disabling feature" >&5
26661 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26662                         cf_with_ada=no
26663                 fi
26664         fi
26665
26666         if test "$cf_with_ada" != "no" ; then
26667
26668 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26669 do
26670
26671 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26672
26673         unset ac_cv_path_cf_TEMP_gnat
26674         unset cf_TEMP_gnat
26675         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26676 set dummy $cf_prog_gnat; ac_word=$2
26677 echo "$as_me:26677: checking for $ac_word" >&5
26678 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26679 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26680   echo $ECHO_N "(cached) $ECHO_C" >&6
26681 else
26682   case $cf_TEMP_gnat in
26683   [\\/]* | ?:[\\/]*)
26684   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26685   ;;
26686   *)
26687   ac_save_IFS=$IFS; IFS=$ac_path_separator
26688 ac_dummy="$PATH"
26689 for ac_dir in $ac_dummy; do
26690   IFS=$ac_save_IFS
26691   test -z "$ac_dir" && ac_dir=.
26692   if $as_executable_p "$ac_dir/$ac_word"; then
26693    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26694    echo "$as_me:26694: found $ac_dir/$ac_word" >&5
26695    break
26696 fi
26697 done
26698
26699   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26700   ;;
26701 esac
26702 fi
26703 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26704
26705 if test -n "$cf_TEMP_gnat"; then
26706   echo "$as_me:26706: result: $cf_TEMP_gnat" >&5
26707 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26708 else
26709   echo "$as_me:26709: result: no" >&5
26710 echo "${ECHO_T}no" >&6
26711 fi
26712
26713         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26714
26715         if test "x$cf_TEMP_gnat" != xno; then
26716                 unset cf_cv_gnat_version
26717                 unset cf_TEMP_gnat
26718
26719 echo "$as_me:26719: checking for $cf_prog_gnat version" >&5
26720 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26721 if test "${cf_cv_gnat_version+set}" = set; then
26722   echo $ECHO_N "(cached) $ECHO_C" >&6
26723 else
26724
26725 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26726         grep '[0-9].[0-9][0-9]*' |\
26727         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26728
26729 fi
26730 echo "$as_me:26730: result: $cf_cv_gnat_version" >&5
26731 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26732 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26733 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26734
26735         fi
26736         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26737
26738         unset cf_TEMP_gnat
26739         unset cf_cv_gnat_version
26740         unset ac_cv_path_cf_TEMP_gnat
26741 done
26742
26743 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26744         cf_ada_make=
26745         cf_cv_prog_gnat_correct=no
26746 else
26747         cf_ada_make=gnatmake
26748         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26749                 # gprconfig is newer than gnatmake; we can continue...
26750                 cf_ada_config="##"
26751         else
26752                 rm -rf ./conftest* ./*~conftest*
26753                 if mkdir conftest.src
26754                 then
26755                         cf_ada_config=""
26756                         cd conftest.src
26757                         for cf_gprconfig in Ada C
26758                         do
26759                                 echo "$as_me:26759: checking for gprconfig name for $cf_gprconfig" >&5
26760 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26761                                 if test "$cf_gprconfig" = C
26762                                 then
26763                                         for cf_gprconfig_param in \
26764                                                 "$cf_gprconfig,,,,GNATGCC" \
26765                                                 "$cf_gprconfig,,,,GCC" \
26766                                                 "$cf_gprconfig"
26767                                         do
26768                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26769                                                 test -n "$cf_gprconfig_value" && break
26770                                         done
26771                                 else
26772                                         cf_gprconfig_param=$cf_gprconfig
26773                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26774                                 fi
26775                                 if test -n "$cf_gprconfig_value"
26776                                 then
26777                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
26778                                         echo "$as_me:26778: result: $cf_gprconfig_value" >&5
26779 echo "${ECHO_T}$cf_gprconfig_value" >&6
26780                                 else
26781                                         echo "$as_me:26781: result: missing" >&5
26782 echo "${ECHO_T}missing" >&6
26783                                         cf_ada_config="#"
26784                                         break
26785                                 fi
26786                         done
26787                         cd ..
26788                         rm -rf ./conftest* ./*~conftest*
26789                 fi
26790         fi
26791         if test "x$cf_ada_config" != "x#"
26792         then
26793
26794 echo "$as_me:26794: checking for gnat version" >&5
26795 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26796 if test "${cf_cv_gnat_version+set}" = set; then
26797   echo $ECHO_N "(cached) $ECHO_C" >&6
26798 else
26799
26800 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26801         grep '[0-9].[0-9][0-9]*' |\
26802         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26803
26804 fi
26805 echo "$as_me:26805: result: $cf_cv_gnat_version" >&5
26806 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26807 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26808
26809 case "$cf_cv_gnat_version" in
26810 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26811         cf_cv_prog_gnat_correct=yes
26812         ;;
26813 (*)
26814         { echo "$as_me:26814: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26815 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26816         cf_cv_prog_gnat_correct=no
26817         ;;
26818 esac
26819
26820                 # Extract the first word of "m4", so it can be a program name with args.
26821 set dummy m4; ac_word=$2
26822 echo "$as_me:26822: checking for $ac_word" >&5
26823 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26824 if test "${ac_cv_prog_M4_exists+set}" = set; then
26825   echo $ECHO_N "(cached) $ECHO_C" >&6
26826 else
26827   if test -n "$M4_exists"; then
26828   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26829 else
26830   ac_save_IFS=$IFS; IFS=$ac_path_separator
26831 ac_dummy="$PATH"
26832 for ac_dir in $ac_dummy; do
26833   IFS=$ac_save_IFS
26834   test -z "$ac_dir" && ac_dir=.
26835   $as_executable_p "$ac_dir/$ac_word" || continue
26836 ac_cv_prog_M4_exists="yes"
26837 echo "$as_me:26837: found $ac_dir/$ac_word" >&5
26838 break
26839 done
26840
26841   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26842 fi
26843 fi
26844 M4_exists=$ac_cv_prog_M4_exists
26845 if test -n "$M4_exists"; then
26846   echo "$as_me:26846: result: $M4_exists" >&5
26847 echo "${ECHO_T}$M4_exists" >&6
26848 else
26849   echo "$as_me:26849: result: no" >&5
26850 echo "${ECHO_T}no" >&6
26851 fi
26852
26853                 if test "$ac_cv_prog_M4_exists" = no; then
26854                         cf_cv_prog_gnat_correct=no
26855                         { echo "$as_me:26855: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26856 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26857                 fi
26858                 if test "$cf_cv_prog_gnat_correct" = yes; then
26859                         echo "$as_me:26859: checking if GNAT works" >&5
26860 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26861
26862 rm -rf ./conftest* ./*~conftest*
26863 cat >>conftest.ads <<CF_EOF
26864 procedure conftest;
26865 CF_EOF
26866 cat >>conftest.adb <<CF_EOF
26867 with Text_IO;
26868 with GNAT.OS_Lib;
26869 procedure conftest is
26870 begin
26871    Text_IO.Put ("Hello World");
26872    Text_IO.New_Line;
26873    GNAT.OS_Lib.OS_Exit (0);
26874 end conftest;
26875 CF_EOF
26876 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26877    if ( ./conftest 1>&5 2>&1 ) ; then
26878       cf_cv_prog_gnat_correct=yes
26879    else
26880       cf_cv_prog_gnat_correct=no
26881    fi
26882 else
26883    cf_cv_prog_gnat_correct=no
26884 fi
26885 rm -rf ./conftest* ./*~conftest*
26886
26887                         echo "$as_me:26887: result: $cf_cv_prog_gnat_correct" >&5
26888 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26889                 fi
26890         else
26891                 cf_cv_prog_gnat_correct=no
26892         fi
26893 fi
26894
26895                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26896
26897         ADAFLAGS="$ADAFLAGS -gnatpn"
26898
26899         echo "$as_me:26899: checking optimization options for ADAFLAGS" >&5
26900 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26901         case "$CFLAGS" in
26902         (*-g*)
26903
26904         ADAFLAGS="$ADAFLAGS -g"
26905
26906                 ;;
26907         esac
26908         case "$CFLAGS" in
26909         (*-O*)
26910                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26911
26912         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26913
26914                 ;;
26915         esac
26916         echo "$as_me:26916: result: $ADAFLAGS" >&5
26917 echo "${ECHO_T}$ADAFLAGS" >&6
26918
26919 echo "$as_me:26919: checking if GNATPREP supports -T option" >&5
26920 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26921 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26922   echo $ECHO_N "(cached) $ECHO_C" >&6
26923 else
26924
26925 cf_cv_gnatprep_opt_t=no
26926 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
26927
26928 fi
26929 echo "$as_me:26929: result: $cf_cv_gnatprep_opt_t" >&5
26930 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
26931 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
26932
26933 echo "$as_me:26933: checking if GNAT supports generics" >&5
26934 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
26935 case "$cf_cv_gnat_version" in
26936 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26937         cf_gnat_generics=yes
26938         ;;
26939 (*)
26940         cf_gnat_generics=no
26941         ;;
26942 esac
26943 echo "$as_me:26943: result: $cf_gnat_generics" >&5
26944 echo "${ECHO_T}$cf_gnat_generics" >&6
26945
26946 if test "$cf_gnat_generics" = yes
26947 then
26948         cf_compile_generics=generics
26949         cf_generic_objects="\${GENOBJS}"
26950 else
26951         cf_compile_generics=
26952         cf_generic_objects=
26953 fi
26954
26955 echo "$as_me:26955: checking if GNAT supports SIGINT" >&5
26956 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
26957 if test "${cf_cv_gnat_sigint+set}" = set; then
26958   echo $ECHO_N "(cached) $ECHO_C" >&6
26959 else
26960
26961 rm -rf ./conftest* ./*~conftest*
26962 cat >>conftest.ads <<CF_EOF
26963 with Ada.Interrupts.Names;
26964
26965 package ConfTest is
26966
26967    pragma Warnings (Off);  --  the next pragma exists since 3.11p
26968    pragma Unreserve_All_Interrupts;
26969    pragma Warnings (On);
26970
26971    protected Process is
26972       procedure Stop;
26973       function Continue return Boolean;
26974       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
26975    private
26976       Done : Boolean := False;
26977    end Process;
26978
26979 end ConfTest;
26980 CF_EOF
26981 cat >>conftest.adb <<CF_EOF
26982 package body ConfTest is
26983    protected body Process is
26984       procedure Stop is
26985       begin
26986          Done := True;
26987       end Stop;
26988       function Continue return Boolean is
26989       begin
26990          return not Done;
26991       end Continue;
26992    end Process;
26993 end ConfTest;
26994 CF_EOF
26995 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26996       cf_cv_gnat_sigint=yes
26997 else
26998    cf_cv_gnat_sigint=no
26999 fi
27000 rm -rf ./conftest* ./*~conftest*
27001
27002 fi
27003 echo "$as_me:27003: result: $cf_cv_gnat_sigint" >&5
27004 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27005
27006 if test "$cf_cv_gnat_sigint" = yes ; then
27007         USE_GNAT_SIGINT=""
27008 else
27009         USE_GNAT_SIGINT="#"
27010 fi
27011
27012 cf_gnat_libraries=no
27013 cf_gnat_projects=no
27014
27015 if test "$enable_gnat_projects" != no ; then
27016 echo "$as_me:27016: checking if GNAT supports project files" >&5
27017 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27018 case "$cf_cv_gnat_version" in
27019 (3.[0-9]*)
27020         ;;
27021 (*)
27022         case "$cf_cv_system_name" in
27023         (cygwin*|msys*)
27024                 ;;
27025         (*)
27026                 rm -rf ./conftest* ./*~conftest*
27027                 if mkdir conftest.src conftest.bin conftest.lib
27028                 then
27029                         cd conftest.src
27030                         rm -rf ./conftest* ./*~conftest*
27031                         cat >>library.gpr <<CF_EOF
27032 project Library is
27033   Kind := External ("LIB_KIND");
27034   for Library_Name use "ConfTest";
27035   for Object_Dir use ".";
27036   for Library_ALI_Dir use External("LIBRARY_DIR");
27037   for Library_Version use External ("SONAME");
27038   for Library_Kind use Kind;
27039   for Library_Dir use External("BUILD_DIR");
27040   Source_Dir := External ("SOURCE_DIR");
27041   for Source_Dirs use (Source_Dir);
27042 end Library;
27043 CF_EOF
27044                         cat >>confpackage.ads <<CF_EOF
27045 package ConfPackage is
27046    procedure conftest;
27047 end ConfPackage;
27048 CF_EOF
27049                         cat >>confpackage.adb <<CF_EOF
27050 with Text_IO;
27051 package body ConfPackage is
27052    procedure conftest is
27053    begin
27054       Text_IO.Put ("Hello World");
27055       Text_IO.New_Line;
27056    end conftest;
27057 end ConfPackage;
27058 CF_EOF
27059                         if ( "$cf_ada_make" $ADAFLAGS \
27060                                         -Plibrary.gpr \
27061                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27062                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27063                                         -XSOURCE_DIR="`pwd`" \
27064                                         -XSONAME=libConfTest.so.1 \
27065                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27066                                 cf_gnat_projects=yes
27067                         fi
27068                         cd ..
27069                 fi
27070                 if test -f conftest.lib/confpackage.ali
27071                 then
27072                         cf_gnat_libraries=yes
27073                 fi
27074                 rm -rf ./conftest* ./*~conftest*
27075                 ;;
27076         esac
27077         ;;
27078 esac
27079 echo "$as_me:27079: result: $cf_gnat_projects" >&5
27080 echo "${ECHO_T}$cf_gnat_projects" >&6
27081 fi # enable_gnat_projects
27082
27083 if test "$cf_gnat_projects" = yes
27084 then
27085         echo "$as_me:27085: checking if GNAT supports libraries" >&5
27086 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27087         echo "$as_me:27087: result: $cf_gnat_libraries" >&5
27088 echo "${ECHO_T}$cf_gnat_libraries" >&6
27089 fi
27090
27091 USE_OLD_MAKERULES=""
27092 USE_GNAT_PROJECTS="#"
27093 USE_GNAT_MAKE_GPR="#"
27094 USE_GNAT_GPRBUILD="#"
27095
27096 if test "$cf_gnat_projects" = yes
27097 then
27098         USE_OLD_MAKERULES="#"
27099         USE_GNAT_PROJECTS=""
27100         if test "$cf_cv_VERSION_GPRBUILD" != no
27101         then
27102                 USE_GNAT_GPRBUILD=""
27103         elif test "$cf_cv_VERSION_GNATMAKE" != no
27104         then
27105                 USE_GNAT_MAKE_GPR=""
27106         else
27107                 { echo "$as_me:27107: WARNING: use old makefile rules since tools are missing" >&5
27108 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27109         fi
27110 fi
27111
27112 if test "$cf_gnat_libraries" = yes
27113 then
27114         USE_GNAT_LIBRARIES=""
27115 else
27116         USE_GNAT_LIBRARIES="#"
27117 fi
27118
27119 echo "$as_me:27119: checking for ada-compiler" >&5
27120 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27121
27122 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27123 if test "${with_ada_compiler+set}" = set; then
27124   withval="$with_ada_compiler"
27125   cf_ada_compiler=$withval
27126 else
27127   cf_ada_compiler=gnatmake
27128 fi;
27129
27130 echo "$as_me:27130: result: $cf_ada_compiler" >&5
27131 echo "${ECHO_T}$cf_ada_compiler" >&6
27132
27133                         cf_ada_package=terminal_interface
27134
27135 echo "$as_me:27135: checking for ada-include" >&5
27136 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27137
27138 # Check whether --with-ada-include or --without-ada-include was given.
27139 if test "${with_ada_include+set}" = set; then
27140   withval="$with_ada_include"
27141
27142 else
27143   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27144 fi; if test -n "$prefix/share/ada/adainclude" ; then
27145
27146 if test "x$prefix" != xNONE; then
27147         cf_path_syntax="$prefix"
27148 else
27149         cf_path_syntax="$ac_default_prefix"
27150 fi
27151
27152 case ".$withval" in
27153 (.\$\(*\)*|.\'*\'*)
27154         ;;
27155 (..|./*|.\\*)
27156         ;;
27157 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27158         ;;
27159 (.\$\{*prefix\}*|.\$\{*dir\}*)
27160         eval withval="$withval"
27161         case ".$withval" in
27162         (.NONE/*)
27163                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27164                 ;;
27165         esac
27166         ;;
27167 (.no|.NONE/*)
27168         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27169         ;;
27170 (*)
27171         { { echo "$as_me:27171: error: expected a pathname, not \"$withval\"" >&5
27172 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27173    { (exit 1); exit 1; }; }
27174         ;;
27175 esac
27176
27177 fi
27178 eval ADA_INCLUDE="$withval"
27179
27180 echo "$as_me:27180: result: $ADA_INCLUDE" >&5
27181 echo "${ECHO_T}$ADA_INCLUDE" >&6
27182
27183 echo "$as_me:27183: checking for ada-objects" >&5
27184 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27185
27186 # Check whether --with-ada-objects or --without-ada-objects was given.
27187 if test "${with_ada_objects+set}" = set; then
27188   withval="$with_ada_objects"
27189
27190 else
27191   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27192 fi; if test -n "$prefix/lib/ada/adalib" ; then
27193
27194 if test "x$prefix" != xNONE; then
27195         cf_path_syntax="$prefix"
27196 else
27197         cf_path_syntax="$ac_default_prefix"
27198 fi
27199
27200 case ".$withval" in
27201 (.\$\(*\)*|.\'*\'*)
27202         ;;
27203 (..|./*|.\\*)
27204         ;;
27205 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27206         ;;
27207 (.\$\{*prefix\}*|.\$\{*dir\}*)
27208         eval withval="$withval"
27209         case ".$withval" in
27210         (.NONE/*)
27211                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27212                 ;;
27213         esac
27214         ;;
27215 (.no|.NONE/*)
27216         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27217         ;;
27218 (*)
27219         { { echo "$as_me:27219: error: expected a pathname, not \"$withval\"" >&5
27220 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27221    { (exit 1); exit 1; }; }
27222         ;;
27223 esac
27224
27225 fi
27226 eval ADA_OBJECTS="$withval"
27227
27228 echo "$as_me:27228: result: $ADA_OBJECTS" >&5
27229 echo "${ECHO_T}$ADA_OBJECTS" >&6
27230
27231 echo "$as_me:27231: checking if an Ada95 shared-library should be built" >&5
27232 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27233
27234 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27235 if test "${with_ada_sharedlib+set}" = set; then
27236   withval="$with_ada_sharedlib"
27237   with_ada_sharedlib=$withval
27238 else
27239   with_ada_sharedlib=no
27240 fi;
27241 echo "$as_me:27241: result: $with_ada_sharedlib" >&5
27242 echo "${ECHO_T}$with_ada_sharedlib" >&6
27243
27244 if test "x$with_ada_sharedlib" != xno
27245 then
27246         if test "x$cf_gnat_projects" != xyes
27247         then
27248                 { echo "$as_me:27248: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27249 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27250                 with_ada_sharedlib=no
27251         fi
27252 fi
27253
27254 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27255 MAKE_ADA_SHAREDLIB="#"
27256
27257 if test "x$with_ada_sharedlib" != xno
27258 then
27259         MAKE_ADA_SHAREDLIB=
27260         if test "x$with_ada_sharedlib" != xyes
27261         then
27262                 ADA_SHAREDLIB="$with_ada_sharedlib"
27263         fi
27264 fi
27265
27266                         # allow the Ada binding to be renamed
27267
27268 echo "$as_me:27268: checking for ada-libname" >&5
27269 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27270
27271 # Check whether --with-ada-libname or --without-ada-libname was given.
27272 if test "${with_ada_libname+set}" = set; then
27273   withval="$with_ada_libname"
27274   ADA_LIBNAME=$withval
27275 else
27276   ADA_LIBNAME=AdaCurses
27277 fi;
27278 case "x$ADA_LIBNAME" in
27279 (x|xyes|xno)
27280         ADA_LIBNAME=AdaCurses
27281         ;;
27282 esac
27283
27284 echo "$as_me:27284: result: $ADA_LIBNAME" >&5
27285 echo "${ECHO_T}$ADA_LIBNAME" >&6
27286
27287                 fi
27288         fi
27289 else
27290         cf_with_ada=no
27291 fi
27292
27293 # do this "late" to avoid conflict with header-checks
27294 if test "x$with_widec" = xyes ; then
27295         echo "$as_me:27295: checking for wchar_t" >&5
27296 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27297 if test "${ac_cv_type_wchar_t+set}" = set; then
27298   echo $ECHO_N "(cached) $ECHO_C" >&6
27299 else
27300   cat >"conftest.$ac_ext" <<_ACEOF
27301 #line 27301 "configure"
27302 #include "confdefs.h"
27303 $ac_includes_default
27304 int
27305 main (void)
27306 {
27307 if ((wchar_t *) 0)
27308   return 0;
27309 if (sizeof (wchar_t))
27310   return 0;
27311   ;
27312   return 0;
27313 }
27314 _ACEOF
27315 rm -f "conftest.$ac_objext"
27316 if { (eval echo "$as_me:27316: \"$ac_compile\"") >&5
27317   (eval $ac_compile) 2>&5
27318   ac_status=$?
27319   echo "$as_me:27319: \$? = $ac_status" >&5
27320   (exit "$ac_status"); } &&
27321          { ac_try='test -s "conftest.$ac_objext"'
27322   { (eval echo "$as_me:27322: \"$ac_try\"") >&5
27323   (eval $ac_try) 2>&5
27324   ac_status=$?
27325   echo "$as_me:27325: \$? = $ac_status" >&5
27326   (exit "$ac_status"); }; }; then
27327   ac_cv_type_wchar_t=yes
27328 else
27329   echo "$as_me: failed program was:" >&5
27330 cat "conftest.$ac_ext" >&5
27331 ac_cv_type_wchar_t=no
27332 fi
27333 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27334 fi
27335 echo "$as_me:27335: result: $ac_cv_type_wchar_t" >&5
27336 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27337
27338 echo "$as_me:27338: checking size of wchar_t" >&5
27339 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27340 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27341   echo $ECHO_N "(cached) $ECHO_C" >&6
27342 else
27343   if test "$ac_cv_type_wchar_t" = yes; then
27344   if test "$cross_compiling" = yes; then
27345   # Depending upon the size, compute the lo and hi bounds.
27346 cat >"conftest.$ac_ext" <<_ACEOF
27347 #line 27347 "configure"
27348 #include "confdefs.h"
27349 $ac_includes_default
27350 int
27351 main (void)
27352 {
27353 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27354   ;
27355   return 0;
27356 }
27357 _ACEOF
27358 rm -f "conftest.$ac_objext"
27359 if { (eval echo "$as_me:27359: \"$ac_compile\"") >&5
27360   (eval $ac_compile) 2>&5
27361   ac_status=$?
27362   echo "$as_me:27362: \$? = $ac_status" >&5
27363   (exit "$ac_status"); } &&
27364          { ac_try='test -s "conftest.$ac_objext"'
27365   { (eval echo "$as_me:27365: \"$ac_try\"") >&5
27366   (eval $ac_try) 2>&5
27367   ac_status=$?
27368   echo "$as_me:27368: \$? = $ac_status" >&5
27369   (exit "$ac_status"); }; }; then
27370   ac_lo=0 ac_mid=0
27371   while :; do
27372     cat >"conftest.$ac_ext" <<_ACEOF
27373 #line 27373 "configure"
27374 #include "confdefs.h"
27375 $ac_includes_default
27376 int
27377 main (void)
27378 {
27379 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27380   ;
27381   return 0;
27382 }
27383 _ACEOF
27384 rm -f "conftest.$ac_objext"
27385 if { (eval echo "$as_me:27385: \"$ac_compile\"") >&5
27386   (eval $ac_compile) 2>&5
27387   ac_status=$?
27388   echo "$as_me:27388: \$? = $ac_status" >&5
27389   (exit "$ac_status"); } &&
27390          { ac_try='test -s "conftest.$ac_objext"'
27391   { (eval echo "$as_me:27391: \"$ac_try\"") >&5
27392   (eval $ac_try) 2>&5
27393   ac_status=$?
27394   echo "$as_me:27394: \$? = $ac_status" >&5
27395   (exit "$ac_status"); }; }; then
27396   ac_hi=$ac_mid; break
27397 else
27398   echo "$as_me: failed program was:" >&5
27399 cat "conftest.$ac_ext" >&5
27400 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27401 fi
27402 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27403   done
27404 else
27405   echo "$as_me: failed program was:" >&5
27406 cat "conftest.$ac_ext" >&5
27407 ac_hi=-1 ac_mid=-1
27408   while :; do
27409     cat >"conftest.$ac_ext" <<_ACEOF
27410 #line 27410 "configure"
27411 #include "confdefs.h"
27412 $ac_includes_default
27413 int
27414 main (void)
27415 {
27416 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27417   ;
27418   return 0;
27419 }
27420 _ACEOF
27421 rm -f "conftest.$ac_objext"
27422 if { (eval echo "$as_me:27422: \"$ac_compile\"") >&5
27423   (eval $ac_compile) 2>&5
27424   ac_status=$?
27425   echo "$as_me:27425: \$? = $ac_status" >&5
27426   (exit "$ac_status"); } &&
27427          { ac_try='test -s "conftest.$ac_objext"'
27428   { (eval echo "$as_me:27428: \"$ac_try\"") >&5
27429   (eval $ac_try) 2>&5
27430   ac_status=$?
27431   echo "$as_me:27431: \$? = $ac_status" >&5
27432   (exit "$ac_status"); }; }; then
27433   ac_lo=$ac_mid; break
27434 else
27435   echo "$as_me: failed program was:" >&5
27436 cat "conftest.$ac_ext" >&5
27437 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27438 fi
27439 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27440   done
27441 fi
27442 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27443 # Binary search between lo and hi bounds.
27444 while test "x$ac_lo" != "x$ac_hi"; do
27445   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27446   cat >"conftest.$ac_ext" <<_ACEOF
27447 #line 27447 "configure"
27448 #include "confdefs.h"
27449 $ac_includes_default
27450 int
27451 main (void)
27452 {
27453 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27454   ;
27455   return 0;
27456 }
27457 _ACEOF
27458 rm -f "conftest.$ac_objext"
27459 if { (eval echo "$as_me:27459: \"$ac_compile\"") >&5
27460   (eval $ac_compile) 2>&5
27461   ac_status=$?
27462   echo "$as_me:27462: \$? = $ac_status" >&5
27463   (exit "$ac_status"); } &&
27464          { ac_try='test -s "conftest.$ac_objext"'
27465   { (eval echo "$as_me:27465: \"$ac_try\"") >&5
27466   (eval $ac_try) 2>&5
27467   ac_status=$?
27468   echo "$as_me:27468: \$? = $ac_status" >&5
27469   (exit "$ac_status"); }; }; then
27470   ac_hi=$ac_mid
27471 else
27472   echo "$as_me: failed program was:" >&5
27473 cat "conftest.$ac_ext" >&5
27474 ac_lo=`expr "$ac_mid" + 1`
27475 fi
27476 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27477 done
27478 ac_cv_sizeof_wchar_t=$ac_lo
27479 else
27480   if test "$cross_compiling" = yes; then
27481   { { echo "$as_me:27481: error: cannot run test program while cross compiling" >&5
27482 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27483    { (exit 1); exit 1; }; }
27484 else
27485   cat >"conftest.$ac_ext" <<_ACEOF
27486 #line 27486 "configure"
27487 #include "confdefs.h"
27488 $ac_includes_default
27489 int
27490 main (void)
27491 {
27492 FILE *f = fopen ("conftest.val", "w");
27493 if (!f)
27494   $ac_main_return (1);
27495 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
27496 fclose (f);
27497   ;
27498   return 0;
27499 }
27500 _ACEOF
27501 rm -f "conftest$ac_exeext"
27502 if { (eval echo "$as_me:27502: \"$ac_link\"") >&5
27503   (eval $ac_link) 2>&5
27504   ac_status=$?
27505   echo "$as_me:27505: \$? = $ac_status" >&5
27506   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27507   { (eval echo "$as_me:27507: \"$ac_try\"") >&5
27508   (eval $ac_try) 2>&5
27509   ac_status=$?
27510   echo "$as_me:27510: \$? = $ac_status" >&5
27511   (exit "$ac_status"); }; }; then
27512   ac_cv_sizeof_wchar_t=`cat conftest.val`
27513 else
27514   echo "$as_me: program exited with status $ac_status" >&5
27515 echo "$as_me: failed program was:" >&5
27516 cat "conftest.$ac_ext" >&5
27517 fi
27518 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27519 fi
27520 fi
27521 rm -f conftest.val
27522 else
27523   ac_cv_sizeof_wchar_t=0
27524 fi
27525 fi
27526 echo "$as_me:27526: result: $ac_cv_sizeof_wchar_t" >&5
27527 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27528 cat >>confdefs.h <<EOF
27529 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27530 EOF
27531
27532         # cross-compiling to mingw can run into the problem that attempting to
27533         # link with the regex library fails, causing the test to not set this to
27534         # a number.  "recent" autoconf does not address this problem either -TD
27535         if test -z "$ac_cv_sizeof_wchar_t"
27536         then
27537                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27538
27539 echo "${as_me:-configure}:27539: testing test failed (assume 2) ..." 1>&5
27540
27541                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27542                 mv confdefs.tmp confdefs.h
27543                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27544         fi
27545 fi
27546
27547 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27548 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27549 ###
27550 ### ticlib modules may be a separate library, otherwise contained in termlib.
27551 ### termlib modules may be a separate library, otherwise contained in ncurses.
27552 ###
27553 ### The of "+" or " " between the tokens controls the way the script
27554 ### chooses to split module lists into libraries.
27555 ###
27556 ### (see CF_LIB_RULES).
27557 echo "$as_me:27557: checking for library subsets" >&5
27558 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27559 LIB_SUBSETS=
27560
27561 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27562         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27563         if test "$with_ticlib" != no ; then
27564                 LIB_SUBSETS="${LIB_SUBSETS} "
27565         else
27566                 LIB_SUBSETS="${LIB_SUBSETS}+"
27567         fi
27568 fi
27569
27570 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27571 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27572
27573 if test "$with_termlib" != no ; then
27574         LIB_SUBSETS="${LIB_SUBSETS} "
27575 else
27576         LIB_SUBSETS="${LIB_SUBSETS}+"
27577 fi
27578
27579 LIB_SUBSETS="${LIB_SUBSETS}base"
27580
27581 # Most term-driver calls are to tinfo, but some like init_pair are to the
27582 # base library (so it resides in base).
27583 if test "$with_term_driver" != no ; then
27584         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27585         case "$cf_cv_system_name" in
27586         (*mingw32*|*mingw64*)
27587                 if test "x$with_exp_win32" = xyes ; then
27588                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27589                 else
27590                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27591                 fi
27592                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27593                 ;;
27594         (*)
27595                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27596                 ;;
27597         esac
27598 elif test "x$with_exp_win32" = xyes ; then
27599         case "$cf_cv_system_name" in
27600         (*mingw32*|*mingw64*)
27601                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27602                 ;;
27603         (*)
27604                 ;;
27605         esac
27606 fi
27607
27608 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27609 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27610
27611 echo "$as_me:27611: result: $LIB_SUBSETS" >&5
27612 echo "${ECHO_T}$LIB_SUBSETS" >&6
27613
27614 ### Construct the list of include-directories to be generated
27615
27616 if test "$srcdir" != "."; then
27617         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27618 fi
27619 CPPFLAGS="-I../include $CPPFLAGS"
27620 if test "$srcdir" != "."; then
27621         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27622 fi
27623 CPPFLAGS="-I. $CPPFLAGS"
27624
27625 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27626 if test "$srcdir" != "."; then
27627         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27628 fi
27629 if test "$GCC" != yes; then
27630         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27631 elif test "$includedir" != "/usr/include"; then
27632         if test "$includedir" = '${prefix}/include' ; then
27633                 if test x$prefix != x/usr ; then
27634                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27635                 fi
27636         else
27637                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27638         fi
27639 fi
27640
27641 ### Build up pieces for makefile rules
27642 echo "$as_me:27642: checking default library suffix" >&5
27643 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27644
27645         case $DFT_LWR_MODEL in
27646         (libtool) DFT_ARG_SUFFIX=''   ;;
27647         (normal)  DFT_ARG_SUFFIX=''   ;;
27648         (debug)   DFT_ARG_SUFFIX='_g' ;;
27649         (profile) DFT_ARG_SUFFIX='_p' ;;
27650         (shared)  DFT_ARG_SUFFIX=''   ;;
27651         esac
27652         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27653 echo "$as_me:27653: result: $DFT_ARG_SUFFIX" >&5
27654 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27655
27656 echo "$as_me:27656: checking default library-dependency suffix" >&5
27657 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27658
27659         case X$DFT_LWR_MODEL in
27660         (Xlibtool)
27661                 DFT_LIB_SUFFIX='.la'
27662                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27663                 ;;
27664         (Xdebug)
27665                 case "$cf_cv_system_name" in
27666                 (*-msvc*)
27667                         DFT_LIB_SUFFIX='_g.lib'
27668                         ;;
27669                 (*)
27670                         DFT_LIB_SUFFIX='_g.a'
27671                         ;;
27672                 esac
27673                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27674                 ;;
27675         (Xprofile)
27676                 case "$cf_cv_system_name" in
27677                 (*-msvc*)
27678                         DFT_LIB_SUFFIX='_p.lib'
27679                         ;;
27680                 (*)
27681                         DFT_LIB_SUFFIX='_p.a'
27682                         ;;
27683                 esac
27684                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27685                 ;;
27686         (Xshared)
27687                 case "$cf_cv_system_name" in
27688                 (aix[5-7]*)
27689                         DFT_LIB_SUFFIX='.so'
27690                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27691                         ;;
27692                 (*-msvc*)
27693                         DFT_LIB_SUFFIX='.dll'
27694                         DFT_DEP_SUFFIX='.dll.lib'
27695                         ;;
27696                 (cygwin*|msys*|mingw*)
27697                         DFT_LIB_SUFFIX='.dll'
27698                         DFT_DEP_SUFFIX='.dll.a'
27699                         ;;
27700                 (darwin*)
27701                         DFT_LIB_SUFFIX='.dylib'
27702                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27703                         ;;
27704                 (hpux*)
27705                         case "$target" in
27706                         (ia64*)
27707                                 DFT_LIB_SUFFIX='.so'
27708                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27709                                 ;;
27710                         (*)
27711                                 DFT_LIB_SUFFIX='.sl'
27712                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27713                                 ;;
27714                         esac
27715                         ;;
27716                 (*)
27717                         DFT_LIB_SUFFIX='.so'
27718                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27719                         ;;
27720                 esac
27721                 ;;
27722         (*)
27723                 case "$target" in
27724                 (*-msvc*)
27725                         DFT_LIB_SUFFIX='.lib'
27726                         ;;
27727                 (*)
27728                         DFT_LIB_SUFFIX='.a'
27729                         ;;
27730                 esac
27731                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27732                 ;;
27733         esac
27734         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27735         then
27736                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27737                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27738         fi
27739 echo "$as_me:27739: result: $DFT_DEP_SUFFIX" >&5
27740 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27741
27742 echo "$as_me:27742: checking default object directory" >&5
27743 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27744
27745         case $DFT_LWR_MODEL in
27746         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27747         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27748         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27749         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27750         (shared)
27751                 case "$cf_cv_system_name" in
27752                 (cygwin|msys)
27753                         DFT_OBJ_SUBDIR='objects' ;;
27754                 (*)
27755                         DFT_OBJ_SUBDIR='obj_s' ;;
27756                 esac
27757         esac
27758 echo "$as_me:27758: result: $DFT_OBJ_SUBDIR" >&5
27759 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27760
27761 if test "x$cf_with_cxx" = xyes ; then
27762 echo "$as_me:27762: checking c++ library-dependency suffix" >&5
27763 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27764 if test "$with_libtool" != "no"; then
27765         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27766         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27767 elif test "$with_shared_cxx" != "no"; then
27768         # also for g++ users...
27769         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27770 else
27771         # we normally make a static library because C/C++ library rules differ
27772
27773         case Xnormal in
27774         (Xlibtool)
27775                 CXX_LIB_SUFFIX='.la'
27776                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27777                 ;;
27778         (Xdebug)
27779                 case "$cf_cv_system_name" in
27780                 (*-msvc*)
27781                         CXX_LIB_SUFFIX='_g.lib'
27782                         ;;
27783                 (*)
27784                         CXX_LIB_SUFFIX='_g.a'
27785                         ;;
27786                 esac
27787                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27788                 ;;
27789         (Xprofile)
27790                 case "$cf_cv_system_name" in
27791                 (*-msvc*)
27792                         CXX_LIB_SUFFIX='_p.lib'
27793                         ;;
27794                 (*)
27795                         CXX_LIB_SUFFIX='_p.a'
27796                         ;;
27797                 esac
27798                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27799                 ;;
27800         (Xshared)
27801                 case "$cf_cv_system_name" in
27802                 (aix[5-7]*)
27803                         CXX_LIB_SUFFIX='.so'
27804                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27805                         ;;
27806                 (*-msvc*)
27807                         CXX_LIB_SUFFIX='.dll'
27808                         CXX_DEP_SUFFIX='.dll.lib'
27809                         ;;
27810                 (cygwin*|msys*|mingw*)
27811                         CXX_LIB_SUFFIX='.dll'
27812                         CXX_DEP_SUFFIX='.dll.a'
27813                         ;;
27814                 (darwin*)
27815                         CXX_LIB_SUFFIX='.dylib'
27816                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27817                         ;;
27818                 (hpux*)
27819                         case "$target" in
27820                         (ia64*)
27821                                 CXX_LIB_SUFFIX='.so'
27822                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27823                                 ;;
27824                         (*)
27825                                 CXX_LIB_SUFFIX='.sl'
27826                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27827                                 ;;
27828                         esac
27829                         ;;
27830                 (*)
27831                         CXX_LIB_SUFFIX='.so'
27832                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27833                         ;;
27834                 esac
27835                 ;;
27836         (*)
27837                 case "$target" in
27838                 (*-msvc*)
27839                         CXX_LIB_SUFFIX='.lib'
27840                         ;;
27841                 (*)
27842                         CXX_LIB_SUFFIX='.a'
27843                         ;;
27844                 esac
27845                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27846                 ;;
27847         esac
27848         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27849         then
27850                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27851                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27852         fi
27853
27854 fi
27855 echo "$as_me:27855: result: $CXX_LIB_SUFFIX" >&5
27856 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27857
27858 fi
27859
27860 # do not want -ldl in build except as needed for -lncurses dependency
27861 if test "x$with_dlsym" = xyes ; then
27862 if test "$DFT_LWR_MODEL" = shared || \
27863    test "$DFT_LWR_MODEL" = libtool ; then
27864
27865 # remove dl library from $LIBS
27866 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27867
27868 fi
27869 fi
27870 ### Set up low-level terminfo dependencies for makefiles.
27871
27872 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27873 # do not need libdl
27874 TICS_LIST=
27875 if test "x$with_dlsym" = xyes ; then
27876
27877 # remove dl library from $SHLIB_LIST
27878 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27879
27880 fi
27881
27882 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27883 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27884 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27885 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27886 then
27887         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27888 fi
27889
27890 if test "$with_ticlib" != no ; then
27891
27892         if test "x$with_ticlib" != xyes ; then
27893                 TICS_NAME=$with_ticlib
27894                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27895                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27896                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27897                 TICS_LIB_SUFFIX="${with_ticlib}"
27898         else
27899                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27900                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27901                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27902                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27903         fi
27904         TICS_LDFLAGS="-L${LIB_DIR}"
27905         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27906 else
27907         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27908         TICS_LDFLAGS="-L${LIB_DIR}"
27909         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27910 fi
27911
27912 if test "$with_termlib" != no ; then
27913
27914         if test "x$with_termlib" != xyes ; then
27915                 TINFO_NAME=$with_termlib
27916                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27917                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27918                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27919                 TINFO_LIB_SUFFIX="${with_termlib}"
27920         else
27921                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27922                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27923                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27924                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
27925         fi
27926
27927         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27928         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27929         if test "$DFT_LWR_MODEL" = "libtool"; then
27930                 TEST_ARGS="${TEST_DEPS}"
27931                 TEST_ARG2="${TEST_DEP2}"
27932                 TINFO_LDFLAGS="-L${LIB_DIR}"
27933                 TINFO_LIBS="$TEST_ARGS"
27934                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
27935                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
27936         else
27937                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
27938                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
27939                 if test "x$with_term_driver" != xno ; then
27940                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27941                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
27942                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27943                 else
27944                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27945                         TINFO_LIBS="$TEST_ARGS"
27946                 fi
27947                 TINFO_LDFLAGS="-L${LIB_DIR}"
27948                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27949         fi
27950 else
27951         # the next lines are needed for linking libtic over libncurses
27952         TINFO_NAME=${LIB_NAME}
27953         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27954         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
27955         if test "x$with_tic_depends" = xyes ; then
27956                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27957         else
27958                 TICS_LIST="$SHLIB_LIST"
27959         fi
27960
27961         TINFO_LDFLAGS="-L${LIB_DIR}"
27962         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27963 fi
27964
27965 if test "$DFT_LWR_MODEL" = shared ; then
27966         case "$cf_cv_system_name" in
27967         (cygwin*|msys*)
27968                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
27969                 TINFO_SUFFIX=.dll
27970                 ;;
27971         esac
27972 fi
27973
27974 if test "x$with_dlsym" = xyes ; then
27975
27976 # remove dl library from $TICS_LIST
27977 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
27978
27979 fi
27980
27981 if test "$DFT_LWR_MODEL" = "libtool"; then
27982         OBJEXT=lo
27983 fi
27984
27985 # needed for Ada95
27986 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
27987
27988 case "$DFT_LWR_MODEL" in
27989 (normal|debug|profile)
27990
27991 if test "$GCC" = yes ; then
27992         case "$cf_cv_system_name" in
27993         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
27994                 LDFLAGS_STATIC=
27995                 LDFLAGS_SHARED=
27996                 ;;
27997         (*)     # normally, except when broken
27998                 LDFLAGS_STATIC=-static
27999                 LDFLAGS_SHARED=-dynamic
28000                 ;;
28001         esac
28002 else
28003         case "$cf_cv_system_name" in
28004         (aix[4-7]*)     # from ld manpage
28005                 LDFLAGS_STATIC=-bstatic
28006                 LDFLAGS_SHARED=-bdynamic
28007                 ;;
28008         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28009                 # We could also use just "archive" and "shared".
28010                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28011                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28012                 ;;
28013         (irix*)         # from ld manpage IRIX64
28014                 LDFLAGS_STATIC=-Bstatic
28015                 LDFLAGS_SHARED=-Bdynamic
28016                 ;;
28017         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28018                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28019                 LDFLAGS_STATIC=-noso
28020                 LDFLAGS_SHARED=-so_archive
28021                 ;;
28022         (solaris2*)
28023                 LDFLAGS_STATIC=-Bstatic
28024                 LDFLAGS_SHARED=-Bdynamic
28025                 ;;
28026         esac
28027 fi
28028
28029 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28030 then
28031         echo "$as_me:28031: checking if linker supports switching between static/dynamic" >&5
28032 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28033
28034         rm -f libconftest.a
28035         cat >conftest.$ac_ext <<EOF
28036 #line 28036 "configure"
28037 #include <stdio.h>
28038 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28039 EOF
28040         if { (eval echo "$as_me:28040: \"$ac_compile\"") >&5
28041   (eval $ac_compile) 2>&5
28042   ac_status=$?
28043   echo "$as_me:28043: \$? = $ac_status" >&5
28044   (exit "$ac_status"); } ; then
28045                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28046                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28047         fi
28048         rm -f conftest.*
28049
28050         cf_save_LIBS="$LIBS"
28051
28052         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28053         cat >"conftest.$ac_ext" <<_ACEOF
28054 #line 28054 "configure"
28055 #include "confdefs.h"
28056
28057 #line 28057 "configure"
28058 #include <stdio.h>
28059 int cf_ldflags_static(FILE *fp);
28060
28061 int
28062 main (void)
28063 {
28064
28065         return cf_ldflags_static(stdin);
28066
28067   ;
28068   return 0;
28069 }
28070 _ACEOF
28071 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28072 if { (eval echo "$as_me:28072: \"$ac_link\"") >&5
28073   (eval $ac_link) 2>&5
28074   ac_status=$?
28075   echo "$as_me:28075: \$? = $ac_status" >&5
28076   (exit "$ac_status"); } &&
28077          { ac_try='test -s "conftest$ac_exeext"'
28078   { (eval echo "$as_me:28078: \"$ac_try\"") >&5
28079   (eval $ac_try) 2>&5
28080   ac_status=$?
28081   echo "$as_me:28081: \$? = $ac_status" >&5
28082   (exit "$ac_status"); }; }; then
28083
28084         # some linkers simply ignore the -dynamic
28085         case x`file "conftest$ac_exeext" 2>/dev/null` in
28086         (*static*)
28087                 cf_ldflags_static=no
28088                 ;;
28089         (*)
28090                 cf_ldflags_static=yes
28091                 ;;
28092         esac
28093
28094 else
28095   echo "$as_me: failed program was:" >&5
28096 cat "conftest.$ac_ext" >&5
28097 cf_ldflags_static=no
28098 fi
28099 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28100
28101         rm -f libconftest.*
28102         LIBS="$cf_save_LIBS"
28103
28104         echo "$as_me:28104: result: $cf_ldflags_static" >&5
28105 echo "${ECHO_T}$cf_ldflags_static" >&6
28106
28107         if test "$cf_ldflags_static" != yes
28108         then
28109                 LDFLAGS_STATIC=
28110                 LDFLAGS_SHARED=
28111         fi
28112 else
28113         LDFLAGS_STATIC=
28114         LDFLAGS_SHARED=
28115 fi
28116
28117         ;;
28118 esac
28119
28120 echo "$as_me:28120: checking where we will install curses.h" >&5
28121 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28122
28123 includesubdir=
28124 if test "$with_overwrite" = no && \
28125  { test "x$includedir" = 'x${prefix}/include' || \
28126    test "x$includedir" = "x${prefix}/include"; }
28127 then
28128         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28129 fi
28130 echo "$as_me:28130: result: ${includedir}${includesubdir}" >&5
28131 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28132
28133 ### Resolve a conflict between normal and wide-curses by forcing applications
28134 ### that will need libutf8 to add it to their configure script.
28135 if test "$with_overwrite" != no ; then
28136 if test "$NCURSES_LIBUTF8" = 1 ; then
28137         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28138         { echo "$as_me:28138: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28139 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28140 fi
28141 fi
28142 WITH_OVERWRITE=$with_overwrite
28143
28144 ### At least on MinGW a shared library build without libtool
28145 ### requires adding the additional libs to the link list.
28146 case "$cf_cv_system_name" in
28147 (*mingw32*|*mingw64*)
28148         if test "$DFT_LWR_MODEL" != "libtool"; then
28149            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28150         fi
28151         ;;
28152 *)      ;;
28153 esac
28154
28155 # used to separate tack out of the tree
28156 NCURSES_TREE=
28157
28158 ### predefined stuff for the test programs
28159
28160 cat >>confdefs.h <<\EOF
28161 #define HAVE_SLK_COLOR 1
28162 EOF
28163
28164 # pkgsrc uses these
28165
28166 echo "$as_me:28166: checking for desired basename for form library" >&5
28167 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28168
28169 # Check whether --with-form-libname or --without-form-libname was given.
28170 if test "${with_form_libname+set}" = set; then
28171   withval="$with_form_libname"
28172   with_lib_basename=$withval
28173 else
28174   with_lib_basename=form
28175 fi;
28176 FORM_NAME="$with_lib_basename"
28177
28178 case "x$FORM_NAME" in
28179 (x|xno|xnone|xyes)
28180         FORM_NAME=form
28181         ;;
28182 (*)
28183         ;;
28184 esac
28185
28186 echo "$as_me:28186: result: $FORM_NAME" >&5
28187 echo "${ECHO_T}$FORM_NAME" >&6
28188
28189 echo "$as_me:28189: checking for desired basename for menu library" >&5
28190 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28191
28192 # Check whether --with-menu-libname or --without-menu-libname was given.
28193 if test "${with_menu_libname+set}" = set; then
28194   withval="$with_menu_libname"
28195   with_lib_basename=$withval
28196 else
28197   with_lib_basename=menu
28198 fi;
28199 MENU_NAME="$with_lib_basename"
28200
28201 case "x$MENU_NAME" in
28202 (x|xno|xnone|xyes)
28203         MENU_NAME=menu
28204         ;;
28205 (*)
28206         ;;
28207 esac
28208
28209 echo "$as_me:28209: result: $MENU_NAME" >&5
28210 echo "${ECHO_T}$MENU_NAME" >&6
28211
28212 echo "$as_me:28212: checking for desired basename for panel library" >&5
28213 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28214
28215 # Check whether --with-panel-libname or --without-panel-libname was given.
28216 if test "${with_panel_libname+set}" = set; then
28217   withval="$with_panel_libname"
28218   with_lib_basename=$withval
28219 else
28220   with_lib_basename=panel
28221 fi;
28222 PANEL_NAME="$with_lib_basename"
28223
28224 case "x$PANEL_NAME" in
28225 (x|xno|xnone|xyes)
28226         PANEL_NAME=panel
28227         ;;
28228 (*)
28229         ;;
28230 esac
28231
28232 echo "$as_me:28232: result: $PANEL_NAME" >&5
28233 echo "${ECHO_T}$PANEL_NAME" >&6
28234
28235 echo "$as_me:28235: checking for desired basename for cxx library" >&5
28236 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28237
28238 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28239 if test "${with_cxx_libname+set}" = set; then
28240   withval="$with_cxx_libname"
28241   with_lib_basename=$withval
28242 else
28243   with_lib_basename=ncurses++
28244 fi;
28245 CXX_NAME="$with_lib_basename"
28246
28247 case "x$CXX_NAME" in
28248 (x|xno|xnone|xyes)
28249         CXX_NAME=ncurses++
28250         ;;
28251 (*)
28252         ;;
28253 esac
28254
28255 echo "$as_me:28255: result: $CXX_NAME" >&5
28256 echo "${ECHO_T}$CXX_NAME" >&6
28257
28258 ### Construct the list of subdirectories for which we'll customize makefiles
28259 ### with the appropriate compile-rules.
28260
28261 echo "$as_me:28261: checking for src modules" >&5
28262 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28263
28264 # dependencies and linker-arguments for test-programs
28265 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28266 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28267 if test "$DFT_LWR_MODEL" = "libtool"; then
28268         TEST_ARGS="${TEST_DEPS}"
28269         TEST_ARG2="${TEST_DEP2}"
28270 else
28271         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28272         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28273 fi
28274
28275 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28276 cf_cv_src_modules=
28277 for cf_dir in $modules_to_build
28278 do
28279         if test -f "$srcdir/$cf_dir/modules" ; then
28280
28281                 # We may/may not have tack in the distribution, though the
28282                 # makefile is.
28283                 if test "$cf_dir" = tack ; then
28284                         if test "x$cf_with_tack" != "xyes"; then
28285                                 continue
28286                         fi
28287                 fi
28288
28289                 if test -z "$cf_cv_src_modules"; then
28290                         cf_cv_src_modules=$cf_dir
28291                 else
28292                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28293                 fi
28294
28295                 # Make the ncurses_cfg.h file record the library interface files as
28296                 # well.  These are header files that are the same name as their
28297                 # directory.  Ncurses is the only library that does not follow
28298                 # that pattern.
28299                 if test "$cf_dir" = tack ; then
28300                         continue
28301                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28302
28303 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28304
28305                         cat >>confdefs.h <<EOF
28306 #define HAVE_${cf_have_include}_H 1
28307 EOF
28308
28309                         cat >>confdefs.h <<EOF
28310 #define HAVE_LIB${cf_have_include} 1
28311 EOF
28312
28313 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28314
28315 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28316
28317                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28318                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28319                         if test "$DFT_LWR_MODEL" = "libtool"; then
28320                                 TEST_ARGS="${TEST_DEPS}"
28321                                 TEST_ARG2="${TEST_DEP2}"
28322                         else
28323                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28324                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28325                         fi
28326                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28327                 fi
28328         fi
28329 done
28330 echo "$as_me:28330: result: $cf_cv_src_modules" >&5
28331 echo "${ECHO_T}$cf_cv_src_modules" >&6
28332
28333 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28334 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28335
28336 SRC_SUBDIRS=
28337 if test "x$cf_with_manpages" != xno ; then
28338         SRC_SUBDIRS="$SRC_SUBDIRS man"
28339 fi
28340 SRC_SUBDIRS="$SRC_SUBDIRS include"
28341 for cf_dir in $cf_cv_src_modules
28342 do
28343         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28344 done
28345 if test "x$cf_with_tests" != "xno" ; then
28346         SRC_SUBDIRS="$SRC_SUBDIRS test"
28347 fi
28348 # always make this, to install the ncurses-config script
28349 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28350 if test "$cf_with_cxx_binding" != no; then
28351         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28352         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28353 fi
28354
28355 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28356 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28357
28358 ADA_SUBDIRS=
28359 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28360         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28361         ADA_SUBDIRS="gen src"
28362         if test "x$cf_with_tests" != "xno" ; then
28363                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28364         fi
28365 fi
28366
28367 SUB_MAKEFILES=
28368 for cf_dir in $SRC_SUBDIRS
28369 do
28370         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28371 done
28372
28373 if test -n "$ADA_SUBDIRS"; then
28374         for cf_dir in $ADA_SUBDIRS
28375         do
28376                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28377         done
28378
28379 fi
28380
28381 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28382    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28383    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28384    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28385 fi
28386
28387 DIRS_TO_MAKE="lib"
28388 for cf_item in $cf_list_models
28389 do
28390
28391         case $cf_item in
28392         (libtool) cf_subdir='obj_lo'  ;;
28393         (normal)  cf_subdir='objects' ;;
28394         (debug)   cf_subdir='obj_g' ;;
28395         (profile) cf_subdir='obj_p' ;;
28396         (shared)
28397                 case "$cf_cv_system_name" in
28398                 (cygwin|msys)
28399                         cf_subdir='objects' ;;
28400                 (*)
28401                         cf_subdir='obj_s' ;;
28402                 esac
28403         esac
28404
28405         for cf_item2 in $DIRS_TO_MAKE
28406         do
28407                 test "$cf_item2" = "$cf_subdir" && break
28408         done
28409         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28410 done
28411 for cf_dir in $DIRS_TO_MAKE
28412 do
28413         test ! -d "$cf_dir" && mkdir "$cf_dir"
28414 done
28415
28416 # symbols that differ when compiling Ada95 by itself.
28417 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28418
28419 # values to use as strings
28420
28421 cat >>confdefs.h <<EOF
28422 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28423 EOF
28424
28425 cat >>confdefs.h <<EOF
28426 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28427 EOF
28428
28429 ### Define substitutions for header files to avoid name-pollution
28430
28431 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28432         HAVE_TCGETATTR=1
28433 else
28434         HAVE_TCGETATTR=0
28435 fi
28436
28437 if test "x$ac_cv_header_stdint_h" = xyes ; then
28438         HAVE_STDINT_H=1
28439 else
28440         HAVE_STDINT_H=0
28441 fi
28442
28443 if test "x$ac_cv_header_termio_h" = xyes ; then
28444         HAVE_TERMIO_H=1
28445 else
28446         HAVE_TERMIO_H=0
28447 fi
28448
28449 if test "x$ac_cv_header_termios_h" = xyes ; then
28450         HAVE_TERMIOS_H=1
28451 else
28452         HAVE_TERMIOS_H=0
28453 fi
28454
28455 ################################################################################
28456 test "x$use_database" = xyes && \
28457 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28458
28459 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28460 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28461
28462 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28463 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28464 fi
28465
28466 if test "x$cf_with_tests" != xno ; then
28467         MAKE_TESTS=
28468 else
28469         MAKE_TESTS="#"
28470 fi
28471
28472 ADAHTML_DIR=../../doc/html/ada
28473
28474 # workaround for OS/2 (20151017)
28475 case "$cf_cv_system_name" in
28476 (os2*)
28477         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28478         ;;
28479 (*)
28480         LIBTOOL_OPTS_CXX=
28481         ;;
28482 esac
28483
28484 # workaround for g++ versus Solaris (20131116)
28485 case "$cf_cv_system_name" in
28486 (solaris2*)
28487         case "x$CPPFLAGS" in
28488         (*-D_XOPEN_SOURCE_EXTENDED*)
28489                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28490
28491 echo "${as_me:-configure}:28491: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28492
28493                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28494                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28495                 ;;
28496         esac
28497         ;;
28498 esac
28499
28500 # Help to automatically enable the extended curses features when using either
28501 # the *-config or the ".pc" files by adding defines.
28502 echo "$as_me:28502: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28503 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28504 PKG_CFLAGS=
28505 for cf_loop1 in $CPPFLAGS_after_XOPEN
28506 do
28507         cf_found=no
28508         for cf_loop2 in $CPPFLAGS_before_XOPEN
28509         do
28510                 if test "x$cf_loop1" = "x$cf_loop2"
28511                 then
28512                         cf_found=yes
28513                         break
28514                 fi
28515         done
28516         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28517 done
28518 echo "$as_me:28518: result: $PKG_CFLAGS" >&5
28519 echo "${ECHO_T}$PKG_CFLAGS" >&6
28520
28521 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28522 case "x$NCURSES_OSPEED" in
28523 (*short*)
28524         cf_compatible=1
28525         ;;
28526 (*)
28527         cf_compatible=0
28528         ;;
28529 esac
28530
28531 cat >>confdefs.h <<EOF
28532 #define NCURSES_OSPEED_COMPAT $cf_compatible
28533 EOF
28534
28535 case "x$cf_cv_typeof_chtype" in
28536 (xshort|xint|xlong)
28537         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28538         ;;
28539 esac
28540
28541 case "x$cf_cv_typeof_mmask_t" in
28542 (xshort|xint|xlong)
28543         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28544         ;;
28545 esac
28546
28547 # substitute into misc/Makefile to suppress
28548 # (un)install.data from the
28549 # (un)install rules.
28550 if test "x$cf_with_db_install" = "xno"; then
28551         MISC_INSTALL_DATA=
28552         MISC_UNINSTALL_DATA=
28553 else
28554         MISC_INSTALL_DATA=install.data
28555         MISC_UNINSTALL_DATA=uninstall.data
28556 fi
28557
28558 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28559         MAKE_DATABASE="#"
28560 else
28561         MAKE_DATABASE="$MAKE_TERMINFO"
28562 fi
28563
28564 if test -n "$PACKAGE"
28565 then
28566         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28567         export PACKAGE
28568         echo "package: $PACKAGE"
28569 fi
28570
28571 UNALTERED_SYMS=
28572 cf_filter_syms=no
28573
28574 if test -n "$RESULTING_SYMS"
28575 then
28576         cf_filter_syms=$cf_dft_filter_syms
28577         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28578
28579 echo "${as_me:-configure}:28579: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28580
28581 fi
28582
28583 if test "x$WILDCARD_SYMS" = xno
28584 then
28585         cf_filter_syms=yes
28586 fi
28587
28588 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28589
28590 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28591 if test "$cf_filter_syms" = yes
28592 then
28593         RESULTING_SYMS=resulting.map
28594 fi
28595
28596 if test "x$cross_compiling" = xyes ; then
28597         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28598         CHECK_BUILD="#"
28599 else
28600         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28601         CHECK_BUILD=
28602 fi
28603
28604 # This is used for the *-config script and *.pc data files.
28605
28606 echo "$as_me:28606: checking for linker search path" >&5
28607 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28608 if test "${cf_cv_ld_searchpath+set}" = set; then
28609   echo $ECHO_N "(cached) $ECHO_C" >&6
28610 else
28611
28612 if test "$cross_compiling" != yes ; then
28613
28614 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28615 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28616
28617 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28618 # update the cache, which makes it run faster.
28619 test -z "$cf_pathlist" && \
28620         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28621
28622 test -z "$cf_pathlist" &&
28623         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28624
28625 # This works with OpenBSD 6.5, which lists only filenames
28626 test -z "$cf_pathlist" &&
28627         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28628
28629 if test -z "$cf_pathlist"
28630 then
28631         # dyld default path with MacOS
28632         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28633         then
28634                 # do this to bypass check
28635                 cf_cv_ld_searchpath='$HOME/lib'
28636                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28637         fi
28638 fi
28639
28640 if test -z "$cf_pathlist"
28641 then
28642         # Solaris is "SunOS"
28643         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28644         then
28645                 case x`(isainfo -b)` in
28646                 (x64)
28647                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28648                         ;;
28649                 (x32)
28650                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28651                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28652                         ;;
28653                 (*)
28654                         { echo "$as_me:28654: WARNING: problem with Solaris architecture" >&5
28655 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28656                         ;;
28657                 esac
28658         fi
28659 fi
28660
28661 if test -z "$cf_pathlist"
28662 then
28663         # HP-UX
28664         if test x"`uname -s`" = xHP-UX
28665         then
28666                 case x`getconf LONG_BIT` in
28667                 (x64)
28668                         cf_pathlist="/usr/lib/hpux64"
28669                         ;;
28670                 (x*)
28671                         cf_pathlist="/usr/lib/hpux32"
28672                         ;;
28673                 esac
28674         fi
28675 fi
28676
28677 fi
28678
28679 # If nothing else, assume it is conventional
28680 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28681
28682 # Finally, check that this is only directories
28683 for cf_path in $0 $cf_pathlist
28684 do
28685         if test -d "$cf_path"; then
28686                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28687                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28688         fi
28689 done
28690
28691 # Ensure that it is nonempty
28692 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28693
28694 fi
28695 echo "$as_me:28695: result: $cf_cv_ld_searchpath" >&5
28696 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28697
28698 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28699
28700 cat >>confdefs.h <<\EOF
28701 #define HAVE_CURSES_DATA_BOOLNAMES 1
28702 EOF
28703
28704 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"
28705 ac_config_commands="$ac_config_commands default"
28706 cat >confcache <<\_ACEOF
28707 # This file is a shell script that caches the results of configure
28708 # tests run on this system so they can be shared between configure
28709 # scripts and configure runs, see configure's option --config-cache.
28710 # It is not useful on other systems.  If it contains results you don't
28711 # want to keep, you may remove or edit it.
28712 #
28713 # config.status only pays attention to the cache file if you give it
28714 # the --recheck option to rerun configure.
28715 #
28716 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28717 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28718 # following values.
28719
28720 _ACEOF
28721
28722 # The following way of writing the cache mishandles newlines in values,
28723 # but we know of no workaround that is simple, portable, and efficient.
28724 # So, don't put newlines in cache variables' values.
28725 # Ultrix sh set writes to stderr and can't be redirected directly,
28726 # and sets the high bit in the cache file unless we assign to the vars.
28727 {
28728   (set) 2>&1 |
28729     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28730     *ac_space=\ *)
28731       # `set' does not quote correctly, so add quotes (double-quote
28732       # substitution turns \\\\ into \\, and sed turns \\ into \).
28733       sed -n \
28734         "s/'/'\\\\''/g;
28735           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28736       ;;
28737     *)
28738       # `set' quotes correctly as required by POSIX, so do not add quotes.
28739       sed -n \
28740         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28741       ;;
28742     esac;
28743 } |
28744   sed '
28745      t clear
28746      : clear
28747      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28748      t end
28749      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28750      : end' >>confcache
28751 if cmp -s $cache_file confcache; then :; else
28752   if test -w $cache_file; then
28753     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28754     cat confcache >$cache_file
28755   else
28756     echo "not updating unwritable cache $cache_file"
28757   fi
28758 fi
28759 rm -f confcache
28760
28761 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28762 # Let make expand exec_prefix.
28763 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28764
28765 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28766 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28767 # trailing colons and then remove the whole line if VPATH becomes empty
28768 # (actually we leave an empty line to preserve line numbers).
28769 if test "x$srcdir" = x.; then
28770   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28771 s/:*\$(srcdir):*/:/;
28772 s/:*\${srcdir}:*/:/;
28773 s/:*@srcdir@:*/:/;
28774 s/^\([^=]*=[    ]*\):*/\1/;
28775 s/:*$//;
28776 s/^[^=]*=[      ]*$//;
28777 }'
28778 fi
28779
28780 DEFS=-DHAVE_CONFIG_H
28781
28782 : "${CONFIG_STATUS=./config.status}"
28783 ac_clean_files_save=$ac_clean_files
28784 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28785 { echo "$as_me:28785: creating $CONFIG_STATUS" >&5
28786 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28787 cat >"$CONFIG_STATUS" <<_ACEOF
28788 #! $SHELL
28789 # Generated automatically by configure.
28790 # Run this file to recreate the current configuration.
28791 # Compiler output produced by configure, useful for debugging
28792 # configure, is in config.log if it exists.
28793
28794 debug=false
28795 SHELL=\${CONFIG_SHELL-$SHELL}
28796 ac_cs_invocation="\$0 \$@"
28797
28798 CLICOLOR_FORCE= GREP_OPTIONS=
28799 unset CLICOLOR_FORCE GREP_OPTIONS
28800 _ACEOF
28801
28802 cat >>"$CONFIG_STATUS" <<\_ACEOF
28803 # Be Bourne compatible
28804 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28805   emulate sh
28806   NULLCMD=:
28807 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28808   set -o posix
28809 fi
28810
28811 # Name of the executable.
28812 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28813
28814 if expr a : '\(a\)' >/dev/null 2>&1; then
28815   as_expr=expr
28816 else
28817   as_expr=false
28818 fi
28819
28820 rm -f conf$$ conf$$.exe conf$$.file
28821 echo >conf$$.file
28822 if ln -s conf$$.file conf$$ 2>/dev/null; then
28823   # We could just check for DJGPP; but this test a) works b) is more generic
28824   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28825   if test -f conf$$.exe; then
28826     # Don't use ln at all; we don't have any links
28827     as_ln_s='cp -p'
28828   else
28829     as_ln_s='ln -s'
28830   fi
28831 elif ln conf$$.file conf$$ 2>/dev/null; then
28832   as_ln_s=ln
28833 else
28834   as_ln_s='cp -p'
28835 fi
28836 rm -f conf$$ conf$$.exe conf$$.file
28837
28838 as_executable_p="test -f"
28839
28840 # Support unset when possible.
28841 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28842   as_unset="unset"
28843 else
28844   as_unset="false"
28845 fi
28846
28847 # NLS nuisances.
28848 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28849 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28850 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28851 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28852 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28853 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28854 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28855 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28856
28857 # IFS
28858 # We need space, tab and new line, in precisely that order.
28859 as_nl='
28860 '
28861 IFS="   $as_nl"
28862
28863 # CDPATH.
28864 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28865
28866 exec 6>&1
28867
28868 _ACEOF
28869
28870 # Files that config.status was made for.
28871 if test -n "$ac_config_files"; then
28872   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
28873 fi
28874
28875 if test -n "$ac_config_headers"; then
28876   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
28877 fi
28878
28879 if test -n "$ac_config_links"; then
28880   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
28881 fi
28882
28883 if test -n "$ac_config_commands"; then
28884   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
28885 fi
28886
28887 cat >>"$CONFIG_STATUS" <<\EOF
28888
28889 ac_cs_usage="\
28890 \`$as_me' instantiates files from templates according to the
28891 current configuration.
28892
28893 Usage: $0 [OPTIONS] [FILE]...
28894
28895   -h, --help       print this help, then exit
28896   -V, --version    print version number, then exit
28897   -d, --debug      don't remove temporary files
28898       --recheck    update $as_me by reconfiguring in the same conditions
28899   --file=FILE[:TEMPLATE]
28900                    instantiate the configuration file FILE
28901   --header=FILE[:TEMPLATE]
28902                    instantiate the configuration header FILE
28903
28904 Configuration files:
28905 $config_files
28906
28907 Configuration headers:
28908 $config_headers
28909
28910 Configuration commands:
28911 $config_commands
28912
28913 Report bugs to <dickey@invisible-island.net>."
28914 EOF
28915
28916 cat >>"$CONFIG_STATUS" <<EOF
28917 ac_cs_version="\\
28918 config.status
28919 configured by $0, generated by GNU Autoconf 2.52.20210509,
28920   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28921
28922 Copyright 2003-2020,2021        Thomas E. Dickey
28923 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28924 Free Software Foundation, Inc.
28925 This config.status script is free software; the Free Software Foundation
28926 gives unlimited permission to copy, distribute and modify it."
28927 srcdir="$srcdir"
28928 INSTALL="$INSTALL"
28929 EOF
28930
28931 cat >>"$CONFIG_STATUS" <<\EOF
28932 # If no file are specified by the user, then we need to provide default
28933 # value.  By we need to know if files were specified by the user.
28934 ac_need_defaults=:
28935 while test $# != 0
28936 do
28937   case $1 in
28938   --*=*)
28939     ac_option=`expr "x$1" : 'x\([^=]*\)='`
28940     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
28941     shift
28942     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
28943     shift
28944     ;;
28945   -*);;
28946   *) # This is not an option, so the user has probably given explicit
28947      # arguments.
28948      ac_need_defaults=false;;
28949   esac
28950
28951   case $1 in
28952   # Handling of the options.
28953 EOF
28954 cat >>"$CONFIG_STATUS" <<EOF
28955   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28956     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
28957     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
28958 EOF
28959 cat >>"$CONFIG_STATUS" <<\EOF
28960   --version | --vers* | -V )
28961     echo "$ac_cs_version"; exit 0 ;;
28962   --he | --h)
28963     # Conflict between --help and --header
28964     { { echo "$as_me:28964: error: ambiguous option: $1
28965 Try \`$0 --help' for more information." >&5
28966 echo "$as_me: error: ambiguous option: $1
28967 Try \`$0 --help' for more information." >&2;}
28968    { (exit 1); exit 1; }; };;
28969   --help | --hel | -h )
28970     echo "$ac_cs_usage"; exit 0 ;;
28971   --debug | --d* | -d )
28972     debug=: ;;
28973   --file | --fil | --fi | --f )
28974     shift
28975     CONFIG_FILES="$CONFIG_FILES $1"
28976     ac_need_defaults=false;;
28977   --header | --heade | --head | --hea )
28978     shift
28979     CONFIG_HEADERS="$CONFIG_HEADERS $1"
28980     ac_need_defaults=false;;
28981
28982   # This is an error.
28983   -*) { { echo "$as_me:28983: error: unrecognized option: $1
28984 Try \`$0 --help' for more information." >&5
28985 echo "$as_me: error: unrecognized option: $1
28986 Try \`$0 --help' for more information." >&2;}
28987    { (exit 1); exit 1; }; } ;;
28988
28989   *) ac_config_targets="$ac_config_targets $1" ;;
28990
28991   esac
28992   shift
28993 done
28994
28995 exec 5>>config.log
28996 cat >&5 << _ACEOF
28997
28998 ## ----------------------- ##
28999 ## Running config.status.  ##
29000 ## ----------------------- ##
29001
29002 This file was extended by $as_me 2.52.20210509, executed with
29003   CONFIG_FILES    = $CONFIG_FILES
29004   CONFIG_HEADERS  = $CONFIG_HEADERS
29005   CONFIG_LINKS    = $CONFIG_LINKS
29006   CONFIG_COMMANDS = $CONFIG_COMMANDS
29007   > "$ac_cs_invocation"
29008 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29009
29010 _ACEOF
29011 EOF
29012
29013 cat >>"$CONFIG_STATUS" <<EOF
29014 #
29015 # INIT-COMMANDS section.
29016 #
29017
29018 ### Special initialization commands, used to pass information from the
29019 ### configuration-run into config.status
29020
29021 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29022 AWK="$AWK"
29023 CXX_NAME="$CXX_NAME"
29024 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29025 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29026 ECHO_LD="$ECHO_LD"
29027 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29028 FORM_NAME="$FORM_NAME"
29029 LDCONFIG="$LDCONFIG"
29030 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29031 LIB_NAME="$LIB_NAME"
29032 LIB_PREFIX="$LIB_PREFIX"
29033 LIB_SUBSETS="$LIB_SUBSETS"
29034 LIB_SUFFIX="$LIB_SUFFIX"
29035 LIB_TRACING="$LIB_TRACING"
29036 LN_S="$LN_S"
29037 MAKE_TERMINFO="$MAKE_TERMINFO"
29038 MENU_NAME="$MENU_NAME"
29039 NCURSES_MAJOR="$NCURSES_MAJOR"
29040 NCURSES_MINOR="$NCURSES_MINOR"
29041 NCURSES_OSPEED="$NCURSES_OSPEED"
29042 NCURSES_PATCH="$NCURSES_PATCH"
29043 PANEL_NAME="$PANEL_NAME"
29044 SRC_SUBDIRS="$SRC_SUBDIRS"
29045 TERMINFO="$TERMINFO"
29046 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29047 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29048 TICS_NAME="$TICS_NAME"
29049 TICS_SUFFIX="$TICS_SUFFIX"
29050 TIC_PATH="$TIC_PATH"
29051 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29052 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29053 TINFO_NAME="$TINFO_NAME"
29054 TINFO_SUFFIX="$TINFO_SUFFIX"
29055 UNALTERED_SYMS="$UNALTERED_SYMS"
29056 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29057 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29058 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29059 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29060 WILDCARD_SYMS="$WILDCARD_SYMS"
29061 WITH_CURSES_H="$with_curses_h"
29062 WITH_ECHO="${enable_echo:=yes}"
29063 WITH_OVERWRITE="$with_overwrite"
29064 cf_LIST_MODELS="$cf_list_models"
29065 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29066 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29067 cf_cv_abi_version="$cf_cv_abi_version"
29068 cf_cv_do_relink="$cf_cv_do_relink"
29069 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29070 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29071 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29072 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29073 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29074 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29075 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29076 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29077 cf_cv_rel_version="$cf_cv_rel_version"
29078 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29079 cf_cv_shared_soname='$cf_cv_shared_soname'
29080 cf_cv_shlib_version="$cf_cv_shlib_version"
29081 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29082 cf_cv_system_name="$cf_cv_system_name"
29083 cf_cv_term_driver="$with_term_driver"
29084 cf_with_ada="$cf_with_ada"
29085 cf_with_cxx_binding="$cf_with_cxx_binding"
29086 cf_with_db_install="$cf_with_db_install"
29087 cf_with_manpages="$cf_with_manpages"
29088 cf_with_tests="$cf_with_tests"
29089 host="$host"
29090 target="$target"
29091 with_shared_cxx="$with_shared_cxx"
29092
29093 EOF
29094
29095 cat >>"$CONFIG_STATUS" <<\EOF
29096 for ac_config_target in $ac_config_targets
29097 do
29098   case "$ac_config_target" in
29099   # Handling of arguments.
29100   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29101   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29102   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29103   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29104   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29105   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29106   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29107   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29108   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29109   *) { { echo "$as_me:29109: error: invalid argument: $ac_config_target" >&5
29110 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29111    { (exit 1); exit 1; }; };;
29112   esac
29113 done
29114
29115 # If the user did not use the arguments to specify the items to instantiate,
29116 # then the envvar interface is used.  Set only those that are not.
29117 # We use the long form for the default assignment because of an extremely
29118 # bizarre bug on SunOS 4.1.3.
29119 if "$ac_need_defaults"; then
29120   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29121   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29122   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29123 fi
29124
29125 # Create a temporary directory, and hook for its removal unless debugging.
29126 $debug ||
29127 {
29128   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29129   trap '{ (exit 1); exit 1; }' 1 2 13 15
29130 }
29131
29132 # Create a (secure) tmp directory for tmp files.
29133 : ${TMPDIR=/tmp}
29134 {
29135   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29136   test -n "$tmp" && test -d "$tmp"
29137 }  ||
29138 {
29139   tmp=$TMPDIR/cs$$-$RANDOM
29140   (umask 077 && mkdir $tmp)
29141 } ||
29142 {
29143    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29144    { (exit 1); exit 1; }
29145 }
29146
29147 EOF
29148
29149 cat >>"$CONFIG_STATUS" <<EOF
29150
29151 #
29152 # CONFIG_FILES section.
29153 #
29154
29155 # No need to generate the scripts if there are no CONFIG_FILES.
29156 # This happens for instance when ./config.status config.h
29157 if test -n "\$CONFIG_FILES"; then
29158   # Protect against being on the right side of a sed subst in config.status.
29159   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29160    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
29161 s,@SHELL@,$SHELL,;t t
29162 s,@exec_prefix@,$exec_prefix,;t t
29163 s,@prefix@,$prefix,;t t
29164 s,@program_transform_name@,$program_transform_name,;t t
29165 s,@bindir@,$bindir,;t t
29166 s,@sbindir@,$sbindir,;t t
29167 s,@libexecdir@,$libexecdir,;t t
29168 s,@datarootdir@,$datarootdir,;t t
29169 s,@datadir@,$datadir,;t t
29170 s,@sysconfdir@,$sysconfdir,;t t
29171 s,@sharedstatedir@,$sharedstatedir,;t t
29172 s,@localstatedir@,$localstatedir,;t t
29173 s,@runstatedir@,$runstatedir,;t t
29174 s,@libdir@,$libdir,;t t
29175 s,@includedir@,$includedir,;t t
29176 s,@oldincludedir@,$oldincludedir,;t t
29177 s,@infodir@,$infodir,;t t
29178 s,@mandir@,$mandir,;t t
29179 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29180 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29181 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29182 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29183 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29184 s,@build_alias@,$build_alias,;t t
29185 s,@host_alias@,$host_alias,;t t
29186 s,@target_alias@,$target_alias,;t t
29187 s,@ECHO_C@,$ECHO_C,;t t
29188 s,@ECHO_N@,$ECHO_N,;t t
29189 s,@ECHO_T@,$ECHO_T,;t t
29190 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29191 s,@DEFS@,$DEFS,;t t
29192 s,@LIBS@,$LIBS,;t t
29193 s,@top_builddir@,$top_builddir,;t t
29194 s,@GREP@,$GREP,;t t
29195 s,@EGREP@,$EGREP,;t t
29196 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29197 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29198 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29199 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29200 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29201 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29202 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29203 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29204 s,@VERSION@,$VERSION,;t t
29205 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29206 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29207 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29208 s,@PACKAGE@,$PACKAGE,;t t
29209 s,@build@,$build,;t t
29210 s,@build_cpu@,$build_cpu,;t t
29211 s,@build_vendor@,$build_vendor,;t t
29212 s,@build_os@,$build_os,;t t
29213 s,@host@,$host,;t t
29214 s,@host_cpu@,$host_cpu,;t t
29215 s,@host_vendor@,$host_vendor,;t t
29216 s,@host_os@,$host_os,;t t
29217 s,@target@,$target,;t t
29218 s,@target_cpu@,$target_cpu,;t t
29219 s,@target_vendor@,$target_vendor,;t t
29220 s,@target_os@,$target_os,;t t
29221 s,@FGREP@,$FGREP,;t t
29222 s,@CC@,$CC,;t t
29223 s,@CFLAGS@,$CFLAGS,;t t
29224 s,@LDFLAGS@,$LDFLAGS,;t t
29225 s,@CPPFLAGS@,$CPPFLAGS,;t t
29226 s,@ac_ct_CC@,$ac_ct_CC,;t t
29227 s,@EXEEXT@,$EXEEXT,;t t
29228 s,@OBJEXT@,$OBJEXT,;t t
29229 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29230 s,@CPP@,$CPP,;t t
29231 s,@LDCONFIG@,$LDCONFIG,;t t
29232 s,@CXX@,$CXX,;t t
29233 s,@CXXFLAGS@,$CXXFLAGS,;t t
29234 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29235 s,@AWK@,$AWK,;t t
29236 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29237 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29238 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29239 s,@LINT@,$LINT,;t t
29240 s,@LINT_OPTS@,$LINT_OPTS,;t t
29241 s,@LN_S@,$LN_S,;t t
29242 s,@cf_config_suffix@,$cf_config_suffix,;t t
29243 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29244 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29245 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29246 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29247 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29248 s,@SET_MAKE@,$SET_MAKE,;t t
29249 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29250 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29251 s,@CTAGS@,$CTAGS,;t t
29252 s,@ETAGS@,$ETAGS,;t t
29253 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29254 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29255 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29256 s,@RANLIB@,$RANLIB,;t t
29257 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29258 s,@LD@,$LD,;t t
29259 s,@ac_ct_LD@,$ac_ct_LD,;t t
29260 s,@AR@,$AR,;t t
29261 s,@ac_ct_AR@,$ac_ct_AR,;t t
29262 s,@NM@,$NM,;t t
29263 s,@ac_ct_NM@,$ac_ct_NM,;t t
29264 s,@ARFLAGS@,$ARFLAGS,;t t
29265 s,@DESTDIR@,$DESTDIR,;t t
29266 s,@BUILD_CC@,$BUILD_CC,;t t
29267 s,@BUILD_CPP@,$BUILD_CPP,;t t
29268 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29269 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29270 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29271 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29272 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29273 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29274 s,@cf_list_models@,$cf_list_models,;t t
29275 s,@ABI_VERSION@,$ABI_VERSION,;t t
29276 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29277 s,@LIBTOOL@,$LIBTOOL,;t t
29278 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29279 s,@LT_UNDEF@,$LT_UNDEF,;t t
29280 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29281 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29282 s,@LIB_CREATE@,$LIB_CREATE,;t t
29283 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29284 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29285 s,@LIB_PREP@,$LIB_PREP,;t t
29286 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29287 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29288 s,@LIB_LINK@,$LIB_LINK,;t t
29289 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29290 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29291 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29292 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29293 s,@TICS_NAME@,$TICS_NAME,;t t
29294 s,@TINFO_NAME@,$TINFO_NAME,;t t
29295 s,@LIB_NAME@,$LIB_NAME,;t t
29296 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29297 s,@CC_G_OPT@,$CC_G_OPT,;t t
29298 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29299 s,@LD_MODEL@,$LD_MODEL,;t t
29300 s,@shlibdir@,$shlibdir,;t t
29301 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29302 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29303 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29304 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29305 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29306 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29307 s,@LINK_PROGS@,$LINK_PROGS,;t t
29308 s,@LINK_TESTS@,$LINK_TESTS,;t t
29309 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29310 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29311 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29312 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29313 s,@RPATH_LIST@,$RPATH_LIST,;t t
29314 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29315 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29316 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29317 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29318 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29319 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29320 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29321 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29322 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29323 s,@TIC@,$TIC,;t t
29324 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29325 s,@INFOCMP@,$INFOCMP,;t t
29326 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29327 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29328 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29329 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29330 s,@XTERM_KBS@,$XTERM_KBS,;t t
29331 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29332 s,@TERMINFO@,$TERMINFO,;t t
29333 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29334 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29335 s,@TERMPATH@,$TERMPATH,;t t
29336 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29337 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29338 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29339 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29340 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29341 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29342 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29343 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29344 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29345 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29346 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29347 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29348 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29349 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29350 s,@RGB_PATH@,$RGB_PATH,;t t
29351 s,@no_x11_rgb@,$no_x11_rgb,;t t
29352 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29353 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29354 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29355 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29356 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29357 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29358 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29359 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29360 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29361 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29362 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29363 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29364 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29365 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29366 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29367 s,@PTHREAD@,$PTHREAD,;t t
29368 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29369 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29370 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29371 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29372 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29373 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29374 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29375 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29376 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29377 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29378 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29379 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29380 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29381 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29382 s,@ECHO_LT@,$ECHO_LT,;t t
29383 s,@ECHO_LD@,$ECHO_LD,;t t
29384 s,@RULE_CC@,$RULE_CC,;t t
29385 s,@SHOW_CC@,$SHOW_CC,;t t
29386 s,@ECHO_CC@,$ECHO_CC,;t t
29387 s,@ECHO_LINK@,$ECHO_LINK,;t t
29388 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29389 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29390 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29391 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29392 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29393 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29394 s,@ADAFLAGS@,$ADAFLAGS,;t t
29395 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29396 s,@ADA_TRACE@,$ADA_TRACE,;t t
29397 s,@MATH_LIB@,$MATH_LIB,;t t
29398 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29399 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29400 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29401 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29402 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29403 s,@TEST_LIBS@,$TEST_LIBS,;t t
29404 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29405 s,@CXXCPP@,$CXXCPP,;t t
29406 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29407 s,@CXX_AR@,$CXX_AR,;t t
29408 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29409 s,@CXXLIBS@,$CXXLIBS,;t t
29410 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29411 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29412 s,@M4_exists@,$M4_exists,;t t
29413 s,@cf_ada_make@,$cf_ada_make,;t t
29414 s,@cf_ada_config@,$cf_ada_config,;t t
29415 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29416 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29417 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29418 s,@cf_compile_generics@,$cf_compile_generics,;t t
29419 s,@cf_generic_objects@,$cf_generic_objects,;t t
29420 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29421 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29422 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29423 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29424 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29425 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29426 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29427 s,@cf_ada_package@,$cf_ada_package,;t t
29428 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29429 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29430 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29431 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29432 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29433 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29434 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29435 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29436 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29437 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29438 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29439 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29440 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29441 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29442 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29443 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29444 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29445 s,@TICS_LIBS@,$TICS_LIBS,;t t
29446 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29447 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29448 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29449 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29450 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29451 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29452 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29453 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29454 s,@includesubdir@,$includesubdir,;t t
29455 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29456 s,@TICS_LIST@,$TICS_LIST,;t t
29457 s,@TINFO_LIST@,$TINFO_LIST,;t t
29458 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29459 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29460 s,@FORM_NAME@,$FORM_NAME,;t t
29461 s,@MENU_NAME@,$MENU_NAME,;t t
29462 s,@PANEL_NAME@,$PANEL_NAME,;t t
29463 s,@CXX_NAME@,$CXX_NAME,;t t
29464 s,@TEST_ARGS@,$TEST_ARGS,;t t
29465 s,@TEST_DEPS@,$TEST_DEPS,;t t
29466 s,@TEST_ARG2@,$TEST_ARG2,;t t
29467 s,@TEST_DEP2@,$TEST_DEP2,;t t
29468 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29469 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29470 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29471 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29472 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29473 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29474 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29475 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29476 s,@cross_compiling@,$cross_compiling,;t t
29477 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29478 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29479 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29480 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29481 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29482 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29483 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29484 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29485 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29486 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29487 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29488 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29489 CEOF
29490
29491 EOF
29492
29493   cat >>"$CONFIG_STATUS" <<\EOF
29494   # Split the substitutions into bite-sized pieces for seds with
29495   # small command number limits, like on Digital OSF/1 and HP-UX.
29496   ac_max_sed_lines=48
29497   ac_sed_frag=1 # Number of current file.
29498   ac_beg=1 # First line for current file.
29499   ac_end=$ac_max_sed_lines # Line after last line for current file.
29500   ac_more_lines=:
29501   ac_sed_cmds=
29502   while "$ac_more_lines"; do
29503     if test "$ac_beg" -gt 1; then
29504       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29505     else
29506       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29507     fi
29508     if test ! -s $tmp/subs.frag; then
29509       ac_more_lines=false
29510     else
29511       # The purpose of the label and of the branching condition is to
29512       # speed up the sed processing (if there are no `@' at all, there
29513       # is no need to browse any of the substitutions).
29514       # These are the two extra sed commands mentioned above.
29515       (echo ':t
29516   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29517       # It is possible to make a multiline substitution using escaped newlines.
29518       # Ensure that we do not split the substitution between script fragments.
29519       ac_BEG=$ac_end
29520       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29521       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29522       if test -s $tmp/subs.next; then
29523         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29524         if test ! -s $tmp/subs.edit; then
29525           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29526           if test ! -s $tmp/subs.edit; then
29527             if test "$ac_beg" -gt 1; then
29528               ac_end=`expr "$ac_end" - 1`
29529               continue
29530             fi
29531           fi
29532         fi
29533       fi
29534
29535       if test -z "$ac_sed_cmds"; then
29536         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29537       else
29538         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29539       fi
29540       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29541       ac_beg=$ac_end
29542       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29543     fi
29544   done
29545   if test -z "$ac_sed_cmds"; then
29546     ac_sed_cmds=cat
29547   fi
29548 fi # test -n "$CONFIG_FILES"
29549
29550 EOF
29551 cat >>"$CONFIG_STATUS" <<\EOF
29552 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29553   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29554   case "$ac_file" in
29555   - | *:- | *:-:* ) # input from stdin
29556         cat >$tmp/stdin
29557         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29558         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29559   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29560         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29561   * )   ac_file_in=$ac_file.in ;;
29562   esac
29563
29564   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29565   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29566          X"$ac_file" : 'X\(//\)[^/]' \| \
29567          X"$ac_file" : 'X\(//\)$' \| \
29568          X"$ac_file" : 'X\(/\)' \| \
29569          .     : '\(.\)' 2>/dev/null ||
29570 echo X"$ac_file" |
29571     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29572           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29573           /^X\(\/\/\)$/{ s//\1/; q; }
29574           /^X\(\/\).*/{ s//\1/; q; }
29575           s/.*/./; q'`
29576   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29577     { case "$ac_dir" in
29578   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29579   *)                      as_incr_dir=.;;
29580 esac
29581 as_dummy="$ac_dir"
29582 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29583   case $as_mkdir_dir in
29584     # Skip DOS drivespec
29585     ?:) as_incr_dir=$as_mkdir_dir ;;
29586     *)
29587       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29588       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29589     ;;
29590   esac
29591 done; }
29592
29593     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29594     # A "../" for each directory in $ac_dir_suffix.
29595     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29596   else
29597     ac_dir_suffix= ac_dots=
29598   fi
29599
29600   case "$srcdir" in
29601   .)  ac_srcdir=.
29602       if test -z "$ac_dots"; then
29603          ac_top_srcdir=.
29604       else
29605          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29606       fi ;;
29607   [\\/]* | ?:[\\/]* )
29608       ac_srcdir="$srcdir$ac_dir_suffix";
29609       ac_top_srcdir="$srcdir" ;;
29610   *) # Relative path.
29611     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29612     ac_top_srcdir="$ac_dots$srcdir" ;;
29613   esac
29614
29615   case $INSTALL in
29616   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29617   *) ac_INSTALL=$ac_dots$INSTALL ;;
29618   esac
29619
29620   if test x"$ac_file" != x-; then
29621     { echo "$as_me:29621: creating $ac_file" >&5
29622 echo "$as_me: creating $ac_file" >&6;}
29623     rm -f "$ac_file"
29624   fi
29625   # Let's still pretend it is `configure' which instantiates (i.e., don't
29626   # use $as_me), people would be surprised to read:
29627   #    /* config.h.  Generated automatically by config.status.  */
29628   configure_input="Generated automatically from `echo $ac_file_in |
29629                                                  sed 's,.*/,,'` by configure."
29630
29631   # First look for the input files in the build tree, otherwise in the
29632   # src tree.
29633   ac_file_inputs=`IFS=:
29634     for f in $ac_file_in; do
29635       case $f in
29636       -) echo $tmp/stdin ;;
29637       [\\/$]*)
29638          # Absolute (can't be DOS-style, as IFS=:)
29639          test -f "$f" || { { echo "$as_me:29639: error: cannot find input file: $f" >&5
29640 echo "$as_me: error: cannot find input file: $f" >&2;}
29641    { (exit 1); exit 1; }; }
29642          echo $f;;
29643       *) # Relative
29644          if test -f "$f"; then
29645            # Build tree
29646            echo $f
29647          elif test -f "$srcdir/$f"; then
29648            # Source tree
29649            echo "$srcdir/$f"
29650          else
29651            # /dev/null tree
29652            { { echo "$as_me:29652: error: cannot find input file: $f" >&5
29653 echo "$as_me: error: cannot find input file: $f" >&2;}
29654    { (exit 1); exit 1; }; }
29655          fi;;
29656       esac
29657     done` || { (exit 1); exit 1; }
29658 EOF
29659 cat >>"$CONFIG_STATUS" <<\EOF
29660   ac_warn_datarootdir=no
29661   if test x"$ac_file" != x-; then
29662     for ac_item in $ac_file_inputs
29663     do
29664       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29665       if test -n "$ac_seen"; then
29666         ac_used=`grep '@datarootdir@' "$ac_item"`
29667         if test -z "$ac_used"; then
29668           { echo "$as_me:29668: WARNING: datarootdir was used implicitly but not set:
29669 $ac_seen" >&5
29670 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29671 $ac_seen" >&2;}
29672           ac_warn_datarootdir=yes
29673         fi
29674       fi
29675       ac_seen=`grep '${datarootdir}' "$ac_item"`
29676       if test -n "$ac_seen"; then
29677         { echo "$as_me:29677: WARNING: datarootdir was used explicitly but not set:
29678 $ac_seen" >&5
29679 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29680 $ac_seen" >&2;}
29681         ac_warn_datarootdir=yes
29682       fi
29683     done
29684   fi
29685
29686 if test "x$ac_warn_datarootdir" = xyes; then
29687   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29688 fi
29689
29690 EOF
29691 cat >>"$CONFIG_STATUS" <<EOF
29692   sed "$ac_vpsub
29693 $extrasub
29694 EOF
29695 cat >>"$CONFIG_STATUS" <<\EOF
29696 :t
29697 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29698 s,@configure_input@,$configure_input,;t t
29699 s,@srcdir@,$ac_srcdir,;t t
29700 s,@top_srcdir@,$ac_top_srcdir,;t t
29701 s,@INSTALL@,$ac_INSTALL,;t t
29702 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29703   rm -f $tmp/stdin
29704   if test x"$ac_file" != x-; then
29705     cp "$tmp/out" "$ac_file"
29706
29707     for ac_name in prefix exec_prefix datarootdir
29708     do
29709         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29710         if test -n "$ac_seen"; then
29711             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29712             if test -z "$ac_init"; then
29713               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29714               { echo "$as_me:29714: WARNING: Variable $ac_name is used but was not set:
29715 $ac_seen" >&5
29716 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29717 $ac_seen" >&2;}
29718             fi
29719         fi
29720     done
29721     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29722     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29723     if test -s $tmp/out; then
29724       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29725       { echo "$as_me:29725: WARNING: Some variables may not be substituted:
29726 $ac_seen" >&5
29727 echo "$as_me: WARNING: Some variables may not be substituted:
29728 $ac_seen" >&2;}
29729     fi
29730   else
29731     cat $tmp/out
29732   fi
29733   rm -f $tmp/out
29734
29735 done
29736 EOF
29737 cat >>"$CONFIG_STATUS" <<\EOF
29738
29739 #
29740 # CONFIG_HEADER section.
29741 #
29742
29743 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29744 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29745 #
29746 # ac_d sets the value in "#define NAME VALUE" lines.
29747 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29748 ac_dB='[        ].*$,\1#\2'
29749 ac_dC=' '
29750 ac_dD=',;t'
29751 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29752 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29753 ac_iB='\([      ]\),\1#\2define\3'
29754 ac_iC=' '
29755 ac_iD='\4,;t'
29756 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29757 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29758 ac_uB='$,\1#\2define\3'
29759 ac_uC=' '
29760 ac_uD=',;t'
29761
29762 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29763   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29764   case "$ac_file" in
29765   - | *:- | *:-:* ) # input from stdin
29766         cat >$tmp/stdin
29767         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29768         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29769   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29770         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29771   * )   ac_file_in=$ac_file.in ;;
29772   esac
29773
29774   test x"$ac_file" != x- && { echo "$as_me:29774: creating $ac_file" >&5
29775 echo "$as_me: creating $ac_file" >&6;}
29776
29777   # First look for the input files in the build tree, otherwise in the
29778   # src tree.
29779   ac_file_inputs=`IFS=:
29780     for f in $ac_file_in; do
29781       case $f in
29782       -) echo $tmp/stdin ;;
29783       [\\/$]*)
29784          # Absolute (can't be DOS-style, as IFS=:)
29785          test -f "$f" || { { echo "$as_me:29785: error: cannot find input file: $f" >&5
29786 echo "$as_me: error: cannot find input file: $f" >&2;}
29787    { (exit 1); exit 1; }; }
29788          echo $f;;
29789       *) # Relative
29790          if test -f "$f"; then
29791            # Build tree
29792            echo $f
29793          elif test -f "$srcdir/$f"; then
29794            # Source tree
29795            echo "$srcdir/$f"
29796          else
29797            # /dev/null tree
29798            { { echo "$as_me:29798: error: cannot find input file: $f" >&5
29799 echo "$as_me: error: cannot find input file: $f" >&2;}
29800    { (exit 1); exit 1; }; }
29801          fi;;
29802       esac
29803     done` || { (exit 1); exit 1; }
29804   # Remove the trailing spaces.
29805   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29806
29807 EOF
29808
29809 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29810 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29811 # be either 'cat' or 'sort'.
29812 cat confdefs.h | uniq >conftest.vals
29813
29814 # Break up conftest.vals because some shells have a limit on
29815 # the size of here documents, and old seds have small limits too.
29816
29817 rm -f conftest.tail
29818 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
29819 while grep . conftest.vals >/dev/null
29820 do
29821   # Write chunks of a limited-size here document to conftest.frag.
29822   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
29823   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
29824   echo 'CEOF' >> "$CONFIG_STATUS"
29825   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
29826   rm -f conftest.vals
29827   mv conftest.tail conftest.vals
29828 done
29829 rm -f conftest.vals
29830
29831 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29832 # marker @DEFS@.
29833 echo '  cat >> conftest.edit <<CEOF
29834 /@DEFS@/r conftest.frag
29835 /@DEFS@/d
29836 CEOF
29837 sed -f conftest.edit $tmp/in > $tmp/out
29838 rm -f $tmp/in
29839 mv $tmp/out $tmp/in
29840 rm -f conftest.edit conftest.frag
29841 ' >> "$CONFIG_STATUS"
29842
29843 cat >>"$CONFIG_STATUS" <<\EOF
29844   # Let's still pretend it is `configure' which instantiates (i.e., don't
29845   # use $as_me), people would be surprised to read:
29846   #    /* config.h.  Generated automatically by config.status.  */
29847   if test x"$ac_file" = x-; then
29848     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29849   else
29850     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29851   fi
29852   cat $tmp/in >>$tmp/config.h
29853   rm -f $tmp/in
29854   if test x"$ac_file" != x-; then
29855     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
29856       { echo "$as_me:29856: $ac_file is unchanged" >&5
29857 echo "$as_me: $ac_file is unchanged" >&6;}
29858     else
29859       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29860          X"$ac_file" : 'X\(//\)[^/]' \| \
29861          X"$ac_file" : 'X\(//\)$' \| \
29862          X"$ac_file" : 'X\(/\)' \| \
29863          .     : '\(.\)' 2>/dev/null ||
29864 echo X"$ac_file" |
29865     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29866           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29867           /^X\(\/\/\)$/{ s//\1/; q; }
29868           /^X\(\/\).*/{ s//\1/; q; }
29869           s/.*/./; q'`
29870       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29871         { case "$ac_dir" in
29872   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29873   *)                      as_incr_dir=.;;
29874 esac
29875 as_dummy="$ac_dir"
29876 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29877   case $as_mkdir_dir in
29878     # Skip DOS drivespec
29879     ?:) as_incr_dir=$as_mkdir_dir ;;
29880     *)
29881       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29882       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29883     ;;
29884   esac
29885 done; }
29886
29887       fi
29888       rm -f "$ac_file"
29889       mv "$tmp/config.h" "$ac_file"
29890     fi
29891   else
29892     cat $tmp/config.h
29893     rm -f $tmp/config.h
29894   fi
29895 done
29896 EOF
29897 cat >>"$CONFIG_STATUS" <<\EOF
29898 #
29899 # CONFIG_COMMANDS section.
29900 #
29901 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29902   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29903   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29904
29905   case "$ac_dest" in
29906     default )
29907 if test "x$cf_with_tests" != xno ; then
29908
29909 for cf_dir in test
29910 do
29911         if test ! -d "$srcdir/$cf_dir" ; then
29912                 continue
29913         elif test -f "$srcdir/$cf_dir/programs" ; then
29914                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
29915         fi
29916 done
29917
29918 fi
29919
29920 cf_prefix=$LIB_PREFIX
29921
29922 case "$cf_cv_shlib_version" in
29923 (cygdll|msysdll|mingw|msvcdll)
29924         TINFO_NAME=$TINFO_ARG_SUFFIX
29925         TINFO_SUFFIX=.dll
29926         ;;
29927 esac
29928
29929 if test -n "$TINFO_SUFFIX" ; then
29930         case "$TINFO_SUFFIX" in
29931         (tw*)
29932                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
29933                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
29934                 ;;
29935         (t*)
29936                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
29937                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
29938                 ;;
29939         (w*)
29940                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
29941                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
29942                 ;;
29943         esac
29944 fi
29945
29946 for cf_dir in $SRC_SUBDIRS
29947 do
29948         if test ! -d "$srcdir/$cf_dir" ; then
29949                 continue
29950         elif test -f "$srcdir/$cf_dir/modules" ; then
29951
29952                 SHARED_LIB=
29953                 Libs_To_Make=
29954                 cf_awk_program=
29955                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
29956                 then
29957                         cf_awk_program="$cf_awk_program\
29958 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
29959 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
29960 "
29961                 fi
29962
29963                 if test "x$WILDCARD_SYMS" = xno
29964                 then
29965                         cf_awk_program="$cf_awk_program\
29966 /[      ]_\\*;/ { skip=1; next; }\
29967 "
29968                 fi
29969
29970                 if test "x$cf_awk_program" != "x"
29971                 then
29972                         cat >>$cf_dir/Makefile <<CF_EOF
29973
29974 # Generated by CF_LIB_RULES
29975 resulting.map: $UNALTERED_SYMS
29976         $AWK 'BEGIN { skip = 1; last=""; } \
29977 $cf_awk_program \
29978 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
29979  skip = 0; last = \$\$0; } \
29980 END { print last; }' < "$UNALTERED_SYMS" >\$@
29981
29982 distclean::
29983         rm -f resulting.map
29984 CF_EOF
29985                 fi
29986
29987                 for cf_item in $cf_LIST_MODELS
29988                 do
29989
29990         case X$cf_item in
29991         (Xlibtool)
29992                 cf_suffix='.la'
29993                 cf_depsuf=$cf_suffix
29994                 ;;
29995         (Xdebug)
29996                 case "$cf_cv_system_name" in
29997                 (*-msvc*)
29998                         cf_suffix='_g.lib'
29999                         ;;
30000                 (*)
30001                         cf_suffix='_g.a'
30002                         ;;
30003                 esac
30004                 cf_depsuf=$cf_suffix
30005                 ;;
30006         (Xprofile)
30007                 case "$cf_cv_system_name" in
30008                 (*-msvc*)
30009                         cf_suffix='_p.lib'
30010                         ;;
30011                 (*)
30012                         cf_suffix='_p.a'
30013                         ;;
30014                 esac
30015                 cf_depsuf=$cf_suffix
30016                 ;;
30017         (Xshared)
30018                 case "$cf_cv_system_name" in
30019                 (aix[5-7]*)
30020                         cf_suffix='.so'
30021                         cf_depsuf=$cf_suffix
30022                         ;;
30023                 (*-msvc*)
30024                         cf_suffix='.dll'
30025                         cf_depsuf='.dll.lib'
30026                         ;;
30027                 (cygwin*|msys*|mingw*)
30028                         cf_suffix='.dll'
30029                         cf_depsuf='.dll.a'
30030                         ;;
30031                 (darwin*)
30032                         cf_suffix='.dylib'
30033                         cf_depsuf=$cf_suffix
30034                         ;;
30035                 (hpux*)
30036                         case "$target" in
30037                         (ia64*)
30038                                 cf_suffix='.so'
30039                                 cf_depsuf=$cf_suffix
30040                                 ;;
30041                         (*)
30042                                 cf_suffix='.sl'
30043                                 cf_depsuf=$cf_suffix
30044                                 ;;
30045                         esac
30046                         ;;
30047                 (*)
30048                         cf_suffix='.so'
30049                         cf_depsuf=$cf_suffix
30050                         ;;
30051                 esac
30052                 ;;
30053         (*)
30054                 case "$target" in
30055                 (*-msvc*)
30056                         cf_suffix='.lib'
30057                         ;;
30058                 (*)
30059                         cf_suffix='.a'
30060                         ;;
30061                 esac
30062                 cf_depsuf=$cf_suffix
30063                 ;;
30064         esac
30065         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30066         then
30067                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30068                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30069         fi
30070
30071                         if test "$cf_dir" = "c++"
30072                         then
30073
30074 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30075
30076 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30077
30078                         else
30079
30080 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30081
30082 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30083
30084                         fi
30085                         test -z "$cf_libname" && cf_libname="$cf_dir"
30086                         if test "$cf_item" = shared ; then
30087                                 if test -n "${LIB_SUFFIX}"
30088                                 then
30089                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30090                                 else
30091                                         cf_shared_suffix="$cf_suffix"
30092                                 fi
30093                                 if test "$cf_cv_do_symlinks" = yes ; then
30094                                         cf_version_name=
30095
30096                                         case "$cf_cv_shlib_version" in
30097                                         (rel)
30098                                                 cf_version_name=REL_VERSION
30099                                                 ;;
30100                                         (abi)
30101                                                 cf_version_name=ABI_VERSION
30102                                                 ;;
30103                                         esac
30104
30105                                         if test -n "$cf_version_name"
30106                                         then
30107                                                 case "$cf_cv_system_name" in
30108                                                 (darwin*)
30109                                                         # "w", etc?
30110                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30111                                                         ;;
30112                                                 (*)
30113                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30114                                                         ;;
30115                                                 esac
30116                                         fi
30117                                         if test -n "${USE_LIB_SUFFIX}"
30118                                         then
30119                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30120                                         else
30121                                                 cf_shared_suffix="$cf_suffix"
30122                                         fi
30123                                 fi
30124                                 # cygwin needs import library, and has unique naming convention
30125                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30126                                 # use 'cyg' prefix for shared lib.
30127                                 case "$cf_cv_shlib_version" in
30128                                 (cygdll)
30129                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30130                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30131                                         ;;
30132                                 (msysdll)
30133                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30134                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30135                                         ;;
30136                                 (mingw)
30137                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30138                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30139                                         ;;
30140                                 (msvcdll)
30141                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30142                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30143                                         ;;
30144                                 (*)
30145                                         cf_add_lib=
30146                                         ;;
30147                                 esac
30148                                 if test -n "$cf_add_lib"
30149                                 then
30150                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30151                                         continue
30152                                 fi
30153                         fi
30154                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30155                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30156                 done
30157
30158                 if test "$cf_dir" = ncurses ; then
30159                         cf_subsets="$LIB_SUBSETS"
30160                         cf_r_parts="$cf_subsets"
30161                         cf_liblist="$Libs_To_Make"
30162
30163                         while test -n "$cf_r_parts"
30164                         do
30165                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30166                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30167                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30168                                         cf_add_lib=
30169                                         case "$cf_l_parts" in
30170                                         (*termlib*)
30171                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30172                                                 ;;
30173                                         (*ticlib*)
30174                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30175                                                 ;;
30176                                         (*)
30177                                                 break
30178                                                 ;;
30179                                         esac
30180                                         if test -n "$cf_add_lib"; then
30181                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30182                                         fi
30183                                 else
30184                                         break
30185                                 fi
30186                         done
30187                 else
30188                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30189                 fi
30190
30191                 if test "$cf_dir" = c++; then
30192                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30193                                 cf_list=
30194                                 for cf_item in $Libs_To_Make
30195                                 do
30196                                         case "$cf_item" in
30197                                         (*.a)
30198                                                 ;;
30199                                         (*)
30200                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30201                                                 ;;
30202                                         esac
30203                                         for cf_test in $cf_list
30204                                         do
30205                                                 if test "$cf_test" = "$cf_item"
30206                                                 then
30207                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30208                                                         cf_item=
30209                                                         break
30210                                                 fi
30211                                         done
30212                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30213                                 done
30214                                 Libs_To_Make="$cf_list"
30215                         fi
30216                 fi
30217
30218                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30219                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30220                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30221                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30222
30223                 $AWK -f "$srcdir/mk-0th.awk" \
30224                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30225                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30226
30227                 for cf_subset in $cf_subsets
30228                 do
30229                         cf_subdirs=
30230                         for cf_item in $cf_LIST_MODELS
30231                         do
30232
30233                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30234
30235 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30236
30237                         CXX_MODEL=$cf_ITEM
30238                         if test "$CXX_MODEL" = SHARED; then
30239                                 case "$cf_cv_shlib_version" in
30240                                 (cygdll|msysdll|mingw|msvcdll)
30241                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30242
30243 echo "${as_me:-configure}:30243: testing overriding CXX_MODEL to SHARED ..." 1>&5
30244
30245                                         with_shared_cxx=yes
30246                                         ;;
30247                                 (*)
30248                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30249                                         ;;
30250                                 esac
30251                         fi
30252
30253         case X$cf_item in
30254         (Xlibtool)
30255                 cf_suffix='.la'
30256                 cf_depsuf=$cf_suffix
30257                 ;;
30258         (Xdebug)
30259                 case "$cf_cv_system_name" in
30260                 (*-msvc*)
30261                         cf_suffix='_g.lib'
30262                         ;;
30263                 (*)
30264                         cf_suffix='_g.a'
30265                         ;;
30266                 esac
30267                 cf_depsuf=$cf_suffix
30268                 ;;
30269         (Xprofile)
30270                 case "$cf_cv_system_name" in
30271                 (*-msvc*)
30272                         cf_suffix='_p.lib'
30273                         ;;
30274                 (*)
30275                         cf_suffix='_p.a'
30276                         ;;
30277                 esac
30278                 cf_depsuf=$cf_suffix
30279                 ;;
30280         (Xshared)
30281                 case "$cf_cv_system_name" in
30282                 (aix[5-7]*)
30283                         cf_suffix='.so'
30284                         cf_depsuf=$cf_suffix
30285                         ;;
30286                 (*-msvc*)
30287                         cf_suffix='.dll'
30288                         cf_depsuf='.dll.lib'
30289                         ;;
30290                 (cygwin*|msys*|mingw*)
30291                         cf_suffix='.dll'
30292                         cf_depsuf='.dll.a'
30293                         ;;
30294                 (darwin*)
30295                         cf_suffix='.dylib'
30296                         cf_depsuf=$cf_suffix
30297                         ;;
30298                 (hpux*)
30299                         case "$target" in
30300                         (ia64*)
30301                                 cf_suffix='.so'
30302                                 cf_depsuf=$cf_suffix
30303                                 ;;
30304                         (*)
30305                                 cf_suffix='.sl'
30306                                 cf_depsuf=$cf_suffix
30307                                 ;;
30308                         esac
30309                         ;;
30310                 (*)
30311                         cf_suffix='.so'
30312                         cf_depsuf=$cf_suffix
30313                         ;;
30314                 esac
30315                 ;;
30316         (*)
30317                 case "$target" in
30318                 (*-msvc*)
30319                         cf_suffix='.lib'
30320                         ;;
30321                 (*)
30322                         cf_suffix='.a'
30323                         ;;
30324                 esac
30325                 cf_depsuf=$cf_suffix
30326                 ;;
30327         esac
30328         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30329         then
30330                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30331                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30332         fi
30333
30334         case $cf_item in
30335         (libtool) cf_subdir='obj_lo'  ;;
30336         (normal)  cf_subdir='objects' ;;
30337         (debug)   cf_subdir='obj_g' ;;
30338         (profile) cf_subdir='obj_p' ;;
30339         (shared)
30340                 case "$cf_cv_system_name" in
30341                 (cygwin|msys)
30342                         cf_subdir='objects' ;;
30343                 (*)
30344                         cf_subdir='obj_s' ;;
30345                 esac
30346         esac
30347
30348                         # Test for case where we build libtinfo with a different name.
30349                         cf_libname=$cf_dir
30350                         if test "$cf_dir" = ncurses ; then
30351                                 case "$cf_subset" in
30352                                 (*base*)
30353                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30354                                         ;;
30355                                 (*termlib*)
30356                                         cf_libname=$TINFO_LIB_SUFFIX
30357                                         ;;
30358                                 (ticlib*)
30359                                         cf_libname=$TICS_LIB_SUFFIX
30360                                         ;;
30361                                 esac
30362                         elif test "$cf_dir" = c++ ; then
30363
30364 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30365
30366 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30367
30368                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30369                         else
30370
30371 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30372
30373 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30374
30375                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30376                         fi
30377                         if test -n "${USE_ARG_SUFFIX}" ; then
30378                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30379                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30380                         fi
30381
30382                         # These dependencies really are for development, not
30383                         # builds, but they are useful in porting, too.
30384                         cf_depend="../include/ncurses_cfg.h"
30385                         if test "$srcdir" = "."; then
30386                                 cf_reldir="."
30387                         else
30388                                 cf_reldir="\${srcdir}"
30389                         fi
30390
30391                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30392                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30393                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30394                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30395                         fi
30396
30397                         cf_dir_suffix=
30398                         old_cf_suffix="$cf_suffix"
30399                         if test "$cf_cv_shlib_version_infix" = yes ; then
30400                         if test -n "$USE_LIB_SUFFIX" ; then
30401                                 case "$USE_LIB_SUFFIX" in
30402                                 (tw*)
30403                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30404                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30405                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30406                                         ;;
30407                                 (t*)
30408                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30409                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30410                                         cf_dir_suffix=t$EXTRA_SUFFIX
30411                                         ;;
30412                                 (w*)
30413                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30414                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30415                                         cf_dir_suffix=w$EXTRA_SUFFIX
30416                                         ;;
30417                                 (*)
30418                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30419                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30420                                         cf_dir_suffix=$EXTRA_SUFFIX
30421                                         ;;
30422                                 esac
30423                         fi
30424                         fi
30425
30426                         $AWK -f "$srcdir/mk-1st.awk" \
30427                                 name=${cf_libname}${cf_dir_suffix} \
30428                                 traces=$LIB_TRACING \
30429                                 MODEL=$cf_ITEM \
30430                                 CXX_MODEL=$CXX_MODEL \
30431                                 LIB_SUFFIX=$LIB_SUFFIX \
30432                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30433                                 make_phony="${cf_cv_make_PHONY:-no}" \
30434                                 model=$cf_subdir \
30435                                 prefix=$cf_prefix \
30436                                 suffix=$cf_suffix \
30437                                 subset=$cf_subset \
30438                                 driver=$cf_cv_term_driver \
30439                                 SymLink="$LN_S" \
30440                                 TermlibRoot=$TINFO_NAME \
30441                                 TermlibSuffix=$TINFO_SUFFIX \
30442                                 ShlibVer=$cf_cv_shlib_version \
30443                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30444                                 ReLink=${cf_cv_do_relink:-no} \
30445                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30446                                 DoLinks=$cf_cv_do_symlinks \
30447                                 rmSoLocs=$cf_cv_rm_so_locs \
30448                                 ldconfig="$LDCONFIG" \
30449                                 overwrite=$WITH_OVERWRITE \
30450                                 depend="$cf_depend" \
30451                                 host="$host" \
30452                                 libtool_version="$LIBTOOL_VERSION" \
30453                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30454
30455                         cf_suffix="$old_cf_suffix"
30456
30457                         for cf_subdir2 in $cf_subdirs lib
30458                         do
30459                                 test "$cf_subdir" = "$cf_subdir2" && break
30460                         done
30461                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30462                         $AWK -f "$srcdir/mk-2nd.awk" \
30463                                 name=$cf_dir \
30464                                 traces=$LIB_TRACING \
30465                                 MODEL=$cf_ITEM \
30466                                 model=$cf_subdir \
30467                                 subset=$cf_subset \
30468                                 srcdir=$srcdir \
30469                                 echo=$WITH_ECHO \
30470                                 crenames=$cf_cv_prog_CC_c_o \
30471                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30472                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30473                         cf_subdirs="$cf_subdirs $cf_subdir"
30474                         done
30475                 done
30476         fi
30477
30478         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30479 done
30480
30481 echo >> Makefile
30482 echo '# generated by CF_LIB_RULES' >> Makefile
30483
30484 if test "x$cf_cv_make_PHONY" = xyes ; then
30485         cat >> Makefile <<-CF_EOF
30486
30487         .PHONY :        libs
30488         .PHONY :        lintlib
30489         .PHONY :        install.includes
30490         .PHONY :        uninstall.includes
30491         .PHONY :        install.libs
30492         .PHONY :        uninstall.libs
30493 CF_EOF
30494 fi
30495
30496 for cf_dir in $SRC_SUBDIRS
30497 do
30498         if test ! -d "$srcdir/$cf_dir" ; then
30499                 continue
30500         fi
30501
30502         if test -f "$cf_dir/Makefile" ; then
30503                 case "$cf_dir" in
30504                 (Ada95)
30505                         echo 'libs \' >> Makefile
30506                         echo 'install.libs \' >> Makefile
30507                         echo 'uninstall.libs ::' >> Makefile
30508                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30509                         ;;
30510                 esac
30511         fi
30512
30513         if test -f "$srcdir/$cf_dir/modules" ; then
30514
30515                 if test "x$cf_cv_make_PHONY" = xyes ; then
30516                         cat >> Makefile <<-CF_EOF
30517
30518                         .PHONY :        install.$cf_dir
30519                         .PHONY :        uninstall.$cf_dir
30520 CF_EOF
30521                 fi
30522
30523                 echo >> Makefile
30524                 if test -f "$srcdir/$cf_dir/headers" ; then
30525 cat >> Makefile <<CF_EOF
30526 install.includes \\
30527 uninstall.includes \\
30528 CF_EOF
30529                 fi
30530
30531 cat >> Makefile <<CF_EOF
30532 lint \\
30533 libs \\
30534 lintlib \\
30535 install.libs \\
30536 uninstall.libs \\
30537 install.$cf_dir \\
30538 uninstall.$cf_dir ::
30539         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30540 CF_EOF
30541         elif test -f "$srcdir/$cf_dir/headers" ; then
30542 cat >> Makefile <<CF_EOF
30543
30544 libs \\
30545 install.libs \\
30546 uninstall.libs \\
30547 install.includes \\
30548 uninstall.includes ::
30549         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30550 CF_EOF
30551 fi
30552 done
30553
30554 if test "x$cf_cv_make_PHONY" = xyes ; then
30555         cat >> Makefile <<-CF_EOF
30556
30557         .PHONY :        install.data
30558         .PHONY :        uninstall.data
30559 CF_EOF
30560 fi
30561
30562 if test "x$cf_with_db_install" = xyes; then
30563 cat >> Makefile <<CF_EOF
30564
30565 install.libs uninstall.libs \\
30566 install.data uninstall.data ::
30567 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30568 CF_EOF
30569 else
30570 cat >> Makefile <<CF_EOF
30571
30572 install.libs uninstall.libs ::
30573         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30574 CF_EOF
30575 fi
30576
30577 if test "x$cf_with_manpages" = xyes; then
30578
30579 if test "x$cf_cv_make_PHONY" = xyes ; then
30580         cat >> Makefile <<-CF_EOF
30581
30582         .PHONY :        install.man
30583         .PHONY :        uninstall.man
30584 CF_EOF
30585 fi
30586
30587 cat >> Makefile <<CF_EOF
30588
30589 install.man \\
30590 uninstall.man ::
30591         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30592 CF_EOF
30593 fi
30594
30595 cat >> Makefile <<CF_EOF
30596
30597 distclean ::
30598         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30599         rm -f headers.sh headers.sed mk_shared_lib.sh
30600         rm -f edit_man.* man_alias.*
30601         rm -rf \${DIRS_TO_MAKE}
30602 CF_EOF
30603
30604 # Special case: tack's manpage lives in its own directory.
30605 if test "x$cf_with_manpages" = xyes; then
30606 if test "x$cf_with_tack" = "xyes"; then
30607 cat >> Makefile <<CF_EOF
30608
30609 install.man \\
30610 uninstall.man ::
30611         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30612 CF_EOF
30613 fi
30614 fi
30615
30616 rm -f headers.sed headers.sh
30617
30618 echo creating headers.sh
30619 cat >headers.sh <<CF_EOF
30620 #! $SHELL
30621 # This shell script is generated by the 'configure' script.  It is invoked in a
30622 # subdirectory of the build tree.  It generates a sed-script in the parent
30623 # directory that is used to adjust includes for header files that reside in a
30624 # subdirectory of /usr/include, etc.
30625 PRG=""
30626 while test \$# != 3
30627 do
30628 PRG="\$PRG \$1"; shift
30629 done
30630 DST=\$1
30631 REF=\$2
30632 SRC=\$3
30633 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30634 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30635 echo installing \$SRC in \$DST
30636 CF_EOF
30637
30638 if test "$WITH_CURSES_H" = yes; then
30639         cat >>headers.sh <<CF_EOF
30640 case \$DST in
30641 (/*/include/*)
30642         END=\`basename \$DST\`
30643         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30644         do
30645                 NAME=\`basename \$i\`
30646                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30647         done
30648         ;;
30649 (*)
30650         echo "" >> \$TMPSED
30651         ;;
30652 esac
30653 CF_EOF
30654
30655 else
30656         cat >>headers.sh <<CF_EOF
30657 case \$DST in
30658 (/*/include/*)
30659         END=\`basename \$DST\`
30660         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30661         do
30662                 NAME=\`basename \$i\`
30663                 if test "\$NAME" = "curses.h"
30664                 then
30665                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30666                         NAME=ncurses.h
30667                 fi
30668                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30669         done
30670         ;;
30671 (*)
30672         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30673         ;;
30674 esac
30675 CF_EOF
30676 fi
30677 cat >>headers.sh <<CF_EOF
30678 rm -f \$TMPSRC
30679 sed -f \$TMPSED \$SRC > \$TMPSRC
30680 NAME=\`basename \$SRC\`
30681 CF_EOF
30682 if test "$WITH_CURSES_H" != yes; then
30683         cat >>headers.sh <<CF_EOF
30684 test "\$NAME" = "curses.h" && NAME=ncurses.h
30685 CF_EOF
30686 fi
30687 cat >>headers.sh <<CF_EOF
30688 # Just in case someone gzip'd manpages, remove the conflicting copy.
30689 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30690
30691 eval \$PRG \$TMPSRC \$DST/\$NAME
30692 rm -f \$TMPSRC \$TMPSED
30693 CF_EOF
30694
30695 chmod 0755 headers.sh
30696
30697 for cf_dir in $SRC_SUBDIRS
30698 do
30699         if test ! -d "$srcdir/$cf_dir" ; then
30700                 continue
30701         fi
30702
30703         if test -f "$srcdir/$cf_dir/headers" ; then
30704                 $AWK -f "$srcdir/mk-hdr.awk" \
30705                         subset="$LIB_SUBSETS" \
30706                         compat="$WITH_CURSES_H" \
30707                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30708         fi
30709
30710         if test -f "$srcdir/$cf_dir/modules" ; then
30711                 if test "$cf_dir" != "c++" ; then
30712                         if test "x$cf_cv_make_PHONY" = xyes ; then
30713                                 cat >> $cf_dir/Makefile <<-CF_EOF
30714
30715                                 .PHONY :        depend
30716 CF_EOF
30717                         fi
30718
30719                         cat >>$cf_dir/Makefile <<"CF_EOF"
30720 depend : ${AUTO_SRC}
30721         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30722
30723 # DO NOT DELETE THIS LINE -- make depend depends on it.
30724 CF_EOF
30725                 fi
30726         fi
30727 done
30728
30729 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30730 if test -z "$USE_OLD_MAKERULES" ; then
30731         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30732 fi
30733 fi
30734  ;;
30735   esac
30736 done
30737 EOF
30738
30739 cat >>"$CONFIG_STATUS" <<\EOF
30740
30741 { (exit 0); exit 0; }
30742 EOF
30743 chmod +x "$CONFIG_STATUS"
30744 ac_clean_files=$ac_clean_files_save
30745
30746 # configure is writing to config.log, and then calls config.status.
30747 # config.status does its own redirection, appending to config.log.
30748 # Unfortunately, on DOS this fails, as config.log is still kept open
30749 # by configure, so config.status won't be able to write to it; its
30750 # output is simply discarded.  So we exec the FD to /dev/null,
30751 # effectively closing config.log, so it can be properly (re)opened and
30752 # appended to by config.status.  When coming back to configure, we
30753 # need to make the FD available again.
30754 if test "$no_create" != yes; then
30755   ac_cs_success=:
30756   exec 5>/dev/null
30757   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
30758   exec 5>>config.log
30759   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30760   # would make configure fail if this is the last instruction.
30761   "$ac_cs_success" || { (exit 1); exit 1; }
30762 fi
30763 ${MAKE:-make} preinstall