]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.6
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.383 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20061216.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-progs         suppress build with programs (e.g., tic)
701   --without-curses-h      install curses.h as ncurses.h only
702   --with-install-prefix   prefixes actual install-location ($DESTDIR)
703 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
704   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
705   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
706   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
707   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
708   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
709   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
710 Options to Specify the Libraries Built/Used:
711   --with-libtool          generate libraries with libtool
712   --with-shared           generate shared-libraries
713   --with-normal           generate normal-libraries (default)
714   --with-debug            generate debug-libraries (default)
715   --with-profile          generate profile-libraries
716   --with-termlib          generate separate terminfo library
717   --with-gpm              use Alessandro Rubini's GPM library
718   --without-dlsym         do not use dlsym() to load GPM dynamically
719   --with-sysmouse         use sysmouse (FreeBSD console)
720   --enable-rpath          use rpath option when generating shared libraries
721   --with-shlib-version=X  Specify rel or abi version for shared libs
722 Fine-Tuning Your Configuration:
723   --disable-overwrite     leave out the link to -lcurses
724   --disable-database      do not use terminfo, only fallbacks/termcap
725   --with-database=XXX     specify terminfo source to install
726   --with-hashed-db        specify hashed-database library
727   --with-fallbacks=XXX    specify list of fallback terminal descriptions
728   --without-xterm-new     specify if xterm terminfo should be old version
729   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
730   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
731   --disable-big-core      assume machine has little memory
732   --enable-termcap        compile in termcap fallback support
733   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
734   --enable-getcap         fast termcap load, no xrefs to terminfo
735   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
736   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
737   --disable-root-environ  restrict environment when running as root
738   --enable-symlinks       make tic use symbolic links not hard links
739   --enable-broken_linker  compile with broken-linker support code
740   --enable-bsdpad         recognize BSD-style prefix padding
741   --enable-widec          compile with wide-char/UTF-8 code
742   --disable-lp64          allow chtype to be long (ignore _LP64)
743   --disable-largefile     omit support for large files
744   --disable-tparm-varargs compile tparm() without varargs interface
745   --with-bool=TYPE        override fallback type of bool variable
746   --with-caps=alt         compile with alternate Caps file
747   --with-chtype=TYPE      override type of chtype
748   --with-ospeed=TYPE      override type of ospeed variable
749   --with-mmask-t=TYPE     override type of mmask_t
750   --with-rcs-ids          compile-in RCS identifiers
751 Options to Specify How Manpages are Installed:
752   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
753                           optionally formatted/catonly, e.g., gzip,formatted
754   --with-manpage-renames  specify manpage-renaming
755   --with-manpage-aliases  specify manpage-aliases using .so
756   --with-manpage-symlinks specify manpage-aliases using symlinks
757   --with-manpage-tbl      specify manpage processing with tbl
758 Extensions:
759   --disable-ext-funcs     disable function-extensions
760   --enable-const          compile with extra/non-standard const
761   --enable-no-padding     compile with $NCURSES_NO_PADDING code
762   --enable-signed-char    compile with SIGWINCH handler
763   --enable-sigwinch       compile with SIGWINCH handler
764   --enable-tcap-names     compile with user-definable terminal capabilities
765 Development Code:
766   --without-develop       disable development options
767   --enable-hard-tabs      compile with hard-tabs code
768   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
769 Experimental Code:
770   --disable-assumed-color do not assume anything about default-colors
771   --disable-hashmap       compile without hashmap scrolling-optimization
772   --enable-colorfgbg      compile with $COLORFGBG code
773   --enable-ext-colors     compile for experimental 256-color support
774   --enable-ext-mouse      compile for experimental mouse-encoding
775   --enable-safe-sprintf   compile with experimental safe-sprintf code
776   --disable-scroll-hints  compile without scroll-hints code
777   --enable-wgetch-events  compile with experimental wgetch-events code
778 Testing/development Options:
779   --enable-echo           build: display "compiling" commands (default)
780   --enable-warnings       build: turn on GCC compiler warnings
781   --enable-assertions     test: turn on generation of assertion code
782   --with-dmalloc          test: use Gray Watson's dmalloc library
783   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
784   --with-valgrind         test: use valgrind
785   --disable-leaks         test: free permanent memory, analyze leaks
786   --enable-expanded       test: generate functions for certain macros
787   --disable-macros        test: use functions rather than macros
788   --with-trace            test: add trace() function to all models of ncurses
789 Ada95 Binding Options:
790   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
791   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
792   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
793
794 Some influential environment variables:
795   CC          C compiler command
796   CFLAGS      C compiler flags
797   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
798               nonstandard directory <lib dir>
799   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
800               headers in a nonstandard directory <include dir>
801   CPP         C preprocessor
802   CXX         C++ compiler command
803   CXXFLAGS    C++ compiler flags
804   CXXCPP      C++ preprocessor
805
806 Use these variables to override the choices made by `configure' or to help
807 it to find libraries and programs with nonstandard names/locations.
808
809 EOF
810 fi
811
812 if test "$ac_init_help" = "recursive"; then
813   # If there are subdirs, report their specific --help.
814   ac_popdir=`pwd`
815   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
816     cd $ac_subdir
817     # A "../" for each directory in /$ac_subdir.
818     ac_dots=`echo $ac_subdir |
819              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
820
821     case $srcdir in
822     .) # No --srcdir option.  We are building in place.
823       ac_sub_srcdir=$srcdir ;;
824     [\\/]* | ?:[\\/]* ) # Absolute path.
825       ac_sub_srcdir=$srcdir/$ac_subdir ;;
826     *) # Relative path.
827       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
828     esac
829
830     # Check for guested configure; otherwise get Cygnus style configure.
831     if test -f $ac_sub_srcdir/configure.gnu; then
832       echo
833       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
834     elif test -f $ac_sub_srcdir/configure; then
835       echo
836       $SHELL $ac_sub_srcdir/configure  --help=recursive
837     elif test -f $ac_sub_srcdir/configure.ac ||
838            test -f $ac_sub_srcdir/configure.in; then
839       echo
840       $ac_configure --help
841     else
842       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
843     fi
844     cd $ac_popdir
845   done
846 fi
847
848 test -n "$ac_init_help" && exit 0
849 if $ac_init_version; then
850   cat <<\EOF
851
852 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
853 Free Software Foundation, Inc.
854 This configure script is free software; the Free Software Foundation
855 gives unlimited permission to copy, distribute and modify it.
856 EOF
857   exit 0
858 fi
859 exec 5>config.log
860 cat >&5 <<EOF
861 This file contains any messages produced by compilers while
862 running configure, to aid debugging if configure makes a mistake.
863
864 It was created by $as_me, which was
865 generated by GNU Autoconf 2.52.20061216.  Invocation command line was
866
867   $ $0 $@
868
869 EOF
870 {
871 cat <<_ASUNAME
872 ## ---------- ##
873 ## Platform.  ##
874 ## ---------- ##
875
876 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
877 uname -m = `(uname -m) 2>/dev/null || echo unknown`
878 uname -r = `(uname -r) 2>/dev/null || echo unknown`
879 uname -s = `(uname -s) 2>/dev/null || echo unknown`
880 uname -v = `(uname -v) 2>/dev/null || echo unknown`
881
882 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
883 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
884
885 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
886 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
887 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
888 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
889 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
890 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
891 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
892
893 PATH = $PATH
894
895 _ASUNAME
896 } >&5
897
898 cat >&5 <<EOF
899 ## ------------ ##
900 ## Core tests.  ##
901 ## ------------ ##
902
903 EOF
904
905 # Keep a trace of the command line.
906 # Strip out --no-create and --no-recursion so they do not pile up.
907 # Also quote any args containing shell meta-characters.
908 ac_configure_args=
909 ac_sep=
910 for ac_arg
911 do
912   case $ac_arg in
913   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
914   | --no-cr | --no-c) ;;
915   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
916   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
917   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
918     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
919     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
920     ac_sep=" " ;;
921   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
922      ac_sep=" " ;;
923   esac
924   # Get rid of the leading space.
925 done
926
927 # When interrupted or exit'd, cleanup temporary files, and complete
928 # config.log.  We remove comments because anyway the quotes in there
929 # would cause problems or look ugly.
930 trap 'exit_status=$?
931   # Save into config.log some information that might help in debugging.
932   echo >&5
933   echo "## ----------------- ##" >&5
934   echo "## Cache variables.  ##" >&5
935   echo "## ----------------- ##" >&5
936   echo >&5
937   # The following way of writing the cache mishandles newlines in values,
938 {
939   (set) 2>&1 |
940     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
941     *ac_space=\ *)
942       sed -n \
943         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
944           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
945       ;;
946     *)
947       sed -n \
948         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
949       ;;
950     esac;
951 } >&5
952   sed "/^$/d" confdefs.h >conftest.log
953   if test -s conftest.log; then
954     echo >&5
955     echo "## ------------ ##" >&5
956     echo "## confdefs.h.  ##" >&5
957     echo "## ------------ ##" >&5
958     echo >&5
959     cat conftest.log >&5
960   fi
961   (echo; echo) >&5
962   test "$ac_signal" != 0 &&
963     echo "$as_me: caught signal $ac_signal" >&5
964   echo "$as_me: exit $exit_status" >&5
965   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
966     exit $exit_status
967      ' 0
968 for ac_signal in 1 2 13 15; do
969   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
970 done
971 ac_signal=0
972
973 # confdefs.h avoids OS command line length limits that DEFS can exceed.
974 rm -rf conftest* confdefs.h
975 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
976 echo >confdefs.h
977
978 # Let the site file select an alternate cache file if it wants to.
979 # Prefer explicitly selected file to automatically selected ones.
980 if test -z "$CONFIG_SITE"; then
981   if test "x$prefix" != xNONE; then
982     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
983   else
984     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
985   fi
986 fi
987 for ac_site_file in $CONFIG_SITE; do
988   if test -r "$ac_site_file"; then
989     { echo "$as_me:989: loading site script $ac_site_file" >&5
990 echo "$as_me: loading site script $ac_site_file" >&6;}
991     cat "$ac_site_file" >&5
992     . "$ac_site_file"
993   fi
994 done
995
996 if test -r "$cache_file"; then
997   # Some versions of bash will fail to source /dev/null (special
998   # files actually), so we avoid doing that.
999   if test -f "$cache_file"; then
1000     { echo "$as_me:1000: loading cache $cache_file" >&5
1001 echo "$as_me: loading cache $cache_file" >&6;}
1002     case $cache_file in
1003       [\\/]* | ?:[\\/]* ) . $cache_file;;
1004       *)                      . ./$cache_file;;
1005     esac
1006   fi
1007 else
1008   { echo "$as_me:1008: creating cache $cache_file" >&5
1009 echo "$as_me: creating cache $cache_file" >&6;}
1010   >$cache_file
1011 fi
1012
1013 # Check that the precious variables saved in the cache have kept the same
1014 # value.
1015 ac_cache_corrupted=false
1016 for ac_var in `(set) 2>&1 |
1017                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1018   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1019   eval ac_new_set=\$ac_env_${ac_var}_set
1020   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1021   eval ac_new_val="\$ac_env_${ac_var}_value"
1022   case $ac_old_set,$ac_new_set in
1023     set,)
1024       { echo "$as_me:1024: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1025 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1026       ac_cache_corrupted=: ;;
1027     ,set)
1028       { echo "$as_me:1028: error: \`$ac_var' was not set in the previous run" >&5
1029 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1030       ac_cache_corrupted=: ;;
1031     ,);;
1032     *)
1033       if test "x$ac_old_val" != "x$ac_new_val"; then
1034         { echo "$as_me:1034: error: \`$ac_var' has changed since the previous run:" >&5
1035 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1036         { echo "$as_me:1036:   former value:  $ac_old_val" >&5
1037 echo "$as_me:   former value:  $ac_old_val" >&2;}
1038         { echo "$as_me:1038:   current value: $ac_new_val" >&5
1039 echo "$as_me:   current value: $ac_new_val" >&2;}
1040         ac_cache_corrupted=:
1041       fi;;
1042   esac
1043   # Pass precious variables to config.status.  It doesn't matter if
1044   # we pass some twice (in addition to the command line arguments).
1045   if test "$ac_new_set" = set; then
1046     case $ac_new_val in
1047     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1048       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1049       ac_configure_args="$ac_configure_args '$ac_arg'"
1050       ;;
1051     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1052        ;;
1053     esac
1054   fi
1055 done
1056 if $ac_cache_corrupted; then
1057   { echo "$as_me:1057: error: changes in the environment can compromise the build" >&5
1058 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1059   { { echo "$as_me:1059: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1060 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1061    { (exit 1); exit 1; }; }
1062 fi
1063
1064 ac_ext=c
1065 ac_cpp='$CPP $CPPFLAGS'
1066 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1067 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1068 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1069 ac_main_return=return
1070
1071 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1072   *c*,-n*) ECHO_N= ECHO_C='
1073 ' ECHO_T='      ' ;;
1074   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1075   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1076 esac
1077 echo "#! $SHELL" >conftest.sh
1078 echo  "exit 0"   >>conftest.sh
1079 chmod +x conftest.sh
1080 if { (echo "$as_me:1080: PATH=\".;.\"; conftest.sh") >&5
1081   (PATH=".;."; conftest.sh) 2>&5
1082   ac_status=$?
1083   echo "$as_me:1083: \$? = $ac_status" >&5
1084   (exit $ac_status); }; then
1085   ac_path_separator=';'
1086 else
1087   ac_path_separator=:
1088 fi
1089 PATH_SEPARATOR="$ac_path_separator"
1090 rm -f conftest.sh
1091
1092 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1093
1094 top_builddir=`pwd`
1095
1096 echo "$as_me:1096: checking for egrep" >&5
1097 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1098 if test "${ac_cv_prog_egrep+set}" = set; then
1099   echo $ECHO_N "(cached) $ECHO_C" >&6
1100 else
1101   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1102     then ac_cv_prog_egrep='grep -E'
1103     else ac_cv_prog_egrep='egrep'
1104     fi
1105 fi
1106 echo "$as_me:1106: result: $ac_cv_prog_egrep" >&5
1107 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1108  EGREP=$ac_cv_prog_egrep
1109
1110 test -z "$EGREP" && { { echo "$as_me:1110: error: No egrep program found" >&5
1111 echo "$as_me: error: No egrep program found" >&2;}
1112    { (exit 1); exit 1; }; }
1113
1114 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1115 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1116 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1117 cf_cv_abi_version=${NCURSES_MAJOR}
1118 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1119 cf_cv_timestamp=`date`
1120 echo "$as_me:1120: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1121 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1122
1123 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1124
1125 # Check whether --with-rel-version or --without-rel-version was given.
1126 if test "${with_rel_version+set}" = set; then
1127   withval="$with_rel_version"
1128   { echo "$as_me:1128: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1129 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1130  cf_cv_rel_version=$withval
1131 fi;
1132
1133  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1134  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1135
1136 if test -n "$NCURSES_MAJOR" ; then
1137   case $NCURSES_MAJOR in #(vi
1138   [0-9]*) #(vi
1139         ;;
1140   *)
1141         { { echo "$as_me:1141: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1142 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1143    { (exit 1); exit 1; }; }
1144         ;;
1145   esac
1146 else
1147   { { echo "$as_me:1147: error: Release major-version value is empty" >&5
1148 echo "$as_me: error: Release major-version value is empty" >&2;}
1149    { (exit 1); exit 1; }; }
1150 fi
1151
1152 if test -n "$NCURSES_MINOR" ; then
1153   case $NCURSES_MINOR in #(vi
1154   [0-9]*) #(vi
1155         ;;
1156   *)
1157         { { echo "$as_me:1157: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1158 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1159    { (exit 1); exit 1; }; }
1160         ;;
1161   esac
1162 else
1163   { { echo "$as_me:1163: error: Release minor-version value is empty" >&5
1164 echo "$as_me: error: Release minor-version value is empty" >&2;}
1165    { (exit 1); exit 1; }; }
1166 fi
1167
1168 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1169
1170 # Check whether --with-abi-version or --without-abi-version was given.
1171 if test "${with_abi_version+set}" = set; then
1172   withval="$with_abi_version"
1173   { echo "$as_me:1173: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1174 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1175  cf_cv_abi_version=$withval
1176 fi;
1177
1178 if test -n "$cf_cv_abi_version" ; then
1179   case $cf_cv_abi_version in #(vi
1180   [0-9]*) #(vi
1181         ;;
1182   *)
1183         { { echo "$as_me:1183: error: ABI version is not a number: $cf_cv_abi_version" >&5
1184 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1185    { (exit 1); exit 1; }; }
1186         ;;
1187   esac
1188 else
1189   { { echo "$as_me:1189: error: ABI version value is empty" >&5
1190 echo "$as_me: error: ABI version value is empty" >&2;}
1191    { (exit 1); exit 1; }; }
1192 fi
1193
1194 ac_aux_dir=
1195 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1196   if test -f $ac_dir/install-sh; then
1197     ac_aux_dir=$ac_dir
1198     ac_install_sh="$ac_aux_dir/install-sh -c"
1199     break
1200   elif test -f $ac_dir/install.sh; then
1201     ac_aux_dir=$ac_dir
1202     ac_install_sh="$ac_aux_dir/install.sh -c"
1203     break
1204   elif test -f $ac_dir/shtool; then
1205     ac_aux_dir=$ac_dir
1206     ac_install_sh="$ac_aux_dir/shtool install -c"
1207     break
1208   fi
1209 done
1210 if test -z "$ac_aux_dir"; then
1211   { { echo "$as_me:1211: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1212 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1213    { (exit 1); exit 1; }; }
1214 fi
1215 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1216 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1217 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1218
1219 # Make sure we can run config.sub.
1220 $ac_config_sub sun4 >/dev/null 2>&1 ||
1221   { { echo "$as_me:1221: error: cannot run $ac_config_sub" >&5
1222 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1223    { (exit 1); exit 1; }; }
1224
1225 echo "$as_me:1225: checking build system type" >&5
1226 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1227 if test "${ac_cv_build+set}" = set; then
1228   echo $ECHO_N "(cached) $ECHO_C" >&6
1229 else
1230   ac_cv_build_alias=$build_alias
1231 test -z "$ac_cv_build_alias" &&
1232   ac_cv_build_alias=`$ac_config_guess`
1233 test -z "$ac_cv_build_alias" &&
1234   { { echo "$as_me:1234: error: cannot guess build type; you must specify one" >&5
1235 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1236    { (exit 1); exit 1; }; }
1237 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1238   { { echo "$as_me:1238: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1239 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1240    { (exit 1); exit 1; }; }
1241
1242 fi
1243 echo "$as_me:1243: result: $ac_cv_build" >&5
1244 echo "${ECHO_T}$ac_cv_build" >&6
1245 build=$ac_cv_build
1246 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1247 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1248 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1249
1250 echo "$as_me:1250: checking host system type" >&5
1251 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1252 if test "${ac_cv_host+set}" = set; then
1253   echo $ECHO_N "(cached) $ECHO_C" >&6
1254 else
1255   ac_cv_host_alias=$host_alias
1256 test -z "$ac_cv_host_alias" &&
1257   ac_cv_host_alias=$ac_cv_build_alias
1258 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1259   { { echo "$as_me:1259: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1260 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1261    { (exit 1); exit 1; }; }
1262
1263 fi
1264 echo "$as_me:1264: result: $ac_cv_host" >&5
1265 echo "${ECHO_T}$ac_cv_host" >&6
1266 host=$ac_cv_host
1267 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1268 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1269 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1270
1271 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1272         echo "$as_me:1272: checking target system type" >&5
1273 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1274 if test "${ac_cv_target+set}" = set; then
1275   echo $ECHO_N "(cached) $ECHO_C" >&6
1276 else
1277   ac_cv_target_alias=$target_alias
1278 test "x$ac_cv_target_alias" = "x" &&
1279   ac_cv_target_alias=$ac_cv_host_alias
1280 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1281   { { echo "$as_me:1281: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1282 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1283    { (exit 1); exit 1; }; }
1284
1285 fi
1286 echo "$as_me:1286: result: $ac_cv_target" >&5
1287 echo "${ECHO_T}$ac_cv_target" >&6
1288 target=$ac_cv_target
1289 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1290 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1291 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1292
1293 # The aliases save the names the user supplied, while $host etc.
1294 # will get canonicalized.
1295 test -n "$target_alias" &&
1296   test "$program_prefix$program_suffix$program_transform_name" = \
1297     NONENONEs,x,x, &&
1298   program_prefix=${target_alias}-
1299         system_name="$host_os"
1300 else
1301         system_name="`(uname -s -r) 2>/dev/null`"
1302         if test -z "$system_name" ; then
1303                 system_name="`(hostname) 2>/dev/null`"
1304         fi
1305 fi
1306 test -n "$system_name" && cat >>confdefs.h <<EOF
1307 #define SYSTEM_NAME "$system_name"
1308 EOF
1309
1310 if test "${cf_cv_system_name+set}" = set; then
1311   echo $ECHO_N "(cached) $ECHO_C" >&6
1312 else
1313   cf_cv_system_name="$system_name"
1314 fi
1315
1316 test -z "$system_name" && system_name="$cf_cv_system_name"
1317 test -n "$cf_cv_system_name" && echo "$as_me:1317: result: Configuring for $cf_cv_system_name" >&5
1318 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1319
1320 if test ".$system_name" != ".$cf_cv_system_name" ; then
1321         echo "$as_me:1321: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1322 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1323         { { echo "$as_me:1323: error: \"Please remove config.cache and try again.\"" >&5
1324 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1325    { (exit 1); exit 1; }; }
1326 fi
1327
1328 # Check whether --with-system-type or --without-system-type was given.
1329 if test "${with_system_type+set}" = set; then
1330   withval="$with_system_type"
1331   { echo "$as_me:1331: WARNING: overriding system type to $withval" >&5
1332 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1333  cf_cv_system_name=$withval
1334 fi;
1335
1336 ###     Save the given $CFLAGS to allow user-override.
1337 cf_user_CFLAGS="$CFLAGS"
1338
1339 ###     Default install-location
1340
1341 echo "$as_me:1341: checking for prefix" >&5
1342 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1343 if test "x$prefix" = "xNONE" ; then
1344         case "$cf_cv_system_name" in
1345                 # non-vendor systems don't have a conflict
1346         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1347                 prefix=/usr
1348                 ;;
1349         *)      prefix=$ac_default_prefix
1350                 ;;
1351         esac
1352 fi
1353 echo "$as_me:1353: result: $prefix" >&5
1354 echo "${ECHO_T}$prefix" >&6
1355
1356 if test "x$prefix" = "xNONE" ; then
1357 echo "$as_me:1357: checking for default include-directory" >&5
1358 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1359 test -n "$verbose" && echo 1>&6
1360 for cf_symbol in \
1361         $includedir \
1362         $includedir/ncurses \
1363         $prefix/include \
1364         $prefix/include/ncurses \
1365         /usr/local/include \
1366         /usr/local/include/ncurses \
1367         /usr/include \
1368         /usr/include/ncurses
1369 do
1370         cf_dir=`eval echo $cf_symbol`
1371         if test -f $cf_dir/curses.h ; then
1372         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1373                 includedir="$cf_symbol"
1374                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1375                 break
1376         fi
1377         fi
1378         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1379 done
1380 echo "$as_me:1380: result: $includedir" >&5
1381 echo "${ECHO_T}$includedir" >&6
1382 fi
1383
1384 ###     Checks for programs.
1385 ac_ext=c
1386 ac_cpp='$CPP $CPPFLAGS'
1387 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1388 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1389 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1390 ac_main_return=return
1391 if test -n "$ac_tool_prefix"; then
1392   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1393 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1394 echo "$as_me:1394: checking for $ac_word" >&5
1395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1396 if test "${ac_cv_prog_CC+set}" = set; then
1397   echo $ECHO_N "(cached) $ECHO_C" >&6
1398 else
1399   if test -n "$CC"; then
1400   ac_cv_prog_CC="$CC" # Let the user override the test.
1401 else
1402   ac_save_IFS=$IFS; IFS=$ac_path_separator
1403 ac_dummy="$PATH"
1404 for ac_dir in $ac_dummy; do
1405   IFS=$ac_save_IFS
1406   test -z "$ac_dir" && ac_dir=.
1407   $as_executable_p "$ac_dir/$ac_word" || continue
1408 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1409 echo "$as_me:1409: found $ac_dir/$ac_word" >&5
1410 break
1411 done
1412
1413 fi
1414 fi
1415 CC=$ac_cv_prog_CC
1416 if test -n "$CC"; then
1417   echo "$as_me:1417: result: $CC" >&5
1418 echo "${ECHO_T}$CC" >&6
1419 else
1420   echo "$as_me:1420: result: no" >&5
1421 echo "${ECHO_T}no" >&6
1422 fi
1423
1424 fi
1425 if test -z "$ac_cv_prog_CC"; then
1426   ac_ct_CC=$CC
1427   # Extract the first word of "gcc", so it can be a program name with args.
1428 set dummy gcc; ac_word=$2
1429 echo "$as_me:1429: checking for $ac_word" >&5
1430 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1431 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1432   echo $ECHO_N "(cached) $ECHO_C" >&6
1433 else
1434   if test -n "$ac_ct_CC"; then
1435   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1436 else
1437   ac_save_IFS=$IFS; IFS=$ac_path_separator
1438 ac_dummy="$PATH"
1439 for ac_dir in $ac_dummy; do
1440   IFS=$ac_save_IFS
1441   test -z "$ac_dir" && ac_dir=.
1442   $as_executable_p "$ac_dir/$ac_word" || continue
1443 ac_cv_prog_ac_ct_CC="gcc"
1444 echo "$as_me:1444: found $ac_dir/$ac_word" >&5
1445 break
1446 done
1447
1448 fi
1449 fi
1450 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1451 if test -n "$ac_ct_CC"; then
1452   echo "$as_me:1452: result: $ac_ct_CC" >&5
1453 echo "${ECHO_T}$ac_ct_CC" >&6
1454 else
1455   echo "$as_me:1455: result: no" >&5
1456 echo "${ECHO_T}no" >&6
1457 fi
1458
1459   CC=$ac_ct_CC
1460 else
1461   CC="$ac_cv_prog_CC"
1462 fi
1463
1464 if test -z "$CC"; then
1465   if test -n "$ac_tool_prefix"; then
1466   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1467 set dummy ${ac_tool_prefix}cc; ac_word=$2
1468 echo "$as_me:1468: checking for $ac_word" >&5
1469 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1470 if test "${ac_cv_prog_CC+set}" = set; then
1471   echo $ECHO_N "(cached) $ECHO_C" >&6
1472 else
1473   if test -n "$CC"; then
1474   ac_cv_prog_CC="$CC" # Let the user override the test.
1475 else
1476   ac_save_IFS=$IFS; IFS=$ac_path_separator
1477 ac_dummy="$PATH"
1478 for ac_dir in $ac_dummy; do
1479   IFS=$ac_save_IFS
1480   test -z "$ac_dir" && ac_dir=.
1481   $as_executable_p "$ac_dir/$ac_word" || continue
1482 ac_cv_prog_CC="${ac_tool_prefix}cc"
1483 echo "$as_me:1483: found $ac_dir/$ac_word" >&5
1484 break
1485 done
1486
1487 fi
1488 fi
1489 CC=$ac_cv_prog_CC
1490 if test -n "$CC"; then
1491   echo "$as_me:1491: result: $CC" >&5
1492 echo "${ECHO_T}$CC" >&6
1493 else
1494   echo "$as_me:1494: result: no" >&5
1495 echo "${ECHO_T}no" >&6
1496 fi
1497
1498 fi
1499 if test -z "$ac_cv_prog_CC"; then
1500   ac_ct_CC=$CC
1501   # Extract the first word of "cc", so it can be a program name with args.
1502 set dummy cc; ac_word=$2
1503 echo "$as_me:1503: checking for $ac_word" >&5
1504 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1505 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1506   echo $ECHO_N "(cached) $ECHO_C" >&6
1507 else
1508   if test -n "$ac_ct_CC"; then
1509   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1510 else
1511   ac_save_IFS=$IFS; IFS=$ac_path_separator
1512 ac_dummy="$PATH"
1513 for ac_dir in $ac_dummy; do
1514   IFS=$ac_save_IFS
1515   test -z "$ac_dir" && ac_dir=.
1516   $as_executable_p "$ac_dir/$ac_word" || continue
1517 ac_cv_prog_ac_ct_CC="cc"
1518 echo "$as_me:1518: found $ac_dir/$ac_word" >&5
1519 break
1520 done
1521
1522 fi
1523 fi
1524 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1525 if test -n "$ac_ct_CC"; then
1526   echo "$as_me:1526: result: $ac_ct_CC" >&5
1527 echo "${ECHO_T}$ac_ct_CC" >&6
1528 else
1529   echo "$as_me:1529: result: no" >&5
1530 echo "${ECHO_T}no" >&6
1531 fi
1532
1533   CC=$ac_ct_CC
1534 else
1535   CC="$ac_cv_prog_CC"
1536 fi
1537
1538 fi
1539 if test -z "$CC"; then
1540   # Extract the first word of "cc", so it can be a program name with args.
1541 set dummy cc; ac_word=$2
1542 echo "$as_me:1542: checking for $ac_word" >&5
1543 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1544 if test "${ac_cv_prog_CC+set}" = set; then
1545   echo $ECHO_N "(cached) $ECHO_C" >&6
1546 else
1547   if test -n "$CC"; then
1548   ac_cv_prog_CC="$CC" # Let the user override the test.
1549 else
1550   ac_prog_rejected=no
1551   ac_save_IFS=$IFS; IFS=$ac_path_separator
1552 ac_dummy="$PATH"
1553 for ac_dir in $ac_dummy; do
1554   IFS=$ac_save_IFS
1555   test -z "$ac_dir" && ac_dir=.
1556   $as_executable_p "$ac_dir/$ac_word" || continue
1557 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1558   ac_prog_rejected=yes
1559   continue
1560 fi
1561 ac_cv_prog_CC="cc"
1562 echo "$as_me:1562: found $ac_dir/$ac_word" >&5
1563 break
1564 done
1565
1566 if test $ac_prog_rejected = yes; then
1567   # We found a bogon in the path, so make sure we never use it.
1568   set dummy $ac_cv_prog_CC
1569   shift
1570   if test $# != 0; then
1571     # We chose a different compiler from the bogus one.
1572     # However, it has the same basename, so the bogon will be chosen
1573     # first if we set CC to just the basename; use the full file name.
1574     shift
1575     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1576     shift
1577     ac_cv_prog_CC="$@"
1578   fi
1579 fi
1580 fi
1581 fi
1582 CC=$ac_cv_prog_CC
1583 if test -n "$CC"; then
1584   echo "$as_me:1584: result: $CC" >&5
1585 echo "${ECHO_T}$CC" >&6
1586 else
1587   echo "$as_me:1587: result: no" >&5
1588 echo "${ECHO_T}no" >&6
1589 fi
1590
1591 fi
1592 if test -z "$CC"; then
1593   if test -n "$ac_tool_prefix"; then
1594   for ac_prog in cl
1595   do
1596     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1597 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1598 echo "$as_me:1598: checking for $ac_word" >&5
1599 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1600 if test "${ac_cv_prog_CC+set}" = set; then
1601   echo $ECHO_N "(cached) $ECHO_C" >&6
1602 else
1603   if test -n "$CC"; then
1604   ac_cv_prog_CC="$CC" # Let the user override the test.
1605 else
1606   ac_save_IFS=$IFS; IFS=$ac_path_separator
1607 ac_dummy="$PATH"
1608 for ac_dir in $ac_dummy; do
1609   IFS=$ac_save_IFS
1610   test -z "$ac_dir" && ac_dir=.
1611   $as_executable_p "$ac_dir/$ac_word" || continue
1612 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1613 echo "$as_me:1613: found $ac_dir/$ac_word" >&5
1614 break
1615 done
1616
1617 fi
1618 fi
1619 CC=$ac_cv_prog_CC
1620 if test -n "$CC"; then
1621   echo "$as_me:1621: result: $CC" >&5
1622 echo "${ECHO_T}$CC" >&6
1623 else
1624   echo "$as_me:1624: result: no" >&5
1625 echo "${ECHO_T}no" >&6
1626 fi
1627
1628     test -n "$CC" && break
1629   done
1630 fi
1631 if test -z "$CC"; then
1632   ac_ct_CC=$CC
1633   for ac_prog in cl
1634 do
1635   # Extract the first word of "$ac_prog", so it can be a program name with args.
1636 set dummy $ac_prog; ac_word=$2
1637 echo "$as_me:1637: checking for $ac_word" >&5
1638 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1639 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1640   echo $ECHO_N "(cached) $ECHO_C" >&6
1641 else
1642   if test -n "$ac_ct_CC"; then
1643   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1644 else
1645   ac_save_IFS=$IFS; IFS=$ac_path_separator
1646 ac_dummy="$PATH"
1647 for ac_dir in $ac_dummy; do
1648   IFS=$ac_save_IFS
1649   test -z "$ac_dir" && ac_dir=.
1650   $as_executable_p "$ac_dir/$ac_word" || continue
1651 ac_cv_prog_ac_ct_CC="$ac_prog"
1652 echo "$as_me:1652: found $ac_dir/$ac_word" >&5
1653 break
1654 done
1655
1656 fi
1657 fi
1658 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1659 if test -n "$ac_ct_CC"; then
1660   echo "$as_me:1660: result: $ac_ct_CC" >&5
1661 echo "${ECHO_T}$ac_ct_CC" >&6
1662 else
1663   echo "$as_me:1663: result: no" >&5
1664 echo "${ECHO_T}no" >&6
1665 fi
1666
1667   test -n "$ac_ct_CC" && break
1668 done
1669
1670   CC=$ac_ct_CC
1671 fi
1672
1673 fi
1674
1675 test -z "$CC" && { { echo "$as_me:1675: error: no acceptable cc found in \$PATH" >&5
1676 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1677    { (exit 1); exit 1; }; }
1678
1679 # Provide some information about the compiler.
1680 echo "$as_me:1680:" \
1681      "checking for C compiler version" >&5
1682 ac_compiler=`set X $ac_compile; echo $2`
1683 { (eval echo "$as_me:1683: \"$ac_compiler --version </dev/null >&5\"") >&5
1684   (eval $ac_compiler --version </dev/null >&5) 2>&5
1685   ac_status=$?
1686   echo "$as_me:1686: \$? = $ac_status" >&5
1687   (exit $ac_status); }
1688 { (eval echo "$as_me:1688: \"$ac_compiler -v </dev/null >&5\"") >&5
1689   (eval $ac_compiler -v </dev/null >&5) 2>&5
1690   ac_status=$?
1691   echo "$as_me:1691: \$? = $ac_status" >&5
1692   (exit $ac_status); }
1693 { (eval echo "$as_me:1693: \"$ac_compiler -V </dev/null >&5\"") >&5
1694   (eval $ac_compiler -V </dev/null >&5) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }
1698
1699 cat >conftest.$ac_ext <<_ACEOF
1700 #line 1700 "configure"
1701 #include "confdefs.h"
1702
1703 int
1704 main ()
1705 {
1706
1707   ;
1708   return 0;
1709 }
1710 _ACEOF
1711 ac_clean_files_save=$ac_clean_files
1712 ac_clean_files="$ac_clean_files a.out a.exe"
1713 # Try to create an executable without -o first, disregard a.out.
1714 # It will help us diagnose broken compilers, and finding out an intuition
1715 # of exeext.
1716 echo "$as_me:1716: checking for C compiler default output" >&5
1717 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1718 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1719 if { (eval echo "$as_me:1719: \"$ac_link_default\"") >&5
1720   (eval $ac_link_default) 2>&5
1721   ac_status=$?
1722   echo "$as_me:1722: \$? = $ac_status" >&5
1723   (exit $ac_status); }; then
1724   # Find the output, starting from the most likely.  This scheme is
1725 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1726 # resort.
1727 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1728                 ls a.out conftest 2>/dev/null;
1729                 ls a.* conftest.* 2>/dev/null`; do
1730   case $ac_file in
1731     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1732     a.out ) # We found the default executable, but exeext='' is most
1733             # certainly right.
1734             break;;
1735     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1736           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1737           export ac_cv_exeext
1738           break;;
1739     * ) break;;
1740   esac
1741 done
1742 else
1743   echo "$as_me: failed program was:" >&5
1744 cat conftest.$ac_ext >&5
1745 { { echo "$as_me:1745: error: C compiler cannot create executables" >&5
1746 echo "$as_me: error: C compiler cannot create executables" >&2;}
1747    { (exit 77); exit 77; }; }
1748 fi
1749
1750 ac_exeext=$ac_cv_exeext
1751 echo "$as_me:1751: result: $ac_file" >&5
1752 echo "${ECHO_T}$ac_file" >&6
1753
1754 # Check the compiler produces executables we can run.  If not, either
1755 # the compiler is broken, or we cross compile.
1756 echo "$as_me:1756: checking whether the C compiler works" >&5
1757 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1758 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1759 # If not cross compiling, check that we can run a simple program.
1760 if test "$cross_compiling" != yes; then
1761   if { ac_try='./$ac_file'
1762   { (eval echo "$as_me:1762: \"$ac_try\"") >&5
1763   (eval $ac_try) 2>&5
1764   ac_status=$?
1765   echo "$as_me:1765: \$? = $ac_status" >&5
1766   (exit $ac_status); }; }; then
1767     cross_compiling=no
1768   else
1769     if test "$cross_compiling" = maybe; then
1770         cross_compiling=yes
1771     else
1772         { { echo "$as_me:1772: error: cannot run C compiled programs.
1773 If you meant to cross compile, use \`--host'." >&5
1774 echo "$as_me: error: cannot run C compiled programs.
1775 If you meant to cross compile, use \`--host'." >&2;}
1776    { (exit 1); exit 1; }; }
1777     fi
1778   fi
1779 fi
1780 echo "$as_me:1780: result: yes" >&5
1781 echo "${ECHO_T}yes" >&6
1782
1783 rm -f a.out a.exe conftest$ac_cv_exeext
1784 ac_clean_files=$ac_clean_files_save
1785 # Check the compiler produces executables we can run.  If not, either
1786 # the compiler is broken, or we cross compile.
1787 echo "$as_me:1787: checking whether we are cross compiling" >&5
1788 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1789 echo "$as_me:1789: result: $cross_compiling" >&5
1790 echo "${ECHO_T}$cross_compiling" >&6
1791
1792 echo "$as_me:1792: checking for executable suffix" >&5
1793 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1794 if { (eval echo "$as_me:1794: \"$ac_link\"") >&5
1795   (eval $ac_link) 2>&5
1796   ac_status=$?
1797   echo "$as_me:1797: \$? = $ac_status" >&5
1798   (exit $ac_status); }; then
1799   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1800 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1801 # work properly (i.e., refer to `conftest.exe'), while it won't with
1802 # `rm'.
1803 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1804   case $ac_file in
1805     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1806     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1807           export ac_cv_exeext
1808           break;;
1809     * ) break;;
1810   esac
1811 done
1812 else
1813   { { echo "$as_me:1813: error: cannot compute EXEEXT: cannot compile and link" >&5
1814 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1815    { (exit 1); exit 1; }; }
1816 fi
1817
1818 rm -f conftest$ac_cv_exeext
1819 echo "$as_me:1819: result: $ac_cv_exeext" >&5
1820 echo "${ECHO_T}$ac_cv_exeext" >&6
1821
1822 rm -f conftest.$ac_ext
1823 EXEEXT=$ac_cv_exeext
1824 ac_exeext=$EXEEXT
1825 echo "$as_me:1825: checking for object suffix" >&5
1826 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1827 if test "${ac_cv_objext+set}" = set; then
1828   echo $ECHO_N "(cached) $ECHO_C" >&6
1829 else
1830   cat >conftest.$ac_ext <<_ACEOF
1831 #line 1831 "configure"
1832 #include "confdefs.h"
1833
1834 int
1835 main ()
1836 {
1837
1838   ;
1839   return 0;
1840 }
1841 _ACEOF
1842 rm -f conftest.o conftest.obj
1843 if { (eval echo "$as_me:1843: \"$ac_compile\"") >&5
1844   (eval $ac_compile) 2>&5
1845   ac_status=$?
1846   echo "$as_me:1846: \$? = $ac_status" >&5
1847   (exit $ac_status); }; then
1848   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1849   case $ac_file in
1850     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1851     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1852        break;;
1853   esac
1854 done
1855 else
1856   echo "$as_me: failed program was:" >&5
1857 cat conftest.$ac_ext >&5
1858 { { echo "$as_me:1858: error: cannot compute OBJEXT: cannot compile" >&5
1859 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1860    { (exit 1); exit 1; }; }
1861 fi
1862
1863 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1864 fi
1865 echo "$as_me:1865: result: $ac_cv_objext" >&5
1866 echo "${ECHO_T}$ac_cv_objext" >&6
1867 OBJEXT=$ac_cv_objext
1868 ac_objext=$OBJEXT
1869 echo "$as_me:1869: checking whether we are using the GNU C compiler" >&5
1870 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1871 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1872   echo $ECHO_N "(cached) $ECHO_C" >&6
1873 else
1874   cat >conftest.$ac_ext <<_ACEOF
1875 #line 1875 "configure"
1876 #include "confdefs.h"
1877
1878 int
1879 main ()
1880 {
1881 #ifndef __GNUC__
1882        choke me
1883 #endif
1884
1885   ;
1886   return 0;
1887 }
1888 _ACEOF
1889 rm -f conftest.$ac_objext
1890 if { (eval echo "$as_me:1890: \"$ac_compile\"") >&5
1891   (eval $ac_compile) 2>&5
1892   ac_status=$?
1893   echo "$as_me:1893: \$? = $ac_status" >&5
1894   (exit $ac_status); } &&
1895          { ac_try='test -s conftest.$ac_objext'
1896   { (eval echo "$as_me:1896: \"$ac_try\"") >&5
1897   (eval $ac_try) 2>&5
1898   ac_status=$?
1899   echo "$as_me:1899: \$? = $ac_status" >&5
1900   (exit $ac_status); }; }; then
1901   ac_compiler_gnu=yes
1902 else
1903   echo "$as_me: failed program was:" >&5
1904 cat conftest.$ac_ext >&5
1905 ac_compiler_gnu=no
1906 fi
1907 rm -f conftest.$ac_objext conftest.$ac_ext
1908 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1909
1910 fi
1911 echo "$as_me:1911: result: $ac_cv_c_compiler_gnu" >&5
1912 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1913 GCC=`test $ac_compiler_gnu = yes && echo yes`
1914 ac_test_CFLAGS=${CFLAGS+set}
1915 ac_save_CFLAGS=$CFLAGS
1916 CFLAGS="-g"
1917 echo "$as_me:1917: checking whether $CC accepts -g" >&5
1918 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1919 if test "${ac_cv_prog_cc_g+set}" = set; then
1920   echo $ECHO_N "(cached) $ECHO_C" >&6
1921 else
1922   cat >conftest.$ac_ext <<_ACEOF
1923 #line 1923 "configure"
1924 #include "confdefs.h"
1925
1926 int
1927 main ()
1928 {
1929
1930   ;
1931   return 0;
1932 }
1933 _ACEOF
1934 rm -f conftest.$ac_objext
1935 if { (eval echo "$as_me:1935: \"$ac_compile\"") >&5
1936   (eval $ac_compile) 2>&5
1937   ac_status=$?
1938   echo "$as_me:1938: \$? = $ac_status" >&5
1939   (exit $ac_status); } &&
1940          { ac_try='test -s conftest.$ac_objext'
1941   { (eval echo "$as_me:1941: \"$ac_try\"") >&5
1942   (eval $ac_try) 2>&5
1943   ac_status=$?
1944   echo "$as_me:1944: \$? = $ac_status" >&5
1945   (exit $ac_status); }; }; then
1946   ac_cv_prog_cc_g=yes
1947 else
1948   echo "$as_me: failed program was:" >&5
1949 cat conftest.$ac_ext >&5
1950 ac_cv_prog_cc_g=no
1951 fi
1952 rm -f conftest.$ac_objext conftest.$ac_ext
1953 fi
1954 echo "$as_me:1954: result: $ac_cv_prog_cc_g" >&5
1955 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1956 if test "$ac_test_CFLAGS" = set; then
1957   CFLAGS=$ac_save_CFLAGS
1958 elif test $ac_cv_prog_cc_g = yes; then
1959   if test "$GCC" = yes; then
1960     CFLAGS="-g -O2"
1961   else
1962     CFLAGS="-g"
1963   fi
1964 else
1965   if test "$GCC" = yes; then
1966     CFLAGS="-O2"
1967   else
1968     CFLAGS=
1969   fi
1970 fi
1971 # Some people use a C++ compiler to compile C.  Since we use `exit',
1972 # in C++ we need to declare it.  In case someone uses the same compiler
1973 # for both compiling C and C++ we need to have the C++ compiler decide
1974 # the declaration of exit, since it's the most demanding environment.
1975 cat >conftest.$ac_ext <<_ACEOF
1976 #ifndef __cplusplus
1977   choke me
1978 #endif
1979 _ACEOF
1980 rm -f conftest.$ac_objext
1981 if { (eval echo "$as_me:1981: \"$ac_compile\"") >&5
1982   (eval $ac_compile) 2>&5
1983   ac_status=$?
1984   echo "$as_me:1984: \$? = $ac_status" >&5
1985   (exit $ac_status); } &&
1986          { ac_try='test -s conftest.$ac_objext'
1987   { (eval echo "$as_me:1987: \"$ac_try\"") >&5
1988   (eval $ac_try) 2>&5
1989   ac_status=$?
1990   echo "$as_me:1990: \$? = $ac_status" >&5
1991   (exit $ac_status); }; }; then
1992   for ac_declaration in \
1993    ''\
1994    '#include <stdlib.h>' \
1995    'extern "C" void std::exit (int) throw (); using std::exit;' \
1996    'extern "C" void std::exit (int); using std::exit;' \
1997    'extern "C" void exit (int) throw ();' \
1998    'extern "C" void exit (int);' \
1999    'void exit (int);'
2000 do
2001   cat >conftest.$ac_ext <<_ACEOF
2002 #line 2002 "configure"
2003 #include "confdefs.h"
2004 #include <stdlib.h>
2005 $ac_declaration
2006 int
2007 main ()
2008 {
2009 exit (42);
2010   ;
2011   return 0;
2012 }
2013 _ACEOF
2014 rm -f conftest.$ac_objext
2015 if { (eval echo "$as_me:2015: \"$ac_compile\"") >&5
2016   (eval $ac_compile) 2>&5
2017   ac_status=$?
2018   echo "$as_me:2018: \$? = $ac_status" >&5
2019   (exit $ac_status); } &&
2020          { ac_try='test -s conftest.$ac_objext'
2021   { (eval echo "$as_me:2021: \"$ac_try\"") >&5
2022   (eval $ac_try) 2>&5
2023   ac_status=$?
2024   echo "$as_me:2024: \$? = $ac_status" >&5
2025   (exit $ac_status); }; }; then
2026   :
2027 else
2028   echo "$as_me: failed program was:" >&5
2029 cat conftest.$ac_ext >&5
2030 continue
2031 fi
2032 rm -f conftest.$ac_objext conftest.$ac_ext
2033   cat >conftest.$ac_ext <<_ACEOF
2034 #line 2034 "configure"
2035 #include "confdefs.h"
2036 $ac_declaration
2037 int
2038 main ()
2039 {
2040 exit (42);
2041   ;
2042   return 0;
2043 }
2044 _ACEOF
2045 rm -f conftest.$ac_objext
2046 if { (eval echo "$as_me:2046: \"$ac_compile\"") >&5
2047   (eval $ac_compile) 2>&5
2048   ac_status=$?
2049   echo "$as_me:2049: \$? = $ac_status" >&5
2050   (exit $ac_status); } &&
2051          { ac_try='test -s conftest.$ac_objext'
2052   { (eval echo "$as_me:2052: \"$ac_try\"") >&5
2053   (eval $ac_try) 2>&5
2054   ac_status=$?
2055   echo "$as_me:2055: \$? = $ac_status" >&5
2056   (exit $ac_status); }; }; then
2057   break
2058 else
2059   echo "$as_me: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 fi
2062 rm -f conftest.$ac_objext conftest.$ac_ext
2063 done
2064 rm -f conftest*
2065 if test -n "$ac_declaration"; then
2066   echo '#ifdef __cplusplus' >>confdefs.h
2067   echo $ac_declaration      >>confdefs.h
2068   echo '#endif'             >>confdefs.h
2069 fi
2070
2071 else
2072   echo "$as_me: failed program was:" >&5
2073 cat conftest.$ac_ext >&5
2074 fi
2075 rm -f conftest.$ac_objext conftest.$ac_ext
2076 ac_ext=c
2077 ac_cpp='$CPP $CPPFLAGS'
2078 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2079 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2080 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2081 ac_main_return=return
2082
2083 GCC_VERSION=none
2084 if test "$GCC" = yes ; then
2085         echo "$as_me:2085: checking version of $CC" >&5
2086 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2087         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2088         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2089         echo "$as_me:2089: result: $GCC_VERSION" >&5
2090 echo "${ECHO_T}$GCC_VERSION" >&6
2091 fi
2092
2093 ac_ext=c
2094 ac_cpp='$CPP $CPPFLAGS'
2095 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2096 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2097 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2098 ac_main_return=return
2099 echo "$as_me:2099: checking how to run the C preprocessor" >&5
2100 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2101 # On Suns, sometimes $CPP names a directory.
2102 if test -n "$CPP" && test -d "$CPP"; then
2103   CPP=
2104 fi
2105 if test -z "$CPP"; then
2106   if test "${ac_cv_prog_CPP+set}" = set; then
2107   echo $ECHO_N "(cached) $ECHO_C" >&6
2108 else
2109       # Double quotes because CPP needs to be expanded
2110     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2111     do
2112       ac_preproc_ok=false
2113 for ac_c_preproc_warn_flag in '' yes
2114 do
2115   # Use a header file that comes with gcc, so configuring glibc
2116   # with a fresh cross-compiler works.
2117   # On the NeXT, cc -E runs the code through the compiler's parser,
2118   # not just through cpp. "Syntax error" is here to catch this case.
2119   cat >conftest.$ac_ext <<_ACEOF
2120 #line 2120 "configure"
2121 #include "confdefs.h"
2122 #include <assert.h>
2123                      Syntax error
2124 _ACEOF
2125 if { (eval echo "$as_me:2125: \"$ac_cpp conftest.$ac_ext\"") >&5
2126   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2127   ac_status=$?
2128   egrep -v '^ *\+' conftest.er1 >conftest.err
2129   rm -f conftest.er1
2130   cat conftest.err >&5
2131   echo "$as_me:2131: \$? = $ac_status" >&5
2132   (exit $ac_status); } >/dev/null; then
2133   if test -s conftest.err; then
2134     ac_cpp_err=$ac_c_preproc_warn_flag
2135   else
2136     ac_cpp_err=
2137   fi
2138 else
2139   ac_cpp_err=yes
2140 fi
2141 if test -z "$ac_cpp_err"; then
2142   :
2143 else
2144   echo "$as_me: failed program was:" >&5
2145   cat conftest.$ac_ext >&5
2146   # Broken: fails on valid input.
2147 continue
2148 fi
2149 rm -f conftest.err conftest.$ac_ext
2150
2151   # OK, works on sane cases.  Now check whether non-existent headers
2152   # can be detected and how.
2153   cat >conftest.$ac_ext <<_ACEOF
2154 #line 2154 "configure"
2155 #include "confdefs.h"
2156 #include <ac_nonexistent.h>
2157 _ACEOF
2158 if { (eval echo "$as_me:2158: \"$ac_cpp conftest.$ac_ext\"") >&5
2159   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2160   ac_status=$?
2161   egrep -v '^ *\+' conftest.er1 >conftest.err
2162   rm -f conftest.er1
2163   cat conftest.err >&5
2164   echo "$as_me:2164: \$? = $ac_status" >&5
2165   (exit $ac_status); } >/dev/null; then
2166   if test -s conftest.err; then
2167     ac_cpp_err=$ac_c_preproc_warn_flag
2168   else
2169     ac_cpp_err=
2170   fi
2171 else
2172   ac_cpp_err=yes
2173 fi
2174 if test -z "$ac_cpp_err"; then
2175   # Broken: success on invalid input.
2176 continue
2177 else
2178   echo "$as_me: failed program was:" >&5
2179   cat conftest.$ac_ext >&5
2180   # Passes both tests.
2181 ac_preproc_ok=:
2182 break
2183 fi
2184 rm -f conftest.err conftest.$ac_ext
2185
2186 done
2187 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2188 rm -f conftest.err conftest.$ac_ext
2189 if $ac_preproc_ok; then
2190   break
2191 fi
2192
2193     done
2194     ac_cv_prog_CPP=$CPP
2195
2196 fi
2197   CPP=$ac_cv_prog_CPP
2198 else
2199   ac_cv_prog_CPP=$CPP
2200 fi
2201 echo "$as_me:2201: result: $CPP" >&5
2202 echo "${ECHO_T}$CPP" >&6
2203 ac_preproc_ok=false
2204 for ac_c_preproc_warn_flag in '' yes
2205 do
2206   # Use a header file that comes with gcc, so configuring glibc
2207   # with a fresh cross-compiler works.
2208   # On the NeXT, cc -E runs the code through the compiler's parser,
2209   # not just through cpp. "Syntax error" is here to catch this case.
2210   cat >conftest.$ac_ext <<_ACEOF
2211 #line 2211 "configure"
2212 #include "confdefs.h"
2213 #include <assert.h>
2214                      Syntax error
2215 _ACEOF
2216 if { (eval echo "$as_me:2216: \"$ac_cpp conftest.$ac_ext\"") >&5
2217   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2218   ac_status=$?
2219   egrep -v '^ *\+' conftest.er1 >conftest.err
2220   rm -f conftest.er1
2221   cat conftest.err >&5
2222   echo "$as_me:2222: \$? = $ac_status" >&5
2223   (exit $ac_status); } >/dev/null; then
2224   if test -s conftest.err; then
2225     ac_cpp_err=$ac_c_preproc_warn_flag
2226   else
2227     ac_cpp_err=
2228   fi
2229 else
2230   ac_cpp_err=yes
2231 fi
2232 if test -z "$ac_cpp_err"; then
2233   :
2234 else
2235   echo "$as_me: failed program was:" >&5
2236   cat conftest.$ac_ext >&5
2237   # Broken: fails on valid input.
2238 continue
2239 fi
2240 rm -f conftest.err conftest.$ac_ext
2241
2242   # OK, works on sane cases.  Now check whether non-existent headers
2243   # can be detected and how.
2244   cat >conftest.$ac_ext <<_ACEOF
2245 #line 2245 "configure"
2246 #include "confdefs.h"
2247 #include <ac_nonexistent.h>
2248 _ACEOF
2249 if { (eval echo "$as_me:2249: \"$ac_cpp conftest.$ac_ext\"") >&5
2250   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2251   ac_status=$?
2252   egrep -v '^ *\+' conftest.er1 >conftest.err
2253   rm -f conftest.er1
2254   cat conftest.err >&5
2255   echo "$as_me:2255: \$? = $ac_status" >&5
2256   (exit $ac_status); } >/dev/null; then
2257   if test -s conftest.err; then
2258     ac_cpp_err=$ac_c_preproc_warn_flag
2259   else
2260     ac_cpp_err=
2261   fi
2262 else
2263   ac_cpp_err=yes
2264 fi
2265 if test -z "$ac_cpp_err"; then
2266   # Broken: success on invalid input.
2267 continue
2268 else
2269   echo "$as_me: failed program was:" >&5
2270   cat conftest.$ac_ext >&5
2271   # Passes both tests.
2272 ac_preproc_ok=:
2273 break
2274 fi
2275 rm -f conftest.err conftest.$ac_ext
2276
2277 done
2278 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2279 rm -f conftest.err conftest.$ac_ext
2280 if $ac_preproc_ok; then
2281   :
2282 else
2283   { { echo "$as_me:2283: error: C preprocessor \"$CPP\" fails sanity check" >&5
2284 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2285    { (exit 1); exit 1; }; }
2286 fi
2287
2288 ac_ext=c
2289 ac_cpp='$CPP $CPPFLAGS'
2290 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2291 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2292 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2293 ac_main_return=return
2294
2295 if test $ac_cv_c_compiler_gnu = yes; then
2296     echo "$as_me:2296: checking whether $CC needs -traditional" >&5
2297 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2298 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2299   echo $ECHO_N "(cached) $ECHO_C" >&6
2300 else
2301     ac_pattern="Autoconf.*'x'"
2302   cat >conftest.$ac_ext <<_ACEOF
2303 #line 2303 "configure"
2304 #include "confdefs.h"
2305 #include <sgtty.h>
2306 int Autoconf = TIOCGETP;
2307 _ACEOF
2308 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2309   egrep "$ac_pattern" >/dev/null 2>&1; then
2310   ac_cv_prog_gcc_traditional=yes
2311 else
2312   ac_cv_prog_gcc_traditional=no
2313 fi
2314 rm -f conftest*
2315
2316   if test $ac_cv_prog_gcc_traditional = no; then
2317     cat >conftest.$ac_ext <<_ACEOF
2318 #line 2318 "configure"
2319 #include "confdefs.h"
2320 #include <termio.h>
2321 int Autoconf = TCGETA;
2322 _ACEOF
2323 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2324   egrep "$ac_pattern" >/dev/null 2>&1; then
2325   ac_cv_prog_gcc_traditional=yes
2326 fi
2327 rm -f conftest*
2328
2329   fi
2330 fi
2331 echo "$as_me:2331: result: $ac_cv_prog_gcc_traditional" >&5
2332 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2333   if test $ac_cv_prog_gcc_traditional = yes; then
2334     CC="$CC -traditional"
2335   fi
2336 fi
2337
2338 echo "$as_me:2338: checking whether $CC understands -c and -o together" >&5
2339 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2340 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2341   echo $ECHO_N "(cached) $ECHO_C" >&6
2342 else
2343
2344 cat > conftest.$ac_ext <<CF_EOF
2345 #include <stdio.h>
2346 int main()
2347 {
2348         ${cf_cv_main_return:-return}(0);
2349 }
2350 CF_EOF
2351 # We do the test twice because some compilers refuse to overwrite an
2352 # existing .o file with -o, though they will create one.
2353 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2354 if { (eval echo "$as_me:2354: \"$ac_try\"") >&5
2355   (eval $ac_try) 2>&5
2356   ac_status=$?
2357   echo "$as_me:2357: \$? = $ac_status" >&5
2358   (exit $ac_status); } &&
2359   test -f conftest2.$ac_objext && { (eval echo "$as_me:2359: \"$ac_try\"") >&5
2360   (eval $ac_try) 2>&5
2361   ac_status=$?
2362   echo "$as_me:2362: \$? = $ac_status" >&5
2363   (exit $ac_status); };
2364 then
2365   eval cf_cv_prog_CC_c_o=yes
2366 else
2367   eval cf_cv_prog_CC_c_o=no
2368 fi
2369 rm -f conftest*
2370
2371 fi
2372 if test $cf_cv_prog_CC_c_o = yes; then
2373   echo "$as_me:2373: result: yes" >&5
2374 echo "${ECHO_T}yes" >&6
2375 else
2376   echo "$as_me:2376: result: no" >&5
2377 echo "${ECHO_T}no" >&6
2378 fi
2379
2380 echo "$as_me:2380: checking for POSIXized ISC" >&5
2381 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2382 if test -d /etc/conf/kconfig.d &&
2383    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2384 then
2385   echo "$as_me:2385: result: yes" >&5
2386 echo "${ECHO_T}yes" >&6
2387   ISC=yes # If later tests want to check for ISC.
2388
2389 cat >>confdefs.h <<\EOF
2390 #define _POSIX_SOURCE 1
2391 EOF
2392
2393   if test "$GCC" = yes; then
2394     CC="$CC -posix"
2395   else
2396     CC="$CC -Xp"
2397   fi
2398 else
2399   echo "$as_me:2399: result: no" >&5
2400 echo "${ECHO_T}no" >&6
2401   ISC=
2402 fi
2403
2404 echo "$as_me:2404: checking for ${CC-cc} option to accept ANSI C" >&5
2405 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2406 if test "${cf_cv_ansi_cc+set}" = set; then
2407   echo $ECHO_N "(cached) $ECHO_C" >&6
2408 else
2409
2410 cf_cv_ansi_cc=no
2411 cf_save_CFLAGS="$CFLAGS"
2412 cf_save_CPPFLAGS="$CPPFLAGS"
2413 # Don't try gcc -ansi; that turns off useful extensions and
2414 # breaks some systems' header files.
2415 # AIX                   -qlanglvl=ansi
2416 # Ultrix and OSF/1      -std1
2417 # HP-UX                 -Aa -D_HPUX_SOURCE
2418 # SVR4                  -Xc
2419 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2420 for cf_arg in "-DCC_HAS_PROTOS" \
2421         "" \
2422         -qlanglvl=ansi \
2423         -std1 \
2424         -Ae \
2425         "-Aa -D_HPUX_SOURCE" \
2426         -Xc
2427 do
2428
2429 cf_fix_cppflags=no
2430 cf_new_cflags=
2431 cf_new_cppflags=
2432 cf_new_extra_cppflags=
2433
2434 for cf_add_cflags in $cf_arg
2435 do
2436 case $cf_fix_cppflags in
2437 no)
2438         case $cf_add_cflags in #(vi
2439         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2440                 case $cf_add_cflags in
2441                 -D*)
2442                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2443
2444                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2445                         && test -z "${cf_tst_cflags}" \
2446                         && cf_fix_cppflags=yes
2447
2448                         if test $cf_fix_cppflags = yes ; then
2449                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2450                                 continue
2451                         elif test "${cf_tst_cflags}" = "\"'" ; then
2452                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2453                                 continue
2454                         fi
2455                         ;;
2456                 esac
2457                 case "$CPPFLAGS" in
2458                 *$cf_add_cflags) #(vi
2459                         ;;
2460                 *) #(vi
2461                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2462                         ;;
2463                 esac
2464                 ;;
2465         *)
2466                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2467                 ;;
2468         esac
2469         ;;
2470 yes)
2471         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2472
2473         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2474
2475         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2476         && test -z "${cf_tst_cflags}" \
2477         && cf_fix_cppflags=no
2478         ;;
2479 esac
2480 done
2481
2482 if test -n "$cf_new_cflags" ; then
2483
2484         CFLAGS="$CFLAGS $cf_new_cflags"
2485 fi
2486
2487 if test -n "$cf_new_cppflags" ; then
2488
2489         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2490 fi
2491
2492 if test -n "$cf_new_extra_cppflags" ; then
2493
2494         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2495 fi
2496
2497         cat >conftest.$ac_ext <<_ACEOF
2498 #line 2498 "configure"
2499 #include "confdefs.h"
2500
2501 #ifndef CC_HAS_PROTOS
2502 #if !defined(__STDC__) || (__STDC__ != 1)
2503 choke me
2504 #endif
2505 #endif
2506
2507 int
2508 main ()
2509 {
2510
2511         int test (int i, double x);
2512         struct s1 {int (*f) (int a);};
2513         struct s2 {int (*f) (double a);};
2514   ;
2515   return 0;
2516 }
2517 _ACEOF
2518 rm -f conftest.$ac_objext
2519 if { (eval echo "$as_me:2519: \"$ac_compile\"") >&5
2520   (eval $ac_compile) 2>&5
2521   ac_status=$?
2522   echo "$as_me:2522: \$? = $ac_status" >&5
2523   (exit $ac_status); } &&
2524          { ac_try='test -s conftest.$ac_objext'
2525   { (eval echo "$as_me:2525: \"$ac_try\"") >&5
2526   (eval $ac_try) 2>&5
2527   ac_status=$?
2528   echo "$as_me:2528: \$? = $ac_status" >&5
2529   (exit $ac_status); }; }; then
2530   cf_cv_ansi_cc="$cf_arg"; break
2531 else
2532   echo "$as_me: failed program was:" >&5
2533 cat conftest.$ac_ext >&5
2534 fi
2535 rm -f conftest.$ac_objext conftest.$ac_ext
2536 done
2537 CFLAGS="$cf_save_CFLAGS"
2538 CPPFLAGS="$cf_save_CPPFLAGS"
2539
2540 fi
2541 echo "$as_me:2541: result: $cf_cv_ansi_cc" >&5
2542 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2543
2544 if test "$cf_cv_ansi_cc" != "no"; then
2545 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2546
2547 cf_fix_cppflags=no
2548 cf_new_cflags=
2549 cf_new_cppflags=
2550 cf_new_extra_cppflags=
2551
2552 for cf_add_cflags in $cf_cv_ansi_cc
2553 do
2554 case $cf_fix_cppflags in
2555 no)
2556         case $cf_add_cflags in #(vi
2557         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2558                 case $cf_add_cflags in
2559                 -D*)
2560                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2561
2562                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2563                         && test -z "${cf_tst_cflags}" \
2564                         && cf_fix_cppflags=yes
2565
2566                         if test $cf_fix_cppflags = yes ; then
2567                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2568                                 continue
2569                         elif test "${cf_tst_cflags}" = "\"'" ; then
2570                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2571                                 continue
2572                         fi
2573                         ;;
2574                 esac
2575                 case "$CPPFLAGS" in
2576                 *$cf_add_cflags) #(vi
2577                         ;;
2578                 *) #(vi
2579                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2580                         ;;
2581                 esac
2582                 ;;
2583         *)
2584                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2585                 ;;
2586         esac
2587         ;;
2588 yes)
2589         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2590
2591         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2592
2593         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2594         && test -z "${cf_tst_cflags}" \
2595         && cf_fix_cppflags=no
2596         ;;
2597 esac
2598 done
2599
2600 if test -n "$cf_new_cflags" ; then
2601
2602         CFLAGS="$CFLAGS $cf_new_cflags"
2603 fi
2604
2605 if test -n "$cf_new_cppflags" ; then
2606
2607         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2608 fi
2609
2610 if test -n "$cf_new_extra_cppflags" ; then
2611
2612         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2613 fi
2614
2615 else
2616         cat >>confdefs.h <<\EOF
2617 #define CC_HAS_PROTOS 1
2618 EOF
2619
2620 fi
2621 fi
2622
2623 if test "$cf_cv_ansi_cc" = "no"; then
2624         { { echo "$as_me:2624: error: Your compiler does not appear to recognize prototypes.
2625 You have the following choices:
2626         a. adjust your compiler options
2627         b. get an up-to-date compiler
2628         c. use a wrapper such as unproto" >&5
2629 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2630 You have the following choices:
2631         a. adjust your compiler options
2632         b. get an up-to-date compiler
2633         c. use a wrapper such as unproto" >&2;}
2634    { (exit 1); exit 1; }; }
2635 fi
2636
2637 case $cf_cv_system_name in
2638 os2*)
2639     CFLAGS="$CFLAGS -Zmt"
2640     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2641     CXXFLAGS="$CXXFLAGS -Zmt"
2642     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2643     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2644     ac_cv_exeext=.exe
2645     ;;
2646 esac
2647
2648 PROG_EXT="$EXEEXT"
2649
2650 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2651 #define PROG_EXT "$PROG_EXT"
2652 EOF
2653
2654 if test "$cross_compiling" = yes ; then
2655   LDCONFIG=:
2656 else
2657 case "$cf_cv_system_name" in #(vi
2658 freebsd*) #(vi
2659   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2660   ;;
2661 *) LDPATH=$PATH:/sbin:/usr/sbin
2662   # Extract the first word of "ldconfig", so it can be a program name with args.
2663 set dummy ldconfig; ac_word=$2
2664 echo "$as_me:2664: checking for $ac_word" >&5
2665 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2666 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2667   echo $ECHO_N "(cached) $ECHO_C" >&6
2668 else
2669   case $LDCONFIG in
2670   [\\/]* | ?:[\\/]*)
2671   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2672   ;;
2673   *)
2674   ac_save_IFS=$IFS; IFS=$ac_path_separator
2675 ac_dummy="$LDPATH"
2676 for ac_dir in $ac_dummy; do
2677   IFS=$ac_save_IFS
2678   test -z "$ac_dir" && ac_dir=.
2679   if $as_executable_p "$ac_dir/$ac_word"; then
2680    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2681    echo "$as_me:2681: found $ac_dir/$ac_word" >&5
2682    break
2683 fi
2684 done
2685
2686   ;;
2687 esac
2688 fi
2689 LDCONFIG=$ac_cv_path_LDCONFIG
2690
2691 if test -n "$LDCONFIG"; then
2692   echo "$as_me:2692: result: $LDCONFIG" >&5
2693 echo "${ECHO_T}$LDCONFIG" >&6
2694 else
2695   echo "$as_me:2695: result: no" >&5
2696 echo "${ECHO_T}no" >&6
2697 fi
2698
2699   ;;
2700 esac
2701 fi
2702
2703 echo "$as_me:2703: checking if you want to ensure bool is consistent with C++" >&5
2704 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2705
2706 # Check whether --with-cxx or --without-cxx was given.
2707 if test "${with_cxx+set}" = set; then
2708   withval="$with_cxx"
2709   cf_with_cxx=$withval
2710 else
2711   cf_with_cxx=yes
2712 fi;
2713 echo "$as_me:2713: result: $cf_with_cxx" >&5
2714 echo "${ECHO_T}$cf_with_cxx" >&6
2715 if test "X$cf_with_cxx" = Xno ; then
2716         CXX=""
2717         GXX=""
2718 else
2719         # with autoconf 2.13, we can change the error to a warning:
2720                 ac_ext=cc
2721 ac_cpp='$CXXCPP $CPPFLAGS'
2722 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2723 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2724 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2725 ac_main_return=return
2726 if test -n "$ac_tool_prefix"; then
2727   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2728   do
2729     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2730 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2731 echo "$as_me:2731: checking for $ac_word" >&5
2732 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2733 if test "${ac_cv_prog_CXX+set}" = set; then
2734   echo $ECHO_N "(cached) $ECHO_C" >&6
2735 else
2736   if test -n "$CXX"; then
2737   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2738 else
2739   ac_save_IFS=$IFS; IFS=$ac_path_separator
2740 ac_dummy="$PATH"
2741 for ac_dir in $ac_dummy; do
2742   IFS=$ac_save_IFS
2743   test -z "$ac_dir" && ac_dir=.
2744   $as_executable_p "$ac_dir/$ac_word" || continue
2745 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2746 echo "$as_me:2746: found $ac_dir/$ac_word" >&5
2747 break
2748 done
2749
2750 fi
2751 fi
2752 CXX=$ac_cv_prog_CXX
2753 if test -n "$CXX"; then
2754   echo "$as_me:2754: result: $CXX" >&5
2755 echo "${ECHO_T}$CXX" >&6
2756 else
2757   echo "$as_me:2757: result: no" >&5
2758 echo "${ECHO_T}no" >&6
2759 fi
2760
2761     test -n "$CXX" && break
2762   done
2763 fi
2764 if test -z "$CXX"; then
2765   ac_ct_CXX=$CXX
2766   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2767 do
2768   # Extract the first word of "$ac_prog", so it can be a program name with args.
2769 set dummy $ac_prog; ac_word=$2
2770 echo "$as_me:2770: checking for $ac_word" >&5
2771 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2772 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2773   echo $ECHO_N "(cached) $ECHO_C" >&6
2774 else
2775   if test -n "$ac_ct_CXX"; then
2776   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2777 else
2778   ac_save_IFS=$IFS; IFS=$ac_path_separator
2779 ac_dummy="$PATH"
2780 for ac_dir in $ac_dummy; do
2781   IFS=$ac_save_IFS
2782   test -z "$ac_dir" && ac_dir=.
2783   $as_executable_p "$ac_dir/$ac_word" || continue
2784 ac_cv_prog_ac_ct_CXX="$ac_prog"
2785 echo "$as_me:2785: found $ac_dir/$ac_word" >&5
2786 break
2787 done
2788
2789 fi
2790 fi
2791 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2792 if test -n "$ac_ct_CXX"; then
2793   echo "$as_me:2793: result: $ac_ct_CXX" >&5
2794 echo "${ECHO_T}$ac_ct_CXX" >&6
2795 else
2796   echo "$as_me:2796: result: no" >&5
2797 echo "${ECHO_T}no" >&6
2798 fi
2799
2800   test -n "$ac_ct_CXX" && break
2801 done
2802 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2803
2804   CXX=$ac_ct_CXX
2805 fi
2806
2807 # Provide some information about the compiler.
2808 echo "$as_me:2808:" \
2809      "checking for C++ compiler version" >&5
2810 ac_compiler=`set X $ac_compile; echo $2`
2811 { (eval echo "$as_me:2811: \"$ac_compiler --version </dev/null >&5\"") >&5
2812   (eval $ac_compiler --version </dev/null >&5) 2>&5
2813   ac_status=$?
2814   echo "$as_me:2814: \$? = $ac_status" >&5
2815   (exit $ac_status); }
2816 { (eval echo "$as_me:2816: \"$ac_compiler -v </dev/null >&5\"") >&5
2817   (eval $ac_compiler -v </dev/null >&5) 2>&5
2818   ac_status=$?
2819   echo "$as_me:2819: \$? = $ac_status" >&5
2820   (exit $ac_status); }
2821 { (eval echo "$as_me:2821: \"$ac_compiler -V </dev/null >&5\"") >&5
2822   (eval $ac_compiler -V </dev/null >&5) 2>&5
2823   ac_status=$?
2824   echo "$as_me:2824: \$? = $ac_status" >&5
2825   (exit $ac_status); }
2826
2827 echo "$as_me:2827: checking whether we are using the GNU C++ compiler" >&5
2828 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2829 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2830   echo $ECHO_N "(cached) $ECHO_C" >&6
2831 else
2832   cat >conftest.$ac_ext <<_ACEOF
2833 #line 2833 "configure"
2834 #include "confdefs.h"
2835
2836 int
2837 main ()
2838 {
2839 #ifndef __GNUC__
2840        choke me
2841 #endif
2842
2843   ;
2844   return 0;
2845 }
2846 _ACEOF
2847 rm -f conftest.$ac_objext
2848 if { (eval echo "$as_me:2848: \"$ac_compile\"") >&5
2849   (eval $ac_compile) 2>&5
2850   ac_status=$?
2851   echo "$as_me:2851: \$? = $ac_status" >&5
2852   (exit $ac_status); } &&
2853          { ac_try='test -s conftest.$ac_objext'
2854   { (eval echo "$as_me:2854: \"$ac_try\"") >&5
2855   (eval $ac_try) 2>&5
2856   ac_status=$?
2857   echo "$as_me:2857: \$? = $ac_status" >&5
2858   (exit $ac_status); }; }; then
2859   ac_compiler_gnu=yes
2860 else
2861   echo "$as_me: failed program was:" >&5
2862 cat conftest.$ac_ext >&5
2863 ac_compiler_gnu=no
2864 fi
2865 rm -f conftest.$ac_objext conftest.$ac_ext
2866 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2867
2868 fi
2869 echo "$as_me:2869: result: $ac_cv_cxx_compiler_gnu" >&5
2870 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2871 GXX=`test $ac_compiler_gnu = yes && echo yes`
2872 ac_test_CXXFLAGS=${CXXFLAGS+set}
2873 ac_save_CXXFLAGS=$CXXFLAGS
2874 CXXFLAGS="-g"
2875 echo "$as_me:2875: checking whether $CXX accepts -g" >&5
2876 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2877 if test "${ac_cv_prog_cxx_g+set}" = set; then
2878   echo $ECHO_N "(cached) $ECHO_C" >&6
2879 else
2880   cat >conftest.$ac_ext <<_ACEOF
2881 #line 2881 "configure"
2882 #include "confdefs.h"
2883
2884 int
2885 main ()
2886 {
2887
2888   ;
2889   return 0;
2890 }
2891 _ACEOF
2892 rm -f conftest.$ac_objext
2893 if { (eval echo "$as_me:2893: \"$ac_compile\"") >&5
2894   (eval $ac_compile) 2>&5
2895   ac_status=$?
2896   echo "$as_me:2896: \$? = $ac_status" >&5
2897   (exit $ac_status); } &&
2898          { ac_try='test -s conftest.$ac_objext'
2899   { (eval echo "$as_me:2899: \"$ac_try\"") >&5
2900   (eval $ac_try) 2>&5
2901   ac_status=$?
2902   echo "$as_me:2902: \$? = $ac_status" >&5
2903   (exit $ac_status); }; }; then
2904   ac_cv_prog_cxx_g=yes
2905 else
2906   echo "$as_me: failed program was:" >&5
2907 cat conftest.$ac_ext >&5
2908 ac_cv_prog_cxx_g=no
2909 fi
2910 rm -f conftest.$ac_objext conftest.$ac_ext
2911 fi
2912 echo "$as_me:2912: result: $ac_cv_prog_cxx_g" >&5
2913 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2914 if test "$ac_test_CXXFLAGS" = set; then
2915   CXXFLAGS=$ac_save_CXXFLAGS
2916 elif test $ac_cv_prog_cxx_g = yes; then
2917   if test "$GXX" = yes; then
2918     CXXFLAGS="-g -O2"
2919   else
2920     CXXFLAGS="-g"
2921   fi
2922 else
2923   if test "$GXX" = yes; then
2924     CXXFLAGS="-O2"
2925   else
2926     CXXFLAGS=
2927   fi
2928 fi
2929 for ac_declaration in \
2930    ''\
2931    '#include <stdlib.h>' \
2932    'extern "C" void std::exit (int) throw (); using std::exit;' \
2933    'extern "C" void std::exit (int); using std::exit;' \
2934    'extern "C" void exit (int) throw ();' \
2935    'extern "C" void exit (int);' \
2936    'void exit (int);'
2937 do
2938   cat >conftest.$ac_ext <<_ACEOF
2939 #line 2939 "configure"
2940 #include "confdefs.h"
2941 #include <stdlib.h>
2942 $ac_declaration
2943 int
2944 main ()
2945 {
2946 exit (42);
2947   ;
2948   return 0;
2949 }
2950 _ACEOF
2951 rm -f conftest.$ac_objext
2952 if { (eval echo "$as_me:2952: \"$ac_compile\"") >&5
2953   (eval $ac_compile) 2>&5
2954   ac_status=$?
2955   echo "$as_me:2955: \$? = $ac_status" >&5
2956   (exit $ac_status); } &&
2957          { ac_try='test -s conftest.$ac_objext'
2958   { (eval echo "$as_me:2958: \"$ac_try\"") >&5
2959   (eval $ac_try) 2>&5
2960   ac_status=$?
2961   echo "$as_me:2961: \$? = $ac_status" >&5
2962   (exit $ac_status); }; }; then
2963   :
2964 else
2965   echo "$as_me: failed program was:" >&5
2966 cat conftest.$ac_ext >&5
2967 continue
2968 fi
2969 rm -f conftest.$ac_objext conftest.$ac_ext
2970   cat >conftest.$ac_ext <<_ACEOF
2971 #line 2971 "configure"
2972 #include "confdefs.h"
2973 $ac_declaration
2974 int
2975 main ()
2976 {
2977 exit (42);
2978   ;
2979   return 0;
2980 }
2981 _ACEOF
2982 rm -f conftest.$ac_objext
2983 if { (eval echo "$as_me:2983: \"$ac_compile\"") >&5
2984   (eval $ac_compile) 2>&5
2985   ac_status=$?
2986   echo "$as_me:2986: \$? = $ac_status" >&5
2987   (exit $ac_status); } &&
2988          { ac_try='test -s conftest.$ac_objext'
2989   { (eval echo "$as_me:2989: \"$ac_try\"") >&5
2990   (eval $ac_try) 2>&5
2991   ac_status=$?
2992   echo "$as_me:2992: \$? = $ac_status" >&5
2993   (exit $ac_status); }; }; then
2994   break
2995 else
2996   echo "$as_me: failed program was:" >&5
2997 cat conftest.$ac_ext >&5
2998 fi
2999 rm -f conftest.$ac_objext conftest.$ac_ext
3000 done
3001 rm -f conftest*
3002 if test -n "$ac_declaration"; then
3003   echo '#ifdef __cplusplus' >>confdefs.h
3004   echo $ac_declaration      >>confdefs.h
3005   echo '#endif'             >>confdefs.h
3006 fi
3007
3008 ac_ext=c
3009 ac_cpp='$CPP $CPPFLAGS'
3010 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3011 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3012 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3013 ac_main_return=return
3014
3015                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3016         if test "$CXX" = "g++" ; then
3017                 # Extract the first word of "g++", so it can be a program name with args.
3018 set dummy g++; ac_word=$2
3019 echo "$as_me:3019: checking for $ac_word" >&5
3020 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3021 if test "${ac_cv_path_CXX+set}" = set; then
3022   echo $ECHO_N "(cached) $ECHO_C" >&6
3023 else
3024   case $CXX in
3025   [\\/]* | ?:[\\/]*)
3026   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3027   ;;
3028   *)
3029   ac_save_IFS=$IFS; IFS=$ac_path_separator
3030 ac_dummy="$PATH"
3031 for ac_dir in $ac_dummy; do
3032   IFS=$ac_save_IFS
3033   test -z "$ac_dir" && ac_dir=.
3034   if $as_executable_p "$ac_dir/$ac_word"; then
3035    ac_cv_path_CXX="$ac_dir/$ac_word"
3036    echo "$as_me:3036: found $ac_dir/$ac_word" >&5
3037    break
3038 fi
3039 done
3040
3041   ;;
3042 esac
3043 fi
3044 CXX=$ac_cv_path_CXX
3045
3046 if test -n "$CXX"; then
3047   echo "$as_me:3047: result: $CXX" >&5
3048 echo "${ECHO_T}$CXX" >&6
3049 else
3050   echo "$as_me:3050: result: no" >&5
3051 echo "${ECHO_T}no" >&6
3052 fi
3053
3054         fi
3055         if test "$CXX" = "g++" ; then
3056                 { echo "$as_me:3056: WARNING: ignoring hardcoded g++" >&5
3057 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3058                 cf_with_cxx=no; CXX=""; GXX="";
3059         fi
3060 fi
3061
3062 GXX_VERSION=none
3063 if test "$GXX" = yes; then
3064         echo "$as_me:3064: checking version of g++" >&5
3065 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3066         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3067         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3068         echo "$as_me:3068: result: $GXX_VERSION" >&5
3069 echo "${ECHO_T}$GXX_VERSION" >&6
3070 fi
3071
3072 case $GXX_VERSION in
3073 1*|2.[0-6]*)
3074         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3075         # cf_cxx_library=no
3076         { echo "$as_me:3076: WARNING: templates do not work" >&5
3077 echo "$as_me: WARNING: templates do not work" >&2;}
3078         ;;
3079 esac
3080
3081 echo "$as_me:3081: checking if you want to build C++ binding and demo" >&5
3082 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3083
3084 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3085 if test "${with_cxx_binding+set}" = set; then
3086   withval="$with_cxx_binding"
3087   cf_with_cxx_binding=$withval
3088 else
3089   cf_with_cxx_binding=$cf_with_cxx
3090 fi;
3091 echo "$as_me:3091: result: $cf_with_cxx_binding" >&5
3092 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3093
3094 echo "$as_me:3094: checking if you want to build with Ada95" >&5
3095 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3096
3097 # Check whether --with-ada or --without-ada was given.
3098 if test "${with_ada+set}" = set; then
3099   withval="$with_ada"
3100   cf_with_ada=$withval
3101 else
3102   cf_with_ada=yes
3103 fi;
3104 echo "$as_me:3104: result: $cf_with_ada" >&5
3105 echo "${ECHO_T}$cf_with_ada" >&6
3106
3107 echo "$as_me:3107: checking if you want to build programs such as tic" >&5
3108 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3109
3110 # Check whether --with-progs or --without-progs was given.
3111 if test "${with_progs+set}" = set; then
3112   withval="$with_progs"
3113   cf_with_progs=$withval
3114 else
3115   cf_with_progs=yes
3116 fi;
3117 echo "$as_me:3117: result: $cf_with_progs" >&5
3118 echo "${ECHO_T}$cf_with_progs" >&6
3119
3120 echo "$as_me:3120: checking if you wish to install curses.h" >&5
3121 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3122
3123 # Check whether --with-curses-h or --without-curses-h was given.
3124 if test "${with_curses_h+set}" = set; then
3125   withval="$with_curses_h"
3126   with_curses_h=$withval
3127 else
3128   with_curses_h=yes
3129 fi;
3130 echo "$as_me:3130: result: $with_curses_h" >&5
3131 echo "${ECHO_T}$with_curses_h" >&6
3132
3133 modules_to_build="ncurses"
3134 if test "X$cf_with_progs" != Xno ; then
3135 modules_to_build="$modules_to_build progs tack"
3136 fi
3137 modules_to_build="$modules_to_build panel menu form"
3138
3139 test "$program_prefix" != NONE &&
3140   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3141 # Use a double $ so make ignores it.
3142 test "$program_suffix" != NONE &&
3143   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3144 # Double any \ or $.  echo might interpret backslashes.
3145 # By default was `s,x,x', remove it if useless.
3146 cat <<\_ACEOF >conftest.sed
3147 s/[\\$]/&&/g;s/;s,x,x,$//
3148 _ACEOF
3149 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3150 rm conftest.sed
3151
3152 for ac_prog in mawk gawk nawk awk
3153 do
3154   # Extract the first word of "$ac_prog", so it can be a program name with args.
3155 set dummy $ac_prog; ac_word=$2
3156 echo "$as_me:3156: checking for $ac_word" >&5
3157 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3158 if test "${ac_cv_prog_AWK+set}" = set; then
3159   echo $ECHO_N "(cached) $ECHO_C" >&6
3160 else
3161   if test -n "$AWK"; then
3162   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3163 else
3164   ac_save_IFS=$IFS; IFS=$ac_path_separator
3165 ac_dummy="$PATH"
3166 for ac_dir in $ac_dummy; do
3167   IFS=$ac_save_IFS
3168   test -z "$ac_dir" && ac_dir=.
3169   $as_executable_p "$ac_dir/$ac_word" || continue
3170 ac_cv_prog_AWK="$ac_prog"
3171 echo "$as_me:3171: found $ac_dir/$ac_word" >&5
3172 break
3173 done
3174
3175 fi
3176 fi
3177 AWK=$ac_cv_prog_AWK
3178 if test -n "$AWK"; then
3179   echo "$as_me:3179: result: $AWK" >&5
3180 echo "${ECHO_T}$AWK" >&6
3181 else
3182   echo "$as_me:3182: result: no" >&5
3183 echo "${ECHO_T}no" >&6
3184 fi
3185
3186   test -n "$AWK" && break
3187 done
3188
3189 test -z "$AWK" && { { echo "$as_me:3189: error: No awk program found" >&5
3190 echo "$as_me: error: No awk program found" >&2;}
3191    { (exit 1); exit 1; }; }
3192
3193 echo "$as_me:3193: checking for egrep" >&5
3194 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3195 if test "${ac_cv_prog_egrep+set}" = set; then
3196   echo $ECHO_N "(cached) $ECHO_C" >&6
3197 else
3198   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3199     then ac_cv_prog_egrep='grep -E'
3200     else ac_cv_prog_egrep='egrep'
3201     fi
3202 fi
3203 echo "$as_me:3203: result: $ac_cv_prog_egrep" >&5
3204 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3205  EGREP=$ac_cv_prog_egrep
3206
3207 test -z "$EGREP" && { { echo "$as_me:3207: error: No egrep program found" >&5
3208 echo "$as_me: error: No egrep program found" >&2;}
3209    { (exit 1); exit 1; }; }
3210
3211 # Find a good install program.  We prefer a C program (faster),
3212 # so one script is as good as another.  But avoid the broken or
3213 # incompatible versions:
3214 # SysV /etc/install, /usr/sbin/install
3215 # SunOS /usr/etc/install
3216 # IRIX /sbin/install
3217 # AIX /bin/install
3218 # AmigaOS /C/install, which installs bootblocks on floppy discs
3219 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3220 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3221 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3222 # ./install, which can be erroneously created by make from ./install.sh.
3223 echo "$as_me:3223: checking for a BSD compatible install" >&5
3224 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3225 if test -z "$INSTALL"; then
3226 if test "${ac_cv_path_install+set}" = set; then
3227   echo $ECHO_N "(cached) $ECHO_C" >&6
3228 else
3229     ac_save_IFS=$IFS; IFS=$ac_path_separator
3230   for ac_dir in $PATH; do
3231     IFS=$ac_save_IFS
3232     # Account for people who put trailing slashes in PATH elements.
3233     case $ac_dir/ in
3234     / | ./ | .// | /cC/* \
3235     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3236     | /usr/ucb/* ) ;;
3237     *)
3238       # OSF1 and SCO ODT 3.0 have their own names for install.
3239       # Don't use installbsd from OSF since it installs stuff as root
3240       # by default.
3241       for ac_prog in ginstall scoinst install; do
3242         if $as_executable_p "$ac_dir/$ac_prog"; then
3243           if test $ac_prog = install &&
3244             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3245             # AIX install.  It has an incompatible calling convention.
3246             :
3247           elif test $ac_prog = install &&
3248             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3249             # program-specific install script used by HP pwplus--don't use.
3250             :
3251           else
3252             ac_cv_path_install="$ac_dir/$ac_prog -c"
3253             break 2
3254           fi
3255         fi
3256       done
3257       ;;
3258     esac
3259   done
3260
3261 fi
3262   if test "${ac_cv_path_install+set}" = set; then
3263     INSTALL=$ac_cv_path_install
3264   else
3265     # As a last resort, use the slow shell script.  We don't cache a
3266     # path for INSTALL within a source directory, because that will
3267     # break other packages using the cache if that directory is
3268     # removed, or if the path is relative.
3269     INSTALL=$ac_install_sh
3270   fi
3271 fi
3272 echo "$as_me:3272: result: $INSTALL" >&5
3273 echo "${ECHO_T}$INSTALL" >&6
3274
3275 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3276 # It thinks the first close brace ends the variable substitution.
3277 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3278
3279 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3280
3281 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3282
3283 case $INSTALL in
3284 /*)
3285   ;;
3286 *)
3287   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3288   test -z "$cf_dir" && cf_dir=.
3289   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3290   ;;
3291 esac
3292
3293 for ac_prog in tdlint lint alint
3294 do
3295   # Extract the first word of "$ac_prog", so it can be a program name with args.
3296 set dummy $ac_prog; ac_word=$2
3297 echo "$as_me:3297: checking for $ac_word" >&5
3298 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3299 if test "${ac_cv_prog_LINT+set}" = set; then
3300   echo $ECHO_N "(cached) $ECHO_C" >&6
3301 else
3302   if test -n "$LINT"; then
3303   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3304 else
3305   ac_save_IFS=$IFS; IFS=$ac_path_separator
3306 ac_dummy="$PATH"
3307 for ac_dir in $ac_dummy; do
3308   IFS=$ac_save_IFS
3309   test -z "$ac_dir" && ac_dir=.
3310   $as_executable_p "$ac_dir/$ac_word" || continue
3311 ac_cv_prog_LINT="$ac_prog"
3312 echo "$as_me:3312: found $ac_dir/$ac_word" >&5
3313 break
3314 done
3315
3316 fi
3317 fi
3318 LINT=$ac_cv_prog_LINT
3319 if test -n "$LINT"; then
3320   echo "$as_me:3320: result: $LINT" >&5
3321 echo "${ECHO_T}$LINT" >&6
3322 else
3323   echo "$as_me:3323: result: no" >&5
3324 echo "${ECHO_T}no" >&6
3325 fi
3326
3327   test -n "$LINT" && break
3328 done
3329
3330 echo "$as_me:3330: checking whether ln -s works" >&5
3331 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3332 LN_S=$as_ln_s
3333 if test "$LN_S" = "ln -s"; then
3334   echo "$as_me:3334: result: yes" >&5
3335 echo "${ECHO_T}yes" >&6
3336 else
3337   echo "$as_me:3337: result: no, using $LN_S" >&5
3338 echo "${ECHO_T}no, using $LN_S" >&6
3339 fi
3340
3341 echo "$as_me:3341: checking whether ${MAKE-make} sets \${MAKE}" >&5
3342 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3343 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3344 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3345   echo $ECHO_N "(cached) $ECHO_C" >&6
3346 else
3347   cat >conftest.make <<\EOF
3348 all:
3349         @echo 'ac_maketemp="${MAKE}"'
3350 EOF
3351 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3352 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3353 if test -n "$ac_maketemp"; then
3354   eval ac_cv_prog_make_${ac_make}_set=yes
3355 else
3356   eval ac_cv_prog_make_${ac_make}_set=no
3357 fi
3358 rm -f conftest.make
3359 fi
3360 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3361   echo "$as_me:3361: result: yes" >&5
3362 echo "${ECHO_T}yes" >&6
3363   SET_MAKE=
3364 else
3365   echo "$as_me:3365: result: no" >&5
3366 echo "${ECHO_T}no" >&6
3367   SET_MAKE="MAKE=${MAKE-make}"
3368 fi
3369
3370 echo "$as_me:3370: checking if filesystem supports mixed-case filenames" >&5
3371 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3372 if test "${cf_cv_mixedcase+set}" = set; then
3373   echo $ECHO_N "(cached) $ECHO_C" >&6
3374 else
3375
3376 if test "$cross_compiling" = yes ; then
3377         case $target_alias in #(vi
3378         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3379                 cf_cv_mixedcase=no
3380                 ;;
3381         *)
3382                 cf_cv_mixedcase=yes
3383                 ;;
3384         esac
3385 else
3386         rm -f conftest CONFTEST
3387         echo test >conftest
3388         if test -f CONFTEST ; then
3389                 cf_cv_mixedcase=no
3390         else
3391                 cf_cv_mixedcase=yes
3392         fi
3393         rm -f conftest CONFTEST
3394 fi
3395
3396 fi
3397 echo "$as_me:3397: result: $cf_cv_mixedcase" >&5
3398 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3399 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3400 #define MIXEDCASE_FILENAMES 1
3401 EOF
3402
3403 # Extract the first word of "ctags", so it can be a program name with args.
3404 set dummy ctags; ac_word=$2
3405 echo "$as_me:3405: checking for $ac_word" >&5
3406 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3407 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3408   echo $ECHO_N "(cached) $ECHO_C" >&6
3409 else
3410   if test -n "$MAKE_LOWER_TAGS"; then
3411   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3412 else
3413   ac_save_IFS=$IFS; IFS=$ac_path_separator
3414 ac_dummy="$PATH"
3415 for ac_dir in $ac_dummy; do
3416   IFS=$ac_save_IFS
3417   test -z "$ac_dir" && ac_dir=.
3418   $as_executable_p "$ac_dir/$ac_word" || continue
3419 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3420 echo "$as_me:3420: found $ac_dir/$ac_word" >&5
3421 break
3422 done
3423
3424   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3425 fi
3426 fi
3427 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3428 if test -n "$MAKE_LOWER_TAGS"; then
3429   echo "$as_me:3429: result: $MAKE_LOWER_TAGS" >&5
3430 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3431 else
3432   echo "$as_me:3432: result: no" >&5
3433 echo "${ECHO_T}no" >&6
3434 fi
3435
3436 if test "$cf_cv_mixedcase" = yes ; then
3437         # Extract the first word of "etags", so it can be a program name with args.
3438 set dummy etags; ac_word=$2
3439 echo "$as_me:3439: checking for $ac_word" >&5
3440 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3441 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3442   echo $ECHO_N "(cached) $ECHO_C" >&6
3443 else
3444   if test -n "$MAKE_UPPER_TAGS"; then
3445   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3446 else
3447   ac_save_IFS=$IFS; IFS=$ac_path_separator
3448 ac_dummy="$PATH"
3449 for ac_dir in $ac_dummy; do
3450   IFS=$ac_save_IFS
3451   test -z "$ac_dir" && ac_dir=.
3452   $as_executable_p "$ac_dir/$ac_word" || continue
3453 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3454 echo "$as_me:3454: found $ac_dir/$ac_word" >&5
3455 break
3456 done
3457
3458   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3459 fi
3460 fi
3461 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3462 if test -n "$MAKE_UPPER_TAGS"; then
3463   echo "$as_me:3463: result: $MAKE_UPPER_TAGS" >&5
3464 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3465 else
3466   echo "$as_me:3466: result: no" >&5
3467 echo "${ECHO_T}no" >&6
3468 fi
3469
3470 else
3471         MAKE_UPPER_TAGS=no
3472 fi
3473
3474 if test "$MAKE_UPPER_TAGS" = yes ; then
3475         MAKE_UPPER_TAGS=
3476 else
3477         MAKE_UPPER_TAGS="#"
3478 fi
3479
3480 if test "$MAKE_LOWER_TAGS" = yes ; then
3481         MAKE_LOWER_TAGS=
3482 else
3483         MAKE_LOWER_TAGS="#"
3484 fi
3485
3486 echo "$as_me:3486: checking for makeflags variable" >&5
3487 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3488 if test "${cf_cv_makeflags+set}" = set; then
3489   echo $ECHO_N "(cached) $ECHO_C" >&6
3490 else
3491
3492         cf_cv_makeflags=''
3493         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3494         do
3495                 cat >cf_makeflags.tmp <<CF_EOF
3496 SHELL = /bin/sh
3497 all :
3498         @ echo '.$cf_option'
3499 CF_EOF
3500                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3501                 case "$cf_result" in
3502                 .*k)
3503                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3504                         case "$cf_result" in
3505                         .*CC=*) cf_cv_makeflags=
3506                                 ;;
3507                         *)      cf_cv_makeflags=$cf_option
3508                                 ;;
3509                         esac
3510                         break
3511                         ;;
3512                 .-)     ;;
3513                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3514                         ;;
3515                 esac
3516         done
3517         rm -f cf_makeflags.tmp
3518
3519 fi
3520 echo "$as_me:3520: result: $cf_cv_makeflags" >&5
3521 echo "${ECHO_T}$cf_cv_makeflags" >&6
3522
3523 echo "$as_me:3523: checking for long file names" >&5
3524 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3525 if test "${ac_cv_sys_long_file_names+set}" = set; then
3526   echo $ECHO_N "(cached) $ECHO_C" >&6
3527 else
3528   ac_cv_sys_long_file_names=yes
3529 # Test for long file names in all the places we know might matter:
3530 #      .                the current directory, where building will happen
3531 #      $prefix/lib      where we will be installing things
3532 #      $exec_prefix/lib likewise
3533 # eval it to expand exec_prefix.
3534 #      $TMPDIR          if set, where it might want to write temporary files
3535 # if $TMPDIR is not set:
3536 #      /tmp             where it might want to write temporary files
3537 #      /var/tmp         likewise
3538 #      /usr/tmp         likewise
3539 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3540   ac_tmpdirs=$TMPDIR
3541 else
3542   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3543 fi
3544 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3545   test -d $ac_dir || continue
3546   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3547   ac_xdir=$ac_dir/cf$$
3548   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3549   ac_tf1=$ac_xdir/conftest9012345
3550   ac_tf2=$ac_xdir/conftest9012346
3551   (echo 1 >$ac_tf1) 2>/dev/null
3552   (echo 2 >$ac_tf2) 2>/dev/null
3553   ac_val=`cat $ac_tf1 2>/dev/null`
3554   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3555     ac_cv_sys_long_file_names=no
3556     rm -rf $ac_xdir 2>/dev/null
3557     break
3558   fi
3559   rm -rf $ac_xdir 2>/dev/null
3560 done
3561 fi
3562 echo "$as_me:3562: result: $ac_cv_sys_long_file_names" >&5
3563 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3564 if test $ac_cv_sys_long_file_names = yes; then
3565
3566 cat >>confdefs.h <<\EOF
3567 #define HAVE_LONG_FILE_NAMES 1
3568 EOF
3569
3570 fi
3571
3572 echo "$as_me:3572: checking if filesystem supports mixed-case filenames" >&5
3573 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3574 if test "${cf_cv_mixedcase+set}" = set; then
3575   echo $ECHO_N "(cached) $ECHO_C" >&6
3576 else
3577
3578 if test "$cross_compiling" = yes ; then
3579         case $target_alias in #(vi
3580         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3581                 cf_cv_mixedcase=no
3582                 ;;
3583         *)
3584                 cf_cv_mixedcase=yes
3585                 ;;
3586         esac
3587 else
3588         rm -f conftest CONFTEST
3589         echo test >conftest
3590         if test -f CONFTEST ; then
3591                 cf_cv_mixedcase=no
3592         else
3593                 cf_cv_mixedcase=yes
3594         fi
3595         rm -f conftest CONFTEST
3596 fi
3597
3598 fi
3599 echo "$as_me:3599: result: $cf_cv_mixedcase" >&5
3600 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3601 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3602 #define MIXEDCASE_FILENAMES 1
3603 EOF
3604
3605 if test -n "$ac_tool_prefix"; then
3606   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3607 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3608 echo "$as_me:3608: checking for $ac_word" >&5
3609 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3610 if test "${ac_cv_prog_RANLIB+set}" = set; then
3611   echo $ECHO_N "(cached) $ECHO_C" >&6
3612 else
3613   if test -n "$RANLIB"; then
3614   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3615 else
3616   ac_save_IFS=$IFS; IFS=$ac_path_separator
3617 ac_dummy="$PATH"
3618 for ac_dir in $ac_dummy; do
3619   IFS=$ac_save_IFS
3620   test -z "$ac_dir" && ac_dir=.
3621   $as_executable_p "$ac_dir/$ac_word" || continue
3622 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3623 echo "$as_me:3623: found $ac_dir/$ac_word" >&5
3624 break
3625 done
3626
3627 fi
3628 fi
3629 RANLIB=$ac_cv_prog_RANLIB
3630 if test -n "$RANLIB"; then
3631   echo "$as_me:3631: result: $RANLIB" >&5
3632 echo "${ECHO_T}$RANLIB" >&6
3633 else
3634   echo "$as_me:3634: result: no" >&5
3635 echo "${ECHO_T}no" >&6
3636 fi
3637
3638 fi
3639 if test -z "$ac_cv_prog_RANLIB"; then
3640   ac_ct_RANLIB=$RANLIB
3641   # Extract the first word of "ranlib", so it can be a program name with args.
3642 set dummy ranlib; ac_word=$2
3643 echo "$as_me:3643: checking for $ac_word" >&5
3644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3645 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3646   echo $ECHO_N "(cached) $ECHO_C" >&6
3647 else
3648   if test -n "$ac_ct_RANLIB"; then
3649   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3650 else
3651   ac_save_IFS=$IFS; IFS=$ac_path_separator
3652 ac_dummy="$PATH"
3653 for ac_dir in $ac_dummy; do
3654   IFS=$ac_save_IFS
3655   test -z "$ac_dir" && ac_dir=.
3656   $as_executable_p "$ac_dir/$ac_word" || continue
3657 ac_cv_prog_ac_ct_RANLIB="ranlib"
3658 echo "$as_me:3658: found $ac_dir/$ac_word" >&5
3659 break
3660 done
3661
3662   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3663 fi
3664 fi
3665 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3666 if test -n "$ac_ct_RANLIB"; then
3667   echo "$as_me:3667: result: $ac_ct_RANLIB" >&5
3668 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3669 else
3670   echo "$as_me:3670: result: no" >&5
3671 echo "${ECHO_T}no" >&6
3672 fi
3673
3674   RANLIB=$ac_ct_RANLIB
3675 else
3676   RANLIB="$ac_cv_prog_RANLIB"
3677 fi
3678
3679 if test -n "$ac_tool_prefix"; then
3680   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3681 set dummy ${ac_tool_prefix}ld; ac_word=$2
3682 echo "$as_me:3682: checking for $ac_word" >&5
3683 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3684 if test "${ac_cv_prog_LD+set}" = set; then
3685   echo $ECHO_N "(cached) $ECHO_C" >&6
3686 else
3687   if test -n "$LD"; then
3688   ac_cv_prog_LD="$LD" # Let the user override the test.
3689 else
3690   ac_save_IFS=$IFS; IFS=$ac_path_separator
3691 ac_dummy="$PATH"
3692 for ac_dir in $ac_dummy; do
3693   IFS=$ac_save_IFS
3694   test -z "$ac_dir" && ac_dir=.
3695   $as_executable_p "$ac_dir/$ac_word" || continue
3696 ac_cv_prog_LD="${ac_tool_prefix}ld"
3697 echo "$as_me:3697: found $ac_dir/$ac_word" >&5
3698 break
3699 done
3700
3701 fi
3702 fi
3703 LD=$ac_cv_prog_LD
3704 if test -n "$LD"; then
3705   echo "$as_me:3705: result: $LD" >&5
3706 echo "${ECHO_T}$LD" >&6
3707 else
3708   echo "$as_me:3708: result: no" >&5
3709 echo "${ECHO_T}no" >&6
3710 fi
3711
3712 fi
3713 if test -z "$ac_cv_prog_LD"; then
3714   ac_ct_LD=$LD
3715   # Extract the first word of "ld", so it can be a program name with args.
3716 set dummy ld; ac_word=$2
3717 echo "$as_me:3717: checking for $ac_word" >&5
3718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3719 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3720   echo $ECHO_N "(cached) $ECHO_C" >&6
3721 else
3722   if test -n "$ac_ct_LD"; then
3723   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3724 else
3725   ac_save_IFS=$IFS; IFS=$ac_path_separator
3726 ac_dummy="$PATH"
3727 for ac_dir in $ac_dummy; do
3728   IFS=$ac_save_IFS
3729   test -z "$ac_dir" && ac_dir=.
3730   $as_executable_p "$ac_dir/$ac_word" || continue
3731 ac_cv_prog_ac_ct_LD="ld"
3732 echo "$as_me:3732: found $ac_dir/$ac_word" >&5
3733 break
3734 done
3735
3736   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3737 fi
3738 fi
3739 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3740 if test -n "$ac_ct_LD"; then
3741   echo "$as_me:3741: result: $ac_ct_LD" >&5
3742 echo "${ECHO_T}$ac_ct_LD" >&6
3743 else
3744   echo "$as_me:3744: result: no" >&5
3745 echo "${ECHO_T}no" >&6
3746 fi
3747
3748   LD=$ac_ct_LD
3749 else
3750   LD="$ac_cv_prog_LD"
3751 fi
3752
3753 if test -n "$ac_tool_prefix"; then
3754   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3755 set dummy ${ac_tool_prefix}ar; ac_word=$2
3756 echo "$as_me:3756: checking for $ac_word" >&5
3757 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3758 if test "${ac_cv_prog_AR+set}" = set; then
3759   echo $ECHO_N "(cached) $ECHO_C" >&6
3760 else
3761   if test -n "$AR"; then
3762   ac_cv_prog_AR="$AR" # Let the user override the test.
3763 else
3764   ac_save_IFS=$IFS; IFS=$ac_path_separator
3765 ac_dummy="$PATH"
3766 for ac_dir in $ac_dummy; do
3767   IFS=$ac_save_IFS
3768   test -z "$ac_dir" && ac_dir=.
3769   $as_executable_p "$ac_dir/$ac_word" || continue
3770 ac_cv_prog_AR="${ac_tool_prefix}ar"
3771 echo "$as_me:3771: found $ac_dir/$ac_word" >&5
3772 break
3773 done
3774
3775 fi
3776 fi
3777 AR=$ac_cv_prog_AR
3778 if test -n "$AR"; then
3779   echo "$as_me:3779: result: $AR" >&5
3780 echo "${ECHO_T}$AR" >&6
3781 else
3782   echo "$as_me:3782: result: no" >&5
3783 echo "${ECHO_T}no" >&6
3784 fi
3785
3786 fi
3787 if test -z "$ac_cv_prog_AR"; then
3788   ac_ct_AR=$AR
3789   # Extract the first word of "ar", so it can be a program name with args.
3790 set dummy ar; ac_word=$2
3791 echo "$as_me:3791: checking for $ac_word" >&5
3792 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3793 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3794   echo $ECHO_N "(cached) $ECHO_C" >&6
3795 else
3796   if test -n "$ac_ct_AR"; then
3797   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3798 else
3799   ac_save_IFS=$IFS; IFS=$ac_path_separator
3800 ac_dummy="$PATH"
3801 for ac_dir in $ac_dummy; do
3802   IFS=$ac_save_IFS
3803   test -z "$ac_dir" && ac_dir=.
3804   $as_executable_p "$ac_dir/$ac_word" || continue
3805 ac_cv_prog_ac_ct_AR="ar"
3806 echo "$as_me:3806: found $ac_dir/$ac_word" >&5
3807 break
3808 done
3809
3810   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3811 fi
3812 fi
3813 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3814 if test -n "$ac_ct_AR"; then
3815   echo "$as_me:3815: result: $ac_ct_AR" >&5
3816 echo "${ECHO_T}$ac_ct_AR" >&6
3817 else
3818   echo "$as_me:3818: result: no" >&5
3819 echo "${ECHO_T}no" >&6
3820 fi
3821
3822   AR=$ac_ct_AR
3823 else
3824   AR="$ac_cv_prog_AR"
3825 fi
3826
3827 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3828   echo $ECHO_N "(cached) $ECHO_C" >&6
3829 else
3830
3831 echo "$as_me:3831: checking for archiver options (symbol AR_OPTS)" >&5
3832 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3833
3834 if test -z "$AR_OPTS" ; then
3835         AR_OPTS=rv
3836
3837 fi
3838
3839 cf_cv_subst_AR_OPTS=$AR_OPTS
3840 echo "$as_me:3840: result: $AR_OPTS" >&5
3841 echo "${ECHO_T}$AR_OPTS" >&6
3842
3843 fi
3844
3845 echo "$as_me:3845: checking if you have specified an install-prefix" >&5
3846 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3847
3848 # Check whether --with-install-prefix or --without-install-prefix was given.
3849 if test "${with_install_prefix+set}" = set; then
3850   withval="$with_install_prefix"
3851   case "$withval" in #(vi
3852         yes|no) #(vi
3853                 ;;
3854         *)      DESTDIR="$withval"
3855                 ;;
3856         esac
3857 fi;
3858 echo "$as_me:3858: result: $DESTDIR" >&5
3859 echo "${ECHO_T}$DESTDIR" >&6
3860
3861 ###############################################################################
3862
3863 # If we're cross-compiling, allow the user to override the tools and their
3864 # options.  The configure script is oriented toward identifying the host
3865 # compiler, etc., but we need a build compiler to generate parts of the source.
3866
3867 if test "$cross_compiling" = yes ; then
3868
3869         # defaults that we might want to override
3870         : ${BUILD_CFLAGS:=''}
3871         : ${BUILD_CPPFLAGS:=''}
3872         : ${BUILD_LDFLAGS:=''}
3873         : ${BUILD_LIBS:=''}
3874         : ${BUILD_EXEEXT:='$x'}
3875         : ${BUILD_OBJEXT:='o'}
3876
3877 # Check whether --with-build-cc or --without-build-cc was given.
3878 if test "${with_build_cc+set}" = set; then
3879   withval="$with_build_cc"
3880   BUILD_CC="$withval"
3881 else
3882   for ac_prog in gcc cc cl
3883 do
3884   # Extract the first word of "$ac_prog", so it can be a program name with args.
3885 set dummy $ac_prog; ac_word=$2
3886 echo "$as_me:3886: checking for $ac_word" >&5
3887 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3888 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3889   echo $ECHO_N "(cached) $ECHO_C" >&6
3890 else
3891   if test -n "$BUILD_CC"; then
3892   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3893 else
3894   ac_save_IFS=$IFS; IFS=$ac_path_separator
3895 ac_dummy="$PATH"
3896 for ac_dir in $ac_dummy; do
3897   IFS=$ac_save_IFS
3898   test -z "$ac_dir" && ac_dir=.
3899   $as_executable_p "$ac_dir/$ac_word" || continue
3900 ac_cv_prog_BUILD_CC="$ac_prog"
3901 echo "$as_me:3901: found $ac_dir/$ac_word" >&5
3902 break
3903 done
3904
3905 fi
3906 fi
3907 BUILD_CC=$ac_cv_prog_BUILD_CC
3908 if test -n "$BUILD_CC"; then
3909   echo "$as_me:3909: result: $BUILD_CC" >&5
3910 echo "${ECHO_T}$BUILD_CC" >&6
3911 else
3912   echo "$as_me:3912: result: no" >&5
3913 echo "${ECHO_T}no" >&6
3914 fi
3915
3916   test -n "$BUILD_CC" && break
3917 done
3918
3919 fi;
3920         echo "$as_me:3920: checking for native build C compiler" >&5
3921 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3922         echo "$as_me:3922: result: $BUILD_CC" >&5
3923 echo "${ECHO_T}$BUILD_CC" >&6
3924
3925         echo "$as_me:3925: checking for native build C preprocessor" >&5
3926 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3927
3928 # Check whether --with-build-cpp or --without-build-cpp was given.
3929 if test "${with_build_cpp+set}" = set; then
3930   withval="$with_build_cpp"
3931   BUILD_CPP="$withval"
3932 else
3933   BUILD_CPP='${BUILD_CC} -E'
3934 fi;
3935         echo "$as_me:3935: result: $BUILD_CPP" >&5
3936 echo "${ECHO_T}$BUILD_CPP" >&6
3937
3938         echo "$as_me:3938: checking for native build C flags" >&5
3939 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3940
3941 # Check whether --with-build-cflags or --without-build-cflags was given.
3942 if test "${with_build_cflags+set}" = set; then
3943   withval="$with_build_cflags"
3944   BUILD_CFLAGS="$withval"
3945 fi;
3946         echo "$as_me:3946: result: $BUILD_CFLAGS" >&5
3947 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3948
3949         echo "$as_me:3949: checking for native build C preprocessor-flags" >&5
3950 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3951
3952 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3953 if test "${with_build_cppflags+set}" = set; then
3954   withval="$with_build_cppflags"
3955   BUILD_CPPFLAGS="$withval"
3956 fi;
3957         echo "$as_me:3957: result: $BUILD_CPPFLAGS" >&5
3958 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3959
3960         echo "$as_me:3960: checking for native build linker-flags" >&5
3961 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3962
3963 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3964 if test "${with_build_ldflags+set}" = set; then
3965   withval="$with_build_ldflags"
3966   BUILD_LDFLAGS="$withval"
3967 fi;
3968         echo "$as_me:3968: result: $BUILD_LDFLAGS" >&5
3969 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3970
3971         echo "$as_me:3971: checking for native build linker-libraries" >&5
3972 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3973
3974 # Check whether --with-build-libs or --without-build-libs was given.
3975 if test "${with_build_libs+set}" = set; then
3976   withval="$with_build_libs"
3977   BUILD_LIBS="$withval"
3978 fi;
3979         echo "$as_me:3979: result: $BUILD_LIBS" >&5
3980 echo "${ECHO_T}$BUILD_LIBS" >&6
3981
3982         # this assumes we're on Unix.
3983         BUILD_EXEEXT=
3984         BUILD_OBJEXT=o
3985
3986         : ${BUILD_CC:='${CC}'}
3987
3988         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3989                 { { echo "$as_me:3989: error: Cross-build requires two compilers.
3990 Use --with-build-cc to specify the native compiler." >&5
3991 echo "$as_me: error: Cross-build requires two compilers.
3992 Use --with-build-cc to specify the native compiler." >&2;}
3993    { (exit 1); exit 1; }; }
3994         fi
3995
3996 else
3997         : ${BUILD_CC:='${CC}'}
3998         : ${BUILD_CPP:='${CPP}'}
3999         : ${BUILD_CFLAGS:='${CFLAGS}'}
4000         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4001         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4002         : ${BUILD_LIBS:='${LIBS}'}
4003         : ${BUILD_EXEEXT:='$x'}
4004         : ${BUILD_OBJEXT:='o'}
4005 fi
4006
4007 ###############################################################################
4008
4009 ### Options to allow the user to specify the set of libraries which are used.
4010 ### Use "--without-normal --with-shared" to allow the default model to be
4011 ### shared, for example.
4012 cf_list_models=""
4013
4014 LIBTOOL=
4015
4016 # common library maintenance symbols that are convenient for libtool scripts:
4017 LIB_CREATE='${AR} -cr'
4018 LIB_OBJECT='${OBJECTS}'
4019 LIB_SUFFIX=.a
4020 LIB_PREP="$RANLIB"
4021
4022 # symbols used to prop libtool up to enable it to determine what it should be
4023 # doing:
4024 LIB_CLEAN=
4025 LIB_COMPILE=
4026 LIB_LINK=
4027 LIB_INSTALL=
4028 LIB_UNINSTALL=
4029
4030 echo "$as_me:4030: checking if you want to build libraries with libtool" >&5
4031 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4032
4033 # Check whether --with-libtool or --without-libtool was given.
4034 if test "${with_libtool+set}" = set; then
4035   withval="$with_libtool"
4036   with_libtool=$withval
4037 else
4038   with_libtool=no
4039 fi;
4040 echo "$as_me:4040: result: $with_libtool" >&5
4041 echo "${ECHO_T}$with_libtool" >&6
4042 if test "$with_libtool" != "no"; then
4043
4044         if test "$with_libtool" != "yes" ; then
4045
4046 if test "x$prefix" != xNONE; then
4047   cf_path_syntax="$prefix"
4048 else
4049   cf_path_syntax="$ac_default_prefix"
4050 fi
4051
4052 case ".$with_libtool" in #(vi
4053 .\$\(*\)*|.\'*\'*) #(vi
4054   ;;
4055 ..|./*|.\\*) #(vi
4056   ;;
4057 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4058   ;;
4059 .\${*prefix}*) #(vi
4060   eval with_libtool="$with_libtool"
4061   case ".$with_libtool" in #(vi
4062   .NONE/*)
4063     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4064     ;;
4065   esac
4066   ;; #(vi
4067 .no|.NONE/*)
4068   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4069   ;;
4070 *)
4071   { { echo "$as_me:4071: error: expected a pathname, not \"$with_libtool\"" >&5
4072 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4073    { (exit 1); exit 1; }; }
4074   ;;
4075 esac
4076
4077                 LIBTOOL=$with_libtool
4078         else
4079                 # Extract the first word of "libtool", so it can be a program name with args.
4080 set dummy libtool; ac_word=$2
4081 echo "$as_me:4081: checking for $ac_word" >&5
4082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4083 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4084   echo $ECHO_N "(cached) $ECHO_C" >&6
4085 else
4086   case $LIBTOOL in
4087   [\\/]* | ?:[\\/]*)
4088   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4089   ;;
4090   *)
4091   ac_save_IFS=$IFS; IFS=$ac_path_separator
4092 ac_dummy="$PATH"
4093 for ac_dir in $ac_dummy; do
4094   IFS=$ac_save_IFS
4095   test -z "$ac_dir" && ac_dir=.
4096   if $as_executable_p "$ac_dir/$ac_word"; then
4097    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4098    echo "$as_me:4098: found $ac_dir/$ac_word" >&5
4099    break
4100 fi
4101 done
4102
4103   ;;
4104 esac
4105 fi
4106 LIBTOOL=$ac_cv_path_LIBTOOL
4107
4108 if test -n "$LIBTOOL"; then
4109   echo "$as_me:4109: result: $LIBTOOL" >&5
4110 echo "${ECHO_T}$LIBTOOL" >&6
4111 else
4112   echo "$as_me:4112: result: no" >&5
4113 echo "${ECHO_T}no" >&6
4114 fi
4115
4116         fi
4117         if test -z "$LIBTOOL" ; then
4118                 { { echo "$as_me:4118: error: Cannot find libtool" >&5
4119 echo "$as_me: error: Cannot find libtool" >&2;}
4120    { (exit 1); exit 1; }; }
4121         fi
4122         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` -o'
4123         LIB_OBJECT='${OBJECTS}.o=.lo)'
4124         LIB_SUFFIX=.la
4125         LIB_CLEAN='${LIBTOOL} --mode=clean'
4126         LIB_COMPILE='${LIBTOOL} --mode=compile'
4127         LIB_LINK='${LIBTOOL} --mode=link'
4128         LIB_INSTALL='${LIBTOOL} --mode=install'
4129         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4130         LIB_PREP=:
4131
4132         # Show the version of libtool
4133         echo "$as_me:4133: checking version of libtool" >&5
4134 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4135
4136         # Save the version in a cache variable - this is not entirely a good
4137         # thing, but the version string from libtool is very ugly, and for
4138         # bug reports it might be useful to have the original string.
4139         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4140         echo "$as_me:4140: result: $cf_cv_libtool_version" >&5
4141 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4142         if test -z "$cf_cv_libtool_version" ; then
4143                 { { echo "$as_me:4143: error: This is not libtool" >&5
4144 echo "$as_me: error: This is not libtool" >&2;}
4145    { (exit 1); exit 1; }; }
4146         fi
4147
4148         # special hack to add --tag option for C++ compiler
4149         case $cf_cv_libtool_version in
4150         1.[5-9]*|[2-9]*)
4151                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4152                 ;;
4153         *)
4154                 LIBTOOL_CXX="$LIBTOOL"
4155                 ;;
4156         esac
4157 else
4158         LIBTOOL=""
4159         LIBTOOL_CXX=""
4160 fi
4161
4162 test -z "$LIBTOOL" && ECHO_LT=
4163
4164 if test "$with_libtool" != "no" ; then
4165
4166 cf_list_models="$cf_list_models libtool"
4167
4168 else
4169
4170 echo "$as_me:4170: checking if you want to build shared libraries" >&5
4171 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4172
4173 # Check whether --with-shared or --without-shared was given.
4174 if test "${with_shared+set}" = set; then
4175   withval="$with_shared"
4176   with_shared=$withval
4177 else
4178   with_shared=no
4179 fi;
4180 echo "$as_me:4180: result: $with_shared" >&5
4181 echo "${ECHO_T}$with_shared" >&6
4182 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4183
4184 echo "$as_me:4184: checking if you want to build static libraries" >&5
4185 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4186
4187 # Check whether --with-normal or --without-normal was given.
4188 if test "${with_normal+set}" = set; then
4189   withval="$with_normal"
4190   with_normal=$withval
4191 else
4192   with_normal=yes
4193 fi;
4194 echo "$as_me:4194: result: $with_normal" >&5
4195 echo "${ECHO_T}$with_normal" >&6
4196 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4197
4198 echo "$as_me:4198: checking if you want to build debug libraries" >&5
4199 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4200
4201 # Check whether --with-debug or --without-debug was given.
4202 if test "${with_debug+set}" = set; then
4203   withval="$with_debug"
4204   with_debug=$withval
4205 else
4206   with_debug=yes
4207 fi;
4208 echo "$as_me:4208: result: $with_debug" >&5
4209 echo "${ECHO_T}$with_debug" >&6
4210 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4211
4212 echo "$as_me:4212: checking if you want to build profiling libraries" >&5
4213 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4214
4215 # Check whether --with-profile or --without-profile was given.
4216 if test "${with_profile+set}" = set; then
4217   withval="$with_profile"
4218   with_profile=$withval
4219 else
4220   with_profile=no
4221 fi;
4222 echo "$as_me:4222: result: $with_profile" >&5
4223 echo "${ECHO_T}$with_profile" >&6
4224 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4225
4226 fi
4227
4228 ###############################################################################
4229
4230 echo "$as_me:4230: checking for specified models" >&5
4231 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4232 test -z "$cf_list_models" && cf_list_models=normal
4233 test "$with_libtool" != "no" && cf_list_models=libtool
4234 echo "$as_me:4234: result: $cf_list_models" >&5
4235 echo "${ECHO_T}$cf_list_models" >&6
4236
4237 ### Use the first model as the default, and save its suffix for use in building
4238 ### up test-applications.
4239 echo "$as_me:4239: checking for default model" >&5
4240 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4241 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4242 echo "$as_me:4242: result: $DFT_LWR_MODEL" >&5
4243 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4244
4245 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4246
4247 TINFO_NAME=tinfo
4248
4249 LIB_NAME=ncurses
4250
4251 LIB_DIR=../lib
4252 LIB_2ND=../../lib
4253
4254         case $cf_cv_system_name in
4255         OS/2*)  LIB_PREFIX=''     ;;
4256         os2*)   LIB_PREFIX=''     ;;
4257         *)      LIB_PREFIX='lib'  ;;
4258         esac
4259 cf_prefix=$LIB_PREFIX
4260
4261 LIB_PREFIX=$cf_prefix
4262
4263 LIB_SUFFIX=
4264
4265 ###############################################################################
4266
4267 echo "$as_me:4267: checking if you want to build a separate terminfo library" >&5
4268 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4269
4270 # Check whether --with-termlib or --without-termlib was given.
4271 if test "${with_termlib+set}" = set; then
4272   withval="$with_termlib"
4273   with_termlib=$withval
4274 else
4275   with_termlib=no
4276 fi;
4277 echo "$as_me:4277: result: $with_termlib" >&5
4278 echo "${ECHO_T}$with_termlib" >&6
4279
4280 ### Checks for special libraries, must be done up-front.
4281 SHLIB_LIST=""
4282
4283 echo "$as_me:4283: checking if you want to link with the GPM mouse library" >&5
4284 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4285
4286 # Check whether --with-gpm or --without-gpm was given.
4287 if test "${with_gpm+set}" = set; then
4288   withval="$with_gpm"
4289   with_gpm=$withval
4290 else
4291   with_gpm=maybe
4292 fi;
4293 echo "$as_me:4293: result: $with_gpm" >&5
4294 echo "${ECHO_T}$with_gpm" >&6
4295
4296 if test "$with_gpm" != no ; then
4297         echo "$as_me:4297: checking for gpm.h" >&5
4298 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4299 if test "${ac_cv_header_gpm_h+set}" = set; then
4300   echo $ECHO_N "(cached) $ECHO_C" >&6
4301 else
4302   cat >conftest.$ac_ext <<_ACEOF
4303 #line 4303 "configure"
4304 #include "confdefs.h"
4305 #include <gpm.h>
4306 _ACEOF
4307 if { (eval echo "$as_me:4307: \"$ac_cpp conftest.$ac_ext\"") >&5
4308   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4309   ac_status=$?
4310   egrep -v '^ *\+' conftest.er1 >conftest.err
4311   rm -f conftest.er1
4312   cat conftest.err >&5
4313   echo "$as_me:4313: \$? = $ac_status" >&5
4314   (exit $ac_status); } >/dev/null; then
4315   if test -s conftest.err; then
4316     ac_cpp_err=$ac_c_preproc_warn_flag
4317   else
4318     ac_cpp_err=
4319   fi
4320 else
4321   ac_cpp_err=yes
4322 fi
4323 if test -z "$ac_cpp_err"; then
4324   ac_cv_header_gpm_h=yes
4325 else
4326   echo "$as_me: failed program was:" >&5
4327   cat conftest.$ac_ext >&5
4328   ac_cv_header_gpm_h=no
4329 fi
4330 rm -f conftest.err conftest.$ac_ext
4331 fi
4332 echo "$as_me:4332: result: $ac_cv_header_gpm_h" >&5
4333 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4334 if test $ac_cv_header_gpm_h = yes; then
4335
4336                 cat >>confdefs.h <<\EOF
4337 #define HAVE_GPM_H 1
4338 EOF
4339
4340                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4341                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4342
4343                         cat >>confdefs.h <<\EOF
4344 #define HAVE_LIBGPM 1
4345 EOF
4346
4347                 else
4348                         echo "$as_me:4348: checking for Gpm_Open in -lgpm" >&5
4349 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4350 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4351   echo $ECHO_N "(cached) $ECHO_C" >&6
4352 else
4353   ac_check_lib_save_LIBS=$LIBS
4354 LIBS="-lgpm  $LIBS"
4355 cat >conftest.$ac_ext <<_ACEOF
4356 #line 4356 "configure"
4357 #include "confdefs.h"
4358
4359 /* Override any gcc2 internal prototype to avoid an error.  */
4360 #ifdef __cplusplus
4361 extern "C"
4362 #endif
4363 /* We use char because int might match the return type of a gcc2
4364    builtin and then its argument prototype would still apply.  */
4365 char Gpm_Open ();
4366 int
4367 main ()
4368 {
4369 Gpm_Open ();
4370   ;
4371   return 0;
4372 }
4373 _ACEOF
4374 rm -f conftest.$ac_objext conftest$ac_exeext
4375 if { (eval echo "$as_me:4375: \"$ac_link\"") >&5
4376   (eval $ac_link) 2>&5
4377   ac_status=$?
4378   echo "$as_me:4378: \$? = $ac_status" >&5
4379   (exit $ac_status); } &&
4380          { ac_try='test -s conftest$ac_exeext'
4381   { (eval echo "$as_me:4381: \"$ac_try\"") >&5
4382   (eval $ac_try) 2>&5
4383   ac_status=$?
4384   echo "$as_me:4384: \$? = $ac_status" >&5
4385   (exit $ac_status); }; }; then
4386   ac_cv_lib_gpm_Gpm_Open=yes
4387 else
4388   echo "$as_me: failed program was:" >&5
4389 cat conftest.$ac_ext >&5
4390 ac_cv_lib_gpm_Gpm_Open=no
4391 fi
4392 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4393 LIBS=$ac_check_lib_save_LIBS
4394 fi
4395 echo "$as_me:4395: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4396 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4397 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4398   :
4399 else
4400
4401                                 { { echo "$as_me:4401: error: Cannot link with GPM library" >&5
4402 echo "$as_me: error: Cannot link with GPM library" >&2;}
4403    { (exit 1); exit 1; }; }
4404                 fi
4405                 with_gpm=yes
4406
4407 fi
4408
4409 else
4410
4411                 test "$with_gpm" != maybe && { echo "$as_me:4411: WARNING: Cannot find GPM header" >&5
4412 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4413                 with_gpm=no
4414
4415 fi
4416
4417 fi
4418
4419 if test "$with_gpm" != no ; then
4420         echo "$as_me:4420: checking if you want to load GPM dynamically" >&5
4421 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4422
4423 # Check whether --with-dlsym or --without-dlsym was given.
4424 if test "${with_dlsym+set}" = set; then
4425   withval="$with_dlsym"
4426   with_dlsym=$withval
4427 else
4428   with_dlsym=yes
4429 fi;
4430         echo "$as_me:4430: result: $with_dlsym" >&5
4431 echo "${ECHO_T}$with_dlsym" >&6
4432         if test "$with_dlsym" = yes ; then
4433
4434 cf_have_dlsym=no
4435 echo "$as_me:4435: checking for dlsym" >&5
4436 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4437 if test "${ac_cv_func_dlsym+set}" = set; then
4438   echo $ECHO_N "(cached) $ECHO_C" >&6
4439 else
4440   cat >conftest.$ac_ext <<_ACEOF
4441 #line 4441 "configure"
4442 #include "confdefs.h"
4443 /* System header to define __stub macros and hopefully few prototypes,
4444     which can conflict with char dlsym (); below.  */
4445 #include <assert.h>
4446 /* Override any gcc2 internal prototype to avoid an error.  */
4447 #ifdef __cplusplus
4448 extern "C"
4449 #endif
4450 /* We use char because int might match the return type of a gcc2
4451    builtin and then its argument prototype would still apply.  */
4452 char dlsym ();
4453 char (*f) ();
4454
4455 int
4456 main ()
4457 {
4458 /* The GNU C library defines this for functions which it implements
4459     to always fail with ENOSYS.  Some functions are actually named
4460     something starting with __ and the normal name is an alias.  */
4461 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4462 choke me
4463 #else
4464 f = dlsym;
4465 #endif
4466
4467   ;
4468   return 0;
4469 }
4470 _ACEOF
4471 rm -f conftest.$ac_objext conftest$ac_exeext
4472 if { (eval echo "$as_me:4472: \"$ac_link\"") >&5
4473   (eval $ac_link) 2>&5
4474   ac_status=$?
4475   echo "$as_me:4475: \$? = $ac_status" >&5
4476   (exit $ac_status); } &&
4477          { ac_try='test -s conftest$ac_exeext'
4478   { (eval echo "$as_me:4478: \"$ac_try\"") >&5
4479   (eval $ac_try) 2>&5
4480   ac_status=$?
4481   echo "$as_me:4481: \$? = $ac_status" >&5
4482   (exit $ac_status); }; }; then
4483   ac_cv_func_dlsym=yes
4484 else
4485   echo "$as_me: failed program was:" >&5
4486 cat conftest.$ac_ext >&5
4487 ac_cv_func_dlsym=no
4488 fi
4489 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4490 fi
4491 echo "$as_me:4491: result: $ac_cv_func_dlsym" >&5
4492 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4493 if test $ac_cv_func_dlsym = yes; then
4494   cf_have_dlsym=yes
4495 else
4496
4497 cf_have_libdl=no
4498 echo "$as_me:4498: checking for dlsym in -ldl" >&5
4499 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4500 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4501   echo $ECHO_N "(cached) $ECHO_C" >&6
4502 else
4503   ac_check_lib_save_LIBS=$LIBS
4504 LIBS="-ldl  $LIBS"
4505 cat >conftest.$ac_ext <<_ACEOF
4506 #line 4506 "configure"
4507 #include "confdefs.h"
4508
4509 /* Override any gcc2 internal prototype to avoid an error.  */
4510 #ifdef __cplusplus
4511 extern "C"
4512 #endif
4513 /* We use char because int might match the return type of a gcc2
4514    builtin and then its argument prototype would still apply.  */
4515 char dlsym ();
4516 int
4517 main ()
4518 {
4519 dlsym ();
4520   ;
4521   return 0;
4522 }
4523 _ACEOF
4524 rm -f conftest.$ac_objext conftest$ac_exeext
4525 if { (eval echo "$as_me:4525: \"$ac_link\"") >&5
4526   (eval $ac_link) 2>&5
4527   ac_status=$?
4528   echo "$as_me:4528: \$? = $ac_status" >&5
4529   (exit $ac_status); } &&
4530          { ac_try='test -s conftest$ac_exeext'
4531   { (eval echo "$as_me:4531: \"$ac_try\"") >&5
4532   (eval $ac_try) 2>&5
4533   ac_status=$?
4534   echo "$as_me:4534: \$? = $ac_status" >&5
4535   (exit $ac_status); }; }; then
4536   ac_cv_lib_dl_dlsym=yes
4537 else
4538   echo "$as_me: failed program was:" >&5
4539 cat conftest.$ac_ext >&5
4540 ac_cv_lib_dl_dlsym=no
4541 fi
4542 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4543 LIBS=$ac_check_lib_save_LIBS
4544 fi
4545 echo "$as_me:4545: result: $ac_cv_lib_dl_dlsym" >&5
4546 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4547 if test $ac_cv_lib_dl_dlsym = yes; then
4548
4549         cf_have_dlsym=yes
4550         cf_have_libdl=yes
4551 fi
4552
4553 fi
4554
4555 if test "$cf_have_dlsym" = yes ; then
4556         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4557
4558         echo "$as_me:4558: checking whether able to link to dl*() functions" >&5
4559 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4560         cat >conftest.$ac_ext <<_ACEOF
4561 #line 4561 "configure"
4562 #include "confdefs.h"
4563 #include <dlfcn.h>
4564 int
4565 main ()
4566 {
4567
4568                 void *obj;
4569                 if ((obj = dlopen("filename", 0)) != 0) {
4570                         if (dlsym(obj, "symbolname") == 0) {
4571                         dlclose(obj);
4572                         }
4573                 }
4574   ;
4575   return 0;
4576 }
4577 _ACEOF
4578 rm -f conftest.$ac_objext conftest$ac_exeext
4579 if { (eval echo "$as_me:4579: \"$ac_link\"") >&5
4580   (eval $ac_link) 2>&5
4581   ac_status=$?
4582   echo "$as_me:4582: \$? = $ac_status" >&5
4583   (exit $ac_status); } &&
4584          { ac_try='test -s conftest$ac_exeext'
4585   { (eval echo "$as_me:4585: \"$ac_try\"") >&5
4586   (eval $ac_try) 2>&5
4587   ac_status=$?
4588   echo "$as_me:4588: \$? = $ac_status" >&5
4589   (exit $ac_status); }; }; then
4590
4591                 cat >>confdefs.h <<\EOF
4592 #define HAVE_LIBDL 1
4593 EOF
4594
4595 else
4596   echo "$as_me: failed program was:" >&5
4597 cat conftest.$ac_ext >&5
4598
4599                 { { echo "$as_me:4599: error: Cannot link test program for libdl" >&5
4600 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4601    { (exit 1); exit 1; }; }
4602 fi
4603 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4604         echo "$as_me:4604: result: ok" >&5
4605 echo "${ECHO_T}ok" >&6
4606 else
4607         { { echo "$as_me:4607: error: Cannot find dlsym function" >&5
4608 echo "$as_me: error: Cannot find dlsym function" >&2;}
4609    { (exit 1); exit 1; }; }
4610 fi
4611
4612                 if test "$with_gpm" != yes ; then
4613                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4614
4615                         cf_cv_gpm_soname="$with_gpm"
4616                 else
4617
4618 echo "$as_me:4618: checking for soname of gpm library" >&5
4619 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4620 if test "${cf_cv_gpm_soname+set}" = set; then
4621   echo $ECHO_N "(cached) $ECHO_C" >&6
4622 else
4623
4624 cf_cv_gpm_soname=unknown
4625 if test "$cross_compiling" != yes ; then
4626 cat >conftest.$ac_ext <<CF_EOF
4627 #include <gpm.h>
4628 int main()
4629 {
4630 if (Gpm_Open(0,0)) Gpm_Close();
4631         ${cf_cv_main_return:-return}(0);
4632 }
4633 CF_EOF
4634 cf_save_LIBS="$LIBS"
4635         LIBS="-lgpm $LIBS"
4636         if { (eval echo "$as_me:4636: \"$ac_compile\"") >&5
4637   (eval $ac_compile) 2>&5
4638   ac_status=$?
4639   echo "$as_me:4639: \$? = $ac_status" >&5
4640   (exit $ac_status); } ; then
4641                 if { (eval echo "$as_me:4641: \"$ac_link\"") >&5
4642   (eval $ac_link) 2>&5
4643   ac_status=$?
4644   echo "$as_me:4644: \$? = $ac_status" >&5
4645   (exit $ac_status); } ; then
4646                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4647                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4648                 fi
4649         fi
4650 rm -f conftest*
4651 LIBS="$cf_save_LIBS"
4652 fi
4653
4654 fi
4655 echo "$as_me:4655: result: $cf_cv_gpm_soname" >&5
4656 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4657
4658                 fi
4659                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4660 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4661 EOF
4662
4663                 SHLIB_LIST="-ldl $SHLIB_LIST"
4664         else
4665                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4666         fi
4667         cat >>confdefs.h <<\EOF
4668 #define HAVE_LIBGPM 1
4669 EOF
4670
4671         echo "$as_me:4671: checking for Gpm_Wgetch in -lgpm" >&5
4672 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4673 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4674   echo $ECHO_N "(cached) $ECHO_C" >&6
4675 else
4676   ac_check_lib_save_LIBS=$LIBS
4677 LIBS="-lgpm  $LIBS"
4678 cat >conftest.$ac_ext <<_ACEOF
4679 #line 4679 "configure"
4680 #include "confdefs.h"
4681
4682 /* Override any gcc2 internal prototype to avoid an error.  */
4683 #ifdef __cplusplus
4684 extern "C"
4685 #endif
4686 /* We use char because int might match the return type of a gcc2
4687    builtin and then its argument prototype would still apply.  */
4688 char Gpm_Wgetch ();
4689 int
4690 main ()
4691 {
4692 Gpm_Wgetch ();
4693   ;
4694   return 0;
4695 }
4696 _ACEOF
4697 rm -f conftest.$ac_objext conftest$ac_exeext
4698 if { (eval echo "$as_me:4698: \"$ac_link\"") >&5
4699   (eval $ac_link) 2>&5
4700   ac_status=$?
4701   echo "$as_me:4701: \$? = $ac_status" >&5
4702   (exit $ac_status); } &&
4703          { ac_try='test -s conftest$ac_exeext'
4704   { (eval echo "$as_me:4704: \"$ac_try\"") >&5
4705   (eval $ac_try) 2>&5
4706   ac_status=$?
4707   echo "$as_me:4707: \$? = $ac_status" >&5
4708   (exit $ac_status); }; }; then
4709   ac_cv_lib_gpm_Gpm_Wgetch=yes
4710 else
4711   echo "$as_me: failed program was:" >&5
4712 cat conftest.$ac_ext >&5
4713 ac_cv_lib_gpm_Gpm_Wgetch=no
4714 fi
4715 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4716 LIBS=$ac_check_lib_save_LIBS
4717 fi
4718 echo "$as_me:4718: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4719 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4720 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4721
4722                 { echo "$as_me:4722: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4723 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4724
4725 fi
4726
4727 fi
4728
4729 # not everyone has "test -c"
4730 if test -c /dev/sysmouse 2>/dev/null ; then
4731 echo "$as_me:4731: checking if you want to use sysmouse" >&5
4732 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4733
4734 # Check whether --with-sysmouse or --without-sysmouse was given.
4735 if test "${with_sysmouse+set}" = set; then
4736   withval="$with_sysmouse"
4737   cf_with_sysmouse=$withval
4738 else
4739   cf_with_sysmouse=maybe
4740 fi;
4741         if test "$cf_with_sysmouse" != no ; then
4742         cat >conftest.$ac_ext <<_ACEOF
4743 #line 4743 "configure"
4744 #include "confdefs.h"
4745
4746 #include <osreldate.h>
4747 #if (__FreeBSD_version >= 400017)
4748 #include <sys/consio.h>
4749 #include <sys/fbio.h>
4750 #else
4751 #include <machine/console.h>
4752 #endif
4753
4754 int
4755 main ()
4756 {
4757
4758         struct mouse_info the_mouse;
4759         ioctl(0, CONS_MOUSECTL, &the_mouse);
4760
4761   ;
4762   return 0;
4763 }
4764 _ACEOF
4765 rm -f conftest.$ac_objext
4766 if { (eval echo "$as_me:4766: \"$ac_compile\"") >&5
4767   (eval $ac_compile) 2>&5
4768   ac_status=$?
4769   echo "$as_me:4769: \$? = $ac_status" >&5
4770   (exit $ac_status); } &&
4771          { ac_try='test -s conftest.$ac_objext'
4772   { (eval echo "$as_me:4772: \"$ac_try\"") >&5
4773   (eval $ac_try) 2>&5
4774   ac_status=$?
4775   echo "$as_me:4775: \$? = $ac_status" >&5
4776   (exit $ac_status); }; }; then
4777   cf_with_sysmouse=yes
4778 else
4779   echo "$as_me: failed program was:" >&5
4780 cat conftest.$ac_ext >&5
4781 cf_with_sysmouse=no
4782 fi
4783 rm -f conftest.$ac_objext conftest.$ac_ext
4784         fi
4785 echo "$as_me:4785: result: $cf_with_sysmouse" >&5
4786 echo "${ECHO_T}$cf_with_sysmouse" >&6
4787 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4788 #define USE_SYSMOUSE 1
4789 EOF
4790
4791 fi
4792
4793 if test X"$CC_G_OPT" = X"" ; then
4794         CC_G_OPT='-g'
4795         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4796 fi
4797
4798 if test X"$CXX_G_OPT" = X"" ; then
4799         CXX_G_OPT='-g'
4800         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4801 fi
4802
4803 echo "$as_me:4803: checking for default loader flags" >&5
4804 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4805 case $DFT_LWR_MODEL in
4806 libtool) LD_MODEL=''   ;;
4807 normal)  LD_MODEL=''   ;;
4808 debug)   LD_MODEL=$CC_G_OPT ;;
4809 profile) LD_MODEL='-pg';;
4810 shared)  LD_MODEL=''   ;;
4811 esac
4812 echo "$as_me:4812: result: $LD_MODEL" >&5
4813 echo "${ECHO_T}$LD_MODEL" >&6
4814
4815 echo "$as_me:4815: checking if rpath option should be used" >&5
4816 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4817
4818 # Check whether --enable-rpath or --disable-rpath was given.
4819 if test "${enable_rpath+set}" = set; then
4820   enableval="$enable_rpath"
4821   cf_cv_ld_rpath=$enableval
4822 else
4823   cf_cv_ld_rpath=no
4824 fi;
4825 echo "$as_me:4825: result: $cf_cv_ld_rpath" >&5
4826 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4827
4828         LOCAL_LDFLAGS=
4829         LOCAL_LDFLAGS2=
4830         LD_SHARED_OPTS=
4831         INSTALL_LIB="-m 644"
4832
4833         cf_cv_do_symlinks=no
4834
4835         echo "$as_me:4835: checking if release/abi version should be used for shared libs" >&5
4836 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4837
4838 # Check whether --with-shlib-version or --without-shlib-version was given.
4839 if test "${with_shlib_version+set}" = set; then
4840   withval="$with_shlib_version"
4841   test -z "$withval" && withval=auto
4842         case $withval in #(vi
4843         yes) #(vi
4844                 cf_cv_shlib_version=auto
4845                 ;;
4846         rel|abi|auto|no) #(vi
4847                 cf_cv_shlib_version=$withval
4848                 ;;
4849         *)
4850                 { { echo "$as_me:4850: error: option value must be one of: rel, abi, auto or no" >&5
4851 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4852    { (exit 1); exit 1; }; }
4853                 ;;
4854         esac
4855
4856 else
4857   cf_cv_shlib_version=auto
4858 fi;
4859         echo "$as_me:4859: result: $cf_cv_shlib_version" >&5
4860 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4861
4862         cf_cv_rm_so_locs=no
4863
4864         # Some less-capable ports of gcc support only -fpic
4865         CC_SHARED_OPTS=
4866         if test "$GCC" = yes
4867         then
4868                 echo "$as_me:4868: checking which $CC option to use" >&5
4869 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4870                 cf_save_CFLAGS="$CFLAGS"
4871                 for CC_SHARED_OPTS in -fPIC -fpic ''
4872                 do
4873                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4874                         cat >conftest.$ac_ext <<_ACEOF
4875 #line 4875 "configure"
4876 #include "confdefs.h"
4877 #include <stdio.h>
4878 int
4879 main ()
4880 {
4881 int x = 1
4882   ;
4883   return 0;
4884 }
4885 _ACEOF
4886 rm -f conftest.$ac_objext
4887 if { (eval echo "$as_me:4887: \"$ac_compile\"") >&5
4888   (eval $ac_compile) 2>&5
4889   ac_status=$?
4890   echo "$as_me:4890: \$? = $ac_status" >&5
4891   (exit $ac_status); } &&
4892          { ac_try='test -s conftest.$ac_objext'
4893   { (eval echo "$as_me:4893: \"$ac_try\"") >&5
4894   (eval $ac_try) 2>&5
4895   ac_status=$?
4896   echo "$as_me:4896: \$? = $ac_status" >&5
4897   (exit $ac_status); }; }; then
4898   break
4899 else
4900   echo "$as_me: failed program was:" >&5
4901 cat conftest.$ac_ext >&5
4902 fi
4903 rm -f conftest.$ac_objext conftest.$ac_ext
4904                 done
4905                 echo "$as_me:4905: result: $CC_SHARED_OPTS" >&5
4906 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4907                 CFLAGS="$cf_save_CFLAGS"
4908         fi
4909
4910         cf_cv_shlib_version_infix=no
4911
4912         case $cf_cv_system_name in
4913         beos*)
4914                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
4915                 ;;
4916         cygwin*)
4917                 CC_SHARED_OPTS=
4918                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,--out-implib=../lib/${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/${SHARED_LIB}'
4919                 cf_cv_shlib_version=cygdll
4920                 cf_cv_shlib_version_infix=cygdll
4921                 ;;
4922         darwin*)
4923                 EXTRA_CFLAGS="-no-cpp-precomp"
4924                 CC_SHARED_OPTS="-dynamic"
4925                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${DESTDIR}${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
4926                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
4927                 cf_cv_shlib_version_infix=yes
4928                 echo "$as_me:4928: checking if ld -search_paths_first works" >&5
4929 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
4930 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
4931   echo $ECHO_N "(cached) $ECHO_C" >&6
4932 else
4933
4934                         cf_save_LDFLAGS=$LDFLAGS
4935                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
4936                         cat >conftest.$ac_ext <<_ACEOF
4937 #line 4937 "configure"
4938 #include "confdefs.h"
4939
4940 int
4941 main ()
4942 {
4943 int i;
4944   ;
4945   return 0;
4946 }
4947 _ACEOF
4948 rm -f conftest.$ac_objext conftest$ac_exeext
4949 if { (eval echo "$as_me:4949: \"$ac_link\"") >&5
4950   (eval $ac_link) 2>&5
4951   ac_status=$?
4952   echo "$as_me:4952: \$? = $ac_status" >&5
4953   (exit $ac_status); } &&
4954          { ac_try='test -s conftest$ac_exeext'
4955   { (eval echo "$as_me:4955: \"$ac_try\"") >&5
4956   (eval $ac_try) 2>&5
4957   ac_status=$?
4958   echo "$as_me:4958: \$? = $ac_status" >&5
4959   (exit $ac_status); }; }; then
4960   cf_cv_ldflags_search_paths_first=yes
4961 else
4962   echo "$as_me: failed program was:" >&5
4963 cat conftest.$ac_ext >&5
4964 cf_cv_ldflags_search_paths_first=no
4965 fi
4966 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4967                                 LDFLAGS=$cf_save_LDFLAGS
4968 fi
4969 echo "$as_me:4969: result: $cf_cv_ldflags_search_paths_first" >&5
4970 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
4971                 if test $cf_cv_ldflags_search_paths_first = yes; then
4972                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
4973                 fi
4974                 ;;
4975         hpux*)
4976                 # (tested with gcc 2.7.2 -- I don't have c89)
4977                 if test "$GCC" = yes; then
4978                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
4979                 else
4980                         CC_SHARED_OPTS='+Z'
4981                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
4982                 fi
4983                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
4984                 # HP-UX shared libraries must be executable, and should be
4985                 # readonly to exploit a quirk in the memory manager.
4986                 INSTALL_LIB="-m 555"
4987                 ;;
4988         irix*)
4989                 if test "$cf_cv_ld_rpath" = yes ; then
4990                         if test "$GCC" = yes; then
4991                                 cf_ld_rpath_opt="-Wl,-rpath,"
4992                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
4993                         else
4994                                 cf_ld_rpath_opt="-rpath "
4995                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
4996                         fi
4997                 fi
4998                 # tested with IRIX 5.2 and 'cc'.
4999                 if test "$GCC" != yes; then
5000                         CC_SHARED_OPTS='-KPIC'
5001                 fi
5002                 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5003                 cf_cv_rm_so_locs=yes
5004                 ;;
5005         linux*|gnu*|k*bsd*-gnu)
5006                 if test "$DFT_LWR_MODEL" = "shared" ; then
5007                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5008                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5009                 fi
5010                 if test "$cf_cv_ld_rpath" = yes ; then
5011                         cf_ld_rpath_opt="-Wl,-rpath,"
5012                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5013                 fi
5014
5015         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5016         if test "$cf_cv_shlib_version" = rel; then
5017                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5018         else
5019                 cf_shared_soname='`basename $@`'
5020         fi
5021
5022                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
5023                 ;;
5024         openbsd2*)
5025                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5026                 MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5027                 ;;
5028         openbsd*|freebsd[23]*)
5029                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5030                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5031                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5032                 ;;
5033         freebsd*)
5034                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5035                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5036                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5037                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5038                         cf_ld_rpath_opt="-rpath "
5039                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5040                 fi
5041
5042         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5043         if test "$cf_cv_shlib_version" = rel; then
5044                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5045         else
5046                 cf_shared_soname='`basename $@`'
5047         fi
5048
5049                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5050                 ;;
5051         netbsd*)
5052                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5053                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5054                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5055                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5056                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5057                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5058                         if test "$cf_cv_shlib_version" = auto; then
5059                         if test -f /usr/libexec/ld.elf_so; then
5060                                 cf_cv_shlib_version=abi
5061                         else
5062                                 cf_cv_shlib_version=rel
5063                         fi
5064                         fi
5065
5066         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5067         if test "$cf_cv_shlib_version" = rel; then
5068                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5069         else
5070                 cf_shared_soname='`basename $@`'
5071         fi
5072
5073                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $@'
5074                 else
5075                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5076                 fi
5077                 ;;
5078         osf*|mls+*)
5079                 # tested with OSF/1 V3.2 and 'cc'
5080                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5081                 # link with shared libs).
5082                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5083                 case $host_os in
5084                 osf4*)
5085                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5086                         ;;
5087                 esac
5088                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5089                 if test "$DFT_LWR_MODEL" = "shared" ; then
5090                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5091                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5092                 fi
5093                 if test "$cf_cv_ld_rpath" = yes ; then
5094                         cf_ld_rpath_opt="-rpath"
5095                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5096                 fi
5097                 cf_cv_rm_so_locs=yes
5098                 ;;
5099         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5100                 # tested with osr5.0.5
5101                 if test "$GCC" != yes; then
5102                         CC_SHARED_OPTS='-belf -KPIC'
5103                 fi
5104                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5105                 if test "$cf_cv_ld_rpath" = yes ; then
5106                         # only way is to set LD_RUN_PATH but no switch for it
5107                         RUN_PATH=$libdir
5108                 fi
5109                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5110                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5111                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5112                 ;;
5113         sunos4*)
5114                 # tested with SunOS 4.1.1 and gcc 2.7.0
5115                 if test "$GCC" != yes; then
5116                         CC_SHARED_OPTS='-KPIC'
5117                 fi
5118                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5119                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5120                 ;;
5121         solaris2*)
5122                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5123                 if test "$GCC" != yes; then
5124                         CC_SHARED_OPTS='-KPIC'
5125                 fi
5126                 if test "$DFT_LWR_MODEL" = "shared" ; then
5127                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5128                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5129                 fi
5130                 if test "$cf_cv_ld_rpath" = yes ; then
5131                         cf_ld_rpath_opt="-R"
5132                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5133                 fi
5134
5135         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5136         if test "$cf_cv_shlib_version" = rel; then
5137                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5138         else
5139                 cf_shared_soname='`basename $@`'
5140         fi
5141
5142                 MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $@'
5143                 ;;
5144         sysv5uw7*|unix_sv*)
5145                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5146                 if test "$GCC" != yes; then
5147                         CC_SHARED_OPTS='-KPIC'
5148                 fi
5149                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5150                 ;;
5151         *)
5152                 CC_SHARED_OPTS='unknown'
5153                 MK_SHARED_LIB='echo unknown'
5154                 ;;
5155         esac
5156
5157         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5158         case "$cf_cv_shlib_version" in #(vi
5159         rel|abi)
5160                 case "$MK_SHARED_LIB" in #(vi
5161                 *'-o $@')
5162                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5163                         ;;
5164                 *)
5165                         { echo "$as_me:5165: WARNING: ignored --with-shlib-version" >&5
5166 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5167                         ;;
5168                 esac
5169                 ;;
5170         esac
5171
5172         if test -n "$cf_ld_rpath_opt" ; then
5173                 echo "$as_me:5173: checking if we need a space after rpath option" >&5
5174 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5175                 cf_save_LIBS="$LIBS"
5176                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5177                 cat >conftest.$ac_ext <<_ACEOF
5178 #line 5178 "configure"
5179 #include "confdefs.h"
5180
5181 int
5182 main ()
5183 {
5184
5185   ;
5186   return 0;
5187 }
5188 _ACEOF
5189 rm -f conftest.$ac_objext conftest$ac_exeext
5190 if { (eval echo "$as_me:5190: \"$ac_link\"") >&5
5191   (eval $ac_link) 2>&5
5192   ac_status=$?
5193   echo "$as_me:5193: \$? = $ac_status" >&5
5194   (exit $ac_status); } &&
5195          { ac_try='test -s conftest$ac_exeext'
5196   { (eval echo "$as_me:5196: \"$ac_try\"") >&5
5197   (eval $ac_try) 2>&5
5198   ac_status=$?
5199   echo "$as_me:5199: \$? = $ac_status" >&5
5200   (exit $ac_status); }; }; then
5201   cf_rpath_space=no
5202 else
5203   echo "$as_me: failed program was:" >&5
5204 cat conftest.$ac_ext >&5
5205 cf_rpath_space=yes
5206 fi
5207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5208                 LIBS="$cf_save_LIBS"
5209                 echo "$as_me:5209: result: $cf_rpath_space" >&5
5210 echo "${ECHO_T}$cf_rpath_space" >&6
5211                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5212                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5213         fi
5214
5215 if test "$CC_SHARED_OPTS" = "unknown"; then
5216         for model in $cf_list_models; do
5217                 if test "$model" = "shared"; then
5218                         { { echo "$as_me:5218: error: Shared libraries are not supported in this version" >&5
5219 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5220    { (exit 1); exit 1; }; }
5221                 fi
5222         done
5223 fi
5224
5225 ###############################################################################
5226
5227 ###     use option --disable-overwrite to leave out the link to -lcurses
5228 echo "$as_me:5228: checking if you wish to install ncurses overwriting curses" >&5
5229 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5230
5231 # Check whether --enable-overwrite or --disable-overwrite was given.
5232 if test "${enable_overwrite+set}" = set; then
5233   enableval="$enable_overwrite"
5234   with_overwrite=$enableval
5235 else
5236   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5237 fi;
5238 echo "$as_me:5238: result: $with_overwrite" >&5
5239 echo "${ECHO_T}$with_overwrite" >&6
5240
5241 echo "$as_me:5241: checking if external terminfo-database is used" >&5
5242 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5243
5244 # Check whether --enable-database or --disable-database was given.
5245 if test "${enable_database+set}" = set; then
5246   enableval="$enable_database"
5247   use_database=$enableval
5248 else
5249   use_database=yes
5250 fi;
5251 echo "$as_me:5251: result: $use_database" >&5
5252 echo "${ECHO_T}$use_database" >&6
5253
5254 case $host_os in #(vi
5255 os2*) #(vi
5256         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5257         ;;
5258 *) #(vi
5259         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5260         ;;
5261 esac
5262
5263         case $cf_cv_system_name in
5264         os2*)   PATHSEP=';'  ;;
5265         *)      PATHSEP=':'  ;;
5266         esac
5267
5268 if test "$use_database" != no ; then
5269         cat >>confdefs.h <<\EOF
5270 #define USE_DATABASE 1
5271 EOF
5272
5273         echo "$as_me:5273: checking which terminfo source-file will be installed" >&5
5274 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5275
5276 # Check whether --enable-database or --disable-database was given.
5277 if test "${enable_database+set}" = set; then
5278   enableval="$enable_database"
5279   TERMINFO_SRC=$withval
5280 fi;
5281         echo "$as_me:5281: result: $TERMINFO_SRC" >&5
5282 echo "${ECHO_T}$TERMINFO_SRC" >&6
5283
5284         echo "$as_me:5284: checking whether to use hashed database instead of directory/tree" >&5
5285 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5286
5287 # Check whether --with-hashed-db or --without-hashed-db was given.
5288 if test "${with_hashed_db+set}" = set; then
5289   withval="$with_hashed_db"
5290
5291 else
5292   with_hashed_db=no
5293 fi;
5294         echo "$as_me:5294: result: $with_hashed_db" >&5
5295 echo "${ECHO_T}$with_hashed_db" >&6
5296 fi
5297
5298 echo "$as_me:5298: checking for list of fallback descriptions" >&5
5299 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5300
5301 # Check whether --with-fallbacks or --without-fallbacks was given.
5302 if test "${with_fallbacks+set}" = set; then
5303   withval="$with_fallbacks"
5304   with_fallback=$withval
5305 else
5306   with_fallback=
5307 fi;
5308 echo "$as_me:5308: result: $with_fallback" >&5
5309 echo "${ECHO_T}$with_fallback" >&6
5310 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5311
5312 echo "$as_me:5312: checking if you want modern xterm or antique" >&5
5313 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5314
5315 # Check whether --with-xterm-new or --without-xterm-new was given.
5316 if test "${with_xterm_new+set}" = set; then
5317   withval="$with_xterm_new"
5318   with_xterm_new=$withval
5319 else
5320   with_xterm_new=yes
5321 fi;
5322 case $with_xterm_new in
5323 no)     with_xterm_new=xterm-old;;
5324 *)      with_xterm_new=xterm-new;;
5325 esac
5326 echo "$as_me:5326: result: $with_xterm_new" >&5
5327 echo "${ECHO_T}$with_xterm_new" >&6
5328 WHICH_XTERM=$with_xterm_new
5329
5330 MAKE_TERMINFO=
5331 if test "$use_database" = no ; then
5332         TERMINFO="${datadir}/terminfo"
5333         MAKE_TERMINFO="#"
5334 else
5335
5336 echo "$as_me:5336: checking for list of terminfo directories" >&5
5337 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5338
5339 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5340 if test "${with_terminfo_dirs+set}" = set; then
5341   withval="$with_terminfo_dirs"
5342
5343 else
5344   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5345 fi;
5346 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5347 cf_dst_path=
5348 for cf_src_path in $withval
5349 do
5350
5351 if test "x$prefix" != xNONE; then
5352   cf_path_syntax="$prefix"
5353 else
5354   cf_path_syntax="$ac_default_prefix"
5355 fi
5356
5357 case ".$cf_src_path" in #(vi
5358 .\$\(*\)*|.\'*\'*) #(vi
5359   ;;
5360 ..|./*|.\\*) #(vi
5361   ;;
5362 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5363   ;;
5364 .\${*prefix}*) #(vi
5365   eval cf_src_path="$cf_src_path"
5366   case ".$cf_src_path" in #(vi
5367   .NONE/*)
5368     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5369     ;;
5370   esac
5371   ;; #(vi
5372 .no|.NONE/*)
5373   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5374   ;;
5375 *)
5376   { { echo "$as_me:5376: error: expected a pathname, not \"$cf_src_path\"" >&5
5377 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5378    { (exit 1); exit 1; }; }
5379   ;;
5380 esac
5381
5382   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5383   cf_dst_path="${cf_dst_path}${cf_src_path}"
5384 done
5385 IFS="$ac_save_ifs"
5386
5387 eval 'TERMINFO_DIRS="$cf_dst_path"'
5388
5389 echo "$as_me:5389: result: $TERMINFO_DIRS" >&5
5390 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5391 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5392 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5393 EOF
5394
5395 echo "$as_me:5395: checking for default terminfo directory" >&5
5396 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5397
5398 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5399 if test "${with_default_terminfo_dir+set}" = set; then
5400   withval="$with_default_terminfo_dir"
5401
5402 else
5403   withval="${TERMINFO-${datadir}/terminfo}"
5404 fi;
5405 if test "x$prefix" != xNONE; then
5406   cf_path_syntax="$prefix"
5407 else
5408   cf_path_syntax="$ac_default_prefix"
5409 fi
5410
5411 case ".$withval" in #(vi
5412 .\$\(*\)*|.\'*\'*) #(vi
5413   ;;
5414 ..|./*|.\\*) #(vi
5415   ;;
5416 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5417   ;;
5418 .\${*prefix}*) #(vi
5419   eval withval="$withval"
5420   case ".$withval" in #(vi
5421   .NONE/*)
5422     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5423     ;;
5424   esac
5425   ;; #(vi
5426 .no|.NONE/*)
5427   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5428   ;;
5429 *)
5430   { { echo "$as_me:5430: error: expected a pathname, not \"$withval\"" >&5
5431 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5432    { (exit 1); exit 1; }; }
5433   ;;
5434 esac
5435
5436 TERMINFO="$withval"
5437
5438 echo "$as_me:5438: result: $TERMINFO" >&5
5439 echo "${ECHO_T}$TERMINFO" >&6
5440 cat >>confdefs.h <<EOF
5441 #define TERMINFO "$TERMINFO"
5442 EOF
5443
5444 fi
5445
5446 ###     use option --disable-big-core to make tic run on small machines
5447 ###     We need 4Mb, check if we can allocate 50% more than that.
5448 echo "$as_me:5448: checking if big-core option selected" >&5
5449 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5450
5451 # Check whether --enable-big-core or --disable-big-core was given.
5452 if test "${enable_big_core+set}" = set; then
5453   enableval="$enable_big_core"
5454   with_big_core=$enableval
5455 else
5456   if test "$cross_compiling" = yes; then
5457   with_big_core=no
5458 else
5459   cat >conftest.$ac_ext <<_ACEOF
5460 #line 5460 "configure"
5461 #include "confdefs.h"
5462
5463 #include <stdlib.h>
5464 #include <string.h>
5465 int main() {
5466         unsigned long n = 6000000L;
5467         char *s = malloc(n);
5468         if (s != 0)
5469                 s[0] = s[n-1] = 0;
5470         ${cf_cv_main_return:-return}(s == 0);
5471 }
5472 _ACEOF
5473 rm -f conftest$ac_exeext
5474 if { (eval echo "$as_me:5474: \"$ac_link\"") >&5
5475   (eval $ac_link) 2>&5
5476   ac_status=$?
5477   echo "$as_me:5477: \$? = $ac_status" >&5
5478   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5479   { (eval echo "$as_me:5479: \"$ac_try\"") >&5
5480   (eval $ac_try) 2>&5
5481   ac_status=$?
5482   echo "$as_me:5482: \$? = $ac_status" >&5
5483   (exit $ac_status); }; }; then
5484   with_big_core=yes
5485 else
5486   echo "$as_me: program exited with status $ac_status" >&5
5487 echo "$as_me: failed program was:" >&5
5488 cat conftest.$ac_ext >&5
5489 with_big_core=no
5490 fi
5491 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5492 fi
5493 fi;
5494 echo "$as_me:5494: result: $with_big_core" >&5
5495 echo "${ECHO_T}$with_big_core" >&6
5496 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5497 #define HAVE_BIG_CORE 1
5498 EOF
5499
5500 ###     use option --enable-termcap to compile in the termcap fallback support
5501 echo "$as_me:5501: checking if you want termcap-fallback support" >&5
5502 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5503
5504 # Check whether --enable-termcap or --disable-termcap was given.
5505 if test "${enable_termcap+set}" = set; then
5506   enableval="$enable_termcap"
5507   with_termcap=$enableval
5508 else
5509   with_termcap=no
5510 fi;
5511 echo "$as_me:5511: result: $with_termcap" >&5
5512 echo "${ECHO_T}$with_termcap" >&6
5513
5514 if test "$with_termcap" != "yes" ; then
5515         if test "$use_database" = no ; then
5516                 if test -z "$with_fallback" ; then
5517                         { { echo "$as_me:5517: error: You have disabled the database w/o specifying fallbacks" >&5
5518 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5519    { (exit 1); exit 1; }; }
5520                 fi
5521         fi
5522         cat >>confdefs.h <<\EOF
5523 #define PURE_TERMINFO 1
5524 EOF
5525
5526 else
5527
5528 cat >>confdefs.h <<\EOF
5529 #define USE_TERMCAP 1
5530 EOF
5531
5532 echo "$as_me:5532: checking for list of termcap files" >&5
5533 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5534
5535 # Check whether --with-termpath or --without-termpath was given.
5536 if test "${with_termpath+set}" = set; then
5537   withval="$with_termpath"
5538
5539 else
5540   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5541 fi;
5542 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5543 cf_dst_path=
5544 for cf_src_path in $withval
5545 do
5546
5547 if test "x$prefix" != xNONE; then
5548   cf_path_syntax="$prefix"
5549 else
5550   cf_path_syntax="$ac_default_prefix"
5551 fi
5552
5553 case ".$cf_src_path" in #(vi
5554 .\$\(*\)*|.\'*\'*) #(vi
5555   ;;
5556 ..|./*|.\\*) #(vi
5557   ;;
5558 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5559   ;;
5560 .\${*prefix}*) #(vi
5561   eval cf_src_path="$cf_src_path"
5562   case ".$cf_src_path" in #(vi
5563   .NONE/*)
5564     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5565     ;;
5566   esac
5567   ;; #(vi
5568 .no|.NONE/*)
5569   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5570   ;;
5571 *)
5572   { { echo "$as_me:5572: error: expected a pathname, not \"$cf_src_path\"" >&5
5573 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5574    { (exit 1); exit 1; }; }
5575   ;;
5576 esac
5577
5578   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5579   cf_dst_path="${cf_dst_path}${cf_src_path}"
5580 done
5581 IFS="$ac_save_ifs"
5582
5583 eval 'TERMPATH="$cf_dst_path"'
5584
5585 echo "$as_me:5585: result: $TERMPATH" >&5
5586 echo "${ECHO_T}$TERMPATH" >&6
5587 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5588 #define TERMPATH "$TERMPATH"
5589 EOF
5590
5591 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5592 echo "$as_me:5592: checking if fast termcap-loader is needed" >&5
5593 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5594
5595 # Check whether --enable-getcap or --disable-getcap was given.
5596 if test "${enable_getcap+set}" = set; then
5597   enableval="$enable_getcap"
5598   with_getcap=$enableval
5599 else
5600   with_getcap=no
5601 fi;
5602 echo "$as_me:5602: result: $with_getcap" >&5
5603 echo "${ECHO_T}$with_getcap" >&6
5604 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5605 #define USE_GETCAP 1
5606 EOF
5607
5608 echo "$as_me:5608: checking if translated termcaps will be cached in ~/.terminfo" >&5
5609 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5610
5611 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5612 if test "${enable_getcap_cache+set}" = set; then
5613   enableval="$enable_getcap_cache"
5614   with_getcap_cache=$enableval
5615 else
5616   with_getcap_cache=no
5617 fi;
5618 echo "$as_me:5618: result: $with_getcap_cache" >&5
5619 echo "${ECHO_T}$with_getcap_cache" >&6
5620 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5621 #define USE_GETCAP_CACHE 1
5622 EOF
5623
5624 fi
5625
5626 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5627 echo "$as_me:5627: checking if ~/.terminfo is wanted" >&5
5628 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5629
5630 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5631 if test "${enable_home_terminfo+set}" = set; then
5632   enableval="$enable_home_terminfo"
5633   with_home_terminfo=$enableval
5634 else
5635   with_home_terminfo=yes
5636 fi;
5637 echo "$as_me:5637: result: $with_home_terminfo" >&5
5638 echo "${ECHO_T}$with_home_terminfo" >&6
5639 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5640 #define USE_HOME_TERMINFO 1
5641 EOF
5642
5643 echo "$as_me:5643: checking if you want to use restricted environment when running as root" >&5
5644 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5645
5646 # Check whether --enable-root-environ or --disable-root-environ was given.
5647 if test "${enable_root_environ+set}" = set; then
5648   enableval="$enable_root_environ"
5649   with_root_environ=$enableval
5650 else
5651   with_root_environ=yes
5652 fi;
5653 echo "$as_me:5653: result: $with_root_environ" >&5
5654 echo "${ECHO_T}$with_root_environ" >&6
5655 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5656 #define USE_ROOT_ENVIRON 1
5657 EOF
5658
5659 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5660 ###   to reduce storage requirements for the terminfo database.
5661
5662 for ac_func in \
5663         remove \
5664         unlink
5665 do
5666 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5667 echo "$as_me:5667: checking for $ac_func" >&5
5668 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5669 if eval "test \"\${$as_ac_var+set}\" = set"; then
5670   echo $ECHO_N "(cached) $ECHO_C" >&6
5671 else
5672   cat >conftest.$ac_ext <<_ACEOF
5673 #line 5673 "configure"
5674 #include "confdefs.h"
5675 /* System header to define __stub macros and hopefully few prototypes,
5676     which can conflict with char $ac_func (); below.  */
5677 #include <assert.h>
5678 /* Override any gcc2 internal prototype to avoid an error.  */
5679 #ifdef __cplusplus
5680 extern "C"
5681 #endif
5682 /* We use char because int might match the return type of a gcc2
5683    builtin and then its argument prototype would still apply.  */
5684 char $ac_func ();
5685 char (*f) ();
5686
5687 int
5688 main ()
5689 {
5690 /* The GNU C library defines this for functions which it implements
5691     to always fail with ENOSYS.  Some functions are actually named
5692     something starting with __ and the normal name is an alias.  */
5693 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5694 choke me
5695 #else
5696 f = $ac_func;
5697 #endif
5698
5699   ;
5700   return 0;
5701 }
5702 _ACEOF
5703 rm -f conftest.$ac_objext conftest$ac_exeext
5704 if { (eval echo "$as_me:5704: \"$ac_link\"") >&5
5705   (eval $ac_link) 2>&5
5706   ac_status=$?
5707   echo "$as_me:5707: \$? = $ac_status" >&5
5708   (exit $ac_status); } &&
5709          { ac_try='test -s conftest$ac_exeext'
5710   { (eval echo "$as_me:5710: \"$ac_try\"") >&5
5711   (eval $ac_try) 2>&5
5712   ac_status=$?
5713   echo "$as_me:5713: \$? = $ac_status" >&5
5714   (exit $ac_status); }; }; then
5715   eval "$as_ac_var=yes"
5716 else
5717   echo "$as_me: failed program was:" >&5
5718 cat conftest.$ac_ext >&5
5719 eval "$as_ac_var=no"
5720 fi
5721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5722 fi
5723 echo "$as_me:5723: result: `eval echo '${'$as_ac_var'}'`" >&5
5724 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5725 if test `eval echo '${'$as_ac_var'}'` = yes; then
5726   cat >>confdefs.h <<EOF
5727 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5728 EOF
5729
5730 fi
5731 done
5732
5733 if test "$cross_compiling" = yes ; then
5734
5735 for ac_func in \
5736                 link \
5737                 symlink
5738 do
5739 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5740 echo "$as_me:5740: checking for $ac_func" >&5
5741 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5742 if eval "test \"\${$as_ac_var+set}\" = set"; then
5743   echo $ECHO_N "(cached) $ECHO_C" >&6
5744 else
5745   cat >conftest.$ac_ext <<_ACEOF
5746 #line 5746 "configure"
5747 #include "confdefs.h"
5748 /* System header to define __stub macros and hopefully few prototypes,
5749     which can conflict with char $ac_func (); below.  */
5750 #include <assert.h>
5751 /* Override any gcc2 internal prototype to avoid an error.  */
5752 #ifdef __cplusplus
5753 extern "C"
5754 #endif
5755 /* We use char because int might match the return type of a gcc2
5756    builtin and then its argument prototype would still apply.  */
5757 char $ac_func ();
5758 char (*f) ();
5759
5760 int
5761 main ()
5762 {
5763 /* The GNU C library defines this for functions which it implements
5764     to always fail with ENOSYS.  Some functions are actually named
5765     something starting with __ and the normal name is an alias.  */
5766 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5767 choke me
5768 #else
5769 f = $ac_func;
5770 #endif
5771
5772   ;
5773   return 0;
5774 }
5775 _ACEOF
5776 rm -f conftest.$ac_objext conftest$ac_exeext
5777 if { (eval echo "$as_me:5777: \"$ac_link\"") >&5
5778   (eval $ac_link) 2>&5
5779   ac_status=$?
5780   echo "$as_me:5780: \$? = $ac_status" >&5
5781   (exit $ac_status); } &&
5782          { ac_try='test -s conftest$ac_exeext'
5783   { (eval echo "$as_me:5783: \"$ac_try\"") >&5
5784   (eval $ac_try) 2>&5
5785   ac_status=$?
5786   echo "$as_me:5786: \$? = $ac_status" >&5
5787   (exit $ac_status); }; }; then
5788   eval "$as_ac_var=yes"
5789 else
5790   echo "$as_me: failed program was:" >&5
5791 cat conftest.$ac_ext >&5
5792 eval "$as_ac_var=no"
5793 fi
5794 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5795 fi
5796 echo "$as_me:5796: result: `eval echo '${'$as_ac_var'}'`" >&5
5797 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5798 if test `eval echo '${'$as_ac_var'}'` = yes; then
5799   cat >>confdefs.h <<EOF
5800 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5801 EOF
5802
5803 fi
5804 done
5805
5806 else
5807         echo "$as_me:5807: checking if link/symlink functions work" >&5
5808 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5809 if test "${cf_cv_link_funcs+set}" = set; then
5810   echo $ECHO_N "(cached) $ECHO_C" >&6
5811 else
5812
5813                 cf_cv_link_funcs=
5814                 for cf_func in link symlink ; do
5815                         if test "$cross_compiling" = yes; then
5816
5817                         eval 'ac_cv_func_'$cf_func'=error'
5818 else
5819   cat >conftest.$ac_ext <<_ACEOF
5820 #line 5820 "configure"
5821 #include "confdefs.h"
5822
5823 #include <sys/types.h>
5824 #include <sys/stat.h>
5825 #ifdef HAVE_UNISTD_H
5826 #include <unistd.h>
5827 #endif
5828 int main()
5829 {
5830         int fail = 0;
5831         char *src = "config.log";
5832         char *dst = "conftest.chk";
5833         struct stat src_sb;
5834         struct stat dst_sb;
5835
5836         stat(src, &src_sb);
5837         fail = ($cf_func("config.log", "conftest.chk") < 0)
5838             || (stat(dst, &dst_sb) < 0)
5839             || (dst_sb.st_mtime != src_sb.st_mtime);
5840 #ifdef HAVE_UNLINK
5841         unlink(dst);
5842 #else
5843         remove(dst);
5844 #endif
5845         ${cf_cv_main_return:-return} (fail);
5846 }
5847
5848 _ACEOF
5849 rm -f conftest$ac_exeext
5850 if { (eval echo "$as_me:5850: \"$ac_link\"") >&5
5851   (eval $ac_link) 2>&5
5852   ac_status=$?
5853   echo "$as_me:5853: \$? = $ac_status" >&5
5854   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5855   { (eval echo "$as_me:5855: \"$ac_try\"") >&5
5856   (eval $ac_try) 2>&5
5857   ac_status=$?
5858   echo "$as_me:5858: \$? = $ac_status" >&5
5859   (exit $ac_status); }; }; then
5860
5861                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5862                         eval 'ac_cv_func_'$cf_func'=yes'
5863 else
5864   echo "$as_me: program exited with status $ac_status" >&5
5865 echo "$as_me: failed program was:" >&5
5866 cat conftest.$ac_ext >&5
5867
5868                         eval 'ac_cv_func_'$cf_func'=no'
5869 fi
5870 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5871 fi
5872                 done
5873                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5874
5875 fi
5876 echo "$as_me:5876: result: $cf_cv_link_funcs" >&5
5877 echo "${ECHO_T}$cf_cv_link_funcs" >&6
5878         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
5879 #define HAVE_LINK 1
5880 EOF
5881
5882         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
5883 #define HAVE_SYMLINK 1
5884 EOF
5885
5886 fi
5887
5888 with_links=no
5889 with_symlinks=no
5890
5891 # soft links (symbolic links) are useful for some systems where hard links do
5892 # not work, or to make it simpler to copy terminfo trees around.
5893 if test "$ac_cv_func_symlink" = yes ; then
5894     echo "$as_me:5894: checking if tic should use symbolic links" >&5
5895 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
5896
5897 # Check whether --enable-symlinks or --disable-symlinks was given.
5898 if test "${enable_symlinks+set}" = set; then
5899   enableval="$enable_symlinks"
5900   with_symlinks=$enableval
5901 else
5902   with_symlinks=no
5903 fi;
5904     echo "$as_me:5904: result: $with_symlinks" >&5
5905 echo "${ECHO_T}$with_symlinks" >&6
5906 fi
5907
5908 # If we have hard links and did not choose to use soft links instead, there is
5909 # no reason to make this choice optional - use the hard links.
5910 if test "$with_symlinks" = no ; then
5911     echo "$as_me:5911: checking if tic should use hard links" >&5
5912 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
5913     if test "$ac_cv_func_link" = yes ; then
5914         with_links=yes
5915     else
5916         with_links=no
5917     fi
5918     echo "$as_me:5918: result: $with_links" >&5
5919 echo "${ECHO_T}$with_links" >&6
5920 fi
5921
5922 test "$with_links" = yes && cat >>confdefs.h <<\EOF
5923 #define USE_LINKS 1
5924 EOF
5925
5926 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
5927 #define USE_SYMLINKS 1
5928 EOF
5929
5930 ###   use option --enable-broken-linker to force on use of broken-linker support
5931 echo "$as_me:5931: checking if you want broken-linker support code" >&5
5932 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
5933
5934 # Check whether --enable-broken_linker or --disable-broken_linker was given.
5935 if test "${enable_broken_linker+set}" = set; then
5936   enableval="$enable_broken_linker"
5937   with_broken_linker=$enableval
5938 else
5939   with_broken_linker=${BROKEN_LINKER-no}
5940 fi;
5941 echo "$as_me:5941: result: $with_broken_linker" >&5
5942 echo "${ECHO_T}$with_broken_linker" >&6
5943
5944 BROKEN_LINKER=0
5945 if test "$with_broken_linker" = yes ; then
5946         cat >>confdefs.h <<\EOF
5947 #define BROKEN_LINKER 1
5948 EOF
5949
5950         BROKEN_LINKER=1
5951 elif test "$DFT_LWR_MODEL" = shared ; then
5952         case $cf_cv_system_name in #(vi
5953         cygwin*)
5954                 cat >>confdefs.h <<\EOF
5955 #define BROKEN_LINKER 1
5956 EOF
5957
5958                 BROKEN_LINKER=1
5959                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
5960
5961                 ;;
5962         esac
5963 fi
5964
5965 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
5966 echo "$as_me:5966: checking if tputs should process BSD-style prefix padding" >&5
5967 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
5968
5969 # Check whether --enable-bsdpad or --disable-bsdpad was given.
5970 if test "${enable_bsdpad+set}" = set; then
5971   enableval="$enable_bsdpad"
5972   with_bsdpad=$enableval
5973 else
5974   with_bsdpad=no
5975 fi;
5976 echo "$as_me:5976: result: $with_bsdpad" >&5
5977 echo "${ECHO_T}$with_bsdpad" >&6
5978 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
5979 #define BSD_TPUTS 1
5980 EOF
5981
5982 ###   use option --enable-widec to turn on use of wide-character support
5983 NCURSES_CH_T=chtype
5984 NCURSES_LIBUTF8=0
5985
5986 NEED_WCHAR_H=0
5987 NCURSES_MBSTATE_T=0
5988 NCURSES_WCHAR_T=0
5989 NCURSES_WINT_T=0
5990
5991 # Check to define _XOPEN_SOURCE "automatically"
5992
5993 echo "$as_me:5993: checking if $CC -U and -D options work together" >&5
5994 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
5995 if test "${cf_cv_cc_u_d_options+set}" = set; then
5996   echo $ECHO_N "(cached) $ECHO_C" >&6
5997 else
5998
5999         cf_save_CPPFLAGS="$CPPFLAGS"
6000         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6001         cat >conftest.$ac_ext <<_ACEOF
6002 #line 6002 "configure"
6003 #include "confdefs.h"
6004
6005 int
6006 main ()
6007 {
6008
6009 #ifndef U_D_OPTIONS
6010 make an undefined-error
6011 #endif
6012 #ifdef  D_U_OPTIONS
6013 make a defined-error
6014 #endif
6015
6016   ;
6017   return 0;
6018 }
6019 _ACEOF
6020 rm -f conftest.$ac_objext
6021 if { (eval echo "$as_me:6021: \"$ac_compile\"") >&5
6022   (eval $ac_compile) 2>&5
6023   ac_status=$?
6024   echo "$as_me:6024: \$? = $ac_status" >&5
6025   (exit $ac_status); } &&
6026          { ac_try='test -s conftest.$ac_objext'
6027   { (eval echo "$as_me:6027: \"$ac_try\"") >&5
6028   (eval $ac_try) 2>&5
6029   ac_status=$?
6030   echo "$as_me:6030: \$? = $ac_status" >&5
6031   (exit $ac_status); }; }; then
6032
6033         cf_cv_cc_u_d_options=yes
6034 else
6035   echo "$as_me: failed program was:" >&5
6036 cat conftest.$ac_ext >&5
6037
6038         cf_cv_cc_u_d_options=no
6039 fi
6040 rm -f conftest.$ac_objext conftest.$ac_ext
6041         CPPFLAGS="$cf_save_CPPFLAGS"
6042
6043 fi
6044 echo "$as_me:6044: result: $cf_cv_cc_u_d_options" >&5
6045 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6046
6047 cf_XOPEN_SOURCE=500
6048 cf_POSIX_C_SOURCE=199506L
6049
6050 case $host_os in #(vi
6051 aix[45]*) #(vi
6052         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6053         ;;
6054 freebsd*) #(vi
6055         # 5.x headers associate
6056         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6057         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6058         cf_POSIX_C_SOURCE=200112L
6059         cf_XOPEN_SOURCE=600
6060         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6061         ;;
6062 hpux*) #(vi
6063         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6064         ;;
6065 irix[56].*) #(vi
6066         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6067         ;;
6068 linux*|gnu*) #(vi
6069
6070 echo "$as_me:6070: checking if we must define _GNU_SOURCE" >&5
6071 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6072 if test "${cf_cv_gnu_source+set}" = set; then
6073   echo $ECHO_N "(cached) $ECHO_C" >&6
6074 else
6075
6076 cat >conftest.$ac_ext <<_ACEOF
6077 #line 6077 "configure"
6078 #include "confdefs.h"
6079 #include <sys/types.h>
6080 int
6081 main ()
6082 {
6083
6084 #ifndef _XOPEN_SOURCE
6085 make an error
6086 #endif
6087   ;
6088   return 0;
6089 }
6090 _ACEOF
6091 rm -f conftest.$ac_objext
6092 if { (eval echo "$as_me:6092: \"$ac_compile\"") >&5
6093   (eval $ac_compile) 2>&5
6094   ac_status=$?
6095   echo "$as_me:6095: \$? = $ac_status" >&5
6096   (exit $ac_status); } &&
6097          { ac_try='test -s conftest.$ac_objext'
6098   { (eval echo "$as_me:6098: \"$ac_try\"") >&5
6099   (eval $ac_try) 2>&5
6100   ac_status=$?
6101   echo "$as_me:6101: \$? = $ac_status" >&5
6102   (exit $ac_status); }; }; then
6103   cf_cv_gnu_source=no
6104 else
6105   echo "$as_me: failed program was:" >&5
6106 cat conftest.$ac_ext >&5
6107 cf_save="$CPPFLAGS"
6108          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6109          cat >conftest.$ac_ext <<_ACEOF
6110 #line 6110 "configure"
6111 #include "confdefs.h"
6112 #include <sys/types.h>
6113 int
6114 main ()
6115 {
6116
6117 #ifdef _XOPEN_SOURCE
6118 make an error
6119 #endif
6120   ;
6121   return 0;
6122 }
6123 _ACEOF
6124 rm -f conftest.$ac_objext
6125 if { (eval echo "$as_me:6125: \"$ac_compile\"") >&5
6126   (eval $ac_compile) 2>&5
6127   ac_status=$?
6128   echo "$as_me:6128: \$? = $ac_status" >&5
6129   (exit $ac_status); } &&
6130          { ac_try='test -s conftest.$ac_objext'
6131   { (eval echo "$as_me:6131: \"$ac_try\"") >&5
6132   (eval $ac_try) 2>&5
6133   ac_status=$?
6134   echo "$as_me:6134: \$? = $ac_status" >&5
6135   (exit $ac_status); }; }; then
6136   cf_cv_gnu_source=no
6137 else
6138   echo "$as_me: failed program was:" >&5
6139 cat conftest.$ac_ext >&5
6140 cf_cv_gnu_source=yes
6141 fi
6142 rm -f conftest.$ac_objext conftest.$ac_ext
6143         CPPFLAGS="$cf_save"
6144
6145 fi
6146 rm -f conftest.$ac_objext conftest.$ac_ext
6147
6148 fi
6149 echo "$as_me:6149: result: $cf_cv_gnu_source" >&5
6150 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6151 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6152
6153         ;;
6154 mirbsd*) #(vi
6155         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6156         ;;
6157 netbsd*) #(vi
6158         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6159         ;;
6160 openbsd*) #(vi
6161         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6162         ;;
6163 osf[45]*) #(vi
6164         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6165         ;;
6166 nto-qnx*) #(vi
6167         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6168         ;;
6169 sco*) #(vi
6170         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6171         ;;
6172 solaris*) #(vi
6173         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6174         ;;
6175 *)
6176         echo "$as_me:6176: checking if we should define _XOPEN_SOURCE" >&5
6177 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6178 if test "${cf_cv_xopen_source+set}" = set; then
6179   echo $ECHO_N "(cached) $ECHO_C" >&6
6180 else
6181
6182         cat >conftest.$ac_ext <<_ACEOF
6183 #line 6183 "configure"
6184 #include "confdefs.h"
6185 #include <sys/types.h>
6186 int
6187 main ()
6188 {
6189
6190 #ifndef _XOPEN_SOURCE
6191 make an error
6192 #endif
6193   ;
6194   return 0;
6195 }
6196 _ACEOF
6197 rm -f conftest.$ac_objext
6198 if { (eval echo "$as_me:6198: \"$ac_compile\"") >&5
6199   (eval $ac_compile) 2>&5
6200   ac_status=$?
6201   echo "$as_me:6201: \$? = $ac_status" >&5
6202   (exit $ac_status); } &&
6203          { ac_try='test -s conftest.$ac_objext'
6204   { (eval echo "$as_me:6204: \"$ac_try\"") >&5
6205   (eval $ac_try) 2>&5
6206   ac_status=$?
6207   echo "$as_me:6207: \$? = $ac_status" >&5
6208   (exit $ac_status); }; }; then
6209   cf_cv_xopen_source=no
6210 else
6211   echo "$as_me: failed program was:" >&5
6212 cat conftest.$ac_ext >&5
6213 cf_save="$CPPFLAGS"
6214          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6215          cat >conftest.$ac_ext <<_ACEOF
6216 #line 6216 "configure"
6217 #include "confdefs.h"
6218 #include <sys/types.h>
6219 int
6220 main ()
6221 {
6222
6223 #ifdef _XOPEN_SOURCE
6224 make an error
6225 #endif
6226   ;
6227   return 0;
6228 }
6229 _ACEOF
6230 rm -f conftest.$ac_objext
6231 if { (eval echo "$as_me:6231: \"$ac_compile\"") >&5
6232   (eval $ac_compile) 2>&5
6233   ac_status=$?
6234   echo "$as_me:6234: \$? = $ac_status" >&5
6235   (exit $ac_status); } &&
6236          { ac_try='test -s conftest.$ac_objext'
6237   { (eval echo "$as_me:6237: \"$ac_try\"") >&5
6238   (eval $ac_try) 2>&5
6239   ac_status=$?
6240   echo "$as_me:6240: \$? = $ac_status" >&5
6241   (exit $ac_status); }; }; then
6242   cf_cv_xopen_source=no
6243 else
6244   echo "$as_me: failed program was:" >&5
6245 cat conftest.$ac_ext >&5
6246 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6247 fi
6248 rm -f conftest.$ac_objext conftest.$ac_ext
6249         CPPFLAGS="$cf_save"
6250
6251 fi
6252 rm -f conftest.$ac_objext conftest.$ac_ext
6253
6254 fi
6255 echo "$as_me:6255: result: $cf_cv_xopen_source" >&5
6256 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6257         if test "$cf_cv_xopen_source" != no ; then
6258
6259 # remove _XOPEN_SOURCE symbol from $CFLAGS
6260 CFLAGS=`echo "$CFLAGS" | \
6261         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6262                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6263
6264 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6265 CPPFLAGS=`echo "$CPPFLAGS" | \
6266         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6267                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6268
6269                 test "$cf_cv_cc_u_d_options" = yes && \
6270                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6271                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6272         fi
6273
6274 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6275
6276 cf_save_CFLAGS="$CFLAGS"
6277 cf_save_CPPFLAGS="$CPPFLAGS"
6278
6279 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6280 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6281         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6282                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6283
6284 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6285 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6286         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6287                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6288
6289 echo "$as_me:6289: checking if we should define _POSIX_C_SOURCE" >&5
6290 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6291 if test "${cf_cv_posix_c_source+set}" = set; then
6292   echo $ECHO_N "(cached) $ECHO_C" >&6
6293 else
6294
6295 echo "(line 6295) testing if the symbol is already defined go no further ..." 1>&5
6296
6297         cat >conftest.$ac_ext <<_ACEOF
6298 #line 6298 "configure"
6299 #include "confdefs.h"
6300 #include <sys/types.h>
6301 int
6302 main ()
6303 {
6304
6305 #ifndef _POSIX_C_SOURCE
6306 make an error
6307 #endif
6308   ;
6309   return 0;
6310 }
6311 _ACEOF
6312 rm -f conftest.$ac_objext
6313 if { (eval echo "$as_me:6313: \"$ac_compile\"") >&5
6314   (eval $ac_compile) 2>&5
6315   ac_status=$?
6316   echo "$as_me:6316: \$? = $ac_status" >&5
6317   (exit $ac_status); } &&
6318          { ac_try='test -s conftest.$ac_objext'
6319   { (eval echo "$as_me:6319: \"$ac_try\"") >&5
6320   (eval $ac_try) 2>&5
6321   ac_status=$?
6322   echo "$as_me:6322: \$? = $ac_status" >&5
6323   (exit $ac_status); }; }; then
6324   cf_cv_posix_c_source=no
6325 else
6326   echo "$as_me: failed program was:" >&5
6327 cat conftest.$ac_ext >&5
6328 cf_want_posix_source=no
6329          case .$cf_POSIX_C_SOURCE in #(vi
6330          .[12]??*) #(vi
6331                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6332                 ;;
6333          .2) #(vi
6334                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6335                 cf_want_posix_source=yes
6336                 ;;
6337          .*)
6338                 cf_want_posix_source=yes
6339                 ;;
6340          esac
6341          if test "$cf_want_posix_source" = yes ; then
6342                 cat >conftest.$ac_ext <<_ACEOF
6343 #line 6343 "configure"
6344 #include "confdefs.h"
6345 #include <sys/types.h>
6346 int
6347 main ()
6348 {
6349
6350 #ifdef _POSIX_SOURCE
6351 make an error
6352 #endif
6353   ;
6354   return 0;
6355 }
6356 _ACEOF
6357 rm -f conftest.$ac_objext
6358 if { (eval echo "$as_me:6358: \"$ac_compile\"") >&5
6359   (eval $ac_compile) 2>&5
6360   ac_status=$?
6361   echo "$as_me:6361: \$? = $ac_status" >&5
6362   (exit $ac_status); } &&
6363          { ac_try='test -s conftest.$ac_objext'
6364   { (eval echo "$as_me:6364: \"$ac_try\"") >&5
6365   (eval $ac_try) 2>&5
6366   ac_status=$?
6367   echo "$as_me:6367: \$? = $ac_status" >&5
6368   (exit $ac_status); }; }; then
6369   :
6370 else
6371   echo "$as_me: failed program was:" >&5
6372 cat conftest.$ac_ext >&5
6373 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6374 fi
6375 rm -f conftest.$ac_objext conftest.$ac_ext
6376          fi
6377
6378 echo "(line 6378) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6379
6380          CFLAGS="$cf_trim_CFLAGS"
6381          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6382
6383 echo "(line 6383) testing if the second compile does not leave our definition intact error ..." 1>&5
6384
6385          cat >conftest.$ac_ext <<_ACEOF
6386 #line 6386 "configure"
6387 #include "confdefs.h"
6388 #include <sys/types.h>
6389 int
6390 main ()
6391 {
6392
6393 #ifndef _POSIX_C_SOURCE
6394 make an error
6395 #endif
6396   ;
6397   return 0;
6398 }
6399 _ACEOF
6400 rm -f conftest.$ac_objext
6401 if { (eval echo "$as_me:6401: \"$ac_compile\"") >&5
6402   (eval $ac_compile) 2>&5
6403   ac_status=$?
6404   echo "$as_me:6404: \$? = $ac_status" >&5
6405   (exit $ac_status); } &&
6406          { ac_try='test -s conftest.$ac_objext'
6407   { (eval echo "$as_me:6407: \"$ac_try\"") >&5
6408   (eval $ac_try) 2>&5
6409   ac_status=$?
6410   echo "$as_me:6410: \$? = $ac_status" >&5
6411   (exit $ac_status); }; }; then
6412   :
6413 else
6414   echo "$as_me: failed program was:" >&5
6415 cat conftest.$ac_ext >&5
6416 cf_cv_posix_c_source=no
6417 fi
6418 rm -f conftest.$ac_objext conftest.$ac_ext
6419          CFLAGS="$cf_save_CFLAGS"
6420          CPPFLAGS="$cf_save_CPPFLAGS"
6421
6422 fi
6423 rm -f conftest.$ac_objext conftest.$ac_ext
6424
6425 fi
6426 echo "$as_me:6426: result: $cf_cv_posix_c_source" >&5
6427 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6428
6429 if test "$cf_cv_posix_c_source" != no ; then
6430         CFLAGS="$cf_trim_CFLAGS"
6431         CPPFLAGS="$cf_trim_CPPFLAGS"
6432         if test "$cf_cv_cc_u_d_options" = yes ; then
6433                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6434                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6435                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6436         fi
6437         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6438 fi
6439
6440         ;;
6441 esac
6442
6443 # Work around breakage on OS X
6444
6445 echo "$as_me:6445: checking if SIGWINCH is defined" >&5
6446 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6447 if test "${cf_cv_define_sigwinch+set}" = set; then
6448   echo $ECHO_N "(cached) $ECHO_C" >&6
6449 else
6450
6451         cat >conftest.$ac_ext <<_ACEOF
6452 #line 6452 "configure"
6453 #include "confdefs.h"
6454
6455 #include <sys/types.h>
6456 #include <sys/signal.h>
6457
6458 int
6459 main ()
6460 {
6461 int x = SIGWINCH
6462   ;
6463   return 0;
6464 }
6465 _ACEOF
6466 rm -f conftest.$ac_objext
6467 if { (eval echo "$as_me:6467: \"$ac_compile\"") >&5
6468   (eval $ac_compile) 2>&5
6469   ac_status=$?
6470   echo "$as_me:6470: \$? = $ac_status" >&5
6471   (exit $ac_status); } &&
6472          { ac_try='test -s conftest.$ac_objext'
6473   { (eval echo "$as_me:6473: \"$ac_try\"") >&5
6474   (eval $ac_try) 2>&5
6475   ac_status=$?
6476   echo "$as_me:6476: \$? = $ac_status" >&5
6477   (exit $ac_status); }; }; then
6478   cf_cv_define_sigwinch=yes
6479 else
6480   echo "$as_me: failed program was:" >&5
6481 cat conftest.$ac_ext >&5
6482 cat >conftest.$ac_ext <<_ACEOF
6483 #line 6483 "configure"
6484 #include "confdefs.h"
6485
6486 #undef _XOPEN_SOURCE
6487 #undef _POSIX_SOURCE
6488 #undef _POSIX_C_SOURCE
6489 #include <sys/types.h>
6490 #include <sys/signal.h>
6491
6492 int
6493 main ()
6494 {
6495 int x = SIGWINCH
6496   ;
6497   return 0;
6498 }
6499 _ACEOF
6500 rm -f conftest.$ac_objext
6501 if { (eval echo "$as_me:6501: \"$ac_compile\"") >&5
6502   (eval $ac_compile) 2>&5
6503   ac_status=$?
6504   echo "$as_me:6504: \$? = $ac_status" >&5
6505   (exit $ac_status); } &&
6506          { ac_try='test -s conftest.$ac_objext'
6507   { (eval echo "$as_me:6507: \"$ac_try\"") >&5
6508   (eval $ac_try) 2>&5
6509   ac_status=$?
6510   echo "$as_me:6510: \$? = $ac_status" >&5
6511   (exit $ac_status); }; }; then
6512   cf_cv_define_sigwinch=maybe
6513 else
6514   echo "$as_me: failed program was:" >&5
6515 cat conftest.$ac_ext >&5
6516 cf_cv_define_sigwinch=no
6517 fi
6518 rm -f conftest.$ac_objext conftest.$ac_ext
6519
6520 fi
6521 rm -f conftest.$ac_objext conftest.$ac_ext
6522
6523 fi
6524 echo "$as_me:6524: result: $cf_cv_define_sigwinch" >&5
6525 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6526
6527 if test "$cf_cv_define_sigwinch" = maybe ; then
6528 echo "$as_me:6528: checking for actual SIGWINCH definition" >&5
6529 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6530 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6531   echo $ECHO_N "(cached) $ECHO_C" >&6
6532 else
6533
6534 cf_cv_fixup_sigwinch=unknown
6535 cf_sigwinch=32
6536 while test $cf_sigwinch != 1
6537 do
6538         cat >conftest.$ac_ext <<_ACEOF
6539 #line 6539 "configure"
6540 #include "confdefs.h"
6541
6542 #undef _XOPEN_SOURCE
6543 #undef _POSIX_SOURCE
6544 #undef _POSIX_C_SOURCE
6545 #include <sys/types.h>
6546 #include <sys/signal.h>
6547
6548 int
6549 main ()
6550 {
6551
6552 #if SIGWINCH != $cf_sigwinch
6553 make an error
6554 #endif
6555 int x = SIGWINCH
6556   ;
6557   return 0;
6558 }
6559 _ACEOF
6560 rm -f conftest.$ac_objext
6561 if { (eval echo "$as_me:6561: \"$ac_compile\"") >&5
6562   (eval $ac_compile) 2>&5
6563   ac_status=$?
6564   echo "$as_me:6564: \$? = $ac_status" >&5
6565   (exit $ac_status); } &&
6566          { ac_try='test -s conftest.$ac_objext'
6567   { (eval echo "$as_me:6567: \"$ac_try\"") >&5
6568   (eval $ac_try) 2>&5
6569   ac_status=$?
6570   echo "$as_me:6570: \$? = $ac_status" >&5
6571   (exit $ac_status); }; }; then
6572   cf_cv_fixup_sigwinch=$cf_sigwinch
6573          break
6574 else
6575   echo "$as_me: failed program was:" >&5
6576 cat conftest.$ac_ext >&5
6577 fi
6578 rm -f conftest.$ac_objext conftest.$ac_ext
6579
6580 cf_sigwinch=`expr $cf_sigwinch - 1`
6581 done
6582
6583 fi
6584 echo "$as_me:6584: result: $cf_cv_fixup_sigwinch" >&5
6585 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6586
6587         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6588                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6589         fi
6590 fi
6591
6592 # Checks for CODESET support.
6593
6594   echo "$as_me:6594: checking for nl_langinfo and CODESET" >&5
6595 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6596 if test "${am_cv_langinfo_codeset+set}" = set; then
6597   echo $ECHO_N "(cached) $ECHO_C" >&6
6598 else
6599   cat >conftest.$ac_ext <<_ACEOF
6600 #line 6600 "configure"
6601 #include "confdefs.h"
6602 #include <langinfo.h>
6603 int
6604 main ()
6605 {
6606 char* cs = nl_langinfo(CODESET);
6607   ;
6608   return 0;
6609 }
6610 _ACEOF
6611 rm -f conftest.$ac_objext conftest$ac_exeext
6612 if { (eval echo "$as_me:6612: \"$ac_link\"") >&5
6613   (eval $ac_link) 2>&5
6614   ac_status=$?
6615   echo "$as_me:6615: \$? = $ac_status" >&5
6616   (exit $ac_status); } &&
6617          { ac_try='test -s conftest$ac_exeext'
6618   { (eval echo "$as_me:6618: \"$ac_try\"") >&5
6619   (eval $ac_try) 2>&5
6620   ac_status=$?
6621   echo "$as_me:6621: \$? = $ac_status" >&5
6622   (exit $ac_status); }; }; then
6623   am_cv_langinfo_codeset=yes
6624 else
6625   echo "$as_me: failed program was:" >&5
6626 cat conftest.$ac_ext >&5
6627 am_cv_langinfo_codeset=no
6628 fi
6629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6630
6631 fi
6632 echo "$as_me:6632: result: $am_cv_langinfo_codeset" >&5
6633 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6634   if test $am_cv_langinfo_codeset = yes; then
6635
6636 cat >>confdefs.h <<\EOF
6637 #define HAVE_LANGINFO_CODESET 1
6638 EOF
6639
6640   fi
6641
6642 # use these variables to work around a defect in gcc's fixincludes.
6643 NCURSES_OK_WCHAR_T=
6644 NCURSES_OK_WINT_T=
6645
6646 echo "$as_me:6646: checking if you want wide-character code" >&5
6647 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6648
6649 # Check whether --enable-widec or --disable-widec was given.
6650 if test "${enable_widec+set}" = set; then
6651   enableval="$enable_widec"
6652   with_widec=$enableval
6653 else
6654   with_widec=no
6655 fi;
6656 echo "$as_me:6656: result: $with_widec" >&5
6657 echo "${ECHO_T}$with_widec" >&6
6658 if test "$with_widec" = yes ; then
6659         LIB_SUFFIX="w${LIB_SUFFIX}"
6660         cat >>confdefs.h <<\EOF
6661 #define USE_WIDEC_SUPPORT 1
6662 EOF
6663
6664 echo "$as_me:6664: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6665 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6666 cat >conftest.$ac_ext <<_ACEOF
6667 #line 6667 "configure"
6668 #include "confdefs.h"
6669 #include <sys/types.h>
6670
6671 int
6672 main ()
6673 {
6674
6675 #ifndef _XOPEN_SOURCE_EXTENDED
6676 make an error
6677 #endif
6678   ;
6679   return 0;
6680 }
6681 _ACEOF
6682 rm -f conftest.$ac_objext
6683 if { (eval echo "$as_me:6683: \"$ac_compile\"") >&5
6684   (eval $ac_compile) 2>&5
6685   ac_status=$?
6686   echo "$as_me:6686: \$? = $ac_status" >&5
6687   (exit $ac_status); } &&
6688          { ac_try='test -s conftest.$ac_objext'
6689   { (eval echo "$as_me:6689: \"$ac_try\"") >&5
6690   (eval $ac_try) 2>&5
6691   ac_status=$?
6692   echo "$as_me:6692: \$? = $ac_status" >&5
6693   (exit $ac_status); }; }; then
6694   cf_result=no
6695 else
6696   echo "$as_me: failed program was:" >&5
6697 cat conftest.$ac_ext >&5
6698 cf_result=yes
6699 fi
6700 rm -f conftest.$ac_objext conftest.$ac_ext
6701 echo "$as_me:6701: result: $cf_result" >&5
6702 echo "${ECHO_T}$cf_result" >&6
6703
6704 if test "$cf_result" = yes ; then
6705         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6706 elif test "x" != "x" ; then
6707         echo "$as_me:6707: checking checking for compatible value versus " >&5
6708 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6709         cat >conftest.$ac_ext <<_ACEOF
6710 #line 6710 "configure"
6711 #include "confdefs.h"
6712 #include <sys/types.h>
6713
6714 int
6715 main ()
6716 {
6717
6718 #if _XOPEN_SOURCE_EXTENDED- < 0
6719 make an error
6720 #endif
6721   ;
6722   return 0;
6723 }
6724 _ACEOF
6725 rm -f conftest.$ac_objext
6726 if { (eval echo "$as_me:6726: \"$ac_compile\"") >&5
6727   (eval $ac_compile) 2>&5
6728   ac_status=$?
6729   echo "$as_me:6729: \$? = $ac_status" >&5
6730   (exit $ac_status); } &&
6731          { ac_try='test -s conftest.$ac_objext'
6732   { (eval echo "$as_me:6732: \"$ac_try\"") >&5
6733   (eval $ac_try) 2>&5
6734   ac_status=$?
6735   echo "$as_me:6735: \$? = $ac_status" >&5
6736   (exit $ac_status); }; }; then
6737   cf_result=yes
6738 else
6739   echo "$as_me: failed program was:" >&5
6740 cat conftest.$ac_ext >&5
6741 cf_result=no
6742 fi
6743 rm -f conftest.$ac_objext conftest.$ac_ext
6744         echo "$as_me:6744: result: $cf_result" >&5
6745 echo "${ECHO_T}$cf_result" >&6
6746         if test "$cf_result" = no ; then
6747                 # perhaps we can override it - try...
6748                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6749         fi
6750 fi
6751
6752         # with_overwrite=no
6753         NCURSES_CH_T=cchar_t
6754
6755 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6756 do
6757 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6758 echo "$as_me:6758: checking for $ac_func" >&5
6759 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6760 if eval "test \"\${$as_ac_var+set}\" = set"; then
6761   echo $ECHO_N "(cached) $ECHO_C" >&6
6762 else
6763   cat >conftest.$ac_ext <<_ACEOF
6764 #line 6764 "configure"
6765 #include "confdefs.h"
6766 /* System header to define __stub macros and hopefully few prototypes,
6767     which can conflict with char $ac_func (); below.  */
6768 #include <assert.h>
6769 /* Override any gcc2 internal prototype to avoid an error.  */
6770 #ifdef __cplusplus
6771 extern "C"
6772 #endif
6773 /* We use char because int might match the return type of a gcc2
6774    builtin and then its argument prototype would still apply.  */
6775 char $ac_func ();
6776 char (*f) ();
6777
6778 int
6779 main ()
6780 {
6781 /* The GNU C library defines this for functions which it implements
6782     to always fail with ENOSYS.  Some functions are actually named
6783     something starting with __ and the normal name is an alias.  */
6784 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6785 choke me
6786 #else
6787 f = $ac_func;
6788 #endif
6789
6790   ;
6791   return 0;
6792 }
6793 _ACEOF
6794 rm -f conftest.$ac_objext conftest$ac_exeext
6795 if { (eval echo "$as_me:6795: \"$ac_link\"") >&5
6796   (eval $ac_link) 2>&5
6797   ac_status=$?
6798   echo "$as_me:6798: \$? = $ac_status" >&5
6799   (exit $ac_status); } &&
6800          { ac_try='test -s conftest$ac_exeext'
6801   { (eval echo "$as_me:6801: \"$ac_try\"") >&5
6802   (eval $ac_try) 2>&5
6803   ac_status=$?
6804   echo "$as_me:6804: \$? = $ac_status" >&5
6805   (exit $ac_status); }; }; then
6806   eval "$as_ac_var=yes"
6807 else
6808   echo "$as_me: failed program was:" >&5
6809 cat conftest.$ac_ext >&5
6810 eval "$as_ac_var=no"
6811 fi
6812 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6813 fi
6814 echo "$as_me:6814: result: `eval echo '${'$as_ac_var'}'`" >&5
6815 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6816 if test `eval echo '${'$as_ac_var'}'` = yes; then
6817   cat >>confdefs.h <<EOF
6818 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6819 EOF
6820
6821 fi
6822 done
6823
6824         if test "$ac_cv_func_putwc" != yes ; then
6825
6826 echo "$as_me:6826: checking for putwc in libutf8" >&5
6827 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6828 if test "${cf_cv_libutf8+set}" = set; then
6829   echo $ECHO_N "(cached) $ECHO_C" >&6
6830 else
6831
6832         cf_save_LIBS="$LIBS"
6833         LIBS="-lutf8 $LIBS"
6834 cat >conftest.$ac_ext <<_ACEOF
6835 #line 6835 "configure"
6836 #include "confdefs.h"
6837
6838 #include <libutf8.h>
6839 int
6840 main ()
6841 {
6842 putwc(0,0);
6843   ;
6844   return 0;
6845 }
6846 _ACEOF
6847 rm -f conftest.$ac_objext conftest$ac_exeext
6848 if { (eval echo "$as_me:6848: \"$ac_link\"") >&5
6849   (eval $ac_link) 2>&5
6850   ac_status=$?
6851   echo "$as_me:6851: \$? = $ac_status" >&5
6852   (exit $ac_status); } &&
6853          { ac_try='test -s conftest$ac_exeext'
6854   { (eval echo "$as_me:6854: \"$ac_try\"") >&5
6855   (eval $ac_try) 2>&5
6856   ac_status=$?
6857   echo "$as_me:6857: \$? = $ac_status" >&5
6858   (exit $ac_status); }; }; then
6859   cf_cv_libutf8=yes
6860 else
6861   echo "$as_me: failed program was:" >&5
6862 cat conftest.$ac_ext >&5
6863 cf_cv_libutf8=no
6864 fi
6865 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6866         LIBS="$cf_save_LIBS"
6867
6868 fi
6869 echo "$as_me:6869: result: $cf_cv_libutf8" >&5
6870 echo "${ECHO_T}$cf_cv_libutf8" >&6
6871
6872 if test "$cf_cv_libutf8" = yes ; then
6873         cat >>confdefs.h <<\EOF
6874 #define HAVE_LIBUTF8_H 1
6875 EOF
6876
6877         LIBS="-lutf8 $LIBS"
6878 fi
6879
6880                 if test "$cf_cv_libutf8" = yes ; then
6881                         NCURSES_LIBUTF8=1
6882                 fi
6883         fi
6884
6885 # This is needed on Tru64 5.0 to declare mbstate_t
6886 echo "$as_me:6886: checking if we must include wchar.h to declare mbstate_t" >&5
6887 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
6888 if test "${cf_cv_mbstate_t+set}" = set; then
6889   echo $ECHO_N "(cached) $ECHO_C" >&6
6890 else
6891
6892 cat >conftest.$ac_ext <<_ACEOF
6893 #line 6893 "configure"
6894 #include "confdefs.h"
6895
6896 #include <stdlib.h>
6897 #include <stdarg.h>
6898 #include <stdio.h>
6899 #ifdef HAVE_LIBUTF8_H
6900 #include <libutf8.h>
6901 #endif
6902 int
6903 main ()
6904 {
6905 mbstate_t state
6906   ;
6907   return 0;
6908 }
6909 _ACEOF
6910 rm -f conftest.$ac_objext
6911 if { (eval echo "$as_me:6911: \"$ac_compile\"") >&5
6912   (eval $ac_compile) 2>&5
6913   ac_status=$?
6914   echo "$as_me:6914: \$? = $ac_status" >&5
6915   (exit $ac_status); } &&
6916          { ac_try='test -s conftest.$ac_objext'
6917   { (eval echo "$as_me:6917: \"$ac_try\"") >&5
6918   (eval $ac_try) 2>&5
6919   ac_status=$?
6920   echo "$as_me:6920: \$? = $ac_status" >&5
6921   (exit $ac_status); }; }; then
6922   cf_cv_mbstate_t=no
6923 else
6924   echo "$as_me: failed program was:" >&5
6925 cat conftest.$ac_ext >&5
6926 cat >conftest.$ac_ext <<_ACEOF
6927 #line 6927 "configure"
6928 #include "confdefs.h"
6929
6930 #include <stdlib.h>
6931 #include <stdarg.h>
6932 #include <stdio.h>
6933 #include <wchar.h>
6934 #ifdef HAVE_LIBUTF8_H
6935 #include <libutf8.h>
6936 #endif
6937 int
6938 main ()
6939 {
6940 mbstate_t value
6941   ;
6942   return 0;
6943 }
6944 _ACEOF
6945 rm -f conftest.$ac_objext
6946 if { (eval echo "$as_me:6946: \"$ac_compile\"") >&5
6947   (eval $ac_compile) 2>&5
6948   ac_status=$?
6949   echo "$as_me:6949: \$? = $ac_status" >&5
6950   (exit $ac_status); } &&
6951          { ac_try='test -s conftest.$ac_objext'
6952   { (eval echo "$as_me:6952: \"$ac_try\"") >&5
6953   (eval $ac_try) 2>&5
6954   ac_status=$?
6955   echo "$as_me:6955: \$? = $ac_status" >&5
6956   (exit $ac_status); }; }; then
6957   cf_cv_mbstate_t=yes
6958 else
6959   echo "$as_me: failed program was:" >&5
6960 cat conftest.$ac_ext >&5
6961 cf_cv_mbstate_t=unknown
6962 fi
6963 rm -f conftest.$ac_objext conftest.$ac_ext
6964 fi
6965 rm -f conftest.$ac_objext conftest.$ac_ext
6966 fi
6967 echo "$as_me:6967: result: $cf_cv_mbstate_t" >&5
6968 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
6969
6970 if test "$cf_cv_mbstate_t" = yes ; then
6971         cat >>confdefs.h <<\EOF
6972 #define NEED_WCHAR_H 1
6973 EOF
6974
6975         NEED_WCHAR_H=1
6976 fi
6977
6978 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
6979 if test "$cf_cv_mbstate_t" = unknown ; then
6980         NCURSES_MBSTATE_T=1
6981 fi
6982
6983 # This is needed on Tru64 5.0 to declare wchar_t
6984 echo "$as_me:6984: checking if we must include wchar.h to declare wchar_t" >&5
6985 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
6986 if test "${cf_cv_wchar_t+set}" = set; then
6987   echo $ECHO_N "(cached) $ECHO_C" >&6
6988 else
6989
6990 cat >conftest.$ac_ext <<_ACEOF
6991 #line 6991 "configure"
6992 #include "confdefs.h"
6993
6994 #include <stdlib.h>
6995 #include <stdarg.h>
6996 #include <stdio.h>
6997 #ifdef HAVE_LIBUTF8_H
6998 #include <libutf8.h>
6999 #endif
7000 int
7001 main ()
7002 {
7003 wchar_t state
7004   ;
7005   return 0;
7006 }
7007 _ACEOF
7008 rm -f conftest.$ac_objext
7009 if { (eval echo "$as_me:7009: \"$ac_compile\"") >&5
7010   (eval $ac_compile) 2>&5
7011   ac_status=$?
7012   echo "$as_me:7012: \$? = $ac_status" >&5
7013   (exit $ac_status); } &&
7014          { ac_try='test -s conftest.$ac_objext'
7015   { (eval echo "$as_me:7015: \"$ac_try\"") >&5
7016   (eval $ac_try) 2>&5
7017   ac_status=$?
7018   echo "$as_me:7018: \$? = $ac_status" >&5
7019   (exit $ac_status); }; }; then
7020   cf_cv_wchar_t=no
7021 else
7022   echo "$as_me: failed program was:" >&5
7023 cat conftest.$ac_ext >&5
7024 cat >conftest.$ac_ext <<_ACEOF
7025 #line 7025 "configure"
7026 #include "confdefs.h"
7027
7028 #include <stdlib.h>
7029 #include <stdarg.h>
7030 #include <stdio.h>
7031 #include <wchar.h>
7032 #ifdef HAVE_LIBUTF8_H
7033 #include <libutf8.h>
7034 #endif
7035 int
7036 main ()
7037 {
7038 wchar_t value
7039   ;
7040   return 0;
7041 }
7042 _ACEOF
7043 rm -f conftest.$ac_objext
7044 if { (eval echo "$as_me:7044: \"$ac_compile\"") >&5
7045   (eval $ac_compile) 2>&5
7046   ac_status=$?
7047   echo "$as_me:7047: \$? = $ac_status" >&5
7048   (exit $ac_status); } &&
7049          { ac_try='test -s conftest.$ac_objext'
7050   { (eval echo "$as_me:7050: \"$ac_try\"") >&5
7051   (eval $ac_try) 2>&5
7052   ac_status=$?
7053   echo "$as_me:7053: \$? = $ac_status" >&5
7054   (exit $ac_status); }; }; then
7055   cf_cv_wchar_t=yes
7056 else
7057   echo "$as_me: failed program was:" >&5
7058 cat conftest.$ac_ext >&5
7059 cf_cv_wchar_t=unknown
7060 fi
7061 rm -f conftest.$ac_objext conftest.$ac_ext
7062 fi
7063 rm -f conftest.$ac_objext conftest.$ac_ext
7064 fi
7065 echo "$as_me:7065: result: $cf_cv_wchar_t" >&5
7066 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7067
7068 if test "$cf_cv_wchar_t" = yes ; then
7069         cat >>confdefs.h <<\EOF
7070 #define NEED_WCHAR_H 1
7071 EOF
7072
7073         NEED_WCHAR_H=1
7074 fi
7075
7076 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7077 if test "$cf_cv_wchar_t" = unknown ; then
7078         NCURSES_WCHAR_T=1
7079 fi
7080
7081 # if we find wchar_t in either place, use substitution to provide a fallback.
7082 if test "$cf_cv_wchar_t" != unknown ; then
7083         NCURSES_OK_WCHAR_T=1
7084 fi
7085
7086 # This is needed on Tru64 5.0 to declare wint_t
7087 echo "$as_me:7087: checking if we must include wchar.h to declare wint_t" >&5
7088 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7089 if test "${cf_cv_wint_t+set}" = set; then
7090   echo $ECHO_N "(cached) $ECHO_C" >&6
7091 else
7092
7093 cat >conftest.$ac_ext <<_ACEOF
7094 #line 7094 "configure"
7095 #include "confdefs.h"
7096
7097 #include <stdlib.h>
7098 #include <stdarg.h>
7099 #include <stdio.h>
7100 #ifdef HAVE_LIBUTF8_H
7101 #include <libutf8.h>
7102 #endif
7103 int
7104 main ()
7105 {
7106 wint_t state
7107   ;
7108   return 0;
7109 }
7110 _ACEOF
7111 rm -f conftest.$ac_objext
7112 if { (eval echo "$as_me:7112: \"$ac_compile\"") >&5
7113   (eval $ac_compile) 2>&5
7114   ac_status=$?
7115   echo "$as_me:7115: \$? = $ac_status" >&5
7116   (exit $ac_status); } &&
7117          { ac_try='test -s conftest.$ac_objext'
7118   { (eval echo "$as_me:7118: \"$ac_try\"") >&5
7119   (eval $ac_try) 2>&5
7120   ac_status=$?
7121   echo "$as_me:7121: \$? = $ac_status" >&5
7122   (exit $ac_status); }; }; then
7123   cf_cv_wint_t=no
7124 else
7125   echo "$as_me: failed program was:" >&5
7126 cat conftest.$ac_ext >&5
7127 cat >conftest.$ac_ext <<_ACEOF
7128 #line 7128 "configure"
7129 #include "confdefs.h"
7130
7131 #include <stdlib.h>
7132 #include <stdarg.h>
7133 #include <stdio.h>
7134 #include <wchar.h>
7135 #ifdef HAVE_LIBUTF8_H
7136 #include <libutf8.h>
7137 #endif
7138 int
7139 main ()
7140 {
7141 wint_t value
7142   ;
7143   return 0;
7144 }
7145 _ACEOF
7146 rm -f conftest.$ac_objext
7147 if { (eval echo "$as_me:7147: \"$ac_compile\"") >&5
7148   (eval $ac_compile) 2>&5
7149   ac_status=$?
7150   echo "$as_me:7150: \$? = $ac_status" >&5
7151   (exit $ac_status); } &&
7152          { ac_try='test -s conftest.$ac_objext'
7153   { (eval echo "$as_me:7153: \"$ac_try\"") >&5
7154   (eval $ac_try) 2>&5
7155   ac_status=$?
7156   echo "$as_me:7156: \$? = $ac_status" >&5
7157   (exit $ac_status); }; }; then
7158   cf_cv_wint_t=yes
7159 else
7160   echo "$as_me: failed program was:" >&5
7161 cat conftest.$ac_ext >&5
7162 cf_cv_wint_t=unknown
7163 fi
7164 rm -f conftest.$ac_objext conftest.$ac_ext
7165 fi
7166 rm -f conftest.$ac_objext conftest.$ac_ext
7167 fi
7168 echo "$as_me:7168: result: $cf_cv_wint_t" >&5
7169 echo "${ECHO_T}$cf_cv_wint_t" >&6
7170
7171 if test "$cf_cv_wint_t" = yes ; then
7172         cat >>confdefs.h <<\EOF
7173 #define NEED_WCHAR_H 1
7174 EOF
7175
7176         NEED_WCHAR_H=1
7177 fi
7178
7179 # if we do not find wint_t in either place, use substitution to provide a fallback.
7180 if test "$cf_cv_wint_t" = unknown ; then
7181         NCURSES_WINT_T=1
7182 fi
7183
7184 # if we find wint_t in either place, use substitution to provide a fallback.
7185 if test "$cf_cv_wint_t" != unknown ; then
7186         NCURSES_OK_WINT_T=1
7187 fi
7188
7189         if test "$NCURSES_MBSTATE_T" != 0; then
7190                 cat >>confdefs.h <<\EOF
7191 #define NEED_MBSTATE_T_DEF 1
7192 EOF
7193
7194         fi
7195 fi
7196
7197 ###   use option --disable-lp64 to allow long chtype
7198 case $cf_cv_abi_version in
7199 [345]*)
7200         default_with_lp64=no
7201         ;;
7202 *)
7203         default_with_lp64=yes
7204         ;;
7205 esac
7206
7207 echo "$as_me:7207: checking whether to enable _LP64 definition in curses.h" >&5
7208 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7209
7210 # Check whether --enable-lp64 or --disable-lp64 was given.
7211 if test "${enable_lp64+set}" = set; then
7212   enableval="$enable_lp64"
7213   with_lp64=$enableval
7214 else
7215   with_lp64=$default_with_lp64
7216 fi;
7217 echo "$as_me:7217: result: $with_lp64" >&5
7218 echo "${ECHO_T}$with_lp64" >&6
7219
7220 if test "$with_lp64" = yes ; then
7221         cf_cv_enable_lp64=1
7222 else
7223         cf_cv_enable_lp64=0
7224 fi
7225
7226 # Check whether --enable-largefile or --disable-largefile was given.
7227 if test "${enable_largefile+set}" = set; then
7228   enableval="$enable_largefile"
7229
7230 fi;
7231 if test "$enable_largefile" != no; then
7232
7233   echo "$as_me:7233: checking for special C compiler options needed for large files" >&5
7234 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7235 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7236   echo $ECHO_N "(cached) $ECHO_C" >&6
7237 else
7238   ac_cv_sys_largefile_CC=no
7239      if test "$GCC" != yes; then
7240        ac_save_CC=$CC
7241        while :; do
7242          # IRIX 6.2 and later do not support large files by default,
7243          # so use the C compiler's -n32 option if that helps.
7244          cat >conftest.$ac_ext <<_ACEOF
7245 #line 7245 "configure"
7246 #include "confdefs.h"
7247 #include <sys/types.h>
7248  /* Check that off_t can represent 2**63 - 1 correctly.
7249     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7250     since some C++ compilers masquerading as C compilers
7251     incorrectly reject 9223372036854775807.  */
7252 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7253   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7254                        && LARGE_OFF_T % 2147483647 == 1)
7255                       ? 1 : -1];
7256 int
7257 main ()
7258 {
7259
7260   ;
7261   return 0;
7262 }
7263 _ACEOF
7264          rm -f conftest.$ac_objext
7265 if { (eval echo "$as_me:7265: \"$ac_compile\"") >&5
7266   (eval $ac_compile) 2>&5
7267   ac_status=$?
7268   echo "$as_me:7268: \$? = $ac_status" >&5
7269   (exit $ac_status); } &&
7270          { ac_try='test -s conftest.$ac_objext'
7271   { (eval echo "$as_me:7271: \"$ac_try\"") >&5
7272   (eval $ac_try) 2>&5
7273   ac_status=$?
7274   echo "$as_me:7274: \$? = $ac_status" >&5
7275   (exit $ac_status); }; }; then
7276   break
7277 else
7278   echo "$as_me: failed program was:" >&5
7279 cat conftest.$ac_ext >&5
7280 fi
7281 rm -f conftest.$ac_objext
7282          CC="$CC -n32"
7283          rm -f conftest.$ac_objext
7284 if { (eval echo "$as_me:7284: \"$ac_compile\"") >&5
7285   (eval $ac_compile) 2>&5
7286   ac_status=$?
7287   echo "$as_me:7287: \$? = $ac_status" >&5
7288   (exit $ac_status); } &&
7289          { ac_try='test -s conftest.$ac_objext'
7290   { (eval echo "$as_me:7290: \"$ac_try\"") >&5
7291   (eval $ac_try) 2>&5
7292   ac_status=$?
7293   echo "$as_me:7293: \$? = $ac_status" >&5
7294   (exit $ac_status); }; }; then
7295   ac_cv_sys_largefile_CC=' -n32'; break
7296 else
7297   echo "$as_me: failed program was:" >&5
7298 cat conftest.$ac_ext >&5
7299 fi
7300 rm -f conftest.$ac_objext
7301          break
7302        done
7303        CC=$ac_save_CC
7304        rm -f conftest.$ac_ext
7305     fi
7306 fi
7307 echo "$as_me:7307: result: $ac_cv_sys_largefile_CC" >&5
7308 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7309   if test "$ac_cv_sys_largefile_CC" != no; then
7310     CC=$CC$ac_cv_sys_largefile_CC
7311   fi
7312
7313   echo "$as_me:7313: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7314 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7315 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7316   echo $ECHO_N "(cached) $ECHO_C" >&6
7317 else
7318   while :; do
7319   ac_cv_sys_file_offset_bits=no
7320   cat >conftest.$ac_ext <<_ACEOF
7321 #line 7321 "configure"
7322 #include "confdefs.h"
7323 #include <sys/types.h>
7324  /* Check that off_t can represent 2**63 - 1 correctly.
7325     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7326     since some C++ compilers masquerading as C compilers
7327     incorrectly reject 9223372036854775807.  */
7328 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7329   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7330                        && LARGE_OFF_T % 2147483647 == 1)
7331                       ? 1 : -1];
7332 int
7333 main ()
7334 {
7335
7336   ;
7337   return 0;
7338 }
7339 _ACEOF
7340 rm -f conftest.$ac_objext
7341 if { (eval echo "$as_me:7341: \"$ac_compile\"") >&5
7342   (eval $ac_compile) 2>&5
7343   ac_status=$?
7344   echo "$as_me:7344: \$? = $ac_status" >&5
7345   (exit $ac_status); } &&
7346          { ac_try='test -s conftest.$ac_objext'
7347   { (eval echo "$as_me:7347: \"$ac_try\"") >&5
7348   (eval $ac_try) 2>&5
7349   ac_status=$?
7350   echo "$as_me:7350: \$? = $ac_status" >&5
7351   (exit $ac_status); }; }; then
7352   break
7353 else
7354   echo "$as_me: failed program was:" >&5
7355 cat conftest.$ac_ext >&5
7356 fi
7357 rm -f conftest.$ac_objext conftest.$ac_ext
7358   cat >conftest.$ac_ext <<_ACEOF
7359 #line 7359 "configure"
7360 #include "confdefs.h"
7361 #define _FILE_OFFSET_BITS 64
7362 #include <sys/types.h>
7363  /* Check that off_t can represent 2**63 - 1 correctly.
7364     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7365     since some C++ compilers masquerading as C compilers
7366     incorrectly reject 9223372036854775807.  */
7367 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7368   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7369                        && LARGE_OFF_T % 2147483647 == 1)
7370                       ? 1 : -1];
7371 int
7372 main ()
7373 {
7374
7375   ;
7376   return 0;
7377 }
7378 _ACEOF
7379 rm -f conftest.$ac_objext
7380 if { (eval echo "$as_me:7380: \"$ac_compile\"") >&5
7381   (eval $ac_compile) 2>&5
7382   ac_status=$?
7383   echo "$as_me:7383: \$? = $ac_status" >&5
7384   (exit $ac_status); } &&
7385          { ac_try='test -s conftest.$ac_objext'
7386   { (eval echo "$as_me:7386: \"$ac_try\"") >&5
7387   (eval $ac_try) 2>&5
7388   ac_status=$?
7389   echo "$as_me:7389: \$? = $ac_status" >&5
7390   (exit $ac_status); }; }; then
7391   ac_cv_sys_file_offset_bits=64; break
7392 else
7393   echo "$as_me: failed program was:" >&5
7394 cat conftest.$ac_ext >&5
7395 fi
7396 rm -f conftest.$ac_objext conftest.$ac_ext
7397   break
7398 done
7399 fi
7400 echo "$as_me:7400: result: $ac_cv_sys_file_offset_bits" >&5
7401 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7402 if test "$ac_cv_sys_file_offset_bits" != no; then
7403
7404 cat >>confdefs.h <<EOF
7405 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7406 EOF
7407
7408 fi
7409 rm -f conftest*
7410   echo "$as_me:7410: checking for _LARGE_FILES value needed for large files" >&5
7411 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7412 if test "${ac_cv_sys_large_files+set}" = set; then
7413   echo $ECHO_N "(cached) $ECHO_C" >&6
7414 else
7415   while :; do
7416   ac_cv_sys_large_files=no
7417   cat >conftest.$ac_ext <<_ACEOF
7418 #line 7418 "configure"
7419 #include "confdefs.h"
7420 #include <sys/types.h>
7421  /* Check that off_t can represent 2**63 - 1 correctly.
7422     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7423     since some C++ compilers masquerading as C compilers
7424     incorrectly reject 9223372036854775807.  */
7425 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7426   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7427                        && LARGE_OFF_T % 2147483647 == 1)
7428                       ? 1 : -1];
7429 int
7430 main ()
7431 {
7432
7433   ;
7434   return 0;
7435 }
7436 _ACEOF
7437 rm -f conftest.$ac_objext
7438 if { (eval echo "$as_me:7438: \"$ac_compile\"") >&5
7439   (eval $ac_compile) 2>&5
7440   ac_status=$?
7441   echo "$as_me:7441: \$? = $ac_status" >&5
7442   (exit $ac_status); } &&
7443          { ac_try='test -s conftest.$ac_objext'
7444   { (eval echo "$as_me:7444: \"$ac_try\"") >&5
7445   (eval $ac_try) 2>&5
7446   ac_status=$?
7447   echo "$as_me:7447: \$? = $ac_status" >&5
7448   (exit $ac_status); }; }; then
7449   break
7450 else
7451   echo "$as_me: failed program was:" >&5
7452 cat conftest.$ac_ext >&5
7453 fi
7454 rm -f conftest.$ac_objext conftest.$ac_ext
7455   cat >conftest.$ac_ext <<_ACEOF
7456 #line 7456 "configure"
7457 #include "confdefs.h"
7458 #define _LARGE_FILES 1
7459 #include <sys/types.h>
7460  /* Check that off_t can represent 2**63 - 1 correctly.
7461     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7462     since some C++ compilers masquerading as C compilers
7463     incorrectly reject 9223372036854775807.  */
7464 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7465   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7466                        && LARGE_OFF_T % 2147483647 == 1)
7467                       ? 1 : -1];
7468 int
7469 main ()
7470 {
7471
7472   ;
7473   return 0;
7474 }
7475 _ACEOF
7476 rm -f conftest.$ac_objext
7477 if { (eval echo "$as_me:7477: \"$ac_compile\"") >&5
7478   (eval $ac_compile) 2>&5
7479   ac_status=$?
7480   echo "$as_me:7480: \$? = $ac_status" >&5
7481   (exit $ac_status); } &&
7482          { ac_try='test -s conftest.$ac_objext'
7483   { (eval echo "$as_me:7483: \"$ac_try\"") >&5
7484   (eval $ac_try) 2>&5
7485   ac_status=$?
7486   echo "$as_me:7486: \$? = $ac_status" >&5
7487   (exit $ac_status); }; }; then
7488   ac_cv_sys_large_files=1; break
7489 else
7490   echo "$as_me: failed program was:" >&5
7491 cat conftest.$ac_ext >&5
7492 fi
7493 rm -f conftest.$ac_objext conftest.$ac_ext
7494   break
7495 done
7496 fi
7497 echo "$as_me:7497: result: $ac_cv_sys_large_files" >&5
7498 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7499 if test "$ac_cv_sys_large_files" != no; then
7500
7501 cat >>confdefs.h <<EOF
7502 #define _LARGE_FILES $ac_cv_sys_large_files
7503 EOF
7504
7505 fi
7506 rm -f conftest*
7507 fi
7508
7509     if test "$enable_largefile" != no ; then
7510         echo "$as_me:7510: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7511 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7512 if test "${ac_cv_sys_largefile_source+set}" = set; then
7513   echo $ECHO_N "(cached) $ECHO_C" >&6
7514 else
7515   while :; do
7516   ac_cv_sys_largefile_source=no
7517   cat >conftest.$ac_ext <<_ACEOF
7518 #line 7518 "configure"
7519 #include "confdefs.h"
7520 #include <stdio.h>
7521 int
7522 main ()
7523 {
7524 return !fseeko;
7525   ;
7526   return 0;
7527 }
7528 _ACEOF
7529 rm -f conftest.$ac_objext
7530 if { (eval echo "$as_me:7530: \"$ac_compile\"") >&5
7531   (eval $ac_compile) 2>&5
7532   ac_status=$?
7533   echo "$as_me:7533: \$? = $ac_status" >&5
7534   (exit $ac_status); } &&
7535          { ac_try='test -s conftest.$ac_objext'
7536   { (eval echo "$as_me:7536: \"$ac_try\"") >&5
7537   (eval $ac_try) 2>&5
7538   ac_status=$?
7539   echo "$as_me:7539: \$? = $ac_status" >&5
7540   (exit $ac_status); }; }; then
7541   break
7542 else
7543   echo "$as_me: failed program was:" >&5
7544 cat conftest.$ac_ext >&5
7545 fi
7546 rm -f conftest.$ac_objext conftest.$ac_ext
7547   cat >conftest.$ac_ext <<_ACEOF
7548 #line 7548 "configure"
7549 #include "confdefs.h"
7550 #define _LARGEFILE_SOURCE 1
7551 #include <stdio.h>
7552 int
7553 main ()
7554 {
7555 return !fseeko;
7556   ;
7557   return 0;
7558 }
7559 _ACEOF
7560 rm -f conftest.$ac_objext
7561 if { (eval echo "$as_me:7561: \"$ac_compile\"") >&5
7562   (eval $ac_compile) 2>&5
7563   ac_status=$?
7564   echo "$as_me:7564: \$? = $ac_status" >&5
7565   (exit $ac_status); } &&
7566          { ac_try='test -s conftest.$ac_objext'
7567   { (eval echo "$as_me:7567: \"$ac_try\"") >&5
7568   (eval $ac_try) 2>&5
7569   ac_status=$?
7570   echo "$as_me:7570: \$? = $ac_status" >&5
7571   (exit $ac_status); }; }; then
7572   ac_cv_sys_largefile_source=1; break
7573 else
7574   echo "$as_me: failed program was:" >&5
7575 cat conftest.$ac_ext >&5
7576 fi
7577 rm -f conftest.$ac_objext conftest.$ac_ext
7578   break
7579 done
7580 fi
7581 echo "$as_me:7581: result: $ac_cv_sys_largefile_source" >&5
7582 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7583 if test "$ac_cv_sys_largefile_source" != no; then
7584
7585 cat >>confdefs.h <<EOF
7586 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7587 EOF
7588
7589 fi
7590 rm -f conftest*
7591
7592 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7593 # in glibc 2.1.3, but that breaks too many other things.
7594 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7595 echo "$as_me:7595: checking for fseeko" >&5
7596 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7597 if test "${ac_cv_func_fseeko+set}" = set; then
7598   echo $ECHO_N "(cached) $ECHO_C" >&6
7599 else
7600   cat >conftest.$ac_ext <<_ACEOF
7601 #line 7601 "configure"
7602 #include "confdefs.h"
7603 #include <stdio.h>
7604 int
7605 main ()
7606 {
7607 return fseeko && fseeko (stdin, 0, 0);
7608   ;
7609   return 0;
7610 }
7611 _ACEOF
7612 rm -f conftest.$ac_objext conftest$ac_exeext
7613 if { (eval echo "$as_me:7613: \"$ac_link\"") >&5
7614   (eval $ac_link) 2>&5
7615   ac_status=$?
7616   echo "$as_me:7616: \$? = $ac_status" >&5
7617   (exit $ac_status); } &&
7618          { ac_try='test -s conftest$ac_exeext'
7619   { (eval echo "$as_me:7619: \"$ac_try\"") >&5
7620   (eval $ac_try) 2>&5
7621   ac_status=$?
7622   echo "$as_me:7622: \$? = $ac_status" >&5
7623   (exit $ac_status); }; }; then
7624   ac_cv_func_fseeko=yes
7625 else
7626   echo "$as_me: failed program was:" >&5
7627 cat conftest.$ac_ext >&5
7628 ac_cv_func_fseeko=no
7629 fi
7630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7631 fi
7632 echo "$as_me:7632: result: $ac_cv_func_fseeko" >&5
7633 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7634 if test $ac_cv_func_fseeko = yes; then
7635
7636 cat >>confdefs.h <<\EOF
7637 #define HAVE_FSEEKO 1
7638 EOF
7639
7640 fi
7641
7642         # Normally we would collect these definitions in the config.h,
7643         # but (like _XOPEN_SOURCE), some environments rely on having these
7644         # defined before any of the system headers are included.  Another
7645         # case comes up with C++, e.g., on AIX the compiler compiles the
7646         # header files by themselves before looking at the body files it is
7647         # told to compile.  For ncurses, those header files do not include
7648         # the config.h
7649         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7650         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7651
7652         echo "$as_me:7652: checking whether to use struct dirent64" >&5
7653 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7654 if test "${cf_cv_struct_dirent64+set}" = set; then
7655   echo $ECHO_N "(cached) $ECHO_C" >&6
7656 else
7657
7658                 cat >conftest.$ac_ext <<_ACEOF
7659 #line 7659 "configure"
7660 #include "confdefs.h"
7661
7662 #include <sys/types.h>
7663 #include <dirent.h>
7664
7665 int
7666 main ()
7667 {
7668
7669                 /* if transitional largefile support is setup, this is true */
7670                 extern struct dirent64 * readdir(DIR *);
7671                 struct dirent64 *x = readdir((DIR *)0);
7672                 struct dirent *y = readdir((DIR *)0);
7673                 int z = x - y;
7674
7675   ;
7676   return 0;
7677 }
7678 _ACEOF
7679 rm -f conftest.$ac_objext
7680 if { (eval echo "$as_me:7680: \"$ac_compile\"") >&5
7681   (eval $ac_compile) 2>&5
7682   ac_status=$?
7683   echo "$as_me:7683: \$? = $ac_status" >&5
7684   (exit $ac_status); } &&
7685          { ac_try='test -s conftest.$ac_objext'
7686   { (eval echo "$as_me:7686: \"$ac_try\"") >&5
7687   (eval $ac_try) 2>&5
7688   ac_status=$?
7689   echo "$as_me:7689: \$? = $ac_status" >&5
7690   (exit $ac_status); }; }; then
7691   cf_cv_struct_dirent64=yes
7692 else
7693   echo "$as_me: failed program was:" >&5
7694 cat conftest.$ac_ext >&5
7695 cf_cv_struct_dirent64=no
7696 fi
7697 rm -f conftest.$ac_objext conftest.$ac_ext
7698
7699 fi
7700 echo "$as_me:7700: result: $cf_cv_struct_dirent64" >&5
7701 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7702         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7703 #define HAVE_STRUCT_DIRENT64 1
7704 EOF
7705
7706     fi
7707
7708 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7709 echo "$as_me:7709: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7710 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7711
7712 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7713 if test "${enable_tparm_varargs+set}" = set; then
7714   enableval="$enable_tparm_varargs"
7715   with_tparm_varargs=$enableval
7716 else
7717   with_tparm_varargs=yes
7718 fi;
7719 echo "$as_me:7719: result: $with_tparm_varargs" >&5
7720 echo "${ECHO_T}$with_tparm_varargs" >&6
7721 NCURSES_TPARM_VARARGS=0
7722 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7723
7724 ###   use option --with-bool to override bool's type
7725 echo "$as_me:7725: checking for type of bool" >&5
7726 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7727
7728 # Check whether --with-bool or --without-bool was given.
7729 if test "${with_bool+set}" = set; then
7730   withval="$with_bool"
7731   NCURSES_BOOL="$withval"
7732 else
7733   NCURSES_BOOL=auto
7734 fi;
7735 echo "$as_me:7735: result: $NCURSES_BOOL" >&5
7736 echo "${ECHO_T}$NCURSES_BOOL" >&6
7737
7738 echo "$as_me:7738: checking for alternate terminal capabilities file" >&5
7739 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7740
7741 # Check whether --with-caps or --without-caps was given.
7742 if test "${with_caps+set}" = set; then
7743   withval="$with_caps"
7744   TERMINFO_CAPS=Caps.$withval
7745 else
7746   TERMINFO_CAPS=Caps
7747 fi;
7748 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7749 echo "$as_me:7749: result: $TERMINFO_CAPS" >&5
7750 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7751
7752 ###   use option --with-chtype to override chtype's type
7753 echo "$as_me:7753: checking for type of chtype" >&5
7754 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7755
7756 # Check whether --with-chtype or --without-chtype was given.
7757 if test "${with_chtype+set}" = set; then
7758   withval="$with_chtype"
7759   NCURSES_CHTYPE="$withval"
7760 else
7761   NCURSES_CHTYPE=auto
7762 fi;
7763 echo "$as_me:7763: result: $NCURSES_CHTYPE" >&5
7764 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7765
7766 ###   use option --with-ospeed to override ospeed's type
7767 echo "$as_me:7767: checking for type of ospeed" >&5
7768 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7769
7770 # Check whether --with-ospeed or --without-ospeed was given.
7771 if test "${with_ospeed+set}" = set; then
7772   withval="$with_ospeed"
7773   NCURSES_OSPEED="$withval"
7774 else
7775   NCURSES_OSPEED=short
7776 fi;
7777 echo "$as_me:7777: result: $NCURSES_OSPEED" >&5
7778 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7779
7780 ###   use option --with-mmask-t to override mmask_t's type
7781 echo "$as_me:7781: checking for type of mmask_t" >&5
7782 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7783
7784 # Check whether --with-mmask-t or --without-mmask-t was given.
7785 if test "${with_mmask_t+set}" = set; then
7786   withval="$with_mmask_t"
7787   NCURSES_MMASK_T="$withval"
7788 else
7789   NCURSES_MMASK_T=auto
7790 fi;
7791 echo "$as_me:7791: result: $NCURSES_MMASK_T" >&5
7792 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7793
7794 ### Enable compiling-in rcs id's
7795 echo "$as_me:7795: checking if RCS identifiers should be compiled-in" >&5
7796 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7797
7798 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7799 if test "${with_rcs_ids+set}" = set; then
7800   withval="$with_rcs_ids"
7801   with_rcs_ids=$withval
7802 else
7803   with_rcs_ids=no
7804 fi;
7805 echo "$as_me:7805: result: $with_rcs_ids" >&5
7806 echo "${ECHO_T}$with_rcs_ids" >&6
7807 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7808 #define USE_RCS_IDS 1
7809 EOF
7810
7811 ###############################################################################
7812
7813 echo "$as_me:7813: checking format of man-pages" >&5
7814 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7815
7816 # Check whether --with-manpage-format or --without-manpage-format was given.
7817 if test "${with_manpage_format+set}" = set; then
7818   withval="$with_manpage_format"
7819   MANPAGE_FORMAT=$withval
7820 else
7821   MANPAGE_FORMAT=unknown
7822 fi;
7823
7824 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7825 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7826
7827 cf_unknown=
7828
7829 case $MANPAGE_FORMAT in
7830 unknown)
7831   if test -z "$MANPATH" ; then
7832     MANPATH="/usr/man:/usr/share/man"
7833   fi
7834
7835   # look for the 'date' man-page (it's most likely to be installed!)
7836   MANPAGE_FORMAT=
7837   cf_preform=no
7838   cf_catonly=yes
7839   cf_example=date
7840
7841   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7842   for cf_dir in $MANPATH; do
7843     test -z "$cf_dir" && cf_dir=/usr/man
7844     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
7845     do
7846       cf_test=`echo $cf_name | sed -e 's/*//'`
7847       if test "x$cf_test" = "x$cf_name" ; then
7848
7849         case "$cf_name" in
7850         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7851         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7852         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7853         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7854         esac
7855
7856         case "$cf_name" in
7857         $cf_dir/man*)
7858           cf_catonly=no
7859           ;;
7860         $cf_dir/cat*)
7861           cf_preform=yes
7862           ;;
7863         esac
7864         break
7865       fi
7866
7867       # if we found a match in either man* or cat*, stop looking
7868       if test -n "$MANPAGE_FORMAT" ; then
7869         cf_found=no
7870         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
7871         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
7872         case "$cf_name" in
7873         $cf_dir/cat*)
7874           cf_found=yes
7875           ;;
7876         esac
7877         test $cf_found=yes && break
7878       fi
7879     done
7880     # only check the first directory in $MANPATH where we find manpages
7881     if test -n "$MANPAGE_FORMAT" ; then
7882        break
7883     fi
7884   done
7885   # if we did not find the example, just assume it is normal
7886   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
7887   IFS="$ac_save_ifs"
7888   ;;
7889 *)
7890   for cf_option in $MANPAGE_FORMAT; do
7891      case $cf_option in #(vi
7892      gzip|compress|BSDI|normal|formatted|catonly)
7893        ;;
7894      *)
7895        cf_unknown="$cf_unknown $cf_option"
7896        ;;
7897      esac
7898   done
7899   ;;
7900 esac
7901
7902 echo "$as_me:7902: result: $MANPAGE_FORMAT" >&5
7903 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
7904 if test -n "$cf_unknown" ; then
7905   { echo "$as_me:7905: WARNING: Unexpected manpage-format $cf_unknown" >&5
7906 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
7907 fi
7908
7909 echo "$as_me:7909: checking for manpage renaming" >&5
7910 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
7911
7912 # Check whether --with-manpage-renames or --without-manpage-renames was given.
7913 if test "${with_manpage_renames+set}" = set; then
7914   withval="$with_manpage_renames"
7915   MANPAGE_RENAMES=$withval
7916 else
7917   MANPAGE_RENAMES=yes
7918 fi;
7919
7920 case ".$MANPAGE_RENAMES" in #(vi
7921 .no) #(vi
7922   ;;
7923 .|.yes)
7924   # Debian 'man' program?
7925   if test -f /etc/debian_version ; then
7926     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
7927   else
7928     MANPAGE_RENAMES=no
7929   fi
7930   ;;
7931 esac
7932
7933 if test "$MANPAGE_RENAMES" != no ; then
7934   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
7935     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
7936   elif test ! -f $MANPAGE_RENAMES ; then
7937     { { echo "$as_me:7937: error: not a filename: $MANPAGE_RENAMES" >&5
7938 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
7939    { (exit 1); exit 1; }; }
7940   fi
7941
7942   test ! -d man && mkdir man
7943
7944   # Construct a sed-script to perform renaming within man-pages
7945   if test -n "$MANPAGE_RENAMES" ; then
7946     test ! -d man && mkdir man
7947     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
7948   fi
7949 fi
7950
7951 echo "$as_me:7951: result: $MANPAGE_RENAMES" >&5
7952 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
7953
7954 echo "$as_me:7954: checking if manpage aliases will be installed" >&5
7955 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
7956
7957 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
7958 if test "${with_manpage_aliases+set}" = set; then
7959   withval="$with_manpage_aliases"
7960   MANPAGE_ALIASES=$withval
7961 else
7962   MANPAGE_ALIASES=yes
7963 fi;
7964
7965 echo "$as_me:7965: result: $MANPAGE_ALIASES" >&5
7966 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
7967
7968 if test "$LN_S" = "ln -s"; then
7969         cf_use_symlinks=yes
7970 else
7971         cf_use_symlinks=no
7972 fi
7973
7974 MANPAGE_SYMLINKS=no
7975 if test "$MANPAGE_ALIASES" = yes ; then
7976 echo "$as_me:7976: checking if manpage symlinks should be used" >&5
7977 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
7978
7979 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
7980 if test "${with_manpage_symlinks+set}" = set; then
7981   withval="$with_manpage_symlinks"
7982   MANPAGE_SYMLINKS=$withval
7983 else
7984   MANPAGE_SYMLINKS=$cf_use_symlinks
7985 fi;
7986
7987 if test "$$cf_use_symlinks" = no; then
7988 if test "$MANPAGE_SYMLINKS" = yes ; then
7989         { echo "$as_me:7989: WARNING: cannot make symlinks" >&5
7990 echo "$as_me: WARNING: cannot make symlinks" >&2;}
7991         MANPAGE_SYMLINKS=no
7992 fi
7993 fi
7994
7995 echo "$as_me:7995: result: $MANPAGE_SYMLINKS" >&5
7996 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
7997 fi
7998
7999 echo "$as_me:7999: checking for manpage tbl" >&5
8000 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8001
8002 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8003 if test "${with_manpage_tbl+set}" = set; then
8004   withval="$with_manpage_tbl"
8005   MANPAGE_TBL=$withval
8006 else
8007   MANPAGE_TBL=no
8008 fi;
8009
8010 echo "$as_me:8010: result: $MANPAGE_TBL" >&5
8011 echo "${ECHO_T}$MANPAGE_TBL" >&6
8012
8013   if test "$prefix" = "NONE" ; then
8014      cf_prefix="$ac_default_prefix"
8015   else
8016      cf_prefix="$prefix"
8017   fi
8018
8019   case "$MANPAGE_FORMAT" in # (vi
8020   *catonly*) # (vi
8021     cf_format=yes
8022     cf_inboth=no
8023     ;;
8024   *formatted*) # (vi
8025     cf_format=yes
8026     cf_inboth=yes
8027     ;;
8028   *)
8029     cf_format=no
8030     cf_inboth=no
8031     ;;
8032   esac
8033
8034 test ! -d man && mkdir man
8035
8036 cf_so_strip=
8037 cf_compress=
8038 case "$MANPAGE_FORMAT" in #(vi
8039 *compress*) #(vi
8040         cf_so_strip="Z"
8041         cf_compress=compress
8042   ;;
8043 *gzip*) #(vi
8044         cf_so_strip="gz"
8045         cf_compress=gzip
8046   ;;
8047 esac
8048
8049 cf_edit_man=./edit_man.sh
8050
8051 cat >$cf_edit_man <<CF_EOF
8052 #! /bin/sh
8053 # this script is generated by the configure-script CF_MAN_PAGES macro.
8054
8055 prefix="$cf_prefix"
8056 datadir="$datadir"
8057
8058 NCURSES_MAJOR="$NCURSES_MAJOR"
8059 NCURSES_MINOR="$NCURSES_MINOR"
8060 NCURSES_PATCH="$NCURSES_PATCH"
8061
8062 NCURSES_OSPEED="$NCURSES_OSPEED"
8063 TERMINFO="$TERMINFO"
8064
8065 MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"
8066
8067 INSTALL="$INSTALL"
8068 INSTALL_DATA="$INSTALL_DATA"
8069
8070 transform="$program_transform_name"
8071
8072 TMP=\${TMPDIR-/tmp}/man\$\$
8073 trap "rm -f \$TMP" 0 1 2 5 15
8074
8075 form=\$1
8076 shift || exit 1
8077
8078 verb=\$1
8079 shift || exit 1
8080
8081 mandir=\$1
8082 shift || exit 1
8083
8084 srcdir=\$1
8085 top_srcdir=\$srcdir/..
8086 shift || exit 1
8087
8088 if test "\$form" = normal ; then
8089         if test "$cf_format" = yes ; then
8090         if test "$cf_inboth" = no ; then
8091                 sh \$0 format \$verb \$mandir \$srcdir \$*
8092                 exit $?
8093         fi
8094         fi
8095         cf_subdir=\$mandir/man
8096         cf_tables=$MANPAGE_TBL
8097 else
8098         cf_subdir=\$mandir/cat
8099         cf_tables=yes
8100 fi
8101
8102 # process the list of source-files
8103 for i in \$* ; do
8104 case \$i in #(vi
8105 *.orig|*.rej) ;; #(vi
8106 *.[0-9]*)
8107         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8108         if test \$verb = installing ; then
8109         if test ! -d \$cf_subdir\${section} ; then
8110                 \$MKDIRS \$cf_subdir\$section
8111         fi
8112         fi
8113         aliases=
8114         cf_source=\`basename \$i\`
8115         inalias=\$cf_source
8116         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8117         if test ! -f \$inalias ; then
8118                 echo .. skipped \$cf_source
8119                 continue
8120         fi
8121 CF_EOF
8122
8123 if test "$MANPAGE_ALIASES" != no ; then
8124 cat >>$cf_edit_man <<CF_EOF
8125         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias | sort -u\`
8126 CF_EOF
8127 fi
8128
8129 if test "$MANPAGE_RENAMES" = no ; then
8130 cat >>$cf_edit_man <<CF_EOF
8131         # perform program transformations for section 1 man pages
8132         if test \$section = 1 ; then
8133                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8134         else
8135                 cf_target=\$cf_subdir\${section}/\$cf_source
8136         fi
8137 CF_EOF
8138 else
8139 cat >>$cf_edit_man <<CF_EOF
8140         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8141         if test -z "\$cf_target" ; then
8142                 echo '? missing rename for '\$cf_source
8143                 cf_target="\$cf_source"
8144         fi
8145         cf_target="\$cf_subdir\${section}/\${cf_target}"
8146 CF_EOF
8147 fi
8148
8149         # replace variables in man page
8150
8151         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8152         do
8153 cat >>$cf_edit_man <<CF_EOF
8154         prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
8155 CF_EOF
8156         done
8157
8158 cat >>$cf_edit_man <<CF_EOF
8159         sed     -e "s,@DATADIR@,\$datadir," \\
8160                 -e "s,@TERMINFO@,\$TERMINFO," \\
8161                 -e "s,@NCURSES_MAJOR@,\$NCURSES_MAJOR," \\
8162                 -e "s,@NCURSES_MINOR@,\$NCURSES_MINOR," \\
8163                 -e "s,@NCURSES_PATCH@,\$NCURSES_PATCH," \\
8164                 -e "s,@NCURSES_OSPEED@,\$NCURSES_OSPEED," \\
8165 CF_EOF
8166
8167         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8168         do
8169                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8170 cat >>$cf_edit_man <<CF_EOF
8171                 -e "s,@$cf_NAME@,\$prog_$cf_name," \\
8172 CF_EOF
8173         done
8174
8175 if test -f $MANPAGE_RENAMES ; then
8176 cat >>$cf_edit_man <<CF_EOF
8177                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8178 CF_EOF
8179 else
8180 cat >>$cf_edit_man <<CF_EOF
8181                 < \$i >\$TMP
8182 CF_EOF
8183 fi
8184
8185 cat >>$cf_edit_man <<CF_EOF
8186 if test \$cf_tables = yes ; then
8187         tbl \$TMP >\$TMP.out
8188         mv \$TMP.out \$TMP
8189 fi
8190 CF_EOF
8191
8192 if test $with_curses_h != yes ; then
8193 cat >>$cf_edit_man <<CF_EOF
8194         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8195         mv \$TMP.out \$TMP
8196 CF_EOF
8197 fi
8198
8199 cat >>$cf_edit_man <<CF_EOF
8200         if test \$form = format ; then
8201                 nroff -man \$TMP >\$TMP.out
8202                 mv \$TMP.out \$TMP
8203         fi
8204 CF_EOF
8205
8206 if test -n "$cf_compress" ; then
8207 cat >>$cf_edit_man <<CF_EOF
8208         if test \$verb = installing ; then
8209         if ( $cf_compress -f \$TMP )
8210         then
8211                 mv \$TMP.$cf_so_strip \$TMP
8212         fi
8213         fi
8214         cf_target="\$cf_target.$cf_so_strip"
8215 CF_EOF
8216 fi
8217
8218 case "$MANPAGE_FORMAT" in #(vi
8219 *BSDI*)
8220 cat >>$cf_edit_man <<CF_EOF
8221         if test \$form = format ; then
8222                 # BSDI installs only .0 suffixes in the cat directories
8223                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8224         fi
8225 CF_EOF
8226   ;;
8227 esac
8228
8229 cat >>$cf_edit_man <<CF_EOF
8230         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8231         if test \$verb = installing ; then
8232                 echo \$verb \$cf_target
8233                 \$INSTALL_DATA \$TMP \$cf_target
8234                 test -n "\$aliases" && (
8235                         cd \$cf_subdir\${section} && (
8236                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8237                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8238                                 cf_target=\`basename \$cf_target\`
8239                                 for cf_alias in \$aliases
8240                                 do
8241                                         if test \$section = 1 ; then
8242                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8243                                         fi
8244
8245                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8246                                                 if test -f \$cf_alias\${suffix} ; then
8247                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8248                                                         then
8249                                                                 continue
8250                                                         fi
8251                                                 fi
8252                                                 echo .. \$verb alias \$cf_alias\${suffix}
8253                                                 rm -f \$cf_alias\${suffix}
8254                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8255                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8256                                                 echo ".so \$cf_source" >\$TMP
8257 CF_EOF
8258 if test -n "$cf_compress" ; then
8259 cat >>$cf_edit_man <<CF_EOF
8260                                                 if test -n "$cf_so_strip" ; then
8261                                                         $cf_compress -f \$TMP
8262                                                         mv \$TMP.$cf_so_strip \$TMP
8263                                                 fi
8264 CF_EOF
8265 fi
8266 cat >>$cf_edit_man <<CF_EOF
8267                                                 echo .. \$verb alias \$cf_alias\${suffix}
8268                                                 rm -f \$cf_alias\${suffix}
8269                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8270                                         fi
8271                                 done
8272                         )
8273                 )
8274         elif test \$verb = removing ; then
8275                 echo \$verb \$cf_target
8276                 rm -f \$cf_target
8277                 test -n "\$aliases" && (
8278                         cd \$cf_subdir\${section} && (
8279                                 for cf_alias in \$aliases
8280                                 do
8281                                         if test \$section = 1 ; then
8282                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8283                                         fi
8284
8285                                         echo .. \$verb alias \$cf_alias\${suffix}
8286                                         rm -f \$cf_alias\${suffix}
8287                                 done
8288                         )
8289                 )
8290         else
8291 #               echo ".hy 0"
8292                 cat \$TMP
8293         fi
8294         ;;
8295 esac
8296 done
8297
8298 if test $cf_inboth = yes ; then
8299 if test \$form != format ; then
8300         sh \$0 format \$verb \$mandir \$srcdir \$*
8301 fi
8302 fi
8303
8304 exit 0
8305 CF_EOF
8306 chmod 755 $cf_edit_man
8307
8308 ###############################################################################
8309
8310 ### Note that some functions (such as const) are normally disabled anyway.
8311 echo "$as_me:8311: checking if you want to build with function extensions" >&5
8312 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8313
8314 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8315 if test "${enable_ext_funcs+set}" = set; then
8316   enableval="$enable_ext_funcs"
8317   with_ext_funcs=$enableval
8318 else
8319   with_ext_funcs=yes
8320 fi;
8321 echo "$as_me:8321: result: $with_ext_funcs" >&5
8322 echo "${ECHO_T}$with_ext_funcs" >&6
8323 if test "$with_ext_funcs" = yes ; then
8324         NCURSES_EXT_FUNCS=1
8325         cat >>confdefs.h <<\EOF
8326 #define HAVE_CURSES_VERSION 1
8327 EOF
8328
8329         cat >>confdefs.h <<\EOF
8330 #define HAVE_HAS_KEY 1
8331 EOF
8332
8333         cat >>confdefs.h <<\EOF
8334 #define HAVE_RESIZETERM 1
8335 EOF
8336
8337         cat >>confdefs.h <<\EOF
8338 #define HAVE_RESIZE_TERM 1
8339 EOF
8340
8341         cat >>confdefs.h <<\EOF
8342 #define HAVE_USE_DEFAULT_COLORS 1
8343 EOF
8344
8345         cat >>confdefs.h <<\EOF
8346 #define HAVE_WRESIZE 1
8347 EOF
8348
8349         cat >>confdefs.h <<\EOF
8350 #define NCURSES_EXT_FUNCS 1
8351 EOF
8352
8353 else
8354         NCURSES_EXT_FUNCS=0
8355 fi
8356
8357 ###   use option --enable-const to turn on use of const beyond that in XSI.
8358 echo "$as_me:8358: checking for extended use of const keyword" >&5
8359 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8360
8361 # Check whether --enable-const or --disable-const was given.
8362 if test "${enable_const+set}" = set; then
8363   enableval="$enable_const"
8364   with_ext_const=$enableval
8365 else
8366   with_ext_const=no
8367 fi;
8368 echo "$as_me:8368: result: $with_ext_const" >&5
8369 echo "${ECHO_T}$with_ext_const" >&6
8370 NCURSES_CONST='/*nothing*/'
8371 if test "$with_ext_const" = yes ; then
8372         NCURSES_CONST=const
8373 fi
8374
8375 echo "$as_me:8375: checking if you want \$NCURSES_NO_PADDING code" >&5
8376 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8377
8378 # Check whether --enable-no-padding or --disable-no-padding was given.
8379 if test "${enable_no_padding+set}" = set; then
8380   enableval="$enable_no_padding"
8381   with_no_padding=$enableval
8382 else
8383   with_no_padding=$with_ext_funcs
8384 fi;
8385 echo "$as_me:8385: result: $with_no_padding" >&5
8386 echo "${ECHO_T}$with_no_padding" >&6
8387 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8388 #define NCURSES_NO_PADDING 1
8389 EOF
8390
8391 echo "$as_me:8391: checking for ANSI C header files" >&5
8392 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8393 if test "${ac_cv_header_stdc+set}" = set; then
8394   echo $ECHO_N "(cached) $ECHO_C" >&6
8395 else
8396   cat >conftest.$ac_ext <<_ACEOF
8397 #line 8397 "configure"
8398 #include "confdefs.h"
8399 #include <stdlib.h>
8400 #include <stdarg.h>
8401 #include <string.h>
8402 #include <float.h>
8403
8404 _ACEOF
8405 if { (eval echo "$as_me:8405: \"$ac_cpp conftest.$ac_ext\"") >&5
8406   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8407   ac_status=$?
8408   egrep -v '^ *\+' conftest.er1 >conftest.err
8409   rm -f conftest.er1
8410   cat conftest.err >&5
8411   echo "$as_me:8411: \$? = $ac_status" >&5
8412   (exit $ac_status); } >/dev/null; then
8413   if test -s conftest.err; then
8414     ac_cpp_err=$ac_c_preproc_warn_flag
8415   else
8416     ac_cpp_err=
8417   fi
8418 else
8419   ac_cpp_err=yes
8420 fi
8421 if test -z "$ac_cpp_err"; then
8422   ac_cv_header_stdc=yes
8423 else
8424   echo "$as_me: failed program was:" >&5
8425   cat conftest.$ac_ext >&5
8426   ac_cv_header_stdc=no
8427 fi
8428 rm -f conftest.err conftest.$ac_ext
8429
8430 if test $ac_cv_header_stdc = yes; then
8431   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8432   cat >conftest.$ac_ext <<_ACEOF
8433 #line 8433 "configure"
8434 #include "confdefs.h"
8435 #include <string.h>
8436
8437 _ACEOF
8438 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8439   egrep "memchr" >/dev/null 2>&1; then
8440   :
8441 else
8442   ac_cv_header_stdc=no
8443 fi
8444 rm -f conftest*
8445
8446 fi
8447
8448 if test $ac_cv_header_stdc = yes; then
8449   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8450   cat >conftest.$ac_ext <<_ACEOF
8451 #line 8451 "configure"
8452 #include "confdefs.h"
8453 #include <stdlib.h>
8454
8455 _ACEOF
8456 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8457   egrep "free" >/dev/null 2>&1; then
8458   :
8459 else
8460   ac_cv_header_stdc=no
8461 fi
8462 rm -f conftest*
8463
8464 fi
8465
8466 if test $ac_cv_header_stdc = yes; then
8467   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8468   if test "$cross_compiling" = yes; then
8469   :
8470 else
8471   cat >conftest.$ac_ext <<_ACEOF
8472 #line 8472 "configure"
8473 #include "confdefs.h"
8474 #include <ctype.h>
8475 #if ((' ' & 0x0FF) == 0x020)
8476 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8477 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8478 #else
8479 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8480                      || ('j' <= (c) && (c) <= 'r') \
8481                      || ('s' <= (c) && (c) <= 'z'))
8482 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8483 #endif
8484
8485 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8486 int
8487 main ()
8488 {
8489   int i;
8490   for (i = 0; i < 256; i++)
8491     if (XOR (islower (i), ISLOWER (i))
8492         || toupper (i) != TOUPPER (i))
8493       $ac_main_return(2);
8494   $ac_main_return (0);
8495 }
8496 _ACEOF
8497 rm -f conftest$ac_exeext
8498 if { (eval echo "$as_me:8498: \"$ac_link\"") >&5
8499   (eval $ac_link) 2>&5
8500   ac_status=$?
8501   echo "$as_me:8501: \$? = $ac_status" >&5
8502   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8503   { (eval echo "$as_me:8503: \"$ac_try\"") >&5
8504   (eval $ac_try) 2>&5
8505   ac_status=$?
8506   echo "$as_me:8506: \$? = $ac_status" >&5
8507   (exit $ac_status); }; }; then
8508   :
8509 else
8510   echo "$as_me: program exited with status $ac_status" >&5
8511 echo "$as_me: failed program was:" >&5
8512 cat conftest.$ac_ext >&5
8513 ac_cv_header_stdc=no
8514 fi
8515 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8516 fi
8517 fi
8518 fi
8519 echo "$as_me:8519: result: $ac_cv_header_stdc" >&5
8520 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8521 if test $ac_cv_header_stdc = yes; then
8522
8523 cat >>confdefs.h <<\EOF
8524 #define STDC_HEADERS 1
8525 EOF
8526
8527 fi
8528
8529 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8530
8531 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8532                   inttypes.h stdint.h unistd.h
8533 do
8534 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8535 echo "$as_me:8535: checking for $ac_header" >&5
8536 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8537 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8538   echo $ECHO_N "(cached) $ECHO_C" >&6
8539 else
8540   cat >conftest.$ac_ext <<_ACEOF
8541 #line 8541 "configure"
8542 #include "confdefs.h"
8543 $ac_includes_default
8544 #include <$ac_header>
8545 _ACEOF
8546 rm -f conftest.$ac_objext
8547 if { (eval echo "$as_me:8547: \"$ac_compile\"") >&5
8548   (eval $ac_compile) 2>&5
8549   ac_status=$?
8550   echo "$as_me:8550: \$? = $ac_status" >&5
8551   (exit $ac_status); } &&
8552          { ac_try='test -s conftest.$ac_objext'
8553   { (eval echo "$as_me:8553: \"$ac_try\"") >&5
8554   (eval $ac_try) 2>&5
8555   ac_status=$?
8556   echo "$as_me:8556: \$? = $ac_status" >&5
8557   (exit $ac_status); }; }; then
8558   eval "$as_ac_Header=yes"
8559 else
8560   echo "$as_me: failed program was:" >&5
8561 cat conftest.$ac_ext >&5
8562 eval "$as_ac_Header=no"
8563 fi
8564 rm -f conftest.$ac_objext conftest.$ac_ext
8565 fi
8566 echo "$as_me:8566: result: `eval echo '${'$as_ac_Header'}'`" >&5
8567 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8568 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8569   cat >>confdefs.h <<EOF
8570 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8571 EOF
8572
8573 fi
8574 done
8575
8576 echo "$as_me:8576: checking for signed char" >&5
8577 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8578 if test "${ac_cv_type_signed_char+set}" = set; then
8579   echo $ECHO_N "(cached) $ECHO_C" >&6
8580 else
8581   cat >conftest.$ac_ext <<_ACEOF
8582 #line 8582 "configure"
8583 #include "confdefs.h"
8584 $ac_includes_default
8585 int
8586 main ()
8587 {
8588 if ((signed char *) 0)
8589   return 0;
8590 if (sizeof (signed char))
8591   return 0;
8592   ;
8593   return 0;
8594 }
8595 _ACEOF
8596 rm -f conftest.$ac_objext
8597 if { (eval echo "$as_me:8597: \"$ac_compile\"") >&5
8598   (eval $ac_compile) 2>&5
8599   ac_status=$?
8600   echo "$as_me:8600: \$? = $ac_status" >&5
8601   (exit $ac_status); } &&
8602          { ac_try='test -s conftest.$ac_objext'
8603   { (eval echo "$as_me:8603: \"$ac_try\"") >&5
8604   (eval $ac_try) 2>&5
8605   ac_status=$?
8606   echo "$as_me:8606: \$? = $ac_status" >&5
8607   (exit $ac_status); }; }; then
8608   ac_cv_type_signed_char=yes
8609 else
8610   echo "$as_me: failed program was:" >&5
8611 cat conftest.$ac_ext >&5
8612 ac_cv_type_signed_char=no
8613 fi
8614 rm -f conftest.$ac_objext conftest.$ac_ext
8615 fi
8616 echo "$as_me:8616: result: $ac_cv_type_signed_char" >&5
8617 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8618
8619 echo "$as_me:8619: checking size of signed char" >&5
8620 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8621 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8622   echo $ECHO_N "(cached) $ECHO_C" >&6
8623 else
8624   if test "$ac_cv_type_signed_char" = yes; then
8625   if test "$cross_compiling" = yes; then
8626   # Depending upon the size, compute the lo and hi bounds.
8627 cat >conftest.$ac_ext <<_ACEOF
8628 #line 8628 "configure"
8629 #include "confdefs.h"
8630 $ac_includes_default
8631 int
8632 main ()
8633 {
8634 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8635   ;
8636   return 0;
8637 }
8638 _ACEOF
8639 rm -f conftest.$ac_objext
8640 if { (eval echo "$as_me:8640: \"$ac_compile\"") >&5
8641   (eval $ac_compile) 2>&5
8642   ac_status=$?
8643   echo "$as_me:8643: \$? = $ac_status" >&5
8644   (exit $ac_status); } &&
8645          { ac_try='test -s conftest.$ac_objext'
8646   { (eval echo "$as_me:8646: \"$ac_try\"") >&5
8647   (eval $ac_try) 2>&5
8648   ac_status=$?
8649   echo "$as_me:8649: \$? = $ac_status" >&5
8650   (exit $ac_status); }; }; then
8651   ac_lo=0 ac_mid=0
8652   while :; do
8653     cat >conftest.$ac_ext <<_ACEOF
8654 #line 8654 "configure"
8655 #include "confdefs.h"
8656 $ac_includes_default
8657 int
8658 main ()
8659 {
8660 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8661   ;
8662   return 0;
8663 }
8664 _ACEOF
8665 rm -f conftest.$ac_objext
8666 if { (eval echo "$as_me:8666: \"$ac_compile\"") >&5
8667   (eval $ac_compile) 2>&5
8668   ac_status=$?
8669   echo "$as_me:8669: \$? = $ac_status" >&5
8670   (exit $ac_status); } &&
8671          { ac_try='test -s conftest.$ac_objext'
8672   { (eval echo "$as_me:8672: \"$ac_try\"") >&5
8673   (eval $ac_try) 2>&5
8674   ac_status=$?
8675   echo "$as_me:8675: \$? = $ac_status" >&5
8676   (exit $ac_status); }; }; then
8677   ac_hi=$ac_mid; break
8678 else
8679   echo "$as_me: failed program was:" >&5
8680 cat conftest.$ac_ext >&5
8681 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8682 fi
8683 rm -f conftest.$ac_objext conftest.$ac_ext
8684   done
8685 else
8686   echo "$as_me: failed program was:" >&5
8687 cat conftest.$ac_ext >&5
8688 ac_hi=-1 ac_mid=-1
8689   while :; do
8690     cat >conftest.$ac_ext <<_ACEOF
8691 #line 8691 "configure"
8692 #include "confdefs.h"
8693 $ac_includes_default
8694 int
8695 main ()
8696 {
8697 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8698   ;
8699   return 0;
8700 }
8701 _ACEOF
8702 rm -f conftest.$ac_objext
8703 if { (eval echo "$as_me:8703: \"$ac_compile\"") >&5
8704   (eval $ac_compile) 2>&5
8705   ac_status=$?
8706   echo "$as_me:8706: \$? = $ac_status" >&5
8707   (exit $ac_status); } &&
8708          { ac_try='test -s conftest.$ac_objext'
8709   { (eval echo "$as_me:8709: \"$ac_try\"") >&5
8710   (eval $ac_try) 2>&5
8711   ac_status=$?
8712   echo "$as_me:8712: \$? = $ac_status" >&5
8713   (exit $ac_status); }; }; then
8714   ac_lo=$ac_mid; break
8715 else
8716   echo "$as_me: failed program was:" >&5
8717 cat conftest.$ac_ext >&5
8718 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8719 fi
8720 rm -f conftest.$ac_objext conftest.$ac_ext
8721   done
8722 fi
8723 rm -f conftest.$ac_objext conftest.$ac_ext
8724 # Binary search between lo and hi bounds.
8725 while test "x$ac_lo" != "x$ac_hi"; do
8726   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8727   cat >conftest.$ac_ext <<_ACEOF
8728 #line 8728 "configure"
8729 #include "confdefs.h"
8730 $ac_includes_default
8731 int
8732 main ()
8733 {
8734 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8735   ;
8736   return 0;
8737 }
8738 _ACEOF
8739 rm -f conftest.$ac_objext
8740 if { (eval echo "$as_me:8740: \"$ac_compile\"") >&5
8741   (eval $ac_compile) 2>&5
8742   ac_status=$?
8743   echo "$as_me:8743: \$? = $ac_status" >&5
8744   (exit $ac_status); } &&
8745          { ac_try='test -s conftest.$ac_objext'
8746   { (eval echo "$as_me:8746: \"$ac_try\"") >&5
8747   (eval $ac_try) 2>&5
8748   ac_status=$?
8749   echo "$as_me:8749: \$? = $ac_status" >&5
8750   (exit $ac_status); }; }; then
8751   ac_hi=$ac_mid
8752 else
8753   echo "$as_me: failed program was:" >&5
8754 cat conftest.$ac_ext >&5
8755 ac_lo=`expr $ac_mid + 1`
8756 fi
8757 rm -f conftest.$ac_objext conftest.$ac_ext
8758 done
8759 ac_cv_sizeof_signed_char=$ac_lo
8760 else
8761   if test "$cross_compiling" = yes; then
8762   { { echo "$as_me:8762: error: cannot run test program while cross compiling" >&5
8763 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8764    { (exit 1); exit 1; }; }
8765 else
8766   cat >conftest.$ac_ext <<_ACEOF
8767 #line 8767 "configure"
8768 #include "confdefs.h"
8769 $ac_includes_default
8770 int
8771 main ()
8772 {
8773 FILE *f = fopen ("conftest.val", "w");
8774 if (!f)
8775   $ac_main_return (1);
8776 fprintf (f, "%d", (sizeof (signed char)));
8777 fclose (f);
8778   ;
8779   return 0;
8780 }
8781 _ACEOF
8782 rm -f conftest$ac_exeext
8783 if { (eval echo "$as_me:8783: \"$ac_link\"") >&5
8784   (eval $ac_link) 2>&5
8785   ac_status=$?
8786   echo "$as_me:8786: \$? = $ac_status" >&5
8787   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8788   { (eval echo "$as_me:8788: \"$ac_try\"") >&5
8789   (eval $ac_try) 2>&5
8790   ac_status=$?
8791   echo "$as_me:8791: \$? = $ac_status" >&5
8792   (exit $ac_status); }; }; then
8793   ac_cv_sizeof_signed_char=`cat conftest.val`
8794 else
8795   echo "$as_me: program exited with status $ac_status" >&5
8796 echo "$as_me: failed program was:" >&5
8797 cat conftest.$ac_ext >&5
8798 fi
8799 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8800 fi
8801 fi
8802 rm -f conftest.val
8803 else
8804   ac_cv_sizeof_signed_char=0
8805 fi
8806 fi
8807 echo "$as_me:8807: result: $ac_cv_sizeof_signed_char" >&5
8808 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
8809 cat >>confdefs.h <<EOF
8810 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
8811 EOF
8812
8813 if test "$ac_cv_sizeof_signed_char" = 1 ; then
8814         NCURSES_SBOOL="signed char"
8815 else
8816         NCURSES_SBOOL="char"
8817 fi
8818 echo "$as_me:8818: checking if you want to use signed Boolean array in term.h" >&5
8819 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
8820
8821 # Check whether --enable-signed-char or --disable-signed-char was given.
8822 if test "${enable_signed_char+set}" = set; then
8823   enableval="$enable_signed_char"
8824   with_signed_char=$enableval
8825 else
8826   with_signed_char=no
8827 fi;
8828 echo "$as_me:8828: result: $with_signed_char" >&5
8829 echo "${ECHO_T}$with_signed_char" >&6
8830 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
8831
8832 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
8833 echo "$as_me:8833: checking if you want SIGWINCH handler" >&5
8834 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
8835
8836 # Check whether --enable-sigwinch or --disable-sigwinch was given.
8837 if test "${enable_sigwinch+set}" = set; then
8838   enableval="$enable_sigwinch"
8839   with_sigwinch=$enableval
8840 else
8841   with_sigwinch=$with_ext_funcs
8842 fi;
8843 echo "$as_me:8843: result: $with_sigwinch" >&5
8844 echo "${ECHO_T}$with_sigwinch" >&6
8845 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
8846 #define USE_SIGWINCH 1
8847 EOF
8848
8849 ###   use option --enable-tcap-names to allow user to define new capabilities
8850 echo "$as_me:8850: checking if you want user-definable terminal capabilities like termcap" >&5
8851 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
8852
8853 # Check whether --enable-tcap-names or --disable-tcap-names was given.
8854 if test "${enable_tcap_names+set}" = set; then
8855   enableval="$enable_tcap_names"
8856   with_tcap_names=$enableval
8857 else
8858   with_tcap_names=$with_ext_funcs
8859 fi;
8860 echo "$as_me:8860: result: $with_tcap_names" >&5
8861 echo "${ECHO_T}$with_tcap_names" >&6
8862 NCURSES_XNAMES=0
8863 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
8864
8865 ###############################################################################
8866 # These options are relatively safe to experiment with.
8867
8868 echo "$as_me:8868: checking if you want all development code" >&5
8869 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
8870
8871 # Check whether --with-develop or --without-develop was given.
8872 if test "${with_develop+set}" = set; then
8873   withval="$with_develop"
8874   with_develop=$withval
8875 else
8876   with_develop=no
8877 fi;
8878 echo "$as_me:8878: result: $with_develop" >&5
8879 echo "${ECHO_T}$with_develop" >&6
8880
8881 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
8882 echo "$as_me:8882: checking if you want hard-tabs code" >&5
8883 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
8884
8885 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
8886 if test "${enable_hard_tabs+set}" = set; then
8887   enableval="$enable_hard_tabs"
8888
8889 else
8890   enable_hard_tabs=$with_develop
8891 fi;
8892 echo "$as_me:8892: result: $enable_hard_tabs" >&5
8893 echo "${ECHO_T}$enable_hard_tabs" >&6
8894 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
8895 #define USE_HARD_TABS 1
8896 EOF
8897
8898 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
8899 echo "$as_me:8899: checking if you want limited support for xmc" >&5
8900 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
8901
8902 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
8903 if test "${enable_xmc_glitch+set}" = set; then
8904   enableval="$enable_xmc_glitch"
8905
8906 else
8907   enable_xmc_glitch=$with_develop
8908 fi;
8909 echo "$as_me:8909: result: $enable_xmc_glitch" >&5
8910 echo "${ECHO_T}$enable_xmc_glitch" >&6
8911 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
8912 #define USE_XMC_SUPPORT 1
8913 EOF
8914
8915 ###############################################################################
8916 # These are just experimental, probably should not be in a package:
8917
8918 echo "$as_me:8918: checking if you do not want to assume colors are white-on-black" >&5
8919 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
8920
8921 # Check whether --enable-assumed-color or --disable-assumed-color was given.
8922 if test "${enable_assumed_color+set}" = set; then
8923   enableval="$enable_assumed_color"
8924   with_assumed_color=$enableval
8925 else
8926   with_assumed_color=yes
8927 fi;
8928 echo "$as_me:8928: result: $with_assumed_color" >&5
8929 echo "${ECHO_T}$with_assumed_color" >&6
8930 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
8931 #define USE_ASSUMED_COLOR 1
8932 EOF
8933
8934 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
8935 echo "$as_me:8935: checking if you want hashmap scrolling-optimization code" >&5
8936 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
8937
8938 # Check whether --enable-hashmap or --disable-hashmap was given.
8939 if test "${enable_hashmap+set}" = set; then
8940   enableval="$enable_hashmap"
8941   with_hashmap=$enableval
8942 else
8943   with_hashmap=yes
8944 fi;
8945 echo "$as_me:8945: result: $with_hashmap" >&5
8946 echo "${ECHO_T}$with_hashmap" >&6
8947 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
8948 #define USE_HASHMAP 1
8949 EOF
8950
8951 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
8952 echo "$as_me:8952: checking if you want colorfgbg code" >&5
8953 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
8954
8955 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
8956 if test "${enable_colorfgbg+set}" = set; then
8957   enableval="$enable_colorfgbg"
8958   with_colorfgbg=$enableval
8959 else
8960   with_colorfgbg=no
8961 fi;
8962 echo "$as_me:8962: result: $with_colorfgbg" >&5
8963 echo "${ECHO_T}$with_colorfgbg" >&6
8964 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
8965 #define USE_COLORFGBG 1
8966 EOF
8967
8968 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
8969 echo "$as_me:8969: checking if you want to use experimental extended colors" >&5
8970 echo $ECHO_N "checking if you want to use experimental extended colors... $ECHO_C" >&6
8971
8972 # Check whether --enable-ext-colors or --disable-ext-colors was given.
8973 if test "${enable_ext_colors+set}" = set; then
8974   enableval="$enable_ext_colors"
8975   with_ext_colors=$enableval
8976 else
8977   with_ext_colors=no
8978 fi;
8979 echo "$as_me:8979: result: $with_ext_colors" >&5
8980 echo "${ECHO_T}$with_ext_colors" >&6
8981 NCURSES_EXT_COLORS=0
8982 if test "$with_ext_colors" = yes ; then
8983         if test "$with_widec" != yes ; then
8984                 { echo "$as_me:8984: WARNING: This option applies only to wide-character library" >&5
8985 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
8986         else
8987                 # cannot be ABI 5 since it changes sizeof(cchar_t)
8988
8989 if test "${with_abi_version+set}" != set; then
8990         case $cf_cv_rel_version in
8991         5.*)
8992                 cf_cv_rel_version=6.0
8993                 cf_cv_abi_version=6
8994                 { echo "$as_me:8994: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8995 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8996                 ;;
8997         esac
8998 fi
8999
9000         fi
9001         NCURSES_EXT_COLORS=1
9002         cat >>confdefs.h <<\EOF
9003 #define NCURSES_EXT_COLORS 1
9004 EOF
9005
9006 fi
9007
9008 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9009 echo "$as_me:9009: checking if you want to use experimental extended mouse encoding" >&5
9010 echo $ECHO_N "checking if you want to use experimental extended mouse encoding... $ECHO_C" >&6
9011
9012 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9013 if test "${enable_ext_mouse+set}" = set; then
9014   enableval="$enable_ext_mouse"
9015   with_ext_mouse=$enableval
9016 else
9017   with_ext_mouse=no
9018 fi;
9019 echo "$as_me:9019: result: $with_ext_mouse" >&5
9020 echo "${ECHO_T}$with_ext_mouse" >&6
9021 NCURSES_MOUSE_VERSION=1
9022 if test "$with_ext_mouse" = yes ; then
9023         NCURSES_MOUSE_VERSION=2
9024
9025 if test "${with_abi_version+set}" != set; then
9026         case $cf_cv_rel_version in
9027         5.*)
9028                 cf_cv_rel_version=6.0
9029                 cf_cv_abi_version=6
9030                 { echo "$as_me:9030: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9031 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9032                 ;;
9033         esac
9034 fi
9035
9036 fi
9037
9038 echo "$as_me:9038: checking if you want experimental safe-sprintf code" >&5
9039 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9040
9041 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9042 if test "${enable_safe_sprintf+set}" = set; then
9043   enableval="$enable_safe_sprintf"
9044   with_safe_sprintf=$enableval
9045 else
9046   with_safe_sprintf=no
9047 fi;
9048 echo "$as_me:9048: result: $with_safe_sprintf" >&5
9049 echo "${ECHO_T}$with_safe_sprintf" >&6
9050 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9051 #define USE_SAFE_SPRINTF 1
9052 EOF
9053
9054 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9055 # when hashmap is used scroll hints are useless
9056 if test "$with_hashmap" = no ; then
9057 echo "$as_me:9057: checking if you want to experiment without scrolling-hints code" >&5
9058 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9059
9060 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9061 if test "${enable_scroll_hints+set}" = set; then
9062   enableval="$enable_scroll_hints"
9063   with_scroll_hints=$enableval
9064 else
9065   with_scroll_hints=yes
9066 fi;
9067 echo "$as_me:9067: result: $with_scroll_hints" >&5
9068 echo "${ECHO_T}$with_scroll_hints" >&6
9069 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9070 #define USE_SCROLL_HINTS 1
9071 EOF
9072
9073 fi
9074
9075 echo "$as_me:9075: checking if you want experimental wgetch-events code" >&5
9076 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9077
9078 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9079 if test "${enable_wgetch_events+set}" = set; then
9080   enableval="$enable_wgetch_events"
9081   with_wgetch_events=$enableval
9082 else
9083   with_wgetch_events=no
9084 fi;
9085 echo "$as_me:9085: result: $with_wgetch_events" >&5
9086 echo "${ECHO_T}$with_wgetch_events" >&6
9087 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9088 #define NCURSES_WGETCH_EVENTS 1
9089 EOF
9090
9091 ###############################################################################
9092
9093 ###     use option --disable-echo to suppress full display compiling commands
9094 echo "$as_me:9094: checking if you want to display full commands during build" >&5
9095 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9096
9097 # Check whether --enable-echo or --disable-echo was given.
9098 if test "${enable_echo+set}" = set; then
9099   enableval="$enable_echo"
9100   with_echo=$enableval
9101 else
9102   with_echo=yes
9103 fi;
9104 if test "$with_echo" = yes; then
9105         ECHO_LINK=
9106 else
9107         ECHO_LINK='@ echo linking $@ ... ;'
9108         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9109 fi
9110 echo "$as_me:9110: result: $with_echo" >&5
9111 echo "${ECHO_T}$with_echo" >&6
9112
9113 ###     use option --enable-warnings to turn on all gcc warnings
9114 echo "$as_me:9114: checking if you want to see compiler warnings" >&5
9115 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9116
9117 # Check whether --enable-warnings or --disable-warnings was given.
9118 if test "${enable_warnings+set}" = set; then
9119   enableval="$enable_warnings"
9120   with_warnings=$enableval
9121 fi;
9122 echo "$as_me:9122: result: $with_warnings" >&5
9123 echo "${ECHO_T}$with_warnings" >&6
9124
9125 if test -n "$with_warnings"; then
9126         ADAFLAGS="$ADAFLAGS -gnatg"
9127
9128 INTEL_COMPILER=no
9129
9130 if test "$GCC" = yes ; then
9131         case $host_os in
9132         linux*|gnu*)
9133                 echo "$as_me:9133: checking if this is really Intel C compiler" >&5
9134 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9135                 cf_save_CFLAGS="$CFLAGS"
9136                 CFLAGS="$CFLAGS -no-gcc"
9137                 cat >conftest.$ac_ext <<_ACEOF
9138 #line 9138 "configure"
9139 #include "confdefs.h"
9140
9141 int
9142 main ()
9143 {
9144
9145 #ifdef __INTEL_COMPILER
9146 #else
9147 make an error
9148 #endif
9149
9150   ;
9151   return 0;
9152 }
9153 _ACEOF
9154 rm -f conftest.$ac_objext
9155 if { (eval echo "$as_me:9155: \"$ac_compile\"") >&5
9156   (eval $ac_compile) 2>&5
9157   ac_status=$?
9158   echo "$as_me:9158: \$? = $ac_status" >&5
9159   (exit $ac_status); } &&
9160          { ac_try='test -s conftest.$ac_objext'
9161   { (eval echo "$as_me:9161: \"$ac_try\"") >&5
9162   (eval $ac_try) 2>&5
9163   ac_status=$?
9164   echo "$as_me:9164: \$? = $ac_status" >&5
9165   (exit $ac_status); }; }; then
9166   INTEL_COMPILER=yes
9167 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9168
9169 else
9170   echo "$as_me: failed program was:" >&5
9171 cat conftest.$ac_ext >&5
9172 fi
9173 rm -f conftest.$ac_objext conftest.$ac_ext
9174                 CFLAGS="$cf_save_CFLAGS"
9175                 echo "$as_me:9175: result: $INTEL_COMPILER" >&5
9176 echo "${ECHO_T}$INTEL_COMPILER" >&6
9177                 ;;
9178         esac
9179 fi
9180
9181 cat > conftest.$ac_ext <<EOF
9182 #line 9182 "configure"
9183 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9184 EOF
9185
9186 if test "$INTEL_COMPILER" = yes
9187 then
9188 # The "-wdXXX" options suppress warnings:
9189 # remark #1419: external declaration in primary source file
9190 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9191 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9192 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9193 # remark #193: zero used for undefined preprocessing identifier
9194 # remark #593: variable "curs_sb_left_arrow" was set but never used
9195 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9196 # remark #869: parameter "tw" was never referenced
9197 # remark #981: operands are evaluated in unspecified order
9198 # warning #269: invalid format string conversion
9199
9200         { echo "$as_me:9200: checking for $CC warning options..." >&5
9201 echo "$as_me: checking for $CC warning options..." >&6;}
9202         cf_save_CFLAGS="$CFLAGS"
9203         EXTRA_CFLAGS="-Wall"
9204         for cf_opt in  \
9205                 wd1419 \
9206                 wd1682 \
9207                 wd1683 \
9208                 wd1684 \
9209                 wd193 \
9210                 wd279 \
9211                 wd593 \
9212                 wd810 \
9213                 wd869 \
9214                 wd981
9215         do
9216                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9217                 if { (eval echo "$as_me:9217: \"$ac_compile\"") >&5
9218   (eval $ac_compile) 2>&5
9219   ac_status=$?
9220   echo "$as_me:9220: \$? = $ac_status" >&5
9221   (exit $ac_status); }; then
9222                         test -n "$verbose" && echo "$as_me:9222: result: ... -$cf_opt" >&5
9223 echo "${ECHO_T}... -$cf_opt" >&6
9224                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9225                 fi
9226         done
9227         CFLAGS="$cf_save_CFLAGS"
9228
9229 elif test "$GCC" = yes
9230 then
9231         { echo "$as_me:9231: checking for $CC warning options..." >&5
9232 echo "$as_me: checking for $CC warning options..." >&6;}
9233         cf_save_CFLAGS="$CFLAGS"
9234         EXTRA_CFLAGS="-W -Wall"
9235         cf_warn_CONST=""
9236         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9237         for cf_opt in \
9238                 Wbad-function-cast \
9239                 Wcast-align \
9240                 Wcast-qual \
9241                 Winline \
9242                 Wmissing-declarations \
9243                 Wmissing-prototypes \
9244                 Wnested-externs \
9245                 Wpointer-arith \
9246                 Wshadow \
9247                 Wstrict-prototypes \
9248                 Wundef $cf_warn_CONST
9249         do
9250                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9251                 if { (eval echo "$as_me:9251: \"$ac_compile\"") >&5
9252   (eval $ac_compile) 2>&5
9253   ac_status=$?
9254   echo "$as_me:9254: \$? = $ac_status" >&5
9255   (exit $ac_status); }; then
9256                         test -n "$verbose" && echo "$as_me:9256: result: ... -$cf_opt" >&5
9257 echo "${ECHO_T}... -$cf_opt" >&6
9258                         case $cf_opt in #(vi
9259                         Wcast-qual) #(vi
9260                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9261                                 ;;
9262                         Winline) #(vi
9263                                 case $GCC_VERSION in
9264                                 3.3*)
9265                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9266
9267                                         continue;;
9268                                 esac
9269                                 ;;
9270                         esac
9271                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9272                 fi
9273         done
9274         CFLAGS="$cf_save_CFLAGS"
9275 fi
9276 rm -f conftest*
9277
9278         if test "$cf_with_cxx" = yes ; then
9279
9280 INTEL_CPLUSPLUS=no
9281
9282 if test "$GCC" = yes ; then
9283         case $host_os in
9284         linux*|gnu*)
9285                 echo "$as_me:9285: checking if this is really Intel C++ compiler" >&5
9286 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9287                 cf_save_CFLAGS="$CXXFLAGS"
9288                 CXXFLAGS="$CXXFLAGS -no-gcc"
9289                 cat >conftest.$ac_ext <<_ACEOF
9290 #line 9290 "configure"
9291 #include "confdefs.h"
9292
9293 int
9294 main ()
9295 {
9296
9297 #ifdef __INTEL_COMPILER
9298 #else
9299 make an error
9300 #endif
9301
9302   ;
9303   return 0;
9304 }
9305 _ACEOF
9306 rm -f conftest.$ac_objext
9307 if { (eval echo "$as_me:9307: \"$ac_compile\"") >&5
9308   (eval $ac_compile) 2>&5
9309   ac_status=$?
9310   echo "$as_me:9310: \$? = $ac_status" >&5
9311   (exit $ac_status); } &&
9312          { ac_try='test -s conftest.$ac_objext'
9313   { (eval echo "$as_me:9313: \"$ac_try\"") >&5
9314   (eval $ac_try) 2>&5
9315   ac_status=$?
9316   echo "$as_me:9316: \$? = $ac_status" >&5
9317   (exit $ac_status); }; }; then
9318   INTEL_CPLUSPLUS=yes
9319 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9320
9321 else
9322   echo "$as_me: failed program was:" >&5
9323 cat conftest.$ac_ext >&5
9324 fi
9325 rm -f conftest.$ac_objext conftest.$ac_ext
9326                 CXXFLAGS="$cf_save_CFLAGS"
9327                 echo "$as_me:9327: result: $INTEL_CPLUSPLUS" >&5
9328 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9329                 ;;
9330         esac
9331 fi
9332
9333 ac_ext=cc
9334 ac_cpp='$CXXCPP $CPPFLAGS'
9335 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9336 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9337 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9338 ac_main_return=return
9339
9340 cat > conftest.$ac_ext <<EOF
9341 #line 9341 "configure"
9342 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9343 EOF
9344
9345 if test "$INTEL_CPLUSPLUS" = yes
9346 then
9347 # The "-wdXXX" options suppress warnings:
9348 # remark #1419: external declaration in primary source file
9349 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9350 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9351 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9352 # remark #193: zero used for undefined preprocessing identifier
9353 # remark #593: variable "curs_sb_left_arrow" was set but never used
9354 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9355 # remark #869: parameter "tw" was never referenced
9356 # remark #981: operands are evaluated in unspecified order
9357 # warning #269: invalid format string conversion
9358
9359         { echo "$as_me:9359: checking for $CC warning options..." >&5
9360 echo "$as_me: checking for $CC warning options..." >&6;}
9361         cf_save_CXXFLAGS="$CXXFLAGS"
9362         EXTRA_CXXFLAGS="-Wall"
9363         for cf_opt in \
9364                 wd1419 \
9365                 wd1682 \
9366                 wd1683 \
9367                 wd1684 \
9368                 wd193 \
9369                 wd279 \
9370                 wd593 \
9371                 wd810 \
9372                 wd869 \
9373                 wd981
9374         do
9375                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9376                 if { (eval echo "$as_me:9376: \"$ac_compile\"") >&5
9377   (eval $ac_compile) 2>&5
9378   ac_status=$?
9379   echo "$as_me:9379: \$? = $ac_status" >&5
9380   (exit $ac_status); }; then
9381                         test -n "$verbose" && echo "$as_me:9381: result: ... -$cf_opt" >&5
9382 echo "${ECHO_T}... -$cf_opt" >&6
9383                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9384                 fi
9385         done
9386         CXXFLAGS="$cf_save_CXXFLAGS"
9387
9388 elif test "$GXX" = yes
9389 then
9390         { echo "$as_me:9390: checking for $CXX warning options..." >&5
9391 echo "$as_me: checking for $CXX warning options..." >&6;}
9392         cf_save_CXXFLAGS="$CXXFLAGS"
9393         EXTRA_CXXFLAGS="-W -Wall"
9394         cf_gxx_extra_warnings=""
9395         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9396         case "$GCC_VERSION" in
9397         [1-2].*)
9398                 ;;
9399         *)
9400                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9401                 ;;
9402         esac
9403         for cf_opt in \
9404                 Wabi \
9405                 fabi-version=0 \
9406                 Woverloaded-virtual \
9407                 Wsign-promo \
9408                 Wsynth \
9409                 Wold-style-cast \
9410                 Wcast-align \
9411                 Wcast-qual \
9412                 Wmissing-prototypes \
9413                 Wpointer-arith \
9414                 Wshadow \
9415                 Wstrict-prototypes \
9416                 Wundef $cf_gxx_extra_warnings Wno-unused
9417         do
9418                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9419                 if { (eval echo "$as_me:9419: \"$ac_compile\"") >&5
9420   (eval $ac_compile) 2>&5
9421   ac_status=$?
9422   echo "$as_me:9422: \$? = $ac_status" >&5
9423   (exit $ac_status); }; then
9424                         test -n "$verbose" && echo "$as_me:9424: result: ... -$cf_opt" >&5
9425 echo "${ECHO_T}... -$cf_opt" >&6
9426                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9427                 else
9428                         test -n "$verbose" && echo "$as_me:9428: result: ... no -$cf_opt" >&5
9429 echo "${ECHO_T}... no -$cf_opt" >&6
9430                 fi
9431         done
9432         CXXFLAGS="$cf_save_CXXFLAGS"
9433 fi
9434
9435 rm -f conftest*
9436 ac_ext=c
9437 ac_cpp='$CPP $CPPFLAGS'
9438 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9439 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9440 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9441 ac_main_return=return
9442
9443         fi
9444 fi
9445
9446 if test "$GCC" = yes
9447 then
9448 cat > conftest.i <<EOF
9449 #ifndef GCC_PRINTF
9450 #define GCC_PRINTF 0
9451 #endif
9452 #ifndef GCC_SCANF
9453 #define GCC_SCANF 0
9454 #endif
9455 #ifndef GCC_NORETURN
9456 #define GCC_NORETURN /* nothing */
9457 #endif
9458 #ifndef GCC_UNUSED
9459 #define GCC_UNUSED /* nothing */
9460 #endif
9461 EOF
9462 if test "$GCC" = yes
9463 then
9464         { echo "$as_me:9464: checking for $CC __attribute__ directives..." >&5
9465 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9466 cat > conftest.$ac_ext <<EOF
9467 #line 9467 "configure"
9468 #include "confdefs.h"
9469 #include "conftest.h"
9470 #include "conftest.i"
9471 #if     GCC_PRINTF
9472 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9473 #else
9474 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9475 #endif
9476 #if     GCC_SCANF
9477 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9478 #else
9479 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9480 #endif
9481 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9482 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9483 extern void foo(void) GCC_NORETURN;
9484 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9485 EOF
9486         for cf_attribute in scanf printf unused noreturn
9487         do
9488
9489 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9490
9491                 cf_directive="__attribute__(($cf_attribute))"
9492                 echo "checking for $CC $cf_directive" 1>&5
9493                 case $cf_attribute in
9494                 scanf|printf)
9495                 cat >conftest.h <<EOF
9496 #define GCC_$cf_ATTRIBUTE 1
9497 EOF
9498                         ;;
9499                 *)
9500                 cat >conftest.h <<EOF
9501 #define GCC_$cf_ATTRIBUTE $cf_directive
9502 EOF
9503                         ;;
9504                 esac
9505                 if { (eval echo "$as_me:9505: \"$ac_compile\"") >&5
9506   (eval $ac_compile) 2>&5
9507   ac_status=$?
9508   echo "$as_me:9508: \$? = $ac_status" >&5
9509   (exit $ac_status); }; then
9510                         test -n "$verbose" && echo "$as_me:9510: result: ... $cf_attribute" >&5
9511 echo "${ECHO_T}... $cf_attribute" >&6
9512                         cat conftest.h >>confdefs.h
9513                 fi
9514         done
9515 else
9516         fgrep define conftest.i >>confdefs.h
9517 fi
9518 rm -rf conftest*
9519 fi
9520
9521 ###     use option --enable-assertions to turn on generation of assertion code
9522 echo "$as_me:9522: checking if you want to enable runtime assertions" >&5
9523 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9524
9525 # Check whether --enable-assertions or --disable-assertions was given.
9526 if test "${enable_assertions+set}" = set; then
9527   enableval="$enable_assertions"
9528   with_assertions=$enableval
9529 else
9530   with_assertions=no
9531 fi;
9532 echo "$as_me:9532: result: $with_assertions" >&5
9533 echo "${ECHO_T}$with_assertions" >&6
9534 if test -n "$GCC"
9535 then
9536         if test "$with_assertions" = no
9537         then
9538                 cat >>confdefs.h <<\EOF
9539 #define NDEBUG 1
9540 EOF
9541
9542                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9543         else
9544                 ADAFLAGS="$ADAFLAGS -gnata"
9545         fi
9546 fi
9547
9548 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9549
9550 echo "$as_me:9550: checking if you want to use dmalloc for testing" >&5
9551 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9552
9553 # Check whether --with-dmalloc or --without-dmalloc was given.
9554 if test "${with_dmalloc+set}" = set; then
9555   withval="$with_dmalloc"
9556   cat >>confdefs.h <<\EOF
9557 #define USE_DMALLOC 1
9558 EOF
9559
9560         : ${with_cflags:=-g}
9561         : ${with_no_leaks:=yes}
9562          with_dmalloc=yes
9563 else
9564   with_dmalloc=
9565 fi;
9566 echo "$as_me:9566: result: ${with_dmalloc:-no}" >&5
9567 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9568
9569 case .$with_cflags in #(vi
9570 .*-g*)
9571         case .$CFLAGS in #(vi
9572         .*-g*) #(vi
9573                 ;;
9574         *)
9575
9576 cf_fix_cppflags=no
9577 cf_new_cflags=
9578 cf_new_cppflags=
9579 cf_new_extra_cppflags=
9580
9581 for cf_add_cflags in -g
9582 do
9583 case $cf_fix_cppflags in
9584 no)
9585         case $cf_add_cflags in #(vi
9586         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9587                 case $cf_add_cflags in
9588                 -D*)
9589                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9590
9591                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9592                         && test -z "${cf_tst_cflags}" \
9593                         && cf_fix_cppflags=yes
9594
9595                         if test $cf_fix_cppflags = yes ; then
9596                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9597                                 continue
9598                         elif test "${cf_tst_cflags}" = "\"'" ; then
9599                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9600                                 continue
9601                         fi
9602                         ;;
9603                 esac
9604                 case "$CPPFLAGS" in
9605                 *$cf_add_cflags) #(vi
9606                         ;;
9607                 *) #(vi
9608                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9609                         ;;
9610                 esac
9611                 ;;
9612         *)
9613                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9614                 ;;
9615         esac
9616         ;;
9617 yes)
9618         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9619
9620         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9621
9622         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9623         && test -z "${cf_tst_cflags}" \
9624         && cf_fix_cppflags=no
9625         ;;
9626 esac
9627 done
9628
9629 if test -n "$cf_new_cflags" ; then
9630
9631         CFLAGS="$CFLAGS $cf_new_cflags"
9632 fi
9633
9634 if test -n "$cf_new_cppflags" ; then
9635
9636         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9637 fi
9638
9639 if test -n "$cf_new_extra_cppflags" ; then
9640
9641         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9642 fi
9643
9644                 ;;
9645         esac
9646         ;;
9647 esac
9648
9649 if test "$with_dmalloc" = yes ; then
9650         echo "$as_me:9650: checking for dmalloc.h" >&5
9651 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9652 if test "${ac_cv_header_dmalloc_h+set}" = set; then
9653   echo $ECHO_N "(cached) $ECHO_C" >&6
9654 else
9655   cat >conftest.$ac_ext <<_ACEOF
9656 #line 9656 "configure"
9657 #include "confdefs.h"
9658 #include <dmalloc.h>
9659 _ACEOF
9660 if { (eval echo "$as_me:9660: \"$ac_cpp conftest.$ac_ext\"") >&5
9661   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9662   ac_status=$?
9663   egrep -v '^ *\+' conftest.er1 >conftest.err
9664   rm -f conftest.er1
9665   cat conftest.err >&5
9666   echo "$as_me:9666: \$? = $ac_status" >&5
9667   (exit $ac_status); } >/dev/null; then
9668   if test -s conftest.err; then
9669     ac_cpp_err=$ac_c_preproc_warn_flag
9670   else
9671     ac_cpp_err=
9672   fi
9673 else
9674   ac_cpp_err=yes
9675 fi
9676 if test -z "$ac_cpp_err"; then
9677   ac_cv_header_dmalloc_h=yes
9678 else
9679   echo "$as_me: failed program was:" >&5
9680   cat conftest.$ac_ext >&5
9681   ac_cv_header_dmalloc_h=no
9682 fi
9683 rm -f conftest.err conftest.$ac_ext
9684 fi
9685 echo "$as_me:9685: result: $ac_cv_header_dmalloc_h" >&5
9686 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
9687 if test $ac_cv_header_dmalloc_h = yes; then
9688
9689 echo "$as_me:9689: checking for dmalloc_debug in -ldmalloc" >&5
9690 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
9691 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
9692   echo $ECHO_N "(cached) $ECHO_C" >&6
9693 else
9694   ac_check_lib_save_LIBS=$LIBS
9695 LIBS="-ldmalloc  $LIBS"
9696 cat >conftest.$ac_ext <<_ACEOF
9697 #line 9697 "configure"
9698 #include "confdefs.h"
9699
9700 /* Override any gcc2 internal prototype to avoid an error.  */
9701 #ifdef __cplusplus
9702 extern "C"
9703 #endif
9704 /* We use char because int might match the return type of a gcc2
9705    builtin and then its argument prototype would still apply.  */
9706 char dmalloc_debug ();
9707 int
9708 main ()
9709 {
9710 dmalloc_debug ();
9711   ;
9712   return 0;
9713 }
9714 _ACEOF
9715 rm -f conftest.$ac_objext conftest$ac_exeext
9716 if { (eval echo "$as_me:9716: \"$ac_link\"") >&5
9717   (eval $ac_link) 2>&5
9718   ac_status=$?
9719   echo "$as_me:9719: \$? = $ac_status" >&5
9720   (exit $ac_status); } &&
9721          { ac_try='test -s conftest$ac_exeext'
9722   { (eval echo "$as_me:9722: \"$ac_try\"") >&5
9723   (eval $ac_try) 2>&5
9724   ac_status=$?
9725   echo "$as_me:9725: \$? = $ac_status" >&5
9726   (exit $ac_status); }; }; then
9727   ac_cv_lib_dmalloc_dmalloc_debug=yes
9728 else
9729   echo "$as_me: failed program was:" >&5
9730 cat conftest.$ac_ext >&5
9731 ac_cv_lib_dmalloc_dmalloc_debug=no
9732 fi
9733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9734 LIBS=$ac_check_lib_save_LIBS
9735 fi
9736 echo "$as_me:9736: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
9737 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
9738 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
9739   cat >>confdefs.h <<EOF
9740 #define HAVE_LIBDMALLOC 1
9741 EOF
9742
9743   LIBS="-ldmalloc $LIBS"
9744
9745 fi
9746
9747 fi
9748
9749 fi
9750
9751 echo "$as_me:9751: checking if you want to use dbmalloc for testing" >&5
9752 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
9753
9754 # Check whether --with-dbmalloc or --without-dbmalloc was given.
9755 if test "${with_dbmalloc+set}" = set; then
9756   withval="$with_dbmalloc"
9757   cat >>confdefs.h <<\EOF
9758 #define USE_DBMALLOC 1
9759 EOF
9760
9761         : ${with_cflags:=-g}
9762         : ${with_no_leaks:=yes}
9763          with_dbmalloc=yes
9764 else
9765   with_dbmalloc=
9766 fi;
9767 echo "$as_me:9767: result: ${with_dbmalloc:-no}" >&5
9768 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
9769
9770 case .$with_cflags in #(vi
9771 .*-g*)
9772         case .$CFLAGS in #(vi
9773         .*-g*) #(vi
9774                 ;;
9775         *)
9776
9777 cf_fix_cppflags=no
9778 cf_new_cflags=
9779 cf_new_cppflags=
9780 cf_new_extra_cppflags=
9781
9782 for cf_add_cflags in -g
9783 do
9784 case $cf_fix_cppflags in
9785 no)
9786         case $cf_add_cflags in #(vi
9787         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9788                 case $cf_add_cflags in
9789                 -D*)
9790                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9791
9792                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9793                         && test -z "${cf_tst_cflags}" \
9794                         && cf_fix_cppflags=yes
9795
9796                         if test $cf_fix_cppflags = yes ; then
9797                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9798                                 continue
9799                         elif test "${cf_tst_cflags}" = "\"'" ; then
9800                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9801                                 continue
9802                         fi
9803                         ;;
9804                 esac
9805                 case "$CPPFLAGS" in
9806                 *$cf_add_cflags) #(vi
9807                         ;;
9808                 *) #(vi
9809                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9810                         ;;
9811                 esac
9812                 ;;
9813         *)
9814                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9815                 ;;
9816         esac
9817         ;;
9818 yes)
9819         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9820
9821         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9822
9823         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9824         && test -z "${cf_tst_cflags}" \
9825         && cf_fix_cppflags=no
9826         ;;
9827 esac
9828 done
9829
9830 if test -n "$cf_new_cflags" ; then
9831
9832         CFLAGS="$CFLAGS $cf_new_cflags"
9833 fi
9834
9835 if test -n "$cf_new_cppflags" ; then
9836
9837         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9838 fi
9839
9840 if test -n "$cf_new_extra_cppflags" ; then
9841
9842         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9843 fi
9844
9845                 ;;
9846         esac
9847         ;;
9848 esac
9849
9850 if test "$with_dbmalloc" = yes ; then
9851         echo "$as_me:9851: checking for dbmalloc.h" >&5
9852 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
9853 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
9854   echo $ECHO_N "(cached) $ECHO_C" >&6
9855 else
9856   cat >conftest.$ac_ext <<_ACEOF
9857 #line 9857 "configure"
9858 #include "confdefs.h"
9859 #include <dbmalloc.h>
9860 _ACEOF
9861 if { (eval echo "$as_me:9861: \"$ac_cpp conftest.$ac_ext\"") >&5
9862   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9863   ac_status=$?
9864   egrep -v '^ *\+' conftest.er1 >conftest.err
9865   rm -f conftest.er1
9866   cat conftest.err >&5
9867   echo "$as_me:9867: \$? = $ac_status" >&5
9868   (exit $ac_status); } >/dev/null; then
9869   if test -s conftest.err; then
9870     ac_cpp_err=$ac_c_preproc_warn_flag
9871   else
9872     ac_cpp_err=
9873   fi
9874 else
9875   ac_cpp_err=yes
9876 fi
9877 if test -z "$ac_cpp_err"; then
9878   ac_cv_header_dbmalloc_h=yes
9879 else
9880   echo "$as_me: failed program was:" >&5
9881   cat conftest.$ac_ext >&5
9882   ac_cv_header_dbmalloc_h=no
9883 fi
9884 rm -f conftest.err conftest.$ac_ext
9885 fi
9886 echo "$as_me:9886: result: $ac_cv_header_dbmalloc_h" >&5
9887 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
9888 if test $ac_cv_header_dbmalloc_h = yes; then
9889
9890 echo "$as_me:9890: checking for debug_malloc in -ldbmalloc" >&5
9891 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
9892 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
9893   echo $ECHO_N "(cached) $ECHO_C" >&6
9894 else
9895   ac_check_lib_save_LIBS=$LIBS
9896 LIBS="-ldbmalloc  $LIBS"
9897 cat >conftest.$ac_ext <<_ACEOF
9898 #line 9898 "configure"
9899 #include "confdefs.h"
9900
9901 /* Override any gcc2 internal prototype to avoid an error.  */
9902 #ifdef __cplusplus
9903 extern "C"
9904 #endif
9905 /* We use char because int might match the return type of a gcc2
9906    builtin and then its argument prototype would still apply.  */
9907 char debug_malloc ();
9908 int
9909 main ()
9910 {
9911 debug_malloc ();
9912   ;
9913   return 0;
9914 }
9915 _ACEOF
9916 rm -f conftest.$ac_objext conftest$ac_exeext
9917 if { (eval echo "$as_me:9917: \"$ac_link\"") >&5
9918   (eval $ac_link) 2>&5
9919   ac_status=$?
9920   echo "$as_me:9920: \$? = $ac_status" >&5
9921   (exit $ac_status); } &&
9922          { ac_try='test -s conftest$ac_exeext'
9923   { (eval echo "$as_me:9923: \"$ac_try\"") >&5
9924   (eval $ac_try) 2>&5
9925   ac_status=$?
9926   echo "$as_me:9926: \$? = $ac_status" >&5
9927   (exit $ac_status); }; }; then
9928   ac_cv_lib_dbmalloc_debug_malloc=yes
9929 else
9930   echo "$as_me: failed program was:" >&5
9931 cat conftest.$ac_ext >&5
9932 ac_cv_lib_dbmalloc_debug_malloc=no
9933 fi
9934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9935 LIBS=$ac_check_lib_save_LIBS
9936 fi
9937 echo "$as_me:9937: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
9938 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
9939 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
9940   cat >>confdefs.h <<EOF
9941 #define HAVE_LIBDBMALLOC 1
9942 EOF
9943
9944   LIBS="-ldbmalloc $LIBS"
9945
9946 fi
9947
9948 fi
9949
9950 fi
9951
9952 echo "$as_me:9952: checking if you want to use valgrind for testing" >&5
9953 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
9954
9955 # Check whether --with-valgrind or --without-valgrind was given.
9956 if test "${with_valgrind+set}" = set; then
9957   withval="$with_valgrind"
9958   cat >>confdefs.h <<\EOF
9959 #define USE_VALGRIND 1
9960 EOF
9961
9962         : ${with_cflags:=-g}
9963         : ${with_no_leaks:=yes}
9964          with_valgrind=yes
9965 else
9966   with_valgrind=
9967 fi;
9968 echo "$as_me:9968: result: ${with_valgrind:-no}" >&5
9969 echo "${ECHO_T}${with_valgrind:-no}" >&6
9970
9971 case .$with_cflags in #(vi
9972 .*-g*)
9973         case .$CFLAGS in #(vi
9974         .*-g*) #(vi
9975                 ;;
9976         *)
9977
9978 cf_fix_cppflags=no
9979 cf_new_cflags=
9980 cf_new_cppflags=
9981 cf_new_extra_cppflags=
9982
9983 for cf_add_cflags in -g
9984 do
9985 case $cf_fix_cppflags in
9986 no)
9987         case $cf_add_cflags in #(vi
9988         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9989                 case $cf_add_cflags in
9990                 -D*)
9991                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9992
9993                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9994                         && test -z "${cf_tst_cflags}" \
9995                         && cf_fix_cppflags=yes
9996
9997                         if test $cf_fix_cppflags = yes ; then
9998                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9999                                 continue
10000                         elif test "${cf_tst_cflags}" = "\"'" ; then
10001                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10002                                 continue
10003                         fi
10004                         ;;
10005                 esac
10006                 case "$CPPFLAGS" in
10007                 *$cf_add_cflags) #(vi
10008                         ;;
10009                 *) #(vi
10010                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10011                         ;;
10012                 esac
10013                 ;;
10014         *)
10015                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10016                 ;;
10017         esac
10018         ;;
10019 yes)
10020         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10021
10022         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10023
10024         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10025         && test -z "${cf_tst_cflags}" \
10026         && cf_fix_cppflags=no
10027         ;;
10028 esac
10029 done
10030
10031 if test -n "$cf_new_cflags" ; then
10032
10033         CFLAGS="$CFLAGS $cf_new_cflags"
10034 fi
10035
10036 if test -n "$cf_new_cppflags" ; then
10037
10038         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10039 fi
10040
10041 if test -n "$cf_new_extra_cppflags" ; then
10042
10043         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10044 fi
10045
10046                 ;;
10047         esac
10048         ;;
10049 esac
10050
10051 echo "$as_me:10051: checking if you want to perform memory-leak testing" >&5
10052 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10053
10054 # Check whether --enable-leaks or --disable-leaks was given.
10055 if test "${enable_leaks+set}" = set; then
10056   enableval="$enable_leaks"
10057   with_no_leaks=yes
10058 else
10059   : ${with_no_leaks:=no}
10060 fi;
10061 echo "$as_me:10061: result: $with_no_leaks" >&5
10062 echo "${ECHO_T}$with_no_leaks" >&6
10063
10064 if test "$with_no_leaks" = yes ; then
10065         cat >>confdefs.h <<\EOF
10066 #define NO_LEAKS 1
10067 EOF
10068
10069 fi
10070
10071 cat >>confdefs.h <<\EOF
10072 #define HAVE_NC_ALLOC_H 1
10073 EOF
10074
10075 ###     use option --enable-expanded to generate certain macros as functions
10076
10077 # Check whether --enable-expanded or --disable-expanded was given.
10078 if test "${enable_expanded+set}" = set; then
10079   enableval="$enable_expanded"
10080   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10081 #define NCURSES_EXPANDED 1
10082 EOF
10083
10084 fi;
10085
10086 ###     use option --disable-macros to suppress macros in favor of functions
10087
10088 # Check whether --enable-macros or --disable-macros was given.
10089 if test "${enable_macros+set}" = set; then
10090   enableval="$enable_macros"
10091   test "$enableval" = no && cat >>confdefs.h <<\EOF
10092 #define NCURSES_NOMACROS 1
10093 EOF
10094
10095 fi;
10096
10097 # Normally we only add trace() to the debug-library.  Allow this to be
10098 # extended to all models of the ncurses library:
10099 cf_all_traces=no
10100 case "$CFLAGS $CPPFLAGS" in
10101 *-DTRACE*)
10102         cf_all_traces=yes
10103         ;;
10104 esac
10105
10106 echo "$as_me:10106: checking whether to add trace feature to all models" >&5
10107 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10108
10109 # Check whether --with-trace or --without-trace was given.
10110 if test "${with_trace+set}" = set; then
10111   withval="$with_trace"
10112   cf_with_trace=$withval
10113 else
10114   cf_with_trace=$cf_all_traces
10115 fi;
10116 echo "$as_me:10116: result: $cf_with_trace" >&5
10117 echo "${ECHO_T}$cf_with_trace" >&6
10118
10119 if test "$cf_with_trace" = yes ; then
10120         LIB_TRACING=all
10121         ADA_TRACE=TRUE
10122
10123 cf_fix_cppflags=no
10124 cf_new_cflags=
10125 cf_new_cppflags=
10126 cf_new_extra_cppflags=
10127
10128 for cf_add_cflags in -DTRACE
10129 do
10130 case $cf_fix_cppflags in
10131 no)
10132         case $cf_add_cflags in #(vi
10133         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10134                 case $cf_add_cflags in
10135                 -D*)
10136                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10137
10138                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10139                         && test -z "${cf_tst_cflags}" \
10140                         && cf_fix_cppflags=yes
10141
10142                         if test $cf_fix_cppflags = yes ; then
10143                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10144                                 continue
10145                         elif test "${cf_tst_cflags}" = "\"'" ; then
10146                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10147                                 continue
10148                         fi
10149                         ;;
10150                 esac
10151                 case "$CPPFLAGS" in
10152                 *$cf_add_cflags) #(vi
10153                         ;;
10154                 *) #(vi
10155                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10156                         ;;
10157                 esac
10158                 ;;
10159         *)
10160                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10161                 ;;
10162         esac
10163         ;;
10164 yes)
10165         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10166
10167         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10168
10169         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10170         && test -z "${cf_tst_cflags}" \
10171         && cf_fix_cppflags=no
10172         ;;
10173 esac
10174 done
10175
10176 if test -n "$cf_new_cflags" ; then
10177
10178         CFLAGS="$CFLAGS $cf_new_cflags"
10179 fi
10180
10181 if test -n "$cf_new_cppflags" ; then
10182
10183         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10184 fi
10185
10186 if test -n "$cf_new_extra_cppflags" ; then
10187
10188         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10189 fi
10190
10191 else
10192         LIB_TRACING=DEBUG
10193         ADA_TRACE=FALSE
10194 fi
10195
10196 ###     Checks for libraries.
10197 echo "$as_me:10197: checking for gettimeofday" >&5
10198 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10199 if test "${ac_cv_func_gettimeofday+set}" = set; then
10200   echo $ECHO_N "(cached) $ECHO_C" >&6
10201 else
10202   cat >conftest.$ac_ext <<_ACEOF
10203 #line 10203 "configure"
10204 #include "confdefs.h"
10205 /* System header to define __stub macros and hopefully few prototypes,
10206     which can conflict with char gettimeofday (); below.  */
10207 #include <assert.h>
10208 /* Override any gcc2 internal prototype to avoid an error.  */
10209 #ifdef __cplusplus
10210 extern "C"
10211 #endif
10212 /* We use char because int might match the return type of a gcc2
10213    builtin and then its argument prototype would still apply.  */
10214 char gettimeofday ();
10215 char (*f) ();
10216
10217 int
10218 main ()
10219 {
10220 /* The GNU C library defines this for functions which it implements
10221     to always fail with ENOSYS.  Some functions are actually named
10222     something starting with __ and the normal name is an alias.  */
10223 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10224 choke me
10225 #else
10226 f = gettimeofday;
10227 #endif
10228
10229   ;
10230   return 0;
10231 }
10232 _ACEOF
10233 rm -f conftest.$ac_objext conftest$ac_exeext
10234 if { (eval echo "$as_me:10234: \"$ac_link\"") >&5
10235   (eval $ac_link) 2>&5
10236   ac_status=$?
10237   echo "$as_me:10237: \$? = $ac_status" >&5
10238   (exit $ac_status); } &&
10239          { ac_try='test -s conftest$ac_exeext'
10240   { (eval echo "$as_me:10240: \"$ac_try\"") >&5
10241   (eval $ac_try) 2>&5
10242   ac_status=$?
10243   echo "$as_me:10243: \$? = $ac_status" >&5
10244   (exit $ac_status); }; }; then
10245   ac_cv_func_gettimeofday=yes
10246 else
10247   echo "$as_me: failed program was:" >&5
10248 cat conftest.$ac_ext >&5
10249 ac_cv_func_gettimeofday=no
10250 fi
10251 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10252 fi
10253 echo "$as_me:10253: result: $ac_cv_func_gettimeofday" >&5
10254 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10255 if test $ac_cv_func_gettimeofday = yes; then
10256   cat >>confdefs.h <<\EOF
10257 #define HAVE_GETTIMEOFDAY 1
10258 EOF
10259
10260 else
10261
10262 echo "$as_me:10262: checking for gettimeofday in -lbsd" >&5
10263 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10264 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10265   echo $ECHO_N "(cached) $ECHO_C" >&6
10266 else
10267   ac_check_lib_save_LIBS=$LIBS
10268 LIBS="-lbsd  $LIBS"
10269 cat >conftest.$ac_ext <<_ACEOF
10270 #line 10270 "configure"
10271 #include "confdefs.h"
10272
10273 /* Override any gcc2 internal prototype to avoid an error.  */
10274 #ifdef __cplusplus
10275 extern "C"
10276 #endif
10277 /* We use char because int might match the return type of a gcc2
10278    builtin and then its argument prototype would still apply.  */
10279 char gettimeofday ();
10280 int
10281 main ()
10282 {
10283 gettimeofday ();
10284   ;
10285   return 0;
10286 }
10287 _ACEOF
10288 rm -f conftest.$ac_objext conftest$ac_exeext
10289 if { (eval echo "$as_me:10289: \"$ac_link\"") >&5
10290   (eval $ac_link) 2>&5
10291   ac_status=$?
10292   echo "$as_me:10292: \$? = $ac_status" >&5
10293   (exit $ac_status); } &&
10294          { ac_try='test -s conftest$ac_exeext'
10295   { (eval echo "$as_me:10295: \"$ac_try\"") >&5
10296   (eval $ac_try) 2>&5
10297   ac_status=$?
10298   echo "$as_me:10298: \$? = $ac_status" >&5
10299   (exit $ac_status); }; }; then
10300   ac_cv_lib_bsd_gettimeofday=yes
10301 else
10302   echo "$as_me: failed program was:" >&5
10303 cat conftest.$ac_ext >&5
10304 ac_cv_lib_bsd_gettimeofday=no
10305 fi
10306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10307 LIBS=$ac_check_lib_save_LIBS
10308 fi
10309 echo "$as_me:10309: result: $ac_cv_lib_bsd_gettimeofday" >&5
10310 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10311 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10312   cat >>confdefs.h <<\EOF
10313 #define HAVE_GETTIMEOFDAY 1
10314 EOF
10315
10316         LIBS="$LIBS -lbsd"
10317 fi
10318
10319 fi
10320
10321 echo "$as_me:10321: checking if -lm needed for math functions" >&5
10322 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10323 if test "${cf_cv_need_libm+set}" = set; then
10324   echo $ECHO_N "(cached) $ECHO_C" >&6
10325 else
10326
10327         cat >conftest.$ac_ext <<_ACEOF
10328 #line 10328 "configure"
10329 #include "confdefs.h"
10330
10331         #include <stdio.h>
10332         #include <math.h>
10333
10334 int
10335 main ()
10336 {
10337 double x = rand(); printf("result = %g\n", sin(x))
10338   ;
10339   return 0;
10340 }
10341 _ACEOF
10342 rm -f conftest.$ac_objext conftest$ac_exeext
10343 if { (eval echo "$as_me:10343: \"$ac_link\"") >&5
10344   (eval $ac_link) 2>&5
10345   ac_status=$?
10346   echo "$as_me:10346: \$? = $ac_status" >&5
10347   (exit $ac_status); } &&
10348          { ac_try='test -s conftest$ac_exeext'
10349   { (eval echo "$as_me:10349: \"$ac_try\"") >&5
10350   (eval $ac_try) 2>&5
10351   ac_status=$?
10352   echo "$as_me:10352: \$? = $ac_status" >&5
10353   (exit $ac_status); }; }; then
10354   cf_cv_need_libm=no
10355 else
10356   echo "$as_me: failed program was:" >&5
10357 cat conftest.$ac_ext >&5
10358 cf_cv_need_libm=yes
10359 fi
10360 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10361 fi
10362 echo "$as_me:10362: result: $cf_cv_need_libm" >&5
10363 echo "${ECHO_T}$cf_cv_need_libm" >&6
10364 if test "$cf_cv_need_libm" = yes
10365 then
10366 MATH_LIB=-lm
10367 fi
10368
10369 ###     Checks for header files.
10370 echo "$as_me:10370: checking for ANSI C header files" >&5
10371 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10372 if test "${ac_cv_header_stdc+set}" = set; then
10373   echo $ECHO_N "(cached) $ECHO_C" >&6
10374 else
10375   cat >conftest.$ac_ext <<_ACEOF
10376 #line 10376 "configure"
10377 #include "confdefs.h"
10378 #include <stdlib.h>
10379 #include <stdarg.h>
10380 #include <string.h>
10381 #include <float.h>
10382
10383 _ACEOF
10384 if { (eval echo "$as_me:10384: \"$ac_cpp conftest.$ac_ext\"") >&5
10385   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10386   ac_status=$?
10387   egrep -v '^ *\+' conftest.er1 >conftest.err
10388   rm -f conftest.er1
10389   cat conftest.err >&5
10390   echo "$as_me:10390: \$? = $ac_status" >&5
10391   (exit $ac_status); } >/dev/null; then
10392   if test -s conftest.err; then
10393     ac_cpp_err=$ac_c_preproc_warn_flag
10394   else
10395     ac_cpp_err=
10396   fi
10397 else
10398   ac_cpp_err=yes
10399 fi
10400 if test -z "$ac_cpp_err"; then
10401   ac_cv_header_stdc=yes
10402 else
10403   echo "$as_me: failed program was:" >&5
10404   cat conftest.$ac_ext >&5
10405   ac_cv_header_stdc=no
10406 fi
10407 rm -f conftest.err conftest.$ac_ext
10408
10409 if test $ac_cv_header_stdc = yes; then
10410   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10411   cat >conftest.$ac_ext <<_ACEOF
10412 #line 10412 "configure"
10413 #include "confdefs.h"
10414 #include <string.h>
10415
10416 _ACEOF
10417 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10418   egrep "memchr" >/dev/null 2>&1; then
10419   :
10420 else
10421   ac_cv_header_stdc=no
10422 fi
10423 rm -f conftest*
10424
10425 fi
10426
10427 if test $ac_cv_header_stdc = yes; then
10428   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10429   cat >conftest.$ac_ext <<_ACEOF
10430 #line 10430 "configure"
10431 #include "confdefs.h"
10432 #include <stdlib.h>
10433
10434 _ACEOF
10435 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10436   egrep "free" >/dev/null 2>&1; then
10437   :
10438 else
10439   ac_cv_header_stdc=no
10440 fi
10441 rm -f conftest*
10442
10443 fi
10444
10445 if test $ac_cv_header_stdc = yes; then
10446   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10447   if test "$cross_compiling" = yes; then
10448   :
10449 else
10450   cat >conftest.$ac_ext <<_ACEOF
10451 #line 10451 "configure"
10452 #include "confdefs.h"
10453 #include <ctype.h>
10454 #if ((' ' & 0x0FF) == 0x020)
10455 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10456 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10457 #else
10458 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10459                      || ('j' <= (c) && (c) <= 'r') \
10460                      || ('s' <= (c) && (c) <= 'z'))
10461 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10462 #endif
10463
10464 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10465 int
10466 main ()
10467 {
10468   int i;
10469   for (i = 0; i < 256; i++)
10470     if (XOR (islower (i), ISLOWER (i))
10471         || toupper (i) != TOUPPER (i))
10472       $ac_main_return(2);
10473   $ac_main_return (0);
10474 }
10475 _ACEOF
10476 rm -f conftest$ac_exeext
10477 if { (eval echo "$as_me:10477: \"$ac_link\"") >&5
10478   (eval $ac_link) 2>&5
10479   ac_status=$?
10480   echo "$as_me:10480: \$? = $ac_status" >&5
10481   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10482   { (eval echo "$as_me:10482: \"$ac_try\"") >&5
10483   (eval $ac_try) 2>&5
10484   ac_status=$?
10485   echo "$as_me:10485: \$? = $ac_status" >&5
10486   (exit $ac_status); }; }; then
10487   :
10488 else
10489   echo "$as_me: program exited with status $ac_status" >&5
10490 echo "$as_me: failed program was:" >&5
10491 cat conftest.$ac_ext >&5
10492 ac_cv_header_stdc=no
10493 fi
10494 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10495 fi
10496 fi
10497 fi
10498 echo "$as_me:10498: result: $ac_cv_header_stdc" >&5
10499 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10500 if test $ac_cv_header_stdc = yes; then
10501
10502 cat >>confdefs.h <<\EOF
10503 #define STDC_HEADERS 1
10504 EOF
10505
10506 fi
10507
10508 ac_header_dirent=no
10509 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10510   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10511 echo "$as_me:10511: checking for $ac_hdr that defines DIR" >&5
10512 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10513 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10514   echo $ECHO_N "(cached) $ECHO_C" >&6
10515 else
10516   cat >conftest.$ac_ext <<_ACEOF
10517 #line 10517 "configure"
10518 #include "confdefs.h"
10519 #include <sys/types.h>
10520 #include <$ac_hdr>
10521
10522 int
10523 main ()
10524 {
10525 if ((DIR *) 0)
10526 return 0;
10527   ;
10528   return 0;
10529 }
10530 _ACEOF
10531 rm -f conftest.$ac_objext
10532 if { (eval echo "$as_me:10532: \"$ac_compile\"") >&5
10533   (eval $ac_compile) 2>&5
10534   ac_status=$?
10535   echo "$as_me:10535: \$? = $ac_status" >&5
10536   (exit $ac_status); } &&
10537          { ac_try='test -s conftest.$ac_objext'
10538   { (eval echo "$as_me:10538: \"$ac_try\"") >&5
10539   (eval $ac_try) 2>&5
10540   ac_status=$?
10541   echo "$as_me:10541: \$? = $ac_status" >&5
10542   (exit $ac_status); }; }; then
10543   eval "$as_ac_Header=yes"
10544 else
10545   echo "$as_me: failed program was:" >&5
10546 cat conftest.$ac_ext >&5
10547 eval "$as_ac_Header=no"
10548 fi
10549 rm -f conftest.$ac_objext conftest.$ac_ext
10550 fi
10551 echo "$as_me:10551: result: `eval echo '${'$as_ac_Header'}'`" >&5
10552 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10553 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10554   cat >>confdefs.h <<EOF
10555 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10556 EOF
10557
10558 ac_header_dirent=$ac_hdr; break
10559 fi
10560
10561 done
10562 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10563 if test $ac_header_dirent = dirent.h; then
10564   echo "$as_me:10564: checking for opendir in -ldir" >&5
10565 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10566 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10567   echo $ECHO_N "(cached) $ECHO_C" >&6
10568 else
10569   ac_check_lib_save_LIBS=$LIBS
10570 LIBS="-ldir  $LIBS"
10571 cat >conftest.$ac_ext <<_ACEOF
10572 #line 10572 "configure"
10573 #include "confdefs.h"
10574
10575 /* Override any gcc2 internal prototype to avoid an error.  */
10576 #ifdef __cplusplus
10577 extern "C"
10578 #endif
10579 /* We use char because int might match the return type of a gcc2
10580    builtin and then its argument prototype would still apply.  */
10581 char opendir ();
10582 int
10583 main ()
10584 {
10585 opendir ();
10586   ;
10587   return 0;
10588 }
10589 _ACEOF
10590 rm -f conftest.$ac_objext conftest$ac_exeext
10591 if { (eval echo "$as_me:10591: \"$ac_link\"") >&5
10592   (eval $ac_link) 2>&5
10593   ac_status=$?
10594   echo "$as_me:10594: \$? = $ac_status" >&5
10595   (exit $ac_status); } &&
10596          { ac_try='test -s conftest$ac_exeext'
10597   { (eval echo "$as_me:10597: \"$ac_try\"") >&5
10598   (eval $ac_try) 2>&5
10599   ac_status=$?
10600   echo "$as_me:10600: \$? = $ac_status" >&5
10601   (exit $ac_status); }; }; then
10602   ac_cv_lib_dir_opendir=yes
10603 else
10604   echo "$as_me: failed program was:" >&5
10605 cat conftest.$ac_ext >&5
10606 ac_cv_lib_dir_opendir=no
10607 fi
10608 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10609 LIBS=$ac_check_lib_save_LIBS
10610 fi
10611 echo "$as_me:10611: result: $ac_cv_lib_dir_opendir" >&5
10612 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10613 if test $ac_cv_lib_dir_opendir = yes; then
10614   LIBS="$LIBS -ldir"
10615 fi
10616
10617 else
10618   echo "$as_me:10618: checking for opendir in -lx" >&5
10619 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10620 if test "${ac_cv_lib_x_opendir+set}" = set; then
10621   echo $ECHO_N "(cached) $ECHO_C" >&6
10622 else
10623   ac_check_lib_save_LIBS=$LIBS
10624 LIBS="-lx  $LIBS"
10625 cat >conftest.$ac_ext <<_ACEOF
10626 #line 10626 "configure"
10627 #include "confdefs.h"
10628
10629 /* Override any gcc2 internal prototype to avoid an error.  */
10630 #ifdef __cplusplus
10631 extern "C"
10632 #endif
10633 /* We use char because int might match the return type of a gcc2
10634    builtin and then its argument prototype would still apply.  */
10635 char opendir ();
10636 int
10637 main ()
10638 {
10639 opendir ();
10640   ;
10641   return 0;
10642 }
10643 _ACEOF
10644 rm -f conftest.$ac_objext conftest$ac_exeext
10645 if { (eval echo "$as_me:10645: \"$ac_link\"") >&5
10646   (eval $ac_link) 2>&5
10647   ac_status=$?
10648   echo "$as_me:10648: \$? = $ac_status" >&5
10649   (exit $ac_status); } &&
10650          { ac_try='test -s conftest$ac_exeext'
10651   { (eval echo "$as_me:10651: \"$ac_try\"") >&5
10652   (eval $ac_try) 2>&5
10653   ac_status=$?
10654   echo "$as_me:10654: \$? = $ac_status" >&5
10655   (exit $ac_status); }; }; then
10656   ac_cv_lib_x_opendir=yes
10657 else
10658   echo "$as_me: failed program was:" >&5
10659 cat conftest.$ac_ext >&5
10660 ac_cv_lib_x_opendir=no
10661 fi
10662 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10663 LIBS=$ac_check_lib_save_LIBS
10664 fi
10665 echo "$as_me:10665: result: $ac_cv_lib_x_opendir" >&5
10666 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10667 if test $ac_cv_lib_x_opendir = yes; then
10668   LIBS="$LIBS -lx"
10669 fi
10670
10671 fi
10672
10673 echo "$as_me:10673: checking whether time.h and sys/time.h may both be included" >&5
10674 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10675 if test "${ac_cv_header_time+set}" = set; then
10676   echo $ECHO_N "(cached) $ECHO_C" >&6
10677 else
10678   cat >conftest.$ac_ext <<_ACEOF
10679 #line 10679 "configure"
10680 #include "confdefs.h"
10681 #include <sys/types.h>
10682 #include <sys/time.h>
10683 #include <time.h>
10684
10685 int
10686 main ()
10687 {
10688 if ((struct tm *) 0)
10689 return 0;
10690   ;
10691   return 0;
10692 }
10693 _ACEOF
10694 rm -f conftest.$ac_objext
10695 if { (eval echo "$as_me:10695: \"$ac_compile\"") >&5
10696   (eval $ac_compile) 2>&5
10697   ac_status=$?
10698   echo "$as_me:10698: \$? = $ac_status" >&5
10699   (exit $ac_status); } &&
10700          { ac_try='test -s conftest.$ac_objext'
10701   { (eval echo "$as_me:10701: \"$ac_try\"") >&5
10702   (eval $ac_try) 2>&5
10703   ac_status=$?
10704   echo "$as_me:10704: \$? = $ac_status" >&5
10705   (exit $ac_status); }; }; then
10706   ac_cv_header_time=yes
10707 else
10708   echo "$as_me: failed program was:" >&5
10709 cat conftest.$ac_ext >&5
10710 ac_cv_header_time=no
10711 fi
10712 rm -f conftest.$ac_objext conftest.$ac_ext
10713 fi
10714 echo "$as_me:10714: result: $ac_cv_header_time" >&5
10715 echo "${ECHO_T}$ac_cv_header_time" >&6
10716 if test $ac_cv_header_time = yes; then
10717
10718 cat >>confdefs.h <<\EOF
10719 #define TIME_WITH_SYS_TIME 1
10720 EOF
10721
10722 fi
10723
10724 echo "$as_me:10724: checking for regular-expression headers" >&5
10725 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
10726 if test "${cf_cv_regex+set}" = set; then
10727   echo $ECHO_N "(cached) $ECHO_C" >&6
10728 else
10729
10730 cat >conftest.$ac_ext <<_ACEOF
10731 #line 10731 "configure"
10732 #include "confdefs.h"
10733 #include <sys/types.h>
10734 #include <regex.h>
10735 int
10736 main ()
10737 {
10738
10739         regex_t *p;
10740         int x = regcomp(p, "", 0);
10741         int y = regexec(p, "", 0, 0, 0);
10742         regfree(p);
10743
10744   ;
10745   return 0;
10746 }
10747 _ACEOF
10748 rm -f conftest.$ac_objext conftest$ac_exeext
10749 if { (eval echo "$as_me:10749: \"$ac_link\"") >&5
10750   (eval $ac_link) 2>&5
10751   ac_status=$?
10752   echo "$as_me:10752: \$? = $ac_status" >&5
10753   (exit $ac_status); } &&
10754          { ac_try='test -s conftest$ac_exeext'
10755   { (eval echo "$as_me:10755: \"$ac_try\"") >&5
10756   (eval $ac_try) 2>&5
10757   ac_status=$?
10758   echo "$as_me:10758: \$? = $ac_status" >&5
10759   (exit $ac_status); }; }; then
10760   cf_cv_regex="regex.h"
10761 else
10762   echo "$as_me: failed program was:" >&5
10763 cat conftest.$ac_ext >&5
10764
10765         cat >conftest.$ac_ext <<_ACEOF
10766 #line 10766 "configure"
10767 #include "confdefs.h"
10768 #include <regexp.h>
10769 int
10770 main ()
10771 {
10772
10773                 char *p = compile("", "", "", 0);
10774                 int x = step("", "");
10775
10776   ;
10777   return 0;
10778 }
10779 _ACEOF
10780 rm -f conftest.$ac_objext conftest$ac_exeext
10781 if { (eval echo "$as_me:10781: \"$ac_link\"") >&5
10782   (eval $ac_link) 2>&5
10783   ac_status=$?
10784   echo "$as_me:10784: \$? = $ac_status" >&5
10785   (exit $ac_status); } &&
10786          { ac_try='test -s conftest$ac_exeext'
10787   { (eval echo "$as_me:10787: \"$ac_try\"") >&5
10788   (eval $ac_try) 2>&5
10789   ac_status=$?
10790   echo "$as_me:10790: \$? = $ac_status" >&5
10791   (exit $ac_status); }; }; then
10792   cf_cv_regex="regexp.h"
10793 else
10794   echo "$as_me: failed program was:" >&5
10795 cat conftest.$ac_ext >&5
10796
10797                 cf_save_LIBS="$LIBS"
10798                 LIBS="-lgen $LIBS"
10799                 cat >conftest.$ac_ext <<_ACEOF
10800 #line 10800 "configure"
10801 #include "confdefs.h"
10802 #include <regexpr.h>
10803 int
10804 main ()
10805 {
10806
10807                         char *p = compile("", "", "");
10808                         int x = step("", "");
10809
10810   ;
10811   return 0;
10812 }
10813 _ACEOF
10814 rm -f conftest.$ac_objext conftest$ac_exeext
10815 if { (eval echo "$as_me:10815: \"$ac_link\"") >&5
10816   (eval $ac_link) 2>&5
10817   ac_status=$?
10818   echo "$as_me:10818: \$? = $ac_status" >&5
10819   (exit $ac_status); } &&
10820          { ac_try='test -s conftest$ac_exeext'
10821   { (eval echo "$as_me:10821: \"$ac_try\"") >&5
10822   (eval $ac_try) 2>&5
10823   ac_status=$?
10824   echo "$as_me:10824: \$? = $ac_status" >&5
10825   (exit $ac_status); }; }; then
10826   cf_cv_regex="regexpr.h"
10827 else
10828   echo "$as_me: failed program was:" >&5
10829 cat conftest.$ac_ext >&5
10830 LIBS="$cf_save_LIBS"
10831 fi
10832 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10833 fi
10834 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10835 fi
10836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10837
10838 fi
10839
10840 echo "$as_me:10840: result: $cf_cv_regex" >&5
10841 echo "${ECHO_T}$cf_cv_regex" >&6
10842 case $cf_cv_regex in
10843         regex.h)   cat >>confdefs.h <<\EOF
10844 #define HAVE_REGEX_H_FUNCS 1
10845 EOF
10846  ;;
10847         regexp.h)  cat >>confdefs.h <<\EOF
10848 #define HAVE_REGEXP_H_FUNCS 1
10849 EOF
10850  ;;
10851         regexpr.h) cat >>confdefs.h <<\EOF
10852 #define HAVE_REGEXPR_H_FUNCS 1
10853 EOF
10854  ;;
10855 esac
10856
10857 for ac_header in \
10858 fcntl.h \
10859 getopt.h \
10860 limits.h \
10861 locale.h \
10862 poll.h \
10863 sys/bsdtypes.h \
10864 sys/ioctl.h \
10865 sys/param.h \
10866 sys/poll.h \
10867 sys/select.h \
10868 sys/time.h \
10869 sys/times.h \
10870 ttyent.h \
10871 unistd.h \
10872 wctype.h \
10873
10874 do
10875 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10876 echo "$as_me:10876: checking for $ac_header" >&5
10877 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10878 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10879   echo $ECHO_N "(cached) $ECHO_C" >&6
10880 else
10881   cat >conftest.$ac_ext <<_ACEOF
10882 #line 10882 "configure"
10883 #include "confdefs.h"
10884 #include <$ac_header>
10885 _ACEOF
10886 if { (eval echo "$as_me:10886: \"$ac_cpp conftest.$ac_ext\"") >&5
10887   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10888   ac_status=$?
10889   egrep -v '^ *\+' conftest.er1 >conftest.err
10890   rm -f conftest.er1
10891   cat conftest.err >&5
10892   echo "$as_me:10892: \$? = $ac_status" >&5
10893   (exit $ac_status); } >/dev/null; then
10894   if test -s conftest.err; then
10895     ac_cpp_err=$ac_c_preproc_warn_flag
10896   else
10897     ac_cpp_err=
10898   fi
10899 else
10900   ac_cpp_err=yes
10901 fi
10902 if test -z "$ac_cpp_err"; then
10903   eval "$as_ac_Header=yes"
10904 else
10905   echo "$as_me: failed program was:" >&5
10906   cat conftest.$ac_ext >&5
10907   eval "$as_ac_Header=no"
10908 fi
10909 rm -f conftest.err conftest.$ac_ext
10910 fi
10911 echo "$as_me:10911: result: `eval echo '${'$as_ac_Header'}'`" >&5
10912 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10913 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10914   cat >>confdefs.h <<EOF
10915 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10916 EOF
10917
10918 fi
10919 done
10920
10921 # check for ISC (this may also define _POSIX_SOURCE)
10922 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
10923 if test "$ISC" = yes ; then
10924
10925 echo "$as_me:10925: checking for main in -lcposix" >&5
10926 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
10927 if test "${ac_cv_lib_cposix_main+set}" = set; then
10928   echo $ECHO_N "(cached) $ECHO_C" >&6
10929 else
10930   ac_check_lib_save_LIBS=$LIBS
10931 LIBS="-lcposix  $LIBS"
10932 cat >conftest.$ac_ext <<_ACEOF
10933 #line 10933 "configure"
10934 #include "confdefs.h"
10935
10936 int
10937 main ()
10938 {
10939 main ();
10940   ;
10941   return 0;
10942 }
10943 _ACEOF
10944 rm -f conftest.$ac_objext conftest$ac_exeext
10945 if { (eval echo "$as_me:10945: \"$ac_link\"") >&5
10946   (eval $ac_link) 2>&5
10947   ac_status=$?
10948   echo "$as_me:10948: \$? = $ac_status" >&5
10949   (exit $ac_status); } &&
10950          { ac_try='test -s conftest$ac_exeext'
10951   { (eval echo "$as_me:10951: \"$ac_try\"") >&5
10952   (eval $ac_try) 2>&5
10953   ac_status=$?
10954   echo "$as_me:10954: \$? = $ac_status" >&5
10955   (exit $ac_status); }; }; then
10956   ac_cv_lib_cposix_main=yes
10957 else
10958   echo "$as_me: failed program was:" >&5
10959 cat conftest.$ac_ext >&5
10960 ac_cv_lib_cposix_main=no
10961 fi
10962 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10963 LIBS=$ac_check_lib_save_LIBS
10964 fi
10965 echo "$as_me:10965: result: $ac_cv_lib_cposix_main" >&5
10966 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
10967 if test $ac_cv_lib_cposix_main = yes; then
10968   cat >>confdefs.h <<EOF
10969 #define HAVE_LIBCPOSIX 1
10970 EOF
10971
10972   LIBS="-lcposix $LIBS"
10973
10974 fi
10975
10976         echo "$as_me:10976: checking for bzero in -linet" >&5
10977 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
10978 if test "${ac_cv_lib_inet_bzero+set}" = set; then
10979   echo $ECHO_N "(cached) $ECHO_C" >&6
10980 else
10981   ac_check_lib_save_LIBS=$LIBS
10982 LIBS="-linet  $LIBS"
10983 cat >conftest.$ac_ext <<_ACEOF
10984 #line 10984 "configure"
10985 #include "confdefs.h"
10986
10987 /* Override any gcc2 internal prototype to avoid an error.  */
10988 #ifdef __cplusplus
10989 extern "C"
10990 #endif
10991 /* We use char because int might match the return type of a gcc2
10992    builtin and then its argument prototype would still apply.  */
10993 char bzero ();
10994 int
10995 main ()
10996 {
10997 bzero ();
10998   ;
10999   return 0;
11000 }
11001 _ACEOF
11002 rm -f conftest.$ac_objext conftest$ac_exeext
11003 if { (eval echo "$as_me:11003: \"$ac_link\"") >&5
11004   (eval $ac_link) 2>&5
11005   ac_status=$?
11006   echo "$as_me:11006: \$? = $ac_status" >&5
11007   (exit $ac_status); } &&
11008          { ac_try='test -s conftest$ac_exeext'
11009   { (eval echo "$as_me:11009: \"$ac_try\"") >&5
11010   (eval $ac_try) 2>&5
11011   ac_status=$?
11012   echo "$as_me:11012: \$? = $ac_status" >&5
11013   (exit $ac_status); }; }; then
11014   ac_cv_lib_inet_bzero=yes
11015 else
11016   echo "$as_me: failed program was:" >&5
11017 cat conftest.$ac_ext >&5
11018 ac_cv_lib_inet_bzero=no
11019 fi
11020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11021 LIBS=$ac_check_lib_save_LIBS
11022 fi
11023 echo "$as_me:11023: result: $ac_cv_lib_inet_bzero" >&5
11024 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11025 if test $ac_cv_lib_inet_bzero = yes; then
11026   LIBS="$LIBS -linet"
11027 fi
11028 fi
11029
11030 echo "$as_me:11030: checking if sys/time.h works with sys/select.h" >&5
11031 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11032 if test "${cf_cv_sys_time_select+set}" = set; then
11033   echo $ECHO_N "(cached) $ECHO_C" >&6
11034 else
11035
11036 cat >conftest.$ac_ext <<_ACEOF
11037 #line 11037 "configure"
11038 #include "confdefs.h"
11039
11040 #include <sys/types.h>
11041 #ifdef HAVE_SYS_TIME_H
11042 #include <sys/time.h>
11043 #endif
11044 #ifdef HAVE_SYS_SELECT_H
11045 #include <sys/select.h>
11046 #endif
11047
11048 int
11049 main ()
11050 {
11051
11052   ;
11053   return 0;
11054 }
11055 _ACEOF
11056 rm -f conftest.$ac_objext
11057 if { (eval echo "$as_me:11057: \"$ac_compile\"") >&5
11058   (eval $ac_compile) 2>&5
11059   ac_status=$?
11060   echo "$as_me:11060: \$? = $ac_status" >&5
11061   (exit $ac_status); } &&
11062          { ac_try='test -s conftest.$ac_objext'
11063   { (eval echo "$as_me:11063: \"$ac_try\"") >&5
11064   (eval $ac_try) 2>&5
11065   ac_status=$?
11066   echo "$as_me:11066: \$? = $ac_status" >&5
11067   (exit $ac_status); }; }; then
11068   cf_cv_sys_time_select=yes
11069 else
11070   echo "$as_me: failed program was:" >&5
11071 cat conftest.$ac_ext >&5
11072 cf_cv_sys_time_select=no
11073 fi
11074 rm -f conftest.$ac_objext conftest.$ac_ext
11075
11076 fi
11077
11078 echo "$as_me:11078: result: $cf_cv_sys_time_select" >&5
11079 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11080 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11081 #define HAVE_SYS_TIME_SELECT 1
11082 EOF
11083
11084 ###     checks for compiler characteristics
11085 ac_ext=c
11086 ac_cpp='$CPP $CPPFLAGS'
11087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11090 ac_main_return=return
11091
11092 echo "$as_me:11092: checking for $CC option to accept ANSI C" >&5
11093 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11094 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11095   echo $ECHO_N "(cached) $ECHO_C" >&6
11096 else
11097   ac_cv_prog_cc_stdc=no
11098 ac_save_CC=$CC
11099 cat >conftest.$ac_ext <<_ACEOF
11100 #line 11100 "configure"
11101 #include "confdefs.h"
11102 #include <stdarg.h>
11103 #include <stdio.h>
11104 #include <sys/types.h>
11105 #include <sys/stat.h>
11106 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11107 struct buf { int x; };
11108 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11109 static char *e (p, i)
11110      char **p;
11111      int i;
11112 {
11113   return p[i];
11114 }
11115 static char *f (char * (*g) (char **, int), char **p, ...)
11116 {
11117   char *s;
11118   va_list v;
11119   va_start (v,p);
11120   s = g (p, va_arg (v,int));
11121   va_end (v);
11122   return s;
11123 }
11124 int test (int i, double x);
11125 struct s1 {int (*f) (int a);};
11126 struct s2 {int (*f) (double a);};
11127 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11128 int argc;
11129 char **argv;
11130 int
11131 main ()
11132 {
11133 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11134   ;
11135   return 0;
11136 }
11137 _ACEOF
11138 # Don't try gcc -ansi; that turns off useful extensions and
11139 # breaks some systems' header files.
11140 # AIX                   -qlanglvl=ansi
11141 # Ultrix and OSF/1      -std1
11142 # HP-UX 10.20 and later -Ae
11143 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11144 # SVR4                  -Xc -D__EXTENSIONS__
11145 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11146 do
11147   CC="$ac_save_CC $ac_arg"
11148   rm -f conftest.$ac_objext
11149 if { (eval echo "$as_me:11149: \"$ac_compile\"") >&5
11150   (eval $ac_compile) 2>&5
11151   ac_status=$?
11152   echo "$as_me:11152: \$? = $ac_status" >&5
11153   (exit $ac_status); } &&
11154          { ac_try='test -s conftest.$ac_objext'
11155   { (eval echo "$as_me:11155: \"$ac_try\"") >&5
11156   (eval $ac_try) 2>&5
11157   ac_status=$?
11158   echo "$as_me:11158: \$? = $ac_status" >&5
11159   (exit $ac_status); }; }; then
11160   ac_cv_prog_cc_stdc=$ac_arg
11161 break
11162 else
11163   echo "$as_me: failed program was:" >&5
11164 cat conftest.$ac_ext >&5
11165 fi
11166 rm -f conftest.$ac_objext
11167 done
11168 rm -f conftest.$ac_ext conftest.$ac_objext
11169 CC=$ac_save_CC
11170
11171 fi
11172
11173 case "x$ac_cv_prog_cc_stdc" in
11174   x|xno)
11175     echo "$as_me:11175: result: none needed" >&5
11176 echo "${ECHO_T}none needed" >&6 ;;
11177   *)
11178     echo "$as_me:11178: result: $ac_cv_prog_cc_stdc" >&5
11179 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11180     CC="$CC $ac_cv_prog_cc_stdc" ;;
11181 esac
11182
11183 echo "$as_me:11183: checking for an ANSI C-conforming const" >&5
11184 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11185 if test "${ac_cv_c_const+set}" = set; then
11186   echo $ECHO_N "(cached) $ECHO_C" >&6
11187 else
11188   cat >conftest.$ac_ext <<_ACEOF
11189 #line 11189 "configure"
11190 #include "confdefs.h"
11191
11192 int
11193 main ()
11194 {
11195 /* FIXME: Include the comments suggested by Paul. */
11196 #ifndef __cplusplus
11197   /* Ultrix mips cc rejects this.  */
11198   typedef int charset[2];
11199   const charset x;
11200   /* SunOS 4.1.1 cc rejects this.  */
11201   char const *const *ccp;
11202   char **p;
11203   /* NEC SVR4.0.2 mips cc rejects this.  */
11204   struct point {int x, y;};
11205   static struct point const zero = {0,0};
11206   /* AIX XL C 1.02.0.0 rejects this.
11207      It does not let you subtract one const X* pointer from another in
11208      an arm of an if-expression whose if-part is not a constant
11209      expression */
11210   const char *g = "string";
11211   ccp = &g + (g ? g-g : 0);
11212   /* HPUX 7.0 cc rejects these. */
11213   ++ccp;
11214   p = (char**) ccp;
11215   ccp = (char const *const *) p;
11216   { /* SCO 3.2v4 cc rejects this.  */
11217     char *t;
11218     char const *s = 0 ? (char *) 0 : (char const *) 0;
11219
11220     *t++ = 0;
11221   }
11222   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11223     int x[] = {25, 17};
11224     const int *foo = &x[0];
11225     ++foo;
11226   }
11227   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11228     typedef const int *iptr;
11229     iptr p = 0;
11230     ++p;
11231   }
11232   { /* AIX XL C 1.02.0.0 rejects this saying
11233        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11234     struct s { int j; const int *ap[3]; };
11235     struct s *b; b->j = 5;
11236   }
11237   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11238     const int foo = 10;
11239   }
11240 #endif
11241
11242   ;
11243   return 0;
11244 }
11245 _ACEOF
11246 rm -f conftest.$ac_objext
11247 if { (eval echo "$as_me:11247: \"$ac_compile\"") >&5
11248   (eval $ac_compile) 2>&5
11249   ac_status=$?
11250   echo "$as_me:11250: \$? = $ac_status" >&5
11251   (exit $ac_status); } &&
11252          { ac_try='test -s conftest.$ac_objext'
11253   { (eval echo "$as_me:11253: \"$ac_try\"") >&5
11254   (eval $ac_try) 2>&5
11255   ac_status=$?
11256   echo "$as_me:11256: \$? = $ac_status" >&5
11257   (exit $ac_status); }; }; then
11258   ac_cv_c_const=yes
11259 else
11260   echo "$as_me: failed program was:" >&5
11261 cat conftest.$ac_ext >&5
11262 ac_cv_c_const=no
11263 fi
11264 rm -f conftest.$ac_objext conftest.$ac_ext
11265 fi
11266 echo "$as_me:11266: result: $ac_cv_c_const" >&5
11267 echo "${ECHO_T}$ac_cv_c_const" >&6
11268 if test $ac_cv_c_const = no; then
11269
11270 cat >>confdefs.h <<\EOF
11271 #define const
11272 EOF
11273
11274 fi
11275
11276 echo "$as_me:11276: checking for inline" >&5
11277 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11278 if test "${ac_cv_c_inline+set}" = set; then
11279   echo $ECHO_N "(cached) $ECHO_C" >&6
11280 else
11281   ac_cv_c_inline=no
11282 for ac_kw in inline __inline__ __inline; do
11283   cat >conftest.$ac_ext <<_ACEOF
11284 #line 11284 "configure"
11285 #include "confdefs.h"
11286 #ifndef __cplusplus
11287 static $ac_kw int static_foo () {return 0; }
11288 $ac_kw int foo () {return 0; }
11289 #endif
11290
11291 _ACEOF
11292 rm -f conftest.$ac_objext
11293 if { (eval echo "$as_me:11293: \"$ac_compile\"") >&5
11294   (eval $ac_compile) 2>&5
11295   ac_status=$?
11296   echo "$as_me:11296: \$? = $ac_status" >&5
11297   (exit $ac_status); } &&
11298          { ac_try='test -s conftest.$ac_objext'
11299   { (eval echo "$as_me:11299: \"$ac_try\"") >&5
11300   (eval $ac_try) 2>&5
11301   ac_status=$?
11302   echo "$as_me:11302: \$? = $ac_status" >&5
11303   (exit $ac_status); }; }; then
11304   ac_cv_c_inline=$ac_kw; break
11305 else
11306   echo "$as_me: failed program was:" >&5
11307 cat conftest.$ac_ext >&5
11308 fi
11309 rm -f conftest.$ac_objext conftest.$ac_ext
11310 done
11311
11312 fi
11313 echo "$as_me:11313: result: $ac_cv_c_inline" >&5
11314 echo "${ECHO_T}$ac_cv_c_inline" >&6
11315 case $ac_cv_c_inline in
11316   inline | yes) ;;
11317   no)
11318 cat >>confdefs.h <<\EOF
11319 #define inline
11320 EOF
11321  ;;
11322   *)  cat >>confdefs.h <<EOF
11323 #define inline $ac_cv_c_inline
11324 EOF
11325  ;;
11326 esac
11327
11328 NCURSES_INLINE=
11329 if test "$ac_cv_c_inline" != no ; then
11330         cat >>confdefs.h <<\EOF
11331 #define CC_HAS_INLINE_FUNCS 1
11332 EOF
11333
11334         NCURSES_INLINE=inline
11335 fi
11336
11337 if test $NCURSES_CHTYPE = auto ; then
11338
11339 echo "$as_me:11339: checking for type of chtype" >&5
11340 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11341 if test "${cf_cv_typeof_chtype+set}" = set; then
11342   echo $ECHO_N "(cached) $ECHO_C" >&6
11343 else
11344
11345                 if test "$cross_compiling" = yes; then
11346   cf_cv_typeof_chtype=long
11347 else
11348   cat >conftest.$ac_ext <<_ACEOF
11349 #line 11349 "configure"
11350 #include "confdefs.h"
11351
11352 #define WANT_BITS 31
11353 #include <stdio.h>
11354 int main()
11355 {
11356         FILE *fp = fopen("cf_test.out", "w");
11357         if (fp != 0) {
11358                 char *result = "long";
11359                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11360                         int n;
11361                         unsigned int x, y;
11362                         for (n = 0; n < WANT_BITS; n++) {
11363                                 x = (1 << n);
11364                                 y = (x >> n);
11365                                 if (y != 1 || x == 0) {
11366                                         x = 0;
11367                                         break;
11368                                 }
11369                         }
11370                         /*
11371                          * If x is nonzero, an int is big enough for the bits
11372                          * that we want.
11373                          */
11374                         result = (x != 0) ? "int" : "long";
11375                 }
11376                 fputs(result, fp);
11377                 fclose(fp);
11378         }
11379         ${cf_cv_main_return:-return}(0);
11380 }
11381
11382 _ACEOF
11383 rm -f conftest$ac_exeext
11384 if { (eval echo "$as_me:11384: \"$ac_link\"") >&5
11385   (eval $ac_link) 2>&5
11386   ac_status=$?
11387   echo "$as_me:11387: \$? = $ac_status" >&5
11388   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11389   { (eval echo "$as_me:11389: \"$ac_try\"") >&5
11390   (eval $ac_try) 2>&5
11391   ac_status=$?
11392   echo "$as_me:11392: \$? = $ac_status" >&5
11393   (exit $ac_status); }; }; then
11394   cf_cv_typeof_chtype=`cat cf_test.out`
11395 else
11396   echo "$as_me: program exited with status $ac_status" >&5
11397 echo "$as_me: failed program was:" >&5
11398 cat conftest.$ac_ext >&5
11399 cf_cv_typeof_chtype=long
11400 fi
11401 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11402 fi
11403                 rm -f cf_test.out
11404
11405 fi
11406
11407 echo "$as_me:11407: result: $cf_cv_typeof_chtype" >&5
11408 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
11409
11410 cat >>confdefs.h <<EOF
11411 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
11412 EOF
11413
11414 else
11415         cf_cv_typeof_chtype=$NCURSES_CHTYPE
11416 fi
11417
11418 echo "$as_me:11418: checking if unsigned literals are legal" >&5
11419 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
11420 if test "${cf_cv_unsigned_literals+set}" = set; then
11421   echo $ECHO_N "(cached) $ECHO_C" >&6
11422 else
11423
11424         cat >conftest.$ac_ext <<_ACEOF
11425 #line 11425 "configure"
11426 #include "confdefs.h"
11427
11428 int
11429 main ()
11430 {
11431 long x = 1L + 1UL + 1U + 1
11432   ;
11433   return 0;
11434 }
11435 _ACEOF
11436 rm -f conftest.$ac_objext
11437 if { (eval echo "$as_me:11437: \"$ac_compile\"") >&5
11438   (eval $ac_compile) 2>&5
11439   ac_status=$?
11440   echo "$as_me:11440: \$? = $ac_status" >&5
11441   (exit $ac_status); } &&
11442          { ac_try='test -s conftest.$ac_objext'
11443   { (eval echo "$as_me:11443: \"$ac_try\"") >&5
11444   (eval $ac_try) 2>&5
11445   ac_status=$?
11446   echo "$as_me:11446: \$? = $ac_status" >&5
11447   (exit $ac_status); }; }; then
11448   cf_cv_unsigned_literals=yes
11449 else
11450   echo "$as_me: failed program was:" >&5
11451 cat conftest.$ac_ext >&5
11452 cf_cv_unsigned_literals=no
11453 fi
11454 rm -f conftest.$ac_objext conftest.$ac_ext
11455
11456 fi
11457
11458 echo "$as_me:11458: result: $cf_cv_unsigned_literals" >&5
11459 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
11460
11461 cf_cv_1UL="1"
11462 test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
11463 test "$cf_cv_typeof_chtype"    = long && cf_cv_1UL="${cf_cv_1UL}L"
11464
11465 if test $NCURSES_MMASK_T = auto ; then
11466         cf_cv_typeof_mmask_t=long
11467 else
11468         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
11469 fi
11470
11471 ###     Checks for external-data
11472
11473 echo "$as_me:11473: checking if external errno is declared" >&5
11474 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
11475 if test "${cf_cv_dcl_errno+set}" = set; then
11476   echo $ECHO_N "(cached) $ECHO_C" >&6
11477 else
11478
11479     cat >conftest.$ac_ext <<_ACEOF
11480 #line 11480 "configure"
11481 #include "confdefs.h"
11482
11483 #ifdef HAVE_STDLIB_H
11484 #include <stdlib.h>
11485 #endif
11486 #include <stdio.h>
11487 #include <sys/types.h>
11488 #include <errno.h>
11489 int
11490 main ()
11491 {
11492 long x = (long) errno
11493   ;
11494   return 0;
11495 }
11496 _ACEOF
11497 rm -f conftest.$ac_objext
11498 if { (eval echo "$as_me:11498: \"$ac_compile\"") >&5
11499   (eval $ac_compile) 2>&5
11500   ac_status=$?
11501   echo "$as_me:11501: \$? = $ac_status" >&5
11502   (exit $ac_status); } &&
11503          { ac_try='test -s conftest.$ac_objext'
11504   { (eval echo "$as_me:11504: \"$ac_try\"") >&5
11505   (eval $ac_try) 2>&5
11506   ac_status=$?
11507   echo "$as_me:11507: \$? = $ac_status" >&5
11508   (exit $ac_status); }; }; then
11509   cf_cv_dcl_errno=yes
11510 else
11511   echo "$as_me: failed program was:" >&5
11512 cat conftest.$ac_ext >&5
11513 cf_cv_dcl_errno=no
11514 fi
11515 rm -f conftest.$ac_objext conftest.$ac_ext
11516
11517 fi
11518 echo "$as_me:11518: result: $cf_cv_dcl_errno" >&5
11519 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
11520
11521 if test "$cf_cv_dcl_errno" = no ; then
11522
11523 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11524
11525     cat >>confdefs.h <<EOF
11526 #define $cf_result 1
11527 EOF
11528
11529 fi
11530
11531 # It's possible (for near-UNIX clones) that the data doesn't exist
11532
11533 echo "$as_me:11533: checking if external errno exists" >&5
11534 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
11535 if test "${cf_cv_have_errno+set}" = set; then
11536   echo $ECHO_N "(cached) $ECHO_C" >&6
11537 else
11538
11539     cat >conftest.$ac_ext <<_ACEOF
11540 #line 11540 "configure"
11541 #include "confdefs.h"
11542
11543 #undef errno
11544 extern int errno;
11545
11546 int
11547 main ()
11548 {
11549 errno = 2
11550   ;
11551   return 0;
11552 }
11553 _ACEOF
11554 rm -f conftest.$ac_objext conftest$ac_exeext
11555 if { (eval echo "$as_me:11555: \"$ac_link\"") >&5
11556   (eval $ac_link) 2>&5
11557   ac_status=$?
11558   echo "$as_me:11558: \$? = $ac_status" >&5
11559   (exit $ac_status); } &&
11560          { ac_try='test -s conftest$ac_exeext'
11561   { (eval echo "$as_me:11561: \"$ac_try\"") >&5
11562   (eval $ac_try) 2>&5
11563   ac_status=$?
11564   echo "$as_me:11564: \$? = $ac_status" >&5
11565   (exit $ac_status); }; }; then
11566   cf_cv_have_errno=yes
11567 else
11568   echo "$as_me: failed program was:" >&5
11569 cat conftest.$ac_ext >&5
11570 cf_cv_have_errno=no
11571 fi
11572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11573
11574 fi
11575 echo "$as_me:11575: result: $cf_cv_have_errno" >&5
11576 echo "${ECHO_T}$cf_cv_have_errno" >&6
11577
11578 if test "$cf_cv_have_errno" = yes ; then
11579
11580 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11581
11582     cat >>confdefs.h <<EOF
11583 #define $cf_result 1
11584 EOF
11585
11586 fi
11587
11588 echo "$as_me:11588: checking if data-only library module links" >&5
11589 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11590 if test "${cf_cv_link_dataonly+set}" = set; then
11591   echo $ECHO_N "(cached) $ECHO_C" >&6
11592 else
11593
11594         rm -f conftest.a
11595         cat >conftest.$ac_ext <<EOF
11596 #line 11596 "configure"
11597 int     testdata[3] = { 123, 456, 789 };
11598 EOF
11599         if { (eval echo "$as_me:11599: \"$ac_compile\"") >&5
11600   (eval $ac_compile) 2>&5
11601   ac_status=$?
11602   echo "$as_me:11602: \$? = $ac_status" >&5
11603   (exit $ac_status); } ; then
11604                 mv conftest.o data.o && \
11605                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
11606         fi
11607         rm -f conftest.$ac_ext data.o
11608         cat >conftest.$ac_ext <<EOF
11609 #line 11609 "configure"
11610 int     testfunc()
11611 {
11612 #if defined(NeXT)
11613         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11614 #else
11615         extern int testdata[3];
11616         return testdata[0] == 123
11617            &&  testdata[1] == 456
11618            &&  testdata[2] == 789;
11619 #endif
11620 }
11621 EOF
11622         if { (eval echo "$as_me:11622: \"$ac_compile\"") >&5
11623   (eval $ac_compile) 2>&5
11624   ac_status=$?
11625   echo "$as_me:11625: \$? = $ac_status" >&5
11626   (exit $ac_status); }; then
11627                 mv conftest.o func.o && \
11628                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
11629         fi
11630         rm -f conftest.$ac_ext func.o
11631         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11632         cf_saveLIBS="$LIBS"
11633         LIBS="conftest.a $LIBS"
11634         if test "$cross_compiling" = yes; then
11635   cf_cv_link_dataonly=unknown
11636 else
11637   cat >conftest.$ac_ext <<_ACEOF
11638 #line 11638 "configure"
11639 #include "confdefs.h"
11640
11641         int main()
11642         {
11643                 extern int testfunc();
11644                 ${cf_cv_main_return:-return} (!testfunc());
11645         }
11646
11647 _ACEOF
11648 rm -f conftest$ac_exeext
11649 if { (eval echo "$as_me:11649: \"$ac_link\"") >&5
11650   (eval $ac_link) 2>&5
11651   ac_status=$?
11652   echo "$as_me:11652: \$? = $ac_status" >&5
11653   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11654   { (eval echo "$as_me:11654: \"$ac_try\"") >&5
11655   (eval $ac_try) 2>&5
11656   ac_status=$?
11657   echo "$as_me:11657: \$? = $ac_status" >&5
11658   (exit $ac_status); }; }; then
11659   cf_cv_link_dataonly=yes
11660 else
11661   echo "$as_me: program exited with status $ac_status" >&5
11662 echo "$as_me: failed program was:" >&5
11663 cat conftest.$ac_ext >&5
11664 cf_cv_link_dataonly=no
11665 fi
11666 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11667 fi
11668         LIBS="$cf_saveLIBS"
11669
11670 fi
11671
11672 echo "$as_me:11672: result: $cf_cv_link_dataonly" >&5
11673 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
11674
11675 if test "$cf_cv_link_dataonly" = no ; then
11676         cat >>confdefs.h <<\EOF
11677 #define BROKEN_LINKER 1
11678 EOF
11679
11680         BROKEN_LINKER=1
11681 fi
11682
11683 ###     Checks for library functions.
11684
11685 for ac_func in \
11686 getcwd \
11687 getegid \
11688 geteuid \
11689 getttynam \
11690 issetugid \
11691 poll \
11692 remove \
11693 select \
11694 setbuf \
11695 setbuffer \
11696 setvbuf \
11697 sigaction \
11698 sigvec \
11699 strdup \
11700 strstr \
11701 tcgetpgrp \
11702 times \
11703 vsnprintf \
11704
11705 do
11706 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11707 echo "$as_me:11707: checking for $ac_func" >&5
11708 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11709 if eval "test \"\${$as_ac_var+set}\" = set"; then
11710   echo $ECHO_N "(cached) $ECHO_C" >&6
11711 else
11712   cat >conftest.$ac_ext <<_ACEOF
11713 #line 11713 "configure"
11714 #include "confdefs.h"
11715 /* System header to define __stub macros and hopefully few prototypes,
11716     which can conflict with char $ac_func (); below.  */
11717 #include <assert.h>
11718 /* Override any gcc2 internal prototype to avoid an error.  */
11719 #ifdef __cplusplus
11720 extern "C"
11721 #endif
11722 /* We use char because int might match the return type of a gcc2
11723    builtin and then its argument prototype would still apply.  */
11724 char $ac_func ();
11725 char (*f) ();
11726
11727 int
11728 main ()
11729 {
11730 /* The GNU C library defines this for functions which it implements
11731     to always fail with ENOSYS.  Some functions are actually named
11732     something starting with __ and the normal name is an alias.  */
11733 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11734 choke me
11735 #else
11736 f = $ac_func;
11737 #endif
11738
11739   ;
11740   return 0;
11741 }
11742 _ACEOF
11743 rm -f conftest.$ac_objext conftest$ac_exeext
11744 if { (eval echo "$as_me:11744: \"$ac_link\"") >&5
11745   (eval $ac_link) 2>&5
11746   ac_status=$?
11747   echo "$as_me:11747: \$? = $ac_status" >&5
11748   (exit $ac_status); } &&
11749          { ac_try='test -s conftest$ac_exeext'
11750   { (eval echo "$as_me:11750: \"$ac_try\"") >&5
11751   (eval $ac_try) 2>&5
11752   ac_status=$?
11753   echo "$as_me:11753: \$? = $ac_status" >&5
11754   (exit $ac_status); }; }; then
11755   eval "$as_ac_var=yes"
11756 else
11757   echo "$as_me: failed program was:" >&5
11758 cat conftest.$ac_ext >&5
11759 eval "$as_ac_var=no"
11760 fi
11761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11762 fi
11763 echo "$as_me:11763: result: `eval echo '${'$as_ac_var'}'`" >&5
11764 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11765 if test `eval echo '${'$as_ac_var'}'` = yes; then
11766   cat >>confdefs.h <<EOF
11767 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11768 EOF
11769
11770 fi
11771 done
11772
11773 if test "$with_getcap" = "yes" ; then
11774
11775 echo "$as_me:11775: checking for terminal-capability database functions" >&5
11776 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
11777 if test "${cf_cv_cgetent+set}" = set; then
11778   echo $ECHO_N "(cached) $ECHO_C" >&6
11779 else
11780
11781 cat >conftest.$ac_ext <<_ACEOF
11782 #line 11782 "configure"
11783 #include "confdefs.h"
11784
11785 #include <stdlib.h>
11786 int
11787 main ()
11788 {
11789
11790         char temp[128];
11791         char *buf = temp;
11792         char *db_array = temp;
11793         cgetent(&buf, /* int *, */ &db_array, "vt100");
11794         cgetcap(buf, "tc", '=');
11795         cgetmatch(buf, "tc");
11796
11797   ;
11798   return 0;
11799 }
11800 _ACEOF
11801 rm -f conftest.$ac_objext conftest$ac_exeext
11802 if { (eval echo "$as_me:11802: \"$ac_link\"") >&5
11803   (eval $ac_link) 2>&5
11804   ac_status=$?
11805   echo "$as_me:11805: \$? = $ac_status" >&5
11806   (exit $ac_status); } &&
11807          { ac_try='test -s conftest$ac_exeext'
11808   { (eval echo "$as_me:11808: \"$ac_try\"") >&5
11809   (eval $ac_try) 2>&5
11810   ac_status=$?
11811   echo "$as_me:11811: \$? = $ac_status" >&5
11812   (exit $ac_status); }; }; then
11813   cf_cv_cgetent=yes
11814 else
11815   echo "$as_me: failed program was:" >&5
11816 cat conftest.$ac_ext >&5
11817 cf_cv_cgetent=no
11818 fi
11819 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11820
11821 fi
11822
11823 echo "$as_me:11823: result: $cf_cv_cgetent" >&5
11824 echo "${ECHO_T}$cf_cv_cgetent" >&6
11825 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
11826 #define HAVE_BSD_CGETENT 1
11827 EOF
11828
11829 fi
11830
11831 echo "$as_me:11831: checking for isascii" >&5
11832 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
11833 if test "${cf_cv_have_isascii+set}" = set; then
11834   echo $ECHO_N "(cached) $ECHO_C" >&6
11835 else
11836
11837         cat >conftest.$ac_ext <<_ACEOF
11838 #line 11838 "configure"
11839 #include "confdefs.h"
11840 #include <ctype.h>
11841 int
11842 main ()
11843 {
11844 int x = isascii(' ')
11845   ;
11846   return 0;
11847 }
11848 _ACEOF
11849 rm -f conftest.$ac_objext conftest$ac_exeext
11850 if { (eval echo "$as_me:11850: \"$ac_link\"") >&5
11851   (eval $ac_link) 2>&5
11852   ac_status=$?
11853   echo "$as_me:11853: \$? = $ac_status" >&5
11854   (exit $ac_status); } &&
11855          { ac_try='test -s conftest$ac_exeext'
11856   { (eval echo "$as_me:11856: \"$ac_try\"") >&5
11857   (eval $ac_try) 2>&5
11858   ac_status=$?
11859   echo "$as_me:11859: \$? = $ac_status" >&5
11860   (exit $ac_status); }; }; then
11861   cf_cv_have_isascii=yes
11862 else
11863   echo "$as_me: failed program was:" >&5
11864 cat conftest.$ac_ext >&5
11865 cf_cv_have_isascii=no
11866 fi
11867 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11868
11869 fi
11870 echo "$as_me:11870: result: $cf_cv_have_isascii" >&5
11871 echo "${ECHO_T}$cf_cv_have_isascii" >&6
11872 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
11873 #define HAVE_ISASCII 1
11874 EOF
11875
11876 if test "$ac_cv_func_sigaction" = yes; then
11877 echo "$as_me:11877: checking whether sigaction needs _POSIX_SOURCE" >&5
11878 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
11879 cat >conftest.$ac_ext <<_ACEOF
11880 #line 11880 "configure"
11881 #include "confdefs.h"
11882
11883 #include <sys/types.h>
11884 #include <signal.h>
11885 int
11886 main ()
11887 {
11888 struct sigaction act
11889   ;
11890   return 0;
11891 }
11892 _ACEOF
11893 rm -f conftest.$ac_objext
11894 if { (eval echo "$as_me:11894: \"$ac_compile\"") >&5
11895   (eval $ac_compile) 2>&5
11896   ac_status=$?
11897   echo "$as_me:11897: \$? = $ac_status" >&5
11898   (exit $ac_status); } &&
11899          { ac_try='test -s conftest.$ac_objext'
11900   { (eval echo "$as_me:11900: \"$ac_try\"") >&5
11901   (eval $ac_try) 2>&5
11902   ac_status=$?
11903   echo "$as_me:11903: \$? = $ac_status" >&5
11904   (exit $ac_status); }; }; then
11905   sigact_bad=no
11906 else
11907   echo "$as_me: failed program was:" >&5
11908 cat conftest.$ac_ext >&5
11909
11910 cat >conftest.$ac_ext <<_ACEOF
11911 #line 11911 "configure"
11912 #include "confdefs.h"
11913
11914 #define _POSIX_SOURCE
11915 #include <sys/types.h>
11916 #include <signal.h>
11917 int
11918 main ()
11919 {
11920 struct sigaction act
11921   ;
11922   return 0;
11923 }
11924 _ACEOF
11925 rm -f conftest.$ac_objext
11926 if { (eval echo "$as_me:11926: \"$ac_compile\"") >&5
11927   (eval $ac_compile) 2>&5
11928   ac_status=$?
11929   echo "$as_me:11929: \$? = $ac_status" >&5
11930   (exit $ac_status); } &&
11931          { ac_try='test -s conftest.$ac_objext'
11932   { (eval echo "$as_me:11932: \"$ac_try\"") >&5
11933   (eval $ac_try) 2>&5
11934   ac_status=$?
11935   echo "$as_me:11935: \$? = $ac_status" >&5
11936   (exit $ac_status); }; }; then
11937   sigact_bad=yes
11938          cat >>confdefs.h <<\EOF
11939 #define SVR4_ACTION 1
11940 EOF
11941
11942 else
11943   echo "$as_me: failed program was:" >&5
11944 cat conftest.$ac_ext >&5
11945 sigact_bad=unknown
11946 fi
11947 rm -f conftest.$ac_objext conftest.$ac_ext
11948 fi
11949 rm -f conftest.$ac_objext conftest.$ac_ext
11950 echo "$as_me:11950: result: $sigact_bad" >&5
11951 echo "${ECHO_T}$sigact_bad" >&6
11952 fi
11953
11954 echo "$as_me:11954: checking if nanosleep really works" >&5
11955 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
11956 if test "${cf_cv_func_nanosleep+set}" = set; then
11957   echo $ECHO_N "(cached) $ECHO_C" >&6
11958 else
11959
11960 if test "$cross_compiling" = yes; then
11961   cf_cv_func_nanosleep=unknown
11962 else
11963   cat >conftest.$ac_ext <<_ACEOF
11964 #line 11964 "configure"
11965 #include "confdefs.h"
11966
11967 #include <stdio.h>
11968 #include <errno.h>
11969 #include <time.h>
11970
11971 #ifdef HAVE_SYS_TIME_H
11972 #include <sys/time.h>
11973 #endif
11974
11975 int main() {
11976         struct timespec ts1, ts2;
11977         int code;
11978         ts1.tv_sec  = 0;
11979         ts1.tv_nsec = 750000000;
11980         ts2.tv_sec  = 0;
11981         ts2.tv_nsec = 0;
11982         errno = 0;
11983         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
11984         ${cf_cv_main_return:-return}(code != 0);
11985 }
11986
11987 _ACEOF
11988 rm -f conftest$ac_exeext
11989 if { (eval echo "$as_me:11989: \"$ac_link\"") >&5
11990   (eval $ac_link) 2>&5
11991   ac_status=$?
11992   echo "$as_me:11992: \$? = $ac_status" >&5
11993   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11994   { (eval echo "$as_me:11994: \"$ac_try\"") >&5
11995   (eval $ac_try) 2>&5
11996   ac_status=$?
11997   echo "$as_me:11997: \$? = $ac_status" >&5
11998   (exit $ac_status); }; }; then
11999   cf_cv_func_nanosleep=yes
12000 else
12001   echo "$as_me: program exited with status $ac_status" >&5
12002 echo "$as_me: failed program was:" >&5
12003 cat conftest.$ac_ext >&5
12004 cf_cv_func_nanosleep=no
12005 fi
12006 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12007 fi
12008 fi
12009 echo "$as_me:12009: result: $cf_cv_func_nanosleep" >&5
12010 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12011
12012 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12013 #define HAVE_NANOSLEEP 1
12014 EOF
12015
12016 for ac_header in \
12017 termio.h \
12018 termios.h \
12019 unistd.h \
12020
12021 do
12022 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12023 echo "$as_me:12023: checking for $ac_header" >&5
12024 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12025 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12026   echo $ECHO_N "(cached) $ECHO_C" >&6
12027 else
12028   cat >conftest.$ac_ext <<_ACEOF
12029 #line 12029 "configure"
12030 #include "confdefs.h"
12031 #include <$ac_header>
12032 _ACEOF
12033 if { (eval echo "$as_me:12033: \"$ac_cpp conftest.$ac_ext\"") >&5
12034   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12035   ac_status=$?
12036   egrep -v '^ *\+' conftest.er1 >conftest.err
12037   rm -f conftest.er1
12038   cat conftest.err >&5
12039   echo "$as_me:12039: \$? = $ac_status" >&5
12040   (exit $ac_status); } >/dev/null; then
12041   if test -s conftest.err; then
12042     ac_cpp_err=$ac_c_preproc_warn_flag
12043   else
12044     ac_cpp_err=
12045   fi
12046 else
12047   ac_cpp_err=yes
12048 fi
12049 if test -z "$ac_cpp_err"; then
12050   eval "$as_ac_Header=yes"
12051 else
12052   echo "$as_me: failed program was:" >&5
12053   cat conftest.$ac_ext >&5
12054   eval "$as_ac_Header=no"
12055 fi
12056 rm -f conftest.err conftest.$ac_ext
12057 fi
12058 echo "$as_me:12058: result: `eval echo '${'$as_ac_Header'}'`" >&5
12059 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12060 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12061   cat >>confdefs.h <<EOF
12062 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12063 EOF
12064
12065 fi
12066 done
12067
12068 if test "$ISC" = yes ; then
12069
12070 for ac_header in sys/termio.h
12071 do
12072 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12073 echo "$as_me:12073: checking for $ac_header" >&5
12074 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12075 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12076   echo $ECHO_N "(cached) $ECHO_C" >&6
12077 else
12078   cat >conftest.$ac_ext <<_ACEOF
12079 #line 12079 "configure"
12080 #include "confdefs.h"
12081 #include <$ac_header>
12082 _ACEOF
12083 if { (eval echo "$as_me:12083: \"$ac_cpp conftest.$ac_ext\"") >&5
12084   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12085   ac_status=$?
12086   egrep -v '^ *\+' conftest.er1 >conftest.err
12087   rm -f conftest.er1
12088   cat conftest.err >&5
12089   echo "$as_me:12089: \$? = $ac_status" >&5
12090   (exit $ac_status); } >/dev/null; then
12091   if test -s conftest.err; then
12092     ac_cpp_err=$ac_c_preproc_warn_flag
12093   else
12094     ac_cpp_err=
12095   fi
12096 else
12097   ac_cpp_err=yes
12098 fi
12099 if test -z "$ac_cpp_err"; then
12100   eval "$as_ac_Header=yes"
12101 else
12102   echo "$as_me: failed program was:" >&5
12103   cat conftest.$ac_ext >&5
12104   eval "$as_ac_Header=no"
12105 fi
12106 rm -f conftest.err conftest.$ac_ext
12107 fi
12108 echo "$as_me:12108: result: `eval echo '${'$as_ac_Header'}'`" >&5
12109 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12110 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12111   cat >>confdefs.h <<EOF
12112 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12113 EOF
12114
12115 fi
12116 done
12117
12118 fi
12119 if test "$ac_cv_header_termios_h" = yes ; then
12120         case "$CFLAGS $CPPFLAGS" in
12121         *-D_POSIX_SOURCE*)
12122                 termios_bad=dunno ;;
12123         *)      termios_bad=maybe ;;
12124         esac
12125         if test "$termios_bad" = maybe ; then
12126         echo "$as_me:12126: checking whether termios.h needs _POSIX_SOURCE" >&5
12127 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12128         cat >conftest.$ac_ext <<_ACEOF
12129 #line 12129 "configure"
12130 #include "confdefs.h"
12131 #include <termios.h>
12132 int
12133 main ()
12134 {
12135 struct termios foo; int x = foo.c_iflag
12136   ;
12137   return 0;
12138 }
12139 _ACEOF
12140 rm -f conftest.$ac_objext
12141 if { (eval echo "$as_me:12141: \"$ac_compile\"") >&5
12142   (eval $ac_compile) 2>&5
12143   ac_status=$?
12144   echo "$as_me:12144: \$? = $ac_status" >&5
12145   (exit $ac_status); } &&
12146          { ac_try='test -s conftest.$ac_objext'
12147   { (eval echo "$as_me:12147: \"$ac_try\"") >&5
12148   (eval $ac_try) 2>&5
12149   ac_status=$?
12150   echo "$as_me:12150: \$? = $ac_status" >&5
12151   (exit $ac_status); }; }; then
12152   termios_bad=no
12153 else
12154   echo "$as_me: failed program was:" >&5
12155 cat conftest.$ac_ext >&5
12156
12157                 cat >conftest.$ac_ext <<_ACEOF
12158 #line 12158 "configure"
12159 #include "confdefs.h"
12160
12161 #define _POSIX_SOURCE
12162 #include <termios.h>
12163 int
12164 main ()
12165 {
12166 struct termios foo; int x = foo.c_iflag
12167   ;
12168   return 0;
12169 }
12170 _ACEOF
12171 rm -f conftest.$ac_objext
12172 if { (eval echo "$as_me:12172: \"$ac_compile\"") >&5
12173   (eval $ac_compile) 2>&5
12174   ac_status=$?
12175   echo "$as_me:12175: \$? = $ac_status" >&5
12176   (exit $ac_status); } &&
12177          { ac_try='test -s conftest.$ac_objext'
12178   { (eval echo "$as_me:12178: \"$ac_try\"") >&5
12179   (eval $ac_try) 2>&5
12180   ac_status=$?
12181   echo "$as_me:12181: \$? = $ac_status" >&5
12182   (exit $ac_status); }; }; then
12183   termios_bad=unknown
12184 else
12185   echo "$as_me: failed program was:" >&5
12186 cat conftest.$ac_ext >&5
12187 termios_bad=yes cat >>confdefs.h <<\EOF
12188 #define SVR4_TERMIO 1
12189 EOF
12190
12191 fi
12192 rm -f conftest.$ac_objext conftest.$ac_ext
12193
12194 fi
12195 rm -f conftest.$ac_objext conftest.$ac_ext
12196         echo "$as_me:12196: result: $termios_bad" >&5
12197 echo "${ECHO_T}$termios_bad" >&6
12198         fi
12199 fi
12200
12201 echo "$as_me:12201: checking for tcgetattr" >&5
12202 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12203 if test "${cf_cv_have_tcgetattr+set}" = set; then
12204   echo $ECHO_N "(cached) $ECHO_C" >&6
12205 else
12206
12207 cat >conftest.$ac_ext <<_ACEOF
12208 #line 12208 "configure"
12209 #include "confdefs.h"
12210
12211 #include <sys/types.h>
12212 #ifdef HAVE_UNISTD_H
12213 #include <unistd.h>
12214 #endif
12215 #ifdef HAVE_TERMIOS_H
12216 #include <termios.h>
12217 #define TTY struct termios
12218 #else
12219 #ifdef HAVE_TERMIO_H
12220 #include <termio.h>
12221 #define TTY struct termio
12222 #endif
12223 #endif
12224
12225 int
12226 main ()
12227 {
12228
12229 TTY foo;
12230 tcgetattr(1, &foo);
12231   ;
12232   return 0;
12233 }
12234 _ACEOF
12235 rm -f conftest.$ac_objext conftest$ac_exeext
12236 if { (eval echo "$as_me:12236: \"$ac_link\"") >&5
12237   (eval $ac_link) 2>&5
12238   ac_status=$?
12239   echo "$as_me:12239: \$? = $ac_status" >&5
12240   (exit $ac_status); } &&
12241          { ac_try='test -s conftest$ac_exeext'
12242   { (eval echo "$as_me:12242: \"$ac_try\"") >&5
12243   (eval $ac_try) 2>&5
12244   ac_status=$?
12245   echo "$as_me:12245: \$? = $ac_status" >&5
12246   (exit $ac_status); }; }; then
12247   cf_cv_have_tcgetattr=yes
12248 else
12249   echo "$as_me: failed program was:" >&5
12250 cat conftest.$ac_ext >&5
12251 cf_cv_have_tcgetattr=no
12252 fi
12253 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12254 fi
12255 echo "$as_me:12255: result: $cf_cv_have_tcgetattr" >&5
12256 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12257 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12258 #define HAVE_TCGETATTR 1
12259 EOF
12260
12261 echo "$as_me:12261: checking for vsscanf function or workaround" >&5
12262 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12263 if test "${cf_cv_func_vsscanf+set}" = set; then
12264   echo $ECHO_N "(cached) $ECHO_C" >&6
12265 else
12266
12267 cat >conftest.$ac_ext <<_ACEOF
12268 #line 12268 "configure"
12269 #include "confdefs.h"
12270
12271 #include <stdarg.h>
12272 #include <stdio.h>
12273 int
12274 main ()
12275 {
12276
12277         va_list ap;
12278         vsscanf("from", "%d", ap)
12279   ;
12280   return 0;
12281 }
12282 _ACEOF
12283 rm -f conftest.$ac_objext conftest$ac_exeext
12284 if { (eval echo "$as_me:12284: \"$ac_link\"") >&5
12285   (eval $ac_link) 2>&5
12286   ac_status=$?
12287   echo "$as_me:12287: \$? = $ac_status" >&5
12288   (exit $ac_status); } &&
12289          { ac_try='test -s conftest$ac_exeext'
12290   { (eval echo "$as_me:12290: \"$ac_try\"") >&5
12291   (eval $ac_try) 2>&5
12292   ac_status=$?
12293   echo "$as_me:12293: \$? = $ac_status" >&5
12294   (exit $ac_status); }; }; then
12295   cf_cv_func_vsscanf=vsscanf
12296 else
12297   echo "$as_me: failed program was:" >&5
12298 cat conftest.$ac_ext >&5
12299
12300 cat >conftest.$ac_ext <<_ACEOF
12301 #line 12301 "configure"
12302 #include "confdefs.h"
12303
12304 #include <stdarg.h>
12305 #include <stdio.h>
12306 int
12307 main ()
12308 {
12309
12310     FILE strbuf;
12311     char *str = "from";
12312
12313     strbuf._flag = _IOREAD;
12314     strbuf._ptr = strbuf._base = (unsigned char *) str;
12315     strbuf._cnt = strlen(str);
12316     strbuf._file = _NFILE;
12317     return (vfscanf(&strbuf, "%d", ap))
12318   ;
12319   return 0;
12320 }
12321 _ACEOF
12322 rm -f conftest.$ac_objext conftest$ac_exeext
12323 if { (eval echo "$as_me:12323: \"$ac_link\"") >&5
12324   (eval $ac_link) 2>&5
12325   ac_status=$?
12326   echo "$as_me:12326: \$? = $ac_status" >&5
12327   (exit $ac_status); } &&
12328          { ac_try='test -s conftest$ac_exeext'
12329   { (eval echo "$as_me:12329: \"$ac_try\"") >&5
12330   (eval $ac_try) 2>&5
12331   ac_status=$?
12332   echo "$as_me:12332: \$? = $ac_status" >&5
12333   (exit $ac_status); }; }; then
12334   cf_cv_func_vsscanf=vfscanf
12335 else
12336   echo "$as_me: failed program was:" >&5
12337 cat conftest.$ac_ext >&5
12338
12339 cat >conftest.$ac_ext <<_ACEOF
12340 #line 12340 "configure"
12341 #include "confdefs.h"
12342
12343 #include <stdarg.h>
12344 #include <stdio.h>
12345 int
12346 main ()
12347 {
12348
12349     FILE strbuf;
12350     char *str = "from";
12351
12352     strbuf._flag = _IOREAD;
12353     strbuf._ptr = strbuf._base = (unsigned char *) str;
12354     strbuf._cnt = strlen(str);
12355     strbuf._file = _NFILE;
12356     return (_doscan(&strbuf, "%d", ap))
12357   ;
12358   return 0;
12359 }
12360 _ACEOF
12361 rm -f conftest.$ac_objext conftest$ac_exeext
12362 if { (eval echo "$as_me:12362: \"$ac_link\"") >&5
12363   (eval $ac_link) 2>&5
12364   ac_status=$?
12365   echo "$as_me:12365: \$? = $ac_status" >&5
12366   (exit $ac_status); } &&
12367          { ac_try='test -s conftest$ac_exeext'
12368   { (eval echo "$as_me:12368: \"$ac_try\"") >&5
12369   (eval $ac_try) 2>&5
12370   ac_status=$?
12371   echo "$as_me:12371: \$? = $ac_status" >&5
12372   (exit $ac_status); }; }; then
12373   cf_cv_func_vsscanf=_doscan
12374 else
12375   echo "$as_me: failed program was:" >&5
12376 cat conftest.$ac_ext >&5
12377
12378 cf_cv_func_vsscanf=no
12379 fi
12380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12381 fi
12382 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12383 fi
12384 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12385 fi
12386 echo "$as_me:12386: result: $cf_cv_func_vsscanf" >&5
12387 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12388
12389 case $cf_cv_func_vsscanf in #(vi
12390 vsscanf) cat >>confdefs.h <<\EOF
12391 #define HAVE_VSSCANF 1
12392 EOF
12393 ;; #(vi
12394 vfscanf) cat >>confdefs.h <<\EOF
12395 #define HAVE_VFSCANF 1
12396 EOF
12397 ;; #(vi
12398 _doscan) cat >>confdefs.h <<\EOF
12399 #define HAVE__DOSCAN 1
12400 EOF
12401 ;;
12402 esac
12403
12404 echo "$as_me:12404: checking for working mkstemp" >&5
12405 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
12406 if test "${cf_cv_func_mkstemp+set}" = set; then
12407   echo $ECHO_N "(cached) $ECHO_C" >&6
12408 else
12409
12410 rm -f conftest*
12411 if test "$cross_compiling" = yes; then
12412   echo "$as_me:12412: checking for mkstemp" >&5
12413 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
12414 if test "${ac_cv_func_mkstemp+set}" = set; then
12415   echo $ECHO_N "(cached) $ECHO_C" >&6
12416 else
12417   cat >conftest.$ac_ext <<_ACEOF
12418 #line 12418 "configure"
12419 #include "confdefs.h"
12420 /* System header to define __stub macros and hopefully few prototypes,
12421     which can conflict with char mkstemp (); below.  */
12422 #include <assert.h>
12423 /* Override any gcc2 internal prototype to avoid an error.  */
12424 #ifdef __cplusplus
12425 extern "C"
12426 #endif
12427 /* We use char because int might match the return type of a gcc2
12428    builtin and then its argument prototype would still apply.  */
12429 char mkstemp ();
12430 char (*f) ();
12431
12432 int
12433 main ()
12434 {
12435 /* The GNU C library defines this for functions which it implements
12436     to always fail with ENOSYS.  Some functions are actually named
12437     something starting with __ and the normal name is an alias.  */
12438 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
12439 choke me
12440 #else
12441 f = mkstemp;
12442 #endif
12443
12444   ;
12445   return 0;
12446 }
12447 _ACEOF
12448 rm -f conftest.$ac_objext conftest$ac_exeext
12449 if { (eval echo "$as_me:12449: \"$ac_link\"") >&5
12450   (eval $ac_link) 2>&5
12451   ac_status=$?
12452   echo "$as_me:12452: \$? = $ac_status" >&5
12453   (exit $ac_status); } &&
12454          { ac_try='test -s conftest$ac_exeext'
12455   { (eval echo "$as_me:12455: \"$ac_try\"") >&5
12456   (eval $ac_try) 2>&5
12457   ac_status=$?
12458   echo "$as_me:12458: \$? = $ac_status" >&5
12459   (exit $ac_status); }; }; then
12460   ac_cv_func_mkstemp=yes
12461 else
12462   echo "$as_me: failed program was:" >&5
12463 cat conftest.$ac_ext >&5
12464 ac_cv_func_mkstemp=no
12465 fi
12466 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12467 fi
12468 echo "$as_me:12468: result: $ac_cv_func_mkstemp" >&5
12469 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
12470
12471 else
12472   cat >conftest.$ac_ext <<_ACEOF
12473 #line 12473 "configure"
12474 #include "confdefs.h"
12475
12476 #include <sys/types.h>
12477 #include <stdlib.h>
12478 #include <stdio.h>
12479 #include <string.h>
12480 #include <sys/stat.h>
12481 int main()
12482 {
12483         char *tmpl = "conftestXXXXXX";
12484         char name[2][80];
12485         int n;
12486         int result = 0;
12487         int fd;
12488         struct stat sb;
12489
12490         umask(077);
12491         for (n = 0; n < 2; ++n) {
12492                 strcpy(name[n], tmpl);
12493                 if ((fd = mkstemp(name[n])) >= 0) {
12494                         if (!strcmp(name[n], tmpl)
12495                          || stat(name[n], &sb) != 0
12496                          || (sb.st_mode & S_IFMT) != S_IFREG
12497                          || (sb.st_mode & 077) != 0) {
12498                                 result = 1;
12499                         }
12500                         close(fd);
12501                 }
12502         }
12503         if (result == 0
12504          && !strcmp(name[0], name[1]))
12505                 result = 1;
12506         ${cf_cv_main_return:-return}(result);
12507 }
12508
12509 _ACEOF
12510 rm -f conftest$ac_exeext
12511 if { (eval echo "$as_me:12511: \"$ac_link\"") >&5
12512   (eval $ac_link) 2>&5
12513   ac_status=$?
12514   echo "$as_me:12514: \$? = $ac_status" >&5
12515   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12516   { (eval echo "$as_me:12516: \"$ac_try\"") >&5
12517   (eval $ac_try) 2>&5
12518   ac_status=$?
12519   echo "$as_me:12519: \$? = $ac_status" >&5
12520   (exit $ac_status); }; }; then
12521   cf_cv_func_mkstemp=yes
12522
12523 else
12524   echo "$as_me: program exited with status $ac_status" >&5
12525 echo "$as_me: failed program was:" >&5
12526 cat conftest.$ac_ext >&5
12527 cf_cv_func_mkstemp=no
12528
12529 fi
12530 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12531 fi
12532
12533 fi
12534 echo "$as_me:12534: result: $cf_cv_func_mkstemp" >&5
12535 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
12536 if test "$cf_cv_func_mkstemp" = yes ; then
12537         cat >>confdefs.h <<\EOF
12538 #define HAVE_MKSTEMP 1
12539 EOF
12540
12541 fi
12542
12543 # setup for prototype of fallback for vsscanf()
12544
12545 if test "$cf_cv_func_vsscanf" = vsscanf ; then
12546         HAVE_VSSCANF=1
12547 else
12548         HAVE_VSSCANF=0
12549 fi
12550
12551 if test "$cross_compiling" = yes ; then
12552         { echo "$as_me:12552: WARNING: cross compiling: assume setvbuf params not reversed" >&5
12553 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
12554 else
12555         echo "$as_me:12555: checking whether setvbuf arguments are reversed" >&5
12556 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
12557 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
12558   echo $ECHO_N "(cached) $ECHO_C" >&6
12559 else
12560   if test "$cross_compiling" = yes; then
12561   { { echo "$as_me:12561: error: cannot run test program while cross compiling" >&5
12562 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12563    { (exit 1); exit 1; }; }
12564 else
12565   cat >conftest.$ac_ext <<_ACEOF
12566 #line 12566 "configure"
12567 #include "confdefs.h"
12568 #include <stdio.h>
12569 /* If setvbuf has the reversed format, exit 0. */
12570 int
12571 main ()
12572 {
12573   /* This call has the arguments reversed.
12574      A reversed system may check and see that the address of main
12575      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
12576   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
12577     $ac_main_return(1);
12578   putc('\r', stdout);
12579   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
12580 }
12581 _ACEOF
12582 rm -f conftest$ac_exeext
12583 if { (eval echo "$as_me:12583: \"$ac_link\"") >&5
12584   (eval $ac_link) 2>&5
12585   ac_status=$?
12586   echo "$as_me:12586: \$? = $ac_status" >&5
12587   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12588   { (eval echo "$as_me:12588: \"$ac_try\"") >&5
12589   (eval $ac_try) 2>&5
12590   ac_status=$?
12591   echo "$as_me:12591: \$? = $ac_status" >&5
12592   (exit $ac_status); }; }; then
12593   ac_cv_func_setvbuf_reversed=yes
12594 else
12595   echo "$as_me: program exited with status $ac_status" >&5
12596 echo "$as_me: failed program was:" >&5
12597 cat conftest.$ac_ext >&5
12598 ac_cv_func_setvbuf_reversed=no
12599 fi
12600 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12601 fi
12602 rm -f core core.* *.core
12603 fi
12604 echo "$as_me:12604: result: $ac_cv_func_setvbuf_reversed" >&5
12605 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
12606 if test $ac_cv_func_setvbuf_reversed = yes; then
12607
12608 cat >>confdefs.h <<\EOF
12609 #define SETVBUF_REVERSED 1
12610 EOF
12611
12612 fi
12613
12614 fi
12615 echo "$as_me:12615: checking return type of signal handlers" >&5
12616 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12617 if test "${ac_cv_type_signal+set}" = set; then
12618   echo $ECHO_N "(cached) $ECHO_C" >&6
12619 else
12620   cat >conftest.$ac_ext <<_ACEOF
12621 #line 12621 "configure"
12622 #include "confdefs.h"
12623 #include <sys/types.h>
12624 #include <signal.h>
12625 #ifdef signal
12626 # undef signal
12627 #endif
12628 #ifdef __cplusplus
12629 extern "C" void (*signal (int, void (*)(int)))(int);
12630 #else
12631 void (*signal ()) ();
12632 #endif
12633
12634 int
12635 main ()
12636 {
12637 int i;
12638   ;
12639   return 0;
12640 }
12641 _ACEOF
12642 rm -f conftest.$ac_objext
12643 if { (eval echo "$as_me:12643: \"$ac_compile\"") >&5
12644   (eval $ac_compile) 2>&5
12645   ac_status=$?
12646   echo "$as_me:12646: \$? = $ac_status" >&5
12647   (exit $ac_status); } &&
12648          { ac_try='test -s conftest.$ac_objext'
12649   { (eval echo "$as_me:12649: \"$ac_try\"") >&5
12650   (eval $ac_try) 2>&5
12651   ac_status=$?
12652   echo "$as_me:12652: \$? = $ac_status" >&5
12653   (exit $ac_status); }; }; then
12654   ac_cv_type_signal=void
12655 else
12656   echo "$as_me: failed program was:" >&5
12657 cat conftest.$ac_ext >&5
12658 ac_cv_type_signal=int
12659 fi
12660 rm -f conftest.$ac_objext conftest.$ac_ext
12661 fi
12662 echo "$as_me:12662: result: $ac_cv_type_signal" >&5
12663 echo "${ECHO_T}$ac_cv_type_signal" >&6
12664
12665 cat >>confdefs.h <<EOF
12666 #define RETSIGTYPE $ac_cv_type_signal
12667 EOF
12668
12669 echo "$as_me:12669: checking for type sigaction_t" >&5
12670 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
12671 if test "${cf_cv_type_sigaction+set}" = set; then
12672   echo $ECHO_N "(cached) $ECHO_C" >&6
12673 else
12674
12675         cat >conftest.$ac_ext <<_ACEOF
12676 #line 12676 "configure"
12677 #include "confdefs.h"
12678
12679 #include <signal.h>
12680 int
12681 main ()
12682 {
12683 sigaction_t x
12684   ;
12685   return 0;
12686 }
12687 _ACEOF
12688 rm -f conftest.$ac_objext
12689 if { (eval echo "$as_me:12689: \"$ac_compile\"") >&5
12690   (eval $ac_compile) 2>&5
12691   ac_status=$?
12692   echo "$as_me:12692: \$? = $ac_status" >&5
12693   (exit $ac_status); } &&
12694          { ac_try='test -s conftest.$ac_objext'
12695   { (eval echo "$as_me:12695: \"$ac_try\"") >&5
12696   (eval $ac_try) 2>&5
12697   ac_status=$?
12698   echo "$as_me:12698: \$? = $ac_status" >&5
12699   (exit $ac_status); }; }; then
12700   cf_cv_type_sigaction=yes
12701 else
12702   echo "$as_me: failed program was:" >&5
12703 cat conftest.$ac_ext >&5
12704 cf_cv_type_sigaction=no
12705 fi
12706 rm -f conftest.$ac_objext conftest.$ac_ext
12707 fi
12708
12709 echo "$as_me:12709: result: $cf_cv_type_sigaction" >&5
12710 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
12711 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
12712 #define HAVE_TYPE_SIGACTION 1
12713 EOF
12714
12715 echo "$as_me:12715: checking declaration of size-change" >&5
12716 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
12717 if test "${cf_cv_sizechange+set}" = set; then
12718   echo $ECHO_N "(cached) $ECHO_C" >&6
12719 else
12720
12721     cf_cv_sizechange=unknown
12722     cf_save_CPPFLAGS="$CPPFLAGS"
12723
12724 for cf_opts in "" "NEED_PTEM_H"
12725 do
12726
12727     CPPFLAGS="$cf_save_CPPFLAGS"
12728     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
12729     cat >conftest.$ac_ext <<_ACEOF
12730 #line 12730 "configure"
12731 #include "confdefs.h"
12732 #include <sys/types.h>
12733 #ifdef HAVE_TERMIOS_H
12734 #include <termios.h>
12735 #else
12736 #ifdef HAVE_TERMIO_H
12737 #include <termio.h>
12738 #endif
12739 #endif
12740 #ifdef NEED_PTEM_H
12741 /* This is a workaround for SCO:  they neglected to define struct winsize in
12742  * termios.h -- it's only in termio.h and ptem.h
12743  */
12744 #include        <sys/stream.h>
12745 #include        <sys/ptem.h>
12746 #endif
12747 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
12748 #include <sys/ioctl.h>
12749 #endif
12750
12751 int
12752 main ()
12753 {
12754
12755 #ifdef TIOCGSIZE
12756         struct ttysize win;     /* FIXME: what system is this? */
12757         int y = win.ts_lines;
12758         int x = win.ts_cols;
12759 #else
12760 #ifdef TIOCGWINSZ
12761         struct winsize win;
12762         int y = win.ws_row;
12763         int x = win.ws_col;
12764 #else
12765         no TIOCGSIZE or TIOCGWINSZ
12766 #endif /* TIOCGWINSZ */
12767 #endif /* TIOCGSIZE */
12768
12769   ;
12770   return 0;
12771 }
12772 _ACEOF
12773 rm -f conftest.$ac_objext
12774 if { (eval echo "$as_me:12774: \"$ac_compile\"") >&5
12775   (eval $ac_compile) 2>&5
12776   ac_status=$?
12777   echo "$as_me:12777: \$? = $ac_status" >&5
12778   (exit $ac_status); } &&
12779          { ac_try='test -s conftest.$ac_objext'
12780   { (eval echo "$as_me:12780: \"$ac_try\"") >&5
12781   (eval $ac_try) 2>&5
12782   ac_status=$?
12783   echo "$as_me:12783: \$? = $ac_status" >&5
12784   (exit $ac_status); }; }; then
12785   cf_cv_sizechange=yes
12786 else
12787   echo "$as_me: failed program was:" >&5
12788 cat conftest.$ac_ext >&5
12789 cf_cv_sizechange=no
12790 fi
12791 rm -f conftest.$ac_objext conftest.$ac_ext
12792
12793         CPPFLAGS="$cf_save_CPPFLAGS"
12794         if test "$cf_cv_sizechange" = yes ; then
12795                 echo "size-change succeeded ($cf_opts)" >&5
12796                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
12797                 break
12798         fi
12799 done
12800
12801 fi
12802 echo "$as_me:12802: result: $cf_cv_sizechange" >&5
12803 echo "${ECHO_T}$cf_cv_sizechange" >&6
12804 if test "$cf_cv_sizechange" != no ; then
12805         cat >>confdefs.h <<\EOF
12806 #define HAVE_SIZECHANGE 1
12807 EOF
12808
12809         case $cf_cv_sizechange in #(vi
12810         NEED*)
12811                 cat >>confdefs.h <<EOF
12812 #define $cf_cv_sizechange  1
12813 EOF
12814
12815                 ;;
12816         esac
12817 fi
12818
12819 echo "$as_me:12819: checking for memmove" >&5
12820 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
12821 if test "${ac_cv_func_memmove+set}" = set; then
12822   echo $ECHO_N "(cached) $ECHO_C" >&6
12823 else
12824   cat >conftest.$ac_ext <<_ACEOF
12825 #line 12825 "configure"
12826 #include "confdefs.h"
12827 /* System header to define __stub macros and hopefully few prototypes,
12828     which can conflict with char memmove (); below.  */
12829 #include <assert.h>
12830 /* Override any gcc2 internal prototype to avoid an error.  */
12831 #ifdef __cplusplus
12832 extern "C"
12833 #endif
12834 /* We use char because int might match the return type of a gcc2
12835    builtin and then its argument prototype would still apply.  */
12836 char memmove ();
12837 char (*f) ();
12838
12839 int
12840 main ()
12841 {
12842 /* The GNU C library defines this for functions which it implements
12843     to always fail with ENOSYS.  Some functions are actually named
12844     something starting with __ and the normal name is an alias.  */
12845 #if defined (__stub_memmove) || defined (__stub___memmove)
12846 choke me
12847 #else
12848 f = memmove;
12849 #endif
12850
12851   ;
12852   return 0;
12853 }
12854 _ACEOF
12855 rm -f conftest.$ac_objext conftest$ac_exeext
12856 if { (eval echo "$as_me:12856: \"$ac_link\"") >&5
12857   (eval $ac_link) 2>&5
12858   ac_status=$?
12859   echo "$as_me:12859: \$? = $ac_status" >&5
12860   (exit $ac_status); } &&
12861          { ac_try='test -s conftest$ac_exeext'
12862   { (eval echo "$as_me:12862: \"$ac_try\"") >&5
12863   (eval $ac_try) 2>&5
12864   ac_status=$?
12865   echo "$as_me:12865: \$? = $ac_status" >&5
12866   (exit $ac_status); }; }; then
12867   ac_cv_func_memmove=yes
12868 else
12869   echo "$as_me: failed program was:" >&5
12870 cat conftest.$ac_ext >&5
12871 ac_cv_func_memmove=no
12872 fi
12873 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12874 fi
12875 echo "$as_me:12875: result: $ac_cv_func_memmove" >&5
12876 echo "${ECHO_T}$ac_cv_func_memmove" >&6
12877 if test $ac_cv_func_memmove = yes; then
12878   :
12879 else
12880
12881 echo "$as_me:12881: checking for bcopy" >&5
12882 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
12883 if test "${ac_cv_func_bcopy+set}" = set; then
12884   echo $ECHO_N "(cached) $ECHO_C" >&6
12885 else
12886   cat >conftest.$ac_ext <<_ACEOF
12887 #line 12887 "configure"
12888 #include "confdefs.h"
12889 /* System header to define __stub macros and hopefully few prototypes,
12890     which can conflict with char bcopy (); below.  */
12891 #include <assert.h>
12892 /* Override any gcc2 internal prototype to avoid an error.  */
12893 #ifdef __cplusplus
12894 extern "C"
12895 #endif
12896 /* We use char because int might match the return type of a gcc2
12897    builtin and then its argument prototype would still apply.  */
12898 char bcopy ();
12899 char (*f) ();
12900
12901 int
12902 main ()
12903 {
12904 /* The GNU C library defines this for functions which it implements
12905     to always fail with ENOSYS.  Some functions are actually named
12906     something starting with __ and the normal name is an alias.  */
12907 #if defined (__stub_bcopy) || defined (__stub___bcopy)
12908 choke me
12909 #else
12910 f = bcopy;
12911 #endif
12912
12913   ;
12914   return 0;
12915 }
12916 _ACEOF
12917 rm -f conftest.$ac_objext conftest$ac_exeext
12918 if { (eval echo "$as_me:12918: \"$ac_link\"") >&5
12919   (eval $ac_link) 2>&5
12920   ac_status=$?
12921   echo "$as_me:12921: \$? = $ac_status" >&5
12922   (exit $ac_status); } &&
12923          { ac_try='test -s conftest$ac_exeext'
12924   { (eval echo "$as_me:12924: \"$ac_try\"") >&5
12925   (eval $ac_try) 2>&5
12926   ac_status=$?
12927   echo "$as_me:12927: \$? = $ac_status" >&5
12928   (exit $ac_status); }; }; then
12929   ac_cv_func_bcopy=yes
12930 else
12931   echo "$as_me: failed program was:" >&5
12932 cat conftest.$ac_ext >&5
12933 ac_cv_func_bcopy=no
12934 fi
12935 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12936 fi
12937 echo "$as_me:12937: result: $ac_cv_func_bcopy" >&5
12938 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
12939 if test $ac_cv_func_bcopy = yes; then
12940
12941         echo "$as_me:12941: checking if bcopy does overlapping moves" >&5
12942 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
12943 if test "${cf_cv_good_bcopy+set}" = set; then
12944   echo $ECHO_N "(cached) $ECHO_C" >&6
12945 else
12946
12947                 if test "$cross_compiling" = yes; then
12948   cf_cv_good_bcopy=unknown
12949 else
12950   cat >conftest.$ac_ext <<_ACEOF
12951 #line 12951 "configure"
12952 #include "confdefs.h"
12953
12954 int main() {
12955         static char data[] = "abcdefghijklmnopqrstuwwxyz";
12956         char temp[40];
12957         bcopy(data, temp, sizeof(data));
12958         bcopy(temp+10, temp, 15);
12959         bcopy(temp+5, temp+15, 10);
12960         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
12961 }
12962
12963 _ACEOF
12964 rm -f conftest$ac_exeext
12965 if { (eval echo "$as_me:12965: \"$ac_link\"") >&5
12966   (eval $ac_link) 2>&5
12967   ac_status=$?
12968   echo "$as_me:12968: \$? = $ac_status" >&5
12969   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12970   { (eval echo "$as_me:12970: \"$ac_try\"") >&5
12971   (eval $ac_try) 2>&5
12972   ac_status=$?
12973   echo "$as_me:12973: \$? = $ac_status" >&5
12974   (exit $ac_status); }; }; then
12975   cf_cv_good_bcopy=yes
12976 else
12977   echo "$as_me: program exited with status $ac_status" >&5
12978 echo "$as_me: failed program was:" >&5
12979 cat conftest.$ac_ext >&5
12980 cf_cv_good_bcopy=no
12981 fi
12982 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12983 fi
12984
12985 fi
12986 echo "$as_me:12986: result: $cf_cv_good_bcopy" >&5
12987 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
12988
12989 else
12990   cf_cv_good_bcopy=no
12991 fi
12992
12993         if test "$cf_cv_good_bcopy" = yes ; then
12994                 cat >>confdefs.h <<\EOF
12995 #define USE_OK_BCOPY 1
12996 EOF
12997
12998         else
12999                 cat >>confdefs.h <<\EOF
13000 #define USE_MY_MEMMOVE 1
13001 EOF
13002
13003         fi
13004
13005 fi
13006
13007 echo "$as_me:13007: checking if poll really works" >&5
13008 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13009 if test "${cf_cv_working_poll+set}" = set; then
13010   echo $ECHO_N "(cached) $ECHO_C" >&6
13011 else
13012
13013 if test "$cross_compiling" = yes; then
13014   cf_cv_working_poll=unknown
13015 else
13016   cat >conftest.$ac_ext <<_ACEOF
13017 #line 13017 "configure"
13018 #include "confdefs.h"
13019
13020 #include <stdio.h>
13021 #ifdef HAVE_POLL_H
13022 #include <poll.h>
13023 #else
13024 #include <sys/poll.h>
13025 #endif
13026 int main() {
13027         struct pollfd myfds;
13028         int ret;
13029
13030         myfds.fd = 0;
13031         myfds.events = POLLIN;
13032
13033         ret = poll(&myfds, 1, 100);
13034         ${cf_cv_main_return:-return}(ret != 0);
13035 }
13036 _ACEOF
13037 rm -f conftest$ac_exeext
13038 if { (eval echo "$as_me:13038: \"$ac_link\"") >&5
13039   (eval $ac_link) 2>&5
13040   ac_status=$?
13041   echo "$as_me:13041: \$? = $ac_status" >&5
13042   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13043   { (eval echo "$as_me:13043: \"$ac_try\"") >&5
13044   (eval $ac_try) 2>&5
13045   ac_status=$?
13046   echo "$as_me:13046: \$? = $ac_status" >&5
13047   (exit $ac_status); }; }; then
13048   cf_cv_working_poll=yes
13049 else
13050   echo "$as_me: program exited with status $ac_status" >&5
13051 echo "$as_me: failed program was:" >&5
13052 cat conftest.$ac_ext >&5
13053 cf_cv_working_poll=no
13054 fi
13055 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13056 fi
13057 fi
13058 echo "$as_me:13058: result: $cf_cv_working_poll" >&5
13059 echo "${ECHO_T}$cf_cv_working_poll" >&6
13060 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13061 #define HAVE_WORKING_POLL 1
13062 EOF
13063
13064 if test "$with_hashed_db" != no ; then
13065         cat >>confdefs.h <<\EOF
13066 #define USE_HASHED_DB 1
13067 EOF
13068
13069 echo "$as_me:13069: checking for db.h" >&5
13070 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13071 if test "${ac_cv_header_db_h+set}" = set; then
13072   echo $ECHO_N "(cached) $ECHO_C" >&6
13073 else
13074   cat >conftest.$ac_ext <<_ACEOF
13075 #line 13075 "configure"
13076 #include "confdefs.h"
13077 #include <db.h>
13078 _ACEOF
13079 if { (eval echo "$as_me:13079: \"$ac_cpp conftest.$ac_ext\"") >&5
13080   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13081   ac_status=$?
13082   egrep -v '^ *\+' conftest.er1 >conftest.err
13083   rm -f conftest.er1
13084   cat conftest.err >&5
13085   echo "$as_me:13085: \$? = $ac_status" >&5
13086   (exit $ac_status); } >/dev/null; then
13087   if test -s conftest.err; then
13088     ac_cpp_err=$ac_c_preproc_warn_flag
13089   else
13090     ac_cpp_err=
13091   fi
13092 else
13093   ac_cpp_err=yes
13094 fi
13095 if test -z "$ac_cpp_err"; then
13096   ac_cv_header_db_h=yes
13097 else
13098   echo "$as_me: failed program was:" >&5
13099   cat conftest.$ac_ext >&5
13100   ac_cv_header_db_h=no
13101 fi
13102 rm -f conftest.err conftest.$ac_ext
13103 fi
13104 echo "$as_me:13104: result: $ac_cv_header_db_h" >&5
13105 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13106 if test $ac_cv_header_db_h = yes; then
13107
13108 echo "$as_me:13108: checking for version of db" >&5
13109 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13110 if test "${cf_cv_hashed_db_version+set}" = set; then
13111   echo $ECHO_N "(cached) $ECHO_C" >&6
13112 else
13113
13114 cf_cv_hashed_db_version=unknown
13115
13116 for cf_db_version in 1 2 3 4
13117 do
13118
13119 echo "(line 13119) testing checking for db version $cf_db_version ..." 1>&5
13120
13121         cat >conftest.$ac_ext <<_ACEOF
13122 #line 13122 "configure"
13123 #include "confdefs.h"
13124
13125 $ac_includes_default
13126 #include <db.h>
13127
13128 #ifdef DB_VERSION_MAJOR
13129         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13130 #if $cf_db_version == DB_VERSION_MAJOR
13131         /* ok */
13132 #else
13133         make an error
13134 #endif
13135 #else
13136 #if $cf_db_version == 1
13137         /* ok: assuming this is DB 1.8.5 */
13138 #else
13139         make an error
13140 #endif
13141 #endif
13142
13143 int
13144 main ()
13145 {
13146 DBT *foo = 0
13147   ;
13148   return 0;
13149 }
13150 _ACEOF
13151 rm -f conftest.$ac_objext
13152 if { (eval echo "$as_me:13152: \"$ac_compile\"") >&5
13153   (eval $ac_compile) 2>&5
13154   ac_status=$?
13155   echo "$as_me:13155: \$? = $ac_status" >&5
13156   (exit $ac_status); } &&
13157          { ac_try='test -s conftest.$ac_objext'
13158   { (eval echo "$as_me:13158: \"$ac_try\"") >&5
13159   (eval $ac_try) 2>&5
13160   ac_status=$?
13161   echo "$as_me:13161: \$? = $ac_status" >&5
13162   (exit $ac_status); }; }; then
13163
13164         cf_cv_hashed_db_version=$cf_db_version
13165         break
13166
13167 else
13168   echo "$as_me: failed program was:" >&5
13169 cat conftest.$ac_ext >&5
13170 fi
13171 rm -f conftest.$ac_objext conftest.$ac_ext
13172 done
13173
13174 fi
13175 echo "$as_me:13175: result: $cf_cv_hashed_db_version" >&5
13176 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
13177
13178 if test "$cf_cv_hashed_db_version" = unknown ; then
13179         { { echo "$as_me:13179: error: Cannot determine version of db" >&5
13180 echo "$as_me: error: Cannot determine version of db" >&2;}
13181    { (exit 1); exit 1; }; }
13182 else
13183
13184 echo "$as_me:13184: checking for db libraries" >&5
13185 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
13186 if test "${cf_cv_hashed_db_libs+set}" = set; then
13187   echo $ECHO_N "(cached) $ECHO_C" >&6
13188 else
13189
13190 cf_cv_hashed_db_libs=unknown
13191 for cf_db_libs in db$cf_cv_hashed_db_version db ''
13192 do
13193         cf_save_libs="$LIBS"
13194         if test -n "$cf_db_libs"; then
13195                 LIBS="-l$cf_db_libs $LIBS"
13196         fi
13197
13198 echo "(line 13198) testing checking for library "$cf_db_libs" ..." 1>&5
13199
13200         cat >conftest.$ac_ext <<_ACEOF
13201 #line 13201 "configure"
13202 #include "confdefs.h"
13203
13204 $ac_includes_default
13205 #include <db.h>
13206
13207 int
13208 main ()
13209 {
13210
13211         char *path = "/tmp/foo";
13212 #ifdef DB_VERSION_MAJOR
13213 #if DB_VERSION_MAJOR >= 4
13214         DB *result = 0;
13215         db_create(&result, NULL, 0);
13216         result->open(result,
13217                 NULL,
13218                 path,
13219                 path,
13220                 DB_HASH,
13221                 DB_CREATE,
13222                 0644);
13223 #elif DB_VERSION_MAJOR >= 3
13224         DB *result = 0;
13225         db_create(&result, NULL, 0);
13226         result->open(result,
13227                 path,
13228                 path,
13229                 DB_HASH,
13230                 DB_CREATE,
13231                 0644);
13232 #elif DB_VERSION_MAJOR >= 2
13233         DB *result = 0;
13234         db_open(path,
13235                 DB_HASH,
13236                 DB_CREATE,
13237                 0644,
13238                 (DB_ENV *) 0,
13239                 (DB_INFO *) 0,
13240                 &result);
13241 #endif /* DB_VERSION_MAJOR */
13242 #else
13243         DB *result = dbopen(path,
13244                      2,
13245                      0644,
13246                      DB_HASH,
13247                      0);
13248 #endif
13249         ${cf_cv_main_return:-return}(result != 0)
13250
13251   ;
13252   return 0;
13253 }
13254 _ACEOF
13255 rm -f conftest.$ac_objext conftest$ac_exeext
13256 if { (eval echo "$as_me:13256: \"$ac_link\"") >&5
13257   (eval $ac_link) 2>&5
13258   ac_status=$?
13259   echo "$as_me:13259: \$? = $ac_status" >&5
13260   (exit $ac_status); } &&
13261          { ac_try='test -s conftest$ac_exeext'
13262   { (eval echo "$as_me:13262: \"$ac_try\"") >&5
13263   (eval $ac_try) 2>&5
13264   ac_status=$?
13265   echo "$as_me:13265: \$? = $ac_status" >&5
13266   (exit $ac_status); }; }; then
13267
13268         if test -n "$cf_db_libs" ; then
13269                 cf_cv_hashed_db_libs=$cf_db_libs
13270         else
13271                 cf_cv_hashed_db_libs=default
13272         fi
13273         LIBS="$cf_save_libs"
13274         break
13275
13276 else
13277   echo "$as_me: failed program was:" >&5
13278 cat conftest.$ac_ext >&5
13279 fi
13280 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13281         LIBS="$cf_save_libs"
13282 done
13283
13284 fi
13285 echo "$as_me:13285: result: $cf_cv_hashed_db_libs" >&5
13286 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
13287
13288         if test "$cf_cv_hashed_db_libs" = unknown ; then
13289                 { { echo "$as_me:13289: error: Cannot determine library for db" >&5
13290 echo "$as_me: error: Cannot determine library for db" >&2;}
13291    { (exit 1); exit 1; }; }
13292         elif test "$cf_cv_hashed_db_libs" != default ; then
13293                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
13294         fi
13295 fi
13296
13297 else
13298
13299         { { echo "$as_me:13299: error: Cannot find db.h" >&5
13300 echo "$as_me: error: Cannot find db.h" >&2;}
13301    { (exit 1); exit 1; }; }
13302
13303 fi
13304
13305 fi
13306
13307 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13308         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13309         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13310 fi
13311
13312 # Just in case, check if the C compiler has a bool type.
13313
13314 echo "$as_me:13314: checking if we should include stdbool.h" >&5
13315 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13316
13317 if test "${cf_cv_header_stdbool_h+set}" = set; then
13318   echo $ECHO_N "(cached) $ECHO_C" >&6
13319 else
13320
13321         cat >conftest.$ac_ext <<_ACEOF
13322 #line 13322 "configure"
13323 #include "confdefs.h"
13324
13325 int
13326 main ()
13327 {
13328 bool foo = false
13329   ;
13330   return 0;
13331 }
13332 _ACEOF
13333 rm -f conftest.$ac_objext
13334 if { (eval echo "$as_me:13334: \"$ac_compile\"") >&5
13335   (eval $ac_compile) 2>&5
13336   ac_status=$?
13337   echo "$as_me:13337: \$? = $ac_status" >&5
13338   (exit $ac_status); } &&
13339          { ac_try='test -s conftest.$ac_objext'
13340   { (eval echo "$as_me:13340: \"$ac_try\"") >&5
13341   (eval $ac_try) 2>&5
13342   ac_status=$?
13343   echo "$as_me:13343: \$? = $ac_status" >&5
13344   (exit $ac_status); }; }; then
13345   cf_cv_header_stdbool_h=0
13346 else
13347   echo "$as_me: failed program was:" >&5
13348 cat conftest.$ac_ext >&5
13349 cat >conftest.$ac_ext <<_ACEOF
13350 #line 13350 "configure"
13351 #include "confdefs.h"
13352
13353 #ifndef __BEOS__
13354 #include <stdbool.h>
13355 #endif
13356
13357 int
13358 main ()
13359 {
13360 bool foo = false
13361   ;
13362   return 0;
13363 }
13364 _ACEOF
13365 rm -f conftest.$ac_objext
13366 if { (eval echo "$as_me:13366: \"$ac_compile\"") >&5
13367   (eval $ac_compile) 2>&5
13368   ac_status=$?
13369   echo "$as_me:13369: \$? = $ac_status" >&5
13370   (exit $ac_status); } &&
13371          { ac_try='test -s conftest.$ac_objext'
13372   { (eval echo "$as_me:13372: \"$ac_try\"") >&5
13373   (eval $ac_try) 2>&5
13374   ac_status=$?
13375   echo "$as_me:13375: \$? = $ac_status" >&5
13376   (exit $ac_status); }; }; then
13377   cf_cv_header_stdbool_h=1
13378 else
13379   echo "$as_me: failed program was:" >&5
13380 cat conftest.$ac_ext >&5
13381 cf_cv_header_stdbool_h=0
13382 fi
13383 rm -f conftest.$ac_objext conftest.$ac_ext
13384 fi
13385 rm -f conftest.$ac_objext conftest.$ac_ext
13386 fi
13387
13388 if test "$cf_cv_header_stdbool_h" = 1
13389 then    echo "$as_me:13389: result: yes" >&5
13390 echo "${ECHO_T}yes" >&6
13391 else    echo "$as_me:13391: result: no" >&5
13392 echo "${ECHO_T}no" >&6
13393 fi
13394
13395 echo "$as_me:13395: checking for builtin bool type" >&5
13396 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
13397
13398 if test "${cf_cv_cc_bool_type+set}" = set; then
13399   echo $ECHO_N "(cached) $ECHO_C" >&6
13400 else
13401
13402         cat >conftest.$ac_ext <<_ACEOF
13403 #line 13403 "configure"
13404 #include "confdefs.h"
13405
13406 #include <stdio.h>
13407 #include <sys/types.h>
13408
13409 int
13410 main ()
13411 {
13412 bool x = false
13413   ;
13414   return 0;
13415 }
13416 _ACEOF
13417 rm -f conftest.$ac_objext
13418 if { (eval echo "$as_me:13418: \"$ac_compile\"") >&5
13419   (eval $ac_compile) 2>&5
13420   ac_status=$?
13421   echo "$as_me:13421: \$? = $ac_status" >&5
13422   (exit $ac_status); } &&
13423          { ac_try='test -s conftest.$ac_objext'
13424   { (eval echo "$as_me:13424: \"$ac_try\"") >&5
13425   (eval $ac_try) 2>&5
13426   ac_status=$?
13427   echo "$as_me:13427: \$? = $ac_status" >&5
13428   (exit $ac_status); }; }; then
13429   cf_cv_cc_bool_type=1
13430 else
13431   echo "$as_me: failed program was:" >&5
13432 cat conftest.$ac_ext >&5
13433 cf_cv_cc_bool_type=0
13434 fi
13435 rm -f conftest.$ac_objext conftest.$ac_ext
13436
13437 fi
13438
13439 if test "$cf_cv_cc_bool_type" = 1
13440 then    echo "$as_me:13440: result: yes" >&5
13441 echo "${ECHO_T}yes" >&6
13442 else    echo "$as_me:13442: result: no" >&5
13443 echo "${ECHO_T}no" >&6
13444 fi
13445
13446 # Check for C++ compiler characteristics (and ensure that it's there!)
13447 if test -n "$CXX" ; then
13448         ac_ext=cc
13449 ac_cpp='$CXXCPP $CPPFLAGS'
13450 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13451 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13452 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13453 ac_main_return=return
13454
13455 if test -n "$GXX" ; then
13456 case $cf_cv_system_name in #(vi
13457 os2*) #(vi
13458         cf_stdcpp_libname=stdcpp
13459         ;;
13460 *)
13461         cf_stdcpp_libname=stdc++
13462         ;;
13463 esac
13464 echo "$as_me:13464: checking for library $cf_stdcpp_libname" >&5
13465 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
13466 if test "${cf_cv_libstdcpp+set}" = set; then
13467   echo $ECHO_N "(cached) $ECHO_C" >&6
13468 else
13469
13470         cf_save="$LIBS"
13471         LIBS="$LIBS -l$cf_stdcpp_libname"
13472 cat >conftest.$ac_ext <<_ACEOF
13473 #line 13473 "configure"
13474 #include "confdefs.h"
13475
13476 #include <strstream.h>
13477 int
13478 main ()
13479 {
13480
13481 char buf[80];
13482 strstreambuf foo(buf, sizeof(buf))
13483
13484   ;
13485   return 0;
13486 }
13487 _ACEOF
13488 rm -f conftest.$ac_objext conftest$ac_exeext
13489 if { (eval echo "$as_me:13489: \"$ac_link\"") >&5
13490   (eval $ac_link) 2>&5
13491   ac_status=$?
13492   echo "$as_me:13492: \$? = $ac_status" >&5
13493   (exit $ac_status); } &&
13494          { ac_try='test -s conftest$ac_exeext'
13495   { (eval echo "$as_me:13495: \"$ac_try\"") >&5
13496   (eval $ac_try) 2>&5
13497   ac_status=$?
13498   echo "$as_me:13498: \$? = $ac_status" >&5
13499   (exit $ac_status); }; }; then
13500   cf_cv_libstdcpp=yes
13501 else
13502   echo "$as_me: failed program was:" >&5
13503 cat conftest.$ac_ext >&5
13504 cf_cv_libstdcpp=no
13505 fi
13506 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13507         LIBS="$cf_save"
13508
13509 fi
13510 echo "$as_me:13510: result: $cf_cv_libstdcpp" >&5
13511 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
13512 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
13513 fi
13514
13515         echo "$as_me:13515: checking whether $CXX understands -c and -o together" >&5
13516 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
13517 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
13518   echo $ECHO_N "(cached) $ECHO_C" >&6
13519 else
13520
13521 cat > conftest.$ac_ext <<CF_EOF
13522 #include <stdio.h>
13523 int main()
13524 {
13525         ${cf_cv_main_return:-return}(0);
13526 }
13527 CF_EOF
13528 # We do the test twice because some compilers refuse to overwrite an
13529 # existing .o file with -o, though they will create one.
13530 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
13531 if { (eval echo "$as_me:13531: \"$ac_try\"") >&5
13532   (eval $ac_try) 2>&5
13533   ac_status=$?
13534   echo "$as_me:13534: \$? = $ac_status" >&5
13535   (exit $ac_status); } &&
13536   test -f conftest2.$ac_objext && { (eval echo "$as_me:13536: \"$ac_try\"") >&5
13537   (eval $ac_try) 2>&5
13538   ac_status=$?
13539   echo "$as_me:13539: \$? = $ac_status" >&5
13540   (exit $ac_status); };
13541 then
13542   eval cf_cv_prog_CXX_c_o=yes
13543 else
13544   eval cf_cv_prog_CXX_c_o=no
13545 fi
13546 rm -f conftest*
13547
13548 fi
13549 if test $cf_cv_prog_CXX_c_o = yes; then
13550   echo "$as_me:13550: result: yes" >&5
13551 echo "${ECHO_T}yes" >&6
13552 else
13553   echo "$as_me:13553: result: no" >&5
13554 echo "${ECHO_T}no" >&6
13555 fi
13556
13557         case $GXX_VERSION in
13558         1*|2.0-6*)
13559                 cf_cxx_library=yes
13560                 ;;
13561         *-2.7*|2.7*)
13562
13563 cf_cxx_library=unknown
13564 case $cf_cv_system_name in #(vi
13565 os2*) #(vi
13566         cf_gpp_libname=gpp
13567         ;;
13568 *)
13569         cf_gpp_libname=g++
13570         ;;
13571 esac
13572 if test "$GXX" = yes; then
13573         echo "$as_me:13573: checking for lib$cf_gpp_libname" >&5
13574 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
13575         cf_save="$LIBS"
13576         LIBS="$LIBS -l$cf_gpp_libname"
13577         cat >conftest.$ac_ext <<_ACEOF
13578 #line 13578 "configure"
13579 #include "confdefs.h"
13580
13581 #include <$cf_gpp_libname/builtin.h>
13582
13583 int
13584 main ()
13585 {
13586 two_arg_error_handler_t foo2 = lib_error_handler
13587   ;
13588   return 0;
13589 }
13590 _ACEOF
13591 rm -f conftest.$ac_objext conftest$ac_exeext
13592 if { (eval echo "$as_me:13592: \"$ac_link\"") >&5
13593   (eval $ac_link) 2>&5
13594   ac_status=$?
13595   echo "$as_me:13595: \$? = $ac_status" >&5
13596   (exit $ac_status); } &&
13597          { ac_try='test -s conftest$ac_exeext'
13598   { (eval echo "$as_me:13598: \"$ac_try\"") >&5
13599   (eval $ac_try) 2>&5
13600   ac_status=$?
13601   echo "$as_me:13601: \$? = $ac_status" >&5
13602   (exit $ac_status); }; }; then
13603   cf_cxx_library=yes
13604          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13605          if test "$cf_gpp_libname" = cpp ; then
13606             cat >>confdefs.h <<\EOF
13607 #define HAVE_GPP_BUILTIN_H 1
13608 EOF
13609
13610          else
13611             cat >>confdefs.h <<\EOF
13612 #define HAVE_GXX_BUILTIN_H 1
13613 EOF
13614
13615          fi
13616 else
13617   echo "$as_me: failed program was:" >&5
13618 cat conftest.$ac_ext >&5
13619 cat >conftest.$ac_ext <<_ACEOF
13620 #line 13620 "configure"
13621 #include "confdefs.h"
13622
13623 #include <builtin.h>
13624
13625 int
13626 main ()
13627 {
13628 two_arg_error_handler_t foo2 = lib_error_handler
13629   ;
13630   return 0;
13631 }
13632 _ACEOF
13633 rm -f conftest.$ac_objext conftest$ac_exeext
13634 if { (eval echo "$as_me:13634: \"$ac_link\"") >&5
13635   (eval $ac_link) 2>&5
13636   ac_status=$?
13637   echo "$as_me:13637: \$? = $ac_status" >&5
13638   (exit $ac_status); } &&
13639          { ac_try='test -s conftest$ac_exeext'
13640   { (eval echo "$as_me:13640: \"$ac_try\"") >&5
13641   (eval $ac_try) 2>&5
13642   ac_status=$?
13643   echo "$as_me:13643: \$? = $ac_status" >&5
13644   (exit $ac_status); }; }; then
13645   cf_cxx_library=yes
13646          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13647          cat >>confdefs.h <<\EOF
13648 #define HAVE_BUILTIN_H 1
13649 EOF
13650
13651 else
13652   echo "$as_me: failed program was:" >&5
13653 cat conftest.$ac_ext >&5
13654 cf_cxx_library=no
13655 fi
13656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13657 fi
13658 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13659         LIBS="$cf_save"
13660         echo "$as_me:13660: result: $cf_cxx_library" >&5
13661 echo "${ECHO_T}$cf_cxx_library" >&6
13662 fi
13663
13664                 ;;
13665         *)
13666                 cf_cxx_library=no
13667                 ;;
13668         esac
13669
13670         ac_ext=cc
13671 ac_cpp='$CXXCPP $CPPFLAGS'
13672 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13673 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13674 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13675 ac_main_return=return
13676 echo "$as_me:13676: checking how to run the C++ preprocessor" >&5
13677 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
13678 if test -z "$CXXCPP"; then
13679   if test "${ac_cv_prog_CXXCPP+set}" = set; then
13680   echo $ECHO_N "(cached) $ECHO_C" >&6
13681 else
13682       # Double quotes because CXXCPP needs to be expanded
13683     for CXXCPP in "$CXX -E" "/lib/cpp"
13684     do
13685       ac_preproc_ok=false
13686 for ac_cxx_preproc_warn_flag in '' yes
13687 do
13688   # Use a header file that comes with gcc, so configuring glibc
13689   # with a fresh cross-compiler works.
13690   # On the NeXT, cc -E runs the code through the compiler's parser,
13691   # not just through cpp. "Syntax error" is here to catch this case.
13692   cat >conftest.$ac_ext <<_ACEOF
13693 #line 13693 "configure"
13694 #include "confdefs.h"
13695 #include <assert.h>
13696                      Syntax error
13697 _ACEOF
13698 if { (eval echo "$as_me:13698: \"$ac_cpp conftest.$ac_ext\"") >&5
13699   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13700   ac_status=$?
13701   egrep -v '^ *\+' conftest.er1 >conftest.err
13702   rm -f conftest.er1
13703   cat conftest.err >&5
13704   echo "$as_me:13704: \$? = $ac_status" >&5
13705   (exit $ac_status); } >/dev/null; then
13706   if test -s conftest.err; then
13707     ac_cpp_err=$ac_cxx_preproc_warn_flag
13708   else
13709     ac_cpp_err=
13710   fi
13711 else
13712   ac_cpp_err=yes
13713 fi
13714 if test -z "$ac_cpp_err"; then
13715   :
13716 else
13717   echo "$as_me: failed program was:" >&5
13718   cat conftest.$ac_ext >&5
13719   # Broken: fails on valid input.
13720 continue
13721 fi
13722 rm -f conftest.err conftest.$ac_ext
13723
13724   # OK, works on sane cases.  Now check whether non-existent headers
13725   # can be detected and how.
13726   cat >conftest.$ac_ext <<_ACEOF
13727 #line 13727 "configure"
13728 #include "confdefs.h"
13729 #include <ac_nonexistent.h>
13730 _ACEOF
13731 if { (eval echo "$as_me:13731: \"$ac_cpp conftest.$ac_ext\"") >&5
13732   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13733   ac_status=$?
13734   egrep -v '^ *\+' conftest.er1 >conftest.err
13735   rm -f conftest.er1
13736   cat conftest.err >&5
13737   echo "$as_me:13737: \$? = $ac_status" >&5
13738   (exit $ac_status); } >/dev/null; then
13739   if test -s conftest.err; then
13740     ac_cpp_err=$ac_cxx_preproc_warn_flag
13741   else
13742     ac_cpp_err=
13743   fi
13744 else
13745   ac_cpp_err=yes
13746 fi
13747 if test -z "$ac_cpp_err"; then
13748   # Broken: success on invalid input.
13749 continue
13750 else
13751   echo "$as_me: failed program was:" >&5
13752   cat conftest.$ac_ext >&5
13753   # Passes both tests.
13754 ac_preproc_ok=:
13755 break
13756 fi
13757 rm -f conftest.err conftest.$ac_ext
13758
13759 done
13760 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13761 rm -f conftest.err conftest.$ac_ext
13762 if $ac_preproc_ok; then
13763   break
13764 fi
13765
13766     done
13767     ac_cv_prog_CXXCPP=$CXXCPP
13768
13769 fi
13770   CXXCPP=$ac_cv_prog_CXXCPP
13771 else
13772   ac_cv_prog_CXXCPP=$CXXCPP
13773 fi
13774 echo "$as_me:13774: result: $CXXCPP" >&5
13775 echo "${ECHO_T}$CXXCPP" >&6
13776 ac_preproc_ok=false
13777 for ac_cxx_preproc_warn_flag in '' yes
13778 do
13779   # Use a header file that comes with gcc, so configuring glibc
13780   # with a fresh cross-compiler works.
13781   # On the NeXT, cc -E runs the code through the compiler's parser,
13782   # not just through cpp. "Syntax error" is here to catch this case.
13783   cat >conftest.$ac_ext <<_ACEOF
13784 #line 13784 "configure"
13785 #include "confdefs.h"
13786 #include <assert.h>
13787                      Syntax error
13788 _ACEOF
13789 if { (eval echo "$as_me:13789: \"$ac_cpp conftest.$ac_ext\"") >&5
13790   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13791   ac_status=$?
13792   egrep -v '^ *\+' conftest.er1 >conftest.err
13793   rm -f conftest.er1
13794   cat conftest.err >&5
13795   echo "$as_me:13795: \$? = $ac_status" >&5
13796   (exit $ac_status); } >/dev/null; then
13797   if test -s conftest.err; then
13798     ac_cpp_err=$ac_cxx_preproc_warn_flag
13799   else
13800     ac_cpp_err=
13801   fi
13802 else
13803   ac_cpp_err=yes
13804 fi
13805 if test -z "$ac_cpp_err"; then
13806   :
13807 else
13808   echo "$as_me: failed program was:" >&5
13809   cat conftest.$ac_ext >&5
13810   # Broken: fails on valid input.
13811 continue
13812 fi
13813 rm -f conftest.err conftest.$ac_ext
13814
13815   # OK, works on sane cases.  Now check whether non-existent headers
13816   # can be detected and how.
13817   cat >conftest.$ac_ext <<_ACEOF
13818 #line 13818 "configure"
13819 #include "confdefs.h"
13820 #include <ac_nonexistent.h>
13821 _ACEOF
13822 if { (eval echo "$as_me:13822: \"$ac_cpp conftest.$ac_ext\"") >&5
13823   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13824   ac_status=$?
13825   egrep -v '^ *\+' conftest.er1 >conftest.err
13826   rm -f conftest.er1
13827   cat conftest.err >&5
13828   echo "$as_me:13828: \$? = $ac_status" >&5
13829   (exit $ac_status); } >/dev/null; then
13830   if test -s conftest.err; then
13831     ac_cpp_err=$ac_cxx_preproc_warn_flag
13832   else
13833     ac_cpp_err=
13834   fi
13835 else
13836   ac_cpp_err=yes
13837 fi
13838 if test -z "$ac_cpp_err"; then
13839   # Broken: success on invalid input.
13840 continue
13841 else
13842   echo "$as_me: failed program was:" >&5
13843   cat conftest.$ac_ext >&5
13844   # Passes both tests.
13845 ac_preproc_ok=:
13846 break
13847 fi
13848 rm -f conftest.err conftest.$ac_ext
13849
13850 done
13851 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13852 rm -f conftest.err conftest.$ac_ext
13853 if $ac_preproc_ok; then
13854   :
13855 else
13856   { { echo "$as_me:13856: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
13857 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
13858    { (exit 1); exit 1; }; }
13859 fi
13860
13861 ac_ext=cc
13862 ac_cpp='$CXXCPP $CPPFLAGS'
13863 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13864 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13865 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13866 ac_main_return=return
13867
13868 for ac_header in typeinfo
13869 do
13870 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13871 echo "$as_me:13871: checking for $ac_header" >&5
13872 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13873 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13874   echo $ECHO_N "(cached) $ECHO_C" >&6
13875 else
13876   cat >conftest.$ac_ext <<_ACEOF
13877 #line 13877 "configure"
13878 #include "confdefs.h"
13879 #include <$ac_header>
13880 _ACEOF
13881 if { (eval echo "$as_me:13881: \"$ac_cpp conftest.$ac_ext\"") >&5
13882   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13883   ac_status=$?
13884   egrep -v '^ *\+' conftest.er1 >conftest.err
13885   rm -f conftest.er1
13886   cat conftest.err >&5
13887   echo "$as_me:13887: \$? = $ac_status" >&5
13888   (exit $ac_status); } >/dev/null; then
13889   if test -s conftest.err; then
13890     ac_cpp_err=$ac_cxx_preproc_warn_flag
13891   else
13892     ac_cpp_err=
13893   fi
13894 else
13895   ac_cpp_err=yes
13896 fi
13897 if test -z "$ac_cpp_err"; then
13898   eval "$as_ac_Header=yes"
13899 else
13900   echo "$as_me: failed program was:" >&5
13901   cat conftest.$ac_ext >&5
13902   eval "$as_ac_Header=no"
13903 fi
13904 rm -f conftest.err conftest.$ac_ext
13905 fi
13906 echo "$as_me:13906: result: `eval echo '${'$as_ac_Header'}'`" >&5
13907 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13908 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13909   cat >>confdefs.h <<EOF
13910 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13911 EOF
13912
13913 fi
13914 done
13915
13916 echo "$as_me:13916: checking if we should include stdbool.h" >&5
13917 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13918
13919 if test "${cf_cv_header_stdbool_h+set}" = set; then
13920   echo $ECHO_N "(cached) $ECHO_C" >&6
13921 else
13922
13923         cat >conftest.$ac_ext <<_ACEOF
13924 #line 13924 "configure"
13925 #include "confdefs.h"
13926
13927 int
13928 main ()
13929 {
13930 bool foo = false
13931   ;
13932   return 0;
13933 }
13934 _ACEOF
13935 rm -f conftest.$ac_objext
13936 if { (eval echo "$as_me:13936: \"$ac_compile\"") >&5
13937   (eval $ac_compile) 2>&5
13938   ac_status=$?
13939   echo "$as_me:13939: \$? = $ac_status" >&5
13940   (exit $ac_status); } &&
13941          { ac_try='test -s conftest.$ac_objext'
13942   { (eval echo "$as_me:13942: \"$ac_try\"") >&5
13943   (eval $ac_try) 2>&5
13944   ac_status=$?
13945   echo "$as_me:13945: \$? = $ac_status" >&5
13946   (exit $ac_status); }; }; then
13947   cf_cv_header_stdbool_h=0
13948 else
13949   echo "$as_me: failed program was:" >&5
13950 cat conftest.$ac_ext >&5
13951 cat >conftest.$ac_ext <<_ACEOF
13952 #line 13952 "configure"
13953 #include "confdefs.h"
13954
13955 #ifndef __BEOS__
13956 #include <stdbool.h>
13957 #endif
13958
13959 int
13960 main ()
13961 {
13962 bool foo = false
13963   ;
13964   return 0;
13965 }
13966 _ACEOF
13967 rm -f conftest.$ac_objext
13968 if { (eval echo "$as_me:13968: \"$ac_compile\"") >&5
13969   (eval $ac_compile) 2>&5
13970   ac_status=$?
13971   echo "$as_me:13971: \$? = $ac_status" >&5
13972   (exit $ac_status); } &&
13973          { ac_try='test -s conftest.$ac_objext'
13974   { (eval echo "$as_me:13974: \"$ac_try\"") >&5
13975   (eval $ac_try) 2>&5
13976   ac_status=$?
13977   echo "$as_me:13977: \$? = $ac_status" >&5
13978   (exit $ac_status); }; }; then
13979   cf_cv_header_stdbool_h=1
13980 else
13981   echo "$as_me: failed program was:" >&5
13982 cat conftest.$ac_ext >&5
13983 cf_cv_header_stdbool_h=0
13984 fi
13985 rm -f conftest.$ac_objext conftest.$ac_ext
13986 fi
13987 rm -f conftest.$ac_objext conftest.$ac_ext
13988 fi
13989
13990 if test "$cf_cv_header_stdbool_h" = 1
13991 then    echo "$as_me:13991: result: yes" >&5
13992 echo "${ECHO_T}yes" >&6
13993 else    echo "$as_me:13993: result: no" >&5
13994 echo "${ECHO_T}no" >&6
13995 fi
13996
13997 echo "$as_me:13997: checking for builtin bool type" >&5
13998 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
13999
14000 if test "${cf_cv_builtin_bool+set}" = set; then
14001   echo $ECHO_N "(cached) $ECHO_C" >&6
14002 else
14003
14004         cat >conftest.$ac_ext <<_ACEOF
14005 #line 14005 "configure"
14006 #include "confdefs.h"
14007
14008 #include <stdio.h>
14009 #include <sys/types.h>
14010
14011 int
14012 main ()
14013 {
14014 bool x = false
14015   ;
14016   return 0;
14017 }
14018 _ACEOF
14019 rm -f conftest.$ac_objext
14020 if { (eval echo "$as_me:14020: \"$ac_compile\"") >&5
14021   (eval $ac_compile) 2>&5
14022   ac_status=$?
14023   echo "$as_me:14023: \$? = $ac_status" >&5
14024   (exit $ac_status); } &&
14025          { ac_try='test -s conftest.$ac_objext'
14026   { (eval echo "$as_me:14026: \"$ac_try\"") >&5
14027   (eval $ac_try) 2>&5
14028   ac_status=$?
14029   echo "$as_me:14029: \$? = $ac_status" >&5
14030   (exit $ac_status); }; }; then
14031   cf_cv_builtin_bool=1
14032 else
14033   echo "$as_me: failed program was:" >&5
14034 cat conftest.$ac_ext >&5
14035 cf_cv_builtin_bool=0
14036 fi
14037 rm -f conftest.$ac_objext conftest.$ac_ext
14038
14039 fi
14040
14041 if test "$cf_cv_builtin_bool" = 1
14042 then    echo "$as_me:14042: result: yes" >&5
14043 echo "${ECHO_T}yes" >&6
14044 else    echo "$as_me:14044: result: no" >&5
14045 echo "${ECHO_T}no" >&6
14046 fi
14047
14048 echo "$as_me:14048: checking for size of bool" >&5
14049 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14050 if test "${cf_cv_type_of_bool+set}" = set; then
14051   echo $ECHO_N "(cached) $ECHO_C" >&6
14052 else
14053
14054         rm -f cf_test.out
14055         if test "$cross_compiling" = yes; then
14056   cf_cv_type_of_bool=unknown
14057 else
14058   cat >conftest.$ac_ext <<_ACEOF
14059 #line 14059 "configure"
14060 #include "confdefs.h"
14061
14062 #include <stdlib.h>
14063 #include <stdio.h>
14064
14065 #if defined(__cplusplus)
14066
14067 #ifdef HAVE_GXX_BUILTIN_H
14068 #include <g++/builtin.h>
14069 #elif HAVE_GPP_BUILTIN_H
14070 #include <gpp/builtin.h>
14071 #elif HAVE_BUILTIN_H
14072 #include <builtin.h>
14073 #endif
14074
14075 #else
14076
14077 #if $cf_cv_header_stdbool_h
14078 #include <stdbool.h>
14079 #endif
14080
14081 #endif
14082
14083 main()
14084 {
14085         FILE *fp = fopen("cf_test.out", "w");
14086         if (fp != 0) {
14087                 bool x = true;
14088                 if ((bool)(-x) >= 0)
14089                         fputs("unsigned ", fp);
14090                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14091                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14092                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14093                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14094                 fclose(fp);
14095         }
14096         ${cf_cv_main_return:-return}(0);
14097 }
14098
14099 _ACEOF
14100 rm -f conftest$ac_exeext
14101 if { (eval echo "$as_me:14101: \"$ac_link\"") >&5
14102   (eval $ac_link) 2>&5
14103   ac_status=$?
14104   echo "$as_me:14104: \$? = $ac_status" >&5
14105   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14106   { (eval echo "$as_me:14106: \"$ac_try\"") >&5
14107   (eval $ac_try) 2>&5
14108   ac_status=$?
14109   echo "$as_me:14109: \$? = $ac_status" >&5
14110   (exit $ac_status); }; }; then
14111   cf_cv_type_of_bool=`cat cf_test.out`
14112                  if test -z "$cf_cv_type_of_bool"; then
14113                    cf_cv_type_of_bool=unknown
14114                  fi
14115 else
14116   echo "$as_me: program exited with status $ac_status" >&5
14117 echo "$as_me: failed program was:" >&5
14118 cat conftest.$ac_ext >&5
14119 cf_cv_type_of_bool=unknown
14120 fi
14121 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14122 fi
14123
14124 fi
14125
14126         rm -f cf_test.out
14127 echo "$as_me:14127: result: $cf_cv_type_of_bool" >&5
14128 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14129 if test "$cf_cv_type_of_bool" = unknown ; then
14130         case .$NCURSES_BOOL in #(vi
14131         .auto|.) NCURSES_BOOL=unsigned;;
14132         esac
14133         { echo "$as_me:14133: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14134 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14135         cf_cv_type_of_bool=$NCURSES_BOOL
14136 fi
14137
14138 echo "$as_me:14138: checking for special defines needed for etip.h" >&5
14139 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
14140 cf_save_CXXFLAGS="$CXXFLAGS"
14141 cf_result="none"
14142 for cf_math in "" MATH_H
14143 do
14144 for cf_excp in "" MATH_EXCEPTION
14145 do
14146         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
14147         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
14148         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
14149 cat >conftest.$ac_ext <<_ACEOF
14150 #line 14150 "configure"
14151 #include "confdefs.h"
14152
14153 #include <etip.h.in>
14154
14155 int
14156 main ()
14157 {
14158
14159   ;
14160   return 0;
14161 }
14162 _ACEOF
14163 rm -f conftest.$ac_objext
14164 if { (eval echo "$as_me:14164: \"$ac_compile\"") >&5
14165   (eval $ac_compile) 2>&5
14166   ac_status=$?
14167   echo "$as_me:14167: \$? = $ac_status" >&5
14168   (exit $ac_status); } &&
14169          { ac_try='test -s conftest.$ac_objext'
14170   { (eval echo "$as_me:14170: \"$ac_try\"") >&5
14171   (eval $ac_try) 2>&5
14172   ac_status=$?
14173   echo "$as_me:14173: \$? = $ac_status" >&5
14174   (exit $ac_status); }; }; then
14175
14176         test -n "$cf_math" && cat >>confdefs.h <<EOF
14177 #define ETIP_NEEDS_${cf_math} 1
14178 EOF
14179
14180         test -n "$cf_excp" && cat >>confdefs.h <<EOF
14181 #define ETIP_NEEDS_${cf_excp} 1
14182 EOF
14183
14184         cf_result="$cf_math $cf_excp"
14185         break
14186
14187 else
14188   echo "$as_me: failed program was:" >&5
14189 cat conftest.$ac_ext >&5
14190 fi
14191 rm -f conftest.$ac_objext conftest.$ac_ext
14192 done
14193 done
14194 echo "$as_me:14194: result: $cf_result" >&5
14195 echo "${ECHO_T}$cf_result" >&6
14196 CXXFLAGS="$cf_save_CXXFLAGS"
14197
14198 if test -n "$CXX"; then
14199 echo "$as_me:14199: checking if $CXX accepts parameter initialization" >&5
14200 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
14201 if test "${cf_cv_cpp_param_init+set}" = set; then
14202   echo $ECHO_N "(cached) $ECHO_C" >&6
14203 else
14204
14205         ac_ext=cc
14206 ac_cpp='$CXXCPP $CPPFLAGS'
14207 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14208 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14209 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14210 ac_main_return=return
14211
14212         if test "$cross_compiling" = yes; then
14213   cf_cv_cpp_param_init=unknown
14214 else
14215   cat >conftest.$ac_ext <<_ACEOF
14216 #line 14216 "configure"
14217 #include "confdefs.h"
14218
14219 class TEST {
14220 private:
14221         int value;
14222 public:
14223         TEST(int x = 1);
14224         ~TEST();
14225 };
14226
14227 TEST::TEST(int x = 1)   // some compilers do not like second initializer
14228 {
14229         value = x;
14230 }
14231 void main() { }
14232
14233 _ACEOF
14234 rm -f conftest$ac_exeext
14235 if { (eval echo "$as_me:14235: \"$ac_link\"") >&5
14236   (eval $ac_link) 2>&5
14237   ac_status=$?
14238   echo "$as_me:14238: \$? = $ac_status" >&5
14239   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14240   { (eval echo "$as_me:14240: \"$ac_try\"") >&5
14241   (eval $ac_try) 2>&5
14242   ac_status=$?
14243   echo "$as_me:14243: \$? = $ac_status" >&5
14244   (exit $ac_status); }; }; then
14245   cf_cv_cpp_param_init=yes
14246 else
14247   echo "$as_me: program exited with status $ac_status" >&5
14248 echo "$as_me: failed program was:" >&5
14249 cat conftest.$ac_ext >&5
14250 cf_cv_cpp_param_init=no
14251 fi
14252 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14253 fi
14254         ac_ext=cc
14255 ac_cpp='$CXXCPP $CPPFLAGS'
14256 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14257 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14258 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14259 ac_main_return=return
14260
14261 fi
14262 echo "$as_me:14262: result: $cf_cv_cpp_param_init" >&5
14263 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
14264 fi
14265 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
14266 #define CPP_HAS_PARAM_INIT 1
14267 EOF
14268
14269 if test -n "$CXX"; then
14270
14271 echo "$as_me:14271: checking if $CXX accepts static_cast" >&5
14272 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
14273 if test "${cf_cv_cpp_static_cast+set}" = set; then
14274   echo $ECHO_N "(cached) $ECHO_C" >&6
14275 else
14276
14277         ac_ext=cc
14278 ac_cpp='$CXXCPP $CPPFLAGS'
14279 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14280 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14281 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14282 ac_main_return=return
14283
14284         cat >conftest.$ac_ext <<_ACEOF
14285 #line 14285 "configure"
14286 #include "confdefs.h"
14287
14288 class NCursesPanel
14289 {
14290 public:
14291   NCursesPanel(int nlines,
14292                int ncols,
14293                int begin_y = 0,
14294                int begin_x = 0)
14295   {
14296   }
14297
14298   ~NCursesPanel();
14299 };
14300
14301 template<class T> class NCursesUserPanel : public NCursesPanel
14302 {
14303 public:
14304   NCursesUserPanel (int nlines,
14305                     int ncols,
14306                     int begin_y = 0,
14307                     int begin_x = 0,
14308                     const T* p_UserData = static_cast<T*>(0))
14309     : NCursesPanel (nlines, ncols, begin_y, begin_x)
14310   {
14311   };
14312   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
14313   {
14314   };
14315
14316   virtual ~NCursesUserPanel() {};
14317 };
14318
14319 int
14320 main ()
14321 {
14322
14323         const char* p_UserData = static_cast<char*>(0)
14324   ;
14325   return 0;
14326 }
14327 _ACEOF
14328 rm -f conftest.$ac_objext
14329 if { (eval echo "$as_me:14329: \"$ac_compile\"") >&5
14330   (eval $ac_compile) 2>&5
14331   ac_status=$?
14332   echo "$as_me:14332: \$? = $ac_status" >&5
14333   (exit $ac_status); } &&
14334          { ac_try='test -s conftest.$ac_objext'
14335   { (eval echo "$as_me:14335: \"$ac_try\"") >&5
14336   (eval $ac_try) 2>&5
14337   ac_status=$?
14338   echo "$as_me:14338: \$? = $ac_status" >&5
14339   (exit $ac_status); }; }; then
14340   cf_cv_cpp_static_cast=yes
14341 else
14342   echo "$as_me: failed program was:" >&5
14343 cat conftest.$ac_ext >&5
14344 cf_cv_cpp_static_cast=no
14345 fi
14346 rm -f conftest.$ac_objext conftest.$ac_ext
14347
14348         ac_ext=cc
14349 ac_cpp='$CXXCPP $CPPFLAGS'
14350 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14351 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14352 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14353 ac_main_return=return
14354
14355 fi
14356 echo "$as_me:14356: result: $cf_cv_cpp_static_cast" >&5
14357 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
14358
14359 fi
14360
14361 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
14362 #define CPP_HAS_STATIC_CAST 1
14363 EOF
14364
14365 if test -n "$CXX"; then
14366
14367 ac_ext=cc
14368 ac_cpp='$CXXCPP $CPPFLAGS'
14369 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14370 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14371 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14372 ac_main_return=return
14373
14374 for ac_header in strstream.h
14375 do
14376 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14377 echo "$as_me:14377: checking for $ac_header" >&5
14378 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14379 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14380   echo $ECHO_N "(cached) $ECHO_C" >&6
14381 else
14382   cat >conftest.$ac_ext <<_ACEOF
14383 #line 14383 "configure"
14384 #include "confdefs.h"
14385 #include <$ac_header>
14386 _ACEOF
14387 if { (eval echo "$as_me:14387: \"$ac_cpp conftest.$ac_ext\"") >&5
14388   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14389   ac_status=$?
14390   egrep -v '^ *\+' conftest.er1 >conftest.err
14391   rm -f conftest.er1
14392   cat conftest.err >&5
14393   echo "$as_me:14393: \$? = $ac_status" >&5
14394   (exit $ac_status); } >/dev/null; then
14395   if test -s conftest.err; then
14396     ac_cpp_err=$ac_cxx_preproc_warn_flag
14397   else
14398     ac_cpp_err=
14399   fi
14400 else
14401   ac_cpp_err=yes
14402 fi
14403 if test -z "$ac_cpp_err"; then
14404   eval "$as_ac_Header=yes"
14405 else
14406   echo "$as_me: failed program was:" >&5
14407   cat conftest.$ac_ext >&5
14408   eval "$as_ac_Header=no"
14409 fi
14410 rm -f conftest.err conftest.$ac_ext
14411 fi
14412 echo "$as_me:14412: result: `eval echo '${'$as_ac_Header'}'`" >&5
14413 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14414 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14415   cat >>confdefs.h <<EOF
14416 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14417 EOF
14418
14419 fi
14420 done
14421
14422 echo "$as_me:14422: checking if $CXX supports vscan function" >&5
14423 echo $ECHO_N "checking if $CXX supports vscan function... $ECHO_C" >&6
14424 if test "${cf_cv_cpp_vscan_func+set}" = set; then
14425   echo $ECHO_N "(cached) $ECHO_C" >&6
14426 else
14427
14428         for cf_vscan_func in strstream strstream_cast stdio
14429         do
14430         case $cf_vscan_func in #(vi
14431         stdio)          cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi
14432         strstream)      cf_vscan_defs=USE_STRSTREAM_VSCAN ;;
14433         strstream_cast) cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;;
14434         esac
14435         cat >conftest.$ac_ext <<_ACEOF
14436 #line 14436 "configure"
14437 #include "confdefs.h"
14438
14439 #include <stdio.h>
14440 #include <stdarg.h>
14441 #define $cf_vscan_defs 1
14442 #if defined(USE_STDIO_VSCAN)
14443 #elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN)
14444 #include <strstream.h>
14445 #endif
14446
14447 int scanw(const char* fmt, ...)
14448 {
14449     int result = -1;
14450     char buf[BUFSIZ];
14451
14452     va_list args;
14453     va_start(args, fmt);
14454 #if defined(USE_STDIO_VSCAN)
14455     if (::vsscanf(buf, fmt, args) != -1)
14456         result = 0;
14457 #elif defined(USE_STRSTREAM_VSCAN)
14458     strstreambuf ss(buf, sizeof(buf));
14459     if (ss.vscan(fmt, args) != -1)
14460         result = 0;
14461 #elif defined(USE_STRSTREAM_VSCAN_CAST)
14462     strstreambuf ss(buf, sizeof(buf));
14463     if (ss.vscan(fmt, (_IO_va_list)args) != -1)
14464         result = 0;
14465 #else
14466 #error case $cf_vscan_func failed
14467 #endif
14468     va_end(args);
14469     return result;
14470 }
14471
14472 int
14473 main ()
14474 {
14475 int tmp, foo = scanw("%d", &tmp)
14476   ;
14477   return 0;
14478 }
14479 _ACEOF
14480 rm -f conftest.$ac_objext conftest$ac_exeext
14481 if { (eval echo "$as_me:14481: \"$ac_link\"") >&5
14482   (eval $ac_link) 2>&5
14483   ac_status=$?
14484   echo "$as_me:14484: \$? = $ac_status" >&5
14485   (exit $ac_status); } &&
14486          { ac_try='test -s conftest$ac_exeext'
14487   { (eval echo "$as_me:14487: \"$ac_try\"") >&5
14488   (eval $ac_try) 2>&5
14489   ac_status=$?
14490   echo "$as_me:14490: \$? = $ac_status" >&5
14491   (exit $ac_status); }; }; then
14492   cf_cv_cpp_vscan_func=$cf_vscan_func; break
14493 else
14494   echo "$as_me: failed program was:" >&5
14495 cat conftest.$ac_ext >&5
14496 cf_cv_cpp_vscan_func=no
14497 fi
14498 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14499         test "$cf_cv_cpp_vscan_func" != no && break
14500         done
14501
14502 fi
14503 echo "$as_me:14503: result: $cf_cv_cpp_vscan_func" >&5
14504 echo "${ECHO_T}$cf_cv_cpp_vscan_func" >&6
14505
14506 ac_ext=cc
14507 ac_cpp='$CXXCPP $CPPFLAGS'
14508 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14509 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14510 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14511 ac_main_return=return
14512
14513 fi
14514
14515 case $cf_cv_cpp_vscan_func in #(vi
14516 stdio) #(vi
14517         cat >>confdefs.h <<\EOF
14518 #define CPP_HAS_VSCAN_FUNC 1
14519 EOF
14520
14521         cat >>confdefs.h <<\EOF
14522 #define USE_STDIO_VSCAN 1
14523 EOF
14524
14525         ;;
14526 strstream)
14527         cat >>confdefs.h <<\EOF
14528 #define CPP_HAS_VSCAN_FUNC 1
14529 EOF
14530
14531         cat >>confdefs.h <<\EOF
14532 #define USE_STRSTREAM_VSCAN 1
14533 EOF
14534
14535         ;;
14536 strstream_cast)
14537         cat >>confdefs.h <<\EOF
14538 #define CPP_HAS_VSCAN_FUNC 1
14539 EOF
14540
14541         cat >>confdefs.h <<\EOF
14542 #define USE_STRSTREAM_VSCAN_CAST 1
14543 EOF
14544
14545         ;;
14546 esac
14547
14548         CXX_AR='$(AR)'
14549         CXX_AR_OPTS='$(AR_OPTS)'
14550         case $cf_cv_system_name in #(vi
14551         irix*) #(vi
14552             if test "$GXX" != yes ; then
14553                 CXX_AR='$(CXX)'
14554                 CXX_AR_OPTS='-ar -o'
14555             fi
14556             ;;
14557         sco3.2v5*) #(vi
14558             CXXLDFLAGS="-u main"
14559             ;;
14560         solaris2*)
14561             if test "$GXX" != yes ; then
14562                 CXX_AR='$(CXX)'
14563                 CXX_AR_OPTS='-xar -o'
14564             fi
14565             ;;
14566         esac
14567
14568 else
14569         cf_cxx_library=no
14570         cf_cv_builtin_bool=1
14571
14572         # Just because we are not configuring against C++ right now does not
14573         # mean that a user will not want to use C++.  Some distributors disable
14574         # the C++ portion of this configuration as a shortcut (or just to avoid
14575         # compiling the demo in the c++ directory).  So we need a reasonable
14576         # default for the 'bool' type.
14577         #
14578         # Caveat: since the storage of the bool type is not standardized, it
14579         # may change.
14580
14581         if test "$NCURSES_BOOL" != auto ; then
14582                 cf_cv_type_of_bool=$NCURSES_BOOL
14583                 cf_cv_header_stdbool_h=0
14584         else
14585                 if test "$cf_cv_header_stdbool_h" = 1 ; then
14586
14587 echo "$as_me:14587: checking for size of bool" >&5
14588 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14589 if test "${cf_cv_type_of_bool+set}" = set; then
14590   echo $ECHO_N "(cached) $ECHO_C" >&6
14591 else
14592
14593         rm -f cf_test.out
14594         if test "$cross_compiling" = yes; then
14595   cf_cv_type_of_bool=unknown
14596 else
14597   cat >conftest.$ac_ext <<_ACEOF
14598 #line 14598 "configure"
14599 #include "confdefs.h"
14600
14601 #include <stdlib.h>
14602 #include <stdio.h>
14603
14604 #if defined(__cplusplus)
14605
14606 #ifdef HAVE_GXX_BUILTIN_H
14607 #include <g++/builtin.h>
14608 #elif HAVE_GPP_BUILTIN_H
14609 #include <gpp/builtin.h>
14610 #elif HAVE_BUILTIN_H
14611 #include <builtin.h>
14612 #endif
14613
14614 #else
14615
14616 #if $cf_cv_header_stdbool_h
14617 #include <stdbool.h>
14618 #endif
14619
14620 #endif
14621
14622 main()
14623 {
14624         FILE *fp = fopen("cf_test.out", "w");
14625         if (fp != 0) {
14626                 bool x = true;
14627                 if ((bool)(-x) >= 0)
14628                         fputs("unsigned ", fp);
14629                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14630                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14631                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14632                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14633                 fclose(fp);
14634         }
14635         ${cf_cv_main_return:-return}(0);
14636 }
14637
14638 _ACEOF
14639 rm -f conftest$ac_exeext
14640 if { (eval echo "$as_me:14640: \"$ac_link\"") >&5
14641   (eval $ac_link) 2>&5
14642   ac_status=$?
14643   echo "$as_me:14643: \$? = $ac_status" >&5
14644   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14645   { (eval echo "$as_me:14645: \"$ac_try\"") >&5
14646   (eval $ac_try) 2>&5
14647   ac_status=$?
14648   echo "$as_me:14648: \$? = $ac_status" >&5
14649   (exit $ac_status); }; }; then
14650   cf_cv_type_of_bool=`cat cf_test.out`
14651                  if test -z "$cf_cv_type_of_bool"; then
14652                    cf_cv_type_of_bool=unknown
14653                  fi
14654 else
14655   echo "$as_me: program exited with status $ac_status" >&5
14656 echo "$as_me: failed program was:" >&5
14657 cat conftest.$ac_ext >&5
14658 cf_cv_type_of_bool=unknown
14659 fi
14660 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14661 fi
14662
14663 fi
14664
14665         rm -f cf_test.out
14666 echo "$as_me:14666: result: $cf_cv_type_of_bool" >&5
14667 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14668 if test "$cf_cv_type_of_bool" = unknown ; then
14669         case .$NCURSES_BOOL in #(vi
14670         .auto|.) NCURSES_BOOL=unsigned;;
14671         esac
14672         { echo "$as_me:14672: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14673 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14674         cf_cv_type_of_bool=$NCURSES_BOOL
14675 fi
14676
14677                 else
14678                         echo "$as_me:14678: checking for fallback type of bool" >&5
14679 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
14680                         case "$host_cpu" in #(vi
14681                         i?86)   cf_cv_type_of_bool=char ;; #(vi
14682                         *)      cf_cv_type_of_bool=int  ;;
14683                         esac
14684                         echo "$as_me:14684: result: $cf_cv_type_of_bool" >&5
14685 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14686                 fi
14687         fi
14688 fi
14689
14690 # If the C compiler did not declare bool, and we did not determine that the C++
14691 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
14692 # ncurses library use the same type as C++ bool.  Note that this allows one to
14693 # specify the type of bool in a configure-script option and postpone
14694 # integration with the C++ compiler provided that the types are compatible.
14695 USE_CXX_BOOL=1
14696 if test $cf_cv_cc_bool_type = 1
14697 then
14698         # oops: C has a bool.  Unlikely, but C++ could differ.
14699         USE_CXX_BOOL=0
14700 elif test $cf_cv_builtin_bool = 0
14701 then
14702         # C++ has no bool
14703         USE_CXX_BOOL=0
14704 else
14705         # this is the normal case
14706         USE_CXX_BOOL='defined(__cplusplus)'
14707 fi
14708
14709 if test -f "${srcdir}/Ada95/Makefile.in" ; then
14710 if test "$cf_with_ada" != "no" ; then
14711 cf_ada_make=gnatmake
14712 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
14713 set dummy $cf_ada_make; ac_word=$2
14714 echo "$as_me:14714: checking for $ac_word" >&5
14715 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14716 if test "${ac_cv_prog_gnat_exists+set}" = set; then
14717   echo $ECHO_N "(cached) $ECHO_C" >&6
14718 else
14719   if test -n "$gnat_exists"; then
14720   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
14721 else
14722   ac_save_IFS=$IFS; IFS=$ac_path_separator
14723 ac_dummy="$PATH"
14724 for ac_dir in $ac_dummy; do
14725   IFS=$ac_save_IFS
14726   test -z "$ac_dir" && ac_dir=.
14727   $as_executable_p "$ac_dir/$ac_word" || continue
14728 ac_cv_prog_gnat_exists="yes"
14729 echo "$as_me:14729: found $ac_dir/$ac_word" >&5
14730 break
14731 done
14732
14733   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
14734 fi
14735 fi
14736 gnat_exists=$ac_cv_prog_gnat_exists
14737 if test -n "$gnat_exists"; then
14738   echo "$as_me:14738: result: $gnat_exists" >&5
14739 echo "${ECHO_T}$gnat_exists" >&6
14740 else
14741   echo "$as_me:14741: result: no" >&5
14742 echo "${ECHO_T}no" >&6
14743 fi
14744
14745 if test "$ac_cv_prog_gnat_exists" = no; then
14746    cf_ada_make=
14747 else
14748
14749 echo "$as_me:14749: checking for gnat version" >&5
14750 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
14751 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
14752   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
14753 echo "$as_me:14753: result: $cf_gnat_version" >&5
14754 echo "${ECHO_T}$cf_gnat_version" >&6
14755
14756 case $cf_gnat_version in
14757   3.1[1-9]*|3.[2-9]*|[4-9].*)
14758     cf_cv_prog_gnat_correct=yes
14759     ;;
14760   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
14761      cf_cv_prog_gnat_correct=no
14762      ;;
14763 esac
14764 case $cf_gnat_version in
14765   3.[1-9]*|[4-9].*)
14766       cf_compile_generics=generics
14767       cf_generic_objects="\${GENOBJS}"
14768       ;;
14769   *)  cf_compile_generics=
14770       cf_generic_objects=
14771       ;;
14772 esac
14773
14774    # Extract the first word of "m4", so it can be a program name with args.
14775 set dummy m4; ac_word=$2
14776 echo "$as_me:14776: checking for $ac_word" >&5
14777 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14778 if test "${ac_cv_prog_M4_exists+set}" = set; then
14779   echo $ECHO_N "(cached) $ECHO_C" >&6
14780 else
14781   if test -n "$M4_exists"; then
14782   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
14783 else
14784   ac_save_IFS=$IFS; IFS=$ac_path_separator
14785 ac_dummy="$PATH"
14786 for ac_dir in $ac_dummy; do
14787   IFS=$ac_save_IFS
14788   test -z "$ac_dir" && ac_dir=.
14789   $as_executable_p "$ac_dir/$ac_word" || continue
14790 ac_cv_prog_M4_exists="yes"
14791 echo "$as_me:14791: found $ac_dir/$ac_word" >&5
14792 break
14793 done
14794
14795   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
14796 fi
14797 fi
14798 M4_exists=$ac_cv_prog_M4_exists
14799 if test -n "$M4_exists"; then
14800   echo "$as_me:14800: result: $M4_exists" >&5
14801 echo "${ECHO_T}$M4_exists" >&6
14802 else
14803   echo "$as_me:14803: result: no" >&5
14804 echo "${ECHO_T}no" >&6
14805 fi
14806
14807    if test "$ac_cv_prog_M4_exists" = no; then
14808       cf_cv_prog_gnat_correct=no
14809       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
14810    fi
14811    if test "$cf_cv_prog_gnat_correct" = yes; then
14812       echo "$as_me:14812: checking if GNAT works" >&5
14813 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
14814
14815 rm -f conftest*
14816 cat >>conftest.ads <<CF_EOF
14817 procedure conftest;
14818 CF_EOF
14819 cat >>conftest.adb <<CF_EOF
14820 with Text_IO;
14821 with GNAT.OS_Lib;
14822 procedure conftest is
14823 begin
14824    Text_IO.Put ("Hello World");
14825    Text_IO.New_Line;
14826    GNAT.OS_Lib.OS_Exit (0);
14827 end conftest;
14828 CF_EOF
14829 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14830    if ( ./conftest 1>&5 2>&1 ) ; then
14831       cf_cv_prog_gnat_correct=yes
14832    else
14833       cf_cv_prog_gnat_correct=no
14834    fi
14835 else
14836    cf_cv_prog_gnat_correct=no
14837 fi
14838 rm -f conftest*
14839
14840       echo "$as_me:14840: result: $cf_cv_prog_gnat_correct" >&5
14841 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
14842    fi
14843 fi
14844 if test "$cf_cv_prog_gnat_correct" = yes; then
14845    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
14846
14847    echo "$as_me:14847: checking if GNAT pragma Unreferenced works" >&5
14848 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
14849
14850 rm -f conftest*
14851 cat >>conftest.ads <<CF_EOF
14852 procedure conftest;
14853 CF_EOF
14854 cat >>conftest.adb <<CF_EOF
14855 with Text_IO;
14856 with GNAT.OS_Lib;
14857 procedure conftest is
14858    test : Integer;
14859    pragma Unreferenced (test);
14860 begin
14861    test := 1;
14862    Text_IO.Put ("Hello World");
14863    Text_IO.New_Line;
14864    GNAT.OS_Lib.OS_Exit (0);
14865 end conftest;
14866 CF_EOF
14867 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14868       cf_cv_pragma_unreferenced=yes
14869 else
14870    cf_cv_pragma_unreferenced=no
14871 fi
14872 rm -f conftest*
14873
14874    echo "$as_me:14874: result: $cf_cv_pragma_unreferenced" >&5
14875 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
14876
14877    # if the pragma is supported, use it (needed in the Trace code).
14878    if test $cf_cv_pragma_unreferenced = yes ; then
14879       PRAGMA_UNREF=TRUE
14880    else
14881       PRAGMA_UNREF=FALSE
14882    fi
14883
14884 # Check whether --with-ada-compiler or --without-ada-compiler was given.
14885 if test "${with_ada_compiler+set}" = set; then
14886   withval="$with_ada_compiler"
14887   cf_ada_compiler=$withval
14888 else
14889   cf_ada_compiler=gnatmake
14890 fi;
14891
14892    cf_ada_package=terminal_interface
14893
14894 # Check whether --with-ada-include or --without-ada-include was given.
14895 if test "${with_ada_include+set}" = set; then
14896   withval="$with_ada_include"
14897
14898 else
14899   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
14900 fi;
14901 if test "x$prefix" != xNONE; then
14902   cf_path_syntax="$prefix"
14903 else
14904   cf_path_syntax="$ac_default_prefix"
14905 fi
14906
14907 case ".$withval" in #(vi
14908 .\$\(*\)*|.\'*\'*) #(vi
14909   ;;
14910 ..|./*|.\\*) #(vi
14911   ;;
14912 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14913   ;;
14914 .\${*prefix}*) #(vi
14915   eval withval="$withval"
14916   case ".$withval" in #(vi
14917   .NONE/*)
14918     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14919     ;;
14920   esac
14921   ;; #(vi
14922 .no|.NONE/*)
14923   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14924   ;;
14925 *)
14926   { { echo "$as_me:14926: error: expected a pathname, not \"$withval\"" >&5
14927 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14928    { (exit 1); exit 1; }; }
14929   ;;
14930 esac
14931
14932 ADA_INCLUDE="$withval"
14933
14934 # Check whether --with-ada-objects or --without-ada-objects was given.
14935 if test "${with_ada_objects+set}" = set; then
14936   withval="$with_ada_objects"
14937
14938 else
14939   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
14940 fi;
14941 if test "x$prefix" != xNONE; then
14942   cf_path_syntax="$prefix"
14943 else
14944   cf_path_syntax="$ac_default_prefix"
14945 fi
14946
14947 case ".$withval" in #(vi
14948 .\$\(*\)*|.\'*\'*) #(vi
14949   ;;
14950 ..|./*|.\\*) #(vi
14951   ;;
14952 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14953   ;;
14954 .\${*prefix}*) #(vi
14955   eval withval="$withval"
14956   case ".$withval" in #(vi
14957   .NONE/*)
14958     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14959     ;;
14960   esac
14961   ;; #(vi
14962 .no|.NONE/*)
14963   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14964   ;;
14965 *)
14966   { { echo "$as_me:14966: error: expected a pathname, not \"$withval\"" >&5
14967 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14968    { (exit 1); exit 1; }; }
14969   ;;
14970 esac
14971
14972 ADA_OBJECTS="$withval"
14973
14974 fi
14975 fi
14976 fi
14977
14978 ### Construct the library-subsets, if any, from this set of keywords:
14979 ### none, base, ext_funcs, ext_tinfo, termlib, widechar (see CF_LIB_RULES).
14980 echo "$as_me:14980: checking for library subsets" >&5
14981 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
14982 if test "$with_termlib" != no ; then
14983         LIB_SUBSETS="termlib"
14984         test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
14985         LIB_SUBSETS="${LIB_SUBSETS} "
14986 else
14987         LIB_SUBSETS="termlib+"
14988         test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}ext_tinfo+"
14989 fi
14990 LIB_SUBSETS="${LIB_SUBSETS}base"
14991 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
14992 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
14993 echo "$as_me:14993: result: $LIB_SUBSETS" >&5
14994 echo "${ECHO_T}$LIB_SUBSETS" >&6
14995
14996 ### Construct the list of include-directories to be generated
14997
14998 CPPFLAGS="-I. -I../include $CPPFLAGS"
14999 if test "$srcdir" != "."; then
15000         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15001 fi
15002 if test "$GCC" != yes; then
15003         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15004 elif test "$includedir" != "/usr/include"; then
15005         if test "$includedir" = '${prefix}/include' ; then
15006                 if test $prefix != /usr ; then
15007                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15008                 fi
15009         else
15010                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
15011         fi
15012 fi
15013
15014 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
15015 if test "$srcdir" != "."; then
15016         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15017 fi
15018 if test "$GCC" != yes; then
15019         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15020 elif test "$includedir" != "/usr/include"; then
15021         if test "$includedir" = '${prefix}/include' ; then
15022                 if test $prefix != /usr ; then
15023                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15024                 fi
15025         else
15026                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15027         fi
15028 fi
15029
15030 ### Build up pieces for makefile rules
15031 echo "$as_me:15031: checking default library suffix" >&5
15032 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15033
15034         case $DFT_LWR_MODEL in
15035         libtool) DFT_ARG_SUFFIX=''   ;;
15036         normal)  DFT_ARG_SUFFIX=''   ;;
15037         debug)   DFT_ARG_SUFFIX='_g' ;;
15038         profile) DFT_ARG_SUFFIX='_p' ;;
15039         shared)  DFT_ARG_SUFFIX=''   ;;
15040         esac
15041         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15042 echo "$as_me:15042: result: $DFT_ARG_SUFFIX" >&5
15043 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15044
15045 echo "$as_me:15045: checking default library-dependency suffix" >&5
15046 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15047
15048         case $DFT_LWR_MODEL in
15049         libtool) DFT_DEP_SUFFIX='.la'  ;;
15050         normal)  DFT_DEP_SUFFIX='.a'   ;;
15051         debug)   DFT_DEP_SUFFIX='_g.a' ;;
15052         profile) DFT_DEP_SUFFIX='_p.a' ;;
15053         shared)
15054                 case $cf_cv_system_name in
15055                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
15056                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
15057                 hpux*)
15058                         case $target in
15059                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
15060                         *)      DFT_DEP_SUFFIX='.sl' ;;
15061                         esac
15062                         ;;
15063                 *)      DFT_DEP_SUFFIX='.so'  ;;
15064                 esac
15065         esac
15066         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
15067 if test $DFT_LWR_MODEL = shared ; then
15068         case $cf_cv_system_name in #(vi
15069         cygwin*)
15070                 DFT_DEP_SUFFIX=".dll.a"
15071                 ;;
15072         esac
15073 fi
15074 echo "$as_me:15074: result: $DFT_DEP_SUFFIX" >&5
15075 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15076
15077 echo "$as_me:15077: checking default object directory" >&5
15078 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15079
15080         case $DFT_LWR_MODEL in
15081         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
15082         normal)  DFT_OBJ_SUBDIR='objects' ;;
15083         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
15084         profile) DFT_OBJ_SUBDIR='obj_p' ;;
15085         shared)
15086                 case $cf_cv_system_name in #(vi
15087                 cygwin) #(vi
15088                         DFT_OBJ_SUBDIR='objects' ;;
15089                 *)
15090                         DFT_OBJ_SUBDIR='obj_s' ;;
15091                 esac
15092         esac
15093 echo "$as_me:15093: result: $DFT_OBJ_SUBDIR" >&5
15094 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15095
15096 # libtool thinks it can make c++ shared libraries (perhaps only g++)
15097 if test "$cf_with_cxx" = yes ; then
15098 echo "$as_me:15098: checking c++ library-dependency suffix" >&5
15099 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
15100 if test "$with_libtool" != "no"; then
15101         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15102 else
15103
15104         case normal in
15105         libtool) CXX_LIB_SUFFIX='.la'  ;;
15106         normal)  CXX_LIB_SUFFIX='.a'   ;;
15107         debug)   CXX_LIB_SUFFIX='_g.a' ;;
15108         profile) CXX_LIB_SUFFIX='_p.a' ;;
15109         shared)
15110                 case $cf_cv_system_name in
15111                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
15112                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
15113                 hpux*)
15114                         case $target in
15115                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
15116                         *)      CXX_LIB_SUFFIX='.sl' ;;
15117                         esac
15118                         ;;
15119                 *)      CXX_LIB_SUFFIX='.so'  ;;
15120                 esac
15121         esac
15122         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15123 fi
15124 echo "$as_me:15124: result: $CXX_LIB_SUFFIX" >&5
15125 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15126
15127 fi
15128
15129 ### Set up low-level terminfo dependencies for makefiles.
15130 TINFO_LIST="$SHLIB_LIST"
15131 if test "$with_termlib" != no ; then
15132
15133         if test "$with_termlib" != yes ; then
15134                 TINFO_NAME=$with_termlib
15135                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15136                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15137                 TINFO_LIB_SUFFIX="${with_termlib}"
15138         else
15139                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15140                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15141                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15142         fi
15143
15144         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15145         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15146         if test "$DFT_LWR_MODEL" = "libtool"; then
15147                 TEST_ARGS="${TEST_DEPS}"
15148                 TEST_ARG2="${TEST_DEP2}"
15149                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15150         else
15151                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15152                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15153                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15154                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15155         fi
15156 else
15157         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15158 fi
15159
15160 # needed for Ada95
15161 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15162
15163 echo "$as_me:15163: checking where we will install curses.h" >&5
15164 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
15165 test "$with_overwrite" = no && \
15166 test "x$includedir" = 'x${prefix}/include' && \
15167         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
15168 echo "$as_me:15168: result: $includedir" >&5
15169 echo "${ECHO_T}$includedir" >&6
15170
15171 ### Resolve a conflict between normal and wide-curses by forcing applications
15172 ### that will need libutf8 to add it to their configure script.
15173 if test "$with_overwrite" != no ; then
15174 if test "$NCURSES_LIBUTF8" = 1 ; then
15175         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
15176         { echo "$as_me:15176: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
15177 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
15178 fi
15179 fi
15180
15181 ### predefined stuff for the test programs
15182 cat >>confdefs.h <<\EOF
15183 #define HAVE_SLK_COLOR 1
15184 EOF
15185
15186 ### Construct the list of subdirectories for which we'll customize makefiles
15187 ### with the appropriate compile-rules.
15188
15189 echo "$as_me:15189: checking for src modules" >&5
15190 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
15191
15192 # dependencies and linker-arguments for test-programs
15193 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
15194 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
15195 if test "$DFT_LWR_MODEL" = "libtool"; then
15196         TEST_ARGS="${TEST_DEPS}"
15197         TEST_ARG2="${TEST_DEP2}"
15198 else
15199         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
15200         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
15201 fi
15202
15203 cf_cv_src_modules=
15204 for cf_dir in $modules_to_build
15205 do
15206         if test -f $srcdir/$cf_dir/modules; then
15207
15208                 # We may/may not have tack in the distribution, though the
15209                 # makefile is.
15210                 if test $cf_dir = tack ; then
15211                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
15212                                 continue
15213                         fi
15214                 fi
15215
15216                 if test -z "$cf_cv_src_modules"; then
15217                         cf_cv_src_modules=$cf_dir
15218                 else
15219                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
15220                 fi
15221
15222                 # Make the ncurses_cfg.h file record the library interface files as
15223                 # well.  These are header files that are the same name as their
15224                 # directory.  Ncurses is the only library that does not follow
15225                 # that pattern.
15226                 if test $cf_dir = tack ; then
15227                         continue
15228                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
15229
15230 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15231
15232                         cat >>confdefs.h <<EOF
15233 #define HAVE_${cf_have_include}_H 1
15234 EOF
15235
15236                         cat >>confdefs.h <<EOF
15237 #define HAVE_LIB${cf_have_include} 1
15238 EOF
15239
15240                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
15241                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
15242                         if test "$DFT_LWR_MODEL" = "libtool"; then
15243                                 TEST_ARGS="${TEST_DEPS}"
15244                                 TEST_ARG2="${TEST_DEP2}"
15245                         else
15246                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
15247                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
15248                         fi
15249                 fi
15250         fi
15251 done
15252 echo "$as_me:15252: result: $cf_cv_src_modules" >&5
15253 echo "${ECHO_T}$cf_cv_src_modules" >&6
15254
15255 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
15256 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
15257
15258 SRC_SUBDIRS="man include"
15259 for cf_dir in $cf_cv_src_modules
15260 do
15261         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
15262 done
15263 SRC_SUBDIRS="$SRC_SUBDIRS test"
15264 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
15265 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
15266
15267 ADA_SUBDIRS=
15268 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
15269    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
15270    ADA_SUBDIRS="gen src samples"
15271 fi
15272
15273 SUB_MAKEFILES=
15274 for cf_dir in $SRC_SUBDIRS
15275 do
15276         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15277 done
15278
15279 if test -n "$ADA_SUBDIRS"; then
15280    for cf_dir in $ADA_SUBDIRS
15281    do
15282       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
15283    done
15284
15285 fi
15286
15287 DIRS_TO_MAKE="lib"
15288 for cf_item in $cf_list_models
15289 do
15290
15291         case $cf_item in
15292         libtool) cf_subdir='obj_lo'  ;;
15293         normal)  cf_subdir='objects' ;;
15294         debug)   cf_subdir='obj_g' ;;
15295         profile) cf_subdir='obj_p' ;;
15296         shared)
15297                 case $cf_cv_system_name in #(vi
15298                 cygwin) #(vi
15299                         cf_subdir='objects' ;;
15300                 *)
15301                         cf_subdir='obj_s' ;;
15302                 esac
15303         esac
15304
15305         for cf_item2 in $DIRS_TO_MAKE
15306         do
15307                 test $cf_item2 = $cf_subdir && break
15308         done
15309         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
15310 done
15311 for cf_dir in $DIRS_TO_MAKE
15312 do
15313         test ! -d $cf_dir && mkdir $cf_dir
15314 done
15315
15316 cat >>confdefs.h <<EOF
15317 #define NCURSES_PATHSEP '$PATHSEP'
15318 EOF
15319
15320 cat >>confdefs.h <<EOF
15321 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
15322 EOF
15323
15324 ### Now that we're done running tests, add the compiler-warnings, if any
15325
15326 cf_fix_cppflags=no
15327 cf_new_cflags=
15328 cf_new_cppflags=
15329 cf_new_extra_cppflags=
15330
15331 for cf_add_cflags in $EXTRA_CFLAGS
15332 do
15333 case $cf_fix_cppflags in
15334 no)
15335         case $cf_add_cflags in #(vi
15336         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15337                 case $cf_add_cflags in
15338                 -D*)
15339                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15340
15341                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15342                         && test -z "${cf_tst_cflags}" \
15343                         && cf_fix_cppflags=yes
15344
15345                         if test $cf_fix_cppflags = yes ; then
15346                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15347                                 continue
15348                         elif test "${cf_tst_cflags}" = "\"'" ; then
15349                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15350                                 continue
15351                         fi
15352                         ;;
15353                 esac
15354                 case "$CPPFLAGS" in
15355                 *$cf_add_cflags) #(vi
15356                         ;;
15357                 *) #(vi
15358                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15359                         ;;
15360                 esac
15361                 ;;
15362         *)
15363                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15364                 ;;
15365         esac
15366         ;;
15367 yes)
15368         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15369
15370         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15371
15372         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15373         && test -z "${cf_tst_cflags}" \
15374         && cf_fix_cppflags=no
15375         ;;
15376 esac
15377 done
15378
15379 if test -n "$cf_new_cflags" ; then
15380
15381         CFLAGS="$CFLAGS $cf_new_cflags"
15382 fi
15383
15384 if test -n "$cf_new_cppflags" ; then
15385
15386         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
15387 fi
15388
15389 if test -n "$cf_new_extra_cppflags" ; then
15390
15391         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15392 fi
15393
15394 ### Define substitutions for header files to avoid name-pollution
15395
15396 if test "$cf_cv_have_tcgetattr" = yes ; then
15397         HAVE_TCGETATTR=1
15398 else
15399         HAVE_TCGETATTR=0
15400 fi
15401
15402 if test "$ac_cv_header_termio_h" = yes ; then
15403         HAVE_TERMIO_H=1
15404 else
15405         HAVE_TERMIO_H=0
15406 fi
15407
15408 if test "$ac_cv_header_termios_h" = yes ; then
15409         HAVE_TERMIOS_H=1
15410 else
15411         HAVE_TERMIOS_H=0
15412 fi
15413
15414 ################################################################################
15415 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
15416 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
15417 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
15418 ac_config_commands="$ac_config_commands default"
15419 cat >confcache <<\_ACEOF
15420 # This file is a shell script that caches the results of configure
15421 # tests run on this system so they can be shared between configure
15422 # scripts and configure runs, see configure's option --config-cache.
15423 # It is not useful on other systems.  If it contains results you don't
15424 # want to keep, you may remove or edit it.
15425 #
15426 # config.status only pays attention to the cache file if you give it
15427 # the --recheck option to rerun configure.
15428 #
15429 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15430 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15431 # following values.
15432
15433 _ACEOF
15434
15435 # The following way of writing the cache mishandles newlines in values,
15436 # but we know of no workaround that is simple, portable, and efficient.
15437 # So, don't put newlines in cache variables' values.
15438 # Ultrix sh set writes to stderr and can't be redirected directly,
15439 # and sets the high bit in the cache file unless we assign to the vars.
15440 {
15441   (set) 2>&1 |
15442     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15443     *ac_space=\ *)
15444       # `set' does not quote correctly, so add quotes (double-quote
15445       # substitution turns \\\\ into \\, and sed turns \\ into \).
15446       sed -n \
15447         "s/'/'\\\\''/g;
15448           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15449       ;;
15450     *)
15451       # `set' quotes correctly as required by POSIX, so do not add quotes.
15452       sed -n \
15453         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15454       ;;
15455     esac;
15456 } |
15457   sed '
15458      t clear
15459      : clear
15460      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15461      t end
15462      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15463      : end' >>confcache
15464 if cmp -s $cache_file confcache; then :; else
15465   if test -w $cache_file; then
15466     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15467     cat confcache >$cache_file
15468   else
15469     echo "not updating unwritable cache $cache_file"
15470   fi
15471 fi
15472 rm -f confcache
15473
15474 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15475 # Let make expand exec_prefix.
15476 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15477
15478 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15479 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15480 # trailing colons and then remove the whole line if VPATH becomes empty
15481 # (actually we leave an empty line to preserve line numbers).
15482 if test "x$srcdir" = x.; then
15483   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15484 s/:*\$(srcdir):*/:/;
15485 s/:*\${srcdir}:*/:/;
15486 s/:*@srcdir@:*/:/;
15487 s/^\([^=]*=[    ]*\):*/\1/;
15488 s/:*$//;
15489 s/^[^=]*=[      ]*$//;
15490 }'
15491 fi
15492
15493 DEFS=-DHAVE_CONFIG_H
15494
15495 : ${CONFIG_STATUS=./config.status}
15496 ac_clean_files_save=$ac_clean_files
15497 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15498 { echo "$as_me:15498: creating $CONFIG_STATUS" >&5
15499 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15500 cat >$CONFIG_STATUS <<_ACEOF
15501 #! $SHELL
15502 # Generated automatically by configure.
15503 # Run this file to recreate the current configuration.
15504 # Compiler output produced by configure, useful for debugging
15505 # configure, is in config.log if it exists.
15506
15507 debug=false
15508 SHELL=\${CONFIG_SHELL-$SHELL}
15509 ac_cs_invocation="\$0 \$@"
15510
15511 _ACEOF
15512
15513 cat >>$CONFIG_STATUS <<\_ACEOF
15514 # Be Bourne compatible
15515 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15516   emulate sh
15517   NULLCMD=:
15518 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15519   set -o posix
15520 fi
15521
15522 # Name of the executable.
15523 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15524
15525 if expr a : '\(a\)' >/dev/null 2>&1; then
15526   as_expr=expr
15527 else
15528   as_expr=false
15529 fi
15530
15531 rm -f conf$$ conf$$.exe conf$$.file
15532 echo >conf$$.file
15533 if ln -s conf$$.file conf$$ 2>/dev/null; then
15534   # We could just check for DJGPP; but this test a) works b) is more generic
15535   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15536   if test -f conf$$.exe; then
15537     # Don't use ln at all; we don't have any links
15538     as_ln_s='cp -p'
15539   else
15540     as_ln_s='ln -s'
15541   fi
15542 elif ln conf$$.file conf$$ 2>/dev/null; then
15543   as_ln_s=ln
15544 else
15545   as_ln_s='cp -p'
15546 fi
15547 rm -f conf$$ conf$$.exe conf$$.file
15548
15549 as_executable_p="test -f"
15550
15551 # Support unset when possible.
15552 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15553   as_unset=unset
15554 else
15555   as_unset=false
15556 fi
15557
15558 # NLS nuisances.
15559 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15560 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15561 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15562 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15563 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15564 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15565 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15566 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15567
15568 # IFS
15569 # We need space, tab and new line, in precisely that order.
15570 as_nl='
15571 '
15572 IFS="   $as_nl"
15573
15574 # CDPATH.
15575 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15576
15577 exec 6>&1
15578
15579 _ACEOF
15580
15581 # Files that config.status was made for.
15582 if test -n "$ac_config_files"; then
15583   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15584 fi
15585
15586 if test -n "$ac_config_headers"; then
15587   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15588 fi
15589
15590 if test -n "$ac_config_links"; then
15591   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15592 fi
15593
15594 if test -n "$ac_config_commands"; then
15595   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15596 fi
15597
15598 cat >>$CONFIG_STATUS <<\EOF
15599
15600 ac_cs_usage="\
15601 \`$as_me' instantiates files from templates according to the
15602 current configuration.
15603
15604 Usage: $0 [OPTIONS] [FILE]...
15605
15606   -h, --help       print this help, then exit
15607   -V, --version    print version number, then exit
15608   -d, --debug      don't remove temporary files
15609       --recheck    update $as_me by reconfiguring in the same conditions
15610   --file=FILE[:TEMPLATE]
15611                    instantiate the configuration file FILE
15612   --header=FILE[:TEMPLATE]
15613                    instantiate the configuration header FILE
15614
15615 Configuration files:
15616 $config_files
15617
15618 Configuration headers:
15619 $config_headers
15620
15621 Configuration commands:
15622 $config_commands
15623
15624 Report bugs to <bug-autoconf@gnu.org>."
15625 EOF
15626
15627 cat >>$CONFIG_STATUS <<EOF
15628 ac_cs_version="\\
15629 config.status
15630 configured by $0, generated by GNU Autoconf 2.52.20061216,
15631   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15632
15633 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15634 Free Software Foundation, Inc.
15635 This config.status script is free software; the Free Software Foundation
15636 gives unlimited permission to copy, distribute and modify it."
15637 srcdir=$srcdir
15638 INSTALL="$INSTALL"
15639 EOF
15640
15641 cat >>$CONFIG_STATUS <<\EOF
15642 # If no file are specified by the user, then we need to provide default
15643 # value.  By we need to know if files were specified by the user.
15644 ac_need_defaults=:
15645 while test $# != 0
15646 do
15647   case $1 in
15648   --*=*)
15649     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15650     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15651     shift
15652     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15653     shift
15654     ;;
15655   -*);;
15656   *) # This is not an option, so the user has probably given explicit
15657      # arguments.
15658      ac_need_defaults=false;;
15659   esac
15660
15661   case $1 in
15662   # Handling of the options.
15663 EOF
15664 cat >>$CONFIG_STATUS <<EOF
15665   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15666     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15667     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15668 EOF
15669 cat >>$CONFIG_STATUS <<\EOF
15670   --version | --vers* | -V )
15671     echo "$ac_cs_version"; exit 0 ;;
15672   --he | --h)
15673     # Conflict between --help and --header
15674     { { echo "$as_me:15674: error: ambiguous option: $1
15675 Try \`$0 --help' for more information." >&5
15676 echo "$as_me: error: ambiguous option: $1
15677 Try \`$0 --help' for more information." >&2;}
15678    { (exit 1); exit 1; }; };;
15679   --help | --hel | -h )
15680     echo "$ac_cs_usage"; exit 0 ;;
15681   --debug | --d* | -d )
15682     debug=: ;;
15683   --file | --fil | --fi | --f )
15684     shift
15685     CONFIG_FILES="$CONFIG_FILES $1"
15686     ac_need_defaults=false;;
15687   --header | --heade | --head | --hea )
15688     shift
15689     CONFIG_HEADERS="$CONFIG_HEADERS $1"
15690     ac_need_defaults=false;;
15691
15692   # This is an error.
15693   -*) { { echo "$as_me:15693: error: unrecognized option: $1
15694 Try \`$0 --help' for more information." >&5
15695 echo "$as_me: error: unrecognized option: $1
15696 Try \`$0 --help' for more information." >&2;}
15697    { (exit 1); exit 1; }; } ;;
15698
15699   *) ac_config_targets="$ac_config_targets $1" ;;
15700
15701   esac
15702   shift
15703 done
15704
15705 exec 5>>config.log
15706 cat >&5 << _ACEOF
15707
15708 ## ----------------------- ##
15709 ## Running config.status.  ##
15710 ## ----------------------- ##
15711
15712 This file was extended by $as_me 2.52.20061216, executed with
15713   CONFIG_FILES    = $CONFIG_FILES
15714   CONFIG_HEADERS  = $CONFIG_HEADERS
15715   CONFIG_LINKS    = $CONFIG_LINKS
15716   CONFIG_COMMANDS = $CONFIG_COMMANDS
15717   > $ac_cs_invocation
15718 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15719
15720 _ACEOF
15721 EOF
15722
15723 cat >>$CONFIG_STATUS <<EOF
15724 #
15725 # INIT-COMMANDS section.
15726 #
15727
15728 ### Special initialization commands, used to pass information from the
15729 ### configuration-run into config.status
15730
15731 AWK="$AWK"
15732 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
15733 DFT_LWR_MODEL="$DFT_LWR_MODEL"
15734 ECHO_LINK="$ECHO_LINK"
15735 LDCONFIG="$LDCONFIG"
15736 LIB_NAME="$LIB_NAME"
15737 LIB_SUBSETS="$LIB_SUBSETS"
15738 LIB_SUFFIX="$LIB_SUFFIX"
15739 LIB_TRACING="$LIB_TRACING"
15740 MAKE_TERMINFO="$MAKE_TERMINFO"
15741 NCURSES_MAJOR="$NCURSES_MAJOR"
15742 NCURSES_MINOR="$NCURSES_MINOR"
15743 NCURSES_OSPEED="$NCURSES_OSPEED"
15744 NCURSES_PATCH="$NCURSES_PATCH"
15745 SRC_SUBDIRS="$SRC_SUBDIRS"
15746 TERMINFO="$TERMINFO"
15747 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
15748 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
15749 TINFO_NAME="$TINFO_NAME"
15750 WITH_CURSES_H="$with_curses_h"
15751 WITH_ECHO="$with_echo"
15752 WITH_OVERWRITE="$with_overwrite"
15753 cf_LIST_MODELS="$cf_list_models"
15754 cf_cv_abi_version="$cf_cv_abi_version"
15755 cf_cv_do_symlinks="$cf_cv_do_symlinks"
15756 cf_cv_enable_lp64="$cf_cv_enable_lp64"
15757 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
15758 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
15759 cf_cv_rel_version="$cf_cv_rel_version"
15760 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
15761 cf_cv_shlib_version="$cf_cv_shlib_version"
15762 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
15763 cf_cv_system_name="$cf_cv_system_name"
15764 cf_with_cxx_binding="$cf_with_cxx_binding"
15765 host="$host"
15766 target="$target"
15767
15768 EOF
15769
15770 cat >>$CONFIG_STATUS <<\EOF
15771 for ac_config_target in $ac_config_targets
15772 do
15773   case "$ac_config_target" in
15774   # Handling of arguments.
15775   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
15776   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
15777   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
15778   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
15779   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
15780   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15781   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15782   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
15783   *) { { echo "$as_me:15783: error: invalid argument: $ac_config_target" >&5
15784 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15785    { (exit 1); exit 1; }; };;
15786   esac
15787 done
15788
15789 # If the user did not use the arguments to specify the items to instantiate,
15790 # then the envvar interface is used.  Set only those that are not.
15791 # We use the long form for the default assignment because of an extremely
15792 # bizarre bug on SunOS 4.1.3.
15793 if $ac_need_defaults; then
15794   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15795   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15796   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15797 fi
15798
15799 # Create a temporary directory, and hook for its removal unless debugging.
15800 $debug ||
15801 {
15802   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15803   trap '{ (exit 1); exit 1; }' 1 2 13 15
15804 }
15805
15806 # Create a (secure) tmp directory for tmp files.
15807 : ${TMPDIR=/tmp}
15808 {
15809   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15810   test -n "$tmp" && test -d "$tmp"
15811 }  ||
15812 {
15813   tmp=$TMPDIR/cs$$-$RANDOM
15814   (umask 077 && mkdir $tmp)
15815 } ||
15816 {
15817    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15818    { (exit 1); exit 1; }
15819 }
15820
15821 EOF
15822
15823 cat >>$CONFIG_STATUS <<EOF
15824
15825 #
15826 # CONFIG_FILES section.
15827 #
15828
15829 # No need to generate the scripts if there are no CONFIG_FILES.
15830 # This happens for instance when ./config.status config.h
15831 if test -n "\$CONFIG_FILES"; then
15832   # Protect against being on the right side of a sed subst in config.status.
15833   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15834    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15835 s,@SHELL@,$SHELL,;t t
15836 s,@exec_prefix@,$exec_prefix,;t t
15837 s,@prefix@,$prefix,;t t
15838 s,@program_transform_name@,$program_transform_name,;t t
15839 s,@bindir@,$bindir,;t t
15840 s,@sbindir@,$sbindir,;t t
15841 s,@libexecdir@,$libexecdir,;t t
15842 s,@datadir@,$datadir,;t t
15843 s,@sysconfdir@,$sysconfdir,;t t
15844 s,@sharedstatedir@,$sharedstatedir,;t t
15845 s,@localstatedir@,$localstatedir,;t t
15846 s,@libdir@,$libdir,;t t
15847 s,@includedir@,$includedir,;t t
15848 s,@oldincludedir@,$oldincludedir,;t t
15849 s,@infodir@,$infodir,;t t
15850 s,@mandir@,$mandir,;t t
15851 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15852 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15853 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15854 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15855 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15856 s,@build_alias@,$build_alias,;t t
15857 s,@host_alias@,$host_alias,;t t
15858 s,@target_alias@,$target_alias,;t t
15859 s,@ECHO_C@,$ECHO_C,;t t
15860 s,@ECHO_N@,$ECHO_N,;t t
15861 s,@ECHO_T@,$ECHO_T,;t t
15862 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15863 s,@DEFS@,$DEFS,;t t
15864 s,@LIBS@,$LIBS,;t t
15865 s,@top_builddir@,$top_builddir,;t t
15866 s,@EGREP@,$EGREP,;t t
15867 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
15868 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
15869 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
15870 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
15871 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
15872 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
15873 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
15874 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
15875 s,@build@,$build,;t t
15876 s,@build_cpu@,$build_cpu,;t t
15877 s,@build_vendor@,$build_vendor,;t t
15878 s,@build_os@,$build_os,;t t
15879 s,@host@,$host,;t t
15880 s,@host_cpu@,$host_cpu,;t t
15881 s,@host_vendor@,$host_vendor,;t t
15882 s,@host_os@,$host_os,;t t
15883 s,@target@,$target,;t t
15884 s,@target_cpu@,$target_cpu,;t t
15885 s,@target_vendor@,$target_vendor,;t t
15886 s,@target_os@,$target_os,;t t
15887 s,@CC@,$CC,;t t
15888 s,@CFLAGS@,$CFLAGS,;t t
15889 s,@LDFLAGS@,$LDFLAGS,;t t
15890 s,@CPPFLAGS@,$CPPFLAGS,;t t
15891 s,@ac_ct_CC@,$ac_ct_CC,;t t
15892 s,@EXEEXT@,$EXEEXT,;t t
15893 s,@OBJEXT@,$OBJEXT,;t t
15894 s,@CPP@,$CPP,;t t
15895 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
15896 s,@PROG_EXT@,$PROG_EXT,;t t
15897 s,@LDCONFIG@,$LDCONFIG,;t t
15898 s,@CXX@,$CXX,;t t
15899 s,@CXXFLAGS@,$CXXFLAGS,;t t
15900 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
15901 s,@AWK@,$AWK,;t t
15902 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15903 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15904 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15905 s,@LINT@,$LINT,;t t
15906 s,@LINT_OPTS@,$LINT_OPTS,;t t
15907 s,@LN_S@,$LN_S,;t t
15908 s,@SET_MAKE@,$SET_MAKE,;t t
15909 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
15910 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
15911 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
15912 s,@RANLIB@,$RANLIB,;t t
15913 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
15914 s,@LD@,$LD,;t t
15915 s,@ac_ct_LD@,$ac_ct_LD,;t t
15916 s,@AR@,$AR,;t t
15917 s,@ac_ct_AR@,$ac_ct_AR,;t t
15918 s,@AR_OPTS@,$AR_OPTS,;t t
15919 s,@DESTDIR@,$DESTDIR,;t t
15920 s,@BUILD_CC@,$BUILD_CC,;t t
15921 s,@BUILD_CPP@,$BUILD_CPP,;t t
15922 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
15923 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
15924 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
15925 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
15926 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
15927 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
15928 s,@cf_list_models@,$cf_list_models,;t t
15929 s,@LIBTOOL@,$LIBTOOL,;t t
15930 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
15931 s,@LIB_CREATE@,$LIB_CREATE,;t t
15932 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
15933 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
15934 s,@LIB_PREP@,$LIB_PREP,;t t
15935 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
15936 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
15937 s,@LIB_LINK@,$LIB_LINK,;t t
15938 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
15939 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
15940 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
15941 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
15942 s,@TINFO_NAME@,$TINFO_NAME,;t t
15943 s,@LIB_NAME@,$LIB_NAME,;t t
15944 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
15945 s,@CC_G_OPT@,$CC_G_OPT,;t t
15946 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
15947 s,@LD_MODEL@,$LD_MODEL,;t t
15948 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
15949 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
15950 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
15951 s,@LINK_PROGS@,$LINK_PROGS,;t t
15952 s,@LINK_TESTS@,$LINK_TESTS,;t t
15953 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
15954 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
15955 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
15956 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
15957 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
15958 s,@PATHSEP@,$PATHSEP,;t t
15959 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
15960 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
15961 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
15962 s,@TERMINFO@,$TERMINFO,;t t
15963 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
15964 s,@TERMPATH@,$TERMPATH,;t t
15965 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
15966 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
15967 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
15968 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
15969 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
15970 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
15971 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
15972 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
15973 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
15974 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
15975 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
15976 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
15977 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
15978 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
15979 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
15980 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
15981 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
15982 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
15983 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
15984 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
15985 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
15986 s,@ECHO_LINK@,$ECHO_LINK,;t t
15987 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
15988 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
15989 s,@ADA_TRACE@,$ADA_TRACE,;t t
15990 s,@MATH_LIB@,$MATH_LIB,;t t
15991 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
15992 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
15993 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
15994 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
15995 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
15996 s,@CXXCPP@,$CXXCPP,;t t
15997 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
15998 s,@CXX_AR@,$CXX_AR,;t t
15999 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
16000 s,@CXXLIBS@,$CXXLIBS,;t t
16001 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
16002 s,@gnat_exists@,$gnat_exists,;t t
16003 s,@M4_exists@,$M4_exists,;t t
16004 s,@cf_ada_make@,$cf_ada_make,;t t
16005 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16006 s,@cf_ada_package@,$cf_ada_package,;t t
16007 s,@ADAFLAGS@,$ADAFLAGS,;t t
16008 s,@cf_compile_generics@,$cf_compile_generics,;t t
16009 s,@cf_generic_objects@,$cf_generic_objects,;t t
16010 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
16011 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16012 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16013 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16014 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16015 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16016 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16017 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
16018 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
16019 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
16020 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
16021 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
16022 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
16023 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
16024 s,@TINFO_LIST@,$TINFO_LIST,;t t
16025 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
16026 s,@TEST_ARGS@,$TEST_ARGS,;t t
16027 s,@TEST_DEPS@,$TEST_DEPS,;t t
16028 s,@TEST_ARG2@,$TEST_ARG2,;t t
16029 s,@TEST_DEP2@,$TEST_DEP2,;t t
16030 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16031 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
16032 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
16033 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
16034 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
16035 CEOF
16036
16037 EOF
16038
16039   cat >>$CONFIG_STATUS <<\EOF
16040   # Split the substitutions into bite-sized pieces for seds with
16041   # small command number limits, like on Digital OSF/1 and HP-UX.
16042   ac_max_sed_lines=48
16043   ac_sed_frag=1 # Number of current file.
16044   ac_beg=1 # First line for current file.
16045   ac_end=$ac_max_sed_lines # Line after last line for current file.
16046   ac_more_lines=:
16047   ac_sed_cmds=
16048   while $ac_more_lines; do
16049     if test $ac_beg -gt 1; then
16050       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16051     else
16052       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16053     fi
16054     if test ! -s $tmp/subs.frag; then
16055       ac_more_lines=false
16056     else
16057       # The purpose of the label and of the branching condition is to
16058       # speed up the sed processing (if there are no `@' at all, there
16059       # is no need to browse any of the substitutions).
16060       # These are the two extra sed commands mentioned above.
16061       (echo ':t
16062   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16063       if test -z "$ac_sed_cmds"; then
16064         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16065       else
16066         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16067       fi
16068       ac_sed_frag=`expr $ac_sed_frag + 1`
16069       ac_beg=$ac_end
16070       ac_end=`expr $ac_end + $ac_max_sed_lines`
16071     fi
16072   done
16073   if test -z "$ac_sed_cmds"; then
16074     ac_sed_cmds=cat
16075   fi
16076 fi # test -n "$CONFIG_FILES"
16077
16078 EOF
16079 cat >>$CONFIG_STATUS <<\EOF
16080 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16081   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16082   case $ac_file in
16083   - | *:- | *:-:* ) # input from stdin
16084         cat >$tmp/stdin
16085         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16086         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16087   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16088         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16089   * )   ac_file_in=$ac_file.in ;;
16090   esac
16091
16092   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16093   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16094          X"$ac_file" : 'X\(//\)[^/]' \| \
16095          X"$ac_file" : 'X\(//\)$' \| \
16096          X"$ac_file" : 'X\(/\)' \| \
16097          .     : '\(.\)' 2>/dev/null ||
16098 echo X"$ac_file" |
16099     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16100           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16101           /^X\(\/\/\)$/{ s//\1/; q; }
16102           /^X\(\/\).*/{ s//\1/; q; }
16103           s/.*/./; q'`
16104   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16105     { case "$ac_dir" in
16106   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16107   *)                      as_incr_dir=.;;
16108 esac
16109 as_dummy="$ac_dir"
16110 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16111   case $as_mkdir_dir in
16112     # Skip DOS drivespec
16113     ?:) as_incr_dir=$as_mkdir_dir ;;
16114     *)
16115       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16116       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16117     ;;
16118   esac
16119 done; }
16120
16121     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16122     # A "../" for each directory in $ac_dir_suffix.
16123     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16124   else
16125     ac_dir_suffix= ac_dots=
16126   fi
16127
16128   case $srcdir in
16129   .)  ac_srcdir=.
16130       if test -z "$ac_dots"; then
16131          ac_top_srcdir=.
16132       else
16133          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16134       fi ;;
16135   [\\/]* | ?:[\\/]* )
16136       ac_srcdir=$srcdir$ac_dir_suffix;
16137       ac_top_srcdir=$srcdir ;;
16138   *) # Relative path.
16139     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16140     ac_top_srcdir=$ac_dots$srcdir ;;
16141   esac
16142
16143   case $INSTALL in
16144   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16145   *) ac_INSTALL=$ac_dots$INSTALL ;;
16146   esac
16147
16148   if test x"$ac_file" != x-; then
16149     { echo "$as_me:16149: creating $ac_file" >&5
16150 echo "$as_me: creating $ac_file" >&6;}
16151     rm -f "$ac_file"
16152   fi
16153   # Let's still pretend it is `configure' which instantiates (i.e., don't
16154   # use $as_me), people would be surprised to read:
16155   #    /* config.h.  Generated automatically by config.status.  */
16156   configure_input="Generated automatically from `echo $ac_file_in |
16157                                                  sed 's,.*/,,'` by configure."
16158
16159   # First look for the input files in the build tree, otherwise in the
16160   # src tree.
16161   ac_file_inputs=`IFS=:
16162     for f in $ac_file_in; do
16163       case $f in
16164       -) echo $tmp/stdin ;;
16165       [\\/$]*)
16166          # Absolute (can't be DOS-style, as IFS=:)
16167          test -f "$f" || { { echo "$as_me:16167: error: cannot find input file: $f" >&5
16168 echo "$as_me: error: cannot find input file: $f" >&2;}
16169    { (exit 1); exit 1; }; }
16170          echo $f;;
16171       *) # Relative
16172          if test -f "$f"; then
16173            # Build tree
16174            echo $f
16175          elif test -f "$srcdir/$f"; then
16176            # Source tree
16177            echo $srcdir/$f
16178          else
16179            # /dev/null tree
16180            { { echo "$as_me:16180: error: cannot find input file: $f" >&5
16181 echo "$as_me: error: cannot find input file: $f" >&2;}
16182    { (exit 1); exit 1; }; }
16183          fi;;
16184       esac
16185     done` || { (exit 1); exit 1; }
16186 EOF
16187 cat >>$CONFIG_STATUS <<EOF
16188   sed "$ac_vpsub
16189 $extrasub
16190 EOF
16191 cat >>$CONFIG_STATUS <<\EOF
16192 :t
16193 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16194 s,@configure_input@,$configure_input,;t t
16195 s,@srcdir@,$ac_srcdir,;t t
16196 s,@top_srcdir@,$ac_top_srcdir,;t t
16197 s,@INSTALL@,$ac_INSTALL,;t t
16198 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16199   rm -f $tmp/stdin
16200   if test x"$ac_file" != x-; then
16201     mv $tmp/out $ac_file
16202   else
16203     cat $tmp/out
16204     rm -f $tmp/out
16205   fi
16206
16207 done
16208 EOF
16209 cat >>$CONFIG_STATUS <<\EOF
16210
16211 #
16212 # CONFIG_HEADER section.
16213 #
16214
16215 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16216 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16217 #
16218 # ac_d sets the value in "#define NAME VALUE" lines.
16219 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16220 ac_dB='[        ].*$,\1#\2'
16221 ac_dC=' '
16222 ac_dD=',;t'
16223 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16224 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16225 ac_iB='\([      ]\),\1#\2define\3'
16226 ac_iC=' '
16227 ac_iD='\4,;t'
16228 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16229 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16230 ac_uB='$,\1#\2define\3'
16231 ac_uC=' '
16232 ac_uD=',;t'
16233
16234 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16235   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16236   case $ac_file in
16237   - | *:- | *:-:* ) # input from stdin
16238         cat >$tmp/stdin
16239         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16240         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16241   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16242         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16243   * )   ac_file_in=$ac_file.in ;;
16244   esac
16245
16246   test x"$ac_file" != x- && { echo "$as_me:16246: creating $ac_file" >&5
16247 echo "$as_me: creating $ac_file" >&6;}
16248
16249   # First look for the input files in the build tree, otherwise in the
16250   # src tree.
16251   ac_file_inputs=`IFS=:
16252     for f in $ac_file_in; do
16253       case $f in
16254       -) echo $tmp/stdin ;;
16255       [\\/$]*)
16256          # Absolute (can't be DOS-style, as IFS=:)
16257          test -f "$f" || { { echo "$as_me:16257: error: cannot find input file: $f" >&5
16258 echo "$as_me: error: cannot find input file: $f" >&2;}
16259    { (exit 1); exit 1; }; }
16260          echo $f;;
16261       *) # Relative
16262          if test -f "$f"; then
16263            # Build tree
16264            echo $f
16265          elif test -f "$srcdir/$f"; then
16266            # Source tree
16267            echo $srcdir/$f
16268          else
16269            # /dev/null tree
16270            { { echo "$as_me:16270: error: cannot find input file: $f" >&5
16271 echo "$as_me: error: cannot find input file: $f" >&2;}
16272    { (exit 1); exit 1; }; }
16273          fi;;
16274       esac
16275     done` || { (exit 1); exit 1; }
16276   # Remove the trailing spaces.
16277   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
16278
16279 EOF
16280
16281 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
16282 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
16283 # be either 'cat' or 'sort'.
16284 cat confdefs.h | uniq >conftest.vals
16285
16286 # Break up conftest.vals because some shells have a limit on
16287 # the size of here documents, and old seds have small limits too.
16288
16289 rm -f conftest.tail
16290 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
16291 while grep . conftest.vals >/dev/null
16292 do
16293   # Write chunks of a limited-size here document to conftest.frag.
16294   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16295   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16296   echo 'CEOF' >> $CONFIG_STATUS
16297   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16298   rm -f conftest.vals
16299   mv conftest.tail conftest.vals
16300 done
16301 rm -f conftest.vals
16302
16303 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16304 # marker @DEFS@.
16305 echo '  cat >> conftest.edit <<CEOF
16306 /@DEFS@/r conftest.frag
16307 /@DEFS@/d
16308 CEOF
16309 sed -f conftest.edit $tmp/in > $tmp/out
16310 rm -f $tmp/in
16311 mv $tmp/out $tmp/in
16312 rm -f conftest.edit conftest.frag
16313 ' >> $CONFIG_STATUS
16314
16315 cat >>$CONFIG_STATUS <<\EOF
16316   # Let's still pretend it is `configure' which instantiates (i.e., don't
16317   # use $as_me), people would be surprised to read:
16318   #    /* config.h.  Generated automatically by config.status.  */
16319   if test x"$ac_file" = x-; then
16320     echo "/* Generated automatically by configure.  */" >$tmp/config.h
16321   else
16322     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16323   fi
16324   cat $tmp/in >>$tmp/config.h
16325   rm -f $tmp/in
16326   if test x"$ac_file" != x-; then
16327     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16328       { echo "$as_me:16328: $ac_file is unchanged" >&5
16329 echo "$as_me: $ac_file is unchanged" >&6;}
16330     else
16331       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16332          X"$ac_file" : 'X\(//\)[^/]' \| \
16333          X"$ac_file" : 'X\(//\)$' \| \
16334          X"$ac_file" : 'X\(/\)' \| \
16335          .     : '\(.\)' 2>/dev/null ||
16336 echo X"$ac_file" |
16337     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16338           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16339           /^X\(\/\/\)$/{ s//\1/; q; }
16340           /^X\(\/\).*/{ s//\1/; q; }
16341           s/.*/./; q'`
16342       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16343         { case "$ac_dir" in
16344   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16345   *)                      as_incr_dir=.;;
16346 esac
16347 as_dummy="$ac_dir"
16348 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16349   case $as_mkdir_dir in
16350     # Skip DOS drivespec
16351     ?:) as_incr_dir=$as_mkdir_dir ;;
16352     *)
16353       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16354       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16355     ;;
16356   esac
16357 done; }
16358
16359       fi
16360       rm -f $ac_file
16361       mv $tmp/config.h $ac_file
16362     fi
16363   else
16364     cat $tmp/config.h
16365     rm -f $tmp/config.h
16366   fi
16367 done
16368 EOF
16369 cat >>$CONFIG_STATUS <<\EOF
16370
16371 #
16372 # CONFIG_COMMANDS section.
16373 #
16374 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16375   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16376   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16377
16378   case $ac_dest in
16379     default )
16380
16381 for cf_dir in test
16382 do
16383         if test ! -d $srcdir/$cf_dir; then
16384                 continue
16385         elif test -f $srcdir/$cf_dir/programs; then
16386                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16387         fi
16388 done
16389
16390         case $cf_cv_system_name in
16391         OS/2*)  LIB_PREFIX=''     ;;
16392         os2*)   LIB_PREFIX=''     ;;
16393         *)      LIB_PREFIX='lib'  ;;
16394         esac
16395 cf_prefix=$LIB_PREFIX
16396
16397 for cf_dir in $SRC_SUBDIRS
16398 do
16399         if test ! -d $srcdir/$cf_dir ; then
16400                 continue
16401         elif test -f $srcdir/$cf_dir/modules; then
16402
16403                 IMPORT_LIB=
16404                 SHARED_LIB=
16405                 LIBS_TO_MAKE=
16406                 for cf_item in $cf_LIST_MODELS
16407                 do
16408
16409         case $cf_item in
16410         libtool) cf_suffix='.la'  ;;
16411         normal)  cf_suffix='.a'   ;;
16412         debug)   cf_suffix='_g.a' ;;
16413         profile) cf_suffix='_p.a' ;;
16414         shared)
16415                 case $cf_cv_system_name in
16416                 cygwin*) cf_suffix='.dll' ;;
16417                 darwin*) cf_suffix='.dylib' ;;
16418                 hpux*)
16419                         case $target in
16420                         ia64*)  cf_suffix='.so' ;;
16421                         *)      cf_suffix='.sl' ;;
16422                         esac
16423                         ;;
16424                 *)      cf_suffix='.so'  ;;
16425                 esac
16426         esac
16427         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16428
16429                         if test $cf_item = shared ; then
16430                         if test "$cf_cv_do_symlinks" = yes ; then
16431                                 case "$cf_cv_shlib_version" in #(vi
16432                                 rel) #(vi
16433                                         case "$cf_cv_system_name" in #(vi
16434                                         darwin*)
16435                                         case .${LIB_SUFFIX} in
16436                                         .w*)
16437                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16438                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
16439                                                 ;;
16440                                         *)
16441                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
16442                                                 ;;
16443                                         esac
16444                                         ;; #(vi
16445                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
16446                                         esac
16447                                         ;;
16448                                 abi)
16449                                         case "$cf_cv_system_name" in #(vi
16450                                         darwin*)
16451                                         case .${LIB_SUFFIX} in
16452                                         .w*)
16453                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16454                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
16455                                                 ;;
16456                                         *)
16457                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
16458                                                 ;;
16459                                         esac
16460                                         ;; #(vi
16461                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
16462                                         esac
16463                                         ;;
16464                                 esac
16465                         fi
16466                         # cygwin needs import library, and has unique naming convention
16467                         # use autodetected ${cf_prefix} for import lib and static lib, but
16468                         # use 'cyg' prefix for shared lib.
16469                         if test $cf_cv_shlib_version = cygdll ; then
16470                                 SHARED_LIB="cyg${cf_dir}\${ABI_VERSION}.dll"
16471                                 IMPORT_LIB="${cf_prefix}${cf_dir}.dll.a"
16472                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/\${SHARED_LIB} ../lib/\${IMPORT_LIB}"
16473                                 continue
16474                         fi
16475                         fi
16476                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
16477                 done
16478
16479                 if test $cf_dir = ncurses ; then
16480                         cf_subsets="$LIB_SUBSETS"
16481                         cf_termlib=`echo "$cf_subsets" |sed -e 's/ .*$//'`
16482                         if test "$cf_termlib" != "$cf_subsets" ; then
16483                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
16484                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
16485                         fi
16486                 else
16487                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
16488                 fi
16489
16490                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
16491                     -e "s%@IMPORT_LIB@%$IMPORT_LIB%" \
16492                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
16493                         $cf_dir/Makefile >$cf_dir/Makefile.out
16494                 mv $cf_dir/Makefile.out $cf_dir/Makefile
16495
16496                 $AWK -f $srcdir/mk-0th.awk \
16497                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
16498                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16499
16500                 for cf_subset in $cf_subsets
16501                 do
16502                         cf_subdirs=
16503                         for cf_item in $cf_LIST_MODELS
16504                         do
16505                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
16506
16507 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16508
16509         case $cf_item in
16510         libtool) cf_suffix='.la'  ;;
16511         normal)  cf_suffix='.a'   ;;
16512         debug)   cf_suffix='_g.a' ;;
16513         profile) cf_suffix='_p.a' ;;
16514         shared)
16515                 case $cf_cv_system_name in
16516                 cygwin*) cf_suffix='.dll' ;;
16517                 darwin*) cf_suffix='.dylib' ;;
16518                 hpux*)
16519                         case $target in
16520                         ia64*)  cf_suffix='.so' ;;
16521                         *)      cf_suffix='.sl' ;;
16522                         esac
16523                         ;;
16524                 *)      cf_suffix='.so'  ;;
16525                 esac
16526         esac
16527         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16528
16529         case $cf_item in
16530         libtool) cf_subdir='obj_lo'  ;;
16531         normal)  cf_subdir='objects' ;;
16532         debug)   cf_subdir='obj_g' ;;
16533         profile) cf_subdir='obj_p' ;;
16534         shared)
16535                 case $cf_cv_system_name in #(vi
16536                 cygwin) #(vi
16537                         cf_subdir='objects' ;;
16538                 *)
16539                         cf_subdir='obj_s' ;;
16540                 esac
16541         esac
16542
16543                         # Test for case where we build libtinfo with a different name.
16544                         cf_libname=$cf_dir
16545                         if test $cf_dir = ncurses ; then
16546                                 case $cf_subset in
16547                                 *base*)
16548                                         ;;
16549                                 termlib*)
16550                                         cf_libname=$TINFO_LIB_SUFFIX
16551                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16552                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16553                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16554                                         fi
16555                                 ;;
16556                                 esac
16557                         fi
16558
16559                         # These dependencies really are for development, not
16560                         # builds, but they are useful in porting, too.
16561                         cf_depend="../include/ncurses_cfg.h"
16562                         if test "$srcdir" = "."; then
16563                                 cf_reldir="."
16564                         else
16565                                 cf_reldir="\${srcdir}"
16566                         fi
16567
16568                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
16569                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
16570                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
16571                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
16572                         fi
16573
16574                         cf_dir_suffix=
16575                         old_cf_suffix="$cf_suffix"
16576                         if test "$cf_cv_shlib_version_infix" = yes ; then
16577                         if test -n "$LIB_SUFFIX" ; then
16578                                 case $LIB_SUFFIX in
16579                                 w*)
16580                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
16581                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16582                                         cf_dir_suffix=w
16583                                         ;;
16584                                 esac
16585                         fi
16586                         fi
16587
16588                         $AWK -f $srcdir/mk-1st.awk \
16589                                 name=${cf_libname}${cf_dir_suffix} \
16590                                 traces=$LIB_TRACING \
16591                                 MODEL=$cf_ITEM \
16592                                 model=$cf_subdir \
16593                                 prefix=$cf_prefix \
16594                                 suffix=$cf_suffix \
16595                                 subset=$cf_subset \
16596                                 ShlibVer=$cf_cv_shlib_version \
16597                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
16598                                 DoLinks=$cf_cv_do_symlinks \
16599                                 rmSoLocs=$cf_cv_rm_so_locs \
16600                                 ldconfig="$LDCONFIG" \
16601                                 overwrite=$WITH_OVERWRITE \
16602                                 depend="$cf_depend" \
16603                                 host="$host" \
16604                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16605
16606                         cf_suffix="$old_cf_suffix"
16607
16608                         for cf_subdir2 in $cf_subdirs lib
16609                         do
16610                                 test $cf_subdir = $cf_subdir2 && break
16611                         done
16612                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
16613                         $AWK -f $srcdir/mk-2nd.awk \
16614                                 name=$cf_dir \
16615                                 traces=$LIB_TRACING \
16616                                 MODEL=$cf_ITEM \
16617                                 model=$cf_subdir \
16618                                 subset=$cf_subset \
16619                                 srcdir=$srcdir \
16620                                 echo=$WITH_ECHO \
16621                                 crenames=$cf_cv_prog_CC_c_o \
16622                                 cxxrenames=$cf_cv_prog_CXX_c_o \
16623                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16624                         cf_subdirs="$cf_subdirs $cf_subdir"
16625                         done
16626                 done
16627         fi
16628
16629         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
16630 done
16631
16632 for cf_dir in $SRC_SUBDIRS
16633 do
16634         if test ! -d $srcdir/$cf_dir ; then
16635                 continue
16636         fi
16637
16638         if test -f $cf_dir/Makefile ; then
16639                 case "$cf_dir" in
16640                 Ada95) #(vi
16641                         echo 'libs \' >> Makefile
16642                         echo 'install.libs \' >> Makefile
16643                         echo 'uninstall.libs ::' >> Makefile
16644                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
16645                         ;;
16646                 esac
16647         fi
16648
16649         if test -f $srcdir/$cf_dir/modules; then
16650                 echo >> Makefile
16651                 if test -f $srcdir/$cf_dir/headers; then
16652 cat >> Makefile <<CF_EOF
16653 install.includes \\
16654 uninstall.includes \\
16655 CF_EOF
16656                 fi
16657 if test "$cf_dir" != "c++" ; then
16658 echo 'lint \' >> Makefile
16659 fi
16660 cat >> Makefile <<CF_EOF
16661 libs \\
16662 lintlib \\
16663 install.libs \\
16664 uninstall.libs \\
16665 install.$cf_dir \\
16666 uninstall.$cf_dir ::
16667         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
16668 CF_EOF
16669         elif test -f $srcdir/$cf_dir/headers; then
16670 cat >> Makefile <<CF_EOF
16671
16672 libs \\
16673 install.libs \\
16674 uninstall.libs \\
16675 install.includes \\
16676 uninstall.includes ::
16677         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
16678 CF_EOF
16679 fi
16680 done
16681
16682 cat >> Makefile <<CF_EOF
16683
16684 install.data \\
16685 uninstall.data ::
16686 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
16687
16688 install.man \\
16689 uninstall.man ::
16690         cd man && \${MAKE} \${CF_MFLAGS} \$@
16691
16692 distclean ::
16693         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
16694         rm -f headers.sh headers.sed
16695         rm -rf \${DIRS_TO_MAKE}
16696 CF_EOF
16697
16698 # Special case: tack's manpage lives in its own directory.
16699 if test -d tack ; then
16700 if test -f $srcdir/$tack.h; then
16701 cat >> Makefile <<CF_EOF
16702
16703 install.man \\
16704 uninstall.man ::
16705         cd tack && \${MAKE} \${CF_MFLAGS} \$@
16706 CF_EOF
16707 fi
16708 fi
16709
16710 rm -f headers.sed headers.sh
16711
16712 echo creating headers.sh
16713 cat >headers.sh <<CF_EOF
16714 #! /bin/sh
16715 # This shell script is generated by the 'configure' script.  It is invoked in a
16716 # subdirectory of the build tree.  It generates a sed-script in the parent
16717 # directory that is used to adjust includes for header files that reside in a
16718 # subdirectory of /usr/include, etc.
16719 PRG=""
16720 while test \$# != 3
16721 do
16722 PRG="\$PRG \$1"; shift
16723 done
16724 DST=\$1
16725 REF=\$2
16726 SRC=\$3
16727 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
16728 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
16729 echo installing \$SRC in \$DST
16730 CF_EOF
16731
16732 if test $WITH_CURSES_H = yes; then
16733         cat >>headers.sh <<CF_EOF
16734 case \$DST in
16735 /*/include/*)
16736         END=\`basename \$DST\`
16737         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
16738         do
16739                 NAME=\`basename \$i\`
16740                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
16741         done
16742         ;;
16743 *)
16744         echo "" >> \$TMPSED
16745         ;;
16746 esac
16747 CF_EOF
16748
16749 else
16750         cat >>headers.sh <<CF_EOF
16751 case \$DST in
16752 /*/include/*)
16753         END=\`basename \$DST\`
16754         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
16755         do
16756                 NAME=\`basename \$i\`
16757                 if test "\$NAME" = "curses.h"
16758                 then
16759                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
16760                         NAME=ncurses.h
16761                 fi
16762                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
16763         done
16764         ;;
16765 *)
16766         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
16767         ;;
16768 esac
16769 CF_EOF
16770 fi
16771 cat >>headers.sh <<CF_EOF
16772 rm -f \$TMPSRC
16773 sed -f \$TMPSED \$SRC > \$TMPSRC
16774 NAME=\`basename \$SRC\`
16775 CF_EOF
16776 if test $WITH_CURSES_H != yes; then
16777         cat >>headers.sh <<CF_EOF
16778 test "\$NAME" = "curses.h" && NAME=ncurses.h
16779 CF_EOF
16780 fi
16781 cat >>headers.sh <<CF_EOF
16782 # Just in case someone gzip'd manpages, remove the conflicting copy.
16783 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
16784
16785 eval \$PRG \$TMPSRC \$DST/\$NAME
16786 rm -f \$TMPSRC \$TMPSED
16787 CF_EOF
16788
16789 chmod 0755 headers.sh
16790
16791 for cf_dir in $SRC_SUBDIRS
16792 do
16793         if test ! -d $srcdir/$cf_dir ; then
16794                 continue
16795         fi
16796
16797         if test -f $srcdir/$cf_dir/headers; then
16798         cat >>$cf_dir/Makefile <<CF_EOF
16799 \${DESTDIR}\${includedir} :
16800         sh \${srcdir}/../mkinstalldirs \$@
16801
16802 install \\
16803 install.libs \\
16804 install.includes :: \${AUTO_SRC} \${DESTDIR}\${includedir} \\
16805 CF_EOF
16806                 j=""
16807                 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
16808                 do
16809                         test -n "$j" && echo "          $j \\" >>$cf_dir/Makefile
16810                         j=$i
16811                 done
16812
16813                 echo "          $j" >>$cf_dir/Makefile
16814
16815                 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
16816                 do
16817                         echo "  @ (cd \${DESTDIR}\${includedir} && rm -f `basename $i`) ; ../headers.sh \${INSTALL_DATA} \${DESTDIR}\${includedir} \${srcdir} $i" >>$cf_dir/Makefile
16818                         test $i = curses.h && test $WITH_CURSES_H = yes && echo "       @ (cd \${DESTDIR}\${includedir} && rm -f ncurses.h && \${LN_S} curses.h ncurses.h)" >>$cf_dir/Makefile
16819                 done
16820
16821         cat >>$cf_dir/Makefile <<CF_EOF
16822
16823 uninstall \\
16824 uninstall.libs \\
16825 uninstall.includes ::
16826 CF_EOF
16827                 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
16828                 do
16829                         i=`basename $i`
16830                         echo "  -@ (cd \${DESTDIR}\${includedir} && rm -f $i)" >>$cf_dir/Makefile
16831                         test $i = curses.h && echo "    -@ (cd \${DESTDIR}\${includedir} && rm -f ncurses.h)" >>$cf_dir/Makefile
16832                 done
16833         fi
16834
16835         if test -f $srcdir/$cf_dir/modules; then
16836                 if test "$cf_dir" != "c++" ; then
16837                         cat >>$cf_dir/Makefile <<"CF_EOF"
16838 depend : ${AUTO_SRC}
16839         makedepend -- ${CPPFLAGS} -- ${C_SRC}
16840
16841 # DO NOT DELETE THIS LINE -- make depend depends on it.
16842 CF_EOF
16843                 fi
16844         fi
16845 done
16846
16847  ;;
16848   esac
16849 done
16850 EOF
16851
16852 cat >>$CONFIG_STATUS <<\EOF
16853
16854 { (exit 0); exit 0; }
16855 EOF
16856 chmod +x $CONFIG_STATUS
16857 ac_clean_files=$ac_clean_files_save
16858
16859 # configure is writing to config.log, and then calls config.status.
16860 # config.status does its own redirection, appending to config.log.
16861 # Unfortunately, on DOS this fails, as config.log is still kept open
16862 # by configure, so config.status won't be able to write to it; its
16863 # output is simply discarded.  So we exec the FD to /dev/null,
16864 # effectively closing config.log, so it can be properly (re)opened and
16865 # appended to by config.status.  When coming back to configure, we
16866 # need to make the FD available again.
16867 if test "$no_create" != yes; then
16868   ac_cs_success=:
16869   exec 5>/dev/null
16870   $SHELL $CONFIG_STATUS || ac_cs_success=false
16871   exec 5>>config.log
16872   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16873   # would make configure fail if this is the last instruction.
16874   $ac_cs_success || { (exit 1); exit 1; }
16875 fi
16876 ${MAKE-make} preinstall