]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.6 - patch 20061230
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.384 .
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 '/^$/d' -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         openbsd[2-9].*)
5025                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5026                 MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5027                 ;;
5028         openbsd*|freebsd[12].*)
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 cf_man_alias=`pwd`/man_alias.sed
8051
8052 cat >$cf_edit_man <<CF_EOF
8053 #! /bin/sh
8054 # this script is generated by the configure-script CF_MAN_PAGES macro.
8055
8056 prefix="$cf_prefix"
8057 datadir="$datadir"
8058
8059 NCURSES_MAJOR="$NCURSES_MAJOR"
8060 NCURSES_MINOR="$NCURSES_MINOR"
8061 NCURSES_PATCH="$NCURSES_PATCH"
8062
8063 NCURSES_OSPEED="$NCURSES_OSPEED"
8064 TERMINFO="$TERMINFO"
8065
8066 MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"
8067
8068 INSTALL="$INSTALL"
8069 INSTALL_DATA="$INSTALL_DATA"
8070
8071 transform="$program_transform_name"
8072
8073 TMP=\${TMPDIR-/tmp}/man\$\$
8074 trap "rm -f \$TMP" 0 1 2 5 15
8075
8076 form=\$1
8077 shift || exit 1
8078
8079 verb=\$1
8080 shift || exit 1
8081
8082 mandir=\$1
8083 shift || exit 1
8084
8085 srcdir=\$1
8086 top_srcdir=\$srcdir/..
8087 shift || exit 1
8088
8089 if test "\$form" = normal ; then
8090         if test "$cf_format" = yes ; then
8091         if test "$cf_inboth" = no ; then
8092                 sh \$0 format \$verb \$mandir \$srcdir \$*
8093                 exit $?
8094         fi
8095         fi
8096         cf_subdir=\$mandir/man
8097         cf_tables=$MANPAGE_TBL
8098 else
8099         cf_subdir=\$mandir/cat
8100         cf_tables=yes
8101 fi
8102
8103 # process the list of source-files
8104 for i in \$* ; do
8105 case \$i in #(vi
8106 *.orig|*.rej) ;; #(vi
8107 *.[0-9]*)
8108         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8109         if test \$verb = installing ; then
8110         if test ! -d \$cf_subdir\${section} ; then
8111                 \$MKDIRS \$cf_subdir\$section
8112         fi
8113         fi
8114
8115         # replace variables in man page
8116         if test ! -f $cf_man_alias ; then
8117 cat >>$cf_man_alias <<-CF_EOF2
8118                 s,@DATADIR@,\$datadir,
8119                 s,@TERMINFO@,\$TERMINFO,
8120                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,
8121                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,
8122                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,
8123                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,
8124 CF_EOF
8125
8126         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8127         do
8128                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8129                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8130 cat >>$cf_edit_man <<-CF_EOF
8131                 s,@$cf_NAME@,$cf_name,
8132 CF_EOF
8133         done
8134
8135 cat >>$cf_edit_man <<CF_EOF
8136 CF_EOF2
8137                 echo "...made $cf_man_alias"
8138         fi
8139
8140         aliases=
8141         cf_source=\`basename \$i\`
8142         inalias=\$cf_source
8143         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8144         if test ! -f \$inalias ; then
8145                 echo .. skipped \$cf_source
8146                 continue
8147         fi
8148 CF_EOF
8149
8150 if test "$MANPAGE_ALIASES" != no ; then
8151 cat >>$cf_edit_man <<CF_EOF
8152         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8153 CF_EOF
8154 fi
8155
8156 if test "$MANPAGE_RENAMES" = no ; then
8157 cat >>$cf_edit_man <<CF_EOF
8158         # perform program transformations for section 1 man pages
8159         if test \$section = 1 ; then
8160                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8161         else
8162                 cf_target=\$cf_subdir\${section}/\$cf_source
8163         fi
8164 CF_EOF
8165 else
8166 cat >>$cf_edit_man <<CF_EOF
8167         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8168         if test -z "\$cf_target" ; then
8169                 echo '? missing rename for '\$cf_source
8170                 cf_target="\$cf_source"
8171         fi
8172         cf_target="\$cf_subdir\${section}/\${cf_target}"
8173
8174 CF_EOF
8175 fi
8176
8177 cat >>$cf_edit_man <<CF_EOF
8178         sed     -f $cf_man_alias \\
8179 CF_EOF
8180
8181 if test -f $MANPAGE_RENAMES ; then
8182 cat >>$cf_edit_man <<CF_EOF
8183                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8184 CF_EOF
8185 else
8186 cat >>$cf_edit_man <<CF_EOF
8187                 < \$i >\$TMP
8188 CF_EOF
8189 fi
8190
8191 cat >>$cf_edit_man <<CF_EOF
8192 if test \$cf_tables = yes ; then
8193         tbl \$TMP >\$TMP.out
8194         mv \$TMP.out \$TMP
8195 fi
8196 CF_EOF
8197
8198 if test $with_curses_h != yes ; then
8199 cat >>$cf_edit_man <<CF_EOF
8200         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8201         mv \$TMP.out \$TMP
8202 CF_EOF
8203 fi
8204
8205 cat >>$cf_edit_man <<CF_EOF
8206         if test \$form = format ; then
8207                 nroff -man \$TMP >\$TMP.out
8208                 mv \$TMP.out \$TMP
8209         fi
8210 CF_EOF
8211
8212 if test -n "$cf_compress" ; then
8213 cat >>$cf_edit_man <<CF_EOF
8214         if test \$verb = installing ; then
8215         if ( $cf_compress -f \$TMP )
8216         then
8217                 mv \$TMP.$cf_so_strip \$TMP
8218         fi
8219         fi
8220         cf_target="\$cf_target.$cf_so_strip"
8221 CF_EOF
8222 fi
8223
8224 case "$MANPAGE_FORMAT" in #(vi
8225 *BSDI*)
8226 cat >>$cf_edit_man <<CF_EOF
8227         if test \$form = format ; then
8228                 # BSDI installs only .0 suffixes in the cat directories
8229                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8230         fi
8231 CF_EOF
8232   ;;
8233 esac
8234
8235 cat >>$cf_edit_man <<CF_EOF
8236         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8237         if test \$verb = installing ; then
8238                 echo \$verb \$cf_target
8239                 \$INSTALL_DATA \$TMP \$cf_target
8240                 test -n "\$aliases" && (
8241                         cd \$cf_subdir\${section} && (
8242                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8243                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8244                                 cf_target=\`basename \$cf_target\`
8245                                 for cf_alias in \$aliases
8246                                 do
8247                                         if test \$section = 1 ; then
8248                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8249                                         fi
8250
8251                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8252                                                 if test -f \$cf_alias\${suffix} ; then
8253                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8254                                                         then
8255                                                                 continue
8256                                                         fi
8257                                                 fi
8258                                                 echo .. \$verb alias \$cf_alias\${suffix}
8259                                                 rm -f \$cf_alias\${suffix}
8260                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8261                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8262                                                 echo ".so \$cf_source" >\$TMP
8263 CF_EOF
8264 if test -n "$cf_compress" ; then
8265 cat >>$cf_edit_man <<CF_EOF
8266                                                 if test -n "$cf_so_strip" ; then
8267                                                         $cf_compress -f \$TMP
8268                                                         mv \$TMP.$cf_so_strip \$TMP
8269                                                 fi
8270 CF_EOF
8271 fi
8272 cat >>$cf_edit_man <<CF_EOF
8273                                                 echo .. \$verb alias \$cf_alias\${suffix}
8274                                                 rm -f \$cf_alias\${suffix}
8275                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8276                                         fi
8277                                 done
8278                         )
8279                 )
8280         elif test \$verb = removing ; then
8281                 echo \$verb \$cf_target
8282                 rm -f \$cf_target
8283                 test -n "\$aliases" && (
8284                         cd \$cf_subdir\${section} && (
8285                                 for cf_alias in \$aliases
8286                                 do
8287                                         if test \$section = 1 ; then
8288                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8289                                         fi
8290
8291                                         echo .. \$verb alias \$cf_alias\${suffix}
8292                                         rm -f \$cf_alias\${suffix}
8293                                 done
8294                         )
8295                 )
8296         else
8297 #               echo ".hy 0"
8298                 cat \$TMP
8299         fi
8300         ;;
8301 esac
8302 done
8303
8304 if test $cf_inboth = yes ; then
8305 if test \$form != format ; then
8306         sh \$0 format \$verb \$mandir \$srcdir \$*
8307 fi
8308 fi
8309
8310 exit 0
8311 CF_EOF
8312 chmod 755 $cf_edit_man
8313
8314 ###############################################################################
8315
8316 ### Note that some functions (such as const) are normally disabled anyway.
8317 echo "$as_me:8317: checking if you want to build with function extensions" >&5
8318 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8319
8320 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8321 if test "${enable_ext_funcs+set}" = set; then
8322   enableval="$enable_ext_funcs"
8323   with_ext_funcs=$enableval
8324 else
8325   with_ext_funcs=yes
8326 fi;
8327 echo "$as_me:8327: result: $with_ext_funcs" >&5
8328 echo "${ECHO_T}$with_ext_funcs" >&6
8329 if test "$with_ext_funcs" = yes ; then
8330         NCURSES_EXT_FUNCS=1
8331         cat >>confdefs.h <<\EOF
8332 #define HAVE_CURSES_VERSION 1
8333 EOF
8334
8335         cat >>confdefs.h <<\EOF
8336 #define HAVE_HAS_KEY 1
8337 EOF
8338
8339         cat >>confdefs.h <<\EOF
8340 #define HAVE_RESIZETERM 1
8341 EOF
8342
8343         cat >>confdefs.h <<\EOF
8344 #define HAVE_RESIZE_TERM 1
8345 EOF
8346
8347         cat >>confdefs.h <<\EOF
8348 #define HAVE_USE_DEFAULT_COLORS 1
8349 EOF
8350
8351         cat >>confdefs.h <<\EOF
8352 #define HAVE_WRESIZE 1
8353 EOF
8354
8355         cat >>confdefs.h <<\EOF
8356 #define NCURSES_EXT_FUNCS 1
8357 EOF
8358
8359 else
8360         NCURSES_EXT_FUNCS=0
8361 fi
8362
8363 ###   use option --enable-const to turn on use of const beyond that in XSI.
8364 echo "$as_me:8364: checking for extended use of const keyword" >&5
8365 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8366
8367 # Check whether --enable-const or --disable-const was given.
8368 if test "${enable_const+set}" = set; then
8369   enableval="$enable_const"
8370   with_ext_const=$enableval
8371 else
8372   with_ext_const=no
8373 fi;
8374 echo "$as_me:8374: result: $with_ext_const" >&5
8375 echo "${ECHO_T}$with_ext_const" >&6
8376 NCURSES_CONST='/*nothing*/'
8377 if test "$with_ext_const" = yes ; then
8378         NCURSES_CONST=const
8379 fi
8380
8381 echo "$as_me:8381: checking if you want \$NCURSES_NO_PADDING code" >&5
8382 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8383
8384 # Check whether --enable-no-padding or --disable-no-padding was given.
8385 if test "${enable_no_padding+set}" = set; then
8386   enableval="$enable_no_padding"
8387   with_no_padding=$enableval
8388 else
8389   with_no_padding=$with_ext_funcs
8390 fi;
8391 echo "$as_me:8391: result: $with_no_padding" >&5
8392 echo "${ECHO_T}$with_no_padding" >&6
8393 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8394 #define NCURSES_NO_PADDING 1
8395 EOF
8396
8397 echo "$as_me:8397: checking for ANSI C header files" >&5
8398 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8399 if test "${ac_cv_header_stdc+set}" = set; then
8400   echo $ECHO_N "(cached) $ECHO_C" >&6
8401 else
8402   cat >conftest.$ac_ext <<_ACEOF
8403 #line 8403 "configure"
8404 #include "confdefs.h"
8405 #include <stdlib.h>
8406 #include <stdarg.h>
8407 #include <string.h>
8408 #include <float.h>
8409
8410 _ACEOF
8411 if { (eval echo "$as_me:8411: \"$ac_cpp conftest.$ac_ext\"") >&5
8412   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8413   ac_status=$?
8414   egrep -v '^ *\+' conftest.er1 >conftest.err
8415   rm -f conftest.er1
8416   cat conftest.err >&5
8417   echo "$as_me:8417: \$? = $ac_status" >&5
8418   (exit $ac_status); } >/dev/null; then
8419   if test -s conftest.err; then
8420     ac_cpp_err=$ac_c_preproc_warn_flag
8421   else
8422     ac_cpp_err=
8423   fi
8424 else
8425   ac_cpp_err=yes
8426 fi
8427 if test -z "$ac_cpp_err"; then
8428   ac_cv_header_stdc=yes
8429 else
8430   echo "$as_me: failed program was:" >&5
8431   cat conftest.$ac_ext >&5
8432   ac_cv_header_stdc=no
8433 fi
8434 rm -f conftest.err conftest.$ac_ext
8435
8436 if test $ac_cv_header_stdc = yes; then
8437   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8438   cat >conftest.$ac_ext <<_ACEOF
8439 #line 8439 "configure"
8440 #include "confdefs.h"
8441 #include <string.h>
8442
8443 _ACEOF
8444 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8445   egrep "memchr" >/dev/null 2>&1; then
8446   :
8447 else
8448   ac_cv_header_stdc=no
8449 fi
8450 rm -f conftest*
8451
8452 fi
8453
8454 if test $ac_cv_header_stdc = yes; then
8455   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8456   cat >conftest.$ac_ext <<_ACEOF
8457 #line 8457 "configure"
8458 #include "confdefs.h"
8459 #include <stdlib.h>
8460
8461 _ACEOF
8462 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8463   egrep "free" >/dev/null 2>&1; then
8464   :
8465 else
8466   ac_cv_header_stdc=no
8467 fi
8468 rm -f conftest*
8469
8470 fi
8471
8472 if test $ac_cv_header_stdc = yes; then
8473   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8474   if test "$cross_compiling" = yes; then
8475   :
8476 else
8477   cat >conftest.$ac_ext <<_ACEOF
8478 #line 8478 "configure"
8479 #include "confdefs.h"
8480 #include <ctype.h>
8481 #if ((' ' & 0x0FF) == 0x020)
8482 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8483 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8484 #else
8485 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8486                      || ('j' <= (c) && (c) <= 'r') \
8487                      || ('s' <= (c) && (c) <= 'z'))
8488 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8489 #endif
8490
8491 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8492 int
8493 main ()
8494 {
8495   int i;
8496   for (i = 0; i < 256; i++)
8497     if (XOR (islower (i), ISLOWER (i))
8498         || toupper (i) != TOUPPER (i))
8499       $ac_main_return(2);
8500   $ac_main_return (0);
8501 }
8502 _ACEOF
8503 rm -f conftest$ac_exeext
8504 if { (eval echo "$as_me:8504: \"$ac_link\"") >&5
8505   (eval $ac_link) 2>&5
8506   ac_status=$?
8507   echo "$as_me:8507: \$? = $ac_status" >&5
8508   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8509   { (eval echo "$as_me:8509: \"$ac_try\"") >&5
8510   (eval $ac_try) 2>&5
8511   ac_status=$?
8512   echo "$as_me:8512: \$? = $ac_status" >&5
8513   (exit $ac_status); }; }; then
8514   :
8515 else
8516   echo "$as_me: program exited with status $ac_status" >&5
8517 echo "$as_me: failed program was:" >&5
8518 cat conftest.$ac_ext >&5
8519 ac_cv_header_stdc=no
8520 fi
8521 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8522 fi
8523 fi
8524 fi
8525 echo "$as_me:8525: result: $ac_cv_header_stdc" >&5
8526 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8527 if test $ac_cv_header_stdc = yes; then
8528
8529 cat >>confdefs.h <<\EOF
8530 #define STDC_HEADERS 1
8531 EOF
8532
8533 fi
8534
8535 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8536
8537 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8538                   inttypes.h stdint.h unistd.h
8539 do
8540 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8541 echo "$as_me:8541: checking for $ac_header" >&5
8542 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8543 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8544   echo $ECHO_N "(cached) $ECHO_C" >&6
8545 else
8546   cat >conftest.$ac_ext <<_ACEOF
8547 #line 8547 "configure"
8548 #include "confdefs.h"
8549 $ac_includes_default
8550 #include <$ac_header>
8551 _ACEOF
8552 rm -f conftest.$ac_objext
8553 if { (eval echo "$as_me:8553: \"$ac_compile\"") >&5
8554   (eval $ac_compile) 2>&5
8555   ac_status=$?
8556   echo "$as_me:8556: \$? = $ac_status" >&5
8557   (exit $ac_status); } &&
8558          { ac_try='test -s conftest.$ac_objext'
8559   { (eval echo "$as_me:8559: \"$ac_try\"") >&5
8560   (eval $ac_try) 2>&5
8561   ac_status=$?
8562   echo "$as_me:8562: \$? = $ac_status" >&5
8563   (exit $ac_status); }; }; then
8564   eval "$as_ac_Header=yes"
8565 else
8566   echo "$as_me: failed program was:" >&5
8567 cat conftest.$ac_ext >&5
8568 eval "$as_ac_Header=no"
8569 fi
8570 rm -f conftest.$ac_objext conftest.$ac_ext
8571 fi
8572 echo "$as_me:8572: result: `eval echo '${'$as_ac_Header'}'`" >&5
8573 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8574 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8575   cat >>confdefs.h <<EOF
8576 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8577 EOF
8578
8579 fi
8580 done
8581
8582 echo "$as_me:8582: checking for signed char" >&5
8583 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8584 if test "${ac_cv_type_signed_char+set}" = set; then
8585   echo $ECHO_N "(cached) $ECHO_C" >&6
8586 else
8587   cat >conftest.$ac_ext <<_ACEOF
8588 #line 8588 "configure"
8589 #include "confdefs.h"
8590 $ac_includes_default
8591 int
8592 main ()
8593 {
8594 if ((signed char *) 0)
8595   return 0;
8596 if (sizeof (signed char))
8597   return 0;
8598   ;
8599   return 0;
8600 }
8601 _ACEOF
8602 rm -f conftest.$ac_objext
8603 if { (eval echo "$as_me:8603: \"$ac_compile\"") >&5
8604   (eval $ac_compile) 2>&5
8605   ac_status=$?
8606   echo "$as_me:8606: \$? = $ac_status" >&5
8607   (exit $ac_status); } &&
8608          { ac_try='test -s conftest.$ac_objext'
8609   { (eval echo "$as_me:8609: \"$ac_try\"") >&5
8610   (eval $ac_try) 2>&5
8611   ac_status=$?
8612   echo "$as_me:8612: \$? = $ac_status" >&5
8613   (exit $ac_status); }; }; then
8614   ac_cv_type_signed_char=yes
8615 else
8616   echo "$as_me: failed program was:" >&5
8617 cat conftest.$ac_ext >&5
8618 ac_cv_type_signed_char=no
8619 fi
8620 rm -f conftest.$ac_objext conftest.$ac_ext
8621 fi
8622 echo "$as_me:8622: result: $ac_cv_type_signed_char" >&5
8623 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8624
8625 echo "$as_me:8625: checking size of signed char" >&5
8626 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8627 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8628   echo $ECHO_N "(cached) $ECHO_C" >&6
8629 else
8630   if test "$ac_cv_type_signed_char" = yes; then
8631   if test "$cross_compiling" = yes; then
8632   # Depending upon the size, compute the lo and hi bounds.
8633 cat >conftest.$ac_ext <<_ACEOF
8634 #line 8634 "configure"
8635 #include "confdefs.h"
8636 $ac_includes_default
8637 int
8638 main ()
8639 {
8640 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8641   ;
8642   return 0;
8643 }
8644 _ACEOF
8645 rm -f conftest.$ac_objext
8646 if { (eval echo "$as_me:8646: \"$ac_compile\"") >&5
8647   (eval $ac_compile) 2>&5
8648   ac_status=$?
8649   echo "$as_me:8649: \$? = $ac_status" >&5
8650   (exit $ac_status); } &&
8651          { ac_try='test -s conftest.$ac_objext'
8652   { (eval echo "$as_me:8652: \"$ac_try\"") >&5
8653   (eval $ac_try) 2>&5
8654   ac_status=$?
8655   echo "$as_me:8655: \$? = $ac_status" >&5
8656   (exit $ac_status); }; }; then
8657   ac_lo=0 ac_mid=0
8658   while :; do
8659     cat >conftest.$ac_ext <<_ACEOF
8660 #line 8660 "configure"
8661 #include "confdefs.h"
8662 $ac_includes_default
8663 int
8664 main ()
8665 {
8666 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8667   ;
8668   return 0;
8669 }
8670 _ACEOF
8671 rm -f conftest.$ac_objext
8672 if { (eval echo "$as_me:8672: \"$ac_compile\"") >&5
8673   (eval $ac_compile) 2>&5
8674   ac_status=$?
8675   echo "$as_me:8675: \$? = $ac_status" >&5
8676   (exit $ac_status); } &&
8677          { ac_try='test -s conftest.$ac_objext'
8678   { (eval echo "$as_me:8678: \"$ac_try\"") >&5
8679   (eval $ac_try) 2>&5
8680   ac_status=$?
8681   echo "$as_me:8681: \$? = $ac_status" >&5
8682   (exit $ac_status); }; }; then
8683   ac_hi=$ac_mid; break
8684 else
8685   echo "$as_me: failed program was:" >&5
8686 cat conftest.$ac_ext >&5
8687 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8688 fi
8689 rm -f conftest.$ac_objext conftest.$ac_ext
8690   done
8691 else
8692   echo "$as_me: failed program was:" >&5
8693 cat conftest.$ac_ext >&5
8694 ac_hi=-1 ac_mid=-1
8695   while :; do
8696     cat >conftest.$ac_ext <<_ACEOF
8697 #line 8697 "configure"
8698 #include "confdefs.h"
8699 $ac_includes_default
8700 int
8701 main ()
8702 {
8703 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8704   ;
8705   return 0;
8706 }
8707 _ACEOF
8708 rm -f conftest.$ac_objext
8709 if { (eval echo "$as_me:8709: \"$ac_compile\"") >&5
8710   (eval $ac_compile) 2>&5
8711   ac_status=$?
8712   echo "$as_me:8712: \$? = $ac_status" >&5
8713   (exit $ac_status); } &&
8714          { ac_try='test -s conftest.$ac_objext'
8715   { (eval echo "$as_me:8715: \"$ac_try\"") >&5
8716   (eval $ac_try) 2>&5
8717   ac_status=$?
8718   echo "$as_me:8718: \$? = $ac_status" >&5
8719   (exit $ac_status); }; }; then
8720   ac_lo=$ac_mid; break
8721 else
8722   echo "$as_me: failed program was:" >&5
8723 cat conftest.$ac_ext >&5
8724 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8725 fi
8726 rm -f conftest.$ac_objext conftest.$ac_ext
8727   done
8728 fi
8729 rm -f conftest.$ac_objext conftest.$ac_ext
8730 # Binary search between lo and hi bounds.
8731 while test "x$ac_lo" != "x$ac_hi"; do
8732   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8733   cat >conftest.$ac_ext <<_ACEOF
8734 #line 8734 "configure"
8735 #include "confdefs.h"
8736 $ac_includes_default
8737 int
8738 main ()
8739 {
8740 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8741   ;
8742   return 0;
8743 }
8744 _ACEOF
8745 rm -f conftest.$ac_objext
8746 if { (eval echo "$as_me:8746: \"$ac_compile\"") >&5
8747   (eval $ac_compile) 2>&5
8748   ac_status=$?
8749   echo "$as_me:8749: \$? = $ac_status" >&5
8750   (exit $ac_status); } &&
8751          { ac_try='test -s conftest.$ac_objext'
8752   { (eval echo "$as_me:8752: \"$ac_try\"") >&5
8753   (eval $ac_try) 2>&5
8754   ac_status=$?
8755   echo "$as_me:8755: \$? = $ac_status" >&5
8756   (exit $ac_status); }; }; then
8757   ac_hi=$ac_mid
8758 else
8759   echo "$as_me: failed program was:" >&5
8760 cat conftest.$ac_ext >&5
8761 ac_lo=`expr $ac_mid + 1`
8762 fi
8763 rm -f conftest.$ac_objext conftest.$ac_ext
8764 done
8765 ac_cv_sizeof_signed_char=$ac_lo
8766 else
8767   if test "$cross_compiling" = yes; then
8768   { { echo "$as_me:8768: error: cannot run test program while cross compiling" >&5
8769 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8770    { (exit 1); exit 1; }; }
8771 else
8772   cat >conftest.$ac_ext <<_ACEOF
8773 #line 8773 "configure"
8774 #include "confdefs.h"
8775 $ac_includes_default
8776 int
8777 main ()
8778 {
8779 FILE *f = fopen ("conftest.val", "w");
8780 if (!f)
8781   $ac_main_return (1);
8782 fprintf (f, "%d", (sizeof (signed char)));
8783 fclose (f);
8784   ;
8785   return 0;
8786 }
8787 _ACEOF
8788 rm -f conftest$ac_exeext
8789 if { (eval echo "$as_me:8789: \"$ac_link\"") >&5
8790   (eval $ac_link) 2>&5
8791   ac_status=$?
8792   echo "$as_me:8792: \$? = $ac_status" >&5
8793   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8794   { (eval echo "$as_me:8794: \"$ac_try\"") >&5
8795   (eval $ac_try) 2>&5
8796   ac_status=$?
8797   echo "$as_me:8797: \$? = $ac_status" >&5
8798   (exit $ac_status); }; }; then
8799   ac_cv_sizeof_signed_char=`cat conftest.val`
8800 else
8801   echo "$as_me: program exited with status $ac_status" >&5
8802 echo "$as_me: failed program was:" >&5
8803 cat conftest.$ac_ext >&5
8804 fi
8805 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8806 fi
8807 fi
8808 rm -f conftest.val
8809 else
8810   ac_cv_sizeof_signed_char=0
8811 fi
8812 fi
8813 echo "$as_me:8813: result: $ac_cv_sizeof_signed_char" >&5
8814 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
8815 cat >>confdefs.h <<EOF
8816 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
8817 EOF
8818
8819 if test "$ac_cv_sizeof_signed_char" = 1 ; then
8820         NCURSES_SBOOL="signed char"
8821 else
8822         NCURSES_SBOOL="char"
8823 fi
8824 echo "$as_me:8824: checking if you want to use signed Boolean array in term.h" >&5
8825 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
8826
8827 # Check whether --enable-signed-char or --disable-signed-char was given.
8828 if test "${enable_signed_char+set}" = set; then
8829   enableval="$enable_signed_char"
8830   with_signed_char=$enableval
8831 else
8832   with_signed_char=no
8833 fi;
8834 echo "$as_me:8834: result: $with_signed_char" >&5
8835 echo "${ECHO_T}$with_signed_char" >&6
8836 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
8837
8838 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
8839 echo "$as_me:8839: checking if you want SIGWINCH handler" >&5
8840 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
8841
8842 # Check whether --enable-sigwinch or --disable-sigwinch was given.
8843 if test "${enable_sigwinch+set}" = set; then
8844   enableval="$enable_sigwinch"
8845   with_sigwinch=$enableval
8846 else
8847   with_sigwinch=$with_ext_funcs
8848 fi;
8849 echo "$as_me:8849: result: $with_sigwinch" >&5
8850 echo "${ECHO_T}$with_sigwinch" >&6
8851 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
8852 #define USE_SIGWINCH 1
8853 EOF
8854
8855 ###   use option --enable-tcap-names to allow user to define new capabilities
8856 echo "$as_me:8856: checking if you want user-definable terminal capabilities like termcap" >&5
8857 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
8858
8859 # Check whether --enable-tcap-names or --disable-tcap-names was given.
8860 if test "${enable_tcap_names+set}" = set; then
8861   enableval="$enable_tcap_names"
8862   with_tcap_names=$enableval
8863 else
8864   with_tcap_names=$with_ext_funcs
8865 fi;
8866 echo "$as_me:8866: result: $with_tcap_names" >&5
8867 echo "${ECHO_T}$with_tcap_names" >&6
8868 NCURSES_XNAMES=0
8869 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
8870
8871 ###############################################################################
8872 # These options are relatively safe to experiment with.
8873
8874 echo "$as_me:8874: checking if you want all development code" >&5
8875 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
8876
8877 # Check whether --with-develop or --without-develop was given.
8878 if test "${with_develop+set}" = set; then
8879   withval="$with_develop"
8880   with_develop=$withval
8881 else
8882   with_develop=no
8883 fi;
8884 echo "$as_me:8884: result: $with_develop" >&5
8885 echo "${ECHO_T}$with_develop" >&6
8886
8887 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
8888 echo "$as_me:8888: checking if you want hard-tabs code" >&5
8889 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
8890
8891 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
8892 if test "${enable_hard_tabs+set}" = set; then
8893   enableval="$enable_hard_tabs"
8894
8895 else
8896   enable_hard_tabs=$with_develop
8897 fi;
8898 echo "$as_me:8898: result: $enable_hard_tabs" >&5
8899 echo "${ECHO_T}$enable_hard_tabs" >&6
8900 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
8901 #define USE_HARD_TABS 1
8902 EOF
8903
8904 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
8905 echo "$as_me:8905: checking if you want limited support for xmc" >&5
8906 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
8907
8908 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
8909 if test "${enable_xmc_glitch+set}" = set; then
8910   enableval="$enable_xmc_glitch"
8911
8912 else
8913   enable_xmc_glitch=$with_develop
8914 fi;
8915 echo "$as_me:8915: result: $enable_xmc_glitch" >&5
8916 echo "${ECHO_T}$enable_xmc_glitch" >&6
8917 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
8918 #define USE_XMC_SUPPORT 1
8919 EOF
8920
8921 ###############################################################################
8922 # These are just experimental, probably should not be in a package:
8923
8924 echo "$as_me:8924: checking if you do not want to assume colors are white-on-black" >&5
8925 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
8926
8927 # Check whether --enable-assumed-color or --disable-assumed-color was given.
8928 if test "${enable_assumed_color+set}" = set; then
8929   enableval="$enable_assumed_color"
8930   with_assumed_color=$enableval
8931 else
8932   with_assumed_color=yes
8933 fi;
8934 echo "$as_me:8934: result: $with_assumed_color" >&5
8935 echo "${ECHO_T}$with_assumed_color" >&6
8936 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
8937 #define USE_ASSUMED_COLOR 1
8938 EOF
8939
8940 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
8941 echo "$as_me:8941: checking if you want hashmap scrolling-optimization code" >&5
8942 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
8943
8944 # Check whether --enable-hashmap or --disable-hashmap was given.
8945 if test "${enable_hashmap+set}" = set; then
8946   enableval="$enable_hashmap"
8947   with_hashmap=$enableval
8948 else
8949   with_hashmap=yes
8950 fi;
8951 echo "$as_me:8951: result: $with_hashmap" >&5
8952 echo "${ECHO_T}$with_hashmap" >&6
8953 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
8954 #define USE_HASHMAP 1
8955 EOF
8956
8957 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
8958 echo "$as_me:8958: checking if you want colorfgbg code" >&5
8959 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
8960
8961 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
8962 if test "${enable_colorfgbg+set}" = set; then
8963   enableval="$enable_colorfgbg"
8964   with_colorfgbg=$enableval
8965 else
8966   with_colorfgbg=no
8967 fi;
8968 echo "$as_me:8968: result: $with_colorfgbg" >&5
8969 echo "${ECHO_T}$with_colorfgbg" >&6
8970 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
8971 #define USE_COLORFGBG 1
8972 EOF
8973
8974 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
8975 echo "$as_me:8975: checking if you want to use experimental extended colors" >&5
8976 echo $ECHO_N "checking if you want to use experimental extended colors... $ECHO_C" >&6
8977
8978 # Check whether --enable-ext-colors or --disable-ext-colors was given.
8979 if test "${enable_ext_colors+set}" = set; then
8980   enableval="$enable_ext_colors"
8981   with_ext_colors=$enableval
8982 else
8983   with_ext_colors=no
8984 fi;
8985 echo "$as_me:8985: result: $with_ext_colors" >&5
8986 echo "${ECHO_T}$with_ext_colors" >&6
8987 NCURSES_EXT_COLORS=0
8988 if test "$with_ext_colors" = yes ; then
8989         if test "$with_widec" != yes ; then
8990                 { echo "$as_me:8990: WARNING: This option applies only to wide-character library" >&5
8991 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
8992         else
8993                 # cannot be ABI 5 since it changes sizeof(cchar_t)
8994
8995 if test "${with_abi_version+set}" != set; then
8996         case $cf_cv_rel_version in
8997         5.*)
8998                 cf_cv_rel_version=6.0
8999                 cf_cv_abi_version=6
9000                 { echo "$as_me:9000: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9001 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9002                 ;;
9003         esac
9004 fi
9005
9006         fi
9007         NCURSES_EXT_COLORS=1
9008         cat >>confdefs.h <<\EOF
9009 #define NCURSES_EXT_COLORS 1
9010 EOF
9011
9012 fi
9013
9014 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9015 echo "$as_me:9015: checking if you want to use experimental extended mouse encoding" >&5
9016 echo $ECHO_N "checking if you want to use experimental extended mouse encoding... $ECHO_C" >&6
9017
9018 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9019 if test "${enable_ext_mouse+set}" = set; then
9020   enableval="$enable_ext_mouse"
9021   with_ext_mouse=$enableval
9022 else
9023   with_ext_mouse=no
9024 fi;
9025 echo "$as_me:9025: result: $with_ext_mouse" >&5
9026 echo "${ECHO_T}$with_ext_mouse" >&6
9027 NCURSES_MOUSE_VERSION=1
9028 if test "$with_ext_mouse" = yes ; then
9029         NCURSES_MOUSE_VERSION=2
9030
9031 if test "${with_abi_version+set}" != set; then
9032         case $cf_cv_rel_version in
9033         5.*)
9034                 cf_cv_rel_version=6.0
9035                 cf_cv_abi_version=6
9036                 { echo "$as_me:9036: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9037 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9038                 ;;
9039         esac
9040 fi
9041
9042 fi
9043
9044 echo "$as_me:9044: checking if you want experimental safe-sprintf code" >&5
9045 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9046
9047 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9048 if test "${enable_safe_sprintf+set}" = set; then
9049   enableval="$enable_safe_sprintf"
9050   with_safe_sprintf=$enableval
9051 else
9052   with_safe_sprintf=no
9053 fi;
9054 echo "$as_me:9054: result: $with_safe_sprintf" >&5
9055 echo "${ECHO_T}$with_safe_sprintf" >&6
9056 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9057 #define USE_SAFE_SPRINTF 1
9058 EOF
9059
9060 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9061 # when hashmap is used scroll hints are useless
9062 if test "$with_hashmap" = no ; then
9063 echo "$as_me:9063: checking if you want to experiment without scrolling-hints code" >&5
9064 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9065
9066 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9067 if test "${enable_scroll_hints+set}" = set; then
9068   enableval="$enable_scroll_hints"
9069   with_scroll_hints=$enableval
9070 else
9071   with_scroll_hints=yes
9072 fi;
9073 echo "$as_me:9073: result: $with_scroll_hints" >&5
9074 echo "${ECHO_T}$with_scroll_hints" >&6
9075 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9076 #define USE_SCROLL_HINTS 1
9077 EOF
9078
9079 fi
9080
9081 echo "$as_me:9081: checking if you want experimental wgetch-events code" >&5
9082 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9083
9084 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9085 if test "${enable_wgetch_events+set}" = set; then
9086   enableval="$enable_wgetch_events"
9087   with_wgetch_events=$enableval
9088 else
9089   with_wgetch_events=no
9090 fi;
9091 echo "$as_me:9091: result: $with_wgetch_events" >&5
9092 echo "${ECHO_T}$with_wgetch_events" >&6
9093 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9094 #define NCURSES_WGETCH_EVENTS 1
9095 EOF
9096
9097 ###############################################################################
9098
9099 ###     use option --disable-echo to suppress full display compiling commands
9100 echo "$as_me:9100: checking if you want to display full commands during build" >&5
9101 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9102
9103 # Check whether --enable-echo or --disable-echo was given.
9104 if test "${enable_echo+set}" = set; then
9105   enableval="$enable_echo"
9106   with_echo=$enableval
9107 else
9108   with_echo=yes
9109 fi;
9110 if test "$with_echo" = yes; then
9111         ECHO_LINK=
9112 else
9113         ECHO_LINK='@ echo linking $@ ... ;'
9114         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9115 fi
9116 echo "$as_me:9116: result: $with_echo" >&5
9117 echo "${ECHO_T}$with_echo" >&6
9118
9119 ###     use option --enable-warnings to turn on all gcc warnings
9120 echo "$as_me:9120: checking if you want to see compiler warnings" >&5
9121 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9122
9123 # Check whether --enable-warnings or --disable-warnings was given.
9124 if test "${enable_warnings+set}" = set; then
9125   enableval="$enable_warnings"
9126   with_warnings=$enableval
9127 fi;
9128 echo "$as_me:9128: result: $with_warnings" >&5
9129 echo "${ECHO_T}$with_warnings" >&6
9130
9131 if test -n "$with_warnings"; then
9132         ADAFLAGS="$ADAFLAGS -gnatg"
9133
9134 INTEL_COMPILER=no
9135
9136 if test "$GCC" = yes ; then
9137         case $host_os in
9138         linux*|gnu*)
9139                 echo "$as_me:9139: checking if this is really Intel C compiler" >&5
9140 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9141                 cf_save_CFLAGS="$CFLAGS"
9142                 CFLAGS="$CFLAGS -no-gcc"
9143                 cat >conftest.$ac_ext <<_ACEOF
9144 #line 9144 "configure"
9145 #include "confdefs.h"
9146
9147 int
9148 main ()
9149 {
9150
9151 #ifdef __INTEL_COMPILER
9152 #else
9153 make an error
9154 #endif
9155
9156   ;
9157   return 0;
9158 }
9159 _ACEOF
9160 rm -f conftest.$ac_objext
9161 if { (eval echo "$as_me:9161: \"$ac_compile\"") >&5
9162   (eval $ac_compile) 2>&5
9163   ac_status=$?
9164   echo "$as_me:9164: \$? = $ac_status" >&5
9165   (exit $ac_status); } &&
9166          { ac_try='test -s conftest.$ac_objext'
9167   { (eval echo "$as_me:9167: \"$ac_try\"") >&5
9168   (eval $ac_try) 2>&5
9169   ac_status=$?
9170   echo "$as_me:9170: \$? = $ac_status" >&5
9171   (exit $ac_status); }; }; then
9172   INTEL_COMPILER=yes
9173 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9174
9175 else
9176   echo "$as_me: failed program was:" >&5
9177 cat conftest.$ac_ext >&5
9178 fi
9179 rm -f conftest.$ac_objext conftest.$ac_ext
9180                 CFLAGS="$cf_save_CFLAGS"
9181                 echo "$as_me:9181: result: $INTEL_COMPILER" >&5
9182 echo "${ECHO_T}$INTEL_COMPILER" >&6
9183                 ;;
9184         esac
9185 fi
9186
9187 cat > conftest.$ac_ext <<EOF
9188 #line 9188 "configure"
9189 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9190 EOF
9191
9192 if test "$INTEL_COMPILER" = yes
9193 then
9194 # The "-wdXXX" options suppress warnings:
9195 # remark #1419: external declaration in primary source file
9196 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9197 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9198 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9199 # remark #193: zero used for undefined preprocessing identifier
9200 # remark #593: variable "curs_sb_left_arrow" was set but never used
9201 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9202 # remark #869: parameter "tw" was never referenced
9203 # remark #981: operands are evaluated in unspecified order
9204 # warning #269: invalid format string conversion
9205
9206         { echo "$as_me:9206: checking for $CC warning options..." >&5
9207 echo "$as_me: checking for $CC warning options..." >&6;}
9208         cf_save_CFLAGS="$CFLAGS"
9209         EXTRA_CFLAGS="-Wall"
9210         for cf_opt in  \
9211                 wd1419 \
9212                 wd1682 \
9213                 wd1683 \
9214                 wd1684 \
9215                 wd193 \
9216                 wd279 \
9217                 wd593 \
9218                 wd810 \
9219                 wd869 \
9220                 wd981
9221         do
9222                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9223                 if { (eval echo "$as_me:9223: \"$ac_compile\"") >&5
9224   (eval $ac_compile) 2>&5
9225   ac_status=$?
9226   echo "$as_me:9226: \$? = $ac_status" >&5
9227   (exit $ac_status); }; then
9228                         test -n "$verbose" && echo "$as_me:9228: result: ... -$cf_opt" >&5
9229 echo "${ECHO_T}... -$cf_opt" >&6
9230                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9231                 fi
9232         done
9233         CFLAGS="$cf_save_CFLAGS"
9234
9235 elif test "$GCC" = yes
9236 then
9237         { echo "$as_me:9237: checking for $CC warning options..." >&5
9238 echo "$as_me: checking for $CC warning options..." >&6;}
9239         cf_save_CFLAGS="$CFLAGS"
9240         EXTRA_CFLAGS="-W -Wall"
9241         cf_warn_CONST=""
9242         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9243         for cf_opt in \
9244                 Wbad-function-cast \
9245                 Wcast-align \
9246                 Wcast-qual \
9247                 Winline \
9248                 Wmissing-declarations \
9249                 Wmissing-prototypes \
9250                 Wnested-externs \
9251                 Wpointer-arith \
9252                 Wshadow \
9253                 Wstrict-prototypes \
9254                 Wundef $cf_warn_CONST
9255         do
9256                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9257                 if { (eval echo "$as_me:9257: \"$ac_compile\"") >&5
9258   (eval $ac_compile) 2>&5
9259   ac_status=$?
9260   echo "$as_me:9260: \$? = $ac_status" >&5
9261   (exit $ac_status); }; then
9262                         test -n "$verbose" && echo "$as_me:9262: result: ... -$cf_opt" >&5
9263 echo "${ECHO_T}... -$cf_opt" >&6
9264                         case $cf_opt in #(vi
9265                         Wcast-qual) #(vi
9266                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9267                                 ;;
9268                         Winline) #(vi
9269                                 case $GCC_VERSION in
9270                                 3.3*)
9271                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9272
9273                                         continue;;
9274                                 esac
9275                                 ;;
9276                         esac
9277                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9278                 fi
9279         done
9280         CFLAGS="$cf_save_CFLAGS"
9281 fi
9282 rm -f conftest*
9283
9284         if test "$cf_with_cxx" = yes ; then
9285
9286 INTEL_CPLUSPLUS=no
9287
9288 if test "$GCC" = yes ; then
9289         case $host_os in
9290         linux*|gnu*)
9291                 echo "$as_me:9291: checking if this is really Intel C++ compiler" >&5
9292 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9293                 cf_save_CFLAGS="$CXXFLAGS"
9294                 CXXFLAGS="$CXXFLAGS -no-gcc"
9295                 cat >conftest.$ac_ext <<_ACEOF
9296 #line 9296 "configure"
9297 #include "confdefs.h"
9298
9299 int
9300 main ()
9301 {
9302
9303 #ifdef __INTEL_COMPILER
9304 #else
9305 make an error
9306 #endif
9307
9308   ;
9309   return 0;
9310 }
9311 _ACEOF
9312 rm -f conftest.$ac_objext
9313 if { (eval echo "$as_me:9313: \"$ac_compile\"") >&5
9314   (eval $ac_compile) 2>&5
9315   ac_status=$?
9316   echo "$as_me:9316: \$? = $ac_status" >&5
9317   (exit $ac_status); } &&
9318          { ac_try='test -s conftest.$ac_objext'
9319   { (eval echo "$as_me:9319: \"$ac_try\"") >&5
9320   (eval $ac_try) 2>&5
9321   ac_status=$?
9322   echo "$as_me:9322: \$? = $ac_status" >&5
9323   (exit $ac_status); }; }; then
9324   INTEL_CPLUSPLUS=yes
9325 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9326
9327 else
9328   echo "$as_me: failed program was:" >&5
9329 cat conftest.$ac_ext >&5
9330 fi
9331 rm -f conftest.$ac_objext conftest.$ac_ext
9332                 CXXFLAGS="$cf_save_CFLAGS"
9333                 echo "$as_me:9333: result: $INTEL_CPLUSPLUS" >&5
9334 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9335                 ;;
9336         esac
9337 fi
9338
9339 ac_ext=cc
9340 ac_cpp='$CXXCPP $CPPFLAGS'
9341 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9342 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9343 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9344 ac_main_return=return
9345
9346 cat > conftest.$ac_ext <<EOF
9347 #line 9347 "configure"
9348 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9349 EOF
9350
9351 if test "$INTEL_CPLUSPLUS" = yes
9352 then
9353 # The "-wdXXX" options suppress warnings:
9354 # remark #1419: external declaration in primary source file
9355 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9356 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9357 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9358 # remark #193: zero used for undefined preprocessing identifier
9359 # remark #593: variable "curs_sb_left_arrow" was set but never used
9360 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9361 # remark #869: parameter "tw" was never referenced
9362 # remark #981: operands are evaluated in unspecified order
9363 # warning #269: invalid format string conversion
9364
9365         { echo "$as_me:9365: checking for $CC warning options..." >&5
9366 echo "$as_me: checking for $CC warning options..." >&6;}
9367         cf_save_CXXFLAGS="$CXXFLAGS"
9368         EXTRA_CXXFLAGS="-Wall"
9369         for cf_opt in \
9370                 wd1419 \
9371                 wd1682 \
9372                 wd1683 \
9373                 wd1684 \
9374                 wd193 \
9375                 wd279 \
9376                 wd593 \
9377                 wd810 \
9378                 wd869 \
9379                 wd981
9380         do
9381                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9382                 if { (eval echo "$as_me:9382: \"$ac_compile\"") >&5
9383   (eval $ac_compile) 2>&5
9384   ac_status=$?
9385   echo "$as_me:9385: \$? = $ac_status" >&5
9386   (exit $ac_status); }; then
9387                         test -n "$verbose" && echo "$as_me:9387: result: ... -$cf_opt" >&5
9388 echo "${ECHO_T}... -$cf_opt" >&6
9389                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9390                 fi
9391         done
9392         CXXFLAGS="$cf_save_CXXFLAGS"
9393
9394 elif test "$GXX" = yes
9395 then
9396         { echo "$as_me:9396: checking for $CXX warning options..." >&5
9397 echo "$as_me: checking for $CXX warning options..." >&6;}
9398         cf_save_CXXFLAGS="$CXXFLAGS"
9399         EXTRA_CXXFLAGS="-W -Wall"
9400         cf_gxx_extra_warnings=""
9401         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9402         case "$GCC_VERSION" in
9403         [1-2].*)
9404                 ;;
9405         *)
9406                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9407                 ;;
9408         esac
9409         for cf_opt in \
9410                 Wabi \
9411                 fabi-version=0 \
9412                 Woverloaded-virtual \
9413                 Wsign-promo \
9414                 Wsynth \
9415                 Wold-style-cast \
9416                 Wcast-align \
9417                 Wcast-qual \
9418                 Wmissing-prototypes \
9419                 Wpointer-arith \
9420                 Wshadow \
9421                 Wstrict-prototypes \
9422                 Wundef $cf_gxx_extra_warnings Wno-unused
9423         do
9424                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9425                 if { (eval echo "$as_me:9425: \"$ac_compile\"") >&5
9426   (eval $ac_compile) 2>&5
9427   ac_status=$?
9428   echo "$as_me:9428: \$? = $ac_status" >&5
9429   (exit $ac_status); }; then
9430                         test -n "$verbose" && echo "$as_me:9430: result: ... -$cf_opt" >&5
9431 echo "${ECHO_T}... -$cf_opt" >&6
9432                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9433                 else
9434                         test -n "$verbose" && echo "$as_me:9434: result: ... no -$cf_opt" >&5
9435 echo "${ECHO_T}... no -$cf_opt" >&6
9436                 fi
9437         done
9438         CXXFLAGS="$cf_save_CXXFLAGS"
9439 fi
9440
9441 rm -f conftest*
9442 ac_ext=c
9443 ac_cpp='$CPP $CPPFLAGS'
9444 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9445 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9446 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9447 ac_main_return=return
9448
9449         fi
9450 fi
9451
9452 if test "$GCC" = yes
9453 then
9454 cat > conftest.i <<EOF
9455 #ifndef GCC_PRINTF
9456 #define GCC_PRINTF 0
9457 #endif
9458 #ifndef GCC_SCANF
9459 #define GCC_SCANF 0
9460 #endif
9461 #ifndef GCC_NORETURN
9462 #define GCC_NORETURN /* nothing */
9463 #endif
9464 #ifndef GCC_UNUSED
9465 #define GCC_UNUSED /* nothing */
9466 #endif
9467 EOF
9468 if test "$GCC" = yes
9469 then
9470         { echo "$as_me:9470: checking for $CC __attribute__ directives..." >&5
9471 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9472 cat > conftest.$ac_ext <<EOF
9473 #line 9473 "configure"
9474 #include "confdefs.h"
9475 #include "conftest.h"
9476 #include "conftest.i"
9477 #if     GCC_PRINTF
9478 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9479 #else
9480 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9481 #endif
9482 #if     GCC_SCANF
9483 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9484 #else
9485 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9486 #endif
9487 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9488 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9489 extern void foo(void) GCC_NORETURN;
9490 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9491 EOF
9492         for cf_attribute in scanf printf unused noreturn
9493         do
9494
9495 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9496
9497                 cf_directive="__attribute__(($cf_attribute))"
9498                 echo "checking for $CC $cf_directive" 1>&5
9499                 case $cf_attribute in
9500                 scanf|printf)
9501                 cat >conftest.h <<EOF
9502 #define GCC_$cf_ATTRIBUTE 1
9503 EOF
9504                         ;;
9505                 *)
9506                 cat >conftest.h <<EOF
9507 #define GCC_$cf_ATTRIBUTE $cf_directive
9508 EOF
9509                         ;;
9510                 esac
9511                 if { (eval echo "$as_me:9511: \"$ac_compile\"") >&5
9512   (eval $ac_compile) 2>&5
9513   ac_status=$?
9514   echo "$as_me:9514: \$? = $ac_status" >&5
9515   (exit $ac_status); }; then
9516                         test -n "$verbose" && echo "$as_me:9516: result: ... $cf_attribute" >&5
9517 echo "${ECHO_T}... $cf_attribute" >&6
9518                         cat conftest.h >>confdefs.h
9519                 fi
9520         done
9521 else
9522         fgrep define conftest.i >>confdefs.h
9523 fi
9524 rm -rf conftest*
9525 fi
9526
9527 ###     use option --enable-assertions to turn on generation of assertion code
9528 echo "$as_me:9528: checking if you want to enable runtime assertions" >&5
9529 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9530
9531 # Check whether --enable-assertions or --disable-assertions was given.
9532 if test "${enable_assertions+set}" = set; then
9533   enableval="$enable_assertions"
9534   with_assertions=$enableval
9535 else
9536   with_assertions=no
9537 fi;
9538 echo "$as_me:9538: result: $with_assertions" >&5
9539 echo "${ECHO_T}$with_assertions" >&6
9540 if test -n "$GCC"
9541 then
9542         if test "$with_assertions" = no
9543         then
9544                 cat >>confdefs.h <<\EOF
9545 #define NDEBUG 1
9546 EOF
9547
9548                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9549         else
9550                 ADAFLAGS="$ADAFLAGS -gnata"
9551         fi
9552 fi
9553
9554 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9555
9556 echo "$as_me:9556: checking if you want to use dmalloc for testing" >&5
9557 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9558
9559 # Check whether --with-dmalloc or --without-dmalloc was given.
9560 if test "${with_dmalloc+set}" = set; then
9561   withval="$with_dmalloc"
9562   cat >>confdefs.h <<\EOF
9563 #define USE_DMALLOC 1
9564 EOF
9565
9566         : ${with_cflags:=-g}
9567         : ${with_no_leaks:=yes}
9568          with_dmalloc=yes
9569 else
9570   with_dmalloc=
9571 fi;
9572 echo "$as_me:9572: result: ${with_dmalloc:-no}" >&5
9573 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9574
9575 case .$with_cflags in #(vi
9576 .*-g*)
9577         case .$CFLAGS in #(vi
9578         .*-g*) #(vi
9579                 ;;
9580         *)
9581
9582 cf_fix_cppflags=no
9583 cf_new_cflags=
9584 cf_new_cppflags=
9585 cf_new_extra_cppflags=
9586
9587 for cf_add_cflags in -g
9588 do
9589 case $cf_fix_cppflags in
9590 no)
9591         case $cf_add_cflags in #(vi
9592         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9593                 case $cf_add_cflags in
9594                 -D*)
9595                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9596
9597                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9598                         && test -z "${cf_tst_cflags}" \
9599                         && cf_fix_cppflags=yes
9600
9601                         if test $cf_fix_cppflags = yes ; then
9602                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9603                                 continue
9604                         elif test "${cf_tst_cflags}" = "\"'" ; then
9605                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9606                                 continue
9607                         fi
9608                         ;;
9609                 esac
9610                 case "$CPPFLAGS" in
9611                 *$cf_add_cflags) #(vi
9612                         ;;
9613                 *) #(vi
9614                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9615                         ;;
9616                 esac
9617                 ;;
9618         *)
9619                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9620                 ;;
9621         esac
9622         ;;
9623 yes)
9624         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9625
9626         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9627
9628         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9629         && test -z "${cf_tst_cflags}" \
9630         && cf_fix_cppflags=no
9631         ;;
9632 esac
9633 done
9634
9635 if test -n "$cf_new_cflags" ; then
9636
9637         CFLAGS="$CFLAGS $cf_new_cflags"
9638 fi
9639
9640 if test -n "$cf_new_cppflags" ; then
9641
9642         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9643 fi
9644
9645 if test -n "$cf_new_extra_cppflags" ; then
9646
9647         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9648 fi
9649
9650                 ;;
9651         esac
9652         ;;
9653 esac
9654
9655 if test "$with_dmalloc" = yes ; then
9656         echo "$as_me:9656: checking for dmalloc.h" >&5
9657 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9658 if test "${ac_cv_header_dmalloc_h+set}" = set; then
9659   echo $ECHO_N "(cached) $ECHO_C" >&6
9660 else
9661   cat >conftest.$ac_ext <<_ACEOF
9662 #line 9662 "configure"
9663 #include "confdefs.h"
9664 #include <dmalloc.h>
9665 _ACEOF
9666 if { (eval echo "$as_me:9666: \"$ac_cpp conftest.$ac_ext\"") >&5
9667   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9668   ac_status=$?
9669   egrep -v '^ *\+' conftest.er1 >conftest.err
9670   rm -f conftest.er1
9671   cat conftest.err >&5
9672   echo "$as_me:9672: \$? = $ac_status" >&5
9673   (exit $ac_status); } >/dev/null; then
9674   if test -s conftest.err; then
9675     ac_cpp_err=$ac_c_preproc_warn_flag
9676   else
9677     ac_cpp_err=
9678   fi
9679 else
9680   ac_cpp_err=yes
9681 fi
9682 if test -z "$ac_cpp_err"; then
9683   ac_cv_header_dmalloc_h=yes
9684 else
9685   echo "$as_me: failed program was:" >&5
9686   cat conftest.$ac_ext >&5
9687   ac_cv_header_dmalloc_h=no
9688 fi
9689 rm -f conftest.err conftest.$ac_ext
9690 fi
9691 echo "$as_me:9691: result: $ac_cv_header_dmalloc_h" >&5
9692 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
9693 if test $ac_cv_header_dmalloc_h = yes; then
9694
9695 echo "$as_me:9695: checking for dmalloc_debug in -ldmalloc" >&5
9696 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
9697 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
9698   echo $ECHO_N "(cached) $ECHO_C" >&6
9699 else
9700   ac_check_lib_save_LIBS=$LIBS
9701 LIBS="-ldmalloc  $LIBS"
9702 cat >conftest.$ac_ext <<_ACEOF
9703 #line 9703 "configure"
9704 #include "confdefs.h"
9705
9706 /* Override any gcc2 internal prototype to avoid an error.  */
9707 #ifdef __cplusplus
9708 extern "C"
9709 #endif
9710 /* We use char because int might match the return type of a gcc2
9711    builtin and then its argument prototype would still apply.  */
9712 char dmalloc_debug ();
9713 int
9714 main ()
9715 {
9716 dmalloc_debug ();
9717   ;
9718   return 0;
9719 }
9720 _ACEOF
9721 rm -f conftest.$ac_objext conftest$ac_exeext
9722 if { (eval echo "$as_me:9722: \"$ac_link\"") >&5
9723   (eval $ac_link) 2>&5
9724   ac_status=$?
9725   echo "$as_me:9725: \$? = $ac_status" >&5
9726   (exit $ac_status); } &&
9727          { ac_try='test -s conftest$ac_exeext'
9728   { (eval echo "$as_me:9728: \"$ac_try\"") >&5
9729   (eval $ac_try) 2>&5
9730   ac_status=$?
9731   echo "$as_me:9731: \$? = $ac_status" >&5
9732   (exit $ac_status); }; }; then
9733   ac_cv_lib_dmalloc_dmalloc_debug=yes
9734 else
9735   echo "$as_me: failed program was:" >&5
9736 cat conftest.$ac_ext >&5
9737 ac_cv_lib_dmalloc_dmalloc_debug=no
9738 fi
9739 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9740 LIBS=$ac_check_lib_save_LIBS
9741 fi
9742 echo "$as_me:9742: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
9743 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
9744 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
9745   cat >>confdefs.h <<EOF
9746 #define HAVE_LIBDMALLOC 1
9747 EOF
9748
9749   LIBS="-ldmalloc $LIBS"
9750
9751 fi
9752
9753 fi
9754
9755 fi
9756
9757 echo "$as_me:9757: checking if you want to use dbmalloc for testing" >&5
9758 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
9759
9760 # Check whether --with-dbmalloc or --without-dbmalloc was given.
9761 if test "${with_dbmalloc+set}" = set; then
9762   withval="$with_dbmalloc"
9763   cat >>confdefs.h <<\EOF
9764 #define USE_DBMALLOC 1
9765 EOF
9766
9767         : ${with_cflags:=-g}
9768         : ${with_no_leaks:=yes}
9769          with_dbmalloc=yes
9770 else
9771   with_dbmalloc=
9772 fi;
9773 echo "$as_me:9773: result: ${with_dbmalloc:-no}" >&5
9774 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
9775
9776 case .$with_cflags in #(vi
9777 .*-g*)
9778         case .$CFLAGS in #(vi
9779         .*-g*) #(vi
9780                 ;;
9781         *)
9782
9783 cf_fix_cppflags=no
9784 cf_new_cflags=
9785 cf_new_cppflags=
9786 cf_new_extra_cppflags=
9787
9788 for cf_add_cflags in -g
9789 do
9790 case $cf_fix_cppflags in
9791 no)
9792         case $cf_add_cflags in #(vi
9793         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9794                 case $cf_add_cflags in
9795                 -D*)
9796                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9797
9798                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9799                         && test -z "${cf_tst_cflags}" \
9800                         && cf_fix_cppflags=yes
9801
9802                         if test $cf_fix_cppflags = yes ; then
9803                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9804                                 continue
9805                         elif test "${cf_tst_cflags}" = "\"'" ; then
9806                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9807                                 continue
9808                         fi
9809                         ;;
9810                 esac
9811                 case "$CPPFLAGS" in
9812                 *$cf_add_cflags) #(vi
9813                         ;;
9814                 *) #(vi
9815                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9816                         ;;
9817                 esac
9818                 ;;
9819         *)
9820                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9821                 ;;
9822         esac
9823         ;;
9824 yes)
9825         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9826
9827         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9828
9829         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9830         && test -z "${cf_tst_cflags}" \
9831         && cf_fix_cppflags=no
9832         ;;
9833 esac
9834 done
9835
9836 if test -n "$cf_new_cflags" ; then
9837
9838         CFLAGS="$CFLAGS $cf_new_cflags"
9839 fi
9840
9841 if test -n "$cf_new_cppflags" ; then
9842
9843         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9844 fi
9845
9846 if test -n "$cf_new_extra_cppflags" ; then
9847
9848         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9849 fi
9850
9851                 ;;
9852         esac
9853         ;;
9854 esac
9855
9856 if test "$with_dbmalloc" = yes ; then
9857         echo "$as_me:9857: checking for dbmalloc.h" >&5
9858 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
9859 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
9860   echo $ECHO_N "(cached) $ECHO_C" >&6
9861 else
9862   cat >conftest.$ac_ext <<_ACEOF
9863 #line 9863 "configure"
9864 #include "confdefs.h"
9865 #include <dbmalloc.h>
9866 _ACEOF
9867 if { (eval echo "$as_me:9867: \"$ac_cpp conftest.$ac_ext\"") >&5
9868   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9869   ac_status=$?
9870   egrep -v '^ *\+' conftest.er1 >conftest.err
9871   rm -f conftest.er1
9872   cat conftest.err >&5
9873   echo "$as_me:9873: \$? = $ac_status" >&5
9874   (exit $ac_status); } >/dev/null; then
9875   if test -s conftest.err; then
9876     ac_cpp_err=$ac_c_preproc_warn_flag
9877   else
9878     ac_cpp_err=
9879   fi
9880 else
9881   ac_cpp_err=yes
9882 fi
9883 if test -z "$ac_cpp_err"; then
9884   ac_cv_header_dbmalloc_h=yes
9885 else
9886   echo "$as_me: failed program was:" >&5
9887   cat conftest.$ac_ext >&5
9888   ac_cv_header_dbmalloc_h=no
9889 fi
9890 rm -f conftest.err conftest.$ac_ext
9891 fi
9892 echo "$as_me:9892: result: $ac_cv_header_dbmalloc_h" >&5
9893 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
9894 if test $ac_cv_header_dbmalloc_h = yes; then
9895
9896 echo "$as_me:9896: checking for debug_malloc in -ldbmalloc" >&5
9897 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
9898 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
9899   echo $ECHO_N "(cached) $ECHO_C" >&6
9900 else
9901   ac_check_lib_save_LIBS=$LIBS
9902 LIBS="-ldbmalloc  $LIBS"
9903 cat >conftest.$ac_ext <<_ACEOF
9904 #line 9904 "configure"
9905 #include "confdefs.h"
9906
9907 /* Override any gcc2 internal prototype to avoid an error.  */
9908 #ifdef __cplusplus
9909 extern "C"
9910 #endif
9911 /* We use char because int might match the return type of a gcc2
9912    builtin and then its argument prototype would still apply.  */
9913 char debug_malloc ();
9914 int
9915 main ()
9916 {
9917 debug_malloc ();
9918   ;
9919   return 0;
9920 }
9921 _ACEOF
9922 rm -f conftest.$ac_objext conftest$ac_exeext
9923 if { (eval echo "$as_me:9923: \"$ac_link\"") >&5
9924   (eval $ac_link) 2>&5
9925   ac_status=$?
9926   echo "$as_me:9926: \$? = $ac_status" >&5
9927   (exit $ac_status); } &&
9928          { ac_try='test -s conftest$ac_exeext'
9929   { (eval echo "$as_me:9929: \"$ac_try\"") >&5
9930   (eval $ac_try) 2>&5
9931   ac_status=$?
9932   echo "$as_me:9932: \$? = $ac_status" >&5
9933   (exit $ac_status); }; }; then
9934   ac_cv_lib_dbmalloc_debug_malloc=yes
9935 else
9936   echo "$as_me: failed program was:" >&5
9937 cat conftest.$ac_ext >&5
9938 ac_cv_lib_dbmalloc_debug_malloc=no
9939 fi
9940 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9941 LIBS=$ac_check_lib_save_LIBS
9942 fi
9943 echo "$as_me:9943: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
9944 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
9945 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
9946   cat >>confdefs.h <<EOF
9947 #define HAVE_LIBDBMALLOC 1
9948 EOF
9949
9950   LIBS="-ldbmalloc $LIBS"
9951
9952 fi
9953
9954 fi
9955
9956 fi
9957
9958 echo "$as_me:9958: checking if you want to use valgrind for testing" >&5
9959 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
9960
9961 # Check whether --with-valgrind or --without-valgrind was given.
9962 if test "${with_valgrind+set}" = set; then
9963   withval="$with_valgrind"
9964   cat >>confdefs.h <<\EOF
9965 #define USE_VALGRIND 1
9966 EOF
9967
9968         : ${with_cflags:=-g}
9969         : ${with_no_leaks:=yes}
9970          with_valgrind=yes
9971 else
9972   with_valgrind=
9973 fi;
9974 echo "$as_me:9974: result: ${with_valgrind:-no}" >&5
9975 echo "${ECHO_T}${with_valgrind:-no}" >&6
9976
9977 case .$with_cflags in #(vi
9978 .*-g*)
9979         case .$CFLAGS in #(vi
9980         .*-g*) #(vi
9981                 ;;
9982         *)
9983
9984 cf_fix_cppflags=no
9985 cf_new_cflags=
9986 cf_new_cppflags=
9987 cf_new_extra_cppflags=
9988
9989 for cf_add_cflags in -g
9990 do
9991 case $cf_fix_cppflags in
9992 no)
9993         case $cf_add_cflags in #(vi
9994         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9995                 case $cf_add_cflags in
9996                 -D*)
9997                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9998
9999                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10000                         && test -z "${cf_tst_cflags}" \
10001                         && cf_fix_cppflags=yes
10002
10003                         if test $cf_fix_cppflags = yes ; then
10004                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10005                                 continue
10006                         elif test "${cf_tst_cflags}" = "\"'" ; then
10007                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10008                                 continue
10009                         fi
10010                         ;;
10011                 esac
10012                 case "$CPPFLAGS" in
10013                 *$cf_add_cflags) #(vi
10014                         ;;
10015                 *) #(vi
10016                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10017                         ;;
10018                 esac
10019                 ;;
10020         *)
10021                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10022                 ;;
10023         esac
10024         ;;
10025 yes)
10026         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10027
10028         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10029
10030         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10031         && test -z "${cf_tst_cflags}" \
10032         && cf_fix_cppflags=no
10033         ;;
10034 esac
10035 done
10036
10037 if test -n "$cf_new_cflags" ; then
10038
10039         CFLAGS="$CFLAGS $cf_new_cflags"
10040 fi
10041
10042 if test -n "$cf_new_cppflags" ; then
10043
10044         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10045 fi
10046
10047 if test -n "$cf_new_extra_cppflags" ; then
10048
10049         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10050 fi
10051
10052                 ;;
10053         esac
10054         ;;
10055 esac
10056
10057 echo "$as_me:10057: checking if you want to perform memory-leak testing" >&5
10058 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10059
10060 # Check whether --enable-leaks or --disable-leaks was given.
10061 if test "${enable_leaks+set}" = set; then
10062   enableval="$enable_leaks"
10063   with_no_leaks=yes
10064 else
10065   : ${with_no_leaks:=no}
10066 fi;
10067 echo "$as_me:10067: result: $with_no_leaks" >&5
10068 echo "${ECHO_T}$with_no_leaks" >&6
10069
10070 if test "$with_no_leaks" = yes ; then
10071         cat >>confdefs.h <<\EOF
10072 #define NO_LEAKS 1
10073 EOF
10074
10075 fi
10076
10077 cat >>confdefs.h <<\EOF
10078 #define HAVE_NC_ALLOC_H 1
10079 EOF
10080
10081 ###     use option --enable-expanded to generate certain macros as functions
10082
10083 # Check whether --enable-expanded or --disable-expanded was given.
10084 if test "${enable_expanded+set}" = set; then
10085   enableval="$enable_expanded"
10086   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10087 #define NCURSES_EXPANDED 1
10088 EOF
10089
10090 fi;
10091
10092 ###     use option --disable-macros to suppress macros in favor of functions
10093
10094 # Check whether --enable-macros or --disable-macros was given.
10095 if test "${enable_macros+set}" = set; then
10096   enableval="$enable_macros"
10097   test "$enableval" = no && cat >>confdefs.h <<\EOF
10098 #define NCURSES_NOMACROS 1
10099 EOF
10100
10101 fi;
10102
10103 # Normally we only add trace() to the debug-library.  Allow this to be
10104 # extended to all models of the ncurses library:
10105 cf_all_traces=no
10106 case "$CFLAGS $CPPFLAGS" in
10107 *-DTRACE*)
10108         cf_all_traces=yes
10109         ;;
10110 esac
10111
10112 echo "$as_me:10112: checking whether to add trace feature to all models" >&5
10113 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10114
10115 # Check whether --with-trace or --without-trace was given.
10116 if test "${with_trace+set}" = set; then
10117   withval="$with_trace"
10118   cf_with_trace=$withval
10119 else
10120   cf_with_trace=$cf_all_traces
10121 fi;
10122 echo "$as_me:10122: result: $cf_with_trace" >&5
10123 echo "${ECHO_T}$cf_with_trace" >&6
10124
10125 if test "$cf_with_trace" = yes ; then
10126         LIB_TRACING=all
10127         ADA_TRACE=TRUE
10128
10129 cf_fix_cppflags=no
10130 cf_new_cflags=
10131 cf_new_cppflags=
10132 cf_new_extra_cppflags=
10133
10134 for cf_add_cflags in -DTRACE
10135 do
10136 case $cf_fix_cppflags in
10137 no)
10138         case $cf_add_cflags in #(vi
10139         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10140                 case $cf_add_cflags in
10141                 -D*)
10142                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10143
10144                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10145                         && test -z "${cf_tst_cflags}" \
10146                         && cf_fix_cppflags=yes
10147
10148                         if test $cf_fix_cppflags = yes ; then
10149                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10150                                 continue
10151                         elif test "${cf_tst_cflags}" = "\"'" ; then
10152                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10153                                 continue
10154                         fi
10155                         ;;
10156                 esac
10157                 case "$CPPFLAGS" in
10158                 *$cf_add_cflags) #(vi
10159                         ;;
10160                 *) #(vi
10161                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10162                         ;;
10163                 esac
10164                 ;;
10165         *)
10166                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10167                 ;;
10168         esac
10169         ;;
10170 yes)
10171         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10172
10173         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10174
10175         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10176         && test -z "${cf_tst_cflags}" \
10177         && cf_fix_cppflags=no
10178         ;;
10179 esac
10180 done
10181
10182 if test -n "$cf_new_cflags" ; then
10183
10184         CFLAGS="$CFLAGS $cf_new_cflags"
10185 fi
10186
10187 if test -n "$cf_new_cppflags" ; then
10188
10189         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10190 fi
10191
10192 if test -n "$cf_new_extra_cppflags" ; then
10193
10194         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10195 fi
10196
10197 else
10198         LIB_TRACING=DEBUG
10199         ADA_TRACE=FALSE
10200 fi
10201
10202 ###     Checks for libraries.
10203 echo "$as_me:10203: checking for gettimeofday" >&5
10204 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10205 if test "${ac_cv_func_gettimeofday+set}" = set; then
10206   echo $ECHO_N "(cached) $ECHO_C" >&6
10207 else
10208   cat >conftest.$ac_ext <<_ACEOF
10209 #line 10209 "configure"
10210 #include "confdefs.h"
10211 /* System header to define __stub macros and hopefully few prototypes,
10212     which can conflict with char gettimeofday (); below.  */
10213 #include <assert.h>
10214 /* Override any gcc2 internal prototype to avoid an error.  */
10215 #ifdef __cplusplus
10216 extern "C"
10217 #endif
10218 /* We use char because int might match the return type of a gcc2
10219    builtin and then its argument prototype would still apply.  */
10220 char gettimeofday ();
10221 char (*f) ();
10222
10223 int
10224 main ()
10225 {
10226 /* The GNU C library defines this for functions which it implements
10227     to always fail with ENOSYS.  Some functions are actually named
10228     something starting with __ and the normal name is an alias.  */
10229 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10230 choke me
10231 #else
10232 f = gettimeofday;
10233 #endif
10234
10235   ;
10236   return 0;
10237 }
10238 _ACEOF
10239 rm -f conftest.$ac_objext conftest$ac_exeext
10240 if { (eval echo "$as_me:10240: \"$ac_link\"") >&5
10241   (eval $ac_link) 2>&5
10242   ac_status=$?
10243   echo "$as_me:10243: \$? = $ac_status" >&5
10244   (exit $ac_status); } &&
10245          { ac_try='test -s conftest$ac_exeext'
10246   { (eval echo "$as_me:10246: \"$ac_try\"") >&5
10247   (eval $ac_try) 2>&5
10248   ac_status=$?
10249   echo "$as_me:10249: \$? = $ac_status" >&5
10250   (exit $ac_status); }; }; then
10251   ac_cv_func_gettimeofday=yes
10252 else
10253   echo "$as_me: failed program was:" >&5
10254 cat conftest.$ac_ext >&5
10255 ac_cv_func_gettimeofday=no
10256 fi
10257 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10258 fi
10259 echo "$as_me:10259: result: $ac_cv_func_gettimeofday" >&5
10260 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10261 if test $ac_cv_func_gettimeofday = yes; then
10262   cat >>confdefs.h <<\EOF
10263 #define HAVE_GETTIMEOFDAY 1
10264 EOF
10265
10266 else
10267
10268 echo "$as_me:10268: checking for gettimeofday in -lbsd" >&5
10269 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10270 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10271   echo $ECHO_N "(cached) $ECHO_C" >&6
10272 else
10273   ac_check_lib_save_LIBS=$LIBS
10274 LIBS="-lbsd  $LIBS"
10275 cat >conftest.$ac_ext <<_ACEOF
10276 #line 10276 "configure"
10277 #include "confdefs.h"
10278
10279 /* Override any gcc2 internal prototype to avoid an error.  */
10280 #ifdef __cplusplus
10281 extern "C"
10282 #endif
10283 /* We use char because int might match the return type of a gcc2
10284    builtin and then its argument prototype would still apply.  */
10285 char gettimeofday ();
10286 int
10287 main ()
10288 {
10289 gettimeofday ();
10290   ;
10291   return 0;
10292 }
10293 _ACEOF
10294 rm -f conftest.$ac_objext conftest$ac_exeext
10295 if { (eval echo "$as_me:10295: \"$ac_link\"") >&5
10296   (eval $ac_link) 2>&5
10297   ac_status=$?
10298   echo "$as_me:10298: \$? = $ac_status" >&5
10299   (exit $ac_status); } &&
10300          { ac_try='test -s conftest$ac_exeext'
10301   { (eval echo "$as_me:10301: \"$ac_try\"") >&5
10302   (eval $ac_try) 2>&5
10303   ac_status=$?
10304   echo "$as_me:10304: \$? = $ac_status" >&5
10305   (exit $ac_status); }; }; then
10306   ac_cv_lib_bsd_gettimeofday=yes
10307 else
10308   echo "$as_me: failed program was:" >&5
10309 cat conftest.$ac_ext >&5
10310 ac_cv_lib_bsd_gettimeofday=no
10311 fi
10312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10313 LIBS=$ac_check_lib_save_LIBS
10314 fi
10315 echo "$as_me:10315: result: $ac_cv_lib_bsd_gettimeofday" >&5
10316 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10317 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10318   cat >>confdefs.h <<\EOF
10319 #define HAVE_GETTIMEOFDAY 1
10320 EOF
10321
10322         LIBS="$LIBS -lbsd"
10323 fi
10324
10325 fi
10326
10327 echo "$as_me:10327: checking if -lm needed for math functions" >&5
10328 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10329 if test "${cf_cv_need_libm+set}" = set; then
10330   echo $ECHO_N "(cached) $ECHO_C" >&6
10331 else
10332
10333         cat >conftest.$ac_ext <<_ACEOF
10334 #line 10334 "configure"
10335 #include "confdefs.h"
10336
10337         #include <stdio.h>
10338         #include <math.h>
10339
10340 int
10341 main ()
10342 {
10343 double x = rand(); printf("result = %g\n", sin(x))
10344   ;
10345   return 0;
10346 }
10347 _ACEOF
10348 rm -f conftest.$ac_objext conftest$ac_exeext
10349 if { (eval echo "$as_me:10349: \"$ac_link\"") >&5
10350   (eval $ac_link) 2>&5
10351   ac_status=$?
10352   echo "$as_me:10352: \$? = $ac_status" >&5
10353   (exit $ac_status); } &&
10354          { ac_try='test -s conftest$ac_exeext'
10355   { (eval echo "$as_me:10355: \"$ac_try\"") >&5
10356   (eval $ac_try) 2>&5
10357   ac_status=$?
10358   echo "$as_me:10358: \$? = $ac_status" >&5
10359   (exit $ac_status); }; }; then
10360   cf_cv_need_libm=no
10361 else
10362   echo "$as_me: failed program was:" >&5
10363 cat conftest.$ac_ext >&5
10364 cf_cv_need_libm=yes
10365 fi
10366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10367 fi
10368 echo "$as_me:10368: result: $cf_cv_need_libm" >&5
10369 echo "${ECHO_T}$cf_cv_need_libm" >&6
10370 if test "$cf_cv_need_libm" = yes
10371 then
10372 MATH_LIB=-lm
10373 fi
10374
10375 ###     Checks for header files.
10376 echo "$as_me:10376: checking for ANSI C header files" >&5
10377 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10378 if test "${ac_cv_header_stdc+set}" = set; then
10379   echo $ECHO_N "(cached) $ECHO_C" >&6
10380 else
10381   cat >conftest.$ac_ext <<_ACEOF
10382 #line 10382 "configure"
10383 #include "confdefs.h"
10384 #include <stdlib.h>
10385 #include <stdarg.h>
10386 #include <string.h>
10387 #include <float.h>
10388
10389 _ACEOF
10390 if { (eval echo "$as_me:10390: \"$ac_cpp conftest.$ac_ext\"") >&5
10391   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10392   ac_status=$?
10393   egrep -v '^ *\+' conftest.er1 >conftest.err
10394   rm -f conftest.er1
10395   cat conftest.err >&5
10396   echo "$as_me:10396: \$? = $ac_status" >&5
10397   (exit $ac_status); } >/dev/null; then
10398   if test -s conftest.err; then
10399     ac_cpp_err=$ac_c_preproc_warn_flag
10400   else
10401     ac_cpp_err=
10402   fi
10403 else
10404   ac_cpp_err=yes
10405 fi
10406 if test -z "$ac_cpp_err"; then
10407   ac_cv_header_stdc=yes
10408 else
10409   echo "$as_me: failed program was:" >&5
10410   cat conftest.$ac_ext >&5
10411   ac_cv_header_stdc=no
10412 fi
10413 rm -f conftest.err conftest.$ac_ext
10414
10415 if test $ac_cv_header_stdc = yes; then
10416   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10417   cat >conftest.$ac_ext <<_ACEOF
10418 #line 10418 "configure"
10419 #include "confdefs.h"
10420 #include <string.h>
10421
10422 _ACEOF
10423 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10424   egrep "memchr" >/dev/null 2>&1; then
10425   :
10426 else
10427   ac_cv_header_stdc=no
10428 fi
10429 rm -f conftest*
10430
10431 fi
10432
10433 if test $ac_cv_header_stdc = yes; then
10434   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10435   cat >conftest.$ac_ext <<_ACEOF
10436 #line 10436 "configure"
10437 #include "confdefs.h"
10438 #include <stdlib.h>
10439
10440 _ACEOF
10441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10442   egrep "free" >/dev/null 2>&1; then
10443   :
10444 else
10445   ac_cv_header_stdc=no
10446 fi
10447 rm -f conftest*
10448
10449 fi
10450
10451 if test $ac_cv_header_stdc = yes; then
10452   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10453   if test "$cross_compiling" = yes; then
10454   :
10455 else
10456   cat >conftest.$ac_ext <<_ACEOF
10457 #line 10457 "configure"
10458 #include "confdefs.h"
10459 #include <ctype.h>
10460 #if ((' ' & 0x0FF) == 0x020)
10461 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10462 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10463 #else
10464 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10465                      || ('j' <= (c) && (c) <= 'r') \
10466                      || ('s' <= (c) && (c) <= 'z'))
10467 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10468 #endif
10469
10470 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10471 int
10472 main ()
10473 {
10474   int i;
10475   for (i = 0; i < 256; i++)
10476     if (XOR (islower (i), ISLOWER (i))
10477         || toupper (i) != TOUPPER (i))
10478       $ac_main_return(2);
10479   $ac_main_return (0);
10480 }
10481 _ACEOF
10482 rm -f conftest$ac_exeext
10483 if { (eval echo "$as_me:10483: \"$ac_link\"") >&5
10484   (eval $ac_link) 2>&5
10485   ac_status=$?
10486   echo "$as_me:10486: \$? = $ac_status" >&5
10487   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10488   { (eval echo "$as_me:10488: \"$ac_try\"") >&5
10489   (eval $ac_try) 2>&5
10490   ac_status=$?
10491   echo "$as_me:10491: \$? = $ac_status" >&5
10492   (exit $ac_status); }; }; then
10493   :
10494 else
10495   echo "$as_me: program exited with status $ac_status" >&5
10496 echo "$as_me: failed program was:" >&5
10497 cat conftest.$ac_ext >&5
10498 ac_cv_header_stdc=no
10499 fi
10500 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10501 fi
10502 fi
10503 fi
10504 echo "$as_me:10504: result: $ac_cv_header_stdc" >&5
10505 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10506 if test $ac_cv_header_stdc = yes; then
10507
10508 cat >>confdefs.h <<\EOF
10509 #define STDC_HEADERS 1
10510 EOF
10511
10512 fi
10513
10514 ac_header_dirent=no
10515 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10516   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10517 echo "$as_me:10517: checking for $ac_hdr that defines DIR" >&5
10518 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10519 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10520   echo $ECHO_N "(cached) $ECHO_C" >&6
10521 else
10522   cat >conftest.$ac_ext <<_ACEOF
10523 #line 10523 "configure"
10524 #include "confdefs.h"
10525 #include <sys/types.h>
10526 #include <$ac_hdr>
10527
10528 int
10529 main ()
10530 {
10531 if ((DIR *) 0)
10532 return 0;
10533   ;
10534   return 0;
10535 }
10536 _ACEOF
10537 rm -f conftest.$ac_objext
10538 if { (eval echo "$as_me:10538: \"$ac_compile\"") >&5
10539   (eval $ac_compile) 2>&5
10540   ac_status=$?
10541   echo "$as_me:10541: \$? = $ac_status" >&5
10542   (exit $ac_status); } &&
10543          { ac_try='test -s conftest.$ac_objext'
10544   { (eval echo "$as_me:10544: \"$ac_try\"") >&5
10545   (eval $ac_try) 2>&5
10546   ac_status=$?
10547   echo "$as_me:10547: \$? = $ac_status" >&5
10548   (exit $ac_status); }; }; then
10549   eval "$as_ac_Header=yes"
10550 else
10551   echo "$as_me: failed program was:" >&5
10552 cat conftest.$ac_ext >&5
10553 eval "$as_ac_Header=no"
10554 fi
10555 rm -f conftest.$ac_objext conftest.$ac_ext
10556 fi
10557 echo "$as_me:10557: result: `eval echo '${'$as_ac_Header'}'`" >&5
10558 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10559 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10560   cat >>confdefs.h <<EOF
10561 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10562 EOF
10563
10564 ac_header_dirent=$ac_hdr; break
10565 fi
10566
10567 done
10568 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10569 if test $ac_header_dirent = dirent.h; then
10570   echo "$as_me:10570: checking for opendir in -ldir" >&5
10571 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10572 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10573   echo $ECHO_N "(cached) $ECHO_C" >&6
10574 else
10575   ac_check_lib_save_LIBS=$LIBS
10576 LIBS="-ldir  $LIBS"
10577 cat >conftest.$ac_ext <<_ACEOF
10578 #line 10578 "configure"
10579 #include "confdefs.h"
10580
10581 /* Override any gcc2 internal prototype to avoid an error.  */
10582 #ifdef __cplusplus
10583 extern "C"
10584 #endif
10585 /* We use char because int might match the return type of a gcc2
10586    builtin and then its argument prototype would still apply.  */
10587 char opendir ();
10588 int
10589 main ()
10590 {
10591 opendir ();
10592   ;
10593   return 0;
10594 }
10595 _ACEOF
10596 rm -f conftest.$ac_objext conftest$ac_exeext
10597 if { (eval echo "$as_me:10597: \"$ac_link\"") >&5
10598   (eval $ac_link) 2>&5
10599   ac_status=$?
10600   echo "$as_me:10600: \$? = $ac_status" >&5
10601   (exit $ac_status); } &&
10602          { ac_try='test -s conftest$ac_exeext'
10603   { (eval echo "$as_me:10603: \"$ac_try\"") >&5
10604   (eval $ac_try) 2>&5
10605   ac_status=$?
10606   echo "$as_me:10606: \$? = $ac_status" >&5
10607   (exit $ac_status); }; }; then
10608   ac_cv_lib_dir_opendir=yes
10609 else
10610   echo "$as_me: failed program was:" >&5
10611 cat conftest.$ac_ext >&5
10612 ac_cv_lib_dir_opendir=no
10613 fi
10614 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10615 LIBS=$ac_check_lib_save_LIBS
10616 fi
10617 echo "$as_me:10617: result: $ac_cv_lib_dir_opendir" >&5
10618 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10619 if test $ac_cv_lib_dir_opendir = yes; then
10620   LIBS="$LIBS -ldir"
10621 fi
10622
10623 else
10624   echo "$as_me:10624: checking for opendir in -lx" >&5
10625 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10626 if test "${ac_cv_lib_x_opendir+set}" = set; then
10627   echo $ECHO_N "(cached) $ECHO_C" >&6
10628 else
10629   ac_check_lib_save_LIBS=$LIBS
10630 LIBS="-lx  $LIBS"
10631 cat >conftest.$ac_ext <<_ACEOF
10632 #line 10632 "configure"
10633 #include "confdefs.h"
10634
10635 /* Override any gcc2 internal prototype to avoid an error.  */
10636 #ifdef __cplusplus
10637 extern "C"
10638 #endif
10639 /* We use char because int might match the return type of a gcc2
10640    builtin and then its argument prototype would still apply.  */
10641 char opendir ();
10642 int
10643 main ()
10644 {
10645 opendir ();
10646   ;
10647   return 0;
10648 }
10649 _ACEOF
10650 rm -f conftest.$ac_objext conftest$ac_exeext
10651 if { (eval echo "$as_me:10651: \"$ac_link\"") >&5
10652   (eval $ac_link) 2>&5
10653   ac_status=$?
10654   echo "$as_me:10654: \$? = $ac_status" >&5
10655   (exit $ac_status); } &&
10656          { ac_try='test -s conftest$ac_exeext'
10657   { (eval echo "$as_me:10657: \"$ac_try\"") >&5
10658   (eval $ac_try) 2>&5
10659   ac_status=$?
10660   echo "$as_me:10660: \$? = $ac_status" >&5
10661   (exit $ac_status); }; }; then
10662   ac_cv_lib_x_opendir=yes
10663 else
10664   echo "$as_me: failed program was:" >&5
10665 cat conftest.$ac_ext >&5
10666 ac_cv_lib_x_opendir=no
10667 fi
10668 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10669 LIBS=$ac_check_lib_save_LIBS
10670 fi
10671 echo "$as_me:10671: result: $ac_cv_lib_x_opendir" >&5
10672 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10673 if test $ac_cv_lib_x_opendir = yes; then
10674   LIBS="$LIBS -lx"
10675 fi
10676
10677 fi
10678
10679 echo "$as_me:10679: checking whether time.h and sys/time.h may both be included" >&5
10680 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10681 if test "${ac_cv_header_time+set}" = set; then
10682   echo $ECHO_N "(cached) $ECHO_C" >&6
10683 else
10684   cat >conftest.$ac_ext <<_ACEOF
10685 #line 10685 "configure"
10686 #include "confdefs.h"
10687 #include <sys/types.h>
10688 #include <sys/time.h>
10689 #include <time.h>
10690
10691 int
10692 main ()
10693 {
10694 if ((struct tm *) 0)
10695 return 0;
10696   ;
10697   return 0;
10698 }
10699 _ACEOF
10700 rm -f conftest.$ac_objext
10701 if { (eval echo "$as_me:10701: \"$ac_compile\"") >&5
10702   (eval $ac_compile) 2>&5
10703   ac_status=$?
10704   echo "$as_me:10704: \$? = $ac_status" >&5
10705   (exit $ac_status); } &&
10706          { ac_try='test -s conftest.$ac_objext'
10707   { (eval echo "$as_me:10707: \"$ac_try\"") >&5
10708   (eval $ac_try) 2>&5
10709   ac_status=$?
10710   echo "$as_me:10710: \$? = $ac_status" >&5
10711   (exit $ac_status); }; }; then
10712   ac_cv_header_time=yes
10713 else
10714   echo "$as_me: failed program was:" >&5
10715 cat conftest.$ac_ext >&5
10716 ac_cv_header_time=no
10717 fi
10718 rm -f conftest.$ac_objext conftest.$ac_ext
10719 fi
10720 echo "$as_me:10720: result: $ac_cv_header_time" >&5
10721 echo "${ECHO_T}$ac_cv_header_time" >&6
10722 if test $ac_cv_header_time = yes; then
10723
10724 cat >>confdefs.h <<\EOF
10725 #define TIME_WITH_SYS_TIME 1
10726 EOF
10727
10728 fi
10729
10730 echo "$as_me:10730: checking for regular-expression headers" >&5
10731 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
10732 if test "${cf_cv_regex+set}" = set; then
10733   echo $ECHO_N "(cached) $ECHO_C" >&6
10734 else
10735
10736 cat >conftest.$ac_ext <<_ACEOF
10737 #line 10737 "configure"
10738 #include "confdefs.h"
10739 #include <sys/types.h>
10740 #include <regex.h>
10741 int
10742 main ()
10743 {
10744
10745         regex_t *p;
10746         int x = regcomp(p, "", 0);
10747         int y = regexec(p, "", 0, 0, 0);
10748         regfree(p);
10749
10750   ;
10751   return 0;
10752 }
10753 _ACEOF
10754 rm -f conftest.$ac_objext conftest$ac_exeext
10755 if { (eval echo "$as_me:10755: \"$ac_link\"") >&5
10756   (eval $ac_link) 2>&5
10757   ac_status=$?
10758   echo "$as_me:10758: \$? = $ac_status" >&5
10759   (exit $ac_status); } &&
10760          { ac_try='test -s conftest$ac_exeext'
10761   { (eval echo "$as_me:10761: \"$ac_try\"") >&5
10762   (eval $ac_try) 2>&5
10763   ac_status=$?
10764   echo "$as_me:10764: \$? = $ac_status" >&5
10765   (exit $ac_status); }; }; then
10766   cf_cv_regex="regex.h"
10767 else
10768   echo "$as_me: failed program was:" >&5
10769 cat conftest.$ac_ext >&5
10770
10771         cat >conftest.$ac_ext <<_ACEOF
10772 #line 10772 "configure"
10773 #include "confdefs.h"
10774 #include <regexp.h>
10775 int
10776 main ()
10777 {
10778
10779                 char *p = compile("", "", "", 0);
10780                 int x = step("", "");
10781
10782   ;
10783   return 0;
10784 }
10785 _ACEOF
10786 rm -f conftest.$ac_objext conftest$ac_exeext
10787 if { (eval echo "$as_me:10787: \"$ac_link\"") >&5
10788   (eval $ac_link) 2>&5
10789   ac_status=$?
10790   echo "$as_me:10790: \$? = $ac_status" >&5
10791   (exit $ac_status); } &&
10792          { ac_try='test -s conftest$ac_exeext'
10793   { (eval echo "$as_me:10793: \"$ac_try\"") >&5
10794   (eval $ac_try) 2>&5
10795   ac_status=$?
10796   echo "$as_me:10796: \$? = $ac_status" >&5
10797   (exit $ac_status); }; }; then
10798   cf_cv_regex="regexp.h"
10799 else
10800   echo "$as_me: failed program was:" >&5
10801 cat conftest.$ac_ext >&5
10802
10803                 cf_save_LIBS="$LIBS"
10804                 LIBS="-lgen $LIBS"
10805                 cat >conftest.$ac_ext <<_ACEOF
10806 #line 10806 "configure"
10807 #include "confdefs.h"
10808 #include <regexpr.h>
10809 int
10810 main ()
10811 {
10812
10813                         char *p = compile("", "", "");
10814                         int x = step("", "");
10815
10816   ;
10817   return 0;
10818 }
10819 _ACEOF
10820 rm -f conftest.$ac_objext conftest$ac_exeext
10821 if { (eval echo "$as_me:10821: \"$ac_link\"") >&5
10822   (eval $ac_link) 2>&5
10823   ac_status=$?
10824   echo "$as_me:10824: \$? = $ac_status" >&5
10825   (exit $ac_status); } &&
10826          { ac_try='test -s conftest$ac_exeext'
10827   { (eval echo "$as_me:10827: \"$ac_try\"") >&5
10828   (eval $ac_try) 2>&5
10829   ac_status=$?
10830   echo "$as_me:10830: \$? = $ac_status" >&5
10831   (exit $ac_status); }; }; then
10832   cf_cv_regex="regexpr.h"
10833 else
10834   echo "$as_me: failed program was:" >&5
10835 cat conftest.$ac_ext >&5
10836 LIBS="$cf_save_LIBS"
10837 fi
10838 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10839 fi
10840 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10841 fi
10842 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10843
10844 fi
10845
10846 echo "$as_me:10846: result: $cf_cv_regex" >&5
10847 echo "${ECHO_T}$cf_cv_regex" >&6
10848 case $cf_cv_regex in
10849         regex.h)   cat >>confdefs.h <<\EOF
10850 #define HAVE_REGEX_H_FUNCS 1
10851 EOF
10852  ;;
10853         regexp.h)  cat >>confdefs.h <<\EOF
10854 #define HAVE_REGEXP_H_FUNCS 1
10855 EOF
10856  ;;
10857         regexpr.h) cat >>confdefs.h <<\EOF
10858 #define HAVE_REGEXPR_H_FUNCS 1
10859 EOF
10860  ;;
10861 esac
10862
10863 for ac_header in \
10864 fcntl.h \
10865 getopt.h \
10866 limits.h \
10867 locale.h \
10868 poll.h \
10869 sys/bsdtypes.h \
10870 sys/ioctl.h \
10871 sys/param.h \
10872 sys/poll.h \
10873 sys/select.h \
10874 sys/time.h \
10875 sys/times.h \
10876 ttyent.h \
10877 unistd.h \
10878 wctype.h \
10879
10880 do
10881 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10882 echo "$as_me:10882: checking for $ac_header" >&5
10883 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10884 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10885   echo $ECHO_N "(cached) $ECHO_C" >&6
10886 else
10887   cat >conftest.$ac_ext <<_ACEOF
10888 #line 10888 "configure"
10889 #include "confdefs.h"
10890 #include <$ac_header>
10891 _ACEOF
10892 if { (eval echo "$as_me:10892: \"$ac_cpp conftest.$ac_ext\"") >&5
10893   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10894   ac_status=$?
10895   egrep -v '^ *\+' conftest.er1 >conftest.err
10896   rm -f conftest.er1
10897   cat conftest.err >&5
10898   echo "$as_me:10898: \$? = $ac_status" >&5
10899   (exit $ac_status); } >/dev/null; then
10900   if test -s conftest.err; then
10901     ac_cpp_err=$ac_c_preproc_warn_flag
10902   else
10903     ac_cpp_err=
10904   fi
10905 else
10906   ac_cpp_err=yes
10907 fi
10908 if test -z "$ac_cpp_err"; then
10909   eval "$as_ac_Header=yes"
10910 else
10911   echo "$as_me: failed program was:" >&5
10912   cat conftest.$ac_ext >&5
10913   eval "$as_ac_Header=no"
10914 fi
10915 rm -f conftest.err conftest.$ac_ext
10916 fi
10917 echo "$as_me:10917: result: `eval echo '${'$as_ac_Header'}'`" >&5
10918 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10919 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10920   cat >>confdefs.h <<EOF
10921 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10922 EOF
10923
10924 fi
10925 done
10926
10927 # check for ISC (this may also define _POSIX_SOURCE)
10928 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
10929 if test "$ISC" = yes ; then
10930
10931 echo "$as_me:10931: checking for main in -lcposix" >&5
10932 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
10933 if test "${ac_cv_lib_cposix_main+set}" = set; then
10934   echo $ECHO_N "(cached) $ECHO_C" >&6
10935 else
10936   ac_check_lib_save_LIBS=$LIBS
10937 LIBS="-lcposix  $LIBS"
10938 cat >conftest.$ac_ext <<_ACEOF
10939 #line 10939 "configure"
10940 #include "confdefs.h"
10941
10942 int
10943 main ()
10944 {
10945 main ();
10946   ;
10947   return 0;
10948 }
10949 _ACEOF
10950 rm -f conftest.$ac_objext conftest$ac_exeext
10951 if { (eval echo "$as_me:10951: \"$ac_link\"") >&5
10952   (eval $ac_link) 2>&5
10953   ac_status=$?
10954   echo "$as_me:10954: \$? = $ac_status" >&5
10955   (exit $ac_status); } &&
10956          { ac_try='test -s conftest$ac_exeext'
10957   { (eval echo "$as_me:10957: \"$ac_try\"") >&5
10958   (eval $ac_try) 2>&5
10959   ac_status=$?
10960   echo "$as_me:10960: \$? = $ac_status" >&5
10961   (exit $ac_status); }; }; then
10962   ac_cv_lib_cposix_main=yes
10963 else
10964   echo "$as_me: failed program was:" >&5
10965 cat conftest.$ac_ext >&5
10966 ac_cv_lib_cposix_main=no
10967 fi
10968 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10969 LIBS=$ac_check_lib_save_LIBS
10970 fi
10971 echo "$as_me:10971: result: $ac_cv_lib_cposix_main" >&5
10972 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
10973 if test $ac_cv_lib_cposix_main = yes; then
10974   cat >>confdefs.h <<EOF
10975 #define HAVE_LIBCPOSIX 1
10976 EOF
10977
10978   LIBS="-lcposix $LIBS"
10979
10980 fi
10981
10982         echo "$as_me:10982: checking for bzero in -linet" >&5
10983 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
10984 if test "${ac_cv_lib_inet_bzero+set}" = set; then
10985   echo $ECHO_N "(cached) $ECHO_C" >&6
10986 else
10987   ac_check_lib_save_LIBS=$LIBS
10988 LIBS="-linet  $LIBS"
10989 cat >conftest.$ac_ext <<_ACEOF
10990 #line 10990 "configure"
10991 #include "confdefs.h"
10992
10993 /* Override any gcc2 internal prototype to avoid an error.  */
10994 #ifdef __cplusplus
10995 extern "C"
10996 #endif
10997 /* We use char because int might match the return type of a gcc2
10998    builtin and then its argument prototype would still apply.  */
10999 char bzero ();
11000 int
11001 main ()
11002 {
11003 bzero ();
11004   ;
11005   return 0;
11006 }
11007 _ACEOF
11008 rm -f conftest.$ac_objext conftest$ac_exeext
11009 if { (eval echo "$as_me:11009: \"$ac_link\"") >&5
11010   (eval $ac_link) 2>&5
11011   ac_status=$?
11012   echo "$as_me:11012: \$? = $ac_status" >&5
11013   (exit $ac_status); } &&
11014          { ac_try='test -s conftest$ac_exeext'
11015   { (eval echo "$as_me:11015: \"$ac_try\"") >&5
11016   (eval $ac_try) 2>&5
11017   ac_status=$?
11018   echo "$as_me:11018: \$? = $ac_status" >&5
11019   (exit $ac_status); }; }; then
11020   ac_cv_lib_inet_bzero=yes
11021 else
11022   echo "$as_me: failed program was:" >&5
11023 cat conftest.$ac_ext >&5
11024 ac_cv_lib_inet_bzero=no
11025 fi
11026 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11027 LIBS=$ac_check_lib_save_LIBS
11028 fi
11029 echo "$as_me:11029: result: $ac_cv_lib_inet_bzero" >&5
11030 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11031 if test $ac_cv_lib_inet_bzero = yes; then
11032   LIBS="$LIBS -linet"
11033 fi
11034 fi
11035
11036 echo "$as_me:11036: checking if sys/time.h works with sys/select.h" >&5
11037 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11038 if test "${cf_cv_sys_time_select+set}" = set; then
11039   echo $ECHO_N "(cached) $ECHO_C" >&6
11040 else
11041
11042 cat >conftest.$ac_ext <<_ACEOF
11043 #line 11043 "configure"
11044 #include "confdefs.h"
11045
11046 #include <sys/types.h>
11047 #ifdef HAVE_SYS_TIME_H
11048 #include <sys/time.h>
11049 #endif
11050 #ifdef HAVE_SYS_SELECT_H
11051 #include <sys/select.h>
11052 #endif
11053
11054 int
11055 main ()
11056 {
11057
11058   ;
11059   return 0;
11060 }
11061 _ACEOF
11062 rm -f conftest.$ac_objext
11063 if { (eval echo "$as_me:11063: \"$ac_compile\"") >&5
11064   (eval $ac_compile) 2>&5
11065   ac_status=$?
11066   echo "$as_me:11066: \$? = $ac_status" >&5
11067   (exit $ac_status); } &&
11068          { ac_try='test -s conftest.$ac_objext'
11069   { (eval echo "$as_me:11069: \"$ac_try\"") >&5
11070   (eval $ac_try) 2>&5
11071   ac_status=$?
11072   echo "$as_me:11072: \$? = $ac_status" >&5
11073   (exit $ac_status); }; }; then
11074   cf_cv_sys_time_select=yes
11075 else
11076   echo "$as_me: failed program was:" >&5
11077 cat conftest.$ac_ext >&5
11078 cf_cv_sys_time_select=no
11079 fi
11080 rm -f conftest.$ac_objext conftest.$ac_ext
11081
11082 fi
11083
11084 echo "$as_me:11084: result: $cf_cv_sys_time_select" >&5
11085 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11086 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11087 #define HAVE_SYS_TIME_SELECT 1
11088 EOF
11089
11090 ###     checks for compiler characteristics
11091 ac_ext=c
11092 ac_cpp='$CPP $CPPFLAGS'
11093 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11094 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11095 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11096 ac_main_return=return
11097
11098 echo "$as_me:11098: checking for $CC option to accept ANSI C" >&5
11099 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11100 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11101   echo $ECHO_N "(cached) $ECHO_C" >&6
11102 else
11103   ac_cv_prog_cc_stdc=no
11104 ac_save_CC=$CC
11105 cat >conftest.$ac_ext <<_ACEOF
11106 #line 11106 "configure"
11107 #include "confdefs.h"
11108 #include <stdarg.h>
11109 #include <stdio.h>
11110 #include <sys/types.h>
11111 #include <sys/stat.h>
11112 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11113 struct buf { int x; };
11114 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11115 static char *e (p, i)
11116      char **p;
11117      int i;
11118 {
11119   return p[i];
11120 }
11121 static char *f (char * (*g) (char **, int), char **p, ...)
11122 {
11123   char *s;
11124   va_list v;
11125   va_start (v,p);
11126   s = g (p, va_arg (v,int));
11127   va_end (v);
11128   return s;
11129 }
11130 int test (int i, double x);
11131 struct s1 {int (*f) (int a);};
11132 struct s2 {int (*f) (double a);};
11133 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11134 int argc;
11135 char **argv;
11136 int
11137 main ()
11138 {
11139 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11140   ;
11141   return 0;
11142 }
11143 _ACEOF
11144 # Don't try gcc -ansi; that turns off useful extensions and
11145 # breaks some systems' header files.
11146 # AIX                   -qlanglvl=ansi
11147 # Ultrix and OSF/1      -std1
11148 # HP-UX 10.20 and later -Ae
11149 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11150 # SVR4                  -Xc -D__EXTENSIONS__
11151 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11152 do
11153   CC="$ac_save_CC $ac_arg"
11154   rm -f conftest.$ac_objext
11155 if { (eval echo "$as_me:11155: \"$ac_compile\"") >&5
11156   (eval $ac_compile) 2>&5
11157   ac_status=$?
11158   echo "$as_me:11158: \$? = $ac_status" >&5
11159   (exit $ac_status); } &&
11160          { ac_try='test -s conftest.$ac_objext'
11161   { (eval echo "$as_me:11161: \"$ac_try\"") >&5
11162   (eval $ac_try) 2>&5
11163   ac_status=$?
11164   echo "$as_me:11164: \$? = $ac_status" >&5
11165   (exit $ac_status); }; }; then
11166   ac_cv_prog_cc_stdc=$ac_arg
11167 break
11168 else
11169   echo "$as_me: failed program was:" >&5
11170 cat conftest.$ac_ext >&5
11171 fi
11172 rm -f conftest.$ac_objext
11173 done
11174 rm -f conftest.$ac_ext conftest.$ac_objext
11175 CC=$ac_save_CC
11176
11177 fi
11178
11179 case "x$ac_cv_prog_cc_stdc" in
11180   x|xno)
11181     echo "$as_me:11181: result: none needed" >&5
11182 echo "${ECHO_T}none needed" >&6 ;;
11183   *)
11184     echo "$as_me:11184: result: $ac_cv_prog_cc_stdc" >&5
11185 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11186     CC="$CC $ac_cv_prog_cc_stdc" ;;
11187 esac
11188
11189 echo "$as_me:11189: checking for an ANSI C-conforming const" >&5
11190 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11191 if test "${ac_cv_c_const+set}" = set; then
11192   echo $ECHO_N "(cached) $ECHO_C" >&6
11193 else
11194   cat >conftest.$ac_ext <<_ACEOF
11195 #line 11195 "configure"
11196 #include "confdefs.h"
11197
11198 int
11199 main ()
11200 {
11201 /* FIXME: Include the comments suggested by Paul. */
11202 #ifndef __cplusplus
11203   /* Ultrix mips cc rejects this.  */
11204   typedef int charset[2];
11205   const charset x;
11206   /* SunOS 4.1.1 cc rejects this.  */
11207   char const *const *ccp;
11208   char **p;
11209   /* NEC SVR4.0.2 mips cc rejects this.  */
11210   struct point {int x, y;};
11211   static struct point const zero = {0,0};
11212   /* AIX XL C 1.02.0.0 rejects this.
11213      It does not let you subtract one const X* pointer from another in
11214      an arm of an if-expression whose if-part is not a constant
11215      expression */
11216   const char *g = "string";
11217   ccp = &g + (g ? g-g : 0);
11218   /* HPUX 7.0 cc rejects these. */
11219   ++ccp;
11220   p = (char**) ccp;
11221   ccp = (char const *const *) p;
11222   { /* SCO 3.2v4 cc rejects this.  */
11223     char *t;
11224     char const *s = 0 ? (char *) 0 : (char const *) 0;
11225
11226     *t++ = 0;
11227   }
11228   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11229     int x[] = {25, 17};
11230     const int *foo = &x[0];
11231     ++foo;
11232   }
11233   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11234     typedef const int *iptr;
11235     iptr p = 0;
11236     ++p;
11237   }
11238   { /* AIX XL C 1.02.0.0 rejects this saying
11239        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11240     struct s { int j; const int *ap[3]; };
11241     struct s *b; b->j = 5;
11242   }
11243   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11244     const int foo = 10;
11245   }
11246 #endif
11247
11248   ;
11249   return 0;
11250 }
11251 _ACEOF
11252 rm -f conftest.$ac_objext
11253 if { (eval echo "$as_me:11253: \"$ac_compile\"") >&5
11254   (eval $ac_compile) 2>&5
11255   ac_status=$?
11256   echo "$as_me:11256: \$? = $ac_status" >&5
11257   (exit $ac_status); } &&
11258          { ac_try='test -s conftest.$ac_objext'
11259   { (eval echo "$as_me:11259: \"$ac_try\"") >&5
11260   (eval $ac_try) 2>&5
11261   ac_status=$?
11262   echo "$as_me:11262: \$? = $ac_status" >&5
11263   (exit $ac_status); }; }; then
11264   ac_cv_c_const=yes
11265 else
11266   echo "$as_me: failed program was:" >&5
11267 cat conftest.$ac_ext >&5
11268 ac_cv_c_const=no
11269 fi
11270 rm -f conftest.$ac_objext conftest.$ac_ext
11271 fi
11272 echo "$as_me:11272: result: $ac_cv_c_const" >&5
11273 echo "${ECHO_T}$ac_cv_c_const" >&6
11274 if test $ac_cv_c_const = no; then
11275
11276 cat >>confdefs.h <<\EOF
11277 #define const
11278 EOF
11279
11280 fi
11281
11282 echo "$as_me:11282: checking for inline" >&5
11283 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11284 if test "${ac_cv_c_inline+set}" = set; then
11285   echo $ECHO_N "(cached) $ECHO_C" >&6
11286 else
11287   ac_cv_c_inline=no
11288 for ac_kw in inline __inline__ __inline; do
11289   cat >conftest.$ac_ext <<_ACEOF
11290 #line 11290 "configure"
11291 #include "confdefs.h"
11292 #ifndef __cplusplus
11293 static $ac_kw int static_foo () {return 0; }
11294 $ac_kw int foo () {return 0; }
11295 #endif
11296
11297 _ACEOF
11298 rm -f conftest.$ac_objext
11299 if { (eval echo "$as_me:11299: \"$ac_compile\"") >&5
11300   (eval $ac_compile) 2>&5
11301   ac_status=$?
11302   echo "$as_me:11302: \$? = $ac_status" >&5
11303   (exit $ac_status); } &&
11304          { ac_try='test -s conftest.$ac_objext'
11305   { (eval echo "$as_me:11305: \"$ac_try\"") >&5
11306   (eval $ac_try) 2>&5
11307   ac_status=$?
11308   echo "$as_me:11308: \$? = $ac_status" >&5
11309   (exit $ac_status); }; }; then
11310   ac_cv_c_inline=$ac_kw; break
11311 else
11312   echo "$as_me: failed program was:" >&5
11313 cat conftest.$ac_ext >&5
11314 fi
11315 rm -f conftest.$ac_objext conftest.$ac_ext
11316 done
11317
11318 fi
11319 echo "$as_me:11319: result: $ac_cv_c_inline" >&5
11320 echo "${ECHO_T}$ac_cv_c_inline" >&6
11321 case $ac_cv_c_inline in
11322   inline | yes) ;;
11323   no)
11324 cat >>confdefs.h <<\EOF
11325 #define inline
11326 EOF
11327  ;;
11328   *)  cat >>confdefs.h <<EOF
11329 #define inline $ac_cv_c_inline
11330 EOF
11331  ;;
11332 esac
11333
11334 NCURSES_INLINE=
11335 if test "$ac_cv_c_inline" != no ; then
11336         cat >>confdefs.h <<\EOF
11337 #define CC_HAS_INLINE_FUNCS 1
11338 EOF
11339
11340         NCURSES_INLINE=inline
11341 fi
11342
11343 if test $NCURSES_CHTYPE = auto ; then
11344
11345 echo "$as_me:11345: checking for type of chtype" >&5
11346 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11347 if test "${cf_cv_typeof_chtype+set}" = set; then
11348   echo $ECHO_N "(cached) $ECHO_C" >&6
11349 else
11350
11351                 if test "$cross_compiling" = yes; then
11352   cf_cv_typeof_chtype=long
11353 else
11354   cat >conftest.$ac_ext <<_ACEOF
11355 #line 11355 "configure"
11356 #include "confdefs.h"
11357
11358 #define WANT_BITS 31
11359 #include <stdio.h>
11360 int main()
11361 {
11362         FILE *fp = fopen("cf_test.out", "w");
11363         if (fp != 0) {
11364                 char *result = "long";
11365                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11366                         int n;
11367                         unsigned int x, y;
11368                         for (n = 0; n < WANT_BITS; n++) {
11369                                 x = (1 << n);
11370                                 y = (x >> n);
11371                                 if (y != 1 || x == 0) {
11372                                         x = 0;
11373                                         break;
11374                                 }
11375                         }
11376                         /*
11377                          * If x is nonzero, an int is big enough for the bits
11378                          * that we want.
11379                          */
11380                         result = (x != 0) ? "int" : "long";
11381                 }
11382                 fputs(result, fp);
11383                 fclose(fp);
11384         }
11385         ${cf_cv_main_return:-return}(0);
11386 }
11387
11388 _ACEOF
11389 rm -f conftest$ac_exeext
11390 if { (eval echo "$as_me:11390: \"$ac_link\"") >&5
11391   (eval $ac_link) 2>&5
11392   ac_status=$?
11393   echo "$as_me:11393: \$? = $ac_status" >&5
11394   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11395   { (eval echo "$as_me:11395: \"$ac_try\"") >&5
11396   (eval $ac_try) 2>&5
11397   ac_status=$?
11398   echo "$as_me:11398: \$? = $ac_status" >&5
11399   (exit $ac_status); }; }; then
11400   cf_cv_typeof_chtype=`cat cf_test.out`
11401 else
11402   echo "$as_me: program exited with status $ac_status" >&5
11403 echo "$as_me: failed program was:" >&5
11404 cat conftest.$ac_ext >&5
11405 cf_cv_typeof_chtype=long
11406 fi
11407 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11408 fi
11409                 rm -f cf_test.out
11410
11411 fi
11412
11413 echo "$as_me:11413: result: $cf_cv_typeof_chtype" >&5
11414 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
11415
11416 cat >>confdefs.h <<EOF
11417 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
11418 EOF
11419
11420 else
11421         cf_cv_typeof_chtype=$NCURSES_CHTYPE
11422 fi
11423
11424 echo "$as_me:11424: checking if unsigned literals are legal" >&5
11425 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
11426 if test "${cf_cv_unsigned_literals+set}" = set; then
11427   echo $ECHO_N "(cached) $ECHO_C" >&6
11428 else
11429
11430         cat >conftest.$ac_ext <<_ACEOF
11431 #line 11431 "configure"
11432 #include "confdefs.h"
11433
11434 int
11435 main ()
11436 {
11437 long x = 1L + 1UL + 1U + 1
11438   ;
11439   return 0;
11440 }
11441 _ACEOF
11442 rm -f conftest.$ac_objext
11443 if { (eval echo "$as_me:11443: \"$ac_compile\"") >&5
11444   (eval $ac_compile) 2>&5
11445   ac_status=$?
11446   echo "$as_me:11446: \$? = $ac_status" >&5
11447   (exit $ac_status); } &&
11448          { ac_try='test -s conftest.$ac_objext'
11449   { (eval echo "$as_me:11449: \"$ac_try\"") >&5
11450   (eval $ac_try) 2>&5
11451   ac_status=$?
11452   echo "$as_me:11452: \$? = $ac_status" >&5
11453   (exit $ac_status); }; }; then
11454   cf_cv_unsigned_literals=yes
11455 else
11456   echo "$as_me: failed program was:" >&5
11457 cat conftest.$ac_ext >&5
11458 cf_cv_unsigned_literals=no
11459 fi
11460 rm -f conftest.$ac_objext conftest.$ac_ext
11461
11462 fi
11463
11464 echo "$as_me:11464: result: $cf_cv_unsigned_literals" >&5
11465 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
11466
11467 cf_cv_1UL="1"
11468 test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
11469 test "$cf_cv_typeof_chtype"    = long && cf_cv_1UL="${cf_cv_1UL}L"
11470
11471 if test $NCURSES_MMASK_T = auto ; then
11472         cf_cv_typeof_mmask_t=long
11473 else
11474         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
11475 fi
11476
11477 ###     Checks for external-data
11478
11479 echo "$as_me:11479: checking if external errno is declared" >&5
11480 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
11481 if test "${cf_cv_dcl_errno+set}" = set; then
11482   echo $ECHO_N "(cached) $ECHO_C" >&6
11483 else
11484
11485     cat >conftest.$ac_ext <<_ACEOF
11486 #line 11486 "configure"
11487 #include "confdefs.h"
11488
11489 #ifdef HAVE_STDLIB_H
11490 #include <stdlib.h>
11491 #endif
11492 #include <stdio.h>
11493 #include <sys/types.h>
11494 #include <errno.h>
11495 int
11496 main ()
11497 {
11498 long x = (long) errno
11499   ;
11500   return 0;
11501 }
11502 _ACEOF
11503 rm -f conftest.$ac_objext
11504 if { (eval echo "$as_me:11504: \"$ac_compile\"") >&5
11505   (eval $ac_compile) 2>&5
11506   ac_status=$?
11507   echo "$as_me:11507: \$? = $ac_status" >&5
11508   (exit $ac_status); } &&
11509          { ac_try='test -s conftest.$ac_objext'
11510   { (eval echo "$as_me:11510: \"$ac_try\"") >&5
11511   (eval $ac_try) 2>&5
11512   ac_status=$?
11513   echo "$as_me:11513: \$? = $ac_status" >&5
11514   (exit $ac_status); }; }; then
11515   cf_cv_dcl_errno=yes
11516 else
11517   echo "$as_me: failed program was:" >&5
11518 cat conftest.$ac_ext >&5
11519 cf_cv_dcl_errno=no
11520 fi
11521 rm -f conftest.$ac_objext conftest.$ac_ext
11522
11523 fi
11524 echo "$as_me:11524: result: $cf_cv_dcl_errno" >&5
11525 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
11526
11527 if test "$cf_cv_dcl_errno" = no ; then
11528
11529 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11530
11531     cat >>confdefs.h <<EOF
11532 #define $cf_result 1
11533 EOF
11534
11535 fi
11536
11537 # It's possible (for near-UNIX clones) that the data doesn't exist
11538
11539 echo "$as_me:11539: checking if external errno exists" >&5
11540 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
11541 if test "${cf_cv_have_errno+set}" = set; then
11542   echo $ECHO_N "(cached) $ECHO_C" >&6
11543 else
11544
11545     cat >conftest.$ac_ext <<_ACEOF
11546 #line 11546 "configure"
11547 #include "confdefs.h"
11548
11549 #undef errno
11550 extern int errno;
11551
11552 int
11553 main ()
11554 {
11555 errno = 2
11556   ;
11557   return 0;
11558 }
11559 _ACEOF
11560 rm -f conftest.$ac_objext conftest$ac_exeext
11561 if { (eval echo "$as_me:11561: \"$ac_link\"") >&5
11562   (eval $ac_link) 2>&5
11563   ac_status=$?
11564   echo "$as_me:11564: \$? = $ac_status" >&5
11565   (exit $ac_status); } &&
11566          { ac_try='test -s conftest$ac_exeext'
11567   { (eval echo "$as_me:11567: \"$ac_try\"") >&5
11568   (eval $ac_try) 2>&5
11569   ac_status=$?
11570   echo "$as_me:11570: \$? = $ac_status" >&5
11571   (exit $ac_status); }; }; then
11572   cf_cv_have_errno=yes
11573 else
11574   echo "$as_me: failed program was:" >&5
11575 cat conftest.$ac_ext >&5
11576 cf_cv_have_errno=no
11577 fi
11578 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11579
11580 fi
11581 echo "$as_me:11581: result: $cf_cv_have_errno" >&5
11582 echo "${ECHO_T}$cf_cv_have_errno" >&6
11583
11584 if test "$cf_cv_have_errno" = yes ; then
11585
11586 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11587
11588     cat >>confdefs.h <<EOF
11589 #define $cf_result 1
11590 EOF
11591
11592 fi
11593
11594 echo "$as_me:11594: checking if data-only library module links" >&5
11595 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11596 if test "${cf_cv_link_dataonly+set}" = set; then
11597   echo $ECHO_N "(cached) $ECHO_C" >&6
11598 else
11599
11600         rm -f conftest.a
11601         cat >conftest.$ac_ext <<EOF
11602 #line 11602 "configure"
11603 int     testdata[3] = { 123, 456, 789 };
11604 EOF
11605         if { (eval echo "$as_me:11605: \"$ac_compile\"") >&5
11606   (eval $ac_compile) 2>&5
11607   ac_status=$?
11608   echo "$as_me:11608: \$? = $ac_status" >&5
11609   (exit $ac_status); } ; then
11610                 mv conftest.o data.o && \
11611                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
11612         fi
11613         rm -f conftest.$ac_ext data.o
11614         cat >conftest.$ac_ext <<EOF
11615 #line 11615 "configure"
11616 int     testfunc()
11617 {
11618 #if defined(NeXT)
11619         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11620 #else
11621         extern int testdata[3];
11622         return testdata[0] == 123
11623            &&  testdata[1] == 456
11624            &&  testdata[2] == 789;
11625 #endif
11626 }
11627 EOF
11628         if { (eval echo "$as_me:11628: \"$ac_compile\"") >&5
11629   (eval $ac_compile) 2>&5
11630   ac_status=$?
11631   echo "$as_me:11631: \$? = $ac_status" >&5
11632   (exit $ac_status); }; then
11633                 mv conftest.o func.o && \
11634                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
11635         fi
11636         rm -f conftest.$ac_ext func.o
11637         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11638         cf_saveLIBS="$LIBS"
11639         LIBS="conftest.a $LIBS"
11640         if test "$cross_compiling" = yes; then
11641   cf_cv_link_dataonly=unknown
11642 else
11643   cat >conftest.$ac_ext <<_ACEOF
11644 #line 11644 "configure"
11645 #include "confdefs.h"
11646
11647         int main()
11648         {
11649                 extern int testfunc();
11650                 ${cf_cv_main_return:-return} (!testfunc());
11651         }
11652
11653 _ACEOF
11654 rm -f conftest$ac_exeext
11655 if { (eval echo "$as_me:11655: \"$ac_link\"") >&5
11656   (eval $ac_link) 2>&5
11657   ac_status=$?
11658   echo "$as_me:11658: \$? = $ac_status" >&5
11659   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11660   { (eval echo "$as_me:11660: \"$ac_try\"") >&5
11661   (eval $ac_try) 2>&5
11662   ac_status=$?
11663   echo "$as_me:11663: \$? = $ac_status" >&5
11664   (exit $ac_status); }; }; then
11665   cf_cv_link_dataonly=yes
11666 else
11667   echo "$as_me: program exited with status $ac_status" >&5
11668 echo "$as_me: failed program was:" >&5
11669 cat conftest.$ac_ext >&5
11670 cf_cv_link_dataonly=no
11671 fi
11672 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11673 fi
11674         LIBS="$cf_saveLIBS"
11675
11676 fi
11677
11678 echo "$as_me:11678: result: $cf_cv_link_dataonly" >&5
11679 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
11680
11681 if test "$cf_cv_link_dataonly" = no ; then
11682         cat >>confdefs.h <<\EOF
11683 #define BROKEN_LINKER 1
11684 EOF
11685
11686         BROKEN_LINKER=1
11687 fi
11688
11689 ###     Checks for library functions.
11690
11691 for ac_func in \
11692 getcwd \
11693 getegid \
11694 geteuid \
11695 getttynam \
11696 issetugid \
11697 poll \
11698 remove \
11699 select \
11700 setbuf \
11701 setbuffer \
11702 setvbuf \
11703 sigaction \
11704 sigvec \
11705 strdup \
11706 strstr \
11707 tcgetpgrp \
11708 times \
11709 vsnprintf \
11710
11711 do
11712 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11713 echo "$as_me:11713: checking for $ac_func" >&5
11714 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11715 if eval "test \"\${$as_ac_var+set}\" = set"; then
11716   echo $ECHO_N "(cached) $ECHO_C" >&6
11717 else
11718   cat >conftest.$ac_ext <<_ACEOF
11719 #line 11719 "configure"
11720 #include "confdefs.h"
11721 /* System header to define __stub macros and hopefully few prototypes,
11722     which can conflict with char $ac_func (); below.  */
11723 #include <assert.h>
11724 /* Override any gcc2 internal prototype to avoid an error.  */
11725 #ifdef __cplusplus
11726 extern "C"
11727 #endif
11728 /* We use char because int might match the return type of a gcc2
11729    builtin and then its argument prototype would still apply.  */
11730 char $ac_func ();
11731 char (*f) ();
11732
11733 int
11734 main ()
11735 {
11736 /* The GNU C library defines this for functions which it implements
11737     to always fail with ENOSYS.  Some functions are actually named
11738     something starting with __ and the normal name is an alias.  */
11739 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11740 choke me
11741 #else
11742 f = $ac_func;
11743 #endif
11744
11745   ;
11746   return 0;
11747 }
11748 _ACEOF
11749 rm -f conftest.$ac_objext conftest$ac_exeext
11750 if { (eval echo "$as_me:11750: \"$ac_link\"") >&5
11751   (eval $ac_link) 2>&5
11752   ac_status=$?
11753   echo "$as_me:11753: \$? = $ac_status" >&5
11754   (exit $ac_status); } &&
11755          { ac_try='test -s conftest$ac_exeext'
11756   { (eval echo "$as_me:11756: \"$ac_try\"") >&5
11757   (eval $ac_try) 2>&5
11758   ac_status=$?
11759   echo "$as_me:11759: \$? = $ac_status" >&5
11760   (exit $ac_status); }; }; then
11761   eval "$as_ac_var=yes"
11762 else
11763   echo "$as_me: failed program was:" >&5
11764 cat conftest.$ac_ext >&5
11765 eval "$as_ac_var=no"
11766 fi
11767 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11768 fi
11769 echo "$as_me:11769: result: `eval echo '${'$as_ac_var'}'`" >&5
11770 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11771 if test `eval echo '${'$as_ac_var'}'` = yes; then
11772   cat >>confdefs.h <<EOF
11773 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11774 EOF
11775
11776 fi
11777 done
11778
11779 if test "$with_getcap" = "yes" ; then
11780
11781 echo "$as_me:11781: checking for terminal-capability database functions" >&5
11782 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
11783 if test "${cf_cv_cgetent+set}" = set; then
11784   echo $ECHO_N "(cached) $ECHO_C" >&6
11785 else
11786
11787 cat >conftest.$ac_ext <<_ACEOF
11788 #line 11788 "configure"
11789 #include "confdefs.h"
11790
11791 #include <stdlib.h>
11792 int
11793 main ()
11794 {
11795
11796         char temp[128];
11797         char *buf = temp;
11798         char *db_array = temp;
11799         cgetent(&buf, /* int *, */ &db_array, "vt100");
11800         cgetcap(buf, "tc", '=');
11801         cgetmatch(buf, "tc");
11802
11803   ;
11804   return 0;
11805 }
11806 _ACEOF
11807 rm -f conftest.$ac_objext conftest$ac_exeext
11808 if { (eval echo "$as_me:11808: \"$ac_link\"") >&5
11809   (eval $ac_link) 2>&5
11810   ac_status=$?
11811   echo "$as_me:11811: \$? = $ac_status" >&5
11812   (exit $ac_status); } &&
11813          { ac_try='test -s conftest$ac_exeext'
11814   { (eval echo "$as_me:11814: \"$ac_try\"") >&5
11815   (eval $ac_try) 2>&5
11816   ac_status=$?
11817   echo "$as_me:11817: \$? = $ac_status" >&5
11818   (exit $ac_status); }; }; then
11819   cf_cv_cgetent=yes
11820 else
11821   echo "$as_me: failed program was:" >&5
11822 cat conftest.$ac_ext >&5
11823 cf_cv_cgetent=no
11824 fi
11825 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11826
11827 fi
11828
11829 echo "$as_me:11829: result: $cf_cv_cgetent" >&5
11830 echo "${ECHO_T}$cf_cv_cgetent" >&6
11831 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
11832 #define HAVE_BSD_CGETENT 1
11833 EOF
11834
11835 fi
11836
11837 echo "$as_me:11837: checking for isascii" >&5
11838 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
11839 if test "${cf_cv_have_isascii+set}" = set; then
11840   echo $ECHO_N "(cached) $ECHO_C" >&6
11841 else
11842
11843         cat >conftest.$ac_ext <<_ACEOF
11844 #line 11844 "configure"
11845 #include "confdefs.h"
11846 #include <ctype.h>
11847 int
11848 main ()
11849 {
11850 int x = isascii(' ')
11851   ;
11852   return 0;
11853 }
11854 _ACEOF
11855 rm -f conftest.$ac_objext conftest$ac_exeext
11856 if { (eval echo "$as_me:11856: \"$ac_link\"") >&5
11857   (eval $ac_link) 2>&5
11858   ac_status=$?
11859   echo "$as_me:11859: \$? = $ac_status" >&5
11860   (exit $ac_status); } &&
11861          { ac_try='test -s conftest$ac_exeext'
11862   { (eval echo "$as_me:11862: \"$ac_try\"") >&5
11863   (eval $ac_try) 2>&5
11864   ac_status=$?
11865   echo "$as_me:11865: \$? = $ac_status" >&5
11866   (exit $ac_status); }; }; then
11867   cf_cv_have_isascii=yes
11868 else
11869   echo "$as_me: failed program was:" >&5
11870 cat conftest.$ac_ext >&5
11871 cf_cv_have_isascii=no
11872 fi
11873 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11874
11875 fi
11876 echo "$as_me:11876: result: $cf_cv_have_isascii" >&5
11877 echo "${ECHO_T}$cf_cv_have_isascii" >&6
11878 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
11879 #define HAVE_ISASCII 1
11880 EOF
11881
11882 if test "$ac_cv_func_sigaction" = yes; then
11883 echo "$as_me:11883: checking whether sigaction needs _POSIX_SOURCE" >&5
11884 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
11885 cat >conftest.$ac_ext <<_ACEOF
11886 #line 11886 "configure"
11887 #include "confdefs.h"
11888
11889 #include <sys/types.h>
11890 #include <signal.h>
11891 int
11892 main ()
11893 {
11894 struct sigaction act
11895   ;
11896   return 0;
11897 }
11898 _ACEOF
11899 rm -f conftest.$ac_objext
11900 if { (eval echo "$as_me:11900: \"$ac_compile\"") >&5
11901   (eval $ac_compile) 2>&5
11902   ac_status=$?
11903   echo "$as_me:11903: \$? = $ac_status" >&5
11904   (exit $ac_status); } &&
11905          { ac_try='test -s conftest.$ac_objext'
11906   { (eval echo "$as_me:11906: \"$ac_try\"") >&5
11907   (eval $ac_try) 2>&5
11908   ac_status=$?
11909   echo "$as_me:11909: \$? = $ac_status" >&5
11910   (exit $ac_status); }; }; then
11911   sigact_bad=no
11912 else
11913   echo "$as_me: failed program was:" >&5
11914 cat conftest.$ac_ext >&5
11915
11916 cat >conftest.$ac_ext <<_ACEOF
11917 #line 11917 "configure"
11918 #include "confdefs.h"
11919
11920 #define _POSIX_SOURCE
11921 #include <sys/types.h>
11922 #include <signal.h>
11923 int
11924 main ()
11925 {
11926 struct sigaction act
11927   ;
11928   return 0;
11929 }
11930 _ACEOF
11931 rm -f conftest.$ac_objext
11932 if { (eval echo "$as_me:11932: \"$ac_compile\"") >&5
11933   (eval $ac_compile) 2>&5
11934   ac_status=$?
11935   echo "$as_me:11935: \$? = $ac_status" >&5
11936   (exit $ac_status); } &&
11937          { ac_try='test -s conftest.$ac_objext'
11938   { (eval echo "$as_me:11938: \"$ac_try\"") >&5
11939   (eval $ac_try) 2>&5
11940   ac_status=$?
11941   echo "$as_me:11941: \$? = $ac_status" >&5
11942   (exit $ac_status); }; }; then
11943   sigact_bad=yes
11944          cat >>confdefs.h <<\EOF
11945 #define SVR4_ACTION 1
11946 EOF
11947
11948 else
11949   echo "$as_me: failed program was:" >&5
11950 cat conftest.$ac_ext >&5
11951 sigact_bad=unknown
11952 fi
11953 rm -f conftest.$ac_objext conftest.$ac_ext
11954 fi
11955 rm -f conftest.$ac_objext conftest.$ac_ext
11956 echo "$as_me:11956: result: $sigact_bad" >&5
11957 echo "${ECHO_T}$sigact_bad" >&6
11958 fi
11959
11960 echo "$as_me:11960: checking if nanosleep really works" >&5
11961 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
11962 if test "${cf_cv_func_nanosleep+set}" = set; then
11963   echo $ECHO_N "(cached) $ECHO_C" >&6
11964 else
11965
11966 if test "$cross_compiling" = yes; then
11967   cf_cv_func_nanosleep=unknown
11968 else
11969   cat >conftest.$ac_ext <<_ACEOF
11970 #line 11970 "configure"
11971 #include "confdefs.h"
11972
11973 #include <stdio.h>
11974 #include <errno.h>
11975 #include <time.h>
11976
11977 #ifdef HAVE_SYS_TIME_H
11978 #include <sys/time.h>
11979 #endif
11980
11981 int main() {
11982         struct timespec ts1, ts2;
11983         int code;
11984         ts1.tv_sec  = 0;
11985         ts1.tv_nsec = 750000000;
11986         ts2.tv_sec  = 0;
11987         ts2.tv_nsec = 0;
11988         errno = 0;
11989         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
11990         ${cf_cv_main_return:-return}(code != 0);
11991 }
11992
11993 _ACEOF
11994 rm -f conftest$ac_exeext
11995 if { (eval echo "$as_me:11995: \"$ac_link\"") >&5
11996   (eval $ac_link) 2>&5
11997   ac_status=$?
11998   echo "$as_me:11998: \$? = $ac_status" >&5
11999   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12000   { (eval echo "$as_me:12000: \"$ac_try\"") >&5
12001   (eval $ac_try) 2>&5
12002   ac_status=$?
12003   echo "$as_me:12003: \$? = $ac_status" >&5
12004   (exit $ac_status); }; }; then
12005   cf_cv_func_nanosleep=yes
12006 else
12007   echo "$as_me: program exited with status $ac_status" >&5
12008 echo "$as_me: failed program was:" >&5
12009 cat conftest.$ac_ext >&5
12010 cf_cv_func_nanosleep=no
12011 fi
12012 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12013 fi
12014 fi
12015 echo "$as_me:12015: result: $cf_cv_func_nanosleep" >&5
12016 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12017
12018 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12019 #define HAVE_NANOSLEEP 1
12020 EOF
12021
12022 for ac_header in \
12023 termio.h \
12024 termios.h \
12025 unistd.h \
12026
12027 do
12028 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12029 echo "$as_me:12029: checking for $ac_header" >&5
12030 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12031 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12032   echo $ECHO_N "(cached) $ECHO_C" >&6
12033 else
12034   cat >conftest.$ac_ext <<_ACEOF
12035 #line 12035 "configure"
12036 #include "confdefs.h"
12037 #include <$ac_header>
12038 _ACEOF
12039 if { (eval echo "$as_me:12039: \"$ac_cpp conftest.$ac_ext\"") >&5
12040   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12041   ac_status=$?
12042   egrep -v '^ *\+' conftest.er1 >conftest.err
12043   rm -f conftest.er1
12044   cat conftest.err >&5
12045   echo "$as_me:12045: \$? = $ac_status" >&5
12046   (exit $ac_status); } >/dev/null; then
12047   if test -s conftest.err; then
12048     ac_cpp_err=$ac_c_preproc_warn_flag
12049   else
12050     ac_cpp_err=
12051   fi
12052 else
12053   ac_cpp_err=yes
12054 fi
12055 if test -z "$ac_cpp_err"; then
12056   eval "$as_ac_Header=yes"
12057 else
12058   echo "$as_me: failed program was:" >&5
12059   cat conftest.$ac_ext >&5
12060   eval "$as_ac_Header=no"
12061 fi
12062 rm -f conftest.err conftest.$ac_ext
12063 fi
12064 echo "$as_me:12064: result: `eval echo '${'$as_ac_Header'}'`" >&5
12065 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12066 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12067   cat >>confdefs.h <<EOF
12068 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12069 EOF
12070
12071 fi
12072 done
12073
12074 if test "$ISC" = yes ; then
12075
12076 for ac_header in sys/termio.h
12077 do
12078 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12079 echo "$as_me:12079: checking for $ac_header" >&5
12080 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12081 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12082   echo $ECHO_N "(cached) $ECHO_C" >&6
12083 else
12084   cat >conftest.$ac_ext <<_ACEOF
12085 #line 12085 "configure"
12086 #include "confdefs.h"
12087 #include <$ac_header>
12088 _ACEOF
12089 if { (eval echo "$as_me:12089: \"$ac_cpp conftest.$ac_ext\"") >&5
12090   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12091   ac_status=$?
12092   egrep -v '^ *\+' conftest.er1 >conftest.err
12093   rm -f conftest.er1
12094   cat conftest.err >&5
12095   echo "$as_me:12095: \$? = $ac_status" >&5
12096   (exit $ac_status); } >/dev/null; then
12097   if test -s conftest.err; then
12098     ac_cpp_err=$ac_c_preproc_warn_flag
12099   else
12100     ac_cpp_err=
12101   fi
12102 else
12103   ac_cpp_err=yes
12104 fi
12105 if test -z "$ac_cpp_err"; then
12106   eval "$as_ac_Header=yes"
12107 else
12108   echo "$as_me: failed program was:" >&5
12109   cat conftest.$ac_ext >&5
12110   eval "$as_ac_Header=no"
12111 fi
12112 rm -f conftest.err conftest.$ac_ext
12113 fi
12114 echo "$as_me:12114: result: `eval echo '${'$as_ac_Header'}'`" >&5
12115 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12116 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12117   cat >>confdefs.h <<EOF
12118 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12119 EOF
12120
12121 fi
12122 done
12123
12124 fi
12125 if test "$ac_cv_header_termios_h" = yes ; then
12126         case "$CFLAGS $CPPFLAGS" in
12127         *-D_POSIX_SOURCE*)
12128                 termios_bad=dunno ;;
12129         *)      termios_bad=maybe ;;
12130         esac
12131         if test "$termios_bad" = maybe ; then
12132         echo "$as_me:12132: checking whether termios.h needs _POSIX_SOURCE" >&5
12133 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12134         cat >conftest.$ac_ext <<_ACEOF
12135 #line 12135 "configure"
12136 #include "confdefs.h"
12137 #include <termios.h>
12138 int
12139 main ()
12140 {
12141 struct termios foo; int x = foo.c_iflag
12142   ;
12143   return 0;
12144 }
12145 _ACEOF
12146 rm -f conftest.$ac_objext
12147 if { (eval echo "$as_me:12147: \"$ac_compile\"") >&5
12148   (eval $ac_compile) 2>&5
12149   ac_status=$?
12150   echo "$as_me:12150: \$? = $ac_status" >&5
12151   (exit $ac_status); } &&
12152          { ac_try='test -s conftest.$ac_objext'
12153   { (eval echo "$as_me:12153: \"$ac_try\"") >&5
12154   (eval $ac_try) 2>&5
12155   ac_status=$?
12156   echo "$as_me:12156: \$? = $ac_status" >&5
12157   (exit $ac_status); }; }; then
12158   termios_bad=no
12159 else
12160   echo "$as_me: failed program was:" >&5
12161 cat conftest.$ac_ext >&5
12162
12163                 cat >conftest.$ac_ext <<_ACEOF
12164 #line 12164 "configure"
12165 #include "confdefs.h"
12166
12167 #define _POSIX_SOURCE
12168 #include <termios.h>
12169 int
12170 main ()
12171 {
12172 struct termios foo; int x = foo.c_iflag
12173   ;
12174   return 0;
12175 }
12176 _ACEOF
12177 rm -f conftest.$ac_objext
12178 if { (eval echo "$as_me:12178: \"$ac_compile\"") >&5
12179   (eval $ac_compile) 2>&5
12180   ac_status=$?
12181   echo "$as_me:12181: \$? = $ac_status" >&5
12182   (exit $ac_status); } &&
12183          { ac_try='test -s conftest.$ac_objext'
12184   { (eval echo "$as_me:12184: \"$ac_try\"") >&5
12185   (eval $ac_try) 2>&5
12186   ac_status=$?
12187   echo "$as_me:12187: \$? = $ac_status" >&5
12188   (exit $ac_status); }; }; then
12189   termios_bad=unknown
12190 else
12191   echo "$as_me: failed program was:" >&5
12192 cat conftest.$ac_ext >&5
12193 termios_bad=yes cat >>confdefs.h <<\EOF
12194 #define SVR4_TERMIO 1
12195 EOF
12196
12197 fi
12198 rm -f conftest.$ac_objext conftest.$ac_ext
12199
12200 fi
12201 rm -f conftest.$ac_objext conftest.$ac_ext
12202         echo "$as_me:12202: result: $termios_bad" >&5
12203 echo "${ECHO_T}$termios_bad" >&6
12204         fi
12205 fi
12206
12207 echo "$as_me:12207: checking for tcgetattr" >&5
12208 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12209 if test "${cf_cv_have_tcgetattr+set}" = set; then
12210   echo $ECHO_N "(cached) $ECHO_C" >&6
12211 else
12212
12213 cat >conftest.$ac_ext <<_ACEOF
12214 #line 12214 "configure"
12215 #include "confdefs.h"
12216
12217 #include <sys/types.h>
12218 #ifdef HAVE_UNISTD_H
12219 #include <unistd.h>
12220 #endif
12221 #ifdef HAVE_TERMIOS_H
12222 #include <termios.h>
12223 #define TTY struct termios
12224 #else
12225 #ifdef HAVE_TERMIO_H
12226 #include <termio.h>
12227 #define TTY struct termio
12228 #endif
12229 #endif
12230
12231 int
12232 main ()
12233 {
12234
12235 TTY foo;
12236 tcgetattr(1, &foo);
12237   ;
12238   return 0;
12239 }
12240 _ACEOF
12241 rm -f conftest.$ac_objext conftest$ac_exeext
12242 if { (eval echo "$as_me:12242: \"$ac_link\"") >&5
12243   (eval $ac_link) 2>&5
12244   ac_status=$?
12245   echo "$as_me:12245: \$? = $ac_status" >&5
12246   (exit $ac_status); } &&
12247          { ac_try='test -s conftest$ac_exeext'
12248   { (eval echo "$as_me:12248: \"$ac_try\"") >&5
12249   (eval $ac_try) 2>&5
12250   ac_status=$?
12251   echo "$as_me:12251: \$? = $ac_status" >&5
12252   (exit $ac_status); }; }; then
12253   cf_cv_have_tcgetattr=yes
12254 else
12255   echo "$as_me: failed program was:" >&5
12256 cat conftest.$ac_ext >&5
12257 cf_cv_have_tcgetattr=no
12258 fi
12259 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12260 fi
12261 echo "$as_me:12261: result: $cf_cv_have_tcgetattr" >&5
12262 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12263 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12264 #define HAVE_TCGETATTR 1
12265 EOF
12266
12267 echo "$as_me:12267: checking for vsscanf function or workaround" >&5
12268 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12269 if test "${cf_cv_func_vsscanf+set}" = set; then
12270   echo $ECHO_N "(cached) $ECHO_C" >&6
12271 else
12272
12273 cat >conftest.$ac_ext <<_ACEOF
12274 #line 12274 "configure"
12275 #include "confdefs.h"
12276
12277 #include <stdarg.h>
12278 #include <stdio.h>
12279 int
12280 main ()
12281 {
12282
12283         va_list ap;
12284         vsscanf("from", "%d", ap)
12285   ;
12286   return 0;
12287 }
12288 _ACEOF
12289 rm -f conftest.$ac_objext conftest$ac_exeext
12290 if { (eval echo "$as_me:12290: \"$ac_link\"") >&5
12291   (eval $ac_link) 2>&5
12292   ac_status=$?
12293   echo "$as_me:12293: \$? = $ac_status" >&5
12294   (exit $ac_status); } &&
12295          { ac_try='test -s conftest$ac_exeext'
12296   { (eval echo "$as_me:12296: \"$ac_try\"") >&5
12297   (eval $ac_try) 2>&5
12298   ac_status=$?
12299   echo "$as_me:12299: \$? = $ac_status" >&5
12300   (exit $ac_status); }; }; then
12301   cf_cv_func_vsscanf=vsscanf
12302 else
12303   echo "$as_me: failed program was:" >&5
12304 cat conftest.$ac_ext >&5
12305
12306 cat >conftest.$ac_ext <<_ACEOF
12307 #line 12307 "configure"
12308 #include "confdefs.h"
12309
12310 #include <stdarg.h>
12311 #include <stdio.h>
12312 int
12313 main ()
12314 {
12315
12316     FILE strbuf;
12317     char *str = "from";
12318
12319     strbuf._flag = _IOREAD;
12320     strbuf._ptr = strbuf._base = (unsigned char *) str;
12321     strbuf._cnt = strlen(str);
12322     strbuf._file = _NFILE;
12323     return (vfscanf(&strbuf, "%d", ap))
12324   ;
12325   return 0;
12326 }
12327 _ACEOF
12328 rm -f conftest.$ac_objext conftest$ac_exeext
12329 if { (eval echo "$as_me:12329: \"$ac_link\"") >&5
12330   (eval $ac_link) 2>&5
12331   ac_status=$?
12332   echo "$as_me:12332: \$? = $ac_status" >&5
12333   (exit $ac_status); } &&
12334          { ac_try='test -s conftest$ac_exeext'
12335   { (eval echo "$as_me:12335: \"$ac_try\"") >&5
12336   (eval $ac_try) 2>&5
12337   ac_status=$?
12338   echo "$as_me:12338: \$? = $ac_status" >&5
12339   (exit $ac_status); }; }; then
12340   cf_cv_func_vsscanf=vfscanf
12341 else
12342   echo "$as_me: failed program was:" >&5
12343 cat conftest.$ac_ext >&5
12344
12345 cat >conftest.$ac_ext <<_ACEOF
12346 #line 12346 "configure"
12347 #include "confdefs.h"
12348
12349 #include <stdarg.h>
12350 #include <stdio.h>
12351 int
12352 main ()
12353 {
12354
12355     FILE strbuf;
12356     char *str = "from";
12357
12358     strbuf._flag = _IOREAD;
12359     strbuf._ptr = strbuf._base = (unsigned char *) str;
12360     strbuf._cnt = strlen(str);
12361     strbuf._file = _NFILE;
12362     return (_doscan(&strbuf, "%d", ap))
12363   ;
12364   return 0;
12365 }
12366 _ACEOF
12367 rm -f conftest.$ac_objext conftest$ac_exeext
12368 if { (eval echo "$as_me:12368: \"$ac_link\"") >&5
12369   (eval $ac_link) 2>&5
12370   ac_status=$?
12371   echo "$as_me:12371: \$? = $ac_status" >&5
12372   (exit $ac_status); } &&
12373          { ac_try='test -s conftest$ac_exeext'
12374   { (eval echo "$as_me:12374: \"$ac_try\"") >&5
12375   (eval $ac_try) 2>&5
12376   ac_status=$?
12377   echo "$as_me:12377: \$? = $ac_status" >&5
12378   (exit $ac_status); }; }; then
12379   cf_cv_func_vsscanf=_doscan
12380 else
12381   echo "$as_me: failed program was:" >&5
12382 cat conftest.$ac_ext >&5
12383
12384 cf_cv_func_vsscanf=no
12385 fi
12386 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12387 fi
12388 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12389 fi
12390 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12391 fi
12392 echo "$as_me:12392: result: $cf_cv_func_vsscanf" >&5
12393 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12394
12395 case $cf_cv_func_vsscanf in #(vi
12396 vsscanf) cat >>confdefs.h <<\EOF
12397 #define HAVE_VSSCANF 1
12398 EOF
12399 ;; #(vi
12400 vfscanf) cat >>confdefs.h <<\EOF
12401 #define HAVE_VFSCANF 1
12402 EOF
12403 ;; #(vi
12404 _doscan) cat >>confdefs.h <<\EOF
12405 #define HAVE__DOSCAN 1
12406 EOF
12407 ;;
12408 esac
12409
12410 echo "$as_me:12410: checking for working mkstemp" >&5
12411 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
12412 if test "${cf_cv_func_mkstemp+set}" = set; then
12413   echo $ECHO_N "(cached) $ECHO_C" >&6
12414 else
12415
12416 rm -f conftest*
12417 if test "$cross_compiling" = yes; then
12418   echo "$as_me:12418: checking for mkstemp" >&5
12419 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
12420 if test "${ac_cv_func_mkstemp+set}" = set; then
12421   echo $ECHO_N "(cached) $ECHO_C" >&6
12422 else
12423   cat >conftest.$ac_ext <<_ACEOF
12424 #line 12424 "configure"
12425 #include "confdefs.h"
12426 /* System header to define __stub macros and hopefully few prototypes,
12427     which can conflict with char mkstemp (); below.  */
12428 #include <assert.h>
12429 /* Override any gcc2 internal prototype to avoid an error.  */
12430 #ifdef __cplusplus
12431 extern "C"
12432 #endif
12433 /* We use char because int might match the return type of a gcc2
12434    builtin and then its argument prototype would still apply.  */
12435 char mkstemp ();
12436 char (*f) ();
12437
12438 int
12439 main ()
12440 {
12441 /* The GNU C library defines this for functions which it implements
12442     to always fail with ENOSYS.  Some functions are actually named
12443     something starting with __ and the normal name is an alias.  */
12444 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
12445 choke me
12446 #else
12447 f = mkstemp;
12448 #endif
12449
12450   ;
12451   return 0;
12452 }
12453 _ACEOF
12454 rm -f conftest.$ac_objext conftest$ac_exeext
12455 if { (eval echo "$as_me:12455: \"$ac_link\"") >&5
12456   (eval $ac_link) 2>&5
12457   ac_status=$?
12458   echo "$as_me:12458: \$? = $ac_status" >&5
12459   (exit $ac_status); } &&
12460          { ac_try='test -s conftest$ac_exeext'
12461   { (eval echo "$as_me:12461: \"$ac_try\"") >&5
12462   (eval $ac_try) 2>&5
12463   ac_status=$?
12464   echo "$as_me:12464: \$? = $ac_status" >&5
12465   (exit $ac_status); }; }; then
12466   ac_cv_func_mkstemp=yes
12467 else
12468   echo "$as_me: failed program was:" >&5
12469 cat conftest.$ac_ext >&5
12470 ac_cv_func_mkstemp=no
12471 fi
12472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12473 fi
12474 echo "$as_me:12474: result: $ac_cv_func_mkstemp" >&5
12475 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
12476
12477 else
12478   cat >conftest.$ac_ext <<_ACEOF
12479 #line 12479 "configure"
12480 #include "confdefs.h"
12481
12482 #include <sys/types.h>
12483 #include <stdlib.h>
12484 #include <stdio.h>
12485 #include <string.h>
12486 #include <sys/stat.h>
12487 int main()
12488 {
12489         char *tmpl = "conftestXXXXXX";
12490         char name[2][80];
12491         int n;
12492         int result = 0;
12493         int fd;
12494         struct stat sb;
12495
12496         umask(077);
12497         for (n = 0; n < 2; ++n) {
12498                 strcpy(name[n], tmpl);
12499                 if ((fd = mkstemp(name[n])) >= 0) {
12500                         if (!strcmp(name[n], tmpl)
12501                          || stat(name[n], &sb) != 0
12502                          || (sb.st_mode & S_IFMT) != S_IFREG
12503                          || (sb.st_mode & 077) != 0) {
12504                                 result = 1;
12505                         }
12506                         close(fd);
12507                 }
12508         }
12509         if (result == 0
12510          && !strcmp(name[0], name[1]))
12511                 result = 1;
12512         ${cf_cv_main_return:-return}(result);
12513 }
12514
12515 _ACEOF
12516 rm -f conftest$ac_exeext
12517 if { (eval echo "$as_me:12517: \"$ac_link\"") >&5
12518   (eval $ac_link) 2>&5
12519   ac_status=$?
12520   echo "$as_me:12520: \$? = $ac_status" >&5
12521   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12522   { (eval echo "$as_me:12522: \"$ac_try\"") >&5
12523   (eval $ac_try) 2>&5
12524   ac_status=$?
12525   echo "$as_me:12525: \$? = $ac_status" >&5
12526   (exit $ac_status); }; }; then
12527   cf_cv_func_mkstemp=yes
12528
12529 else
12530   echo "$as_me: program exited with status $ac_status" >&5
12531 echo "$as_me: failed program was:" >&5
12532 cat conftest.$ac_ext >&5
12533 cf_cv_func_mkstemp=no
12534
12535 fi
12536 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12537 fi
12538
12539 fi
12540 echo "$as_me:12540: result: $cf_cv_func_mkstemp" >&5
12541 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
12542 if test "$cf_cv_func_mkstemp" = yes ; then
12543         cat >>confdefs.h <<\EOF
12544 #define HAVE_MKSTEMP 1
12545 EOF
12546
12547 fi
12548
12549 # setup for prototype of fallback for vsscanf()
12550
12551 if test "$cf_cv_func_vsscanf" = vsscanf ; then
12552         HAVE_VSSCANF=1
12553 else
12554         HAVE_VSSCANF=0
12555 fi
12556
12557 if test "$cross_compiling" = yes ; then
12558         { echo "$as_me:12558: WARNING: cross compiling: assume setvbuf params not reversed" >&5
12559 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
12560 else
12561         echo "$as_me:12561: checking whether setvbuf arguments are reversed" >&5
12562 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
12563 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
12564   echo $ECHO_N "(cached) $ECHO_C" >&6
12565 else
12566   if test "$cross_compiling" = yes; then
12567   { { echo "$as_me:12567: error: cannot run test program while cross compiling" >&5
12568 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12569    { (exit 1); exit 1; }; }
12570 else
12571   cat >conftest.$ac_ext <<_ACEOF
12572 #line 12572 "configure"
12573 #include "confdefs.h"
12574 #include <stdio.h>
12575 /* If setvbuf has the reversed format, exit 0. */
12576 int
12577 main ()
12578 {
12579   /* This call has the arguments reversed.
12580      A reversed system may check and see that the address of main
12581      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
12582   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
12583     $ac_main_return(1);
12584   putc('\r', stdout);
12585   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
12586 }
12587 _ACEOF
12588 rm -f conftest$ac_exeext
12589 if { (eval echo "$as_me:12589: \"$ac_link\"") >&5
12590   (eval $ac_link) 2>&5
12591   ac_status=$?
12592   echo "$as_me:12592: \$? = $ac_status" >&5
12593   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12594   { (eval echo "$as_me:12594: \"$ac_try\"") >&5
12595   (eval $ac_try) 2>&5
12596   ac_status=$?
12597   echo "$as_me:12597: \$? = $ac_status" >&5
12598   (exit $ac_status); }; }; then
12599   ac_cv_func_setvbuf_reversed=yes
12600 else
12601   echo "$as_me: program exited with status $ac_status" >&5
12602 echo "$as_me: failed program was:" >&5
12603 cat conftest.$ac_ext >&5
12604 ac_cv_func_setvbuf_reversed=no
12605 fi
12606 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12607 fi
12608 rm -f core core.* *.core
12609 fi
12610 echo "$as_me:12610: result: $ac_cv_func_setvbuf_reversed" >&5
12611 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
12612 if test $ac_cv_func_setvbuf_reversed = yes; then
12613
12614 cat >>confdefs.h <<\EOF
12615 #define SETVBUF_REVERSED 1
12616 EOF
12617
12618 fi
12619
12620 fi
12621 echo "$as_me:12621: checking return type of signal handlers" >&5
12622 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12623 if test "${ac_cv_type_signal+set}" = set; then
12624   echo $ECHO_N "(cached) $ECHO_C" >&6
12625 else
12626   cat >conftest.$ac_ext <<_ACEOF
12627 #line 12627 "configure"
12628 #include "confdefs.h"
12629 #include <sys/types.h>
12630 #include <signal.h>
12631 #ifdef signal
12632 # undef signal
12633 #endif
12634 #ifdef __cplusplus
12635 extern "C" void (*signal (int, void (*)(int)))(int);
12636 #else
12637 void (*signal ()) ();
12638 #endif
12639
12640 int
12641 main ()
12642 {
12643 int i;
12644   ;
12645   return 0;
12646 }
12647 _ACEOF
12648 rm -f conftest.$ac_objext
12649 if { (eval echo "$as_me:12649: \"$ac_compile\"") >&5
12650   (eval $ac_compile) 2>&5
12651   ac_status=$?
12652   echo "$as_me:12652: \$? = $ac_status" >&5
12653   (exit $ac_status); } &&
12654          { ac_try='test -s conftest.$ac_objext'
12655   { (eval echo "$as_me:12655: \"$ac_try\"") >&5
12656   (eval $ac_try) 2>&5
12657   ac_status=$?
12658   echo "$as_me:12658: \$? = $ac_status" >&5
12659   (exit $ac_status); }; }; then
12660   ac_cv_type_signal=void
12661 else
12662   echo "$as_me: failed program was:" >&5
12663 cat conftest.$ac_ext >&5
12664 ac_cv_type_signal=int
12665 fi
12666 rm -f conftest.$ac_objext conftest.$ac_ext
12667 fi
12668 echo "$as_me:12668: result: $ac_cv_type_signal" >&5
12669 echo "${ECHO_T}$ac_cv_type_signal" >&6
12670
12671 cat >>confdefs.h <<EOF
12672 #define RETSIGTYPE $ac_cv_type_signal
12673 EOF
12674
12675 echo "$as_me:12675: checking for type sigaction_t" >&5
12676 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
12677 if test "${cf_cv_type_sigaction+set}" = set; then
12678   echo $ECHO_N "(cached) $ECHO_C" >&6
12679 else
12680
12681         cat >conftest.$ac_ext <<_ACEOF
12682 #line 12682 "configure"
12683 #include "confdefs.h"
12684
12685 #include <signal.h>
12686 int
12687 main ()
12688 {
12689 sigaction_t x
12690   ;
12691   return 0;
12692 }
12693 _ACEOF
12694 rm -f conftest.$ac_objext
12695 if { (eval echo "$as_me:12695: \"$ac_compile\"") >&5
12696   (eval $ac_compile) 2>&5
12697   ac_status=$?
12698   echo "$as_me:12698: \$? = $ac_status" >&5
12699   (exit $ac_status); } &&
12700          { ac_try='test -s conftest.$ac_objext'
12701   { (eval echo "$as_me:12701: \"$ac_try\"") >&5
12702   (eval $ac_try) 2>&5
12703   ac_status=$?
12704   echo "$as_me:12704: \$? = $ac_status" >&5
12705   (exit $ac_status); }; }; then
12706   cf_cv_type_sigaction=yes
12707 else
12708   echo "$as_me: failed program was:" >&5
12709 cat conftest.$ac_ext >&5
12710 cf_cv_type_sigaction=no
12711 fi
12712 rm -f conftest.$ac_objext conftest.$ac_ext
12713 fi
12714
12715 echo "$as_me:12715: result: $cf_cv_type_sigaction" >&5
12716 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
12717 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
12718 #define HAVE_TYPE_SIGACTION 1
12719 EOF
12720
12721 echo "$as_me:12721: checking declaration of size-change" >&5
12722 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
12723 if test "${cf_cv_sizechange+set}" = set; then
12724   echo $ECHO_N "(cached) $ECHO_C" >&6
12725 else
12726
12727     cf_cv_sizechange=unknown
12728     cf_save_CPPFLAGS="$CPPFLAGS"
12729
12730 for cf_opts in "" "NEED_PTEM_H"
12731 do
12732
12733     CPPFLAGS="$cf_save_CPPFLAGS"
12734     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
12735     cat >conftest.$ac_ext <<_ACEOF
12736 #line 12736 "configure"
12737 #include "confdefs.h"
12738 #include <sys/types.h>
12739 #ifdef HAVE_TERMIOS_H
12740 #include <termios.h>
12741 #else
12742 #ifdef HAVE_TERMIO_H
12743 #include <termio.h>
12744 #endif
12745 #endif
12746 #ifdef NEED_PTEM_H
12747 /* This is a workaround for SCO:  they neglected to define struct winsize in
12748  * termios.h -- it's only in termio.h and ptem.h
12749  */
12750 #include        <sys/stream.h>
12751 #include        <sys/ptem.h>
12752 #endif
12753 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
12754 #include <sys/ioctl.h>
12755 #endif
12756
12757 int
12758 main ()
12759 {
12760
12761 #ifdef TIOCGSIZE
12762         struct ttysize win;     /* FIXME: what system is this? */
12763         int y = win.ts_lines;
12764         int x = win.ts_cols;
12765 #else
12766 #ifdef TIOCGWINSZ
12767         struct winsize win;
12768         int y = win.ws_row;
12769         int x = win.ws_col;
12770 #else
12771         no TIOCGSIZE or TIOCGWINSZ
12772 #endif /* TIOCGWINSZ */
12773 #endif /* TIOCGSIZE */
12774
12775   ;
12776   return 0;
12777 }
12778 _ACEOF
12779 rm -f conftest.$ac_objext
12780 if { (eval echo "$as_me:12780: \"$ac_compile\"") >&5
12781   (eval $ac_compile) 2>&5
12782   ac_status=$?
12783   echo "$as_me:12783: \$? = $ac_status" >&5
12784   (exit $ac_status); } &&
12785          { ac_try='test -s conftest.$ac_objext'
12786   { (eval echo "$as_me:12786: \"$ac_try\"") >&5
12787   (eval $ac_try) 2>&5
12788   ac_status=$?
12789   echo "$as_me:12789: \$? = $ac_status" >&5
12790   (exit $ac_status); }; }; then
12791   cf_cv_sizechange=yes
12792 else
12793   echo "$as_me: failed program was:" >&5
12794 cat conftest.$ac_ext >&5
12795 cf_cv_sizechange=no
12796 fi
12797 rm -f conftest.$ac_objext conftest.$ac_ext
12798
12799         CPPFLAGS="$cf_save_CPPFLAGS"
12800         if test "$cf_cv_sizechange" = yes ; then
12801                 echo "size-change succeeded ($cf_opts)" >&5
12802                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
12803                 break
12804         fi
12805 done
12806
12807 fi
12808 echo "$as_me:12808: result: $cf_cv_sizechange" >&5
12809 echo "${ECHO_T}$cf_cv_sizechange" >&6
12810 if test "$cf_cv_sizechange" != no ; then
12811         cat >>confdefs.h <<\EOF
12812 #define HAVE_SIZECHANGE 1
12813 EOF
12814
12815         case $cf_cv_sizechange in #(vi
12816         NEED*)
12817                 cat >>confdefs.h <<EOF
12818 #define $cf_cv_sizechange  1
12819 EOF
12820
12821                 ;;
12822         esac
12823 fi
12824
12825 echo "$as_me:12825: checking for memmove" >&5
12826 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
12827 if test "${ac_cv_func_memmove+set}" = set; then
12828   echo $ECHO_N "(cached) $ECHO_C" >&6
12829 else
12830   cat >conftest.$ac_ext <<_ACEOF
12831 #line 12831 "configure"
12832 #include "confdefs.h"
12833 /* System header to define __stub macros and hopefully few prototypes,
12834     which can conflict with char memmove (); below.  */
12835 #include <assert.h>
12836 /* Override any gcc2 internal prototype to avoid an error.  */
12837 #ifdef __cplusplus
12838 extern "C"
12839 #endif
12840 /* We use char because int might match the return type of a gcc2
12841    builtin and then its argument prototype would still apply.  */
12842 char memmove ();
12843 char (*f) ();
12844
12845 int
12846 main ()
12847 {
12848 /* The GNU C library defines this for functions which it implements
12849     to always fail with ENOSYS.  Some functions are actually named
12850     something starting with __ and the normal name is an alias.  */
12851 #if defined (__stub_memmove) || defined (__stub___memmove)
12852 choke me
12853 #else
12854 f = memmove;
12855 #endif
12856
12857   ;
12858   return 0;
12859 }
12860 _ACEOF
12861 rm -f conftest.$ac_objext conftest$ac_exeext
12862 if { (eval echo "$as_me:12862: \"$ac_link\"") >&5
12863   (eval $ac_link) 2>&5
12864   ac_status=$?
12865   echo "$as_me:12865: \$? = $ac_status" >&5
12866   (exit $ac_status); } &&
12867          { ac_try='test -s conftest$ac_exeext'
12868   { (eval echo "$as_me:12868: \"$ac_try\"") >&5
12869   (eval $ac_try) 2>&5
12870   ac_status=$?
12871   echo "$as_me:12871: \$? = $ac_status" >&5
12872   (exit $ac_status); }; }; then
12873   ac_cv_func_memmove=yes
12874 else
12875   echo "$as_me: failed program was:" >&5
12876 cat conftest.$ac_ext >&5
12877 ac_cv_func_memmove=no
12878 fi
12879 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12880 fi
12881 echo "$as_me:12881: result: $ac_cv_func_memmove" >&5
12882 echo "${ECHO_T}$ac_cv_func_memmove" >&6
12883 if test $ac_cv_func_memmove = yes; then
12884   :
12885 else
12886
12887 echo "$as_me:12887: checking for bcopy" >&5
12888 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
12889 if test "${ac_cv_func_bcopy+set}" = set; then
12890   echo $ECHO_N "(cached) $ECHO_C" >&6
12891 else
12892   cat >conftest.$ac_ext <<_ACEOF
12893 #line 12893 "configure"
12894 #include "confdefs.h"
12895 /* System header to define __stub macros and hopefully few prototypes,
12896     which can conflict with char bcopy (); below.  */
12897 #include <assert.h>
12898 /* Override any gcc2 internal prototype to avoid an error.  */
12899 #ifdef __cplusplus
12900 extern "C"
12901 #endif
12902 /* We use char because int might match the return type of a gcc2
12903    builtin and then its argument prototype would still apply.  */
12904 char bcopy ();
12905 char (*f) ();
12906
12907 int
12908 main ()
12909 {
12910 /* The GNU C library defines this for functions which it implements
12911     to always fail with ENOSYS.  Some functions are actually named
12912     something starting with __ and the normal name is an alias.  */
12913 #if defined (__stub_bcopy) || defined (__stub___bcopy)
12914 choke me
12915 #else
12916 f = bcopy;
12917 #endif
12918
12919   ;
12920   return 0;
12921 }
12922 _ACEOF
12923 rm -f conftest.$ac_objext conftest$ac_exeext
12924 if { (eval echo "$as_me:12924: \"$ac_link\"") >&5
12925   (eval $ac_link) 2>&5
12926   ac_status=$?
12927   echo "$as_me:12927: \$? = $ac_status" >&5
12928   (exit $ac_status); } &&
12929          { ac_try='test -s conftest$ac_exeext'
12930   { (eval echo "$as_me:12930: \"$ac_try\"") >&5
12931   (eval $ac_try) 2>&5
12932   ac_status=$?
12933   echo "$as_me:12933: \$? = $ac_status" >&5
12934   (exit $ac_status); }; }; then
12935   ac_cv_func_bcopy=yes
12936 else
12937   echo "$as_me: failed program was:" >&5
12938 cat conftest.$ac_ext >&5
12939 ac_cv_func_bcopy=no
12940 fi
12941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12942 fi
12943 echo "$as_me:12943: result: $ac_cv_func_bcopy" >&5
12944 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
12945 if test $ac_cv_func_bcopy = yes; then
12946
12947         echo "$as_me:12947: checking if bcopy does overlapping moves" >&5
12948 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
12949 if test "${cf_cv_good_bcopy+set}" = set; then
12950   echo $ECHO_N "(cached) $ECHO_C" >&6
12951 else
12952
12953                 if test "$cross_compiling" = yes; then
12954   cf_cv_good_bcopy=unknown
12955 else
12956   cat >conftest.$ac_ext <<_ACEOF
12957 #line 12957 "configure"
12958 #include "confdefs.h"
12959
12960 int main() {
12961         static char data[] = "abcdefghijklmnopqrstuwwxyz";
12962         char temp[40];
12963         bcopy(data, temp, sizeof(data));
12964         bcopy(temp+10, temp, 15);
12965         bcopy(temp+5, temp+15, 10);
12966         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
12967 }
12968
12969 _ACEOF
12970 rm -f conftest$ac_exeext
12971 if { (eval echo "$as_me:12971: \"$ac_link\"") >&5
12972   (eval $ac_link) 2>&5
12973   ac_status=$?
12974   echo "$as_me:12974: \$? = $ac_status" >&5
12975   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12976   { (eval echo "$as_me:12976: \"$ac_try\"") >&5
12977   (eval $ac_try) 2>&5
12978   ac_status=$?
12979   echo "$as_me:12979: \$? = $ac_status" >&5
12980   (exit $ac_status); }; }; then
12981   cf_cv_good_bcopy=yes
12982 else
12983   echo "$as_me: program exited with status $ac_status" >&5
12984 echo "$as_me: failed program was:" >&5
12985 cat conftest.$ac_ext >&5
12986 cf_cv_good_bcopy=no
12987 fi
12988 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12989 fi
12990
12991 fi
12992 echo "$as_me:12992: result: $cf_cv_good_bcopy" >&5
12993 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
12994
12995 else
12996   cf_cv_good_bcopy=no
12997 fi
12998
12999         if test "$cf_cv_good_bcopy" = yes ; then
13000                 cat >>confdefs.h <<\EOF
13001 #define USE_OK_BCOPY 1
13002 EOF
13003
13004         else
13005                 cat >>confdefs.h <<\EOF
13006 #define USE_MY_MEMMOVE 1
13007 EOF
13008
13009         fi
13010
13011 fi
13012
13013 echo "$as_me:13013: checking if poll really works" >&5
13014 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13015 if test "${cf_cv_working_poll+set}" = set; then
13016   echo $ECHO_N "(cached) $ECHO_C" >&6
13017 else
13018
13019 if test "$cross_compiling" = yes; then
13020   cf_cv_working_poll=unknown
13021 else
13022   cat >conftest.$ac_ext <<_ACEOF
13023 #line 13023 "configure"
13024 #include "confdefs.h"
13025
13026 #include <stdio.h>
13027 #ifdef HAVE_POLL_H
13028 #include <poll.h>
13029 #else
13030 #include <sys/poll.h>
13031 #endif
13032 int main() {
13033         struct pollfd myfds;
13034         int ret;
13035
13036         myfds.fd = 0;
13037         myfds.events = POLLIN;
13038
13039         ret = poll(&myfds, 1, 100);
13040         ${cf_cv_main_return:-return}(ret != 0);
13041 }
13042 _ACEOF
13043 rm -f conftest$ac_exeext
13044 if { (eval echo "$as_me:13044: \"$ac_link\"") >&5
13045   (eval $ac_link) 2>&5
13046   ac_status=$?
13047   echo "$as_me:13047: \$? = $ac_status" >&5
13048   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13049   { (eval echo "$as_me:13049: \"$ac_try\"") >&5
13050   (eval $ac_try) 2>&5
13051   ac_status=$?
13052   echo "$as_me:13052: \$? = $ac_status" >&5
13053   (exit $ac_status); }; }; then
13054   cf_cv_working_poll=yes
13055 else
13056   echo "$as_me: program exited with status $ac_status" >&5
13057 echo "$as_me: failed program was:" >&5
13058 cat conftest.$ac_ext >&5
13059 cf_cv_working_poll=no
13060 fi
13061 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13062 fi
13063 fi
13064 echo "$as_me:13064: result: $cf_cv_working_poll" >&5
13065 echo "${ECHO_T}$cf_cv_working_poll" >&6
13066 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13067 #define HAVE_WORKING_POLL 1
13068 EOF
13069
13070 if test "$with_hashed_db" != no ; then
13071         cat >>confdefs.h <<\EOF
13072 #define USE_HASHED_DB 1
13073 EOF
13074
13075 echo "$as_me:13075: checking for db.h" >&5
13076 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13077 if test "${ac_cv_header_db_h+set}" = set; then
13078   echo $ECHO_N "(cached) $ECHO_C" >&6
13079 else
13080   cat >conftest.$ac_ext <<_ACEOF
13081 #line 13081 "configure"
13082 #include "confdefs.h"
13083 #include <db.h>
13084 _ACEOF
13085 if { (eval echo "$as_me:13085: \"$ac_cpp conftest.$ac_ext\"") >&5
13086   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13087   ac_status=$?
13088   egrep -v '^ *\+' conftest.er1 >conftest.err
13089   rm -f conftest.er1
13090   cat conftest.err >&5
13091   echo "$as_me:13091: \$? = $ac_status" >&5
13092   (exit $ac_status); } >/dev/null; then
13093   if test -s conftest.err; then
13094     ac_cpp_err=$ac_c_preproc_warn_flag
13095   else
13096     ac_cpp_err=
13097   fi
13098 else
13099   ac_cpp_err=yes
13100 fi
13101 if test -z "$ac_cpp_err"; then
13102   ac_cv_header_db_h=yes
13103 else
13104   echo "$as_me: failed program was:" >&5
13105   cat conftest.$ac_ext >&5
13106   ac_cv_header_db_h=no
13107 fi
13108 rm -f conftest.err conftest.$ac_ext
13109 fi
13110 echo "$as_me:13110: result: $ac_cv_header_db_h" >&5
13111 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13112 if test $ac_cv_header_db_h = yes; then
13113
13114 echo "$as_me:13114: checking for version of db" >&5
13115 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13116 if test "${cf_cv_hashed_db_version+set}" = set; then
13117   echo $ECHO_N "(cached) $ECHO_C" >&6
13118 else
13119
13120 cf_cv_hashed_db_version=unknown
13121
13122 for cf_db_version in 1 2 3 4
13123 do
13124
13125 echo "(line 13125) testing checking for db version $cf_db_version ..." 1>&5
13126
13127         cat >conftest.$ac_ext <<_ACEOF
13128 #line 13128 "configure"
13129 #include "confdefs.h"
13130
13131 $ac_includes_default
13132 #include <db.h>
13133
13134 #ifdef DB_VERSION_MAJOR
13135         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13136 #if $cf_db_version == DB_VERSION_MAJOR
13137         /* ok */
13138 #else
13139         make an error
13140 #endif
13141 #else
13142 #if $cf_db_version == 1
13143         /* ok: assuming this is DB 1.8.5 */
13144 #else
13145         make an error
13146 #endif
13147 #endif
13148
13149 int
13150 main ()
13151 {
13152 DBT *foo = 0
13153   ;
13154   return 0;
13155 }
13156 _ACEOF
13157 rm -f conftest.$ac_objext
13158 if { (eval echo "$as_me:13158: \"$ac_compile\"") >&5
13159   (eval $ac_compile) 2>&5
13160   ac_status=$?
13161   echo "$as_me:13161: \$? = $ac_status" >&5
13162   (exit $ac_status); } &&
13163          { ac_try='test -s conftest.$ac_objext'
13164   { (eval echo "$as_me:13164: \"$ac_try\"") >&5
13165   (eval $ac_try) 2>&5
13166   ac_status=$?
13167   echo "$as_me:13167: \$? = $ac_status" >&5
13168   (exit $ac_status); }; }; then
13169
13170         cf_cv_hashed_db_version=$cf_db_version
13171         break
13172
13173 else
13174   echo "$as_me: failed program was:" >&5
13175 cat conftest.$ac_ext >&5
13176 fi
13177 rm -f conftest.$ac_objext conftest.$ac_ext
13178 done
13179
13180 fi
13181 echo "$as_me:13181: result: $cf_cv_hashed_db_version" >&5
13182 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
13183
13184 if test "$cf_cv_hashed_db_version" = unknown ; then
13185         { { echo "$as_me:13185: error: Cannot determine version of db" >&5
13186 echo "$as_me: error: Cannot determine version of db" >&2;}
13187    { (exit 1); exit 1; }; }
13188 else
13189
13190 echo "$as_me:13190: checking for db libraries" >&5
13191 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
13192 if test "${cf_cv_hashed_db_libs+set}" = set; then
13193   echo $ECHO_N "(cached) $ECHO_C" >&6
13194 else
13195
13196 cf_cv_hashed_db_libs=unknown
13197 for cf_db_libs in db$cf_cv_hashed_db_version db ''
13198 do
13199         cf_save_libs="$LIBS"
13200         if test -n "$cf_db_libs"; then
13201                 LIBS="-l$cf_db_libs $LIBS"
13202         fi
13203
13204 echo "(line 13204) testing checking for library "$cf_db_libs" ..." 1>&5
13205
13206         cat >conftest.$ac_ext <<_ACEOF
13207 #line 13207 "configure"
13208 #include "confdefs.h"
13209
13210 $ac_includes_default
13211 #include <db.h>
13212
13213 int
13214 main ()
13215 {
13216
13217         char *path = "/tmp/foo";
13218 #ifdef DB_VERSION_MAJOR
13219 #if DB_VERSION_MAJOR >= 4
13220         DB *result = 0;
13221         db_create(&result, NULL, 0);
13222         result->open(result,
13223                 NULL,
13224                 path,
13225                 path,
13226                 DB_HASH,
13227                 DB_CREATE,
13228                 0644);
13229 #elif DB_VERSION_MAJOR >= 3
13230         DB *result = 0;
13231         db_create(&result, NULL, 0);
13232         result->open(result,
13233                 path,
13234                 path,
13235                 DB_HASH,
13236                 DB_CREATE,
13237                 0644);
13238 #elif DB_VERSION_MAJOR >= 2
13239         DB *result = 0;
13240         db_open(path,
13241                 DB_HASH,
13242                 DB_CREATE,
13243                 0644,
13244                 (DB_ENV *) 0,
13245                 (DB_INFO *) 0,
13246                 &result);
13247 #endif /* DB_VERSION_MAJOR */
13248 #else
13249         DB *result = dbopen(path,
13250                      2,
13251                      0644,
13252                      DB_HASH,
13253                      0);
13254 #endif
13255         ${cf_cv_main_return:-return}(result != 0)
13256
13257   ;
13258   return 0;
13259 }
13260 _ACEOF
13261 rm -f conftest.$ac_objext conftest$ac_exeext
13262 if { (eval echo "$as_me:13262: \"$ac_link\"") >&5
13263   (eval $ac_link) 2>&5
13264   ac_status=$?
13265   echo "$as_me:13265: \$? = $ac_status" >&5
13266   (exit $ac_status); } &&
13267          { ac_try='test -s conftest$ac_exeext'
13268   { (eval echo "$as_me:13268: \"$ac_try\"") >&5
13269   (eval $ac_try) 2>&5
13270   ac_status=$?
13271   echo "$as_me:13271: \$? = $ac_status" >&5
13272   (exit $ac_status); }; }; then
13273
13274         if test -n "$cf_db_libs" ; then
13275                 cf_cv_hashed_db_libs=$cf_db_libs
13276         else
13277                 cf_cv_hashed_db_libs=default
13278         fi
13279         LIBS="$cf_save_libs"
13280         break
13281
13282 else
13283   echo "$as_me: failed program was:" >&5
13284 cat conftest.$ac_ext >&5
13285 fi
13286 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13287         LIBS="$cf_save_libs"
13288 done
13289
13290 fi
13291 echo "$as_me:13291: result: $cf_cv_hashed_db_libs" >&5
13292 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
13293
13294         if test "$cf_cv_hashed_db_libs" = unknown ; then
13295                 { { echo "$as_me:13295: error: Cannot determine library for db" >&5
13296 echo "$as_me: error: Cannot determine library for db" >&2;}
13297    { (exit 1); exit 1; }; }
13298         elif test "$cf_cv_hashed_db_libs" != default ; then
13299                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
13300         fi
13301 fi
13302
13303 else
13304
13305         { { echo "$as_me:13305: error: Cannot find db.h" >&5
13306 echo "$as_me: error: Cannot find db.h" >&2;}
13307    { (exit 1); exit 1; }; }
13308
13309 fi
13310
13311 fi
13312
13313 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13314         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13315         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13316 fi
13317
13318 # Just in case, check if the C compiler has a bool type.
13319
13320 echo "$as_me:13320: checking if we should include stdbool.h" >&5
13321 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13322
13323 if test "${cf_cv_header_stdbool_h+set}" = set; then
13324   echo $ECHO_N "(cached) $ECHO_C" >&6
13325 else
13326
13327         cat >conftest.$ac_ext <<_ACEOF
13328 #line 13328 "configure"
13329 #include "confdefs.h"
13330
13331 int
13332 main ()
13333 {
13334 bool foo = false
13335   ;
13336   return 0;
13337 }
13338 _ACEOF
13339 rm -f conftest.$ac_objext
13340 if { (eval echo "$as_me:13340: \"$ac_compile\"") >&5
13341   (eval $ac_compile) 2>&5
13342   ac_status=$?
13343   echo "$as_me:13343: \$? = $ac_status" >&5
13344   (exit $ac_status); } &&
13345          { ac_try='test -s conftest.$ac_objext'
13346   { (eval echo "$as_me:13346: \"$ac_try\"") >&5
13347   (eval $ac_try) 2>&5
13348   ac_status=$?
13349   echo "$as_me:13349: \$? = $ac_status" >&5
13350   (exit $ac_status); }; }; then
13351   cf_cv_header_stdbool_h=0
13352 else
13353   echo "$as_me: failed program was:" >&5
13354 cat conftest.$ac_ext >&5
13355 cat >conftest.$ac_ext <<_ACEOF
13356 #line 13356 "configure"
13357 #include "confdefs.h"
13358
13359 #ifndef __BEOS__
13360 #include <stdbool.h>
13361 #endif
13362
13363 int
13364 main ()
13365 {
13366 bool foo = false
13367   ;
13368   return 0;
13369 }
13370 _ACEOF
13371 rm -f conftest.$ac_objext
13372 if { (eval echo "$as_me:13372: \"$ac_compile\"") >&5
13373   (eval $ac_compile) 2>&5
13374   ac_status=$?
13375   echo "$as_me:13375: \$? = $ac_status" >&5
13376   (exit $ac_status); } &&
13377          { ac_try='test -s conftest.$ac_objext'
13378   { (eval echo "$as_me:13378: \"$ac_try\"") >&5
13379   (eval $ac_try) 2>&5
13380   ac_status=$?
13381   echo "$as_me:13381: \$? = $ac_status" >&5
13382   (exit $ac_status); }; }; then
13383   cf_cv_header_stdbool_h=1
13384 else
13385   echo "$as_me: failed program was:" >&5
13386 cat conftest.$ac_ext >&5
13387 cf_cv_header_stdbool_h=0
13388 fi
13389 rm -f conftest.$ac_objext conftest.$ac_ext
13390 fi
13391 rm -f conftest.$ac_objext conftest.$ac_ext
13392 fi
13393
13394 if test "$cf_cv_header_stdbool_h" = 1
13395 then    echo "$as_me:13395: result: yes" >&5
13396 echo "${ECHO_T}yes" >&6
13397 else    echo "$as_me:13397: result: no" >&5
13398 echo "${ECHO_T}no" >&6
13399 fi
13400
13401 echo "$as_me:13401: checking for builtin bool type" >&5
13402 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
13403
13404 if test "${cf_cv_cc_bool_type+set}" = set; then
13405   echo $ECHO_N "(cached) $ECHO_C" >&6
13406 else
13407
13408         cat >conftest.$ac_ext <<_ACEOF
13409 #line 13409 "configure"
13410 #include "confdefs.h"
13411
13412 #include <stdio.h>
13413 #include <sys/types.h>
13414
13415 int
13416 main ()
13417 {
13418 bool x = false
13419   ;
13420   return 0;
13421 }
13422 _ACEOF
13423 rm -f conftest.$ac_objext
13424 if { (eval echo "$as_me:13424: \"$ac_compile\"") >&5
13425   (eval $ac_compile) 2>&5
13426   ac_status=$?
13427   echo "$as_me:13427: \$? = $ac_status" >&5
13428   (exit $ac_status); } &&
13429          { ac_try='test -s conftest.$ac_objext'
13430   { (eval echo "$as_me:13430: \"$ac_try\"") >&5
13431   (eval $ac_try) 2>&5
13432   ac_status=$?
13433   echo "$as_me:13433: \$? = $ac_status" >&5
13434   (exit $ac_status); }; }; then
13435   cf_cv_cc_bool_type=1
13436 else
13437   echo "$as_me: failed program was:" >&5
13438 cat conftest.$ac_ext >&5
13439 cf_cv_cc_bool_type=0
13440 fi
13441 rm -f conftest.$ac_objext conftest.$ac_ext
13442
13443 fi
13444
13445 if test "$cf_cv_cc_bool_type" = 1
13446 then    echo "$as_me:13446: result: yes" >&5
13447 echo "${ECHO_T}yes" >&6
13448 else    echo "$as_me:13448: result: no" >&5
13449 echo "${ECHO_T}no" >&6
13450 fi
13451
13452 # Check for C++ compiler characteristics (and ensure that it's there!)
13453 if test -n "$CXX" ; then
13454         ac_ext=cc
13455 ac_cpp='$CXXCPP $CPPFLAGS'
13456 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13457 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13458 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13459 ac_main_return=return
13460
13461 if test -n "$GXX" ; then
13462 case $cf_cv_system_name in #(vi
13463 os2*) #(vi
13464         cf_stdcpp_libname=stdcpp
13465         ;;
13466 *)
13467         cf_stdcpp_libname=stdc++
13468         ;;
13469 esac
13470 echo "$as_me:13470: checking for library $cf_stdcpp_libname" >&5
13471 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
13472 if test "${cf_cv_libstdcpp+set}" = set; then
13473   echo $ECHO_N "(cached) $ECHO_C" >&6
13474 else
13475
13476         cf_save="$LIBS"
13477         LIBS="$LIBS -l$cf_stdcpp_libname"
13478 cat >conftest.$ac_ext <<_ACEOF
13479 #line 13479 "configure"
13480 #include "confdefs.h"
13481
13482 #include <strstream.h>
13483 int
13484 main ()
13485 {
13486
13487 char buf[80];
13488 strstreambuf foo(buf, sizeof(buf))
13489
13490   ;
13491   return 0;
13492 }
13493 _ACEOF
13494 rm -f conftest.$ac_objext conftest$ac_exeext
13495 if { (eval echo "$as_me:13495: \"$ac_link\"") >&5
13496   (eval $ac_link) 2>&5
13497   ac_status=$?
13498   echo "$as_me:13498: \$? = $ac_status" >&5
13499   (exit $ac_status); } &&
13500          { ac_try='test -s conftest$ac_exeext'
13501   { (eval echo "$as_me:13501: \"$ac_try\"") >&5
13502   (eval $ac_try) 2>&5
13503   ac_status=$?
13504   echo "$as_me:13504: \$? = $ac_status" >&5
13505   (exit $ac_status); }; }; then
13506   cf_cv_libstdcpp=yes
13507 else
13508   echo "$as_me: failed program was:" >&5
13509 cat conftest.$ac_ext >&5
13510 cf_cv_libstdcpp=no
13511 fi
13512 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13513         LIBS="$cf_save"
13514
13515 fi
13516 echo "$as_me:13516: result: $cf_cv_libstdcpp" >&5
13517 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
13518 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
13519 fi
13520
13521         echo "$as_me:13521: checking whether $CXX understands -c and -o together" >&5
13522 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
13523 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
13524   echo $ECHO_N "(cached) $ECHO_C" >&6
13525 else
13526
13527 cat > conftest.$ac_ext <<CF_EOF
13528 #include <stdio.h>
13529 int main()
13530 {
13531         ${cf_cv_main_return:-return}(0);
13532 }
13533 CF_EOF
13534 # We do the test twice because some compilers refuse to overwrite an
13535 # existing .o file with -o, though they will create one.
13536 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
13537 if { (eval echo "$as_me:13537: \"$ac_try\"") >&5
13538   (eval $ac_try) 2>&5
13539   ac_status=$?
13540   echo "$as_me:13540: \$? = $ac_status" >&5
13541   (exit $ac_status); } &&
13542   test -f conftest2.$ac_objext && { (eval echo "$as_me:13542: \"$ac_try\"") >&5
13543   (eval $ac_try) 2>&5
13544   ac_status=$?
13545   echo "$as_me:13545: \$? = $ac_status" >&5
13546   (exit $ac_status); };
13547 then
13548   eval cf_cv_prog_CXX_c_o=yes
13549 else
13550   eval cf_cv_prog_CXX_c_o=no
13551 fi
13552 rm -f conftest*
13553
13554 fi
13555 if test $cf_cv_prog_CXX_c_o = yes; then
13556   echo "$as_me:13556: result: yes" >&5
13557 echo "${ECHO_T}yes" >&6
13558 else
13559   echo "$as_me:13559: result: no" >&5
13560 echo "${ECHO_T}no" >&6
13561 fi
13562
13563         case $GXX_VERSION in
13564         1*|2.0-6*)
13565                 cf_cxx_library=yes
13566                 ;;
13567         *-2.7*|2.7*)
13568
13569 cf_cxx_library=unknown
13570 case $cf_cv_system_name in #(vi
13571 os2*) #(vi
13572         cf_gpp_libname=gpp
13573         ;;
13574 *)
13575         cf_gpp_libname=g++
13576         ;;
13577 esac
13578 if test "$GXX" = yes; then
13579         echo "$as_me:13579: checking for lib$cf_gpp_libname" >&5
13580 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
13581         cf_save="$LIBS"
13582         LIBS="$LIBS -l$cf_gpp_libname"
13583         cat >conftest.$ac_ext <<_ACEOF
13584 #line 13584 "configure"
13585 #include "confdefs.h"
13586
13587 #include <$cf_gpp_libname/builtin.h>
13588
13589 int
13590 main ()
13591 {
13592 two_arg_error_handler_t foo2 = lib_error_handler
13593   ;
13594   return 0;
13595 }
13596 _ACEOF
13597 rm -f conftest.$ac_objext conftest$ac_exeext
13598 if { (eval echo "$as_me:13598: \"$ac_link\"") >&5
13599   (eval $ac_link) 2>&5
13600   ac_status=$?
13601   echo "$as_me:13601: \$? = $ac_status" >&5
13602   (exit $ac_status); } &&
13603          { ac_try='test -s conftest$ac_exeext'
13604   { (eval echo "$as_me:13604: \"$ac_try\"") >&5
13605   (eval $ac_try) 2>&5
13606   ac_status=$?
13607   echo "$as_me:13607: \$? = $ac_status" >&5
13608   (exit $ac_status); }; }; then
13609   cf_cxx_library=yes
13610          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13611          if test "$cf_gpp_libname" = cpp ; then
13612             cat >>confdefs.h <<\EOF
13613 #define HAVE_GPP_BUILTIN_H 1
13614 EOF
13615
13616          else
13617             cat >>confdefs.h <<\EOF
13618 #define HAVE_GXX_BUILTIN_H 1
13619 EOF
13620
13621          fi
13622 else
13623   echo "$as_me: failed program was:" >&5
13624 cat conftest.$ac_ext >&5
13625 cat >conftest.$ac_ext <<_ACEOF
13626 #line 13626 "configure"
13627 #include "confdefs.h"
13628
13629 #include <builtin.h>
13630
13631 int
13632 main ()
13633 {
13634 two_arg_error_handler_t foo2 = lib_error_handler
13635   ;
13636   return 0;
13637 }
13638 _ACEOF
13639 rm -f conftest.$ac_objext conftest$ac_exeext
13640 if { (eval echo "$as_me:13640: \"$ac_link\"") >&5
13641   (eval $ac_link) 2>&5
13642   ac_status=$?
13643   echo "$as_me:13643: \$? = $ac_status" >&5
13644   (exit $ac_status); } &&
13645          { ac_try='test -s conftest$ac_exeext'
13646   { (eval echo "$as_me:13646: \"$ac_try\"") >&5
13647   (eval $ac_try) 2>&5
13648   ac_status=$?
13649   echo "$as_me:13649: \$? = $ac_status" >&5
13650   (exit $ac_status); }; }; then
13651   cf_cxx_library=yes
13652          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13653          cat >>confdefs.h <<\EOF
13654 #define HAVE_BUILTIN_H 1
13655 EOF
13656
13657 else
13658   echo "$as_me: failed program was:" >&5
13659 cat conftest.$ac_ext >&5
13660 cf_cxx_library=no
13661 fi
13662 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13663 fi
13664 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13665         LIBS="$cf_save"
13666         echo "$as_me:13666: result: $cf_cxx_library" >&5
13667 echo "${ECHO_T}$cf_cxx_library" >&6
13668 fi
13669
13670                 ;;
13671         *)
13672                 cf_cxx_library=no
13673                 ;;
13674         esac
13675
13676         ac_ext=cc
13677 ac_cpp='$CXXCPP $CPPFLAGS'
13678 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13679 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13680 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13681 ac_main_return=return
13682 echo "$as_me:13682: checking how to run the C++ preprocessor" >&5
13683 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
13684 if test -z "$CXXCPP"; then
13685   if test "${ac_cv_prog_CXXCPP+set}" = set; then
13686   echo $ECHO_N "(cached) $ECHO_C" >&6
13687 else
13688       # Double quotes because CXXCPP needs to be expanded
13689     for CXXCPP in "$CXX -E" "/lib/cpp"
13690     do
13691       ac_preproc_ok=false
13692 for ac_cxx_preproc_warn_flag in '' yes
13693 do
13694   # Use a header file that comes with gcc, so configuring glibc
13695   # with a fresh cross-compiler works.
13696   # On the NeXT, cc -E runs the code through the compiler's parser,
13697   # not just through cpp. "Syntax error" is here to catch this case.
13698   cat >conftest.$ac_ext <<_ACEOF
13699 #line 13699 "configure"
13700 #include "confdefs.h"
13701 #include <assert.h>
13702                      Syntax error
13703 _ACEOF
13704 if { (eval echo "$as_me:13704: \"$ac_cpp conftest.$ac_ext\"") >&5
13705   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13706   ac_status=$?
13707   egrep -v '^ *\+' conftest.er1 >conftest.err
13708   rm -f conftest.er1
13709   cat conftest.err >&5
13710   echo "$as_me:13710: \$? = $ac_status" >&5
13711   (exit $ac_status); } >/dev/null; then
13712   if test -s conftest.err; then
13713     ac_cpp_err=$ac_cxx_preproc_warn_flag
13714   else
13715     ac_cpp_err=
13716   fi
13717 else
13718   ac_cpp_err=yes
13719 fi
13720 if test -z "$ac_cpp_err"; then
13721   :
13722 else
13723   echo "$as_me: failed program was:" >&5
13724   cat conftest.$ac_ext >&5
13725   # Broken: fails on valid input.
13726 continue
13727 fi
13728 rm -f conftest.err conftest.$ac_ext
13729
13730   # OK, works on sane cases.  Now check whether non-existent headers
13731   # can be detected and how.
13732   cat >conftest.$ac_ext <<_ACEOF
13733 #line 13733 "configure"
13734 #include "confdefs.h"
13735 #include <ac_nonexistent.h>
13736 _ACEOF
13737 if { (eval echo "$as_me:13737: \"$ac_cpp conftest.$ac_ext\"") >&5
13738   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13739   ac_status=$?
13740   egrep -v '^ *\+' conftest.er1 >conftest.err
13741   rm -f conftest.er1
13742   cat conftest.err >&5
13743   echo "$as_me:13743: \$? = $ac_status" >&5
13744   (exit $ac_status); } >/dev/null; then
13745   if test -s conftest.err; then
13746     ac_cpp_err=$ac_cxx_preproc_warn_flag
13747   else
13748     ac_cpp_err=
13749   fi
13750 else
13751   ac_cpp_err=yes
13752 fi
13753 if test -z "$ac_cpp_err"; then
13754   # Broken: success on invalid input.
13755 continue
13756 else
13757   echo "$as_me: failed program was:" >&5
13758   cat conftest.$ac_ext >&5
13759   # Passes both tests.
13760 ac_preproc_ok=:
13761 break
13762 fi
13763 rm -f conftest.err conftest.$ac_ext
13764
13765 done
13766 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13767 rm -f conftest.err conftest.$ac_ext
13768 if $ac_preproc_ok; then
13769   break
13770 fi
13771
13772     done
13773     ac_cv_prog_CXXCPP=$CXXCPP
13774
13775 fi
13776   CXXCPP=$ac_cv_prog_CXXCPP
13777 else
13778   ac_cv_prog_CXXCPP=$CXXCPP
13779 fi
13780 echo "$as_me:13780: result: $CXXCPP" >&5
13781 echo "${ECHO_T}$CXXCPP" >&6
13782 ac_preproc_ok=false
13783 for ac_cxx_preproc_warn_flag in '' yes
13784 do
13785   # Use a header file that comes with gcc, so configuring glibc
13786   # with a fresh cross-compiler works.
13787   # On the NeXT, cc -E runs the code through the compiler's parser,
13788   # not just through cpp. "Syntax error" is here to catch this case.
13789   cat >conftest.$ac_ext <<_ACEOF
13790 #line 13790 "configure"
13791 #include "confdefs.h"
13792 #include <assert.h>
13793                      Syntax error
13794 _ACEOF
13795 if { (eval echo "$as_me:13795: \"$ac_cpp conftest.$ac_ext\"") >&5
13796   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13797   ac_status=$?
13798   egrep -v '^ *\+' conftest.er1 >conftest.err
13799   rm -f conftest.er1
13800   cat conftest.err >&5
13801   echo "$as_me:13801: \$? = $ac_status" >&5
13802   (exit $ac_status); } >/dev/null; then
13803   if test -s conftest.err; then
13804     ac_cpp_err=$ac_cxx_preproc_warn_flag
13805   else
13806     ac_cpp_err=
13807   fi
13808 else
13809   ac_cpp_err=yes
13810 fi
13811 if test -z "$ac_cpp_err"; then
13812   :
13813 else
13814   echo "$as_me: failed program was:" >&5
13815   cat conftest.$ac_ext >&5
13816   # Broken: fails on valid input.
13817 continue
13818 fi
13819 rm -f conftest.err conftest.$ac_ext
13820
13821   # OK, works on sane cases.  Now check whether non-existent headers
13822   # can be detected and how.
13823   cat >conftest.$ac_ext <<_ACEOF
13824 #line 13824 "configure"
13825 #include "confdefs.h"
13826 #include <ac_nonexistent.h>
13827 _ACEOF
13828 if { (eval echo "$as_me:13828: \"$ac_cpp conftest.$ac_ext\"") >&5
13829   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13830   ac_status=$?
13831   egrep -v '^ *\+' conftest.er1 >conftest.err
13832   rm -f conftest.er1
13833   cat conftest.err >&5
13834   echo "$as_me:13834: \$? = $ac_status" >&5
13835   (exit $ac_status); } >/dev/null; then
13836   if test -s conftest.err; then
13837     ac_cpp_err=$ac_cxx_preproc_warn_flag
13838   else
13839     ac_cpp_err=
13840   fi
13841 else
13842   ac_cpp_err=yes
13843 fi
13844 if test -z "$ac_cpp_err"; then
13845   # Broken: success on invalid input.
13846 continue
13847 else
13848   echo "$as_me: failed program was:" >&5
13849   cat conftest.$ac_ext >&5
13850   # Passes both tests.
13851 ac_preproc_ok=:
13852 break
13853 fi
13854 rm -f conftest.err conftest.$ac_ext
13855
13856 done
13857 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13858 rm -f conftest.err conftest.$ac_ext
13859 if $ac_preproc_ok; then
13860   :
13861 else
13862   { { echo "$as_me:13862: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
13863 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
13864    { (exit 1); exit 1; }; }
13865 fi
13866
13867 ac_ext=cc
13868 ac_cpp='$CXXCPP $CPPFLAGS'
13869 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13870 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13871 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13872 ac_main_return=return
13873
13874 for ac_header in typeinfo
13875 do
13876 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13877 echo "$as_me:13877: checking for $ac_header" >&5
13878 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13879 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13880   echo $ECHO_N "(cached) $ECHO_C" >&6
13881 else
13882   cat >conftest.$ac_ext <<_ACEOF
13883 #line 13883 "configure"
13884 #include "confdefs.h"
13885 #include <$ac_header>
13886 _ACEOF
13887 if { (eval echo "$as_me:13887: \"$ac_cpp conftest.$ac_ext\"") >&5
13888   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13889   ac_status=$?
13890   egrep -v '^ *\+' conftest.er1 >conftest.err
13891   rm -f conftest.er1
13892   cat conftest.err >&5
13893   echo "$as_me:13893: \$? = $ac_status" >&5
13894   (exit $ac_status); } >/dev/null; then
13895   if test -s conftest.err; then
13896     ac_cpp_err=$ac_cxx_preproc_warn_flag
13897   else
13898     ac_cpp_err=
13899   fi
13900 else
13901   ac_cpp_err=yes
13902 fi
13903 if test -z "$ac_cpp_err"; then
13904   eval "$as_ac_Header=yes"
13905 else
13906   echo "$as_me: failed program was:" >&5
13907   cat conftest.$ac_ext >&5
13908   eval "$as_ac_Header=no"
13909 fi
13910 rm -f conftest.err conftest.$ac_ext
13911 fi
13912 echo "$as_me:13912: result: `eval echo '${'$as_ac_Header'}'`" >&5
13913 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13914 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13915   cat >>confdefs.h <<EOF
13916 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13917 EOF
13918
13919 fi
13920 done
13921
13922 echo "$as_me:13922: checking if we should include stdbool.h" >&5
13923 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13924
13925 if test "${cf_cv_header_stdbool_h+set}" = set; then
13926   echo $ECHO_N "(cached) $ECHO_C" >&6
13927 else
13928
13929         cat >conftest.$ac_ext <<_ACEOF
13930 #line 13930 "configure"
13931 #include "confdefs.h"
13932
13933 int
13934 main ()
13935 {
13936 bool foo = false
13937   ;
13938   return 0;
13939 }
13940 _ACEOF
13941 rm -f conftest.$ac_objext
13942 if { (eval echo "$as_me:13942: \"$ac_compile\"") >&5
13943   (eval $ac_compile) 2>&5
13944   ac_status=$?
13945   echo "$as_me:13945: \$? = $ac_status" >&5
13946   (exit $ac_status); } &&
13947          { ac_try='test -s conftest.$ac_objext'
13948   { (eval echo "$as_me:13948: \"$ac_try\"") >&5
13949   (eval $ac_try) 2>&5
13950   ac_status=$?
13951   echo "$as_me:13951: \$? = $ac_status" >&5
13952   (exit $ac_status); }; }; then
13953   cf_cv_header_stdbool_h=0
13954 else
13955   echo "$as_me: failed program was:" >&5
13956 cat conftest.$ac_ext >&5
13957 cat >conftest.$ac_ext <<_ACEOF
13958 #line 13958 "configure"
13959 #include "confdefs.h"
13960
13961 #ifndef __BEOS__
13962 #include <stdbool.h>
13963 #endif
13964
13965 int
13966 main ()
13967 {
13968 bool foo = false
13969   ;
13970   return 0;
13971 }
13972 _ACEOF
13973 rm -f conftest.$ac_objext
13974 if { (eval echo "$as_me:13974: \"$ac_compile\"") >&5
13975   (eval $ac_compile) 2>&5
13976   ac_status=$?
13977   echo "$as_me:13977: \$? = $ac_status" >&5
13978   (exit $ac_status); } &&
13979          { ac_try='test -s conftest.$ac_objext'
13980   { (eval echo "$as_me:13980: \"$ac_try\"") >&5
13981   (eval $ac_try) 2>&5
13982   ac_status=$?
13983   echo "$as_me:13983: \$? = $ac_status" >&5
13984   (exit $ac_status); }; }; then
13985   cf_cv_header_stdbool_h=1
13986 else
13987   echo "$as_me: failed program was:" >&5
13988 cat conftest.$ac_ext >&5
13989 cf_cv_header_stdbool_h=0
13990 fi
13991 rm -f conftest.$ac_objext conftest.$ac_ext
13992 fi
13993 rm -f conftest.$ac_objext conftest.$ac_ext
13994 fi
13995
13996 if test "$cf_cv_header_stdbool_h" = 1
13997 then    echo "$as_me:13997: result: yes" >&5
13998 echo "${ECHO_T}yes" >&6
13999 else    echo "$as_me:13999: result: no" >&5
14000 echo "${ECHO_T}no" >&6
14001 fi
14002
14003 echo "$as_me:14003: checking for builtin bool type" >&5
14004 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14005
14006 if test "${cf_cv_builtin_bool+set}" = set; then
14007   echo $ECHO_N "(cached) $ECHO_C" >&6
14008 else
14009
14010         cat >conftest.$ac_ext <<_ACEOF
14011 #line 14011 "configure"
14012 #include "confdefs.h"
14013
14014 #include <stdio.h>
14015 #include <sys/types.h>
14016
14017 int
14018 main ()
14019 {
14020 bool x = false
14021   ;
14022   return 0;
14023 }
14024 _ACEOF
14025 rm -f conftest.$ac_objext
14026 if { (eval echo "$as_me:14026: \"$ac_compile\"") >&5
14027   (eval $ac_compile) 2>&5
14028   ac_status=$?
14029   echo "$as_me:14029: \$? = $ac_status" >&5
14030   (exit $ac_status); } &&
14031          { ac_try='test -s conftest.$ac_objext'
14032   { (eval echo "$as_me:14032: \"$ac_try\"") >&5
14033   (eval $ac_try) 2>&5
14034   ac_status=$?
14035   echo "$as_me:14035: \$? = $ac_status" >&5
14036   (exit $ac_status); }; }; then
14037   cf_cv_builtin_bool=1
14038 else
14039   echo "$as_me: failed program was:" >&5
14040 cat conftest.$ac_ext >&5
14041 cf_cv_builtin_bool=0
14042 fi
14043 rm -f conftest.$ac_objext conftest.$ac_ext
14044
14045 fi
14046
14047 if test "$cf_cv_builtin_bool" = 1
14048 then    echo "$as_me:14048: result: yes" >&5
14049 echo "${ECHO_T}yes" >&6
14050 else    echo "$as_me:14050: result: no" >&5
14051 echo "${ECHO_T}no" >&6
14052 fi
14053
14054 echo "$as_me:14054: checking for size of bool" >&5
14055 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14056 if test "${cf_cv_type_of_bool+set}" = set; then
14057   echo $ECHO_N "(cached) $ECHO_C" >&6
14058 else
14059
14060         rm -f cf_test.out
14061         if test "$cross_compiling" = yes; then
14062   cf_cv_type_of_bool=unknown
14063 else
14064   cat >conftest.$ac_ext <<_ACEOF
14065 #line 14065 "configure"
14066 #include "confdefs.h"
14067
14068 #include <stdlib.h>
14069 #include <stdio.h>
14070
14071 #if defined(__cplusplus)
14072
14073 #ifdef HAVE_GXX_BUILTIN_H
14074 #include <g++/builtin.h>
14075 #elif HAVE_GPP_BUILTIN_H
14076 #include <gpp/builtin.h>
14077 #elif HAVE_BUILTIN_H
14078 #include <builtin.h>
14079 #endif
14080
14081 #else
14082
14083 #if $cf_cv_header_stdbool_h
14084 #include <stdbool.h>
14085 #endif
14086
14087 #endif
14088
14089 main()
14090 {
14091         FILE *fp = fopen("cf_test.out", "w");
14092         if (fp != 0) {
14093                 bool x = true;
14094                 if ((bool)(-x) >= 0)
14095                         fputs("unsigned ", fp);
14096                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14097                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14098                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14099                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14100                 fclose(fp);
14101         }
14102         ${cf_cv_main_return:-return}(0);
14103 }
14104
14105 _ACEOF
14106 rm -f conftest$ac_exeext
14107 if { (eval echo "$as_me:14107: \"$ac_link\"") >&5
14108   (eval $ac_link) 2>&5
14109   ac_status=$?
14110   echo "$as_me:14110: \$? = $ac_status" >&5
14111   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14112   { (eval echo "$as_me:14112: \"$ac_try\"") >&5
14113   (eval $ac_try) 2>&5
14114   ac_status=$?
14115   echo "$as_me:14115: \$? = $ac_status" >&5
14116   (exit $ac_status); }; }; then
14117   cf_cv_type_of_bool=`cat cf_test.out`
14118                  if test -z "$cf_cv_type_of_bool"; then
14119                    cf_cv_type_of_bool=unknown
14120                  fi
14121 else
14122   echo "$as_me: program exited with status $ac_status" >&5
14123 echo "$as_me: failed program was:" >&5
14124 cat conftest.$ac_ext >&5
14125 cf_cv_type_of_bool=unknown
14126 fi
14127 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14128 fi
14129
14130 fi
14131
14132         rm -f cf_test.out
14133 echo "$as_me:14133: result: $cf_cv_type_of_bool" >&5
14134 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14135 if test "$cf_cv_type_of_bool" = unknown ; then
14136         case .$NCURSES_BOOL in #(vi
14137         .auto|.) NCURSES_BOOL=unsigned;;
14138         esac
14139         { echo "$as_me:14139: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14140 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14141         cf_cv_type_of_bool=$NCURSES_BOOL
14142 fi
14143
14144 echo "$as_me:14144: checking for special defines needed for etip.h" >&5
14145 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
14146 cf_save_CXXFLAGS="$CXXFLAGS"
14147 cf_result="none"
14148 for cf_math in "" MATH_H
14149 do
14150 for cf_excp in "" MATH_EXCEPTION
14151 do
14152         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
14153         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
14154         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
14155 cat >conftest.$ac_ext <<_ACEOF
14156 #line 14156 "configure"
14157 #include "confdefs.h"
14158
14159 #include <etip.h.in>
14160
14161 int
14162 main ()
14163 {
14164
14165   ;
14166   return 0;
14167 }
14168 _ACEOF
14169 rm -f conftest.$ac_objext
14170 if { (eval echo "$as_me:14170: \"$ac_compile\"") >&5
14171   (eval $ac_compile) 2>&5
14172   ac_status=$?
14173   echo "$as_me:14173: \$? = $ac_status" >&5
14174   (exit $ac_status); } &&
14175          { ac_try='test -s conftest.$ac_objext'
14176   { (eval echo "$as_me:14176: \"$ac_try\"") >&5
14177   (eval $ac_try) 2>&5
14178   ac_status=$?
14179   echo "$as_me:14179: \$? = $ac_status" >&5
14180   (exit $ac_status); }; }; then
14181
14182         test -n "$cf_math" && cat >>confdefs.h <<EOF
14183 #define ETIP_NEEDS_${cf_math} 1
14184 EOF
14185
14186         test -n "$cf_excp" && cat >>confdefs.h <<EOF
14187 #define ETIP_NEEDS_${cf_excp} 1
14188 EOF
14189
14190         cf_result="$cf_math $cf_excp"
14191         break
14192
14193 else
14194   echo "$as_me: failed program was:" >&5
14195 cat conftest.$ac_ext >&5
14196 fi
14197 rm -f conftest.$ac_objext conftest.$ac_ext
14198 done
14199 done
14200 echo "$as_me:14200: result: $cf_result" >&5
14201 echo "${ECHO_T}$cf_result" >&6
14202 CXXFLAGS="$cf_save_CXXFLAGS"
14203
14204 if test -n "$CXX"; then
14205 echo "$as_me:14205: checking if $CXX accepts parameter initialization" >&5
14206 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
14207 if test "${cf_cv_cpp_param_init+set}" = set; then
14208   echo $ECHO_N "(cached) $ECHO_C" >&6
14209 else
14210
14211         ac_ext=cc
14212 ac_cpp='$CXXCPP $CPPFLAGS'
14213 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14214 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14215 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14216 ac_main_return=return
14217
14218         if test "$cross_compiling" = yes; then
14219   cf_cv_cpp_param_init=unknown
14220 else
14221   cat >conftest.$ac_ext <<_ACEOF
14222 #line 14222 "configure"
14223 #include "confdefs.h"
14224
14225 class TEST {
14226 private:
14227         int value;
14228 public:
14229         TEST(int x = 1);
14230         ~TEST();
14231 };
14232
14233 TEST::TEST(int x = 1)   // some compilers do not like second initializer
14234 {
14235         value = x;
14236 }
14237 void main() { }
14238
14239 _ACEOF
14240 rm -f conftest$ac_exeext
14241 if { (eval echo "$as_me:14241: \"$ac_link\"") >&5
14242   (eval $ac_link) 2>&5
14243   ac_status=$?
14244   echo "$as_me:14244: \$? = $ac_status" >&5
14245   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14246   { (eval echo "$as_me:14246: \"$ac_try\"") >&5
14247   (eval $ac_try) 2>&5
14248   ac_status=$?
14249   echo "$as_me:14249: \$? = $ac_status" >&5
14250   (exit $ac_status); }; }; then
14251   cf_cv_cpp_param_init=yes
14252 else
14253   echo "$as_me: program exited with status $ac_status" >&5
14254 echo "$as_me: failed program was:" >&5
14255 cat conftest.$ac_ext >&5
14256 cf_cv_cpp_param_init=no
14257 fi
14258 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14259 fi
14260         ac_ext=cc
14261 ac_cpp='$CXXCPP $CPPFLAGS'
14262 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14263 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14264 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14265 ac_main_return=return
14266
14267 fi
14268 echo "$as_me:14268: result: $cf_cv_cpp_param_init" >&5
14269 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
14270 fi
14271 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
14272 #define CPP_HAS_PARAM_INIT 1
14273 EOF
14274
14275 if test -n "$CXX"; then
14276
14277 echo "$as_me:14277: checking if $CXX accepts static_cast" >&5
14278 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
14279 if test "${cf_cv_cpp_static_cast+set}" = set; then
14280   echo $ECHO_N "(cached) $ECHO_C" >&6
14281 else
14282
14283         ac_ext=cc
14284 ac_cpp='$CXXCPP $CPPFLAGS'
14285 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14286 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14287 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14288 ac_main_return=return
14289
14290         cat >conftest.$ac_ext <<_ACEOF
14291 #line 14291 "configure"
14292 #include "confdefs.h"
14293
14294 class NCursesPanel
14295 {
14296 public:
14297   NCursesPanel(int nlines,
14298                int ncols,
14299                int begin_y = 0,
14300                int begin_x = 0)
14301   {
14302   }
14303
14304   ~NCursesPanel();
14305 };
14306
14307 template<class T> class NCursesUserPanel : public NCursesPanel
14308 {
14309 public:
14310   NCursesUserPanel (int nlines,
14311                     int ncols,
14312                     int begin_y = 0,
14313                     int begin_x = 0,
14314                     const T* p_UserData = static_cast<T*>(0))
14315     : NCursesPanel (nlines, ncols, begin_y, begin_x)
14316   {
14317   };
14318   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
14319   {
14320   };
14321
14322   virtual ~NCursesUserPanel() {};
14323 };
14324
14325 int
14326 main ()
14327 {
14328
14329         const char* p_UserData = static_cast<char*>(0)
14330   ;
14331   return 0;
14332 }
14333 _ACEOF
14334 rm -f conftest.$ac_objext
14335 if { (eval echo "$as_me:14335: \"$ac_compile\"") >&5
14336   (eval $ac_compile) 2>&5
14337   ac_status=$?
14338   echo "$as_me:14338: \$? = $ac_status" >&5
14339   (exit $ac_status); } &&
14340          { ac_try='test -s conftest.$ac_objext'
14341   { (eval echo "$as_me:14341: \"$ac_try\"") >&5
14342   (eval $ac_try) 2>&5
14343   ac_status=$?
14344   echo "$as_me:14344: \$? = $ac_status" >&5
14345   (exit $ac_status); }; }; then
14346   cf_cv_cpp_static_cast=yes
14347 else
14348   echo "$as_me: failed program was:" >&5
14349 cat conftest.$ac_ext >&5
14350 cf_cv_cpp_static_cast=no
14351 fi
14352 rm -f conftest.$ac_objext conftest.$ac_ext
14353
14354         ac_ext=cc
14355 ac_cpp='$CXXCPP $CPPFLAGS'
14356 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14357 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14358 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14359 ac_main_return=return
14360
14361 fi
14362 echo "$as_me:14362: result: $cf_cv_cpp_static_cast" >&5
14363 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
14364
14365 fi
14366
14367 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
14368 #define CPP_HAS_STATIC_CAST 1
14369 EOF
14370
14371 if test -n "$CXX"; then
14372
14373 ac_ext=cc
14374 ac_cpp='$CXXCPP $CPPFLAGS'
14375 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14376 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14377 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14378 ac_main_return=return
14379
14380 for ac_header in strstream.h
14381 do
14382 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14383 echo "$as_me:14383: checking for $ac_header" >&5
14384 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14385 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14386   echo $ECHO_N "(cached) $ECHO_C" >&6
14387 else
14388   cat >conftest.$ac_ext <<_ACEOF
14389 #line 14389 "configure"
14390 #include "confdefs.h"
14391 #include <$ac_header>
14392 _ACEOF
14393 if { (eval echo "$as_me:14393: \"$ac_cpp conftest.$ac_ext\"") >&5
14394   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14395   ac_status=$?
14396   egrep -v '^ *\+' conftest.er1 >conftest.err
14397   rm -f conftest.er1
14398   cat conftest.err >&5
14399   echo "$as_me:14399: \$? = $ac_status" >&5
14400   (exit $ac_status); } >/dev/null; then
14401   if test -s conftest.err; then
14402     ac_cpp_err=$ac_cxx_preproc_warn_flag
14403   else
14404     ac_cpp_err=
14405   fi
14406 else
14407   ac_cpp_err=yes
14408 fi
14409 if test -z "$ac_cpp_err"; then
14410   eval "$as_ac_Header=yes"
14411 else
14412   echo "$as_me: failed program was:" >&5
14413   cat conftest.$ac_ext >&5
14414   eval "$as_ac_Header=no"
14415 fi
14416 rm -f conftest.err conftest.$ac_ext
14417 fi
14418 echo "$as_me:14418: result: `eval echo '${'$as_ac_Header'}'`" >&5
14419 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14420 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14421   cat >>confdefs.h <<EOF
14422 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14423 EOF
14424
14425 fi
14426 done
14427
14428 echo "$as_me:14428: checking if $CXX supports vscan function" >&5
14429 echo $ECHO_N "checking if $CXX supports vscan function... $ECHO_C" >&6
14430 if test "${cf_cv_cpp_vscan_func+set}" = set; then
14431   echo $ECHO_N "(cached) $ECHO_C" >&6
14432 else
14433
14434         for cf_vscan_func in strstream strstream_cast stdio
14435         do
14436         case $cf_vscan_func in #(vi
14437         stdio)          cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi
14438         strstream)      cf_vscan_defs=USE_STRSTREAM_VSCAN ;;
14439         strstream_cast) cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;;
14440         esac
14441         cat >conftest.$ac_ext <<_ACEOF
14442 #line 14442 "configure"
14443 #include "confdefs.h"
14444
14445 #include <stdio.h>
14446 #include <stdarg.h>
14447 #define $cf_vscan_defs 1
14448 #if defined(USE_STDIO_VSCAN)
14449 #elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN)
14450 #include <strstream.h>
14451 #endif
14452
14453 int scanw(const char* fmt, ...)
14454 {
14455     int result = -1;
14456     char buf[BUFSIZ];
14457
14458     va_list args;
14459     va_start(args, fmt);
14460 #if defined(USE_STDIO_VSCAN)
14461     if (::vsscanf(buf, fmt, args) != -1)
14462         result = 0;
14463 #elif defined(USE_STRSTREAM_VSCAN)
14464     strstreambuf ss(buf, sizeof(buf));
14465     if (ss.vscan(fmt, args) != -1)
14466         result = 0;
14467 #elif defined(USE_STRSTREAM_VSCAN_CAST)
14468     strstreambuf ss(buf, sizeof(buf));
14469     if (ss.vscan(fmt, (_IO_va_list)args) != -1)
14470         result = 0;
14471 #else
14472 #error case $cf_vscan_func failed
14473 #endif
14474     va_end(args);
14475     return result;
14476 }
14477
14478 int
14479 main ()
14480 {
14481 int tmp, foo = scanw("%d", &tmp)
14482   ;
14483   return 0;
14484 }
14485 _ACEOF
14486 rm -f conftest.$ac_objext conftest$ac_exeext
14487 if { (eval echo "$as_me:14487: \"$ac_link\"") >&5
14488   (eval $ac_link) 2>&5
14489   ac_status=$?
14490   echo "$as_me:14490: \$? = $ac_status" >&5
14491   (exit $ac_status); } &&
14492          { ac_try='test -s conftest$ac_exeext'
14493   { (eval echo "$as_me:14493: \"$ac_try\"") >&5
14494   (eval $ac_try) 2>&5
14495   ac_status=$?
14496   echo "$as_me:14496: \$? = $ac_status" >&5
14497   (exit $ac_status); }; }; then
14498   cf_cv_cpp_vscan_func=$cf_vscan_func; break
14499 else
14500   echo "$as_me: failed program was:" >&5
14501 cat conftest.$ac_ext >&5
14502 cf_cv_cpp_vscan_func=no
14503 fi
14504 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14505         test "$cf_cv_cpp_vscan_func" != no && break
14506         done
14507
14508 fi
14509 echo "$as_me:14509: result: $cf_cv_cpp_vscan_func" >&5
14510 echo "${ECHO_T}$cf_cv_cpp_vscan_func" >&6
14511
14512 ac_ext=cc
14513 ac_cpp='$CXXCPP $CPPFLAGS'
14514 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14515 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14516 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14517 ac_main_return=return
14518
14519 fi
14520
14521 case $cf_cv_cpp_vscan_func in #(vi
14522 stdio) #(vi
14523         cat >>confdefs.h <<\EOF
14524 #define CPP_HAS_VSCAN_FUNC 1
14525 EOF
14526
14527         cat >>confdefs.h <<\EOF
14528 #define USE_STDIO_VSCAN 1
14529 EOF
14530
14531         ;;
14532 strstream)
14533         cat >>confdefs.h <<\EOF
14534 #define CPP_HAS_VSCAN_FUNC 1
14535 EOF
14536
14537         cat >>confdefs.h <<\EOF
14538 #define USE_STRSTREAM_VSCAN 1
14539 EOF
14540
14541         ;;
14542 strstream_cast)
14543         cat >>confdefs.h <<\EOF
14544 #define CPP_HAS_VSCAN_FUNC 1
14545 EOF
14546
14547         cat >>confdefs.h <<\EOF
14548 #define USE_STRSTREAM_VSCAN_CAST 1
14549 EOF
14550
14551         ;;
14552 esac
14553
14554         CXX_AR='$(AR)'
14555         CXX_AR_OPTS='$(AR_OPTS)'
14556         case $cf_cv_system_name in #(vi
14557         irix*) #(vi
14558             if test "$GXX" != yes ; then
14559                 CXX_AR='$(CXX)'
14560                 CXX_AR_OPTS='-ar -o'
14561             fi
14562             ;;
14563         sco3.2v5*) #(vi
14564             CXXLDFLAGS="-u main"
14565             ;;
14566         solaris2*)
14567             if test "$GXX" != yes ; then
14568                 CXX_AR='$(CXX)'
14569                 CXX_AR_OPTS='-xar -o'
14570             fi
14571             ;;
14572         esac
14573
14574 else
14575         cf_cxx_library=no
14576         cf_cv_builtin_bool=1
14577
14578         # Just because we are not configuring against C++ right now does not
14579         # mean that a user will not want to use C++.  Some distributors disable
14580         # the C++ portion of this configuration as a shortcut (or just to avoid
14581         # compiling the demo in the c++ directory).  So we need a reasonable
14582         # default for the 'bool' type.
14583         #
14584         # Caveat: since the storage of the bool type is not standardized, it
14585         # may change.
14586
14587         if test "$NCURSES_BOOL" != auto ; then
14588                 cf_cv_type_of_bool=$NCURSES_BOOL
14589                 cf_cv_header_stdbool_h=0
14590         else
14591                 if test "$cf_cv_header_stdbool_h" = 1 ; then
14592
14593 echo "$as_me:14593: checking for size of bool" >&5
14594 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14595 if test "${cf_cv_type_of_bool+set}" = set; then
14596   echo $ECHO_N "(cached) $ECHO_C" >&6
14597 else
14598
14599         rm -f cf_test.out
14600         if test "$cross_compiling" = yes; then
14601   cf_cv_type_of_bool=unknown
14602 else
14603   cat >conftest.$ac_ext <<_ACEOF
14604 #line 14604 "configure"
14605 #include "confdefs.h"
14606
14607 #include <stdlib.h>
14608 #include <stdio.h>
14609
14610 #if defined(__cplusplus)
14611
14612 #ifdef HAVE_GXX_BUILTIN_H
14613 #include <g++/builtin.h>
14614 #elif HAVE_GPP_BUILTIN_H
14615 #include <gpp/builtin.h>
14616 #elif HAVE_BUILTIN_H
14617 #include <builtin.h>
14618 #endif
14619
14620 #else
14621
14622 #if $cf_cv_header_stdbool_h
14623 #include <stdbool.h>
14624 #endif
14625
14626 #endif
14627
14628 main()
14629 {
14630         FILE *fp = fopen("cf_test.out", "w");
14631         if (fp != 0) {
14632                 bool x = true;
14633                 if ((bool)(-x) >= 0)
14634                         fputs("unsigned ", fp);
14635                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14636                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14637                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14638                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14639                 fclose(fp);
14640         }
14641         ${cf_cv_main_return:-return}(0);
14642 }
14643
14644 _ACEOF
14645 rm -f conftest$ac_exeext
14646 if { (eval echo "$as_me:14646: \"$ac_link\"") >&5
14647   (eval $ac_link) 2>&5
14648   ac_status=$?
14649   echo "$as_me:14649: \$? = $ac_status" >&5
14650   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14651   { (eval echo "$as_me:14651: \"$ac_try\"") >&5
14652   (eval $ac_try) 2>&5
14653   ac_status=$?
14654   echo "$as_me:14654: \$? = $ac_status" >&5
14655   (exit $ac_status); }; }; then
14656   cf_cv_type_of_bool=`cat cf_test.out`
14657                  if test -z "$cf_cv_type_of_bool"; then
14658                    cf_cv_type_of_bool=unknown
14659                  fi
14660 else
14661   echo "$as_me: program exited with status $ac_status" >&5
14662 echo "$as_me: failed program was:" >&5
14663 cat conftest.$ac_ext >&5
14664 cf_cv_type_of_bool=unknown
14665 fi
14666 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14667 fi
14668
14669 fi
14670
14671         rm -f cf_test.out
14672 echo "$as_me:14672: result: $cf_cv_type_of_bool" >&5
14673 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14674 if test "$cf_cv_type_of_bool" = unknown ; then
14675         case .$NCURSES_BOOL in #(vi
14676         .auto|.) NCURSES_BOOL=unsigned;;
14677         esac
14678         { echo "$as_me:14678: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14679 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14680         cf_cv_type_of_bool=$NCURSES_BOOL
14681 fi
14682
14683                 else
14684                         echo "$as_me:14684: checking for fallback type of bool" >&5
14685 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
14686                         case "$host_cpu" in #(vi
14687                         i?86)   cf_cv_type_of_bool=char ;; #(vi
14688                         *)      cf_cv_type_of_bool=int  ;;
14689                         esac
14690                         echo "$as_me:14690: result: $cf_cv_type_of_bool" >&5
14691 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14692                 fi
14693         fi
14694 fi
14695
14696 # If the C compiler did not declare bool, and we did not determine that the C++
14697 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
14698 # ncurses library use the same type as C++ bool.  Note that this allows one to
14699 # specify the type of bool in a configure-script option and postpone
14700 # integration with the C++ compiler provided that the types are compatible.
14701 USE_CXX_BOOL=1
14702 if test $cf_cv_cc_bool_type = 1
14703 then
14704         # oops: C has a bool.  Unlikely, but C++ could differ.
14705         USE_CXX_BOOL=0
14706 elif test $cf_cv_builtin_bool = 0
14707 then
14708         # C++ has no bool
14709         USE_CXX_BOOL=0
14710 else
14711         # this is the normal case
14712         USE_CXX_BOOL='defined(__cplusplus)'
14713 fi
14714
14715 if test -f "${srcdir}/Ada95/Makefile.in" ; then
14716 if test "$cf_with_ada" != "no" ; then
14717 cf_ada_make=gnatmake
14718 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
14719 set dummy $cf_ada_make; ac_word=$2
14720 echo "$as_me:14720: checking for $ac_word" >&5
14721 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14722 if test "${ac_cv_prog_gnat_exists+set}" = set; then
14723   echo $ECHO_N "(cached) $ECHO_C" >&6
14724 else
14725   if test -n "$gnat_exists"; then
14726   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
14727 else
14728   ac_save_IFS=$IFS; IFS=$ac_path_separator
14729 ac_dummy="$PATH"
14730 for ac_dir in $ac_dummy; do
14731   IFS=$ac_save_IFS
14732   test -z "$ac_dir" && ac_dir=.
14733   $as_executable_p "$ac_dir/$ac_word" || continue
14734 ac_cv_prog_gnat_exists="yes"
14735 echo "$as_me:14735: found $ac_dir/$ac_word" >&5
14736 break
14737 done
14738
14739   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
14740 fi
14741 fi
14742 gnat_exists=$ac_cv_prog_gnat_exists
14743 if test -n "$gnat_exists"; then
14744   echo "$as_me:14744: result: $gnat_exists" >&5
14745 echo "${ECHO_T}$gnat_exists" >&6
14746 else
14747   echo "$as_me:14747: result: no" >&5
14748 echo "${ECHO_T}no" >&6
14749 fi
14750
14751 if test "$ac_cv_prog_gnat_exists" = no; then
14752    cf_ada_make=
14753 else
14754
14755 echo "$as_me:14755: checking for gnat version" >&5
14756 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
14757 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
14758   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
14759 echo "$as_me:14759: result: $cf_gnat_version" >&5
14760 echo "${ECHO_T}$cf_gnat_version" >&6
14761
14762 case $cf_gnat_version in
14763   3.1[1-9]*|3.[2-9]*|[4-9].*)
14764     cf_cv_prog_gnat_correct=yes
14765     ;;
14766   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
14767      cf_cv_prog_gnat_correct=no
14768      ;;
14769 esac
14770 case $cf_gnat_version in
14771   3.[1-9]*|[4-9].*)
14772       cf_compile_generics=generics
14773       cf_generic_objects="\${GENOBJS}"
14774       ;;
14775   *)  cf_compile_generics=
14776       cf_generic_objects=
14777       ;;
14778 esac
14779
14780    # Extract the first word of "m4", so it can be a program name with args.
14781 set dummy m4; ac_word=$2
14782 echo "$as_me:14782: checking for $ac_word" >&5
14783 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14784 if test "${ac_cv_prog_M4_exists+set}" = set; then
14785   echo $ECHO_N "(cached) $ECHO_C" >&6
14786 else
14787   if test -n "$M4_exists"; then
14788   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
14789 else
14790   ac_save_IFS=$IFS; IFS=$ac_path_separator
14791 ac_dummy="$PATH"
14792 for ac_dir in $ac_dummy; do
14793   IFS=$ac_save_IFS
14794   test -z "$ac_dir" && ac_dir=.
14795   $as_executable_p "$ac_dir/$ac_word" || continue
14796 ac_cv_prog_M4_exists="yes"
14797 echo "$as_me:14797: found $ac_dir/$ac_word" >&5
14798 break
14799 done
14800
14801   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
14802 fi
14803 fi
14804 M4_exists=$ac_cv_prog_M4_exists
14805 if test -n "$M4_exists"; then
14806   echo "$as_me:14806: result: $M4_exists" >&5
14807 echo "${ECHO_T}$M4_exists" >&6
14808 else
14809   echo "$as_me:14809: result: no" >&5
14810 echo "${ECHO_T}no" >&6
14811 fi
14812
14813    if test "$ac_cv_prog_M4_exists" = no; then
14814       cf_cv_prog_gnat_correct=no
14815       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
14816    fi
14817    if test "$cf_cv_prog_gnat_correct" = yes; then
14818       echo "$as_me:14818: checking if GNAT works" >&5
14819 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
14820
14821 rm -f conftest*
14822 cat >>conftest.ads <<CF_EOF
14823 procedure conftest;
14824 CF_EOF
14825 cat >>conftest.adb <<CF_EOF
14826 with Text_IO;
14827 with GNAT.OS_Lib;
14828 procedure conftest is
14829 begin
14830    Text_IO.Put ("Hello World");
14831    Text_IO.New_Line;
14832    GNAT.OS_Lib.OS_Exit (0);
14833 end conftest;
14834 CF_EOF
14835 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14836    if ( ./conftest 1>&5 2>&1 ) ; then
14837       cf_cv_prog_gnat_correct=yes
14838    else
14839       cf_cv_prog_gnat_correct=no
14840    fi
14841 else
14842    cf_cv_prog_gnat_correct=no
14843 fi
14844 rm -f conftest*
14845
14846       echo "$as_me:14846: result: $cf_cv_prog_gnat_correct" >&5
14847 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
14848    fi
14849 fi
14850 if test "$cf_cv_prog_gnat_correct" = yes; then
14851    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
14852
14853    echo "$as_me:14853: checking if GNAT pragma Unreferenced works" >&5
14854 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
14855
14856 rm -f conftest*
14857 cat >>conftest.ads <<CF_EOF
14858 procedure conftest;
14859 CF_EOF
14860 cat >>conftest.adb <<CF_EOF
14861 with Text_IO;
14862 with GNAT.OS_Lib;
14863 procedure conftest is
14864    test : Integer;
14865    pragma Unreferenced (test);
14866 begin
14867    test := 1;
14868    Text_IO.Put ("Hello World");
14869    Text_IO.New_Line;
14870    GNAT.OS_Lib.OS_Exit (0);
14871 end conftest;
14872 CF_EOF
14873 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14874       cf_cv_pragma_unreferenced=yes
14875 else
14876    cf_cv_pragma_unreferenced=no
14877 fi
14878 rm -f conftest*
14879
14880    echo "$as_me:14880: result: $cf_cv_pragma_unreferenced" >&5
14881 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
14882
14883    # if the pragma is supported, use it (needed in the Trace code).
14884    if test $cf_cv_pragma_unreferenced = yes ; then
14885       PRAGMA_UNREF=TRUE
14886    else
14887       PRAGMA_UNREF=FALSE
14888    fi
14889
14890 # Check whether --with-ada-compiler or --without-ada-compiler was given.
14891 if test "${with_ada_compiler+set}" = set; then
14892   withval="$with_ada_compiler"
14893   cf_ada_compiler=$withval
14894 else
14895   cf_ada_compiler=gnatmake
14896 fi;
14897
14898    cf_ada_package=terminal_interface
14899
14900 # Check whether --with-ada-include or --without-ada-include was given.
14901 if test "${with_ada_include+set}" = set; then
14902   withval="$with_ada_include"
14903
14904 else
14905   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
14906 fi;
14907 if test "x$prefix" != xNONE; then
14908   cf_path_syntax="$prefix"
14909 else
14910   cf_path_syntax="$ac_default_prefix"
14911 fi
14912
14913 case ".$withval" in #(vi
14914 .\$\(*\)*|.\'*\'*) #(vi
14915   ;;
14916 ..|./*|.\\*) #(vi
14917   ;;
14918 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14919   ;;
14920 .\${*prefix}*) #(vi
14921   eval withval="$withval"
14922   case ".$withval" in #(vi
14923   .NONE/*)
14924     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14925     ;;
14926   esac
14927   ;; #(vi
14928 .no|.NONE/*)
14929   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14930   ;;
14931 *)
14932   { { echo "$as_me:14932: error: expected a pathname, not \"$withval\"" >&5
14933 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14934    { (exit 1); exit 1; }; }
14935   ;;
14936 esac
14937
14938 ADA_INCLUDE="$withval"
14939
14940 # Check whether --with-ada-objects or --without-ada-objects was given.
14941 if test "${with_ada_objects+set}" = set; then
14942   withval="$with_ada_objects"
14943
14944 else
14945   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
14946 fi;
14947 if test "x$prefix" != xNONE; then
14948   cf_path_syntax="$prefix"
14949 else
14950   cf_path_syntax="$ac_default_prefix"
14951 fi
14952
14953 case ".$withval" in #(vi
14954 .\$\(*\)*|.\'*\'*) #(vi
14955   ;;
14956 ..|./*|.\\*) #(vi
14957   ;;
14958 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14959   ;;
14960 .\${*prefix}*) #(vi
14961   eval withval="$withval"
14962   case ".$withval" in #(vi
14963   .NONE/*)
14964     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14965     ;;
14966   esac
14967   ;; #(vi
14968 .no|.NONE/*)
14969   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14970   ;;
14971 *)
14972   { { echo "$as_me:14972: error: expected a pathname, not \"$withval\"" >&5
14973 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14974    { (exit 1); exit 1; }; }
14975   ;;
14976 esac
14977
14978 ADA_OBJECTS="$withval"
14979
14980 fi
14981 fi
14982 fi
14983
14984 ### Construct the library-subsets, if any, from this set of keywords:
14985 ### none, base, ext_funcs, ext_tinfo, termlib, widechar (see CF_LIB_RULES).
14986 echo "$as_me:14986: checking for library subsets" >&5
14987 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
14988 if test "$with_termlib" != no ; then
14989         LIB_SUBSETS="termlib"
14990         test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
14991         test "$cf_with_progs"  = yes && LIB_SUBSETS="${LIB_SUBSETS}+programs"
14992         LIB_SUBSETS="${LIB_SUBSETS} "
14993 else
14994         LIB_SUBSETS="termlib+"
14995         test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}ext_tinfo+"
14996         test "$cf_with_progs"  = yes && LIB_SUBSETS="${LIB_SUBSETS}programs+"
14997 fi
14998 LIB_SUBSETS="${LIB_SUBSETS}base"
14999 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
15000 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
15001 echo "$as_me:15001: result: $LIB_SUBSETS" >&5
15002 echo "${ECHO_T}$LIB_SUBSETS" >&6
15003
15004 ### Construct the list of include-directories to be generated
15005
15006 CPPFLAGS="-I. -I../include $CPPFLAGS"
15007 if test "$srcdir" != "."; then
15008         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15009 fi
15010 if test "$GCC" != yes; then
15011         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15012 elif test "$includedir" != "/usr/include"; then
15013         if test "$includedir" = '${prefix}/include' ; then
15014                 if test $prefix != /usr ; then
15015                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15016                 fi
15017         else
15018                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
15019         fi
15020 fi
15021
15022 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
15023 if test "$srcdir" != "."; then
15024         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15025 fi
15026 if test "$GCC" != yes; then
15027         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15028 elif test "$includedir" != "/usr/include"; then
15029         if test "$includedir" = '${prefix}/include' ; then
15030                 if test $prefix != /usr ; then
15031                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15032                 fi
15033         else
15034                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15035         fi
15036 fi
15037
15038 ### Build up pieces for makefile rules
15039 echo "$as_me:15039: checking default library suffix" >&5
15040 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15041
15042         case $DFT_LWR_MODEL in
15043         libtool) DFT_ARG_SUFFIX=''   ;;
15044         normal)  DFT_ARG_SUFFIX=''   ;;
15045         debug)   DFT_ARG_SUFFIX='_g' ;;
15046         profile) DFT_ARG_SUFFIX='_p' ;;
15047         shared)  DFT_ARG_SUFFIX=''   ;;
15048         esac
15049         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15050 echo "$as_me:15050: result: $DFT_ARG_SUFFIX" >&5
15051 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15052
15053 echo "$as_me:15053: checking default library-dependency suffix" >&5
15054 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15055
15056         case $DFT_LWR_MODEL in
15057         libtool) DFT_DEP_SUFFIX='.la'  ;;
15058         normal)  DFT_DEP_SUFFIX='.a'   ;;
15059         debug)   DFT_DEP_SUFFIX='_g.a' ;;
15060         profile) DFT_DEP_SUFFIX='_p.a' ;;
15061         shared)
15062                 case $cf_cv_system_name in
15063                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
15064                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
15065                 hpux*)
15066                         case $target in
15067                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
15068                         *)      DFT_DEP_SUFFIX='.sl' ;;
15069                         esac
15070                         ;;
15071                 *)      DFT_DEP_SUFFIX='.so'  ;;
15072                 esac
15073         esac
15074         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
15075 if test $DFT_LWR_MODEL = shared ; then
15076         case $cf_cv_system_name in #(vi
15077         cygwin*)
15078                 DFT_DEP_SUFFIX=".dll.a"
15079                 ;;
15080         esac
15081 fi
15082 echo "$as_me:15082: result: $DFT_DEP_SUFFIX" >&5
15083 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15084
15085 echo "$as_me:15085: checking default object directory" >&5
15086 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15087
15088         case $DFT_LWR_MODEL in
15089         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
15090         normal)  DFT_OBJ_SUBDIR='objects' ;;
15091         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
15092         profile) DFT_OBJ_SUBDIR='obj_p' ;;
15093         shared)
15094                 case $cf_cv_system_name in #(vi
15095                 cygwin) #(vi
15096                         DFT_OBJ_SUBDIR='objects' ;;
15097                 *)
15098                         DFT_OBJ_SUBDIR='obj_s' ;;
15099                 esac
15100         esac
15101 echo "$as_me:15101: result: $DFT_OBJ_SUBDIR" >&5
15102 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15103
15104 # libtool thinks it can make c++ shared libraries (perhaps only g++)
15105 if test "$cf_with_cxx" = yes ; then
15106 echo "$as_me:15106: checking c++ library-dependency suffix" >&5
15107 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
15108 if test "$with_libtool" != "no"; then
15109         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15110 else
15111
15112         case normal in
15113         libtool) CXX_LIB_SUFFIX='.la'  ;;
15114         normal)  CXX_LIB_SUFFIX='.a'   ;;
15115         debug)   CXX_LIB_SUFFIX='_g.a' ;;
15116         profile) CXX_LIB_SUFFIX='_p.a' ;;
15117         shared)
15118                 case $cf_cv_system_name in
15119                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
15120                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
15121                 hpux*)
15122                         case $target in
15123                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
15124                         *)      CXX_LIB_SUFFIX='.sl' ;;
15125                         esac
15126                         ;;
15127                 *)      CXX_LIB_SUFFIX='.so'  ;;
15128                 esac
15129         esac
15130         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15131 fi
15132 echo "$as_me:15132: result: $CXX_LIB_SUFFIX" >&5
15133 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15134
15135 fi
15136
15137 ### Set up low-level terminfo dependencies for makefiles.
15138 TINFO_LIST="$SHLIB_LIST"
15139 if test "$with_termlib" != no ; then
15140
15141         if test "$with_termlib" != yes ; then
15142                 TINFO_NAME=$with_termlib
15143                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15144                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15145                 TINFO_LIB_SUFFIX="${with_termlib}"
15146         else
15147                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15148                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15149                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15150         fi
15151
15152         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15153         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15154         if test "$DFT_LWR_MODEL" = "libtool"; then
15155                 TEST_ARGS="${TEST_DEPS}"
15156                 TEST_ARG2="${TEST_DEP2}"
15157                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15158         else
15159                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15160                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15161                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15162                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15163         fi
15164 else
15165         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15166 fi
15167
15168 # needed for Ada95
15169 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15170
15171 echo "$as_me:15171: checking where we will install curses.h" >&5
15172 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
15173 test "$with_overwrite" = no && \
15174 test "x$includedir" = 'x${prefix}/include' && \
15175         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
15176 echo "$as_me:15176: result: $includedir" >&5
15177 echo "${ECHO_T}$includedir" >&6
15178
15179 ### Resolve a conflict between normal and wide-curses by forcing applications
15180 ### that will need libutf8 to add it to their configure script.
15181 if test "$with_overwrite" != no ; then
15182 if test "$NCURSES_LIBUTF8" = 1 ; then
15183         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
15184         { echo "$as_me:15184: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
15185 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
15186 fi
15187 fi
15188
15189 ### predefined stuff for the test programs
15190 cat >>confdefs.h <<\EOF
15191 #define HAVE_SLK_COLOR 1
15192 EOF
15193
15194 ### Construct the list of subdirectories for which we'll customize makefiles
15195 ### with the appropriate compile-rules.
15196
15197 echo "$as_me:15197: checking for src modules" >&5
15198 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
15199
15200 # dependencies and linker-arguments for test-programs
15201 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
15202 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
15203 if test "$DFT_LWR_MODEL" = "libtool"; then
15204         TEST_ARGS="${TEST_DEPS}"
15205         TEST_ARG2="${TEST_DEP2}"
15206 else
15207         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
15208         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
15209 fi
15210
15211 cf_cv_src_modules=
15212 for cf_dir in $modules_to_build
15213 do
15214         if test -f $srcdir/$cf_dir/modules; then
15215
15216                 # We may/may not have tack in the distribution, though the
15217                 # makefile is.
15218                 if test $cf_dir = tack ; then
15219                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
15220                                 continue
15221                         fi
15222                 fi
15223
15224                 if test -z "$cf_cv_src_modules"; then
15225                         cf_cv_src_modules=$cf_dir
15226                 else
15227                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
15228                 fi
15229
15230                 # Make the ncurses_cfg.h file record the library interface files as
15231                 # well.  These are header files that are the same name as their
15232                 # directory.  Ncurses is the only library that does not follow
15233                 # that pattern.
15234                 if test $cf_dir = tack ; then
15235                         continue
15236                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
15237
15238 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15239
15240                         cat >>confdefs.h <<EOF
15241 #define HAVE_${cf_have_include}_H 1
15242 EOF
15243
15244                         cat >>confdefs.h <<EOF
15245 #define HAVE_LIB${cf_have_include} 1
15246 EOF
15247
15248                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
15249                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
15250                         if test "$DFT_LWR_MODEL" = "libtool"; then
15251                                 TEST_ARGS="${TEST_DEPS}"
15252                                 TEST_ARG2="${TEST_DEP2}"
15253                         else
15254                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
15255                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
15256                         fi
15257                 fi
15258         fi
15259 done
15260 echo "$as_me:15260: result: $cf_cv_src_modules" >&5
15261 echo "${ECHO_T}$cf_cv_src_modules" >&6
15262
15263 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
15264 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
15265
15266 SRC_SUBDIRS="man include"
15267 for cf_dir in $cf_cv_src_modules
15268 do
15269         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
15270 done
15271 SRC_SUBDIRS="$SRC_SUBDIRS test"
15272 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
15273 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
15274
15275 ADA_SUBDIRS=
15276 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
15277    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
15278    ADA_SUBDIRS="gen src samples"
15279 fi
15280
15281 SUB_MAKEFILES=
15282 for cf_dir in $SRC_SUBDIRS
15283 do
15284         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15285 done
15286
15287 if test -n "$ADA_SUBDIRS"; then
15288    for cf_dir in $ADA_SUBDIRS
15289    do
15290       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
15291    done
15292
15293 fi
15294
15295 DIRS_TO_MAKE="lib"
15296 for cf_item in $cf_list_models
15297 do
15298
15299         case $cf_item in
15300         libtool) cf_subdir='obj_lo'  ;;
15301         normal)  cf_subdir='objects' ;;
15302         debug)   cf_subdir='obj_g' ;;
15303         profile) cf_subdir='obj_p' ;;
15304         shared)
15305                 case $cf_cv_system_name in #(vi
15306                 cygwin) #(vi
15307                         cf_subdir='objects' ;;
15308                 *)
15309                         cf_subdir='obj_s' ;;
15310                 esac
15311         esac
15312
15313         for cf_item2 in $DIRS_TO_MAKE
15314         do
15315                 test $cf_item2 = $cf_subdir && break
15316         done
15317         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
15318 done
15319 for cf_dir in $DIRS_TO_MAKE
15320 do
15321         test ! -d $cf_dir && mkdir $cf_dir
15322 done
15323
15324 cat >>confdefs.h <<EOF
15325 #define NCURSES_PATHSEP '$PATHSEP'
15326 EOF
15327
15328 cat >>confdefs.h <<EOF
15329 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
15330 EOF
15331
15332 ### Now that we're done running tests, add the compiler-warnings, if any
15333
15334 cf_fix_cppflags=no
15335 cf_new_cflags=
15336 cf_new_cppflags=
15337 cf_new_extra_cppflags=
15338
15339 for cf_add_cflags in $EXTRA_CFLAGS
15340 do
15341 case $cf_fix_cppflags in
15342 no)
15343         case $cf_add_cflags in #(vi
15344         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15345                 case $cf_add_cflags in
15346                 -D*)
15347                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15348
15349                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15350                         && test -z "${cf_tst_cflags}" \
15351                         && cf_fix_cppflags=yes
15352
15353                         if test $cf_fix_cppflags = yes ; then
15354                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15355                                 continue
15356                         elif test "${cf_tst_cflags}" = "\"'" ; then
15357                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15358                                 continue
15359                         fi
15360                         ;;
15361                 esac
15362                 case "$CPPFLAGS" in
15363                 *$cf_add_cflags) #(vi
15364                         ;;
15365                 *) #(vi
15366                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15367                         ;;
15368                 esac
15369                 ;;
15370         *)
15371                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15372                 ;;
15373         esac
15374         ;;
15375 yes)
15376         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15377
15378         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15379
15380         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15381         && test -z "${cf_tst_cflags}" \
15382         && cf_fix_cppflags=no
15383         ;;
15384 esac
15385 done
15386
15387 if test -n "$cf_new_cflags" ; then
15388
15389         CFLAGS="$CFLAGS $cf_new_cflags"
15390 fi
15391
15392 if test -n "$cf_new_cppflags" ; then
15393
15394         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
15395 fi
15396
15397 if test -n "$cf_new_extra_cppflags" ; then
15398
15399         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15400 fi
15401
15402 ### Define substitutions for header files to avoid name-pollution
15403
15404 if test "$cf_cv_have_tcgetattr" = yes ; then
15405         HAVE_TCGETATTR=1
15406 else
15407         HAVE_TCGETATTR=0
15408 fi
15409
15410 if test "$ac_cv_header_termio_h" = yes ; then
15411         HAVE_TERMIO_H=1
15412 else
15413         HAVE_TERMIO_H=0
15414 fi
15415
15416 if test "$ac_cv_header_termios_h" = yes ; then
15417         HAVE_TERMIOS_H=1
15418 else
15419         HAVE_TERMIOS_H=0
15420 fi
15421
15422 ################################################################################
15423 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
15424 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
15425 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"
15426 ac_config_commands="$ac_config_commands default"
15427 cat >confcache <<\_ACEOF
15428 # This file is a shell script that caches the results of configure
15429 # tests run on this system so they can be shared between configure
15430 # scripts and configure runs, see configure's option --config-cache.
15431 # It is not useful on other systems.  If it contains results you don't
15432 # want to keep, you may remove or edit it.
15433 #
15434 # config.status only pays attention to the cache file if you give it
15435 # the --recheck option to rerun configure.
15436 #
15437 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15438 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15439 # following values.
15440
15441 _ACEOF
15442
15443 # The following way of writing the cache mishandles newlines in values,
15444 # but we know of no workaround that is simple, portable, and efficient.
15445 # So, don't put newlines in cache variables' values.
15446 # Ultrix sh set writes to stderr and can't be redirected directly,
15447 # and sets the high bit in the cache file unless we assign to the vars.
15448 {
15449   (set) 2>&1 |
15450     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15451     *ac_space=\ *)
15452       # `set' does not quote correctly, so add quotes (double-quote
15453       # substitution turns \\\\ into \\, and sed turns \\ into \).
15454       sed -n \
15455         "s/'/'\\\\''/g;
15456           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15457       ;;
15458     *)
15459       # `set' quotes correctly as required by POSIX, so do not add quotes.
15460       sed -n \
15461         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15462       ;;
15463     esac;
15464 } |
15465   sed '
15466      t clear
15467      : clear
15468      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15469      t end
15470      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15471      : end' >>confcache
15472 if cmp -s $cache_file confcache; then :; else
15473   if test -w $cache_file; then
15474     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15475     cat confcache >$cache_file
15476   else
15477     echo "not updating unwritable cache $cache_file"
15478   fi
15479 fi
15480 rm -f confcache
15481
15482 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15483 # Let make expand exec_prefix.
15484 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15485
15486 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15487 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15488 # trailing colons and then remove the whole line if VPATH becomes empty
15489 # (actually we leave an empty line to preserve line numbers).
15490 if test "x$srcdir" = x.; then
15491   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15492 s/:*\$(srcdir):*/:/;
15493 s/:*\${srcdir}:*/:/;
15494 s/:*@srcdir@:*/:/;
15495 s/^\([^=]*=[    ]*\):*/\1/;
15496 s/:*$//;
15497 s/^[^=]*=[      ]*$//;
15498 }'
15499 fi
15500
15501 DEFS=-DHAVE_CONFIG_H
15502
15503 : ${CONFIG_STATUS=./config.status}
15504 ac_clean_files_save=$ac_clean_files
15505 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15506 { echo "$as_me:15506: creating $CONFIG_STATUS" >&5
15507 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15508 cat >$CONFIG_STATUS <<_ACEOF
15509 #! $SHELL
15510 # Generated automatically by configure.
15511 # Run this file to recreate the current configuration.
15512 # Compiler output produced by configure, useful for debugging
15513 # configure, is in config.log if it exists.
15514
15515 debug=false
15516 SHELL=\${CONFIG_SHELL-$SHELL}
15517 ac_cs_invocation="\$0 \$@"
15518
15519 _ACEOF
15520
15521 cat >>$CONFIG_STATUS <<\_ACEOF
15522 # Be Bourne compatible
15523 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15524   emulate sh
15525   NULLCMD=:
15526 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15527   set -o posix
15528 fi
15529
15530 # Name of the executable.
15531 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15532
15533 if expr a : '\(a\)' >/dev/null 2>&1; then
15534   as_expr=expr
15535 else
15536   as_expr=false
15537 fi
15538
15539 rm -f conf$$ conf$$.exe conf$$.file
15540 echo >conf$$.file
15541 if ln -s conf$$.file conf$$ 2>/dev/null; then
15542   # We could just check for DJGPP; but this test a) works b) is more generic
15543   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15544   if test -f conf$$.exe; then
15545     # Don't use ln at all; we don't have any links
15546     as_ln_s='cp -p'
15547   else
15548     as_ln_s='ln -s'
15549   fi
15550 elif ln conf$$.file conf$$ 2>/dev/null; then
15551   as_ln_s=ln
15552 else
15553   as_ln_s='cp -p'
15554 fi
15555 rm -f conf$$ conf$$.exe conf$$.file
15556
15557 as_executable_p="test -f"
15558
15559 # Support unset when possible.
15560 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15561   as_unset=unset
15562 else
15563   as_unset=false
15564 fi
15565
15566 # NLS nuisances.
15567 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15568 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15569 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15570 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15571 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15572 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15573 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15574 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15575
15576 # IFS
15577 # We need space, tab and new line, in precisely that order.
15578 as_nl='
15579 '
15580 IFS="   $as_nl"
15581
15582 # CDPATH.
15583 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15584
15585 exec 6>&1
15586
15587 _ACEOF
15588
15589 # Files that config.status was made for.
15590 if test -n "$ac_config_files"; then
15591   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15592 fi
15593
15594 if test -n "$ac_config_headers"; then
15595   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15596 fi
15597
15598 if test -n "$ac_config_links"; then
15599   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15600 fi
15601
15602 if test -n "$ac_config_commands"; then
15603   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15604 fi
15605
15606 cat >>$CONFIG_STATUS <<\EOF
15607
15608 ac_cs_usage="\
15609 \`$as_me' instantiates files from templates according to the
15610 current configuration.
15611
15612 Usage: $0 [OPTIONS] [FILE]...
15613
15614   -h, --help       print this help, then exit
15615   -V, --version    print version number, then exit
15616   -d, --debug      don't remove temporary files
15617       --recheck    update $as_me by reconfiguring in the same conditions
15618   --file=FILE[:TEMPLATE]
15619                    instantiate the configuration file FILE
15620   --header=FILE[:TEMPLATE]
15621                    instantiate the configuration header FILE
15622
15623 Configuration files:
15624 $config_files
15625
15626 Configuration headers:
15627 $config_headers
15628
15629 Configuration commands:
15630 $config_commands
15631
15632 Report bugs to <bug-autoconf@gnu.org>."
15633 EOF
15634
15635 cat >>$CONFIG_STATUS <<EOF
15636 ac_cs_version="\\
15637 config.status
15638 configured by $0, generated by GNU Autoconf 2.52.20061216,
15639   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15640
15641 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15642 Free Software Foundation, Inc.
15643 This config.status script is free software; the Free Software Foundation
15644 gives unlimited permission to copy, distribute and modify it."
15645 srcdir=$srcdir
15646 INSTALL="$INSTALL"
15647 EOF
15648
15649 cat >>$CONFIG_STATUS <<\EOF
15650 # If no file are specified by the user, then we need to provide default
15651 # value.  By we need to know if files were specified by the user.
15652 ac_need_defaults=:
15653 while test $# != 0
15654 do
15655   case $1 in
15656   --*=*)
15657     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15658     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15659     shift
15660     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15661     shift
15662     ;;
15663   -*);;
15664   *) # This is not an option, so the user has probably given explicit
15665      # arguments.
15666      ac_need_defaults=false;;
15667   esac
15668
15669   case $1 in
15670   # Handling of the options.
15671 EOF
15672 cat >>$CONFIG_STATUS <<EOF
15673   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15674     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15675     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15676 EOF
15677 cat >>$CONFIG_STATUS <<\EOF
15678   --version | --vers* | -V )
15679     echo "$ac_cs_version"; exit 0 ;;
15680   --he | --h)
15681     # Conflict between --help and --header
15682     { { echo "$as_me:15682: error: ambiguous option: $1
15683 Try \`$0 --help' for more information." >&5
15684 echo "$as_me: error: ambiguous option: $1
15685 Try \`$0 --help' for more information." >&2;}
15686    { (exit 1); exit 1; }; };;
15687   --help | --hel | -h )
15688     echo "$ac_cs_usage"; exit 0 ;;
15689   --debug | --d* | -d )
15690     debug=: ;;
15691   --file | --fil | --fi | --f )
15692     shift
15693     CONFIG_FILES="$CONFIG_FILES $1"
15694     ac_need_defaults=false;;
15695   --header | --heade | --head | --hea )
15696     shift
15697     CONFIG_HEADERS="$CONFIG_HEADERS $1"
15698     ac_need_defaults=false;;
15699
15700   # This is an error.
15701   -*) { { echo "$as_me:15701: error: unrecognized option: $1
15702 Try \`$0 --help' for more information." >&5
15703 echo "$as_me: error: unrecognized option: $1
15704 Try \`$0 --help' for more information." >&2;}
15705    { (exit 1); exit 1; }; } ;;
15706
15707   *) ac_config_targets="$ac_config_targets $1" ;;
15708
15709   esac
15710   shift
15711 done
15712
15713 exec 5>>config.log
15714 cat >&5 << _ACEOF
15715
15716 ## ----------------------- ##
15717 ## Running config.status.  ##
15718 ## ----------------------- ##
15719
15720 This file was extended by $as_me 2.52.20061216, executed with
15721   CONFIG_FILES    = $CONFIG_FILES
15722   CONFIG_HEADERS  = $CONFIG_HEADERS
15723   CONFIG_LINKS    = $CONFIG_LINKS
15724   CONFIG_COMMANDS = $CONFIG_COMMANDS
15725   > $ac_cs_invocation
15726 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15727
15728 _ACEOF
15729 EOF
15730
15731 cat >>$CONFIG_STATUS <<EOF
15732 #
15733 # INIT-COMMANDS section.
15734 #
15735
15736 ### Special initialization commands, used to pass information from the
15737 ### configuration-run into config.status
15738
15739 AWK="$AWK"
15740 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
15741 DFT_LWR_MODEL="$DFT_LWR_MODEL"
15742 ECHO_LINK="$ECHO_LINK"
15743 LDCONFIG="$LDCONFIG"
15744 LIB_NAME="$LIB_NAME"
15745 LIB_SUBSETS="$LIB_SUBSETS"
15746 LIB_SUFFIX="$LIB_SUFFIX"
15747 LIB_TRACING="$LIB_TRACING"
15748 MAKE_TERMINFO="$MAKE_TERMINFO"
15749 NCURSES_MAJOR="$NCURSES_MAJOR"
15750 NCURSES_MINOR="$NCURSES_MINOR"
15751 NCURSES_OSPEED="$NCURSES_OSPEED"
15752 NCURSES_PATCH="$NCURSES_PATCH"
15753 SRC_SUBDIRS="$SRC_SUBDIRS"
15754 TERMINFO="$TERMINFO"
15755 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
15756 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
15757 TINFO_NAME="$TINFO_NAME"
15758 WITH_CURSES_H="$with_curses_h"
15759 WITH_ECHO="$with_echo"
15760 WITH_OVERWRITE="$with_overwrite"
15761 cf_LIST_MODELS="$cf_list_models"
15762 cf_cv_abi_version="$cf_cv_abi_version"
15763 cf_cv_do_symlinks="$cf_cv_do_symlinks"
15764 cf_cv_enable_lp64="$cf_cv_enable_lp64"
15765 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
15766 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
15767 cf_cv_rel_version="$cf_cv_rel_version"
15768 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
15769 cf_cv_shlib_version="$cf_cv_shlib_version"
15770 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
15771 cf_cv_system_name="$cf_cv_system_name"
15772 cf_with_cxx_binding="$cf_with_cxx_binding"
15773 host="$host"
15774 target="$target"
15775
15776 EOF
15777
15778 cat >>$CONFIG_STATUS <<\EOF
15779 for ac_config_target in $ac_config_targets
15780 do
15781   case "$ac_config_target" in
15782   # Handling of arguments.
15783   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
15784   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
15785   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
15786   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
15787   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
15788   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15789   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15790   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
15791   *) { { echo "$as_me:15791: error: invalid argument: $ac_config_target" >&5
15792 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15793    { (exit 1); exit 1; }; };;
15794   esac
15795 done
15796
15797 # If the user did not use the arguments to specify the items to instantiate,
15798 # then the envvar interface is used.  Set only those that are not.
15799 # We use the long form for the default assignment because of an extremely
15800 # bizarre bug on SunOS 4.1.3.
15801 if $ac_need_defaults; then
15802   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15803   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15804   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15805 fi
15806
15807 # Create a temporary directory, and hook for its removal unless debugging.
15808 $debug ||
15809 {
15810   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15811   trap '{ (exit 1); exit 1; }' 1 2 13 15
15812 }
15813
15814 # Create a (secure) tmp directory for tmp files.
15815 : ${TMPDIR=/tmp}
15816 {
15817   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15818   test -n "$tmp" && test -d "$tmp"
15819 }  ||
15820 {
15821   tmp=$TMPDIR/cs$$-$RANDOM
15822   (umask 077 && mkdir $tmp)
15823 } ||
15824 {
15825    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15826    { (exit 1); exit 1; }
15827 }
15828
15829 EOF
15830
15831 cat >>$CONFIG_STATUS <<EOF
15832
15833 #
15834 # CONFIG_FILES section.
15835 #
15836
15837 # No need to generate the scripts if there are no CONFIG_FILES.
15838 # This happens for instance when ./config.status config.h
15839 if test -n "\$CONFIG_FILES"; then
15840   # Protect against being on the right side of a sed subst in config.status.
15841   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15842    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15843 s,@SHELL@,$SHELL,;t t
15844 s,@exec_prefix@,$exec_prefix,;t t
15845 s,@prefix@,$prefix,;t t
15846 s,@program_transform_name@,$program_transform_name,;t t
15847 s,@bindir@,$bindir,;t t
15848 s,@sbindir@,$sbindir,;t t
15849 s,@libexecdir@,$libexecdir,;t t
15850 s,@datadir@,$datadir,;t t
15851 s,@sysconfdir@,$sysconfdir,;t t
15852 s,@sharedstatedir@,$sharedstatedir,;t t
15853 s,@localstatedir@,$localstatedir,;t t
15854 s,@libdir@,$libdir,;t t
15855 s,@includedir@,$includedir,;t t
15856 s,@oldincludedir@,$oldincludedir,;t t
15857 s,@infodir@,$infodir,;t t
15858 s,@mandir@,$mandir,;t t
15859 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15860 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15861 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15862 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15863 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15864 s,@build_alias@,$build_alias,;t t
15865 s,@host_alias@,$host_alias,;t t
15866 s,@target_alias@,$target_alias,;t t
15867 s,@ECHO_C@,$ECHO_C,;t t
15868 s,@ECHO_N@,$ECHO_N,;t t
15869 s,@ECHO_T@,$ECHO_T,;t t
15870 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15871 s,@DEFS@,$DEFS,;t t
15872 s,@LIBS@,$LIBS,;t t
15873 s,@top_builddir@,$top_builddir,;t t
15874 s,@EGREP@,$EGREP,;t t
15875 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
15876 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
15877 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
15878 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
15879 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
15880 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
15881 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
15882 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
15883 s,@build@,$build,;t t
15884 s,@build_cpu@,$build_cpu,;t t
15885 s,@build_vendor@,$build_vendor,;t t
15886 s,@build_os@,$build_os,;t t
15887 s,@host@,$host,;t t
15888 s,@host_cpu@,$host_cpu,;t t
15889 s,@host_vendor@,$host_vendor,;t t
15890 s,@host_os@,$host_os,;t t
15891 s,@target@,$target,;t t
15892 s,@target_cpu@,$target_cpu,;t t
15893 s,@target_vendor@,$target_vendor,;t t
15894 s,@target_os@,$target_os,;t t
15895 s,@CC@,$CC,;t t
15896 s,@CFLAGS@,$CFLAGS,;t t
15897 s,@LDFLAGS@,$LDFLAGS,;t t
15898 s,@CPPFLAGS@,$CPPFLAGS,;t t
15899 s,@ac_ct_CC@,$ac_ct_CC,;t t
15900 s,@EXEEXT@,$EXEEXT,;t t
15901 s,@OBJEXT@,$OBJEXT,;t t
15902 s,@CPP@,$CPP,;t t
15903 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
15904 s,@PROG_EXT@,$PROG_EXT,;t t
15905 s,@LDCONFIG@,$LDCONFIG,;t t
15906 s,@CXX@,$CXX,;t t
15907 s,@CXXFLAGS@,$CXXFLAGS,;t t
15908 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
15909 s,@AWK@,$AWK,;t t
15910 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15911 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15912 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15913 s,@LINT@,$LINT,;t t
15914 s,@LINT_OPTS@,$LINT_OPTS,;t t
15915 s,@LN_S@,$LN_S,;t t
15916 s,@SET_MAKE@,$SET_MAKE,;t t
15917 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
15918 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
15919 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
15920 s,@RANLIB@,$RANLIB,;t t
15921 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
15922 s,@LD@,$LD,;t t
15923 s,@ac_ct_LD@,$ac_ct_LD,;t t
15924 s,@AR@,$AR,;t t
15925 s,@ac_ct_AR@,$ac_ct_AR,;t t
15926 s,@AR_OPTS@,$AR_OPTS,;t t
15927 s,@DESTDIR@,$DESTDIR,;t t
15928 s,@BUILD_CC@,$BUILD_CC,;t t
15929 s,@BUILD_CPP@,$BUILD_CPP,;t t
15930 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
15931 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
15932 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
15933 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
15934 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
15935 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
15936 s,@cf_list_models@,$cf_list_models,;t t
15937 s,@LIBTOOL@,$LIBTOOL,;t t
15938 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
15939 s,@LIB_CREATE@,$LIB_CREATE,;t t
15940 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
15941 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
15942 s,@LIB_PREP@,$LIB_PREP,;t t
15943 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
15944 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
15945 s,@LIB_LINK@,$LIB_LINK,;t t
15946 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
15947 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
15948 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
15949 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
15950 s,@TINFO_NAME@,$TINFO_NAME,;t t
15951 s,@LIB_NAME@,$LIB_NAME,;t t
15952 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
15953 s,@CC_G_OPT@,$CC_G_OPT,;t t
15954 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
15955 s,@LD_MODEL@,$LD_MODEL,;t t
15956 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
15957 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
15958 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
15959 s,@LINK_PROGS@,$LINK_PROGS,;t t
15960 s,@LINK_TESTS@,$LINK_TESTS,;t t
15961 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
15962 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
15963 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
15964 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
15965 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
15966 s,@PATHSEP@,$PATHSEP,;t t
15967 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
15968 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
15969 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
15970 s,@TERMINFO@,$TERMINFO,;t t
15971 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
15972 s,@TERMPATH@,$TERMPATH,;t t
15973 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
15974 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
15975 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
15976 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
15977 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
15978 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
15979 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
15980 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
15981 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
15982 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
15983 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
15984 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
15985 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
15986 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
15987 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
15988 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
15989 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
15990 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
15991 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
15992 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
15993 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
15994 s,@ECHO_LINK@,$ECHO_LINK,;t t
15995 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
15996 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
15997 s,@ADA_TRACE@,$ADA_TRACE,;t t
15998 s,@MATH_LIB@,$MATH_LIB,;t t
15999 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
16000 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
16001 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
16002 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
16003 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
16004 s,@CXXCPP@,$CXXCPP,;t t
16005 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
16006 s,@CXX_AR@,$CXX_AR,;t t
16007 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
16008 s,@CXXLIBS@,$CXXLIBS,;t t
16009 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
16010 s,@gnat_exists@,$gnat_exists,;t t
16011 s,@M4_exists@,$M4_exists,;t t
16012 s,@cf_ada_make@,$cf_ada_make,;t t
16013 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16014 s,@cf_ada_package@,$cf_ada_package,;t t
16015 s,@ADAFLAGS@,$ADAFLAGS,;t t
16016 s,@cf_compile_generics@,$cf_compile_generics,;t t
16017 s,@cf_generic_objects@,$cf_generic_objects,;t t
16018 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
16019 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16020 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16021 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16022 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16023 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16024 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16025 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
16026 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
16027 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
16028 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
16029 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
16030 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
16031 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
16032 s,@TINFO_LIST@,$TINFO_LIST,;t t
16033 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
16034 s,@TEST_ARGS@,$TEST_ARGS,;t t
16035 s,@TEST_DEPS@,$TEST_DEPS,;t t
16036 s,@TEST_ARG2@,$TEST_ARG2,;t t
16037 s,@TEST_DEP2@,$TEST_DEP2,;t t
16038 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16039 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
16040 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
16041 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
16042 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
16043 CEOF
16044
16045 EOF
16046
16047   cat >>$CONFIG_STATUS <<\EOF
16048   # Split the substitutions into bite-sized pieces for seds with
16049   # small command number limits, like on Digital OSF/1 and HP-UX.
16050   ac_max_sed_lines=48
16051   ac_sed_frag=1 # Number of current file.
16052   ac_beg=1 # First line for current file.
16053   ac_end=$ac_max_sed_lines # Line after last line for current file.
16054   ac_more_lines=:
16055   ac_sed_cmds=
16056   while $ac_more_lines; do
16057     if test $ac_beg -gt 1; then
16058       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16059     else
16060       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16061     fi
16062     if test ! -s $tmp/subs.frag; then
16063       ac_more_lines=false
16064     else
16065       # The purpose of the label and of the branching condition is to
16066       # speed up the sed processing (if there are no `@' at all, there
16067       # is no need to browse any of the substitutions).
16068       # These are the two extra sed commands mentioned above.
16069       (echo ':t
16070   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16071       if test -z "$ac_sed_cmds"; then
16072         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16073       else
16074         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16075       fi
16076       ac_sed_frag=`expr $ac_sed_frag + 1`
16077       ac_beg=$ac_end
16078       ac_end=`expr $ac_end + $ac_max_sed_lines`
16079     fi
16080   done
16081   if test -z "$ac_sed_cmds"; then
16082     ac_sed_cmds=cat
16083   fi
16084 fi # test -n "$CONFIG_FILES"
16085
16086 EOF
16087 cat >>$CONFIG_STATUS <<\EOF
16088 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16089   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16090   case $ac_file in
16091   - | *:- | *:-:* ) # input from stdin
16092         cat >$tmp/stdin
16093         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16094         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16095   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16096         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16097   * )   ac_file_in=$ac_file.in ;;
16098   esac
16099
16100   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16101   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16102          X"$ac_file" : 'X\(//\)[^/]' \| \
16103          X"$ac_file" : 'X\(//\)$' \| \
16104          X"$ac_file" : 'X\(/\)' \| \
16105          .     : '\(.\)' 2>/dev/null ||
16106 echo X"$ac_file" |
16107     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16108           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16109           /^X\(\/\/\)$/{ s//\1/; q; }
16110           /^X\(\/\).*/{ s//\1/; q; }
16111           s/.*/./; q'`
16112   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16113     { case "$ac_dir" in
16114   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16115   *)                      as_incr_dir=.;;
16116 esac
16117 as_dummy="$ac_dir"
16118 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16119   case $as_mkdir_dir in
16120     # Skip DOS drivespec
16121     ?:) as_incr_dir=$as_mkdir_dir ;;
16122     *)
16123       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16124       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16125     ;;
16126   esac
16127 done; }
16128
16129     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16130     # A "../" for each directory in $ac_dir_suffix.
16131     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16132   else
16133     ac_dir_suffix= ac_dots=
16134   fi
16135
16136   case $srcdir in
16137   .)  ac_srcdir=.
16138       if test -z "$ac_dots"; then
16139          ac_top_srcdir=.
16140       else
16141          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16142       fi ;;
16143   [\\/]* | ?:[\\/]* )
16144       ac_srcdir=$srcdir$ac_dir_suffix;
16145       ac_top_srcdir=$srcdir ;;
16146   *) # Relative path.
16147     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16148     ac_top_srcdir=$ac_dots$srcdir ;;
16149   esac
16150
16151   case $INSTALL in
16152   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16153   *) ac_INSTALL=$ac_dots$INSTALL ;;
16154   esac
16155
16156   if test x"$ac_file" != x-; then
16157     { echo "$as_me:16157: creating $ac_file" >&5
16158 echo "$as_me: creating $ac_file" >&6;}
16159     rm -f "$ac_file"
16160   fi
16161   # Let's still pretend it is `configure' which instantiates (i.e., don't
16162   # use $as_me), people would be surprised to read:
16163   #    /* config.h.  Generated automatically by config.status.  */
16164   configure_input="Generated automatically from `echo $ac_file_in |
16165                                                  sed 's,.*/,,'` by configure."
16166
16167   # First look for the input files in the build tree, otherwise in the
16168   # src tree.
16169   ac_file_inputs=`IFS=:
16170     for f in $ac_file_in; do
16171       case $f in
16172       -) echo $tmp/stdin ;;
16173       [\\/$]*)
16174          # Absolute (can't be DOS-style, as IFS=:)
16175          test -f "$f" || { { echo "$as_me:16175: error: cannot find input file: $f" >&5
16176 echo "$as_me: error: cannot find input file: $f" >&2;}
16177    { (exit 1); exit 1; }; }
16178          echo $f;;
16179       *) # Relative
16180          if test -f "$f"; then
16181            # Build tree
16182            echo $f
16183          elif test -f "$srcdir/$f"; then
16184            # Source tree
16185            echo $srcdir/$f
16186          else
16187            # /dev/null tree
16188            { { echo "$as_me:16188: error: cannot find input file: $f" >&5
16189 echo "$as_me: error: cannot find input file: $f" >&2;}
16190    { (exit 1); exit 1; }; }
16191          fi;;
16192       esac
16193     done` || { (exit 1); exit 1; }
16194 EOF
16195 cat >>$CONFIG_STATUS <<EOF
16196   sed "$ac_vpsub
16197 $extrasub
16198 EOF
16199 cat >>$CONFIG_STATUS <<\EOF
16200 :t
16201 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16202 s,@configure_input@,$configure_input,;t t
16203 s,@srcdir@,$ac_srcdir,;t t
16204 s,@top_srcdir@,$ac_top_srcdir,;t t
16205 s,@INSTALL@,$ac_INSTALL,;t t
16206 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16207   rm -f $tmp/stdin
16208   if test x"$ac_file" != x-; then
16209     mv $tmp/out $ac_file
16210   else
16211     cat $tmp/out
16212     rm -f $tmp/out
16213   fi
16214
16215 done
16216 EOF
16217 cat >>$CONFIG_STATUS <<\EOF
16218
16219 #
16220 # CONFIG_HEADER section.
16221 #
16222
16223 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16224 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16225 #
16226 # ac_d sets the value in "#define NAME VALUE" lines.
16227 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16228 ac_dB='[        ].*$,\1#\2'
16229 ac_dC=' '
16230 ac_dD=',;t'
16231 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16232 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16233 ac_iB='\([      ]\),\1#\2define\3'
16234 ac_iC=' '
16235 ac_iD='\4,;t'
16236 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16237 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16238 ac_uB='$,\1#\2define\3'
16239 ac_uC=' '
16240 ac_uD=',;t'
16241
16242 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16243   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16244   case $ac_file in
16245   - | *:- | *:-:* ) # input from stdin
16246         cat >$tmp/stdin
16247         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16248         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16249   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16250         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16251   * )   ac_file_in=$ac_file.in ;;
16252   esac
16253
16254   test x"$ac_file" != x- && { echo "$as_me:16254: creating $ac_file" >&5
16255 echo "$as_me: creating $ac_file" >&6;}
16256
16257   # First look for the input files in the build tree, otherwise in the
16258   # src tree.
16259   ac_file_inputs=`IFS=:
16260     for f in $ac_file_in; do
16261       case $f in
16262       -) echo $tmp/stdin ;;
16263       [\\/$]*)
16264          # Absolute (can't be DOS-style, as IFS=:)
16265          test -f "$f" || { { echo "$as_me:16265: error: cannot find input file: $f" >&5
16266 echo "$as_me: error: cannot find input file: $f" >&2;}
16267    { (exit 1); exit 1; }; }
16268          echo $f;;
16269       *) # Relative
16270          if test -f "$f"; then
16271            # Build tree
16272            echo $f
16273          elif test -f "$srcdir/$f"; then
16274            # Source tree
16275            echo $srcdir/$f
16276          else
16277            # /dev/null tree
16278            { { echo "$as_me:16278: error: cannot find input file: $f" >&5
16279 echo "$as_me: error: cannot find input file: $f" >&2;}
16280    { (exit 1); exit 1; }; }
16281          fi;;
16282       esac
16283     done` || { (exit 1); exit 1; }
16284   # Remove the trailing spaces.
16285   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
16286
16287 EOF
16288
16289 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
16290 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
16291 # be either 'cat' or 'sort'.
16292 cat confdefs.h | uniq >conftest.vals
16293
16294 # Break up conftest.vals because some shells have a limit on
16295 # the size of here documents, and old seds have small limits too.
16296
16297 rm -f conftest.tail
16298 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
16299 while grep . conftest.vals >/dev/null
16300 do
16301   # Write chunks of a limited-size here document to conftest.frag.
16302   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16303   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16304   echo 'CEOF' >> $CONFIG_STATUS
16305   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16306   rm -f conftest.vals
16307   mv conftest.tail conftest.vals
16308 done
16309 rm -f conftest.vals
16310
16311 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16312 # marker @DEFS@.
16313 echo '  cat >> conftest.edit <<CEOF
16314 /@DEFS@/r conftest.frag
16315 /@DEFS@/d
16316 CEOF
16317 sed -f conftest.edit $tmp/in > $tmp/out
16318 rm -f $tmp/in
16319 mv $tmp/out $tmp/in
16320 rm -f conftest.edit conftest.frag
16321 ' >> $CONFIG_STATUS
16322
16323 cat >>$CONFIG_STATUS <<\EOF
16324   # Let's still pretend it is `configure' which instantiates (i.e., don't
16325   # use $as_me), people would be surprised to read:
16326   #    /* config.h.  Generated automatically by config.status.  */
16327   if test x"$ac_file" = x-; then
16328     echo "/* Generated automatically by configure.  */" >$tmp/config.h
16329   else
16330     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16331   fi
16332   cat $tmp/in >>$tmp/config.h
16333   rm -f $tmp/in
16334   if test x"$ac_file" != x-; then
16335     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16336       { echo "$as_me:16336: $ac_file is unchanged" >&5
16337 echo "$as_me: $ac_file is unchanged" >&6;}
16338     else
16339       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16340          X"$ac_file" : 'X\(//\)[^/]' \| \
16341          X"$ac_file" : 'X\(//\)$' \| \
16342          X"$ac_file" : 'X\(/\)' \| \
16343          .     : '\(.\)' 2>/dev/null ||
16344 echo X"$ac_file" |
16345     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16346           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16347           /^X\(\/\/\)$/{ s//\1/; q; }
16348           /^X\(\/\).*/{ s//\1/; q; }
16349           s/.*/./; q'`
16350       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16351         { case "$ac_dir" in
16352   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16353   *)                      as_incr_dir=.;;
16354 esac
16355 as_dummy="$ac_dir"
16356 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16357   case $as_mkdir_dir in
16358     # Skip DOS drivespec
16359     ?:) as_incr_dir=$as_mkdir_dir ;;
16360     *)
16361       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16362       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16363     ;;
16364   esac
16365 done; }
16366
16367       fi
16368       rm -f $ac_file
16369       mv $tmp/config.h $ac_file
16370     fi
16371   else
16372     cat $tmp/config.h
16373     rm -f $tmp/config.h
16374   fi
16375 done
16376 EOF
16377 cat >>$CONFIG_STATUS <<\EOF
16378
16379 #
16380 # CONFIG_COMMANDS section.
16381 #
16382 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16383   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16384   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16385
16386   case $ac_dest in
16387     default )
16388
16389 for cf_dir in test
16390 do
16391         if test ! -d $srcdir/$cf_dir; then
16392                 continue
16393         elif test -f $srcdir/$cf_dir/programs; then
16394                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16395         fi
16396 done
16397
16398         case $cf_cv_system_name in
16399         OS/2*)  LIB_PREFIX=''     ;;
16400         os2*)   LIB_PREFIX=''     ;;
16401         *)      LIB_PREFIX='lib'  ;;
16402         esac
16403 cf_prefix=$LIB_PREFIX
16404
16405 for cf_dir in $SRC_SUBDIRS
16406 do
16407         if test ! -d $srcdir/$cf_dir ; then
16408                 continue
16409         elif test -f $srcdir/$cf_dir/modules; then
16410
16411                 IMPORT_LIB=
16412                 SHARED_LIB=
16413                 LIBS_TO_MAKE=
16414                 for cf_item in $cf_LIST_MODELS
16415                 do
16416
16417         case $cf_item in
16418         libtool) cf_suffix='.la'  ;;
16419         normal)  cf_suffix='.a'   ;;
16420         debug)   cf_suffix='_g.a' ;;
16421         profile) cf_suffix='_p.a' ;;
16422         shared)
16423                 case $cf_cv_system_name in
16424                 cygwin*) cf_suffix='.dll' ;;
16425                 darwin*) cf_suffix='.dylib' ;;
16426                 hpux*)
16427                         case $target in
16428                         ia64*)  cf_suffix='.so' ;;
16429                         *)      cf_suffix='.sl' ;;
16430                         esac
16431                         ;;
16432                 *)      cf_suffix='.so'  ;;
16433                 esac
16434         esac
16435         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16436
16437                         if test $cf_item = shared ; then
16438                         if test "$cf_cv_do_symlinks" = yes ; then
16439                                 case "$cf_cv_shlib_version" in #(vi
16440                                 rel) #(vi
16441                                         case "$cf_cv_system_name" in #(vi
16442                                         darwin*)
16443                                         case .${LIB_SUFFIX} in
16444                                         .w*)
16445                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16446                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
16447                                                 ;;
16448                                         *)
16449                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
16450                                                 ;;
16451                                         esac
16452                                         ;; #(vi
16453                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
16454                                         esac
16455                                         ;;
16456                                 abi)
16457                                         case "$cf_cv_system_name" in #(vi
16458                                         darwin*)
16459                                         case .${LIB_SUFFIX} in
16460                                         .w*)
16461                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16462                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
16463                                                 ;;
16464                                         *)
16465                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
16466                                                 ;;
16467                                         esac
16468                                         ;; #(vi
16469                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
16470                                         esac
16471                                         ;;
16472                                 esac
16473                         fi
16474                         # cygwin needs import library, and has unique naming convention
16475                         # use autodetected ${cf_prefix} for import lib and static lib, but
16476                         # use 'cyg' prefix for shared lib.
16477                         if test $cf_cv_shlib_version = cygdll ; then
16478                                 SHARED_LIB="cyg${cf_dir}\${ABI_VERSION}.dll"
16479                                 IMPORT_LIB="${cf_prefix}${cf_dir}.dll.a"
16480                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/\${SHARED_LIB} ../lib/\${IMPORT_LIB}"
16481                                 continue
16482                         fi
16483                         fi
16484                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
16485                 done
16486
16487                 if test $cf_dir = ncurses ; then
16488                         cf_subsets="$LIB_SUBSETS"
16489                         cf_termlib=`echo "$cf_subsets" |sed -e 's/ .*$//'`
16490                         if test "$cf_termlib" != "$cf_subsets" ; then
16491                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
16492                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
16493                         fi
16494                 else
16495                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
16496                 fi
16497
16498                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
16499                     -e "s%@IMPORT_LIB@%$IMPORT_LIB%" \
16500                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
16501                         $cf_dir/Makefile >$cf_dir/Makefile.out
16502                 mv $cf_dir/Makefile.out $cf_dir/Makefile
16503
16504                 $AWK -f $srcdir/mk-0th.awk \
16505                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
16506                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16507
16508                 for cf_subset in $cf_subsets
16509                 do
16510                         cf_subdirs=
16511                         for cf_item in $cf_LIST_MODELS
16512                         do
16513                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
16514
16515 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16516
16517         case $cf_item in
16518         libtool) cf_suffix='.la'  ;;
16519         normal)  cf_suffix='.a'   ;;
16520         debug)   cf_suffix='_g.a' ;;
16521         profile) cf_suffix='_p.a' ;;
16522         shared)
16523                 case $cf_cv_system_name in
16524                 cygwin*) cf_suffix='.dll' ;;
16525                 darwin*) cf_suffix='.dylib' ;;
16526                 hpux*)
16527                         case $target in
16528                         ia64*)  cf_suffix='.so' ;;
16529                         *)      cf_suffix='.sl' ;;
16530                         esac
16531                         ;;
16532                 *)      cf_suffix='.so'  ;;
16533                 esac
16534         esac
16535         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16536
16537         case $cf_item in
16538         libtool) cf_subdir='obj_lo'  ;;
16539         normal)  cf_subdir='objects' ;;
16540         debug)   cf_subdir='obj_g' ;;
16541         profile) cf_subdir='obj_p' ;;
16542         shared)
16543                 case $cf_cv_system_name in #(vi
16544                 cygwin) #(vi
16545                         cf_subdir='objects' ;;
16546                 *)
16547                         cf_subdir='obj_s' ;;
16548                 esac
16549         esac
16550
16551                         # Test for case where we build libtinfo with a different name.
16552                         cf_libname=$cf_dir
16553                         if test $cf_dir = ncurses ; then
16554                                 case $cf_subset in
16555                                 *base*)
16556                                         ;;
16557                                 termlib*)
16558                                         cf_libname=$TINFO_LIB_SUFFIX
16559                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16560                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16561                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16562                                         fi
16563                                 ;;
16564                                 esac
16565                         fi
16566
16567                         # These dependencies really are for development, not
16568                         # builds, but they are useful in porting, too.
16569                         cf_depend="../include/ncurses_cfg.h"
16570                         if test "$srcdir" = "."; then
16571                                 cf_reldir="."
16572                         else
16573                                 cf_reldir="\${srcdir}"
16574                         fi
16575
16576                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
16577                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
16578                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
16579                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
16580                         fi
16581
16582                         cf_dir_suffix=
16583                         old_cf_suffix="$cf_suffix"
16584                         if test "$cf_cv_shlib_version_infix" = yes ; then
16585                         if test -n "$LIB_SUFFIX" ; then
16586                                 case $LIB_SUFFIX in
16587                                 w*)
16588                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
16589                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16590                                         cf_dir_suffix=w
16591                                         ;;
16592                                 esac
16593                         fi
16594                         fi
16595
16596                         $AWK -f $srcdir/mk-1st.awk \
16597                                 name=${cf_libname}${cf_dir_suffix} \
16598                                 traces=$LIB_TRACING \
16599                                 MODEL=$cf_ITEM \
16600                                 model=$cf_subdir \
16601                                 prefix=$cf_prefix \
16602                                 suffix=$cf_suffix \
16603                                 subset=$cf_subset \
16604                                 ShlibVer=$cf_cv_shlib_version \
16605                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
16606                                 DoLinks=$cf_cv_do_symlinks \
16607                                 rmSoLocs=$cf_cv_rm_so_locs \
16608                                 ldconfig="$LDCONFIG" \
16609                                 overwrite=$WITH_OVERWRITE \
16610                                 depend="$cf_depend" \
16611                                 host="$host" \
16612                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16613
16614                         cf_suffix="$old_cf_suffix"
16615
16616                         for cf_subdir2 in $cf_subdirs lib
16617                         do
16618                                 test $cf_subdir = $cf_subdir2 && break
16619                         done
16620                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
16621                         $AWK -f $srcdir/mk-2nd.awk \
16622                                 name=$cf_dir \
16623                                 traces=$LIB_TRACING \
16624                                 MODEL=$cf_ITEM \
16625                                 model=$cf_subdir \
16626                                 subset=$cf_subset \
16627                                 srcdir=$srcdir \
16628                                 echo=$WITH_ECHO \
16629                                 crenames=$cf_cv_prog_CC_c_o \
16630                                 cxxrenames=$cf_cv_prog_CXX_c_o \
16631                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16632                         cf_subdirs="$cf_subdirs $cf_subdir"
16633                         done
16634                 done
16635         fi
16636
16637         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
16638 done
16639
16640 for cf_dir in $SRC_SUBDIRS
16641 do
16642         if test ! -d $srcdir/$cf_dir ; then
16643                 continue
16644         fi
16645
16646         if test -f $cf_dir/Makefile ; then
16647                 case "$cf_dir" in
16648                 Ada95) #(vi
16649                         echo 'libs \' >> Makefile
16650                         echo 'install.libs \' >> Makefile
16651                         echo 'uninstall.libs ::' >> Makefile
16652                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
16653                         ;;
16654                 esac
16655         fi
16656
16657         if test -f $srcdir/$cf_dir/modules; then
16658                 echo >> Makefile
16659                 if test -f $srcdir/$cf_dir/headers; then
16660 cat >> Makefile <<CF_EOF
16661 install.includes \\
16662 uninstall.includes \\
16663 CF_EOF
16664                 fi
16665 if test "$cf_dir" != "c++" ; then
16666 echo 'lint \' >> Makefile
16667 fi
16668 cat >> Makefile <<CF_EOF
16669 libs \\
16670 lintlib \\
16671 install.libs \\
16672 uninstall.libs \\
16673 install.$cf_dir \\
16674 uninstall.$cf_dir ::
16675         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
16676 CF_EOF
16677         elif test -f $srcdir/$cf_dir/headers; then
16678 cat >> Makefile <<CF_EOF
16679
16680 libs \\
16681 install.libs \\
16682 uninstall.libs \\
16683 install.includes \\
16684 uninstall.includes ::
16685         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
16686 CF_EOF
16687 fi
16688 done
16689
16690 cat >> Makefile <<CF_EOF
16691
16692 install.libs uninstall.libs \\
16693 install.data uninstall.data ::
16694 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
16695
16696 install.man \\
16697 uninstall.man ::
16698         cd man && \${MAKE} \${CF_MFLAGS} \$@
16699
16700 distclean ::
16701         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
16702         rm -f headers.sh headers.sed
16703         rm -rf \${DIRS_TO_MAKE}
16704 CF_EOF
16705
16706 # Special case: tack's manpage lives in its own directory.
16707 if test -d tack ; then
16708 if test -f $srcdir/$tack.h; then
16709 cat >> Makefile <<CF_EOF
16710
16711 install.man \\
16712 uninstall.man ::
16713         cd tack && \${MAKE} \${CF_MFLAGS} \$@
16714 CF_EOF
16715 fi
16716 fi
16717
16718 rm -f headers.sed headers.sh
16719
16720 echo creating headers.sh
16721 cat >headers.sh <<CF_EOF
16722 #! /bin/sh
16723 # This shell script is generated by the 'configure' script.  It is invoked in a
16724 # subdirectory of the build tree.  It generates a sed-script in the parent
16725 # directory that is used to adjust includes for header files that reside in a
16726 # subdirectory of /usr/include, etc.
16727 PRG=""
16728 while test \$# != 3
16729 do
16730 PRG="\$PRG \$1"; shift
16731 done
16732 DST=\$1
16733 REF=\$2
16734 SRC=\$3
16735 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
16736 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
16737 echo installing \$SRC in \$DST
16738 CF_EOF
16739
16740 if test $WITH_CURSES_H = yes; then
16741         cat >>headers.sh <<CF_EOF
16742 case \$DST in
16743 /*/include/*)
16744         END=\`basename \$DST\`
16745         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
16746         do
16747                 NAME=\`basename \$i\`
16748                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
16749         done
16750         ;;
16751 *)
16752         echo "" >> \$TMPSED
16753         ;;
16754 esac
16755 CF_EOF
16756
16757 else
16758         cat >>headers.sh <<CF_EOF
16759 case \$DST in
16760 /*/include/*)
16761         END=\`basename \$DST\`
16762         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
16763         do
16764                 NAME=\`basename \$i\`
16765                 if test "\$NAME" = "curses.h"
16766                 then
16767                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
16768                         NAME=ncurses.h
16769                 fi
16770                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
16771         done
16772         ;;
16773 *)
16774         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
16775         ;;
16776 esac
16777 CF_EOF
16778 fi
16779 cat >>headers.sh <<CF_EOF
16780 rm -f \$TMPSRC
16781 sed -f \$TMPSED \$SRC > \$TMPSRC
16782 NAME=\`basename \$SRC\`
16783 CF_EOF
16784 if test $WITH_CURSES_H != yes; then
16785         cat >>headers.sh <<CF_EOF
16786 test "\$NAME" = "curses.h" && NAME=ncurses.h
16787 CF_EOF
16788 fi
16789 cat >>headers.sh <<CF_EOF
16790 # Just in case someone gzip'd manpages, remove the conflicting copy.
16791 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
16792
16793 eval \$PRG \$TMPSRC \$DST/\$NAME
16794 rm -f \$TMPSRC \$TMPSED
16795 CF_EOF
16796
16797 chmod 0755 headers.sh
16798
16799 for cf_dir in $SRC_SUBDIRS
16800 do
16801         if test ! -d $srcdir/$cf_dir ; then
16802                 continue
16803         fi
16804
16805         if test -f $srcdir/$cf_dir/headers; then
16806         cat >>$cf_dir/Makefile <<CF_EOF
16807 \${DESTDIR}\${includedir} :
16808         sh \${srcdir}/../mkinstalldirs \$@
16809
16810 install \\
16811 install.libs \\
16812 install.includes :: \${AUTO_SRC} \${DESTDIR}\${includedir} \\
16813 CF_EOF
16814                 j=""
16815                 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
16816                 do
16817                         test -n "$j" && echo "          $j \\" >>$cf_dir/Makefile
16818                         j=$i
16819                 done
16820
16821                 echo "          $j" >>$cf_dir/Makefile
16822
16823                 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
16824                 do
16825                         echo "  @ (cd \${DESTDIR}\${includedir} && rm -f `basename $i`) ; ../headers.sh \${INSTALL_DATA} \${DESTDIR}\${includedir} \${srcdir} $i" >>$cf_dir/Makefile
16826                         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
16827                 done
16828
16829         cat >>$cf_dir/Makefile <<CF_EOF
16830
16831 uninstall \\
16832 uninstall.libs \\
16833 uninstall.includes ::
16834 CF_EOF
16835                 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
16836                 do
16837                         i=`basename $i`
16838                         echo "  -@ (cd \${DESTDIR}\${includedir} && rm -f $i)" >>$cf_dir/Makefile
16839                         test $i = curses.h && echo "    -@ (cd \${DESTDIR}\${includedir} && rm -f ncurses.h)" >>$cf_dir/Makefile
16840                 done
16841         fi
16842
16843         if test -f $srcdir/$cf_dir/modules; then
16844                 if test "$cf_dir" != "c++" ; then
16845                         cat >>$cf_dir/Makefile <<"CF_EOF"
16846 depend : ${AUTO_SRC}
16847         makedepend -- ${CPPFLAGS} -- ${C_SRC}
16848
16849 # DO NOT DELETE THIS LINE -- make depend depends on it.
16850 CF_EOF
16851                 fi
16852         fi
16853 done
16854
16855  ;;
16856   esac
16857 done
16858 EOF
16859
16860 cat >>$CONFIG_STATUS <<\EOF
16861
16862 { (exit 0); exit 0; }
16863 EOF
16864 chmod +x $CONFIG_STATUS
16865 ac_clean_files=$ac_clean_files_save
16866
16867 # configure is writing to config.log, and then calls config.status.
16868 # config.status does its own redirection, appending to config.log.
16869 # Unfortunately, on DOS this fails, as config.log is still kept open
16870 # by configure, so config.status won't be able to write to it; its
16871 # output is simply discarded.  So we exec the FD to /dev/null,
16872 # effectively closing config.log, so it can be properly (re)opened and
16873 # appended to by config.status.  When coming back to configure, we
16874 # need to make the FD available again.
16875 if test "$no_create" != yes; then
16876   ac_cs_success=:
16877   exec 5>/dev/null
16878   $SHELL $CONFIG_STATUS || ac_cs_success=false
16879   exec 5>>config.log
16880   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16881   # would make configure fail if this is the last instruction.
16882   $ac_cs_success || { (exit 1); exit 1; }
16883 fi
16884 ${MAKE-make} preinstall