]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.6 - patch 20070120
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.389 .
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-ticlib           generate separate tic library
718   --with-gpm              use Alessandro Rubini's GPM library
719   --without-dlsym         do not use dlsym() to load GPM dynamically
720   --with-sysmouse         use sysmouse (FreeBSD console)
721   --enable-rpath          use rpath option when generating shared libraries
722   --with-shlib-version=X  Specify rel or abi version for shared libs
723 Fine-Tuning Your Configuration:
724   --disable-overwrite     leave out the link to -lcurses
725   --disable-database      do not use terminfo, only fallbacks/termcap
726   --with-database=XXX     specify terminfo source to install
727   --with-hashed-db        specify hashed-database library
728   --with-fallbacks=XXX    specify list of fallback terminal descriptions
729   --without-xterm-new     specify if xterm terminfo should be old version
730   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
731   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
732   --disable-big-core      assume machine has little memory
733   --enable-termcap        compile in termcap fallback support
734   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
735   --enable-getcap         fast termcap load, no xrefs to terminfo
736   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
737   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
738   --disable-root-environ  restrict environment when running as root
739   --enable-symlinks       make tic use symbolic links not hard links
740   --enable-broken_linker  compile with broken-linker support code
741   --enable-bsdpad         recognize BSD-style prefix padding
742   --enable-widec          compile with wide-char/UTF-8 code
743   --disable-lp64          allow chtype to be long (ignore _LP64)
744   --disable-largefile     omit support for large files
745   --disable-tparm-varargs compile tparm() without varargs interface
746   --with-bool=TYPE        override fallback type of bool variable
747   --with-caps=alt         compile with alternate Caps file
748   --with-chtype=TYPE      override type of chtype
749   --with-ospeed=TYPE      override type of ospeed variable
750   --with-mmask-t=TYPE     override type of mmask_t
751   --with-rcs-ids          compile-in RCS identifiers
752 Options to Specify How Manpages are Installed:
753   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
754                           optionally formatted/catonly, e.g., gzip,formatted
755   --with-manpage-renames  specify manpage-renaming
756   --with-manpage-aliases  specify manpage-aliases using .so
757   --with-manpage-symlinks specify manpage-aliases using symlinks
758   --with-manpage-tbl      specify manpage processing with tbl
759 Extensions:
760   --disable-ext-funcs     disable function-extensions
761   --enable-const          compile with extra/non-standard const
762   --enable-no-padding     compile with $NCURSES_NO_PADDING code
763   --enable-signed-char    compile with SIGWINCH handler
764   --enable-sigwinch       compile with SIGWINCH handler
765   --enable-tcap-names     compile with user-definable terminal capabilities
766 Development Code:
767   --without-develop       disable development options
768   --enable-hard-tabs      compile with hard-tabs code
769   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
770 Experimental Code:
771   --disable-assumed-color do not assume anything about default-colors
772   --disable-hashmap       compile without hashmap scrolling-optimization
773   --enable-colorfgbg      compile with $COLORFGBG code
774   --enable-ext-colors     compile for experimental 256-color support
775   --enable-ext-mouse      compile for experimental mouse-encoding
776   --enable-safe-sprintf   compile with experimental safe-sprintf code
777   --disable-scroll-hints  compile without scroll-hints code
778   --enable-wgetch-events  compile with experimental wgetch-events code
779 Testing/development Options:
780   --enable-echo           build: display "compiling" commands (default)
781   --enable-warnings       build: turn on GCC compiler warnings
782   --enable-assertions     test: turn on generation of assertion code
783   --with-dmalloc          test: use Gray Watson's dmalloc library
784   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
785   --with-valgrind         test: use valgrind
786   --disable-leaks         test: free permanent memory, analyze leaks
787   --enable-expanded       test: generate functions for certain macros
788   --disable-macros        test: use functions rather than macros
789   --with-trace            test: add trace() function to all models of ncurses
790 Ada95 Binding Options:
791   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
792   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
793   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
794
795 Some influential environment variables:
796   CC          C compiler command
797   CFLAGS      C compiler flags
798   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
799               nonstandard directory <lib dir>
800   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
801               headers in a nonstandard directory <include dir>
802   CPP         C preprocessor
803   CXX         C++ compiler command
804   CXXFLAGS    C++ compiler flags
805   CXXCPP      C++ preprocessor
806
807 Use these variables to override the choices made by `configure' or to help
808 it to find libraries and programs with nonstandard names/locations.
809
810 EOF
811 fi
812
813 if test "$ac_init_help" = "recursive"; then
814   # If there are subdirs, report their specific --help.
815   ac_popdir=`pwd`
816   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
817     cd $ac_subdir
818     # A "../" for each directory in /$ac_subdir.
819     ac_dots=`echo $ac_subdir |
820              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
821
822     case $srcdir in
823     .) # No --srcdir option.  We are building in place.
824       ac_sub_srcdir=$srcdir ;;
825     [\\/]* | ?:[\\/]* ) # Absolute path.
826       ac_sub_srcdir=$srcdir/$ac_subdir ;;
827     *) # Relative path.
828       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
829     esac
830
831     # Check for guested configure; otherwise get Cygnus style configure.
832     if test -f $ac_sub_srcdir/configure.gnu; then
833       echo
834       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
835     elif test -f $ac_sub_srcdir/configure; then
836       echo
837       $SHELL $ac_sub_srcdir/configure  --help=recursive
838     elif test -f $ac_sub_srcdir/configure.ac ||
839            test -f $ac_sub_srcdir/configure.in; then
840       echo
841       $ac_configure --help
842     else
843       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
844     fi
845     cd $ac_popdir
846   done
847 fi
848
849 test -n "$ac_init_help" && exit 0
850 if $ac_init_version; then
851   cat <<\EOF
852
853 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
854 Free Software Foundation, Inc.
855 This configure script is free software; the Free Software Foundation
856 gives unlimited permission to copy, distribute and modify it.
857 EOF
858   exit 0
859 fi
860 exec 5>config.log
861 cat >&5 <<EOF
862 This file contains any messages produced by compilers while
863 running configure, to aid debugging if configure makes a mistake.
864
865 It was created by $as_me, which was
866 generated by GNU Autoconf 2.52.20061216.  Invocation command line was
867
868   $ $0 $@
869
870 EOF
871 {
872 cat <<_ASUNAME
873 ## ---------- ##
874 ## Platform.  ##
875 ## ---------- ##
876
877 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
878 uname -m = `(uname -m) 2>/dev/null || echo unknown`
879 uname -r = `(uname -r) 2>/dev/null || echo unknown`
880 uname -s = `(uname -s) 2>/dev/null || echo unknown`
881 uname -v = `(uname -v) 2>/dev/null || echo unknown`
882
883 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
884 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
885
886 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
887 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
888 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
889 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
890 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
891 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
892 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
893
894 PATH = $PATH
895
896 _ASUNAME
897 } >&5
898
899 cat >&5 <<EOF
900 ## ------------ ##
901 ## Core tests.  ##
902 ## ------------ ##
903
904 EOF
905
906 # Keep a trace of the command line.
907 # Strip out --no-create and --no-recursion so they do not pile up.
908 # Also quote any args containing shell meta-characters.
909 ac_configure_args=
910 ac_sep=
911 for ac_arg
912 do
913   case $ac_arg in
914   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
915   | --no-cr | --no-c) ;;
916   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
917   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
918   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
919     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
920     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
921     ac_sep=" " ;;
922   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
923      ac_sep=" " ;;
924   esac
925   # Get rid of the leading space.
926 done
927
928 # When interrupted or exit'd, cleanup temporary files, and complete
929 # config.log.  We remove comments because anyway the quotes in there
930 # would cause problems or look ugly.
931 trap 'exit_status=$?
932   # Save into config.log some information that might help in debugging.
933   echo >&5
934   echo "## ----------------- ##" >&5
935   echo "## Cache variables.  ##" >&5
936   echo "## ----------------- ##" >&5
937   echo >&5
938   # The following way of writing the cache mishandles newlines in values,
939 {
940   (set) 2>&1 |
941     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
942     *ac_space=\ *)
943       sed -n \
944         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
945           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
946       ;;
947     *)
948       sed -n \
949         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
950       ;;
951     esac;
952 } >&5
953   sed "/^$/d" confdefs.h >conftest.log
954   if test -s conftest.log; then
955     echo >&5
956     echo "## ------------ ##" >&5
957     echo "## confdefs.h.  ##" >&5
958     echo "## ------------ ##" >&5
959     echo >&5
960     cat conftest.log >&5
961   fi
962   (echo; echo) >&5
963   test "$ac_signal" != 0 &&
964     echo "$as_me: caught signal $ac_signal" >&5
965   echo "$as_me: exit $exit_status" >&5
966   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
967     exit $exit_status
968      ' 0
969 for ac_signal in 1 2 13 15; do
970   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
971 done
972 ac_signal=0
973
974 # confdefs.h avoids OS command line length limits that DEFS can exceed.
975 rm -rf conftest* confdefs.h
976 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
977 echo >confdefs.h
978
979 # Let the site file select an alternate cache file if it wants to.
980 # Prefer explicitly selected file to automatically selected ones.
981 if test -z "$CONFIG_SITE"; then
982   if test "x$prefix" != xNONE; then
983     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
984   else
985     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
986   fi
987 fi
988 for ac_site_file in $CONFIG_SITE; do
989   if test -r "$ac_site_file"; then
990     { echo "$as_me:990: loading site script $ac_site_file" >&5
991 echo "$as_me: loading site script $ac_site_file" >&6;}
992     cat "$ac_site_file" >&5
993     . "$ac_site_file"
994   fi
995 done
996
997 if test -r "$cache_file"; then
998   # Some versions of bash will fail to source /dev/null (special
999   # files actually), so we avoid doing that.
1000   if test -f "$cache_file"; then
1001     { echo "$as_me:1001: loading cache $cache_file" >&5
1002 echo "$as_me: loading cache $cache_file" >&6;}
1003     case $cache_file in
1004       [\\/]* | ?:[\\/]* ) . $cache_file;;
1005       *)                      . ./$cache_file;;
1006     esac
1007   fi
1008 else
1009   { echo "$as_me:1009: creating cache $cache_file" >&5
1010 echo "$as_me: creating cache $cache_file" >&6;}
1011   >$cache_file
1012 fi
1013
1014 # Check that the precious variables saved in the cache have kept the same
1015 # value.
1016 ac_cache_corrupted=false
1017 for ac_var in `(set) 2>&1 |
1018                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1019   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1020   eval ac_new_set=\$ac_env_${ac_var}_set
1021   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1022   eval ac_new_val="\$ac_env_${ac_var}_value"
1023   case $ac_old_set,$ac_new_set in
1024     set,)
1025       { echo "$as_me:1025: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1026 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1027       ac_cache_corrupted=: ;;
1028     ,set)
1029       { echo "$as_me:1029: error: \`$ac_var' was not set in the previous run" >&5
1030 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1031       ac_cache_corrupted=: ;;
1032     ,);;
1033     *)
1034       if test "x$ac_old_val" != "x$ac_new_val"; then
1035         { echo "$as_me:1035: error: \`$ac_var' has changed since the previous run:" >&5
1036 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1037         { echo "$as_me:1037:   former value:  $ac_old_val" >&5
1038 echo "$as_me:   former value:  $ac_old_val" >&2;}
1039         { echo "$as_me:1039:   current value: $ac_new_val" >&5
1040 echo "$as_me:   current value: $ac_new_val" >&2;}
1041         ac_cache_corrupted=:
1042       fi;;
1043   esac
1044   # Pass precious variables to config.status.  It doesn't matter if
1045   # we pass some twice (in addition to the command line arguments).
1046   if test "$ac_new_set" = set; then
1047     case $ac_new_val in
1048     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1049       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1050       ac_configure_args="$ac_configure_args '$ac_arg'"
1051       ;;
1052     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1053        ;;
1054     esac
1055   fi
1056 done
1057 if $ac_cache_corrupted; then
1058   { echo "$as_me:1058: error: changes in the environment can compromise the build" >&5
1059 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1060   { { echo "$as_me:1060: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1061 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1062    { (exit 1); exit 1; }; }
1063 fi
1064
1065 ac_ext=c
1066 ac_cpp='$CPP $CPPFLAGS'
1067 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1068 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1069 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1070 ac_main_return=return
1071
1072 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1073   *c*,-n*) ECHO_N= ECHO_C='
1074 ' ECHO_T='      ' ;;
1075   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1076   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1077 esac
1078 echo "#! $SHELL" >conftest.sh
1079 echo  "exit 0"   >>conftest.sh
1080 chmod +x conftest.sh
1081 if { (echo "$as_me:1081: PATH=\".;.\"; conftest.sh") >&5
1082   (PATH=".;."; conftest.sh) 2>&5
1083   ac_status=$?
1084   echo "$as_me:1084: \$? = $ac_status" >&5
1085   (exit $ac_status); }; then
1086   ac_path_separator=';'
1087 else
1088   ac_path_separator=:
1089 fi
1090 PATH_SEPARATOR="$ac_path_separator"
1091 rm -f conftest.sh
1092
1093 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1094
1095 top_builddir=`pwd`
1096
1097 echo "$as_me:1097: checking for egrep" >&5
1098 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1099 if test "${ac_cv_prog_egrep+set}" = set; then
1100   echo $ECHO_N "(cached) $ECHO_C" >&6
1101 else
1102   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1103     then ac_cv_prog_egrep='grep -E'
1104     else ac_cv_prog_egrep='egrep'
1105     fi
1106 fi
1107 echo "$as_me:1107: result: $ac_cv_prog_egrep" >&5
1108 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1109  EGREP=$ac_cv_prog_egrep
1110
1111 test -z "$EGREP" && { { echo "$as_me:1111: error: No egrep program found" >&5
1112 echo "$as_me: error: No egrep program found" >&2;}
1113    { (exit 1); exit 1; }; }
1114
1115 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1116 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1117 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1118 cf_cv_abi_version=${NCURSES_MAJOR}
1119 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1120 cf_cv_timestamp=`date`
1121 echo "$as_me:1121: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1122 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1123
1124 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1125
1126 # Check whether --with-rel-version or --without-rel-version was given.
1127 if test "${with_rel_version+set}" = set; then
1128   withval="$with_rel_version"
1129   { echo "$as_me:1129: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1130 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1131  cf_cv_rel_version=$withval
1132 fi;
1133
1134  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1135  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1136
1137 if test -n "$NCURSES_MAJOR" ; then
1138   case $NCURSES_MAJOR in #(vi
1139   [0-9]*) #(vi
1140         ;;
1141   *)
1142         { { echo "$as_me:1142: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1143 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1144    { (exit 1); exit 1; }; }
1145         ;;
1146   esac
1147 else
1148   { { echo "$as_me:1148: error: Release major-version value is empty" >&5
1149 echo "$as_me: error: Release major-version value is empty" >&2;}
1150    { (exit 1); exit 1; }; }
1151 fi
1152
1153 if test -n "$NCURSES_MINOR" ; then
1154   case $NCURSES_MINOR in #(vi
1155   [0-9]*) #(vi
1156         ;;
1157   *)
1158         { { echo "$as_me:1158: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1159 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1160    { (exit 1); exit 1; }; }
1161         ;;
1162   esac
1163 else
1164   { { echo "$as_me:1164: error: Release minor-version value is empty" >&5
1165 echo "$as_me: error: Release minor-version value is empty" >&2;}
1166    { (exit 1); exit 1; }; }
1167 fi
1168
1169 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1170
1171 # Check whether --with-abi-version or --without-abi-version was given.
1172 if test "${with_abi_version+set}" = set; then
1173   withval="$with_abi_version"
1174   { echo "$as_me:1174: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1175 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1176  cf_cv_abi_version=$withval
1177 fi;
1178
1179 if test -n "$cf_cv_abi_version" ; then
1180   case $cf_cv_abi_version in #(vi
1181   [0-9]*) #(vi
1182         ;;
1183   *)
1184         { { echo "$as_me:1184: error: ABI version is not a number: $cf_cv_abi_version" >&5
1185 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1186    { (exit 1); exit 1; }; }
1187         ;;
1188   esac
1189 else
1190   { { echo "$as_me:1190: error: ABI version value is empty" >&5
1191 echo "$as_me: error: ABI version value is empty" >&2;}
1192    { (exit 1); exit 1; }; }
1193 fi
1194
1195 ac_aux_dir=
1196 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1197   if test -f $ac_dir/install-sh; then
1198     ac_aux_dir=$ac_dir
1199     ac_install_sh="$ac_aux_dir/install-sh -c"
1200     break
1201   elif test -f $ac_dir/install.sh; then
1202     ac_aux_dir=$ac_dir
1203     ac_install_sh="$ac_aux_dir/install.sh -c"
1204     break
1205   elif test -f $ac_dir/shtool; then
1206     ac_aux_dir=$ac_dir
1207     ac_install_sh="$ac_aux_dir/shtool install -c"
1208     break
1209   fi
1210 done
1211 if test -z "$ac_aux_dir"; then
1212   { { echo "$as_me:1212: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1213 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1214    { (exit 1); exit 1; }; }
1215 fi
1216 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1217 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1218 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1219
1220 # Make sure we can run config.sub.
1221 $ac_config_sub sun4 >/dev/null 2>&1 ||
1222   { { echo "$as_me:1222: error: cannot run $ac_config_sub" >&5
1223 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1224    { (exit 1); exit 1; }; }
1225
1226 echo "$as_me:1226: checking build system type" >&5
1227 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1228 if test "${ac_cv_build+set}" = set; then
1229   echo $ECHO_N "(cached) $ECHO_C" >&6
1230 else
1231   ac_cv_build_alias=$build_alias
1232 test -z "$ac_cv_build_alias" &&
1233   ac_cv_build_alias=`$ac_config_guess`
1234 test -z "$ac_cv_build_alias" &&
1235   { { echo "$as_me:1235: error: cannot guess build type; you must specify one" >&5
1236 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1237    { (exit 1); exit 1; }; }
1238 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1239   { { echo "$as_me:1239: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1240 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1241    { (exit 1); exit 1; }; }
1242
1243 fi
1244 echo "$as_me:1244: result: $ac_cv_build" >&5
1245 echo "${ECHO_T}$ac_cv_build" >&6
1246 build=$ac_cv_build
1247 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1248 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1249 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1250
1251 echo "$as_me:1251: checking host system type" >&5
1252 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1253 if test "${ac_cv_host+set}" = set; then
1254   echo $ECHO_N "(cached) $ECHO_C" >&6
1255 else
1256   ac_cv_host_alias=$host_alias
1257 test -z "$ac_cv_host_alias" &&
1258   ac_cv_host_alias=$ac_cv_build_alias
1259 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1260   { { echo "$as_me:1260: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1261 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1262    { (exit 1); exit 1; }; }
1263
1264 fi
1265 echo "$as_me:1265: result: $ac_cv_host" >&5
1266 echo "${ECHO_T}$ac_cv_host" >&6
1267 host=$ac_cv_host
1268 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1269 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1270 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1271
1272 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1273         echo "$as_me:1273: checking target system type" >&5
1274 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1275 if test "${ac_cv_target+set}" = set; then
1276   echo $ECHO_N "(cached) $ECHO_C" >&6
1277 else
1278   ac_cv_target_alias=$target_alias
1279 test "x$ac_cv_target_alias" = "x" &&
1280   ac_cv_target_alias=$ac_cv_host_alias
1281 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1282   { { echo "$as_me:1282: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1283 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1284    { (exit 1); exit 1; }; }
1285
1286 fi
1287 echo "$as_me:1287: result: $ac_cv_target" >&5
1288 echo "${ECHO_T}$ac_cv_target" >&6
1289 target=$ac_cv_target
1290 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1291 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1292 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1293
1294 # The aliases save the names the user supplied, while $host etc.
1295 # will get canonicalized.
1296 test -n "$target_alias" &&
1297   test "$program_prefix$program_suffix$program_transform_name" = \
1298     NONENONEs,x,x, &&
1299   program_prefix=${target_alias}-
1300         system_name="$host_os"
1301 else
1302         system_name="`(uname -s -r) 2>/dev/null`"
1303         if test -z "$system_name" ; then
1304                 system_name="`(hostname) 2>/dev/null`"
1305         fi
1306 fi
1307 test -n "$system_name" && cat >>confdefs.h <<EOF
1308 #define SYSTEM_NAME "$system_name"
1309 EOF
1310
1311 if test "${cf_cv_system_name+set}" = set; then
1312   echo $ECHO_N "(cached) $ECHO_C" >&6
1313 else
1314   cf_cv_system_name="$system_name"
1315 fi
1316
1317 test -z "$system_name" && system_name="$cf_cv_system_name"
1318 test -n "$cf_cv_system_name" && echo "$as_me:1318: result: Configuring for $cf_cv_system_name" >&5
1319 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1320
1321 if test ".$system_name" != ".$cf_cv_system_name" ; then
1322         echo "$as_me:1322: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1323 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1324         { { echo "$as_me:1324: error: \"Please remove config.cache and try again.\"" >&5
1325 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1326    { (exit 1); exit 1; }; }
1327 fi
1328
1329 # Check whether --with-system-type or --without-system-type was given.
1330 if test "${with_system_type+set}" = set; then
1331   withval="$with_system_type"
1332   { echo "$as_me:1332: WARNING: overriding system type to $withval" >&5
1333 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1334  cf_cv_system_name=$withval
1335 fi;
1336
1337 ###     Save the given $CFLAGS to allow user-override.
1338 cf_user_CFLAGS="$CFLAGS"
1339
1340 ###     Default install-location
1341
1342 echo "$as_me:1342: checking for prefix" >&5
1343 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1344 if test "x$prefix" = "xNONE" ; then
1345         case "$cf_cv_system_name" in
1346                 # non-vendor systems don't have a conflict
1347         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1348                 prefix=/usr
1349                 ;;
1350         *)      prefix=$ac_default_prefix
1351                 ;;
1352         esac
1353 fi
1354 echo "$as_me:1354: result: $prefix" >&5
1355 echo "${ECHO_T}$prefix" >&6
1356
1357 if test "x$prefix" = "xNONE" ; then
1358 echo "$as_me:1358: checking for default include-directory" >&5
1359 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1360 test -n "$verbose" && echo 1>&6
1361 for cf_symbol in \
1362         $includedir \
1363         $includedir/ncurses \
1364         $prefix/include \
1365         $prefix/include/ncurses \
1366         /usr/local/include \
1367         /usr/local/include/ncurses \
1368         /usr/include \
1369         /usr/include/ncurses
1370 do
1371         cf_dir=`eval echo $cf_symbol`
1372         if test -f $cf_dir/curses.h ; then
1373         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1374                 includedir="$cf_symbol"
1375                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1376                 break
1377         fi
1378         fi
1379         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1380 done
1381 echo "$as_me:1381: result: $includedir" >&5
1382 echo "${ECHO_T}$includedir" >&6
1383 fi
1384
1385 ###     Checks for programs.
1386 ac_ext=c
1387 ac_cpp='$CPP $CPPFLAGS'
1388 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1389 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1390 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1391 ac_main_return=return
1392 if test -n "$ac_tool_prefix"; then
1393   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1394 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1395 echo "$as_me:1395: checking for $ac_word" >&5
1396 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1397 if test "${ac_cv_prog_CC+set}" = set; then
1398   echo $ECHO_N "(cached) $ECHO_C" >&6
1399 else
1400   if test -n "$CC"; then
1401   ac_cv_prog_CC="$CC" # Let the user override the test.
1402 else
1403   ac_save_IFS=$IFS; IFS=$ac_path_separator
1404 ac_dummy="$PATH"
1405 for ac_dir in $ac_dummy; do
1406   IFS=$ac_save_IFS
1407   test -z "$ac_dir" && ac_dir=.
1408   $as_executable_p "$ac_dir/$ac_word" || continue
1409 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1410 echo "$as_me:1410: found $ac_dir/$ac_word" >&5
1411 break
1412 done
1413
1414 fi
1415 fi
1416 CC=$ac_cv_prog_CC
1417 if test -n "$CC"; then
1418   echo "$as_me:1418: result: $CC" >&5
1419 echo "${ECHO_T}$CC" >&6
1420 else
1421   echo "$as_me:1421: result: no" >&5
1422 echo "${ECHO_T}no" >&6
1423 fi
1424
1425 fi
1426 if test -z "$ac_cv_prog_CC"; then
1427   ac_ct_CC=$CC
1428   # Extract the first word of "gcc", so it can be a program name with args.
1429 set dummy gcc; ac_word=$2
1430 echo "$as_me:1430: checking for $ac_word" >&5
1431 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1432 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1433   echo $ECHO_N "(cached) $ECHO_C" >&6
1434 else
1435   if test -n "$ac_ct_CC"; then
1436   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1437 else
1438   ac_save_IFS=$IFS; IFS=$ac_path_separator
1439 ac_dummy="$PATH"
1440 for ac_dir in $ac_dummy; do
1441   IFS=$ac_save_IFS
1442   test -z "$ac_dir" && ac_dir=.
1443   $as_executable_p "$ac_dir/$ac_word" || continue
1444 ac_cv_prog_ac_ct_CC="gcc"
1445 echo "$as_me:1445: found $ac_dir/$ac_word" >&5
1446 break
1447 done
1448
1449 fi
1450 fi
1451 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1452 if test -n "$ac_ct_CC"; then
1453   echo "$as_me:1453: result: $ac_ct_CC" >&5
1454 echo "${ECHO_T}$ac_ct_CC" >&6
1455 else
1456   echo "$as_me:1456: result: no" >&5
1457 echo "${ECHO_T}no" >&6
1458 fi
1459
1460   CC=$ac_ct_CC
1461 else
1462   CC="$ac_cv_prog_CC"
1463 fi
1464
1465 if test -z "$CC"; then
1466   if test -n "$ac_tool_prefix"; then
1467   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1468 set dummy ${ac_tool_prefix}cc; ac_word=$2
1469 echo "$as_me:1469: checking for $ac_word" >&5
1470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1471 if test "${ac_cv_prog_CC+set}" = set; then
1472   echo $ECHO_N "(cached) $ECHO_C" >&6
1473 else
1474   if test -n "$CC"; then
1475   ac_cv_prog_CC="$CC" # Let the user override the test.
1476 else
1477   ac_save_IFS=$IFS; IFS=$ac_path_separator
1478 ac_dummy="$PATH"
1479 for ac_dir in $ac_dummy; do
1480   IFS=$ac_save_IFS
1481   test -z "$ac_dir" && ac_dir=.
1482   $as_executable_p "$ac_dir/$ac_word" || continue
1483 ac_cv_prog_CC="${ac_tool_prefix}cc"
1484 echo "$as_me:1484: found $ac_dir/$ac_word" >&5
1485 break
1486 done
1487
1488 fi
1489 fi
1490 CC=$ac_cv_prog_CC
1491 if test -n "$CC"; then
1492   echo "$as_me:1492: result: $CC" >&5
1493 echo "${ECHO_T}$CC" >&6
1494 else
1495   echo "$as_me:1495: result: no" >&5
1496 echo "${ECHO_T}no" >&6
1497 fi
1498
1499 fi
1500 if test -z "$ac_cv_prog_CC"; then
1501   ac_ct_CC=$CC
1502   # Extract the first word of "cc", so it can be a program name with args.
1503 set dummy cc; ac_word=$2
1504 echo "$as_me:1504: checking for $ac_word" >&5
1505 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1506 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1507   echo $ECHO_N "(cached) $ECHO_C" >&6
1508 else
1509   if test -n "$ac_ct_CC"; then
1510   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1511 else
1512   ac_save_IFS=$IFS; IFS=$ac_path_separator
1513 ac_dummy="$PATH"
1514 for ac_dir in $ac_dummy; do
1515   IFS=$ac_save_IFS
1516   test -z "$ac_dir" && ac_dir=.
1517   $as_executable_p "$ac_dir/$ac_word" || continue
1518 ac_cv_prog_ac_ct_CC="cc"
1519 echo "$as_me:1519: found $ac_dir/$ac_word" >&5
1520 break
1521 done
1522
1523 fi
1524 fi
1525 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1526 if test -n "$ac_ct_CC"; then
1527   echo "$as_me:1527: result: $ac_ct_CC" >&5
1528 echo "${ECHO_T}$ac_ct_CC" >&6
1529 else
1530   echo "$as_me:1530: result: no" >&5
1531 echo "${ECHO_T}no" >&6
1532 fi
1533
1534   CC=$ac_ct_CC
1535 else
1536   CC="$ac_cv_prog_CC"
1537 fi
1538
1539 fi
1540 if test -z "$CC"; then
1541   # Extract the first word of "cc", so it can be a program name with args.
1542 set dummy cc; ac_word=$2
1543 echo "$as_me:1543: checking for $ac_word" >&5
1544 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1545 if test "${ac_cv_prog_CC+set}" = set; then
1546   echo $ECHO_N "(cached) $ECHO_C" >&6
1547 else
1548   if test -n "$CC"; then
1549   ac_cv_prog_CC="$CC" # Let the user override the test.
1550 else
1551   ac_prog_rejected=no
1552   ac_save_IFS=$IFS; IFS=$ac_path_separator
1553 ac_dummy="$PATH"
1554 for ac_dir in $ac_dummy; do
1555   IFS=$ac_save_IFS
1556   test -z "$ac_dir" && ac_dir=.
1557   $as_executable_p "$ac_dir/$ac_word" || continue
1558 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1559   ac_prog_rejected=yes
1560   continue
1561 fi
1562 ac_cv_prog_CC="cc"
1563 echo "$as_me:1563: found $ac_dir/$ac_word" >&5
1564 break
1565 done
1566
1567 if test $ac_prog_rejected = yes; then
1568   # We found a bogon in the path, so make sure we never use it.
1569   set dummy $ac_cv_prog_CC
1570   shift
1571   if test $# != 0; then
1572     # We chose a different compiler from the bogus one.
1573     # However, it has the same basename, so the bogon will be chosen
1574     # first if we set CC to just the basename; use the full file name.
1575     shift
1576     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1577     shift
1578     ac_cv_prog_CC="$@"
1579   fi
1580 fi
1581 fi
1582 fi
1583 CC=$ac_cv_prog_CC
1584 if test -n "$CC"; then
1585   echo "$as_me:1585: result: $CC" >&5
1586 echo "${ECHO_T}$CC" >&6
1587 else
1588   echo "$as_me:1588: result: no" >&5
1589 echo "${ECHO_T}no" >&6
1590 fi
1591
1592 fi
1593 if test -z "$CC"; then
1594   if test -n "$ac_tool_prefix"; then
1595   for ac_prog in cl
1596   do
1597     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1598 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1599 echo "$as_me:1599: checking for $ac_word" >&5
1600 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1601 if test "${ac_cv_prog_CC+set}" = set; then
1602   echo $ECHO_N "(cached) $ECHO_C" >&6
1603 else
1604   if test -n "$CC"; then
1605   ac_cv_prog_CC="$CC" # Let the user override the test.
1606 else
1607   ac_save_IFS=$IFS; IFS=$ac_path_separator
1608 ac_dummy="$PATH"
1609 for ac_dir in $ac_dummy; do
1610   IFS=$ac_save_IFS
1611   test -z "$ac_dir" && ac_dir=.
1612   $as_executable_p "$ac_dir/$ac_word" || continue
1613 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1614 echo "$as_me:1614: found $ac_dir/$ac_word" >&5
1615 break
1616 done
1617
1618 fi
1619 fi
1620 CC=$ac_cv_prog_CC
1621 if test -n "$CC"; then
1622   echo "$as_me:1622: result: $CC" >&5
1623 echo "${ECHO_T}$CC" >&6
1624 else
1625   echo "$as_me:1625: result: no" >&5
1626 echo "${ECHO_T}no" >&6
1627 fi
1628
1629     test -n "$CC" && break
1630   done
1631 fi
1632 if test -z "$CC"; then
1633   ac_ct_CC=$CC
1634   for ac_prog in cl
1635 do
1636   # Extract the first word of "$ac_prog", so it can be a program name with args.
1637 set dummy $ac_prog; ac_word=$2
1638 echo "$as_me:1638: checking for $ac_word" >&5
1639 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1640 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1641   echo $ECHO_N "(cached) $ECHO_C" >&6
1642 else
1643   if test -n "$ac_ct_CC"; then
1644   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1645 else
1646   ac_save_IFS=$IFS; IFS=$ac_path_separator
1647 ac_dummy="$PATH"
1648 for ac_dir in $ac_dummy; do
1649   IFS=$ac_save_IFS
1650   test -z "$ac_dir" && ac_dir=.
1651   $as_executable_p "$ac_dir/$ac_word" || continue
1652 ac_cv_prog_ac_ct_CC="$ac_prog"
1653 echo "$as_me:1653: found $ac_dir/$ac_word" >&5
1654 break
1655 done
1656
1657 fi
1658 fi
1659 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1660 if test -n "$ac_ct_CC"; then
1661   echo "$as_me:1661: result: $ac_ct_CC" >&5
1662 echo "${ECHO_T}$ac_ct_CC" >&6
1663 else
1664   echo "$as_me:1664: result: no" >&5
1665 echo "${ECHO_T}no" >&6
1666 fi
1667
1668   test -n "$ac_ct_CC" && break
1669 done
1670
1671   CC=$ac_ct_CC
1672 fi
1673
1674 fi
1675
1676 test -z "$CC" && { { echo "$as_me:1676: error: no acceptable cc found in \$PATH" >&5
1677 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1678    { (exit 1); exit 1; }; }
1679
1680 # Provide some information about the compiler.
1681 echo "$as_me:1681:" \
1682      "checking for C compiler version" >&5
1683 ac_compiler=`set X $ac_compile; echo $2`
1684 { (eval echo "$as_me:1684: \"$ac_compiler --version </dev/null >&5\"") >&5
1685   (eval $ac_compiler --version </dev/null >&5) 2>&5
1686   ac_status=$?
1687   echo "$as_me:1687: \$? = $ac_status" >&5
1688   (exit $ac_status); }
1689 { (eval echo "$as_me:1689: \"$ac_compiler -v </dev/null >&5\"") >&5
1690   (eval $ac_compiler -v </dev/null >&5) 2>&5
1691   ac_status=$?
1692   echo "$as_me:1692: \$? = $ac_status" >&5
1693   (exit $ac_status); }
1694 { (eval echo "$as_me:1694: \"$ac_compiler -V </dev/null >&5\"") >&5
1695   (eval $ac_compiler -V </dev/null >&5) 2>&5
1696   ac_status=$?
1697   echo "$as_me:1697: \$? = $ac_status" >&5
1698   (exit $ac_status); }
1699
1700 cat >conftest.$ac_ext <<_ACEOF
1701 #line 1701 "configure"
1702 #include "confdefs.h"
1703
1704 int
1705 main ()
1706 {
1707
1708   ;
1709   return 0;
1710 }
1711 _ACEOF
1712 ac_clean_files_save=$ac_clean_files
1713 ac_clean_files="$ac_clean_files a.out a.exe"
1714 # Try to create an executable without -o first, disregard a.out.
1715 # It will help us diagnose broken compilers, and finding out an intuition
1716 # of exeext.
1717 echo "$as_me:1717: checking for C compiler default output" >&5
1718 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1719 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1720 if { (eval echo "$as_me:1720: \"$ac_link_default\"") >&5
1721   (eval $ac_link_default) 2>&5
1722   ac_status=$?
1723   echo "$as_me:1723: \$? = $ac_status" >&5
1724   (exit $ac_status); }; then
1725   # Find the output, starting from the most likely.  This scheme is
1726 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1727 # resort.
1728 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1729                 ls a.out conftest 2>/dev/null;
1730                 ls a.* conftest.* 2>/dev/null`; do
1731   case $ac_file in
1732     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1733     a.out ) # We found the default executable, but exeext='' is most
1734             # certainly right.
1735             break;;
1736     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1737           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1738           export ac_cv_exeext
1739           break;;
1740     * ) break;;
1741   esac
1742 done
1743 else
1744   echo "$as_me: failed program was:" >&5
1745 cat conftest.$ac_ext >&5
1746 { { echo "$as_me:1746: error: C compiler cannot create executables" >&5
1747 echo "$as_me: error: C compiler cannot create executables" >&2;}
1748    { (exit 77); exit 77; }; }
1749 fi
1750
1751 ac_exeext=$ac_cv_exeext
1752 echo "$as_me:1752: result: $ac_file" >&5
1753 echo "${ECHO_T}$ac_file" >&6
1754
1755 # Check the compiler produces executables we can run.  If not, either
1756 # the compiler is broken, or we cross compile.
1757 echo "$as_me:1757: checking whether the C compiler works" >&5
1758 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1759 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1760 # If not cross compiling, check that we can run a simple program.
1761 if test "$cross_compiling" != yes; then
1762   if { ac_try='./$ac_file'
1763   { (eval echo "$as_me:1763: \"$ac_try\"") >&5
1764   (eval $ac_try) 2>&5
1765   ac_status=$?
1766   echo "$as_me:1766: \$? = $ac_status" >&5
1767   (exit $ac_status); }; }; then
1768     cross_compiling=no
1769   else
1770     if test "$cross_compiling" = maybe; then
1771         cross_compiling=yes
1772     else
1773         { { echo "$as_me:1773: error: cannot run C compiled programs.
1774 If you meant to cross compile, use \`--host'." >&5
1775 echo "$as_me: error: cannot run C compiled programs.
1776 If you meant to cross compile, use \`--host'." >&2;}
1777    { (exit 1); exit 1; }; }
1778     fi
1779   fi
1780 fi
1781 echo "$as_me:1781: result: yes" >&5
1782 echo "${ECHO_T}yes" >&6
1783
1784 rm -f a.out a.exe conftest$ac_cv_exeext
1785 ac_clean_files=$ac_clean_files_save
1786 # Check the compiler produces executables we can run.  If not, either
1787 # the compiler is broken, or we cross compile.
1788 echo "$as_me:1788: checking whether we are cross compiling" >&5
1789 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1790 echo "$as_me:1790: result: $cross_compiling" >&5
1791 echo "${ECHO_T}$cross_compiling" >&6
1792
1793 echo "$as_me:1793: checking for executable suffix" >&5
1794 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1795 if { (eval echo "$as_me:1795: \"$ac_link\"") >&5
1796   (eval $ac_link) 2>&5
1797   ac_status=$?
1798   echo "$as_me:1798: \$? = $ac_status" >&5
1799   (exit $ac_status); }; then
1800   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1801 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1802 # work properly (i.e., refer to `conftest.exe'), while it won't with
1803 # `rm'.
1804 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1805   case $ac_file in
1806     *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1807     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1808           export ac_cv_exeext
1809           break;;
1810     * ) break;;
1811   esac
1812 done
1813 else
1814   { { echo "$as_me:1814: error: cannot compute EXEEXT: cannot compile and link" >&5
1815 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1816    { (exit 1); exit 1; }; }
1817 fi
1818
1819 rm -f conftest$ac_cv_exeext
1820 echo "$as_me:1820: result: $ac_cv_exeext" >&5
1821 echo "${ECHO_T}$ac_cv_exeext" >&6
1822
1823 rm -f conftest.$ac_ext
1824 EXEEXT=$ac_cv_exeext
1825 ac_exeext=$EXEEXT
1826 echo "$as_me:1826: checking for object suffix" >&5
1827 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1828 if test "${ac_cv_objext+set}" = set; then
1829   echo $ECHO_N "(cached) $ECHO_C" >&6
1830 else
1831   cat >conftest.$ac_ext <<_ACEOF
1832 #line 1832 "configure"
1833 #include "confdefs.h"
1834
1835 int
1836 main ()
1837 {
1838
1839   ;
1840   return 0;
1841 }
1842 _ACEOF
1843 rm -f conftest.o conftest.obj
1844 if { (eval echo "$as_me:1844: \"$ac_compile\"") >&5
1845   (eval $ac_compile) 2>&5
1846   ac_status=$?
1847   echo "$as_me:1847: \$? = $ac_status" >&5
1848   (exit $ac_status); }; then
1849   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1850   case $ac_file in
1851     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1852     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1853        break;;
1854   esac
1855 done
1856 else
1857   echo "$as_me: failed program was:" >&5
1858 cat conftest.$ac_ext >&5
1859 { { echo "$as_me:1859: error: cannot compute OBJEXT: cannot compile" >&5
1860 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1861    { (exit 1); exit 1; }; }
1862 fi
1863
1864 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1865 fi
1866 echo "$as_me:1866: result: $ac_cv_objext" >&5
1867 echo "${ECHO_T}$ac_cv_objext" >&6
1868 OBJEXT=$ac_cv_objext
1869 ac_objext=$OBJEXT
1870 echo "$as_me:1870: checking whether we are using the GNU C compiler" >&5
1871 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1872 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1873   echo $ECHO_N "(cached) $ECHO_C" >&6
1874 else
1875   cat >conftest.$ac_ext <<_ACEOF
1876 #line 1876 "configure"
1877 #include "confdefs.h"
1878
1879 int
1880 main ()
1881 {
1882 #ifndef __GNUC__
1883        choke me
1884 #endif
1885
1886   ;
1887   return 0;
1888 }
1889 _ACEOF
1890 rm -f conftest.$ac_objext
1891 if { (eval echo "$as_me:1891: \"$ac_compile\"") >&5
1892   (eval $ac_compile) 2>&5
1893   ac_status=$?
1894   echo "$as_me:1894: \$? = $ac_status" >&5
1895   (exit $ac_status); } &&
1896          { ac_try='test -s conftest.$ac_objext'
1897   { (eval echo "$as_me:1897: \"$ac_try\"") >&5
1898   (eval $ac_try) 2>&5
1899   ac_status=$?
1900   echo "$as_me:1900: \$? = $ac_status" >&5
1901   (exit $ac_status); }; }; then
1902   ac_compiler_gnu=yes
1903 else
1904   echo "$as_me: failed program was:" >&5
1905 cat conftest.$ac_ext >&5
1906 ac_compiler_gnu=no
1907 fi
1908 rm -f conftest.$ac_objext conftest.$ac_ext
1909 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1910
1911 fi
1912 echo "$as_me:1912: result: $ac_cv_c_compiler_gnu" >&5
1913 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1914 GCC=`test $ac_compiler_gnu = yes && echo yes`
1915 ac_test_CFLAGS=${CFLAGS+set}
1916 ac_save_CFLAGS=$CFLAGS
1917 CFLAGS="-g"
1918 echo "$as_me:1918: checking whether $CC accepts -g" >&5
1919 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1920 if test "${ac_cv_prog_cc_g+set}" = set; then
1921   echo $ECHO_N "(cached) $ECHO_C" >&6
1922 else
1923   cat >conftest.$ac_ext <<_ACEOF
1924 #line 1924 "configure"
1925 #include "confdefs.h"
1926
1927 int
1928 main ()
1929 {
1930
1931   ;
1932   return 0;
1933 }
1934 _ACEOF
1935 rm -f conftest.$ac_objext
1936 if { (eval echo "$as_me:1936: \"$ac_compile\"") >&5
1937   (eval $ac_compile) 2>&5
1938   ac_status=$?
1939   echo "$as_me:1939: \$? = $ac_status" >&5
1940   (exit $ac_status); } &&
1941          { ac_try='test -s conftest.$ac_objext'
1942   { (eval echo "$as_me:1942: \"$ac_try\"") >&5
1943   (eval $ac_try) 2>&5
1944   ac_status=$?
1945   echo "$as_me:1945: \$? = $ac_status" >&5
1946   (exit $ac_status); }; }; then
1947   ac_cv_prog_cc_g=yes
1948 else
1949   echo "$as_me: failed program was:" >&5
1950 cat conftest.$ac_ext >&5
1951 ac_cv_prog_cc_g=no
1952 fi
1953 rm -f conftest.$ac_objext conftest.$ac_ext
1954 fi
1955 echo "$as_me:1955: result: $ac_cv_prog_cc_g" >&5
1956 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1957 if test "$ac_test_CFLAGS" = set; then
1958   CFLAGS=$ac_save_CFLAGS
1959 elif test $ac_cv_prog_cc_g = yes; then
1960   if test "$GCC" = yes; then
1961     CFLAGS="-g -O2"
1962   else
1963     CFLAGS="-g"
1964   fi
1965 else
1966   if test "$GCC" = yes; then
1967     CFLAGS="-O2"
1968   else
1969     CFLAGS=
1970   fi
1971 fi
1972 # Some people use a C++ compiler to compile C.  Since we use `exit',
1973 # in C++ we need to declare it.  In case someone uses the same compiler
1974 # for both compiling C and C++ we need to have the C++ compiler decide
1975 # the declaration of exit, since it's the most demanding environment.
1976 cat >conftest.$ac_ext <<_ACEOF
1977 #ifndef __cplusplus
1978   choke me
1979 #endif
1980 _ACEOF
1981 rm -f conftest.$ac_objext
1982 if { (eval echo "$as_me:1982: \"$ac_compile\"") >&5
1983   (eval $ac_compile) 2>&5
1984   ac_status=$?
1985   echo "$as_me:1985: \$? = $ac_status" >&5
1986   (exit $ac_status); } &&
1987          { ac_try='test -s conftest.$ac_objext'
1988   { (eval echo "$as_me:1988: \"$ac_try\"") >&5
1989   (eval $ac_try) 2>&5
1990   ac_status=$?
1991   echo "$as_me:1991: \$? = $ac_status" >&5
1992   (exit $ac_status); }; }; then
1993   for ac_declaration in \
1994    ''\
1995    '#include <stdlib.h>' \
1996    'extern "C" void std::exit (int) throw (); using std::exit;' \
1997    'extern "C" void std::exit (int); using std::exit;' \
1998    'extern "C" void exit (int) throw ();' \
1999    'extern "C" void exit (int);' \
2000    'void exit (int);'
2001 do
2002   cat >conftest.$ac_ext <<_ACEOF
2003 #line 2003 "configure"
2004 #include "confdefs.h"
2005 #include <stdlib.h>
2006 $ac_declaration
2007 int
2008 main ()
2009 {
2010 exit (42);
2011   ;
2012   return 0;
2013 }
2014 _ACEOF
2015 rm -f conftest.$ac_objext
2016 if { (eval echo "$as_me:2016: \"$ac_compile\"") >&5
2017   (eval $ac_compile) 2>&5
2018   ac_status=$?
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit $ac_status); } &&
2021          { ac_try='test -s conftest.$ac_objext'
2022   { (eval echo "$as_me:2022: \"$ac_try\"") >&5
2023   (eval $ac_try) 2>&5
2024   ac_status=$?
2025   echo "$as_me:2025: \$? = $ac_status" >&5
2026   (exit $ac_status); }; }; then
2027   :
2028 else
2029   echo "$as_me: failed program was:" >&5
2030 cat conftest.$ac_ext >&5
2031 continue
2032 fi
2033 rm -f conftest.$ac_objext conftest.$ac_ext
2034   cat >conftest.$ac_ext <<_ACEOF
2035 #line 2035 "configure"
2036 #include "confdefs.h"
2037 $ac_declaration
2038 int
2039 main ()
2040 {
2041 exit (42);
2042   ;
2043   return 0;
2044 }
2045 _ACEOF
2046 rm -f conftest.$ac_objext
2047 if { (eval echo "$as_me:2047: \"$ac_compile\"") >&5
2048   (eval $ac_compile) 2>&5
2049   ac_status=$?
2050   echo "$as_me:2050: \$? = $ac_status" >&5
2051   (exit $ac_status); } &&
2052          { ac_try='test -s conftest.$ac_objext'
2053   { (eval echo "$as_me:2053: \"$ac_try\"") >&5
2054   (eval $ac_try) 2>&5
2055   ac_status=$?
2056   echo "$as_me:2056: \$? = $ac_status" >&5
2057   (exit $ac_status); }; }; then
2058   break
2059 else
2060   echo "$as_me: failed program was:" >&5
2061 cat conftest.$ac_ext >&5
2062 fi
2063 rm -f conftest.$ac_objext conftest.$ac_ext
2064 done
2065 rm -f conftest*
2066 if test -n "$ac_declaration"; then
2067   echo '#ifdef __cplusplus' >>confdefs.h
2068   echo $ac_declaration      >>confdefs.h
2069   echo '#endif'             >>confdefs.h
2070 fi
2071
2072 else
2073   echo "$as_me: failed program was:" >&5
2074 cat conftest.$ac_ext >&5
2075 fi
2076 rm -f conftest.$ac_objext conftest.$ac_ext
2077 ac_ext=c
2078 ac_cpp='$CPP $CPPFLAGS'
2079 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2080 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2081 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2082 ac_main_return=return
2083
2084 GCC_VERSION=none
2085 if test "$GCC" = yes ; then
2086         echo "$as_me:2086: checking version of $CC" >&5
2087 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2088         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2089         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2090         echo "$as_me:2090: result: $GCC_VERSION" >&5
2091 echo "${ECHO_T}$GCC_VERSION" >&6
2092 fi
2093
2094 ac_ext=c
2095 ac_cpp='$CPP $CPPFLAGS'
2096 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2097 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2098 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2099 ac_main_return=return
2100 echo "$as_me:2100: checking how to run the C preprocessor" >&5
2101 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2102 # On Suns, sometimes $CPP names a directory.
2103 if test -n "$CPP" && test -d "$CPP"; then
2104   CPP=
2105 fi
2106 if test -z "$CPP"; then
2107   if test "${ac_cv_prog_CPP+set}" = set; then
2108   echo $ECHO_N "(cached) $ECHO_C" >&6
2109 else
2110       # Double quotes because CPP needs to be expanded
2111     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2112     do
2113       ac_preproc_ok=false
2114 for ac_c_preproc_warn_flag in '' yes
2115 do
2116   # Use a header file that comes with gcc, so configuring glibc
2117   # with a fresh cross-compiler works.
2118   # On the NeXT, cc -E runs the code through the compiler's parser,
2119   # not just through cpp. "Syntax error" is here to catch this case.
2120   cat >conftest.$ac_ext <<_ACEOF
2121 #line 2121 "configure"
2122 #include "confdefs.h"
2123 #include <assert.h>
2124                      Syntax error
2125 _ACEOF
2126 if { (eval echo "$as_me:2126: \"$ac_cpp conftest.$ac_ext\"") >&5
2127   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2128   ac_status=$?
2129   egrep -v '^ *\+' conftest.er1 >conftest.err
2130   rm -f conftest.er1
2131   cat conftest.err >&5
2132   echo "$as_me:2132: \$? = $ac_status" >&5
2133   (exit $ac_status); } >/dev/null; then
2134   if test -s conftest.err; then
2135     ac_cpp_err=$ac_c_preproc_warn_flag
2136   else
2137     ac_cpp_err=
2138   fi
2139 else
2140   ac_cpp_err=yes
2141 fi
2142 if test -z "$ac_cpp_err"; then
2143   :
2144 else
2145   echo "$as_me: failed program was:" >&5
2146   cat conftest.$ac_ext >&5
2147   # Broken: fails on valid input.
2148 continue
2149 fi
2150 rm -f conftest.err conftest.$ac_ext
2151
2152   # OK, works on sane cases.  Now check whether non-existent headers
2153   # can be detected and how.
2154   cat >conftest.$ac_ext <<_ACEOF
2155 #line 2155 "configure"
2156 #include "confdefs.h"
2157 #include <ac_nonexistent.h>
2158 _ACEOF
2159 if { (eval echo "$as_me:2159: \"$ac_cpp conftest.$ac_ext\"") >&5
2160   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2161   ac_status=$?
2162   egrep -v '^ *\+' conftest.er1 >conftest.err
2163   rm -f conftest.er1
2164   cat conftest.err >&5
2165   echo "$as_me:2165: \$? = $ac_status" >&5
2166   (exit $ac_status); } >/dev/null; then
2167   if test -s conftest.err; then
2168     ac_cpp_err=$ac_c_preproc_warn_flag
2169   else
2170     ac_cpp_err=
2171   fi
2172 else
2173   ac_cpp_err=yes
2174 fi
2175 if test -z "$ac_cpp_err"; then
2176   # Broken: success on invalid input.
2177 continue
2178 else
2179   echo "$as_me: failed program was:" >&5
2180   cat conftest.$ac_ext >&5
2181   # Passes both tests.
2182 ac_preproc_ok=:
2183 break
2184 fi
2185 rm -f conftest.err conftest.$ac_ext
2186
2187 done
2188 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2189 rm -f conftest.err conftest.$ac_ext
2190 if $ac_preproc_ok; then
2191   break
2192 fi
2193
2194     done
2195     ac_cv_prog_CPP=$CPP
2196
2197 fi
2198   CPP=$ac_cv_prog_CPP
2199 else
2200   ac_cv_prog_CPP=$CPP
2201 fi
2202 echo "$as_me:2202: result: $CPP" >&5
2203 echo "${ECHO_T}$CPP" >&6
2204 ac_preproc_ok=false
2205 for ac_c_preproc_warn_flag in '' yes
2206 do
2207   # Use a header file that comes with gcc, so configuring glibc
2208   # with a fresh cross-compiler works.
2209   # On the NeXT, cc -E runs the code through the compiler's parser,
2210   # not just through cpp. "Syntax error" is here to catch this case.
2211   cat >conftest.$ac_ext <<_ACEOF
2212 #line 2212 "configure"
2213 #include "confdefs.h"
2214 #include <assert.h>
2215                      Syntax error
2216 _ACEOF
2217 if { (eval echo "$as_me:2217: \"$ac_cpp conftest.$ac_ext\"") >&5
2218   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2219   ac_status=$?
2220   egrep -v '^ *\+' conftest.er1 >conftest.err
2221   rm -f conftest.er1
2222   cat conftest.err >&5
2223   echo "$as_me:2223: \$? = $ac_status" >&5
2224   (exit $ac_status); } >/dev/null; then
2225   if test -s conftest.err; then
2226     ac_cpp_err=$ac_c_preproc_warn_flag
2227   else
2228     ac_cpp_err=
2229   fi
2230 else
2231   ac_cpp_err=yes
2232 fi
2233 if test -z "$ac_cpp_err"; then
2234   :
2235 else
2236   echo "$as_me: failed program was:" >&5
2237   cat conftest.$ac_ext >&5
2238   # Broken: fails on valid input.
2239 continue
2240 fi
2241 rm -f conftest.err conftest.$ac_ext
2242
2243   # OK, works on sane cases.  Now check whether non-existent headers
2244   # can be detected and how.
2245   cat >conftest.$ac_ext <<_ACEOF
2246 #line 2246 "configure"
2247 #include "confdefs.h"
2248 #include <ac_nonexistent.h>
2249 _ACEOF
2250 if { (eval echo "$as_me:2250: \"$ac_cpp conftest.$ac_ext\"") >&5
2251   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2252   ac_status=$?
2253   egrep -v '^ *\+' conftest.er1 >conftest.err
2254   rm -f conftest.er1
2255   cat conftest.err >&5
2256   echo "$as_me:2256: \$? = $ac_status" >&5
2257   (exit $ac_status); } >/dev/null; then
2258   if test -s conftest.err; then
2259     ac_cpp_err=$ac_c_preproc_warn_flag
2260   else
2261     ac_cpp_err=
2262   fi
2263 else
2264   ac_cpp_err=yes
2265 fi
2266 if test -z "$ac_cpp_err"; then
2267   # Broken: success on invalid input.
2268 continue
2269 else
2270   echo "$as_me: failed program was:" >&5
2271   cat conftest.$ac_ext >&5
2272   # Passes both tests.
2273 ac_preproc_ok=:
2274 break
2275 fi
2276 rm -f conftest.err conftest.$ac_ext
2277
2278 done
2279 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2280 rm -f conftest.err conftest.$ac_ext
2281 if $ac_preproc_ok; then
2282   :
2283 else
2284   { { echo "$as_me:2284: error: C preprocessor \"$CPP\" fails sanity check" >&5
2285 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2286    { (exit 1); exit 1; }; }
2287 fi
2288
2289 ac_ext=c
2290 ac_cpp='$CPP $CPPFLAGS'
2291 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2292 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2293 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2294 ac_main_return=return
2295
2296 if test $ac_cv_c_compiler_gnu = yes; then
2297     echo "$as_me:2297: checking whether $CC needs -traditional" >&5
2298 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2299 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2300   echo $ECHO_N "(cached) $ECHO_C" >&6
2301 else
2302     ac_pattern="Autoconf.*'x'"
2303   cat >conftest.$ac_ext <<_ACEOF
2304 #line 2304 "configure"
2305 #include "confdefs.h"
2306 #include <sgtty.h>
2307 int Autoconf = TIOCGETP;
2308 _ACEOF
2309 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2310   egrep "$ac_pattern" >/dev/null 2>&1; then
2311   ac_cv_prog_gcc_traditional=yes
2312 else
2313   ac_cv_prog_gcc_traditional=no
2314 fi
2315 rm -f conftest*
2316
2317   if test $ac_cv_prog_gcc_traditional = no; then
2318     cat >conftest.$ac_ext <<_ACEOF
2319 #line 2319 "configure"
2320 #include "confdefs.h"
2321 #include <termio.h>
2322 int Autoconf = TCGETA;
2323 _ACEOF
2324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2325   egrep "$ac_pattern" >/dev/null 2>&1; then
2326   ac_cv_prog_gcc_traditional=yes
2327 fi
2328 rm -f conftest*
2329
2330   fi
2331 fi
2332 echo "$as_me:2332: result: $ac_cv_prog_gcc_traditional" >&5
2333 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2334   if test $ac_cv_prog_gcc_traditional = yes; then
2335     CC="$CC -traditional"
2336   fi
2337 fi
2338
2339 echo "$as_me:2339: checking whether $CC understands -c and -o together" >&5
2340 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2341 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2342   echo $ECHO_N "(cached) $ECHO_C" >&6
2343 else
2344
2345 cat > conftest.$ac_ext <<CF_EOF
2346 #include <stdio.h>
2347 int main()
2348 {
2349         ${cf_cv_main_return:-return}(0);
2350 }
2351 CF_EOF
2352 # We do the test twice because some compilers refuse to overwrite an
2353 # existing .o file with -o, though they will create one.
2354 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2355 if { (eval echo "$as_me:2355: \"$ac_try\"") >&5
2356   (eval $ac_try) 2>&5
2357   ac_status=$?
2358   echo "$as_me:2358: \$? = $ac_status" >&5
2359   (exit $ac_status); } &&
2360   test -f conftest2.$ac_objext && { (eval echo "$as_me:2360: \"$ac_try\"") >&5
2361   (eval $ac_try) 2>&5
2362   ac_status=$?
2363   echo "$as_me:2363: \$? = $ac_status" >&5
2364   (exit $ac_status); };
2365 then
2366   eval cf_cv_prog_CC_c_o=yes
2367 else
2368   eval cf_cv_prog_CC_c_o=no
2369 fi
2370 rm -f conftest*
2371
2372 fi
2373 if test $cf_cv_prog_CC_c_o = yes; then
2374   echo "$as_me:2374: result: yes" >&5
2375 echo "${ECHO_T}yes" >&6
2376 else
2377   echo "$as_me:2377: result: no" >&5
2378 echo "${ECHO_T}no" >&6
2379 fi
2380
2381 echo "$as_me:2381: checking for POSIXized ISC" >&5
2382 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2383 if test -d /etc/conf/kconfig.d &&
2384    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2385 then
2386   echo "$as_me:2386: result: yes" >&5
2387 echo "${ECHO_T}yes" >&6
2388   ISC=yes # If later tests want to check for ISC.
2389
2390 cat >>confdefs.h <<\EOF
2391 #define _POSIX_SOURCE 1
2392 EOF
2393
2394   if test "$GCC" = yes; then
2395     CC="$CC -posix"
2396   else
2397     CC="$CC -Xp"
2398   fi
2399 else
2400   echo "$as_me:2400: result: no" >&5
2401 echo "${ECHO_T}no" >&6
2402   ISC=
2403 fi
2404
2405 echo "$as_me:2405: checking for ${CC-cc} option to accept ANSI C" >&5
2406 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2407 if test "${cf_cv_ansi_cc+set}" = set; then
2408   echo $ECHO_N "(cached) $ECHO_C" >&6
2409 else
2410
2411 cf_cv_ansi_cc=no
2412 cf_save_CFLAGS="$CFLAGS"
2413 cf_save_CPPFLAGS="$CPPFLAGS"
2414 # Don't try gcc -ansi; that turns off useful extensions and
2415 # breaks some systems' header files.
2416 # AIX                   -qlanglvl=ansi
2417 # Ultrix and OSF/1      -std1
2418 # HP-UX                 -Aa -D_HPUX_SOURCE
2419 # SVR4                  -Xc
2420 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2421 for cf_arg in "-DCC_HAS_PROTOS" \
2422         "" \
2423         -qlanglvl=ansi \
2424         -std1 \
2425         -Ae \
2426         "-Aa -D_HPUX_SOURCE" \
2427         -Xc
2428 do
2429
2430 cf_fix_cppflags=no
2431 cf_new_cflags=
2432 cf_new_cppflags=
2433 cf_new_extra_cppflags=
2434
2435 for cf_add_cflags in $cf_arg
2436 do
2437 case $cf_fix_cppflags in
2438 no)
2439         case $cf_add_cflags in #(vi
2440         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2441                 case $cf_add_cflags in
2442                 -D*)
2443                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2444
2445                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2446                         && test -z "${cf_tst_cflags}" \
2447                         && cf_fix_cppflags=yes
2448
2449                         if test $cf_fix_cppflags = yes ; then
2450                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2451                                 continue
2452                         elif test "${cf_tst_cflags}" = "\"'" ; then
2453                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2454                                 continue
2455                         fi
2456                         ;;
2457                 esac
2458                 case "$CPPFLAGS" in
2459                 *$cf_add_cflags) #(vi
2460                         ;;
2461                 *) #(vi
2462                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2463                         ;;
2464                 esac
2465                 ;;
2466         *)
2467                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2468                 ;;
2469         esac
2470         ;;
2471 yes)
2472         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2473
2474         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2475
2476         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2477         && test -z "${cf_tst_cflags}" \
2478         && cf_fix_cppflags=no
2479         ;;
2480 esac
2481 done
2482
2483 if test -n "$cf_new_cflags" ; then
2484
2485         CFLAGS="$CFLAGS $cf_new_cflags"
2486 fi
2487
2488 if test -n "$cf_new_cppflags" ; then
2489
2490         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2491 fi
2492
2493 if test -n "$cf_new_extra_cppflags" ; then
2494
2495         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2496 fi
2497
2498         cat >conftest.$ac_ext <<_ACEOF
2499 #line 2499 "configure"
2500 #include "confdefs.h"
2501
2502 #ifndef CC_HAS_PROTOS
2503 #if !defined(__STDC__) || (__STDC__ != 1)
2504 choke me
2505 #endif
2506 #endif
2507
2508 int
2509 main ()
2510 {
2511
2512         int test (int i, double x);
2513         struct s1 {int (*f) (int a);};
2514         struct s2 {int (*f) (double a);};
2515   ;
2516   return 0;
2517 }
2518 _ACEOF
2519 rm -f conftest.$ac_objext
2520 if { (eval echo "$as_me:2520: \"$ac_compile\"") >&5
2521   (eval $ac_compile) 2>&5
2522   ac_status=$?
2523   echo "$as_me:2523: \$? = $ac_status" >&5
2524   (exit $ac_status); } &&
2525          { ac_try='test -s conftest.$ac_objext'
2526   { (eval echo "$as_me:2526: \"$ac_try\"") >&5
2527   (eval $ac_try) 2>&5
2528   ac_status=$?
2529   echo "$as_me:2529: \$? = $ac_status" >&5
2530   (exit $ac_status); }; }; then
2531   cf_cv_ansi_cc="$cf_arg"; break
2532 else
2533   echo "$as_me: failed program was:" >&5
2534 cat conftest.$ac_ext >&5
2535 fi
2536 rm -f conftest.$ac_objext conftest.$ac_ext
2537 done
2538 CFLAGS="$cf_save_CFLAGS"
2539 CPPFLAGS="$cf_save_CPPFLAGS"
2540
2541 fi
2542 echo "$as_me:2542: result: $cf_cv_ansi_cc" >&5
2543 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2544
2545 if test "$cf_cv_ansi_cc" != "no"; then
2546 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2547
2548 cf_fix_cppflags=no
2549 cf_new_cflags=
2550 cf_new_cppflags=
2551 cf_new_extra_cppflags=
2552
2553 for cf_add_cflags in $cf_cv_ansi_cc
2554 do
2555 case $cf_fix_cppflags in
2556 no)
2557         case $cf_add_cflags in #(vi
2558         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2559                 case $cf_add_cflags in
2560                 -D*)
2561                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2562
2563                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2564                         && test -z "${cf_tst_cflags}" \
2565                         && cf_fix_cppflags=yes
2566
2567                         if test $cf_fix_cppflags = yes ; then
2568                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2569                                 continue
2570                         elif test "${cf_tst_cflags}" = "\"'" ; then
2571                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2572                                 continue
2573                         fi
2574                         ;;
2575                 esac
2576                 case "$CPPFLAGS" in
2577                 *$cf_add_cflags) #(vi
2578                         ;;
2579                 *) #(vi
2580                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2581                         ;;
2582                 esac
2583                 ;;
2584         *)
2585                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2586                 ;;
2587         esac
2588         ;;
2589 yes)
2590         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2591
2592         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2593
2594         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2595         && test -z "${cf_tst_cflags}" \
2596         && cf_fix_cppflags=no
2597         ;;
2598 esac
2599 done
2600
2601 if test -n "$cf_new_cflags" ; then
2602
2603         CFLAGS="$CFLAGS $cf_new_cflags"
2604 fi
2605
2606 if test -n "$cf_new_cppflags" ; then
2607
2608         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2609 fi
2610
2611 if test -n "$cf_new_extra_cppflags" ; then
2612
2613         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2614 fi
2615
2616 else
2617         cat >>confdefs.h <<\EOF
2618 #define CC_HAS_PROTOS 1
2619 EOF
2620
2621 fi
2622 fi
2623
2624 if test "$cf_cv_ansi_cc" = "no"; then
2625         { { echo "$as_me:2625: error: Your compiler does not appear to recognize prototypes.
2626 You have the following choices:
2627         a. adjust your compiler options
2628         b. get an up-to-date compiler
2629         c. use a wrapper such as unproto" >&5
2630 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2631 You have the following choices:
2632         a. adjust your compiler options
2633         b. get an up-to-date compiler
2634         c. use a wrapper such as unproto" >&2;}
2635    { (exit 1); exit 1; }; }
2636 fi
2637
2638 case $cf_cv_system_name in
2639 os2*)
2640     CFLAGS="$CFLAGS -Zmt"
2641     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2642     CXXFLAGS="$CXXFLAGS -Zmt"
2643     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2644     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2645     ac_cv_exeext=.exe
2646     ;;
2647 esac
2648
2649 PROG_EXT="$EXEEXT"
2650
2651 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2652 #define PROG_EXT "$PROG_EXT"
2653 EOF
2654
2655 if test "$cross_compiling" = yes ; then
2656   LDCONFIG=:
2657 else
2658 case "$cf_cv_system_name" in #(vi
2659 freebsd*) #(vi
2660   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2661   ;;
2662 *) LDPATH=$PATH:/sbin:/usr/sbin
2663   # Extract the first word of "ldconfig", so it can be a program name with args.
2664 set dummy ldconfig; ac_word=$2
2665 echo "$as_me:2665: checking for $ac_word" >&5
2666 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2667 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2668   echo $ECHO_N "(cached) $ECHO_C" >&6
2669 else
2670   case $LDCONFIG in
2671   [\\/]* | ?:[\\/]*)
2672   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2673   ;;
2674   *)
2675   ac_save_IFS=$IFS; IFS=$ac_path_separator
2676 ac_dummy="$LDPATH"
2677 for ac_dir in $ac_dummy; do
2678   IFS=$ac_save_IFS
2679   test -z "$ac_dir" && ac_dir=.
2680   if $as_executable_p "$ac_dir/$ac_word"; then
2681    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2682    echo "$as_me:2682: found $ac_dir/$ac_word" >&5
2683    break
2684 fi
2685 done
2686
2687   ;;
2688 esac
2689 fi
2690 LDCONFIG=$ac_cv_path_LDCONFIG
2691
2692 if test -n "$LDCONFIG"; then
2693   echo "$as_me:2693: result: $LDCONFIG" >&5
2694 echo "${ECHO_T}$LDCONFIG" >&6
2695 else
2696   echo "$as_me:2696: result: no" >&5
2697 echo "${ECHO_T}no" >&6
2698 fi
2699
2700   ;;
2701 esac
2702 fi
2703
2704 echo "$as_me:2704: checking if you want to ensure bool is consistent with C++" >&5
2705 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2706
2707 # Check whether --with-cxx or --without-cxx was given.
2708 if test "${with_cxx+set}" = set; then
2709   withval="$with_cxx"
2710   cf_with_cxx=$withval
2711 else
2712   cf_with_cxx=yes
2713 fi;
2714 echo "$as_me:2714: result: $cf_with_cxx" >&5
2715 echo "${ECHO_T}$cf_with_cxx" >&6
2716 if test "X$cf_with_cxx" = Xno ; then
2717         CXX=""
2718         GXX=""
2719 else
2720         # with autoconf 2.13, we can change the error to a warning:
2721                 ac_ext=cc
2722 ac_cpp='$CXXCPP $CPPFLAGS'
2723 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2724 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2725 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2726 ac_main_return=return
2727 if test -n "$ac_tool_prefix"; then
2728   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2729   do
2730     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2731 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2732 echo "$as_me:2732: checking for $ac_word" >&5
2733 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2734 if test "${ac_cv_prog_CXX+set}" = set; then
2735   echo $ECHO_N "(cached) $ECHO_C" >&6
2736 else
2737   if test -n "$CXX"; then
2738   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2739 else
2740   ac_save_IFS=$IFS; IFS=$ac_path_separator
2741 ac_dummy="$PATH"
2742 for ac_dir in $ac_dummy; do
2743   IFS=$ac_save_IFS
2744   test -z "$ac_dir" && ac_dir=.
2745   $as_executable_p "$ac_dir/$ac_word" || continue
2746 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2747 echo "$as_me:2747: found $ac_dir/$ac_word" >&5
2748 break
2749 done
2750
2751 fi
2752 fi
2753 CXX=$ac_cv_prog_CXX
2754 if test -n "$CXX"; then
2755   echo "$as_me:2755: result: $CXX" >&5
2756 echo "${ECHO_T}$CXX" >&6
2757 else
2758   echo "$as_me:2758: result: no" >&5
2759 echo "${ECHO_T}no" >&6
2760 fi
2761
2762     test -n "$CXX" && break
2763   done
2764 fi
2765 if test -z "$CXX"; then
2766   ac_ct_CXX=$CXX
2767   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2768 do
2769   # Extract the first word of "$ac_prog", so it can be a program name with args.
2770 set dummy $ac_prog; ac_word=$2
2771 echo "$as_me:2771: checking for $ac_word" >&5
2772 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2773 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2774   echo $ECHO_N "(cached) $ECHO_C" >&6
2775 else
2776   if test -n "$ac_ct_CXX"; then
2777   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2778 else
2779   ac_save_IFS=$IFS; IFS=$ac_path_separator
2780 ac_dummy="$PATH"
2781 for ac_dir in $ac_dummy; do
2782   IFS=$ac_save_IFS
2783   test -z "$ac_dir" && ac_dir=.
2784   $as_executable_p "$ac_dir/$ac_word" || continue
2785 ac_cv_prog_ac_ct_CXX="$ac_prog"
2786 echo "$as_me:2786: found $ac_dir/$ac_word" >&5
2787 break
2788 done
2789
2790 fi
2791 fi
2792 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2793 if test -n "$ac_ct_CXX"; then
2794   echo "$as_me:2794: result: $ac_ct_CXX" >&5
2795 echo "${ECHO_T}$ac_ct_CXX" >&6
2796 else
2797   echo "$as_me:2797: result: no" >&5
2798 echo "${ECHO_T}no" >&6
2799 fi
2800
2801   test -n "$ac_ct_CXX" && break
2802 done
2803 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2804
2805   CXX=$ac_ct_CXX
2806 fi
2807
2808 # Provide some information about the compiler.
2809 echo "$as_me:2809:" \
2810      "checking for C++ compiler version" >&5
2811 ac_compiler=`set X $ac_compile; echo $2`
2812 { (eval echo "$as_me:2812: \"$ac_compiler --version </dev/null >&5\"") >&5
2813   (eval $ac_compiler --version </dev/null >&5) 2>&5
2814   ac_status=$?
2815   echo "$as_me:2815: \$? = $ac_status" >&5
2816   (exit $ac_status); }
2817 { (eval echo "$as_me:2817: \"$ac_compiler -v </dev/null >&5\"") >&5
2818   (eval $ac_compiler -v </dev/null >&5) 2>&5
2819   ac_status=$?
2820   echo "$as_me:2820: \$? = $ac_status" >&5
2821   (exit $ac_status); }
2822 { (eval echo "$as_me:2822: \"$ac_compiler -V </dev/null >&5\"") >&5
2823   (eval $ac_compiler -V </dev/null >&5) 2>&5
2824   ac_status=$?
2825   echo "$as_me:2825: \$? = $ac_status" >&5
2826   (exit $ac_status); }
2827
2828 echo "$as_me:2828: checking whether we are using the GNU C++ compiler" >&5
2829 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2830 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2831   echo $ECHO_N "(cached) $ECHO_C" >&6
2832 else
2833   cat >conftest.$ac_ext <<_ACEOF
2834 #line 2834 "configure"
2835 #include "confdefs.h"
2836
2837 int
2838 main ()
2839 {
2840 #ifndef __GNUC__
2841        choke me
2842 #endif
2843
2844   ;
2845   return 0;
2846 }
2847 _ACEOF
2848 rm -f conftest.$ac_objext
2849 if { (eval echo "$as_me:2849: \"$ac_compile\"") >&5
2850   (eval $ac_compile) 2>&5
2851   ac_status=$?
2852   echo "$as_me:2852: \$? = $ac_status" >&5
2853   (exit $ac_status); } &&
2854          { ac_try='test -s conftest.$ac_objext'
2855   { (eval echo "$as_me:2855: \"$ac_try\"") >&5
2856   (eval $ac_try) 2>&5
2857   ac_status=$?
2858   echo "$as_me:2858: \$? = $ac_status" >&5
2859   (exit $ac_status); }; }; then
2860   ac_compiler_gnu=yes
2861 else
2862   echo "$as_me: failed program was:" >&5
2863 cat conftest.$ac_ext >&5
2864 ac_compiler_gnu=no
2865 fi
2866 rm -f conftest.$ac_objext conftest.$ac_ext
2867 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2868
2869 fi
2870 echo "$as_me:2870: result: $ac_cv_cxx_compiler_gnu" >&5
2871 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2872 GXX=`test $ac_compiler_gnu = yes && echo yes`
2873 ac_test_CXXFLAGS=${CXXFLAGS+set}
2874 ac_save_CXXFLAGS=$CXXFLAGS
2875 CXXFLAGS="-g"
2876 echo "$as_me:2876: checking whether $CXX accepts -g" >&5
2877 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2878 if test "${ac_cv_prog_cxx_g+set}" = set; then
2879   echo $ECHO_N "(cached) $ECHO_C" >&6
2880 else
2881   cat >conftest.$ac_ext <<_ACEOF
2882 #line 2882 "configure"
2883 #include "confdefs.h"
2884
2885 int
2886 main ()
2887 {
2888
2889   ;
2890   return 0;
2891 }
2892 _ACEOF
2893 rm -f conftest.$ac_objext
2894 if { (eval echo "$as_me:2894: \"$ac_compile\"") >&5
2895   (eval $ac_compile) 2>&5
2896   ac_status=$?
2897   echo "$as_me:2897: \$? = $ac_status" >&5
2898   (exit $ac_status); } &&
2899          { ac_try='test -s conftest.$ac_objext'
2900   { (eval echo "$as_me:2900: \"$ac_try\"") >&5
2901   (eval $ac_try) 2>&5
2902   ac_status=$?
2903   echo "$as_me:2903: \$? = $ac_status" >&5
2904   (exit $ac_status); }; }; then
2905   ac_cv_prog_cxx_g=yes
2906 else
2907   echo "$as_me: failed program was:" >&5
2908 cat conftest.$ac_ext >&5
2909 ac_cv_prog_cxx_g=no
2910 fi
2911 rm -f conftest.$ac_objext conftest.$ac_ext
2912 fi
2913 echo "$as_me:2913: result: $ac_cv_prog_cxx_g" >&5
2914 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2915 if test "$ac_test_CXXFLAGS" = set; then
2916   CXXFLAGS=$ac_save_CXXFLAGS
2917 elif test $ac_cv_prog_cxx_g = yes; then
2918   if test "$GXX" = yes; then
2919     CXXFLAGS="-g -O2"
2920   else
2921     CXXFLAGS="-g"
2922   fi
2923 else
2924   if test "$GXX" = yes; then
2925     CXXFLAGS="-O2"
2926   else
2927     CXXFLAGS=
2928   fi
2929 fi
2930 for ac_declaration in \
2931    ''\
2932    '#include <stdlib.h>' \
2933    'extern "C" void std::exit (int) throw (); using std::exit;' \
2934    'extern "C" void std::exit (int); using std::exit;' \
2935    'extern "C" void exit (int) throw ();' \
2936    'extern "C" void exit (int);' \
2937    'void exit (int);'
2938 do
2939   cat >conftest.$ac_ext <<_ACEOF
2940 #line 2940 "configure"
2941 #include "confdefs.h"
2942 #include <stdlib.h>
2943 $ac_declaration
2944 int
2945 main ()
2946 {
2947 exit (42);
2948   ;
2949   return 0;
2950 }
2951 _ACEOF
2952 rm -f conftest.$ac_objext
2953 if { (eval echo "$as_me:2953: \"$ac_compile\"") >&5
2954   (eval $ac_compile) 2>&5
2955   ac_status=$?
2956   echo "$as_me:2956: \$? = $ac_status" >&5
2957   (exit $ac_status); } &&
2958          { ac_try='test -s conftest.$ac_objext'
2959   { (eval echo "$as_me:2959: \"$ac_try\"") >&5
2960   (eval $ac_try) 2>&5
2961   ac_status=$?
2962   echo "$as_me:2962: \$? = $ac_status" >&5
2963   (exit $ac_status); }; }; then
2964   :
2965 else
2966   echo "$as_me: failed program was:" >&5
2967 cat conftest.$ac_ext >&5
2968 continue
2969 fi
2970 rm -f conftest.$ac_objext conftest.$ac_ext
2971   cat >conftest.$ac_ext <<_ACEOF
2972 #line 2972 "configure"
2973 #include "confdefs.h"
2974 $ac_declaration
2975 int
2976 main ()
2977 {
2978 exit (42);
2979   ;
2980   return 0;
2981 }
2982 _ACEOF
2983 rm -f conftest.$ac_objext
2984 if { (eval echo "$as_me:2984: \"$ac_compile\"") >&5
2985   (eval $ac_compile) 2>&5
2986   ac_status=$?
2987   echo "$as_me:2987: \$? = $ac_status" >&5
2988   (exit $ac_status); } &&
2989          { ac_try='test -s conftest.$ac_objext'
2990   { (eval echo "$as_me:2990: \"$ac_try\"") >&5
2991   (eval $ac_try) 2>&5
2992   ac_status=$?
2993   echo "$as_me:2993: \$? = $ac_status" >&5
2994   (exit $ac_status); }; }; then
2995   break
2996 else
2997   echo "$as_me: failed program was:" >&5
2998 cat conftest.$ac_ext >&5
2999 fi
3000 rm -f conftest.$ac_objext conftest.$ac_ext
3001 done
3002 rm -f conftest*
3003 if test -n "$ac_declaration"; then
3004   echo '#ifdef __cplusplus' >>confdefs.h
3005   echo $ac_declaration      >>confdefs.h
3006   echo '#endif'             >>confdefs.h
3007 fi
3008
3009 ac_ext=c
3010 ac_cpp='$CPP $CPPFLAGS'
3011 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3012 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3013 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3014 ac_main_return=return
3015
3016                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3017         if test "$CXX" = "g++" ; then
3018                 # Extract the first word of "g++", so it can be a program name with args.
3019 set dummy g++; ac_word=$2
3020 echo "$as_me:3020: checking for $ac_word" >&5
3021 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3022 if test "${ac_cv_path_CXX+set}" = set; then
3023   echo $ECHO_N "(cached) $ECHO_C" >&6
3024 else
3025   case $CXX in
3026   [\\/]* | ?:[\\/]*)
3027   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3028   ;;
3029   *)
3030   ac_save_IFS=$IFS; IFS=$ac_path_separator
3031 ac_dummy="$PATH"
3032 for ac_dir in $ac_dummy; do
3033   IFS=$ac_save_IFS
3034   test -z "$ac_dir" && ac_dir=.
3035   if $as_executable_p "$ac_dir/$ac_word"; then
3036    ac_cv_path_CXX="$ac_dir/$ac_word"
3037    echo "$as_me:3037: found $ac_dir/$ac_word" >&5
3038    break
3039 fi
3040 done
3041
3042   ;;
3043 esac
3044 fi
3045 CXX=$ac_cv_path_CXX
3046
3047 if test -n "$CXX"; then
3048   echo "$as_me:3048: result: $CXX" >&5
3049 echo "${ECHO_T}$CXX" >&6
3050 else
3051   echo "$as_me:3051: result: no" >&5
3052 echo "${ECHO_T}no" >&6
3053 fi
3054
3055         fi
3056         if test "$CXX" = "g++" ; then
3057                 { echo "$as_me:3057: WARNING: ignoring hardcoded g++" >&5
3058 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3059                 cf_with_cxx=no; CXX=""; GXX="";
3060         fi
3061 fi
3062
3063 GXX_VERSION=none
3064 if test "$GXX" = yes; then
3065         echo "$as_me:3065: checking version of g++" >&5
3066 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3067         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3068         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3069         echo "$as_me:3069: result: $GXX_VERSION" >&5
3070 echo "${ECHO_T}$GXX_VERSION" >&6
3071 fi
3072
3073 case $GXX_VERSION in
3074 1*|2.[0-6]*)
3075         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3076         # cf_cxx_library=no
3077         { echo "$as_me:3077: WARNING: templates do not work" >&5
3078 echo "$as_me: WARNING: templates do not work" >&2;}
3079         ;;
3080 esac
3081
3082 echo "$as_me:3082: checking if you want to build C++ binding and demo" >&5
3083 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3084
3085 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3086 if test "${with_cxx_binding+set}" = set; then
3087   withval="$with_cxx_binding"
3088   cf_with_cxx_binding=$withval
3089 else
3090   cf_with_cxx_binding=$cf_with_cxx
3091 fi;
3092 echo "$as_me:3092: result: $cf_with_cxx_binding" >&5
3093 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3094
3095 echo "$as_me:3095: checking if you want to build with Ada95" >&5
3096 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3097
3098 # Check whether --with-ada or --without-ada was given.
3099 if test "${with_ada+set}" = set; then
3100   withval="$with_ada"
3101   cf_with_ada=$withval
3102 else
3103   cf_with_ada=yes
3104 fi;
3105 echo "$as_me:3105: result: $cf_with_ada" >&5
3106 echo "${ECHO_T}$cf_with_ada" >&6
3107
3108 echo "$as_me:3108: checking if you want to build programs such as tic" >&5
3109 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3110
3111 # Check whether --with-progs or --without-progs was given.
3112 if test "${with_progs+set}" = set; then
3113   withval="$with_progs"
3114   cf_with_progs=$withval
3115 else
3116   cf_with_progs=yes
3117 fi;
3118 echo "$as_me:3118: result: $cf_with_progs" >&5
3119 echo "${ECHO_T}$cf_with_progs" >&6
3120
3121 echo "$as_me:3121: checking if you wish to install curses.h" >&5
3122 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3123
3124 # Check whether --with-curses-h or --without-curses-h was given.
3125 if test "${with_curses_h+set}" = set; then
3126   withval="$with_curses_h"
3127   with_curses_h=$withval
3128 else
3129   with_curses_h=yes
3130 fi;
3131 echo "$as_me:3131: result: $with_curses_h" >&5
3132 echo "${ECHO_T}$with_curses_h" >&6
3133
3134 modules_to_build="ncurses"
3135 if test "X$cf_with_progs" != Xno ; then
3136 modules_to_build="$modules_to_build progs tack"
3137 fi
3138 modules_to_build="$modules_to_build panel menu form"
3139
3140 test "$program_prefix" != NONE &&
3141   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3142 # Use a double $ so make ignores it.
3143 test "$program_suffix" != NONE &&
3144   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3145 # Double any \ or $.  echo might interpret backslashes.
3146 # By default was `s,x,x', remove it if useless.
3147 cat <<\_ACEOF >conftest.sed
3148 s/[\\$]/&&/g;s/;s,x,x,$//
3149 _ACEOF
3150 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3151 rm conftest.sed
3152
3153 for ac_prog in mawk gawk nawk awk
3154 do
3155   # Extract the first word of "$ac_prog", so it can be a program name with args.
3156 set dummy $ac_prog; ac_word=$2
3157 echo "$as_me:3157: checking for $ac_word" >&5
3158 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3159 if test "${ac_cv_prog_AWK+set}" = set; then
3160   echo $ECHO_N "(cached) $ECHO_C" >&6
3161 else
3162   if test -n "$AWK"; then
3163   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3164 else
3165   ac_save_IFS=$IFS; IFS=$ac_path_separator
3166 ac_dummy="$PATH"
3167 for ac_dir in $ac_dummy; do
3168   IFS=$ac_save_IFS
3169   test -z "$ac_dir" && ac_dir=.
3170   $as_executable_p "$ac_dir/$ac_word" || continue
3171 ac_cv_prog_AWK="$ac_prog"
3172 echo "$as_me:3172: found $ac_dir/$ac_word" >&5
3173 break
3174 done
3175
3176 fi
3177 fi
3178 AWK=$ac_cv_prog_AWK
3179 if test -n "$AWK"; then
3180   echo "$as_me:3180: result: $AWK" >&5
3181 echo "${ECHO_T}$AWK" >&6
3182 else
3183   echo "$as_me:3183: result: no" >&5
3184 echo "${ECHO_T}no" >&6
3185 fi
3186
3187   test -n "$AWK" && break
3188 done
3189
3190 test -z "$AWK" && { { echo "$as_me:3190: error: No awk program found" >&5
3191 echo "$as_me: error: No awk program found" >&2;}
3192    { (exit 1); exit 1; }; }
3193
3194 echo "$as_me:3194: checking for egrep" >&5
3195 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3196 if test "${ac_cv_prog_egrep+set}" = set; then
3197   echo $ECHO_N "(cached) $ECHO_C" >&6
3198 else
3199   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3200     then ac_cv_prog_egrep='grep -E'
3201     else ac_cv_prog_egrep='egrep'
3202     fi
3203 fi
3204 echo "$as_me:3204: result: $ac_cv_prog_egrep" >&5
3205 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3206  EGREP=$ac_cv_prog_egrep
3207
3208 test -z "$EGREP" && { { echo "$as_me:3208: error: No egrep program found" >&5
3209 echo "$as_me: error: No egrep program found" >&2;}
3210    { (exit 1); exit 1; }; }
3211
3212 # Find a good install program.  We prefer a C program (faster),
3213 # so one script is as good as another.  But avoid the broken or
3214 # incompatible versions:
3215 # SysV /etc/install, /usr/sbin/install
3216 # SunOS /usr/etc/install
3217 # IRIX /sbin/install
3218 # AIX /bin/install
3219 # AmigaOS /C/install, which installs bootblocks on floppy discs
3220 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3221 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3222 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3223 # ./install, which can be erroneously created by make from ./install.sh.
3224 echo "$as_me:3224: checking for a BSD compatible install" >&5
3225 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3226 if test -z "$INSTALL"; then
3227 if test "${ac_cv_path_install+set}" = set; then
3228   echo $ECHO_N "(cached) $ECHO_C" >&6
3229 else
3230     ac_save_IFS=$IFS; IFS=$ac_path_separator
3231   for ac_dir in $PATH; do
3232     IFS=$ac_save_IFS
3233     # Account for people who put trailing slashes in PATH elements.
3234     case $ac_dir/ in
3235     / | ./ | .// | /cC/* \
3236     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3237     | /usr/ucb/* ) ;;
3238     *)
3239       # OSF1 and SCO ODT 3.0 have their own names for install.
3240       # Don't use installbsd from OSF since it installs stuff as root
3241       # by default.
3242       for ac_prog in ginstall scoinst install; do
3243         if $as_executable_p "$ac_dir/$ac_prog"; then
3244           if test $ac_prog = install &&
3245             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3246             # AIX install.  It has an incompatible calling convention.
3247             :
3248           elif test $ac_prog = install &&
3249             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3250             # program-specific install script used by HP pwplus--don't use.
3251             :
3252           else
3253             ac_cv_path_install="$ac_dir/$ac_prog -c"
3254             break 2
3255           fi
3256         fi
3257       done
3258       ;;
3259     esac
3260   done
3261
3262 fi
3263   if test "${ac_cv_path_install+set}" = set; then
3264     INSTALL=$ac_cv_path_install
3265   else
3266     # As a last resort, use the slow shell script.  We don't cache a
3267     # path for INSTALL within a source directory, because that will
3268     # break other packages using the cache if that directory is
3269     # removed, or if the path is relative.
3270     INSTALL=$ac_install_sh
3271   fi
3272 fi
3273 echo "$as_me:3273: result: $INSTALL" >&5
3274 echo "${ECHO_T}$INSTALL" >&6
3275
3276 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3277 # It thinks the first close brace ends the variable substitution.
3278 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3279
3280 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3281
3282 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3283
3284 case $INSTALL in
3285 /*)
3286   ;;
3287 *)
3288   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3289   test -z "$cf_dir" && cf_dir=.
3290   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3291   ;;
3292 esac
3293
3294 for ac_prog in tdlint lint alint
3295 do
3296   # Extract the first word of "$ac_prog", so it can be a program name with args.
3297 set dummy $ac_prog; ac_word=$2
3298 echo "$as_me:3298: checking for $ac_word" >&5
3299 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3300 if test "${ac_cv_prog_LINT+set}" = set; then
3301   echo $ECHO_N "(cached) $ECHO_C" >&6
3302 else
3303   if test -n "$LINT"; then
3304   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3305 else
3306   ac_save_IFS=$IFS; IFS=$ac_path_separator
3307 ac_dummy="$PATH"
3308 for ac_dir in $ac_dummy; do
3309   IFS=$ac_save_IFS
3310   test -z "$ac_dir" && ac_dir=.
3311   $as_executable_p "$ac_dir/$ac_word" || continue
3312 ac_cv_prog_LINT="$ac_prog"
3313 echo "$as_me:3313: found $ac_dir/$ac_word" >&5
3314 break
3315 done
3316
3317 fi
3318 fi
3319 LINT=$ac_cv_prog_LINT
3320 if test -n "$LINT"; then
3321   echo "$as_me:3321: result: $LINT" >&5
3322 echo "${ECHO_T}$LINT" >&6
3323 else
3324   echo "$as_me:3324: result: no" >&5
3325 echo "${ECHO_T}no" >&6
3326 fi
3327
3328   test -n "$LINT" && break
3329 done
3330
3331 echo "$as_me:3331: checking whether ln -s works" >&5
3332 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3333 LN_S=$as_ln_s
3334 if test "$LN_S" = "ln -s"; then
3335   echo "$as_me:3335: result: yes" >&5
3336 echo "${ECHO_T}yes" >&6
3337 else
3338   echo "$as_me:3338: result: no, using $LN_S" >&5
3339 echo "${ECHO_T}no, using $LN_S" >&6
3340 fi
3341
3342 echo "$as_me:3342: checking whether ${MAKE-make} sets \${MAKE}" >&5
3343 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3344 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3345 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3346   echo $ECHO_N "(cached) $ECHO_C" >&6
3347 else
3348   cat >conftest.make <<\EOF
3349 all:
3350         @echo 'ac_maketemp="${MAKE}"'
3351 EOF
3352 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3353 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3354 if test -n "$ac_maketemp"; then
3355   eval ac_cv_prog_make_${ac_make}_set=yes
3356 else
3357   eval ac_cv_prog_make_${ac_make}_set=no
3358 fi
3359 rm -f conftest.make
3360 fi
3361 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3362   echo "$as_me:3362: result: yes" >&5
3363 echo "${ECHO_T}yes" >&6
3364   SET_MAKE=
3365 else
3366   echo "$as_me:3366: result: no" >&5
3367 echo "${ECHO_T}no" >&6
3368   SET_MAKE="MAKE=${MAKE-make}"
3369 fi
3370
3371 echo "$as_me:3371: checking if filesystem supports mixed-case filenames" >&5
3372 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3373 if test "${cf_cv_mixedcase+set}" = set; then
3374   echo $ECHO_N "(cached) $ECHO_C" >&6
3375 else
3376
3377 if test "$cross_compiling" = yes ; then
3378         case $target_alias in #(vi
3379         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3380                 cf_cv_mixedcase=no
3381                 ;;
3382         *)
3383                 cf_cv_mixedcase=yes
3384                 ;;
3385         esac
3386 else
3387         rm -f conftest CONFTEST
3388         echo test >conftest
3389         if test -f CONFTEST ; then
3390                 cf_cv_mixedcase=no
3391         else
3392                 cf_cv_mixedcase=yes
3393         fi
3394         rm -f conftest CONFTEST
3395 fi
3396
3397 fi
3398 echo "$as_me:3398: result: $cf_cv_mixedcase" >&5
3399 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3400 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3401 #define MIXEDCASE_FILENAMES 1
3402 EOF
3403
3404 # Extract the first word of "ctags", so it can be a program name with args.
3405 set dummy ctags; ac_word=$2
3406 echo "$as_me:3406: checking for $ac_word" >&5
3407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3408 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3409   echo $ECHO_N "(cached) $ECHO_C" >&6
3410 else
3411   if test -n "$MAKE_LOWER_TAGS"; then
3412   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3413 else
3414   ac_save_IFS=$IFS; IFS=$ac_path_separator
3415 ac_dummy="$PATH"
3416 for ac_dir in $ac_dummy; do
3417   IFS=$ac_save_IFS
3418   test -z "$ac_dir" && ac_dir=.
3419   $as_executable_p "$ac_dir/$ac_word" || continue
3420 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3421 echo "$as_me:3421: found $ac_dir/$ac_word" >&5
3422 break
3423 done
3424
3425   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3426 fi
3427 fi
3428 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3429 if test -n "$MAKE_LOWER_TAGS"; then
3430   echo "$as_me:3430: result: $MAKE_LOWER_TAGS" >&5
3431 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3432 else
3433   echo "$as_me:3433: result: no" >&5
3434 echo "${ECHO_T}no" >&6
3435 fi
3436
3437 if test "$cf_cv_mixedcase" = yes ; then
3438         # Extract the first word of "etags", so it can be a program name with args.
3439 set dummy etags; ac_word=$2
3440 echo "$as_me:3440: checking for $ac_word" >&5
3441 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3442 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3443   echo $ECHO_N "(cached) $ECHO_C" >&6
3444 else
3445   if test -n "$MAKE_UPPER_TAGS"; then
3446   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3447 else
3448   ac_save_IFS=$IFS; IFS=$ac_path_separator
3449 ac_dummy="$PATH"
3450 for ac_dir in $ac_dummy; do
3451   IFS=$ac_save_IFS
3452   test -z "$ac_dir" && ac_dir=.
3453   $as_executable_p "$ac_dir/$ac_word" || continue
3454 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3455 echo "$as_me:3455: found $ac_dir/$ac_word" >&5
3456 break
3457 done
3458
3459   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3460 fi
3461 fi
3462 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3463 if test -n "$MAKE_UPPER_TAGS"; then
3464   echo "$as_me:3464: result: $MAKE_UPPER_TAGS" >&5
3465 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3466 else
3467   echo "$as_me:3467: result: no" >&5
3468 echo "${ECHO_T}no" >&6
3469 fi
3470
3471 else
3472         MAKE_UPPER_TAGS=no
3473 fi
3474
3475 if test "$MAKE_UPPER_TAGS" = yes ; then
3476         MAKE_UPPER_TAGS=
3477 else
3478         MAKE_UPPER_TAGS="#"
3479 fi
3480
3481 if test "$MAKE_LOWER_TAGS" = yes ; then
3482         MAKE_LOWER_TAGS=
3483 else
3484         MAKE_LOWER_TAGS="#"
3485 fi
3486
3487 echo "$as_me:3487: checking for makeflags variable" >&5
3488 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3489 if test "${cf_cv_makeflags+set}" = set; then
3490   echo $ECHO_N "(cached) $ECHO_C" >&6
3491 else
3492
3493         cf_cv_makeflags=''
3494         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3495         do
3496                 cat >cf_makeflags.tmp <<CF_EOF
3497 SHELL = /bin/sh
3498 all :
3499         @ echo '.$cf_option'
3500 CF_EOF
3501                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3502                 case "$cf_result" in
3503                 .*k)
3504                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3505                         case "$cf_result" in
3506                         .*CC=*) cf_cv_makeflags=
3507                                 ;;
3508                         *)      cf_cv_makeflags=$cf_option
3509                                 ;;
3510                         esac
3511                         break
3512                         ;;
3513                 .-)     ;;
3514                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3515                         ;;
3516                 esac
3517         done
3518         rm -f cf_makeflags.tmp
3519
3520 fi
3521 echo "$as_me:3521: result: $cf_cv_makeflags" >&5
3522 echo "${ECHO_T}$cf_cv_makeflags" >&6
3523
3524 echo "$as_me:3524: checking for long file names" >&5
3525 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3526 if test "${ac_cv_sys_long_file_names+set}" = set; then
3527   echo $ECHO_N "(cached) $ECHO_C" >&6
3528 else
3529   ac_cv_sys_long_file_names=yes
3530 # Test for long file names in all the places we know might matter:
3531 #      .                the current directory, where building will happen
3532 #      $prefix/lib      where we will be installing things
3533 #      $exec_prefix/lib likewise
3534 # eval it to expand exec_prefix.
3535 #      $TMPDIR          if set, where it might want to write temporary files
3536 # if $TMPDIR is not set:
3537 #      /tmp             where it might want to write temporary files
3538 #      /var/tmp         likewise
3539 #      /usr/tmp         likewise
3540 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3541   ac_tmpdirs=$TMPDIR
3542 else
3543   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3544 fi
3545 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3546   test -d $ac_dir || continue
3547   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3548   ac_xdir=$ac_dir/cf$$
3549   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3550   ac_tf1=$ac_xdir/conftest9012345
3551   ac_tf2=$ac_xdir/conftest9012346
3552   (echo 1 >$ac_tf1) 2>/dev/null
3553   (echo 2 >$ac_tf2) 2>/dev/null
3554   ac_val=`cat $ac_tf1 2>/dev/null`
3555   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3556     ac_cv_sys_long_file_names=no
3557     rm -rf $ac_xdir 2>/dev/null
3558     break
3559   fi
3560   rm -rf $ac_xdir 2>/dev/null
3561 done
3562 fi
3563 echo "$as_me:3563: result: $ac_cv_sys_long_file_names" >&5
3564 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3565 if test $ac_cv_sys_long_file_names = yes; then
3566
3567 cat >>confdefs.h <<\EOF
3568 #define HAVE_LONG_FILE_NAMES 1
3569 EOF
3570
3571 fi
3572
3573 echo "$as_me:3573: checking if filesystem supports mixed-case filenames" >&5
3574 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3575 if test "${cf_cv_mixedcase+set}" = set; then
3576   echo $ECHO_N "(cached) $ECHO_C" >&6
3577 else
3578
3579 if test "$cross_compiling" = yes ; then
3580         case $target_alias in #(vi
3581         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3582                 cf_cv_mixedcase=no
3583                 ;;
3584         *)
3585                 cf_cv_mixedcase=yes
3586                 ;;
3587         esac
3588 else
3589         rm -f conftest CONFTEST
3590         echo test >conftest
3591         if test -f CONFTEST ; then
3592                 cf_cv_mixedcase=no
3593         else
3594                 cf_cv_mixedcase=yes
3595         fi
3596         rm -f conftest CONFTEST
3597 fi
3598
3599 fi
3600 echo "$as_me:3600: result: $cf_cv_mixedcase" >&5
3601 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3602 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3603 #define MIXEDCASE_FILENAMES 1
3604 EOF
3605
3606 if test -n "$ac_tool_prefix"; then
3607   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3608 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3609 echo "$as_me:3609: checking for $ac_word" >&5
3610 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3611 if test "${ac_cv_prog_RANLIB+set}" = set; then
3612   echo $ECHO_N "(cached) $ECHO_C" >&6
3613 else
3614   if test -n "$RANLIB"; then
3615   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3616 else
3617   ac_save_IFS=$IFS; IFS=$ac_path_separator
3618 ac_dummy="$PATH"
3619 for ac_dir in $ac_dummy; do
3620   IFS=$ac_save_IFS
3621   test -z "$ac_dir" && ac_dir=.
3622   $as_executable_p "$ac_dir/$ac_word" || continue
3623 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3624 echo "$as_me:3624: found $ac_dir/$ac_word" >&5
3625 break
3626 done
3627
3628 fi
3629 fi
3630 RANLIB=$ac_cv_prog_RANLIB
3631 if test -n "$RANLIB"; then
3632   echo "$as_me:3632: result: $RANLIB" >&5
3633 echo "${ECHO_T}$RANLIB" >&6
3634 else
3635   echo "$as_me:3635: result: no" >&5
3636 echo "${ECHO_T}no" >&6
3637 fi
3638
3639 fi
3640 if test -z "$ac_cv_prog_RANLIB"; then
3641   ac_ct_RANLIB=$RANLIB
3642   # Extract the first word of "ranlib", so it can be a program name with args.
3643 set dummy ranlib; ac_word=$2
3644 echo "$as_me:3644: checking for $ac_word" >&5
3645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3646 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3647   echo $ECHO_N "(cached) $ECHO_C" >&6
3648 else
3649   if test -n "$ac_ct_RANLIB"; then
3650   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3651 else
3652   ac_save_IFS=$IFS; IFS=$ac_path_separator
3653 ac_dummy="$PATH"
3654 for ac_dir in $ac_dummy; do
3655   IFS=$ac_save_IFS
3656   test -z "$ac_dir" && ac_dir=.
3657   $as_executable_p "$ac_dir/$ac_word" || continue
3658 ac_cv_prog_ac_ct_RANLIB="ranlib"
3659 echo "$as_me:3659: found $ac_dir/$ac_word" >&5
3660 break
3661 done
3662
3663   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3664 fi
3665 fi
3666 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3667 if test -n "$ac_ct_RANLIB"; then
3668   echo "$as_me:3668: result: $ac_ct_RANLIB" >&5
3669 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3670 else
3671   echo "$as_me:3671: result: no" >&5
3672 echo "${ECHO_T}no" >&6
3673 fi
3674
3675   RANLIB=$ac_ct_RANLIB
3676 else
3677   RANLIB="$ac_cv_prog_RANLIB"
3678 fi
3679
3680 if test -n "$ac_tool_prefix"; then
3681   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3682 set dummy ${ac_tool_prefix}ld; ac_word=$2
3683 echo "$as_me:3683: checking for $ac_word" >&5
3684 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3685 if test "${ac_cv_prog_LD+set}" = set; then
3686   echo $ECHO_N "(cached) $ECHO_C" >&6
3687 else
3688   if test -n "$LD"; then
3689   ac_cv_prog_LD="$LD" # Let the user override the test.
3690 else
3691   ac_save_IFS=$IFS; IFS=$ac_path_separator
3692 ac_dummy="$PATH"
3693 for ac_dir in $ac_dummy; do
3694   IFS=$ac_save_IFS
3695   test -z "$ac_dir" && ac_dir=.
3696   $as_executable_p "$ac_dir/$ac_word" || continue
3697 ac_cv_prog_LD="${ac_tool_prefix}ld"
3698 echo "$as_me:3698: found $ac_dir/$ac_word" >&5
3699 break
3700 done
3701
3702 fi
3703 fi
3704 LD=$ac_cv_prog_LD
3705 if test -n "$LD"; then
3706   echo "$as_me:3706: result: $LD" >&5
3707 echo "${ECHO_T}$LD" >&6
3708 else
3709   echo "$as_me:3709: result: no" >&5
3710 echo "${ECHO_T}no" >&6
3711 fi
3712
3713 fi
3714 if test -z "$ac_cv_prog_LD"; then
3715   ac_ct_LD=$LD
3716   # Extract the first word of "ld", so it can be a program name with args.
3717 set dummy ld; ac_word=$2
3718 echo "$as_me:3718: checking for $ac_word" >&5
3719 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3720 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3721   echo $ECHO_N "(cached) $ECHO_C" >&6
3722 else
3723   if test -n "$ac_ct_LD"; then
3724   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3725 else
3726   ac_save_IFS=$IFS; IFS=$ac_path_separator
3727 ac_dummy="$PATH"
3728 for ac_dir in $ac_dummy; do
3729   IFS=$ac_save_IFS
3730   test -z "$ac_dir" && ac_dir=.
3731   $as_executable_p "$ac_dir/$ac_word" || continue
3732 ac_cv_prog_ac_ct_LD="ld"
3733 echo "$as_me:3733: found $ac_dir/$ac_word" >&5
3734 break
3735 done
3736
3737   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3738 fi
3739 fi
3740 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3741 if test -n "$ac_ct_LD"; then
3742   echo "$as_me:3742: result: $ac_ct_LD" >&5
3743 echo "${ECHO_T}$ac_ct_LD" >&6
3744 else
3745   echo "$as_me:3745: result: no" >&5
3746 echo "${ECHO_T}no" >&6
3747 fi
3748
3749   LD=$ac_ct_LD
3750 else
3751   LD="$ac_cv_prog_LD"
3752 fi
3753
3754 if test -n "$ac_tool_prefix"; then
3755   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3756 set dummy ${ac_tool_prefix}ar; ac_word=$2
3757 echo "$as_me:3757: checking for $ac_word" >&5
3758 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3759 if test "${ac_cv_prog_AR+set}" = set; then
3760   echo $ECHO_N "(cached) $ECHO_C" >&6
3761 else
3762   if test -n "$AR"; then
3763   ac_cv_prog_AR="$AR" # Let the user override the test.
3764 else
3765   ac_save_IFS=$IFS; IFS=$ac_path_separator
3766 ac_dummy="$PATH"
3767 for ac_dir in $ac_dummy; do
3768   IFS=$ac_save_IFS
3769   test -z "$ac_dir" && ac_dir=.
3770   $as_executable_p "$ac_dir/$ac_word" || continue
3771 ac_cv_prog_AR="${ac_tool_prefix}ar"
3772 echo "$as_me:3772: found $ac_dir/$ac_word" >&5
3773 break
3774 done
3775
3776 fi
3777 fi
3778 AR=$ac_cv_prog_AR
3779 if test -n "$AR"; then
3780   echo "$as_me:3780: result: $AR" >&5
3781 echo "${ECHO_T}$AR" >&6
3782 else
3783   echo "$as_me:3783: result: no" >&5
3784 echo "${ECHO_T}no" >&6
3785 fi
3786
3787 fi
3788 if test -z "$ac_cv_prog_AR"; then
3789   ac_ct_AR=$AR
3790   # Extract the first word of "ar", so it can be a program name with args.
3791 set dummy ar; ac_word=$2
3792 echo "$as_me:3792: checking for $ac_word" >&5
3793 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3794 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3795   echo $ECHO_N "(cached) $ECHO_C" >&6
3796 else
3797   if test -n "$ac_ct_AR"; then
3798   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3799 else
3800   ac_save_IFS=$IFS; IFS=$ac_path_separator
3801 ac_dummy="$PATH"
3802 for ac_dir in $ac_dummy; do
3803   IFS=$ac_save_IFS
3804   test -z "$ac_dir" && ac_dir=.
3805   $as_executable_p "$ac_dir/$ac_word" || continue
3806 ac_cv_prog_ac_ct_AR="ar"
3807 echo "$as_me:3807: found $ac_dir/$ac_word" >&5
3808 break
3809 done
3810
3811   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3812 fi
3813 fi
3814 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3815 if test -n "$ac_ct_AR"; then
3816   echo "$as_me:3816: result: $ac_ct_AR" >&5
3817 echo "${ECHO_T}$ac_ct_AR" >&6
3818 else
3819   echo "$as_me:3819: result: no" >&5
3820 echo "${ECHO_T}no" >&6
3821 fi
3822
3823   AR=$ac_ct_AR
3824 else
3825   AR="$ac_cv_prog_AR"
3826 fi
3827
3828 if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3829   echo $ECHO_N "(cached) $ECHO_C" >&6
3830 else
3831
3832 echo "$as_me:3832: checking for archiver options (symbol AR_OPTS)" >&5
3833 echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3834
3835 if test -z "$AR_OPTS" ; then
3836         AR_OPTS=rv
3837
3838 fi
3839
3840 cf_cv_subst_AR_OPTS=$AR_OPTS
3841 echo "$as_me:3841: result: $AR_OPTS" >&5
3842 echo "${ECHO_T}$AR_OPTS" >&6
3843
3844 fi
3845
3846 echo "$as_me:3846: checking if you have specified an install-prefix" >&5
3847 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3848
3849 # Check whether --with-install-prefix or --without-install-prefix was given.
3850 if test "${with_install_prefix+set}" = set; then
3851   withval="$with_install_prefix"
3852   case "$withval" in #(vi
3853         yes|no) #(vi
3854                 ;;
3855         *)      DESTDIR="$withval"
3856                 ;;
3857         esac
3858 fi;
3859 echo "$as_me:3859: result: $DESTDIR" >&5
3860 echo "${ECHO_T}$DESTDIR" >&6
3861
3862 ###############################################################################
3863
3864 # If we're cross-compiling, allow the user to override the tools and their
3865 # options.  The configure script is oriented toward identifying the host
3866 # compiler, etc., but we need a build compiler to generate parts of the source.
3867
3868 if test "$cross_compiling" = yes ; then
3869
3870         # defaults that we might want to override
3871         : ${BUILD_CFLAGS:=''}
3872         : ${BUILD_CPPFLAGS:=''}
3873         : ${BUILD_LDFLAGS:=''}
3874         : ${BUILD_LIBS:=''}
3875         : ${BUILD_EXEEXT:='$x'}
3876         : ${BUILD_OBJEXT:='o'}
3877
3878 # Check whether --with-build-cc or --without-build-cc was given.
3879 if test "${with_build_cc+set}" = set; then
3880   withval="$with_build_cc"
3881   BUILD_CC="$withval"
3882 else
3883   for ac_prog in gcc cc cl
3884 do
3885   # Extract the first word of "$ac_prog", so it can be a program name with args.
3886 set dummy $ac_prog; ac_word=$2
3887 echo "$as_me:3887: checking for $ac_word" >&5
3888 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3889 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3890   echo $ECHO_N "(cached) $ECHO_C" >&6
3891 else
3892   if test -n "$BUILD_CC"; then
3893   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3894 else
3895   ac_save_IFS=$IFS; IFS=$ac_path_separator
3896 ac_dummy="$PATH"
3897 for ac_dir in $ac_dummy; do
3898   IFS=$ac_save_IFS
3899   test -z "$ac_dir" && ac_dir=.
3900   $as_executable_p "$ac_dir/$ac_word" || continue
3901 ac_cv_prog_BUILD_CC="$ac_prog"
3902 echo "$as_me:3902: found $ac_dir/$ac_word" >&5
3903 break
3904 done
3905
3906 fi
3907 fi
3908 BUILD_CC=$ac_cv_prog_BUILD_CC
3909 if test -n "$BUILD_CC"; then
3910   echo "$as_me:3910: result: $BUILD_CC" >&5
3911 echo "${ECHO_T}$BUILD_CC" >&6
3912 else
3913   echo "$as_me:3913: result: no" >&5
3914 echo "${ECHO_T}no" >&6
3915 fi
3916
3917   test -n "$BUILD_CC" && break
3918 done
3919
3920 fi;
3921         echo "$as_me:3921: checking for native build C compiler" >&5
3922 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3923         echo "$as_me:3923: result: $BUILD_CC" >&5
3924 echo "${ECHO_T}$BUILD_CC" >&6
3925
3926         echo "$as_me:3926: checking for native build C preprocessor" >&5
3927 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3928
3929 # Check whether --with-build-cpp or --without-build-cpp was given.
3930 if test "${with_build_cpp+set}" = set; then
3931   withval="$with_build_cpp"
3932   BUILD_CPP="$withval"
3933 else
3934   BUILD_CPP='${BUILD_CC} -E'
3935 fi;
3936         echo "$as_me:3936: result: $BUILD_CPP" >&5
3937 echo "${ECHO_T}$BUILD_CPP" >&6
3938
3939         echo "$as_me:3939: checking for native build C flags" >&5
3940 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3941
3942 # Check whether --with-build-cflags or --without-build-cflags was given.
3943 if test "${with_build_cflags+set}" = set; then
3944   withval="$with_build_cflags"
3945   BUILD_CFLAGS="$withval"
3946 fi;
3947         echo "$as_me:3947: result: $BUILD_CFLAGS" >&5
3948 echo "${ECHO_T}$BUILD_CFLAGS" >&6
3949
3950         echo "$as_me:3950: checking for native build C preprocessor-flags" >&5
3951 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3952
3953 # Check whether --with-build-cppflags or --without-build-cppflags was given.
3954 if test "${with_build_cppflags+set}" = set; then
3955   withval="$with_build_cppflags"
3956   BUILD_CPPFLAGS="$withval"
3957 fi;
3958         echo "$as_me:3958: result: $BUILD_CPPFLAGS" >&5
3959 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3960
3961         echo "$as_me:3961: checking for native build linker-flags" >&5
3962 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3963
3964 # Check whether --with-build-ldflags or --without-build-ldflags was given.
3965 if test "${with_build_ldflags+set}" = set; then
3966   withval="$with_build_ldflags"
3967   BUILD_LDFLAGS="$withval"
3968 fi;
3969         echo "$as_me:3969: result: $BUILD_LDFLAGS" >&5
3970 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3971
3972         echo "$as_me:3972: checking for native build linker-libraries" >&5
3973 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3974
3975 # Check whether --with-build-libs or --without-build-libs was given.
3976 if test "${with_build_libs+set}" = set; then
3977   withval="$with_build_libs"
3978   BUILD_LIBS="$withval"
3979 fi;
3980         echo "$as_me:3980: result: $BUILD_LIBS" >&5
3981 echo "${ECHO_T}$BUILD_LIBS" >&6
3982
3983         # this assumes we're on Unix.
3984         BUILD_EXEEXT=
3985         BUILD_OBJEXT=o
3986
3987         : ${BUILD_CC:='${CC}'}
3988
3989         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3990                 { { echo "$as_me:3990: error: Cross-build requires two compilers.
3991 Use --with-build-cc to specify the native compiler." >&5
3992 echo "$as_me: error: Cross-build requires two compilers.
3993 Use --with-build-cc to specify the native compiler." >&2;}
3994    { (exit 1); exit 1; }; }
3995         fi
3996
3997 else
3998         : ${BUILD_CC:='${CC}'}
3999         : ${BUILD_CPP:='${CPP}'}
4000         : ${BUILD_CFLAGS:='${CFLAGS}'}
4001         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4002         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4003         : ${BUILD_LIBS:='${LIBS}'}
4004         : ${BUILD_EXEEXT:='$x'}
4005         : ${BUILD_OBJEXT:='o'}
4006 fi
4007
4008 ###############################################################################
4009
4010 ### Options to allow the user to specify the set of libraries which are used.
4011 ### Use "--without-normal --with-shared" to allow the default model to be
4012 ### shared, for example.
4013 cf_list_models=""
4014
4015 LIBTOOL=
4016
4017 # common library maintenance symbols that are convenient for libtool scripts:
4018 LIB_CREATE='${AR} -cr'
4019 LIB_OBJECT='${OBJECTS}'
4020 LIB_SUFFIX=.a
4021 LIB_PREP="$RANLIB"
4022
4023 # symbols used to prop libtool up to enable it to determine what it should be
4024 # doing:
4025 LIB_CLEAN=
4026 LIB_COMPILE=
4027 LIB_LINK=
4028 LIB_INSTALL=
4029 LIB_UNINSTALL=
4030
4031 echo "$as_me:4031: checking if you want to build libraries with libtool" >&5
4032 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4033
4034 # Check whether --with-libtool or --without-libtool was given.
4035 if test "${with_libtool+set}" = set; then
4036   withval="$with_libtool"
4037   with_libtool=$withval
4038 else
4039   with_libtool=no
4040 fi;
4041 echo "$as_me:4041: result: $with_libtool" >&5
4042 echo "${ECHO_T}$with_libtool" >&6
4043 if test "$with_libtool" != "no"; then
4044
4045         if test "$with_libtool" != "yes" ; then
4046
4047 if test "x$prefix" != xNONE; then
4048   cf_path_syntax="$prefix"
4049 else
4050   cf_path_syntax="$ac_default_prefix"
4051 fi
4052
4053 case ".$with_libtool" in #(vi
4054 .\$\(*\)*|.\'*\'*) #(vi
4055   ;;
4056 ..|./*|.\\*) #(vi
4057   ;;
4058 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4059   ;;
4060 .\${*prefix}*) #(vi
4061   eval with_libtool="$with_libtool"
4062   case ".$with_libtool" in #(vi
4063   .NONE/*)
4064     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4065     ;;
4066   esac
4067   ;; #(vi
4068 .no|.NONE/*)
4069   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4070   ;;
4071 *)
4072   { { echo "$as_me:4072: error: expected a pathname, not \"$with_libtool\"" >&5
4073 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4074    { (exit 1); exit 1; }; }
4075   ;;
4076 esac
4077
4078                 LIBTOOL=$with_libtool
4079         else
4080                 # Extract the first word of "libtool", so it can be a program name with args.
4081 set dummy libtool; ac_word=$2
4082 echo "$as_me:4082: checking for $ac_word" >&5
4083 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4084 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4085   echo $ECHO_N "(cached) $ECHO_C" >&6
4086 else
4087   case $LIBTOOL in
4088   [\\/]* | ?:[\\/]*)
4089   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4090   ;;
4091   *)
4092   ac_save_IFS=$IFS; IFS=$ac_path_separator
4093 ac_dummy="$PATH"
4094 for ac_dir in $ac_dummy; do
4095   IFS=$ac_save_IFS
4096   test -z "$ac_dir" && ac_dir=.
4097   if $as_executable_p "$ac_dir/$ac_word"; then
4098    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4099    echo "$as_me:4099: found $ac_dir/$ac_word" >&5
4100    break
4101 fi
4102 done
4103
4104   ;;
4105 esac
4106 fi
4107 LIBTOOL=$ac_cv_path_LIBTOOL
4108
4109 if test -n "$LIBTOOL"; then
4110   echo "$as_me:4110: result: $LIBTOOL" >&5
4111 echo "${ECHO_T}$LIBTOOL" >&6
4112 else
4113   echo "$as_me:4113: result: no" >&5
4114 echo "${ECHO_T}no" >&6
4115 fi
4116
4117         fi
4118         if test -z "$LIBTOOL" ; then
4119                 { { echo "$as_me:4119: error: Cannot find libtool" >&5
4120 echo "$as_me: error: Cannot find libtool" >&2;}
4121    { (exit 1); exit 1; }; }
4122         fi
4123         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` -o'
4124         LIB_OBJECT='${OBJECTS}.o=.lo)'
4125         LIB_SUFFIX=.la
4126         LIB_CLEAN='${LIBTOOL} --mode=clean'
4127         LIB_COMPILE='${LIBTOOL} --mode=compile'
4128         LIB_LINK='${LIBTOOL} --mode=link'
4129         LIB_INSTALL='${LIBTOOL} --mode=install'
4130         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4131         LIB_PREP=:
4132
4133         # Show the version of libtool
4134         echo "$as_me:4134: checking version of libtool" >&5
4135 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4136
4137         # Save the version in a cache variable - this is not entirely a good
4138         # thing, but the version string from libtool is very ugly, and for
4139         # bug reports it might be useful to have the original string.
4140         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.].*//'`
4141         echo "$as_me:4141: result: $cf_cv_libtool_version" >&5
4142 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4143         if test -z "$cf_cv_libtool_version" ; then
4144                 { { echo "$as_me:4144: error: This is not libtool" >&5
4145 echo "$as_me: error: This is not libtool" >&2;}
4146    { (exit 1); exit 1; }; }
4147         fi
4148
4149         # special hack to add --tag option for C++ compiler
4150         case $cf_cv_libtool_version in
4151         1.[5-9]*|[2-9]*)
4152                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4153                 ;;
4154         *)
4155                 LIBTOOL_CXX="$LIBTOOL"
4156                 ;;
4157         esac
4158 else
4159         LIBTOOL=""
4160         LIBTOOL_CXX=""
4161 fi
4162
4163 test -z "$LIBTOOL" && ECHO_LT=
4164
4165 if test "$with_libtool" != "no" ; then
4166
4167 cf_list_models="$cf_list_models libtool"
4168
4169 else
4170
4171 echo "$as_me:4171: checking if you want to build shared libraries" >&5
4172 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4173
4174 # Check whether --with-shared or --without-shared was given.
4175 if test "${with_shared+set}" = set; then
4176   withval="$with_shared"
4177   with_shared=$withval
4178 else
4179   with_shared=no
4180 fi;
4181 echo "$as_me:4181: result: $with_shared" >&5
4182 echo "${ECHO_T}$with_shared" >&6
4183 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4184
4185 echo "$as_me:4185: checking if you want to build static libraries" >&5
4186 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4187
4188 # Check whether --with-normal or --without-normal was given.
4189 if test "${with_normal+set}" = set; then
4190   withval="$with_normal"
4191   with_normal=$withval
4192 else
4193   with_normal=yes
4194 fi;
4195 echo "$as_me:4195: result: $with_normal" >&5
4196 echo "${ECHO_T}$with_normal" >&6
4197 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4198
4199 echo "$as_me:4199: checking if you want to build debug libraries" >&5
4200 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4201
4202 # Check whether --with-debug or --without-debug was given.
4203 if test "${with_debug+set}" = set; then
4204   withval="$with_debug"
4205   with_debug=$withval
4206 else
4207   with_debug=yes
4208 fi;
4209 echo "$as_me:4209: result: $with_debug" >&5
4210 echo "${ECHO_T}$with_debug" >&6
4211 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4212
4213 echo "$as_me:4213: checking if you want to build profiling libraries" >&5
4214 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4215
4216 # Check whether --with-profile or --without-profile was given.
4217 if test "${with_profile+set}" = set; then
4218   withval="$with_profile"
4219   with_profile=$withval
4220 else
4221   with_profile=no
4222 fi;
4223 echo "$as_me:4223: result: $with_profile" >&5
4224 echo "${ECHO_T}$with_profile" >&6
4225 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4226
4227 fi
4228
4229 ###############################################################################
4230
4231 echo "$as_me:4231: checking for specified models" >&5
4232 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4233 test -z "$cf_list_models" && cf_list_models=normal
4234 test "$with_libtool" != "no" && cf_list_models=libtool
4235 echo "$as_me:4235: result: $cf_list_models" >&5
4236 echo "${ECHO_T}$cf_list_models" >&6
4237
4238 ### Use the first model as the default, and save its suffix for use in building
4239 ### up test-applications.
4240 echo "$as_me:4240: checking for default model" >&5
4241 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4242 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4243 echo "$as_me:4243: result: $DFT_LWR_MODEL" >&5
4244 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4245
4246 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4247
4248 TICS_NAME=tic
4249
4250 TINFO_NAME=tinfo
4251
4252 LIB_NAME=ncurses
4253
4254 LIB_DIR=../lib
4255 LIB_2ND=../../lib
4256
4257         case $cf_cv_system_name in
4258         OS/2*)  LIB_PREFIX=''     ;;
4259         os2*)   LIB_PREFIX=''     ;;
4260         *)      LIB_PREFIX='lib'  ;;
4261         esac
4262 cf_prefix=$LIB_PREFIX
4263
4264 LIB_PREFIX=$cf_prefix
4265
4266 LIB_SUFFIX=
4267
4268 ###############################################################################
4269
4270 echo "$as_me:4270: checking if you want to build a separate terminfo library" >&5
4271 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4272
4273 # Check whether --with-termlib or --without-termlib was given.
4274 if test "${with_termlib+set}" = set; then
4275   withval="$with_termlib"
4276   with_termlib=$withval
4277 else
4278   with_termlib=no
4279 fi;
4280 echo "$as_me:4280: result: $with_termlib" >&5
4281 echo "${ECHO_T}$with_termlib" >&6
4282
4283 echo "$as_me:4283: checking if you want to build a separate tic library" >&5
4284 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4285
4286 # Check whether --with-ticlib or --without-ticlib was given.
4287 if test "${with_ticlib+set}" = set; then
4288   withval="$with_ticlib"
4289   with_ticlib=$withval
4290 else
4291   with_ticlib=no
4292 fi;
4293 echo "$as_me:4293: result: $with_ticlib" >&5
4294 echo "${ECHO_T}$with_ticlib" >&6
4295
4296 ### Checks for special libraries, must be done up-front.
4297 SHLIB_LIST=""
4298
4299 echo "$as_me:4299: checking if you want to link with the GPM mouse library" >&5
4300 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4301
4302 # Check whether --with-gpm or --without-gpm was given.
4303 if test "${with_gpm+set}" = set; then
4304   withval="$with_gpm"
4305   with_gpm=$withval
4306 else
4307   with_gpm=maybe
4308 fi;
4309 echo "$as_me:4309: result: $with_gpm" >&5
4310 echo "${ECHO_T}$with_gpm" >&6
4311
4312 if test "$with_gpm" != no ; then
4313         echo "$as_me:4313: checking for gpm.h" >&5
4314 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4315 if test "${ac_cv_header_gpm_h+set}" = set; then
4316   echo $ECHO_N "(cached) $ECHO_C" >&6
4317 else
4318   cat >conftest.$ac_ext <<_ACEOF
4319 #line 4319 "configure"
4320 #include "confdefs.h"
4321 #include <gpm.h>
4322 _ACEOF
4323 if { (eval echo "$as_me:4323: \"$ac_cpp conftest.$ac_ext\"") >&5
4324   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4325   ac_status=$?
4326   egrep -v '^ *\+' conftest.er1 >conftest.err
4327   rm -f conftest.er1
4328   cat conftest.err >&5
4329   echo "$as_me:4329: \$? = $ac_status" >&5
4330   (exit $ac_status); } >/dev/null; then
4331   if test -s conftest.err; then
4332     ac_cpp_err=$ac_c_preproc_warn_flag
4333   else
4334     ac_cpp_err=
4335   fi
4336 else
4337   ac_cpp_err=yes
4338 fi
4339 if test -z "$ac_cpp_err"; then
4340   ac_cv_header_gpm_h=yes
4341 else
4342   echo "$as_me: failed program was:" >&5
4343   cat conftest.$ac_ext >&5
4344   ac_cv_header_gpm_h=no
4345 fi
4346 rm -f conftest.err conftest.$ac_ext
4347 fi
4348 echo "$as_me:4348: result: $ac_cv_header_gpm_h" >&5
4349 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4350 if test $ac_cv_header_gpm_h = yes; then
4351
4352                 cat >>confdefs.h <<\EOF
4353 #define HAVE_GPM_H 1
4354 EOF
4355
4356                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4357                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4358
4359                         cat >>confdefs.h <<\EOF
4360 #define HAVE_LIBGPM 1
4361 EOF
4362
4363                 else
4364                         echo "$as_me:4364: checking for Gpm_Open in -lgpm" >&5
4365 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4366 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4367   echo $ECHO_N "(cached) $ECHO_C" >&6
4368 else
4369   ac_check_lib_save_LIBS=$LIBS
4370 LIBS="-lgpm  $LIBS"
4371 cat >conftest.$ac_ext <<_ACEOF
4372 #line 4372 "configure"
4373 #include "confdefs.h"
4374
4375 /* Override any gcc2 internal prototype to avoid an error.  */
4376 #ifdef __cplusplus
4377 extern "C"
4378 #endif
4379 /* We use char because int might match the return type of a gcc2
4380    builtin and then its argument prototype would still apply.  */
4381 char Gpm_Open ();
4382 int
4383 main ()
4384 {
4385 Gpm_Open ();
4386   ;
4387   return 0;
4388 }
4389 _ACEOF
4390 rm -f conftest.$ac_objext conftest$ac_exeext
4391 if { (eval echo "$as_me:4391: \"$ac_link\"") >&5
4392   (eval $ac_link) 2>&5
4393   ac_status=$?
4394   echo "$as_me:4394: \$? = $ac_status" >&5
4395   (exit $ac_status); } &&
4396          { ac_try='test -s conftest$ac_exeext'
4397   { (eval echo "$as_me:4397: \"$ac_try\"") >&5
4398   (eval $ac_try) 2>&5
4399   ac_status=$?
4400   echo "$as_me:4400: \$? = $ac_status" >&5
4401   (exit $ac_status); }; }; then
4402   ac_cv_lib_gpm_Gpm_Open=yes
4403 else
4404   echo "$as_me: failed program was:" >&5
4405 cat conftest.$ac_ext >&5
4406 ac_cv_lib_gpm_Gpm_Open=no
4407 fi
4408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4409 LIBS=$ac_check_lib_save_LIBS
4410 fi
4411 echo "$as_me:4411: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4412 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4413 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4414   :
4415 else
4416
4417                                 { { echo "$as_me:4417: error: Cannot link with GPM library" >&5
4418 echo "$as_me: error: Cannot link with GPM library" >&2;}
4419    { (exit 1); exit 1; }; }
4420                 fi
4421                 with_gpm=yes
4422
4423 fi
4424
4425 else
4426
4427                 test "$with_gpm" != maybe && { echo "$as_me:4427: WARNING: Cannot find GPM header" >&5
4428 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4429                 with_gpm=no
4430
4431 fi
4432
4433 fi
4434
4435 if test "$with_gpm" != no ; then
4436         echo "$as_me:4436: checking if you want to load GPM dynamically" >&5
4437 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4438
4439 # Check whether --with-dlsym or --without-dlsym was given.
4440 if test "${with_dlsym+set}" = set; then
4441   withval="$with_dlsym"
4442   with_dlsym=$withval
4443 else
4444   with_dlsym=yes
4445 fi;
4446         echo "$as_me:4446: result: $with_dlsym" >&5
4447 echo "${ECHO_T}$with_dlsym" >&6
4448         if test "$with_dlsym" = yes ; then
4449
4450 cf_have_dlsym=no
4451 echo "$as_me:4451: checking for dlsym" >&5
4452 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4453 if test "${ac_cv_func_dlsym+set}" = set; then
4454   echo $ECHO_N "(cached) $ECHO_C" >&6
4455 else
4456   cat >conftest.$ac_ext <<_ACEOF
4457 #line 4457 "configure"
4458 #include "confdefs.h"
4459 /* System header to define __stub macros and hopefully few prototypes,
4460     which can conflict with char dlsym (); below.  */
4461 #include <assert.h>
4462 /* Override any gcc2 internal prototype to avoid an error.  */
4463 #ifdef __cplusplus
4464 extern "C"
4465 #endif
4466 /* We use char because int might match the return type of a gcc2
4467    builtin and then its argument prototype would still apply.  */
4468 char dlsym ();
4469 char (*f) ();
4470
4471 int
4472 main ()
4473 {
4474 /* The GNU C library defines this for functions which it implements
4475     to always fail with ENOSYS.  Some functions are actually named
4476     something starting with __ and the normal name is an alias.  */
4477 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4478 choke me
4479 #else
4480 f = dlsym;
4481 #endif
4482
4483   ;
4484   return 0;
4485 }
4486 _ACEOF
4487 rm -f conftest.$ac_objext conftest$ac_exeext
4488 if { (eval echo "$as_me:4488: \"$ac_link\"") >&5
4489   (eval $ac_link) 2>&5
4490   ac_status=$?
4491   echo "$as_me:4491: \$? = $ac_status" >&5
4492   (exit $ac_status); } &&
4493          { ac_try='test -s conftest$ac_exeext'
4494   { (eval echo "$as_me:4494: \"$ac_try\"") >&5
4495   (eval $ac_try) 2>&5
4496   ac_status=$?
4497   echo "$as_me:4497: \$? = $ac_status" >&5
4498   (exit $ac_status); }; }; then
4499   ac_cv_func_dlsym=yes
4500 else
4501   echo "$as_me: failed program was:" >&5
4502 cat conftest.$ac_ext >&5
4503 ac_cv_func_dlsym=no
4504 fi
4505 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4506 fi
4507 echo "$as_me:4507: result: $ac_cv_func_dlsym" >&5
4508 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4509 if test $ac_cv_func_dlsym = yes; then
4510   cf_have_dlsym=yes
4511 else
4512
4513 cf_have_libdl=no
4514 echo "$as_me:4514: checking for dlsym in -ldl" >&5
4515 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4516 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4517   echo $ECHO_N "(cached) $ECHO_C" >&6
4518 else
4519   ac_check_lib_save_LIBS=$LIBS
4520 LIBS="-ldl  $LIBS"
4521 cat >conftest.$ac_ext <<_ACEOF
4522 #line 4522 "configure"
4523 #include "confdefs.h"
4524
4525 /* Override any gcc2 internal prototype to avoid an error.  */
4526 #ifdef __cplusplus
4527 extern "C"
4528 #endif
4529 /* We use char because int might match the return type of a gcc2
4530    builtin and then its argument prototype would still apply.  */
4531 char dlsym ();
4532 int
4533 main ()
4534 {
4535 dlsym ();
4536   ;
4537   return 0;
4538 }
4539 _ACEOF
4540 rm -f conftest.$ac_objext conftest$ac_exeext
4541 if { (eval echo "$as_me:4541: \"$ac_link\"") >&5
4542   (eval $ac_link) 2>&5
4543   ac_status=$?
4544   echo "$as_me:4544: \$? = $ac_status" >&5
4545   (exit $ac_status); } &&
4546          { ac_try='test -s conftest$ac_exeext'
4547   { (eval echo "$as_me:4547: \"$ac_try\"") >&5
4548   (eval $ac_try) 2>&5
4549   ac_status=$?
4550   echo "$as_me:4550: \$? = $ac_status" >&5
4551   (exit $ac_status); }; }; then
4552   ac_cv_lib_dl_dlsym=yes
4553 else
4554   echo "$as_me: failed program was:" >&5
4555 cat conftest.$ac_ext >&5
4556 ac_cv_lib_dl_dlsym=no
4557 fi
4558 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4559 LIBS=$ac_check_lib_save_LIBS
4560 fi
4561 echo "$as_me:4561: result: $ac_cv_lib_dl_dlsym" >&5
4562 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4563 if test $ac_cv_lib_dl_dlsym = yes; then
4564
4565         cf_have_dlsym=yes
4566         cf_have_libdl=yes
4567 fi
4568
4569 fi
4570
4571 if test "$cf_have_dlsym" = yes ; then
4572         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4573
4574         echo "$as_me:4574: checking whether able to link to dl*() functions" >&5
4575 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4576         cat >conftest.$ac_ext <<_ACEOF
4577 #line 4577 "configure"
4578 #include "confdefs.h"
4579 #include <dlfcn.h>
4580 int
4581 main ()
4582 {
4583
4584                 void *obj;
4585                 if ((obj = dlopen("filename", 0)) != 0) {
4586                         if (dlsym(obj, "symbolname") == 0) {
4587                         dlclose(obj);
4588                         }
4589                 }
4590   ;
4591   return 0;
4592 }
4593 _ACEOF
4594 rm -f conftest.$ac_objext conftest$ac_exeext
4595 if { (eval echo "$as_me:4595: \"$ac_link\"") >&5
4596   (eval $ac_link) 2>&5
4597   ac_status=$?
4598   echo "$as_me:4598: \$? = $ac_status" >&5
4599   (exit $ac_status); } &&
4600          { ac_try='test -s conftest$ac_exeext'
4601   { (eval echo "$as_me:4601: \"$ac_try\"") >&5
4602   (eval $ac_try) 2>&5
4603   ac_status=$?
4604   echo "$as_me:4604: \$? = $ac_status" >&5
4605   (exit $ac_status); }; }; then
4606
4607                 cat >>confdefs.h <<\EOF
4608 #define HAVE_LIBDL 1
4609 EOF
4610
4611 else
4612   echo "$as_me: failed program was:" >&5
4613 cat conftest.$ac_ext >&5
4614
4615                 { { echo "$as_me:4615: error: Cannot link test program for libdl" >&5
4616 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4617    { (exit 1); exit 1; }; }
4618 fi
4619 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4620         echo "$as_me:4620: result: ok" >&5
4621 echo "${ECHO_T}ok" >&6
4622 else
4623         { { echo "$as_me:4623: error: Cannot find dlsym function" >&5
4624 echo "$as_me: error: Cannot find dlsym function" >&2;}
4625    { (exit 1); exit 1; }; }
4626 fi
4627
4628                 if test "$with_gpm" != yes ; then
4629                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4630
4631                         cf_cv_gpm_soname="$with_gpm"
4632                 else
4633
4634 echo "$as_me:4634: checking for soname of gpm library" >&5
4635 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4636 if test "${cf_cv_gpm_soname+set}" = set; then
4637   echo $ECHO_N "(cached) $ECHO_C" >&6
4638 else
4639
4640 cf_cv_gpm_soname=unknown
4641 if test "$cross_compiling" != yes ; then
4642 cat >conftest.$ac_ext <<CF_EOF
4643 #include <gpm.h>
4644 int main()
4645 {
4646 if (Gpm_Open(0,0)) Gpm_Close();
4647         ${cf_cv_main_return:-return}(0);
4648 }
4649 CF_EOF
4650 cf_save_LIBS="$LIBS"
4651         LIBS="-lgpm $LIBS"
4652         if { (eval echo "$as_me:4652: \"$ac_compile\"") >&5
4653   (eval $ac_compile) 2>&5
4654   ac_status=$?
4655   echo "$as_me:4655: \$? = $ac_status" >&5
4656   (exit $ac_status); } ; then
4657                 if { (eval echo "$as_me:4657: \"$ac_link\"") >&5
4658   (eval $ac_link) 2>&5
4659   ac_status=$?
4660   echo "$as_me:4660: \$? = $ac_status" >&5
4661   (exit $ac_status); } ; then
4662                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4663                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4664                 fi
4665         fi
4666 rm -f conftest*
4667 LIBS="$cf_save_LIBS"
4668 fi
4669
4670 fi
4671 echo "$as_me:4671: result: $cf_cv_gpm_soname" >&5
4672 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4673
4674                 fi
4675                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4676 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4677 EOF
4678
4679                 SHLIB_LIST="-ldl $SHLIB_LIST"
4680         else
4681                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4682         fi
4683         cat >>confdefs.h <<\EOF
4684 #define HAVE_LIBGPM 1
4685 EOF
4686
4687         echo "$as_me:4687: checking for Gpm_Wgetch in -lgpm" >&5
4688 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4689 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4690   echo $ECHO_N "(cached) $ECHO_C" >&6
4691 else
4692   ac_check_lib_save_LIBS=$LIBS
4693 LIBS="-lgpm  $LIBS"
4694 cat >conftest.$ac_ext <<_ACEOF
4695 #line 4695 "configure"
4696 #include "confdefs.h"
4697
4698 /* Override any gcc2 internal prototype to avoid an error.  */
4699 #ifdef __cplusplus
4700 extern "C"
4701 #endif
4702 /* We use char because int might match the return type of a gcc2
4703    builtin and then its argument prototype would still apply.  */
4704 char Gpm_Wgetch ();
4705 int
4706 main ()
4707 {
4708 Gpm_Wgetch ();
4709   ;
4710   return 0;
4711 }
4712 _ACEOF
4713 rm -f conftest.$ac_objext conftest$ac_exeext
4714 if { (eval echo "$as_me:4714: \"$ac_link\"") >&5
4715   (eval $ac_link) 2>&5
4716   ac_status=$?
4717   echo "$as_me:4717: \$? = $ac_status" >&5
4718   (exit $ac_status); } &&
4719          { ac_try='test -s conftest$ac_exeext'
4720   { (eval echo "$as_me:4720: \"$ac_try\"") >&5
4721   (eval $ac_try) 2>&5
4722   ac_status=$?
4723   echo "$as_me:4723: \$? = $ac_status" >&5
4724   (exit $ac_status); }; }; then
4725   ac_cv_lib_gpm_Gpm_Wgetch=yes
4726 else
4727   echo "$as_me: failed program was:" >&5
4728 cat conftest.$ac_ext >&5
4729 ac_cv_lib_gpm_Gpm_Wgetch=no
4730 fi
4731 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4732 LIBS=$ac_check_lib_save_LIBS
4733 fi
4734 echo "$as_me:4734: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4735 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4736 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4737
4738                 { echo "$as_me:4738: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4739 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4740
4741 fi
4742
4743 fi
4744
4745 # not everyone has "test -c"
4746 if test -c /dev/sysmouse 2>/dev/null ; then
4747 echo "$as_me:4747: checking if you want to use sysmouse" >&5
4748 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4749
4750 # Check whether --with-sysmouse or --without-sysmouse was given.
4751 if test "${with_sysmouse+set}" = set; then
4752   withval="$with_sysmouse"
4753   cf_with_sysmouse=$withval
4754 else
4755   cf_with_sysmouse=maybe
4756 fi;
4757         if test "$cf_with_sysmouse" != no ; then
4758         cat >conftest.$ac_ext <<_ACEOF
4759 #line 4759 "configure"
4760 #include "confdefs.h"
4761
4762 #include <osreldate.h>
4763 #if (__FreeBSD_version >= 400017)
4764 #include <sys/consio.h>
4765 #include <sys/fbio.h>
4766 #else
4767 #include <machine/console.h>
4768 #endif
4769
4770 int
4771 main ()
4772 {
4773
4774         struct mouse_info the_mouse;
4775         ioctl(0, CONS_MOUSECTL, &the_mouse);
4776
4777   ;
4778   return 0;
4779 }
4780 _ACEOF
4781 rm -f conftest.$ac_objext
4782 if { (eval echo "$as_me:4782: \"$ac_compile\"") >&5
4783   (eval $ac_compile) 2>&5
4784   ac_status=$?
4785   echo "$as_me:4785: \$? = $ac_status" >&5
4786   (exit $ac_status); } &&
4787          { ac_try='test -s conftest.$ac_objext'
4788   { (eval echo "$as_me:4788: \"$ac_try\"") >&5
4789   (eval $ac_try) 2>&5
4790   ac_status=$?
4791   echo "$as_me:4791: \$? = $ac_status" >&5
4792   (exit $ac_status); }; }; then
4793   cf_with_sysmouse=yes
4794 else
4795   echo "$as_me: failed program was:" >&5
4796 cat conftest.$ac_ext >&5
4797 cf_with_sysmouse=no
4798 fi
4799 rm -f conftest.$ac_objext conftest.$ac_ext
4800         fi
4801 echo "$as_me:4801: result: $cf_with_sysmouse" >&5
4802 echo "${ECHO_T}$cf_with_sysmouse" >&6
4803 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4804 #define USE_SYSMOUSE 1
4805 EOF
4806
4807 fi
4808
4809 if test X"$CC_G_OPT" = X"" ; then
4810         CC_G_OPT='-g'
4811         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4812 fi
4813
4814 if test X"$CXX_G_OPT" = X"" ; then
4815         CXX_G_OPT='-g'
4816         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4817 fi
4818
4819 echo "$as_me:4819: checking for default loader flags" >&5
4820 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4821 case $DFT_LWR_MODEL in
4822 libtool) LD_MODEL=''   ;;
4823 normal)  LD_MODEL=''   ;;
4824 debug)   LD_MODEL=$CC_G_OPT ;;
4825 profile) LD_MODEL='-pg';;
4826 shared)  LD_MODEL=''   ;;
4827 esac
4828 echo "$as_me:4828: result: $LD_MODEL" >&5
4829 echo "${ECHO_T}$LD_MODEL" >&6
4830
4831 echo "$as_me:4831: checking if rpath option should be used" >&5
4832 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4833
4834 # Check whether --enable-rpath or --disable-rpath was given.
4835 if test "${enable_rpath+set}" = set; then
4836   enableval="$enable_rpath"
4837   cf_cv_ld_rpath=$enableval
4838 else
4839   cf_cv_ld_rpath=no
4840 fi;
4841 echo "$as_me:4841: result: $cf_cv_ld_rpath" >&5
4842 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4843
4844         LOCAL_LDFLAGS=
4845         LOCAL_LDFLAGS2=
4846         LD_SHARED_OPTS=
4847         INSTALL_LIB="-m 644"
4848
4849         cf_cv_do_symlinks=no
4850
4851         echo "$as_me:4851: checking if release/abi version should be used for shared libs" >&5
4852 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4853
4854 # Check whether --with-shlib-version or --without-shlib-version was given.
4855 if test "${with_shlib_version+set}" = set; then
4856   withval="$with_shlib_version"
4857   test -z "$withval" && withval=auto
4858         case $withval in #(vi
4859         yes) #(vi
4860                 cf_cv_shlib_version=auto
4861                 ;;
4862         rel|abi|auto|no) #(vi
4863                 cf_cv_shlib_version=$withval
4864                 ;;
4865         *)
4866                 { { echo "$as_me:4866: error: option value must be one of: rel, abi, auto or no" >&5
4867 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4868    { (exit 1); exit 1; }; }
4869                 ;;
4870         esac
4871
4872 else
4873   cf_cv_shlib_version=auto
4874 fi;
4875         echo "$as_me:4875: result: $cf_cv_shlib_version" >&5
4876 echo "${ECHO_T}$cf_cv_shlib_version" >&6
4877
4878         cf_cv_rm_so_locs=no
4879
4880         # Some less-capable ports of gcc support only -fpic
4881         CC_SHARED_OPTS=
4882         if test "$GCC" = yes
4883         then
4884                 echo "$as_me:4884: checking which $CC option to use" >&5
4885 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4886                 cf_save_CFLAGS="$CFLAGS"
4887                 for CC_SHARED_OPTS in -fPIC -fpic ''
4888                 do
4889                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4890                         cat >conftest.$ac_ext <<_ACEOF
4891 #line 4891 "configure"
4892 #include "confdefs.h"
4893 #include <stdio.h>
4894 int
4895 main ()
4896 {
4897 int x = 1
4898   ;
4899   return 0;
4900 }
4901 _ACEOF
4902 rm -f conftest.$ac_objext
4903 if { (eval echo "$as_me:4903: \"$ac_compile\"") >&5
4904   (eval $ac_compile) 2>&5
4905   ac_status=$?
4906   echo "$as_me:4906: \$? = $ac_status" >&5
4907   (exit $ac_status); } &&
4908          { ac_try='test -s conftest.$ac_objext'
4909   { (eval echo "$as_me:4909: \"$ac_try\"") >&5
4910   (eval $ac_try) 2>&5
4911   ac_status=$?
4912   echo "$as_me:4912: \$? = $ac_status" >&5
4913   (exit $ac_status); }; }; then
4914   break
4915 else
4916   echo "$as_me: failed program was:" >&5
4917 cat conftest.$ac_ext >&5
4918 fi
4919 rm -f conftest.$ac_objext conftest.$ac_ext
4920                 done
4921                 echo "$as_me:4921: result: $CC_SHARED_OPTS" >&5
4922 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4923                 CFLAGS="$cf_save_CFLAGS"
4924         fi
4925
4926         cf_cv_shlib_version_infix=no
4927
4928         case $cf_cv_system_name in
4929         beos*)
4930                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
4931                 ;;
4932         cygwin*)
4933                 CC_SHARED_OPTS=
4934                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,--out-implib=../lib/${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/${SHARED_LIB}'
4935                 cf_cv_shlib_version=cygdll
4936                 cf_cv_shlib_version_infix=cygdll
4937                 ;;
4938         darwin*)
4939                 EXTRA_CFLAGS="-no-cpp-precomp"
4940                 CC_SHARED_OPTS="-dynamic"
4941                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${DESTDIR}${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
4942                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
4943                 cf_cv_shlib_version_infix=yes
4944                 echo "$as_me:4944: checking if ld -search_paths_first works" >&5
4945 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
4946 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
4947   echo $ECHO_N "(cached) $ECHO_C" >&6
4948 else
4949
4950                         cf_save_LDFLAGS=$LDFLAGS
4951                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
4952                         cat >conftest.$ac_ext <<_ACEOF
4953 #line 4953 "configure"
4954 #include "confdefs.h"
4955
4956 int
4957 main ()
4958 {
4959 int i;
4960   ;
4961   return 0;
4962 }
4963 _ACEOF
4964 rm -f conftest.$ac_objext conftest$ac_exeext
4965 if { (eval echo "$as_me:4965: \"$ac_link\"") >&5
4966   (eval $ac_link) 2>&5
4967   ac_status=$?
4968   echo "$as_me:4968: \$? = $ac_status" >&5
4969   (exit $ac_status); } &&
4970          { ac_try='test -s conftest$ac_exeext'
4971   { (eval echo "$as_me:4971: \"$ac_try\"") >&5
4972   (eval $ac_try) 2>&5
4973   ac_status=$?
4974   echo "$as_me:4974: \$? = $ac_status" >&5
4975   (exit $ac_status); }; }; then
4976   cf_cv_ldflags_search_paths_first=yes
4977 else
4978   echo "$as_me: failed program was:" >&5
4979 cat conftest.$ac_ext >&5
4980 cf_cv_ldflags_search_paths_first=no
4981 fi
4982 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4983                                 LDFLAGS=$cf_save_LDFLAGS
4984 fi
4985 echo "$as_me:4985: result: $cf_cv_ldflags_search_paths_first" >&5
4986 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
4987                 if test $cf_cv_ldflags_search_paths_first = yes; then
4988                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
4989                 fi
4990                 ;;
4991         hpux*)
4992                 # (tested with gcc 2.7.2 -- I don't have c89)
4993                 if test "$GCC" = yes; then
4994                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
4995                 else
4996                         CC_SHARED_OPTS='+Z'
4997                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
4998                 fi
4999                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5000                 # HP-UX shared libraries must be executable, and should be
5001                 # readonly to exploit a quirk in the memory manager.
5002                 INSTALL_LIB="-m 555"
5003                 ;;
5004         irix*)
5005                 if test "$cf_cv_ld_rpath" = yes ; then
5006                         if test "$GCC" = yes; then
5007                                 cf_ld_rpath_opt="-Wl,-rpath,"
5008                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5009                         else
5010                                 cf_ld_rpath_opt="-rpath "
5011                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5012                         fi
5013                 fi
5014                 # tested with IRIX 5.2 and 'cc'.
5015                 if test "$GCC" != yes; then
5016                         CC_SHARED_OPTS='-KPIC'
5017                 fi
5018                 MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5019                 cf_cv_rm_so_locs=yes
5020                 ;;
5021         linux*|gnu*|k*bsd*-gnu)
5022                 if test "$DFT_LWR_MODEL" = "shared" ; then
5023                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5024                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5025                 fi
5026                 if test "$cf_cv_ld_rpath" = yes ; then
5027                         cf_ld_rpath_opt="-Wl,-rpath,"
5028                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5029                 fi
5030
5031         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5032         if test "$cf_cv_shlib_version" = rel; then
5033                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5034         else
5035                 cf_shared_soname='`basename $@`'
5036         fi
5037
5038                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
5039                 ;;
5040         openbsd[2-9].*)
5041                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5042                 MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5043                 ;;
5044         openbsd*|freebsd[12].*)
5045                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5046                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5047                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5048                 ;;
5049         freebsd*)
5050                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5051                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5052                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5053                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5054                         cf_ld_rpath_opt="-rpath "
5055                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5056                 fi
5057
5058         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5059         if test "$cf_cv_shlib_version" = rel; then
5060                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5061         else
5062                 cf_shared_soname='`basename $@`'
5063         fi
5064
5065                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5066                 ;;
5067         netbsd*)
5068                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5069                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5070                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5071                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5072                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5073                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5074                         if test "$cf_cv_shlib_version" = auto; then
5075                         if test -f /usr/libexec/ld.elf_so; then
5076                                 cf_cv_shlib_version=abi
5077                         else
5078                                 cf_cv_shlib_version=rel
5079                         fi
5080                         fi
5081
5082         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5083         if test "$cf_cv_shlib_version" = rel; then
5084                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5085         else
5086                 cf_shared_soname='`basename $@`'
5087         fi
5088
5089                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $@'
5090                 else
5091                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5092                 fi
5093                 ;;
5094         osf*|mls+*)
5095                 # tested with OSF/1 V3.2 and 'cc'
5096                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5097                 # link with shared libs).
5098                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5099                 case $host_os in
5100                 osf4*)
5101                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5102                         ;;
5103                 esac
5104                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5105                 if test "$DFT_LWR_MODEL" = "shared" ; then
5106                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5107                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5108                 fi
5109                 if test "$cf_cv_ld_rpath" = yes ; then
5110                         cf_ld_rpath_opt="-rpath"
5111                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5112                 fi
5113                 cf_cv_rm_so_locs=yes
5114                 ;;
5115         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5116                 # tested with osr5.0.5
5117                 if test "$GCC" != yes; then
5118                         CC_SHARED_OPTS='-belf -KPIC'
5119                 fi
5120                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5121                 if test "$cf_cv_ld_rpath" = yes ; then
5122                         # only way is to set LD_RUN_PATH but no switch for it
5123                         RUN_PATH=$libdir
5124                 fi
5125                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5126                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5127                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5128                 ;;
5129         sunos4*)
5130                 # tested with SunOS 4.1.1 and gcc 2.7.0
5131                 if test "$GCC" != yes; then
5132                         CC_SHARED_OPTS='-KPIC'
5133                 fi
5134                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5135                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5136                 ;;
5137         solaris2*)
5138                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5139                 if test "$GCC" != yes; then
5140                         CC_SHARED_OPTS='-KPIC'
5141                 fi
5142                 if test "$DFT_LWR_MODEL" = "shared" ; then
5143                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5144                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5145                 fi
5146                 if test "$cf_cv_ld_rpath" = yes ; then
5147                         cf_ld_rpath_opt="-R"
5148                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5149                 fi
5150
5151         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5152         if test "$cf_cv_shlib_version" = rel; then
5153                 cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5154         else
5155                 cf_shared_soname='`basename $@`'
5156         fi
5157
5158                 MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $@'
5159                 ;;
5160         sysv5uw7*|unix_sv*)
5161                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5162                 if test "$GCC" != yes; then
5163                         CC_SHARED_OPTS='-KPIC'
5164                 fi
5165                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5166                 ;;
5167         *)
5168                 CC_SHARED_OPTS='unknown'
5169                 MK_SHARED_LIB='echo unknown'
5170                 ;;
5171         esac
5172
5173         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5174         case "$cf_cv_shlib_version" in #(vi
5175         rel|abi)
5176                 case "$MK_SHARED_LIB" in #(vi
5177                 *'-o $@')
5178                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5179                         ;;
5180                 *)
5181                         { echo "$as_me:5181: WARNING: ignored --with-shlib-version" >&5
5182 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5183                         ;;
5184                 esac
5185                 ;;
5186         esac
5187
5188         if test -n "$cf_ld_rpath_opt" ; then
5189                 echo "$as_me:5189: checking if we need a space after rpath option" >&5
5190 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5191                 cf_save_LIBS="$LIBS"
5192                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5193                 cat >conftest.$ac_ext <<_ACEOF
5194 #line 5194 "configure"
5195 #include "confdefs.h"
5196
5197 int
5198 main ()
5199 {
5200
5201   ;
5202   return 0;
5203 }
5204 _ACEOF
5205 rm -f conftest.$ac_objext conftest$ac_exeext
5206 if { (eval echo "$as_me:5206: \"$ac_link\"") >&5
5207   (eval $ac_link) 2>&5
5208   ac_status=$?
5209   echo "$as_me:5209: \$? = $ac_status" >&5
5210   (exit $ac_status); } &&
5211          { ac_try='test -s conftest$ac_exeext'
5212   { (eval echo "$as_me:5212: \"$ac_try\"") >&5
5213   (eval $ac_try) 2>&5
5214   ac_status=$?
5215   echo "$as_me:5215: \$? = $ac_status" >&5
5216   (exit $ac_status); }; }; then
5217   cf_rpath_space=no
5218 else
5219   echo "$as_me: failed program was:" >&5
5220 cat conftest.$ac_ext >&5
5221 cf_rpath_space=yes
5222 fi
5223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5224                 LIBS="$cf_save_LIBS"
5225                 echo "$as_me:5225: result: $cf_rpath_space" >&5
5226 echo "${ECHO_T}$cf_rpath_space" >&6
5227                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5228                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5229         fi
5230
5231 if test "$CC_SHARED_OPTS" = "unknown"; then
5232         for model in $cf_list_models; do
5233                 if test "$model" = "shared"; then
5234                         { { echo "$as_me:5234: error: Shared libraries are not supported in this version" >&5
5235 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5236    { (exit 1); exit 1; }; }
5237                 fi
5238         done
5239 fi
5240
5241 ###############################################################################
5242
5243 ###     use option --disable-overwrite to leave out the link to -lcurses
5244 echo "$as_me:5244: checking if you wish to install ncurses overwriting curses" >&5
5245 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5246
5247 # Check whether --enable-overwrite or --disable-overwrite was given.
5248 if test "${enable_overwrite+set}" = set; then
5249   enableval="$enable_overwrite"
5250   with_overwrite=$enableval
5251 else
5252   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5253 fi;
5254 echo "$as_me:5254: result: $with_overwrite" >&5
5255 echo "${ECHO_T}$with_overwrite" >&6
5256
5257 echo "$as_me:5257: checking if external terminfo-database is used" >&5
5258 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5259
5260 # Check whether --enable-database or --disable-database was given.
5261 if test "${enable_database+set}" = set; then
5262   enableval="$enable_database"
5263   use_database=$enableval
5264 else
5265   use_database=yes
5266 fi;
5267 echo "$as_me:5267: result: $use_database" >&5
5268 echo "${ECHO_T}$use_database" >&6
5269
5270 case $host_os in #(vi
5271 os2*) #(vi
5272         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5273         ;;
5274 *) #(vi
5275         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5276         ;;
5277 esac
5278
5279         case $cf_cv_system_name in
5280         os2*)   PATHSEP=';'  ;;
5281         *)      PATHSEP=':'  ;;
5282         esac
5283
5284 if test "$use_database" != no ; then
5285         cat >>confdefs.h <<\EOF
5286 #define USE_DATABASE 1
5287 EOF
5288
5289         echo "$as_me:5289: checking which terminfo source-file will be installed" >&5
5290 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5291
5292 # Check whether --enable-database or --disable-database was given.
5293 if test "${enable_database+set}" = set; then
5294   enableval="$enable_database"
5295   TERMINFO_SRC=$withval
5296 fi;
5297         echo "$as_me:5297: result: $TERMINFO_SRC" >&5
5298 echo "${ECHO_T}$TERMINFO_SRC" >&6
5299
5300         echo "$as_me:5300: checking whether to use hashed database instead of directory/tree" >&5
5301 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5302
5303 # Check whether --with-hashed-db or --without-hashed-db was given.
5304 if test "${with_hashed_db+set}" = set; then
5305   withval="$with_hashed_db"
5306
5307 else
5308   with_hashed_db=no
5309 fi;
5310         echo "$as_me:5310: result: $with_hashed_db" >&5
5311 echo "${ECHO_T}$with_hashed_db" >&6
5312 fi
5313
5314 echo "$as_me:5314: checking for list of fallback descriptions" >&5
5315 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5316
5317 # Check whether --with-fallbacks or --without-fallbacks was given.
5318 if test "${with_fallbacks+set}" = set; then
5319   withval="$with_fallbacks"
5320   with_fallback=$withval
5321 else
5322   with_fallback=
5323 fi;
5324 echo "$as_me:5324: result: $with_fallback" >&5
5325 echo "${ECHO_T}$with_fallback" >&6
5326 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5327
5328 echo "$as_me:5328: checking if you want modern xterm or antique" >&5
5329 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5330
5331 # Check whether --with-xterm-new or --without-xterm-new was given.
5332 if test "${with_xterm_new+set}" = set; then
5333   withval="$with_xterm_new"
5334   with_xterm_new=$withval
5335 else
5336   with_xterm_new=yes
5337 fi;
5338 case $with_xterm_new in
5339 no)     with_xterm_new=xterm-old;;
5340 *)      with_xterm_new=xterm-new;;
5341 esac
5342 echo "$as_me:5342: result: $with_xterm_new" >&5
5343 echo "${ECHO_T}$with_xterm_new" >&6
5344 WHICH_XTERM=$with_xterm_new
5345
5346 MAKE_TERMINFO=
5347 if test "$use_database" = no ; then
5348         TERMINFO="${datadir}/terminfo"
5349         MAKE_TERMINFO="#"
5350 else
5351
5352 echo "$as_me:5352: checking for list of terminfo directories" >&5
5353 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5354
5355 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5356 if test "${with_terminfo_dirs+set}" = set; then
5357   withval="$with_terminfo_dirs"
5358
5359 else
5360   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5361 fi;
5362 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5363 cf_dst_path=
5364 for cf_src_path in $withval
5365 do
5366
5367 if test "x$prefix" != xNONE; then
5368   cf_path_syntax="$prefix"
5369 else
5370   cf_path_syntax="$ac_default_prefix"
5371 fi
5372
5373 case ".$cf_src_path" in #(vi
5374 .\$\(*\)*|.\'*\'*) #(vi
5375   ;;
5376 ..|./*|.\\*) #(vi
5377   ;;
5378 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5379   ;;
5380 .\${*prefix}*) #(vi
5381   eval cf_src_path="$cf_src_path"
5382   case ".$cf_src_path" in #(vi
5383   .NONE/*)
5384     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5385     ;;
5386   esac
5387   ;; #(vi
5388 .no|.NONE/*)
5389   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5390   ;;
5391 *)
5392   { { echo "$as_me:5392: error: expected a pathname, not \"$cf_src_path\"" >&5
5393 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5394    { (exit 1); exit 1; }; }
5395   ;;
5396 esac
5397
5398   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5399   cf_dst_path="${cf_dst_path}${cf_src_path}"
5400 done
5401 IFS="$ac_save_ifs"
5402
5403 eval 'TERMINFO_DIRS="$cf_dst_path"'
5404
5405 echo "$as_me:5405: result: $TERMINFO_DIRS" >&5
5406 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5407 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5408 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5409 EOF
5410
5411 echo "$as_me:5411: checking for default terminfo directory" >&5
5412 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5413
5414 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5415 if test "${with_default_terminfo_dir+set}" = set; then
5416   withval="$with_default_terminfo_dir"
5417
5418 else
5419   withval="${TERMINFO-${datadir}/terminfo}"
5420 fi;
5421 if test "x$prefix" != xNONE; then
5422   cf_path_syntax="$prefix"
5423 else
5424   cf_path_syntax="$ac_default_prefix"
5425 fi
5426
5427 case ".$withval" in #(vi
5428 .\$\(*\)*|.\'*\'*) #(vi
5429   ;;
5430 ..|./*|.\\*) #(vi
5431   ;;
5432 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5433   ;;
5434 .\${*prefix}*) #(vi
5435   eval withval="$withval"
5436   case ".$withval" in #(vi
5437   .NONE/*)
5438     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5439     ;;
5440   esac
5441   ;; #(vi
5442 .no|.NONE/*)
5443   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5444   ;;
5445 *)
5446   { { echo "$as_me:5446: error: expected a pathname, not \"$withval\"" >&5
5447 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5448    { (exit 1); exit 1; }; }
5449   ;;
5450 esac
5451
5452 TERMINFO="$withval"
5453
5454 echo "$as_me:5454: result: $TERMINFO" >&5
5455 echo "${ECHO_T}$TERMINFO" >&6
5456 cat >>confdefs.h <<EOF
5457 #define TERMINFO "$TERMINFO"
5458 EOF
5459
5460 fi
5461
5462 ###     use option --disable-big-core to make tic run on small machines
5463 ###     We need 4Mb, check if we can allocate 50% more than that.
5464 echo "$as_me:5464: checking if big-core option selected" >&5
5465 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5466
5467 # Check whether --enable-big-core or --disable-big-core was given.
5468 if test "${enable_big_core+set}" = set; then
5469   enableval="$enable_big_core"
5470   with_big_core=$enableval
5471 else
5472   if test "$cross_compiling" = yes; then
5473   with_big_core=no
5474 else
5475   cat >conftest.$ac_ext <<_ACEOF
5476 #line 5476 "configure"
5477 #include "confdefs.h"
5478
5479 #include <stdlib.h>
5480 #include <string.h>
5481 int main() {
5482         unsigned long n = 6000000L;
5483         char *s = malloc(n);
5484         if (s != 0)
5485                 s[0] = s[n-1] = 0;
5486         ${cf_cv_main_return:-return}(s == 0);
5487 }
5488 _ACEOF
5489 rm -f conftest$ac_exeext
5490 if { (eval echo "$as_me:5490: \"$ac_link\"") >&5
5491   (eval $ac_link) 2>&5
5492   ac_status=$?
5493   echo "$as_me:5493: \$? = $ac_status" >&5
5494   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5495   { (eval echo "$as_me:5495: \"$ac_try\"") >&5
5496   (eval $ac_try) 2>&5
5497   ac_status=$?
5498   echo "$as_me:5498: \$? = $ac_status" >&5
5499   (exit $ac_status); }; }; then
5500   with_big_core=yes
5501 else
5502   echo "$as_me: program exited with status $ac_status" >&5
5503 echo "$as_me: failed program was:" >&5
5504 cat conftest.$ac_ext >&5
5505 with_big_core=no
5506 fi
5507 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5508 fi
5509 fi;
5510 echo "$as_me:5510: result: $with_big_core" >&5
5511 echo "${ECHO_T}$with_big_core" >&6
5512 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5513 #define HAVE_BIG_CORE 1
5514 EOF
5515
5516 ###     use option --enable-termcap to compile in the termcap fallback support
5517 echo "$as_me:5517: checking if you want termcap-fallback support" >&5
5518 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5519
5520 # Check whether --enable-termcap or --disable-termcap was given.
5521 if test "${enable_termcap+set}" = set; then
5522   enableval="$enable_termcap"
5523   with_termcap=$enableval
5524 else
5525   with_termcap=no
5526 fi;
5527 echo "$as_me:5527: result: $with_termcap" >&5
5528 echo "${ECHO_T}$with_termcap" >&6
5529
5530 if test "$with_termcap" != "yes" ; then
5531         if test "$use_database" = no ; then
5532                 if test -z "$with_fallback" ; then
5533                         { { echo "$as_me:5533: error: You have disabled the database w/o specifying fallbacks" >&5
5534 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5535    { (exit 1); exit 1; }; }
5536                 fi
5537         fi
5538         cat >>confdefs.h <<\EOF
5539 #define PURE_TERMINFO 1
5540 EOF
5541
5542 else
5543
5544 cat >>confdefs.h <<\EOF
5545 #define USE_TERMCAP 1
5546 EOF
5547
5548 echo "$as_me:5548: checking for list of termcap files" >&5
5549 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5550
5551 # Check whether --with-termpath or --without-termpath was given.
5552 if test "${with_termpath+set}" = set; then
5553   withval="$with_termpath"
5554
5555 else
5556   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5557 fi;
5558 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5559 cf_dst_path=
5560 for cf_src_path in $withval
5561 do
5562
5563 if test "x$prefix" != xNONE; then
5564   cf_path_syntax="$prefix"
5565 else
5566   cf_path_syntax="$ac_default_prefix"
5567 fi
5568
5569 case ".$cf_src_path" in #(vi
5570 .\$\(*\)*|.\'*\'*) #(vi
5571   ;;
5572 ..|./*|.\\*) #(vi
5573   ;;
5574 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5575   ;;
5576 .\${*prefix}*) #(vi
5577   eval cf_src_path="$cf_src_path"
5578   case ".$cf_src_path" in #(vi
5579   .NONE/*)
5580     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5581     ;;
5582   esac
5583   ;; #(vi
5584 .no|.NONE/*)
5585   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5586   ;;
5587 *)
5588   { { echo "$as_me:5588: error: expected a pathname, not \"$cf_src_path\"" >&5
5589 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5590    { (exit 1); exit 1; }; }
5591   ;;
5592 esac
5593
5594   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5595   cf_dst_path="${cf_dst_path}${cf_src_path}"
5596 done
5597 IFS="$ac_save_ifs"
5598
5599 eval 'TERMPATH="$cf_dst_path"'
5600
5601 echo "$as_me:5601: result: $TERMPATH" >&5
5602 echo "${ECHO_T}$TERMPATH" >&6
5603 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5604 #define TERMPATH "$TERMPATH"
5605 EOF
5606
5607 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
5608 echo "$as_me:5608: checking if fast termcap-loader is needed" >&5
5609 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5610
5611 # Check whether --enable-getcap or --disable-getcap was given.
5612 if test "${enable_getcap+set}" = set; then
5613   enableval="$enable_getcap"
5614   with_getcap=$enableval
5615 else
5616   with_getcap=no
5617 fi;
5618 echo "$as_me:5618: result: $with_getcap" >&5
5619 echo "${ECHO_T}$with_getcap" >&6
5620 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5621 #define USE_GETCAP 1
5622 EOF
5623
5624 echo "$as_me:5624: checking if translated termcaps will be cached in ~/.terminfo" >&5
5625 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5626
5627 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5628 if test "${enable_getcap_cache+set}" = set; then
5629   enableval="$enable_getcap_cache"
5630   with_getcap_cache=$enableval
5631 else
5632   with_getcap_cache=no
5633 fi;
5634 echo "$as_me:5634: result: $with_getcap_cache" >&5
5635 echo "${ECHO_T}$with_getcap_cache" >&6
5636 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5637 #define USE_GETCAP_CACHE 1
5638 EOF
5639
5640 fi
5641
5642 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5643 echo "$as_me:5643: checking if ~/.terminfo is wanted" >&5
5644 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5645
5646 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5647 if test "${enable_home_terminfo+set}" = set; then
5648   enableval="$enable_home_terminfo"
5649   with_home_terminfo=$enableval
5650 else
5651   with_home_terminfo=yes
5652 fi;
5653 echo "$as_me:5653: result: $with_home_terminfo" >&5
5654 echo "${ECHO_T}$with_home_terminfo" >&6
5655 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5656 #define USE_HOME_TERMINFO 1
5657 EOF
5658
5659 echo "$as_me:5659: checking if you want to use restricted environment when running as root" >&5
5660 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5661
5662 # Check whether --enable-root-environ or --disable-root-environ was given.
5663 if test "${enable_root_environ+set}" = set; then
5664   enableval="$enable_root_environ"
5665   with_root_environ=$enableval
5666 else
5667   with_root_environ=yes
5668 fi;
5669 echo "$as_me:5669: result: $with_root_environ" >&5
5670 echo "${ECHO_T}$with_root_environ" >&6
5671 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5672 #define USE_ROOT_ENVIRON 1
5673 EOF
5674
5675 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
5676 ###   to reduce storage requirements for the terminfo database.
5677
5678 for ac_func in \
5679         remove \
5680         unlink
5681 do
5682 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5683 echo "$as_me:5683: checking for $ac_func" >&5
5684 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5685 if eval "test \"\${$as_ac_var+set}\" = set"; then
5686   echo $ECHO_N "(cached) $ECHO_C" >&6
5687 else
5688   cat >conftest.$ac_ext <<_ACEOF
5689 #line 5689 "configure"
5690 #include "confdefs.h"
5691 /* System header to define __stub macros and hopefully few prototypes,
5692     which can conflict with char $ac_func (); below.  */
5693 #include <assert.h>
5694 /* Override any gcc2 internal prototype to avoid an error.  */
5695 #ifdef __cplusplus
5696 extern "C"
5697 #endif
5698 /* We use char because int might match the return type of a gcc2
5699    builtin and then its argument prototype would still apply.  */
5700 char $ac_func ();
5701 char (*f) ();
5702
5703 int
5704 main ()
5705 {
5706 /* The GNU C library defines this for functions which it implements
5707     to always fail with ENOSYS.  Some functions are actually named
5708     something starting with __ and the normal name is an alias.  */
5709 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5710 choke me
5711 #else
5712 f = $ac_func;
5713 #endif
5714
5715   ;
5716   return 0;
5717 }
5718 _ACEOF
5719 rm -f conftest.$ac_objext conftest$ac_exeext
5720 if { (eval echo "$as_me:5720: \"$ac_link\"") >&5
5721   (eval $ac_link) 2>&5
5722   ac_status=$?
5723   echo "$as_me:5723: \$? = $ac_status" >&5
5724   (exit $ac_status); } &&
5725          { ac_try='test -s conftest$ac_exeext'
5726   { (eval echo "$as_me:5726: \"$ac_try\"") >&5
5727   (eval $ac_try) 2>&5
5728   ac_status=$?
5729   echo "$as_me:5729: \$? = $ac_status" >&5
5730   (exit $ac_status); }; }; then
5731   eval "$as_ac_var=yes"
5732 else
5733   echo "$as_me: failed program was:" >&5
5734 cat conftest.$ac_ext >&5
5735 eval "$as_ac_var=no"
5736 fi
5737 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5738 fi
5739 echo "$as_me:5739: result: `eval echo '${'$as_ac_var'}'`" >&5
5740 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5741 if test `eval echo '${'$as_ac_var'}'` = yes; then
5742   cat >>confdefs.h <<EOF
5743 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5744 EOF
5745
5746 fi
5747 done
5748
5749 if test "$cross_compiling" = yes ; then
5750
5751 for ac_func in \
5752                 link \
5753                 symlink
5754 do
5755 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5756 echo "$as_me:5756: checking for $ac_func" >&5
5757 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5758 if eval "test \"\${$as_ac_var+set}\" = set"; then
5759   echo $ECHO_N "(cached) $ECHO_C" >&6
5760 else
5761   cat >conftest.$ac_ext <<_ACEOF
5762 #line 5762 "configure"
5763 #include "confdefs.h"
5764 /* System header to define __stub macros and hopefully few prototypes,
5765     which can conflict with char $ac_func (); below.  */
5766 #include <assert.h>
5767 /* Override any gcc2 internal prototype to avoid an error.  */
5768 #ifdef __cplusplus
5769 extern "C"
5770 #endif
5771 /* We use char because int might match the return type of a gcc2
5772    builtin and then its argument prototype would still apply.  */
5773 char $ac_func ();
5774 char (*f) ();
5775
5776 int
5777 main ()
5778 {
5779 /* The GNU C library defines this for functions which it implements
5780     to always fail with ENOSYS.  Some functions are actually named
5781     something starting with __ and the normal name is an alias.  */
5782 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5783 choke me
5784 #else
5785 f = $ac_func;
5786 #endif
5787
5788   ;
5789   return 0;
5790 }
5791 _ACEOF
5792 rm -f conftest.$ac_objext conftest$ac_exeext
5793 if { (eval echo "$as_me:5793: \"$ac_link\"") >&5
5794   (eval $ac_link) 2>&5
5795   ac_status=$?
5796   echo "$as_me:5796: \$? = $ac_status" >&5
5797   (exit $ac_status); } &&
5798          { ac_try='test -s conftest$ac_exeext'
5799   { (eval echo "$as_me:5799: \"$ac_try\"") >&5
5800   (eval $ac_try) 2>&5
5801   ac_status=$?
5802   echo "$as_me:5802: \$? = $ac_status" >&5
5803   (exit $ac_status); }; }; then
5804   eval "$as_ac_var=yes"
5805 else
5806   echo "$as_me: failed program was:" >&5
5807 cat conftest.$ac_ext >&5
5808 eval "$as_ac_var=no"
5809 fi
5810 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5811 fi
5812 echo "$as_me:5812: result: `eval echo '${'$as_ac_var'}'`" >&5
5813 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5814 if test `eval echo '${'$as_ac_var'}'` = yes; then
5815   cat >>confdefs.h <<EOF
5816 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5817 EOF
5818
5819 fi
5820 done
5821
5822 else
5823         echo "$as_me:5823: checking if link/symlink functions work" >&5
5824 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5825 if test "${cf_cv_link_funcs+set}" = set; then
5826   echo $ECHO_N "(cached) $ECHO_C" >&6
5827 else
5828
5829                 cf_cv_link_funcs=
5830                 for cf_func in link symlink ; do
5831                         if test "$cross_compiling" = yes; then
5832
5833                         eval 'ac_cv_func_'$cf_func'=error'
5834 else
5835   cat >conftest.$ac_ext <<_ACEOF
5836 #line 5836 "configure"
5837 #include "confdefs.h"
5838
5839 #include <sys/types.h>
5840 #include <sys/stat.h>
5841 #ifdef HAVE_UNISTD_H
5842 #include <unistd.h>
5843 #endif
5844 int main()
5845 {
5846         int fail = 0;
5847         char *src = "config.log";
5848         char *dst = "conftest.chk";
5849         struct stat src_sb;
5850         struct stat dst_sb;
5851
5852         stat(src, &src_sb);
5853         fail = ($cf_func("config.log", "conftest.chk") < 0)
5854             || (stat(dst, &dst_sb) < 0)
5855             || (dst_sb.st_mtime != src_sb.st_mtime);
5856 #ifdef HAVE_UNLINK
5857         unlink(dst);
5858 #else
5859         remove(dst);
5860 #endif
5861         ${cf_cv_main_return:-return} (fail);
5862 }
5863
5864 _ACEOF
5865 rm -f conftest$ac_exeext
5866 if { (eval echo "$as_me:5866: \"$ac_link\"") >&5
5867   (eval $ac_link) 2>&5
5868   ac_status=$?
5869   echo "$as_me:5869: \$? = $ac_status" >&5
5870   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5871   { (eval echo "$as_me:5871: \"$ac_try\"") >&5
5872   (eval $ac_try) 2>&5
5873   ac_status=$?
5874   echo "$as_me:5874: \$? = $ac_status" >&5
5875   (exit $ac_status); }; }; then
5876
5877                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5878                         eval 'ac_cv_func_'$cf_func'=yes'
5879 else
5880   echo "$as_me: program exited with status $ac_status" >&5
5881 echo "$as_me: failed program was:" >&5
5882 cat conftest.$ac_ext >&5
5883
5884                         eval 'ac_cv_func_'$cf_func'=no'
5885 fi
5886 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5887 fi
5888                 done
5889                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5890
5891 fi
5892 echo "$as_me:5892: result: $cf_cv_link_funcs" >&5
5893 echo "${ECHO_T}$cf_cv_link_funcs" >&6
5894         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
5895 #define HAVE_LINK 1
5896 EOF
5897
5898         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
5899 #define HAVE_SYMLINK 1
5900 EOF
5901
5902 fi
5903
5904 with_links=no
5905 with_symlinks=no
5906
5907 # soft links (symbolic links) are useful for some systems where hard links do
5908 # not work, or to make it simpler to copy terminfo trees around.
5909 if test "$ac_cv_func_symlink" = yes ; then
5910     echo "$as_me:5910: checking if tic should use symbolic links" >&5
5911 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
5912
5913 # Check whether --enable-symlinks or --disable-symlinks was given.
5914 if test "${enable_symlinks+set}" = set; then
5915   enableval="$enable_symlinks"
5916   with_symlinks=$enableval
5917 else
5918   with_symlinks=no
5919 fi;
5920     echo "$as_me:5920: result: $with_symlinks" >&5
5921 echo "${ECHO_T}$with_symlinks" >&6
5922 fi
5923
5924 # If we have hard links and did not choose to use soft links instead, there is
5925 # no reason to make this choice optional - use the hard links.
5926 if test "$with_symlinks" = no ; then
5927     echo "$as_me:5927: checking if tic should use hard links" >&5
5928 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
5929     if test "$ac_cv_func_link" = yes ; then
5930         with_links=yes
5931     else
5932         with_links=no
5933     fi
5934     echo "$as_me:5934: result: $with_links" >&5
5935 echo "${ECHO_T}$with_links" >&6
5936 fi
5937
5938 test "$with_links" = yes && cat >>confdefs.h <<\EOF
5939 #define USE_LINKS 1
5940 EOF
5941
5942 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
5943 #define USE_SYMLINKS 1
5944 EOF
5945
5946 ###   use option --enable-broken-linker to force on use of broken-linker support
5947 echo "$as_me:5947: checking if you want broken-linker support code" >&5
5948 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
5949
5950 # Check whether --enable-broken_linker or --disable-broken_linker was given.
5951 if test "${enable_broken_linker+set}" = set; then
5952   enableval="$enable_broken_linker"
5953   with_broken_linker=$enableval
5954 else
5955   with_broken_linker=${BROKEN_LINKER-no}
5956 fi;
5957 echo "$as_me:5957: result: $with_broken_linker" >&5
5958 echo "${ECHO_T}$with_broken_linker" >&6
5959
5960 BROKEN_LINKER=0
5961 if test "$with_broken_linker" = yes ; then
5962         cat >>confdefs.h <<\EOF
5963 #define BROKEN_LINKER 1
5964 EOF
5965
5966         BROKEN_LINKER=1
5967 elif test "$DFT_LWR_MODEL" = shared ; then
5968         case $cf_cv_system_name in #(vi
5969         cygwin*)
5970                 cat >>confdefs.h <<\EOF
5971 #define BROKEN_LINKER 1
5972 EOF
5973
5974                 BROKEN_LINKER=1
5975                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
5976
5977                 ;;
5978         esac
5979 fi
5980
5981 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
5982 echo "$as_me:5982: checking if tputs should process BSD-style prefix padding" >&5
5983 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
5984
5985 # Check whether --enable-bsdpad or --disable-bsdpad was given.
5986 if test "${enable_bsdpad+set}" = set; then
5987   enableval="$enable_bsdpad"
5988   with_bsdpad=$enableval
5989 else
5990   with_bsdpad=no
5991 fi;
5992 echo "$as_me:5992: result: $with_bsdpad" >&5
5993 echo "${ECHO_T}$with_bsdpad" >&6
5994 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
5995 #define BSD_TPUTS 1
5996 EOF
5997
5998 ###   use option --enable-widec to turn on use of wide-character support
5999 NCURSES_CH_T=chtype
6000 NCURSES_LIBUTF8=0
6001
6002 NEED_WCHAR_H=0
6003 NCURSES_MBSTATE_T=0
6004 NCURSES_WCHAR_T=0
6005 NCURSES_WINT_T=0
6006
6007 # Check to define _XOPEN_SOURCE "automatically"
6008
6009 echo "$as_me:6009: checking if $CC -U and -D options work together" >&5
6010 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6011 if test "${cf_cv_cc_u_d_options+set}" = set; then
6012   echo $ECHO_N "(cached) $ECHO_C" >&6
6013 else
6014
6015         cf_save_CPPFLAGS="$CPPFLAGS"
6016         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6017         cat >conftest.$ac_ext <<_ACEOF
6018 #line 6018 "configure"
6019 #include "confdefs.h"
6020
6021 int
6022 main ()
6023 {
6024
6025 #ifndef U_D_OPTIONS
6026 make an undefined-error
6027 #endif
6028 #ifdef  D_U_OPTIONS
6029 make a defined-error
6030 #endif
6031
6032   ;
6033   return 0;
6034 }
6035 _ACEOF
6036 rm -f conftest.$ac_objext
6037 if { (eval echo "$as_me:6037: \"$ac_compile\"") >&5
6038   (eval $ac_compile) 2>&5
6039   ac_status=$?
6040   echo "$as_me:6040: \$? = $ac_status" >&5
6041   (exit $ac_status); } &&
6042          { ac_try='test -s conftest.$ac_objext'
6043   { (eval echo "$as_me:6043: \"$ac_try\"") >&5
6044   (eval $ac_try) 2>&5
6045   ac_status=$?
6046   echo "$as_me:6046: \$? = $ac_status" >&5
6047   (exit $ac_status); }; }; then
6048
6049         cf_cv_cc_u_d_options=yes
6050 else
6051   echo "$as_me: failed program was:" >&5
6052 cat conftest.$ac_ext >&5
6053
6054         cf_cv_cc_u_d_options=no
6055 fi
6056 rm -f conftest.$ac_objext conftest.$ac_ext
6057         CPPFLAGS="$cf_save_CPPFLAGS"
6058
6059 fi
6060 echo "$as_me:6060: result: $cf_cv_cc_u_d_options" >&5
6061 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6062
6063 cf_XOPEN_SOURCE=500
6064 cf_POSIX_C_SOURCE=199506L
6065
6066 case $host_os in #(vi
6067 aix[45]*) #(vi
6068         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6069         ;;
6070 freebsd*) #(vi
6071         # 5.x headers associate
6072         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6073         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6074         cf_POSIX_C_SOURCE=200112L
6075         cf_XOPEN_SOURCE=600
6076         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6077         ;;
6078 hpux*) #(vi
6079         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6080         ;;
6081 irix[56].*) #(vi
6082         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6083         ;;
6084 linux*|gnu*) #(vi
6085
6086 echo "$as_me:6086: checking if we must define _GNU_SOURCE" >&5
6087 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6088 if test "${cf_cv_gnu_source+set}" = set; then
6089   echo $ECHO_N "(cached) $ECHO_C" >&6
6090 else
6091
6092 cat >conftest.$ac_ext <<_ACEOF
6093 #line 6093 "configure"
6094 #include "confdefs.h"
6095 #include <sys/types.h>
6096 int
6097 main ()
6098 {
6099
6100 #ifndef _XOPEN_SOURCE
6101 make an error
6102 #endif
6103   ;
6104   return 0;
6105 }
6106 _ACEOF
6107 rm -f conftest.$ac_objext
6108 if { (eval echo "$as_me:6108: \"$ac_compile\"") >&5
6109   (eval $ac_compile) 2>&5
6110   ac_status=$?
6111   echo "$as_me:6111: \$? = $ac_status" >&5
6112   (exit $ac_status); } &&
6113          { ac_try='test -s conftest.$ac_objext'
6114   { (eval echo "$as_me:6114: \"$ac_try\"") >&5
6115   (eval $ac_try) 2>&5
6116   ac_status=$?
6117   echo "$as_me:6117: \$? = $ac_status" >&5
6118   (exit $ac_status); }; }; then
6119   cf_cv_gnu_source=no
6120 else
6121   echo "$as_me: failed program was:" >&5
6122 cat conftest.$ac_ext >&5
6123 cf_save="$CPPFLAGS"
6124          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6125          cat >conftest.$ac_ext <<_ACEOF
6126 #line 6126 "configure"
6127 #include "confdefs.h"
6128 #include <sys/types.h>
6129 int
6130 main ()
6131 {
6132
6133 #ifdef _XOPEN_SOURCE
6134 make an error
6135 #endif
6136   ;
6137   return 0;
6138 }
6139 _ACEOF
6140 rm -f conftest.$ac_objext
6141 if { (eval echo "$as_me:6141: \"$ac_compile\"") >&5
6142   (eval $ac_compile) 2>&5
6143   ac_status=$?
6144   echo "$as_me:6144: \$? = $ac_status" >&5
6145   (exit $ac_status); } &&
6146          { ac_try='test -s conftest.$ac_objext'
6147   { (eval echo "$as_me:6147: \"$ac_try\"") >&5
6148   (eval $ac_try) 2>&5
6149   ac_status=$?
6150   echo "$as_me:6150: \$? = $ac_status" >&5
6151   (exit $ac_status); }; }; then
6152   cf_cv_gnu_source=no
6153 else
6154   echo "$as_me: failed program was:" >&5
6155 cat conftest.$ac_ext >&5
6156 cf_cv_gnu_source=yes
6157 fi
6158 rm -f conftest.$ac_objext conftest.$ac_ext
6159         CPPFLAGS="$cf_save"
6160
6161 fi
6162 rm -f conftest.$ac_objext conftest.$ac_ext
6163
6164 fi
6165 echo "$as_me:6165: result: $cf_cv_gnu_source" >&5
6166 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6167 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6168
6169         ;;
6170 mirbsd*) #(vi
6171         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6172         ;;
6173 netbsd*) #(vi
6174         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6175         ;;
6176 openbsd*) #(vi
6177         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6178         ;;
6179 osf[45]*) #(vi
6180         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6181         ;;
6182 nto-qnx*) #(vi
6183         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6184         ;;
6185 sco*) #(vi
6186         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6187         ;;
6188 solaris*) #(vi
6189         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6190         ;;
6191 *)
6192         echo "$as_me:6192: checking if we should define _XOPEN_SOURCE" >&5
6193 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6194 if test "${cf_cv_xopen_source+set}" = set; then
6195   echo $ECHO_N "(cached) $ECHO_C" >&6
6196 else
6197
6198         cat >conftest.$ac_ext <<_ACEOF
6199 #line 6199 "configure"
6200 #include "confdefs.h"
6201 #include <sys/types.h>
6202 int
6203 main ()
6204 {
6205
6206 #ifndef _XOPEN_SOURCE
6207 make an error
6208 #endif
6209   ;
6210   return 0;
6211 }
6212 _ACEOF
6213 rm -f conftest.$ac_objext
6214 if { (eval echo "$as_me:6214: \"$ac_compile\"") >&5
6215   (eval $ac_compile) 2>&5
6216   ac_status=$?
6217   echo "$as_me:6217: \$? = $ac_status" >&5
6218   (exit $ac_status); } &&
6219          { ac_try='test -s conftest.$ac_objext'
6220   { (eval echo "$as_me:6220: \"$ac_try\"") >&5
6221   (eval $ac_try) 2>&5
6222   ac_status=$?
6223   echo "$as_me:6223: \$? = $ac_status" >&5
6224   (exit $ac_status); }; }; then
6225   cf_cv_xopen_source=no
6226 else
6227   echo "$as_me: failed program was:" >&5
6228 cat conftest.$ac_ext >&5
6229 cf_save="$CPPFLAGS"
6230          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6231          cat >conftest.$ac_ext <<_ACEOF
6232 #line 6232 "configure"
6233 #include "confdefs.h"
6234 #include <sys/types.h>
6235 int
6236 main ()
6237 {
6238
6239 #ifdef _XOPEN_SOURCE
6240 make an error
6241 #endif
6242   ;
6243   return 0;
6244 }
6245 _ACEOF
6246 rm -f conftest.$ac_objext
6247 if { (eval echo "$as_me:6247: \"$ac_compile\"") >&5
6248   (eval $ac_compile) 2>&5
6249   ac_status=$?
6250   echo "$as_me:6250: \$? = $ac_status" >&5
6251   (exit $ac_status); } &&
6252          { ac_try='test -s conftest.$ac_objext'
6253   { (eval echo "$as_me:6253: \"$ac_try\"") >&5
6254   (eval $ac_try) 2>&5
6255   ac_status=$?
6256   echo "$as_me:6256: \$? = $ac_status" >&5
6257   (exit $ac_status); }; }; then
6258   cf_cv_xopen_source=no
6259 else
6260   echo "$as_me: failed program was:" >&5
6261 cat conftest.$ac_ext >&5
6262 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6263 fi
6264 rm -f conftest.$ac_objext conftest.$ac_ext
6265         CPPFLAGS="$cf_save"
6266
6267 fi
6268 rm -f conftest.$ac_objext conftest.$ac_ext
6269
6270 fi
6271 echo "$as_me:6271: result: $cf_cv_xopen_source" >&5
6272 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6273         if test "$cf_cv_xopen_source" != no ; then
6274
6275 # remove _XOPEN_SOURCE symbol from $CFLAGS
6276 CFLAGS=`echo "$CFLAGS" | \
6277         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6278                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6279
6280 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6281 CPPFLAGS=`echo "$CPPFLAGS" | \
6282         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6283                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6284
6285                 test "$cf_cv_cc_u_d_options" = yes && \
6286                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6287                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6288         fi
6289
6290 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6291
6292 cf_save_CFLAGS="$CFLAGS"
6293 cf_save_CPPFLAGS="$CPPFLAGS"
6294
6295 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6296 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6297         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6298                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6299
6300 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6301 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6302         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6303                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6304
6305 echo "$as_me:6305: checking if we should define _POSIX_C_SOURCE" >&5
6306 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6307 if test "${cf_cv_posix_c_source+set}" = set; then
6308   echo $ECHO_N "(cached) $ECHO_C" >&6
6309 else
6310
6311 echo "(line 6311) testing if the symbol is already defined go no further ..." 1>&5
6312
6313         cat >conftest.$ac_ext <<_ACEOF
6314 #line 6314 "configure"
6315 #include "confdefs.h"
6316 #include <sys/types.h>
6317 int
6318 main ()
6319 {
6320
6321 #ifndef _POSIX_C_SOURCE
6322 make an error
6323 #endif
6324   ;
6325   return 0;
6326 }
6327 _ACEOF
6328 rm -f conftest.$ac_objext
6329 if { (eval echo "$as_me:6329: \"$ac_compile\"") >&5
6330   (eval $ac_compile) 2>&5
6331   ac_status=$?
6332   echo "$as_me:6332: \$? = $ac_status" >&5
6333   (exit $ac_status); } &&
6334          { ac_try='test -s conftest.$ac_objext'
6335   { (eval echo "$as_me:6335: \"$ac_try\"") >&5
6336   (eval $ac_try) 2>&5
6337   ac_status=$?
6338   echo "$as_me:6338: \$? = $ac_status" >&5
6339   (exit $ac_status); }; }; then
6340   cf_cv_posix_c_source=no
6341 else
6342   echo "$as_me: failed program was:" >&5
6343 cat conftest.$ac_ext >&5
6344 cf_want_posix_source=no
6345          case .$cf_POSIX_C_SOURCE in #(vi
6346          .[12]??*) #(vi
6347                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6348                 ;;
6349          .2) #(vi
6350                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6351                 cf_want_posix_source=yes
6352                 ;;
6353          .*)
6354                 cf_want_posix_source=yes
6355                 ;;
6356          esac
6357          if test "$cf_want_posix_source" = yes ; then
6358                 cat >conftest.$ac_ext <<_ACEOF
6359 #line 6359 "configure"
6360 #include "confdefs.h"
6361 #include <sys/types.h>
6362 int
6363 main ()
6364 {
6365
6366 #ifdef _POSIX_SOURCE
6367 make an error
6368 #endif
6369   ;
6370   return 0;
6371 }
6372 _ACEOF
6373 rm -f conftest.$ac_objext
6374 if { (eval echo "$as_me:6374: \"$ac_compile\"") >&5
6375   (eval $ac_compile) 2>&5
6376   ac_status=$?
6377   echo "$as_me:6377: \$? = $ac_status" >&5
6378   (exit $ac_status); } &&
6379          { ac_try='test -s conftest.$ac_objext'
6380   { (eval echo "$as_me:6380: \"$ac_try\"") >&5
6381   (eval $ac_try) 2>&5
6382   ac_status=$?
6383   echo "$as_me:6383: \$? = $ac_status" >&5
6384   (exit $ac_status); }; }; then
6385   :
6386 else
6387   echo "$as_me: failed program was:" >&5
6388 cat conftest.$ac_ext >&5
6389 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6390 fi
6391 rm -f conftest.$ac_objext conftest.$ac_ext
6392          fi
6393
6394 echo "(line 6394) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6395
6396          CFLAGS="$cf_trim_CFLAGS"
6397          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6398
6399 echo "(line 6399) testing if the second compile does not leave our definition intact error ..." 1>&5
6400
6401          cat >conftest.$ac_ext <<_ACEOF
6402 #line 6402 "configure"
6403 #include "confdefs.h"
6404 #include <sys/types.h>
6405 int
6406 main ()
6407 {
6408
6409 #ifndef _POSIX_C_SOURCE
6410 make an error
6411 #endif
6412   ;
6413   return 0;
6414 }
6415 _ACEOF
6416 rm -f conftest.$ac_objext
6417 if { (eval echo "$as_me:6417: \"$ac_compile\"") >&5
6418   (eval $ac_compile) 2>&5
6419   ac_status=$?
6420   echo "$as_me:6420: \$? = $ac_status" >&5
6421   (exit $ac_status); } &&
6422          { ac_try='test -s conftest.$ac_objext'
6423   { (eval echo "$as_me:6423: \"$ac_try\"") >&5
6424   (eval $ac_try) 2>&5
6425   ac_status=$?
6426   echo "$as_me:6426: \$? = $ac_status" >&5
6427   (exit $ac_status); }; }; then
6428   :
6429 else
6430   echo "$as_me: failed program was:" >&5
6431 cat conftest.$ac_ext >&5
6432 cf_cv_posix_c_source=no
6433 fi
6434 rm -f conftest.$ac_objext conftest.$ac_ext
6435          CFLAGS="$cf_save_CFLAGS"
6436          CPPFLAGS="$cf_save_CPPFLAGS"
6437
6438 fi
6439 rm -f conftest.$ac_objext conftest.$ac_ext
6440
6441 fi
6442 echo "$as_me:6442: result: $cf_cv_posix_c_source" >&5
6443 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6444
6445 if test "$cf_cv_posix_c_source" != no ; then
6446         CFLAGS="$cf_trim_CFLAGS"
6447         CPPFLAGS="$cf_trim_CPPFLAGS"
6448         if test "$cf_cv_cc_u_d_options" = yes ; then
6449                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6450                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6451                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6452         fi
6453         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6454 fi
6455
6456         ;;
6457 esac
6458
6459 # Work around breakage on OS X
6460
6461 echo "$as_me:6461: checking if SIGWINCH is defined" >&5
6462 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6463 if test "${cf_cv_define_sigwinch+set}" = set; then
6464   echo $ECHO_N "(cached) $ECHO_C" >&6
6465 else
6466
6467         cat >conftest.$ac_ext <<_ACEOF
6468 #line 6468 "configure"
6469 #include "confdefs.h"
6470
6471 #include <sys/types.h>
6472 #include <sys/signal.h>
6473
6474 int
6475 main ()
6476 {
6477 int x = SIGWINCH
6478   ;
6479   return 0;
6480 }
6481 _ACEOF
6482 rm -f conftest.$ac_objext
6483 if { (eval echo "$as_me:6483: \"$ac_compile\"") >&5
6484   (eval $ac_compile) 2>&5
6485   ac_status=$?
6486   echo "$as_me:6486: \$? = $ac_status" >&5
6487   (exit $ac_status); } &&
6488          { ac_try='test -s conftest.$ac_objext'
6489   { (eval echo "$as_me:6489: \"$ac_try\"") >&5
6490   (eval $ac_try) 2>&5
6491   ac_status=$?
6492   echo "$as_me:6492: \$? = $ac_status" >&5
6493   (exit $ac_status); }; }; then
6494   cf_cv_define_sigwinch=yes
6495 else
6496   echo "$as_me: failed program was:" >&5
6497 cat conftest.$ac_ext >&5
6498 cat >conftest.$ac_ext <<_ACEOF
6499 #line 6499 "configure"
6500 #include "confdefs.h"
6501
6502 #undef _XOPEN_SOURCE
6503 #undef _POSIX_SOURCE
6504 #undef _POSIX_C_SOURCE
6505 #include <sys/types.h>
6506 #include <sys/signal.h>
6507
6508 int
6509 main ()
6510 {
6511 int x = SIGWINCH
6512   ;
6513   return 0;
6514 }
6515 _ACEOF
6516 rm -f conftest.$ac_objext
6517 if { (eval echo "$as_me:6517: \"$ac_compile\"") >&5
6518   (eval $ac_compile) 2>&5
6519   ac_status=$?
6520   echo "$as_me:6520: \$? = $ac_status" >&5
6521   (exit $ac_status); } &&
6522          { ac_try='test -s conftest.$ac_objext'
6523   { (eval echo "$as_me:6523: \"$ac_try\"") >&5
6524   (eval $ac_try) 2>&5
6525   ac_status=$?
6526   echo "$as_me:6526: \$? = $ac_status" >&5
6527   (exit $ac_status); }; }; then
6528   cf_cv_define_sigwinch=maybe
6529 else
6530   echo "$as_me: failed program was:" >&5
6531 cat conftest.$ac_ext >&5
6532 cf_cv_define_sigwinch=no
6533 fi
6534 rm -f conftest.$ac_objext conftest.$ac_ext
6535
6536 fi
6537 rm -f conftest.$ac_objext conftest.$ac_ext
6538
6539 fi
6540 echo "$as_me:6540: result: $cf_cv_define_sigwinch" >&5
6541 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6542
6543 if test "$cf_cv_define_sigwinch" = maybe ; then
6544 echo "$as_me:6544: checking for actual SIGWINCH definition" >&5
6545 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6546 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6547   echo $ECHO_N "(cached) $ECHO_C" >&6
6548 else
6549
6550 cf_cv_fixup_sigwinch=unknown
6551 cf_sigwinch=32
6552 while test $cf_sigwinch != 1
6553 do
6554         cat >conftest.$ac_ext <<_ACEOF
6555 #line 6555 "configure"
6556 #include "confdefs.h"
6557
6558 #undef _XOPEN_SOURCE
6559 #undef _POSIX_SOURCE
6560 #undef _POSIX_C_SOURCE
6561 #include <sys/types.h>
6562 #include <sys/signal.h>
6563
6564 int
6565 main ()
6566 {
6567
6568 #if SIGWINCH != $cf_sigwinch
6569 make an error
6570 #endif
6571 int x = SIGWINCH
6572   ;
6573   return 0;
6574 }
6575 _ACEOF
6576 rm -f conftest.$ac_objext
6577 if { (eval echo "$as_me:6577: \"$ac_compile\"") >&5
6578   (eval $ac_compile) 2>&5
6579   ac_status=$?
6580   echo "$as_me:6580: \$? = $ac_status" >&5
6581   (exit $ac_status); } &&
6582          { ac_try='test -s conftest.$ac_objext'
6583   { (eval echo "$as_me:6583: \"$ac_try\"") >&5
6584   (eval $ac_try) 2>&5
6585   ac_status=$?
6586   echo "$as_me:6586: \$? = $ac_status" >&5
6587   (exit $ac_status); }; }; then
6588   cf_cv_fixup_sigwinch=$cf_sigwinch
6589          break
6590 else
6591   echo "$as_me: failed program was:" >&5
6592 cat conftest.$ac_ext >&5
6593 fi
6594 rm -f conftest.$ac_objext conftest.$ac_ext
6595
6596 cf_sigwinch=`expr $cf_sigwinch - 1`
6597 done
6598
6599 fi
6600 echo "$as_me:6600: result: $cf_cv_fixup_sigwinch" >&5
6601 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6602
6603         if test "$cf_cv_fixup_sigwinch" != unknown ; then
6604                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6605         fi
6606 fi
6607
6608 # Checks for CODESET support.
6609
6610   echo "$as_me:6610: checking for nl_langinfo and CODESET" >&5
6611 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6612 if test "${am_cv_langinfo_codeset+set}" = set; then
6613   echo $ECHO_N "(cached) $ECHO_C" >&6
6614 else
6615   cat >conftest.$ac_ext <<_ACEOF
6616 #line 6616 "configure"
6617 #include "confdefs.h"
6618 #include <langinfo.h>
6619 int
6620 main ()
6621 {
6622 char* cs = nl_langinfo(CODESET);
6623   ;
6624   return 0;
6625 }
6626 _ACEOF
6627 rm -f conftest.$ac_objext conftest$ac_exeext
6628 if { (eval echo "$as_me:6628: \"$ac_link\"") >&5
6629   (eval $ac_link) 2>&5
6630   ac_status=$?
6631   echo "$as_me:6631: \$? = $ac_status" >&5
6632   (exit $ac_status); } &&
6633          { ac_try='test -s conftest$ac_exeext'
6634   { (eval echo "$as_me:6634: \"$ac_try\"") >&5
6635   (eval $ac_try) 2>&5
6636   ac_status=$?
6637   echo "$as_me:6637: \$? = $ac_status" >&5
6638   (exit $ac_status); }; }; then
6639   am_cv_langinfo_codeset=yes
6640 else
6641   echo "$as_me: failed program was:" >&5
6642 cat conftest.$ac_ext >&5
6643 am_cv_langinfo_codeset=no
6644 fi
6645 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6646
6647 fi
6648 echo "$as_me:6648: result: $am_cv_langinfo_codeset" >&5
6649 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6650   if test $am_cv_langinfo_codeset = yes; then
6651
6652 cat >>confdefs.h <<\EOF
6653 #define HAVE_LANGINFO_CODESET 1
6654 EOF
6655
6656   fi
6657
6658 # use these variables to work around a defect in gcc's fixincludes.
6659 NCURSES_OK_WCHAR_T=
6660 NCURSES_OK_WINT_T=
6661
6662 echo "$as_me:6662: checking if you want wide-character code" >&5
6663 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6664
6665 # Check whether --enable-widec or --disable-widec was given.
6666 if test "${enable_widec+set}" = set; then
6667   enableval="$enable_widec"
6668   with_widec=$enableval
6669 else
6670   with_widec=no
6671 fi;
6672 echo "$as_me:6672: result: $with_widec" >&5
6673 echo "${ECHO_T}$with_widec" >&6
6674 if test "$with_widec" = yes ; then
6675         LIB_SUFFIX="w${LIB_SUFFIX}"
6676         cat >>confdefs.h <<\EOF
6677 #define USE_WIDEC_SUPPORT 1
6678 EOF
6679
6680 echo "$as_me:6680: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6681 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6682 cat >conftest.$ac_ext <<_ACEOF
6683 #line 6683 "configure"
6684 #include "confdefs.h"
6685 #include <sys/types.h>
6686
6687 int
6688 main ()
6689 {
6690
6691 #ifndef _XOPEN_SOURCE_EXTENDED
6692 make an error
6693 #endif
6694   ;
6695   return 0;
6696 }
6697 _ACEOF
6698 rm -f conftest.$ac_objext
6699 if { (eval echo "$as_me:6699: \"$ac_compile\"") >&5
6700   (eval $ac_compile) 2>&5
6701   ac_status=$?
6702   echo "$as_me:6702: \$? = $ac_status" >&5
6703   (exit $ac_status); } &&
6704          { ac_try='test -s conftest.$ac_objext'
6705   { (eval echo "$as_me:6705: \"$ac_try\"") >&5
6706   (eval $ac_try) 2>&5
6707   ac_status=$?
6708   echo "$as_me:6708: \$? = $ac_status" >&5
6709   (exit $ac_status); }; }; then
6710   cf_result=no
6711 else
6712   echo "$as_me: failed program was:" >&5
6713 cat conftest.$ac_ext >&5
6714 cf_result=yes
6715 fi
6716 rm -f conftest.$ac_objext conftest.$ac_ext
6717 echo "$as_me:6717: result: $cf_result" >&5
6718 echo "${ECHO_T}$cf_result" >&6
6719
6720 if test "$cf_result" = yes ; then
6721         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6722 elif test "x" != "x" ; then
6723         echo "$as_me:6723: checking checking for compatible value versus " >&5
6724 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6725         cat >conftest.$ac_ext <<_ACEOF
6726 #line 6726 "configure"
6727 #include "confdefs.h"
6728 #include <sys/types.h>
6729
6730 int
6731 main ()
6732 {
6733
6734 #if _XOPEN_SOURCE_EXTENDED- < 0
6735 make an error
6736 #endif
6737   ;
6738   return 0;
6739 }
6740 _ACEOF
6741 rm -f conftest.$ac_objext
6742 if { (eval echo "$as_me:6742: \"$ac_compile\"") >&5
6743   (eval $ac_compile) 2>&5
6744   ac_status=$?
6745   echo "$as_me:6745: \$? = $ac_status" >&5
6746   (exit $ac_status); } &&
6747          { ac_try='test -s conftest.$ac_objext'
6748   { (eval echo "$as_me:6748: \"$ac_try\"") >&5
6749   (eval $ac_try) 2>&5
6750   ac_status=$?
6751   echo "$as_me:6751: \$? = $ac_status" >&5
6752   (exit $ac_status); }; }; then
6753   cf_result=yes
6754 else
6755   echo "$as_me: failed program was:" >&5
6756 cat conftest.$ac_ext >&5
6757 cf_result=no
6758 fi
6759 rm -f conftest.$ac_objext conftest.$ac_ext
6760         echo "$as_me:6760: result: $cf_result" >&5
6761 echo "${ECHO_T}$cf_result" >&6
6762         if test "$cf_result" = no ; then
6763                 # perhaps we can override it - try...
6764                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6765         fi
6766 fi
6767
6768         # with_overwrite=no
6769         NCURSES_CH_T=cchar_t
6770
6771 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6772 do
6773 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6774 echo "$as_me:6774: checking for $ac_func" >&5
6775 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6776 if eval "test \"\${$as_ac_var+set}\" = set"; then
6777   echo $ECHO_N "(cached) $ECHO_C" >&6
6778 else
6779   cat >conftest.$ac_ext <<_ACEOF
6780 #line 6780 "configure"
6781 #include "confdefs.h"
6782 /* System header to define __stub macros and hopefully few prototypes,
6783     which can conflict with char $ac_func (); below.  */
6784 #include <assert.h>
6785 /* Override any gcc2 internal prototype to avoid an error.  */
6786 #ifdef __cplusplus
6787 extern "C"
6788 #endif
6789 /* We use char because int might match the return type of a gcc2
6790    builtin and then its argument prototype would still apply.  */
6791 char $ac_func ();
6792 char (*f) ();
6793
6794 int
6795 main ()
6796 {
6797 /* The GNU C library defines this for functions which it implements
6798     to always fail with ENOSYS.  Some functions are actually named
6799     something starting with __ and the normal name is an alias.  */
6800 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6801 choke me
6802 #else
6803 f = $ac_func;
6804 #endif
6805
6806   ;
6807   return 0;
6808 }
6809 _ACEOF
6810 rm -f conftest.$ac_objext conftest$ac_exeext
6811 if { (eval echo "$as_me:6811: \"$ac_link\"") >&5
6812   (eval $ac_link) 2>&5
6813   ac_status=$?
6814   echo "$as_me:6814: \$? = $ac_status" >&5
6815   (exit $ac_status); } &&
6816          { ac_try='test -s conftest$ac_exeext'
6817   { (eval echo "$as_me:6817: \"$ac_try\"") >&5
6818   (eval $ac_try) 2>&5
6819   ac_status=$?
6820   echo "$as_me:6820: \$? = $ac_status" >&5
6821   (exit $ac_status); }; }; then
6822   eval "$as_ac_var=yes"
6823 else
6824   echo "$as_me: failed program was:" >&5
6825 cat conftest.$ac_ext >&5
6826 eval "$as_ac_var=no"
6827 fi
6828 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6829 fi
6830 echo "$as_me:6830: result: `eval echo '${'$as_ac_var'}'`" >&5
6831 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6832 if test `eval echo '${'$as_ac_var'}'` = yes; then
6833   cat >>confdefs.h <<EOF
6834 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6835 EOF
6836
6837 fi
6838 done
6839
6840         if test "$ac_cv_func_putwc" != yes ; then
6841
6842 echo "$as_me:6842: checking for putwc in libutf8" >&5
6843 echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6844 if test "${cf_cv_libutf8+set}" = set; then
6845   echo $ECHO_N "(cached) $ECHO_C" >&6
6846 else
6847
6848         cf_save_LIBS="$LIBS"
6849         LIBS="-lutf8 $LIBS"
6850 cat >conftest.$ac_ext <<_ACEOF
6851 #line 6851 "configure"
6852 #include "confdefs.h"
6853
6854 #include <libutf8.h>
6855 int
6856 main ()
6857 {
6858 putwc(0,0);
6859   ;
6860   return 0;
6861 }
6862 _ACEOF
6863 rm -f conftest.$ac_objext conftest$ac_exeext
6864 if { (eval echo "$as_me:6864: \"$ac_link\"") >&5
6865   (eval $ac_link) 2>&5
6866   ac_status=$?
6867   echo "$as_me:6867: \$? = $ac_status" >&5
6868   (exit $ac_status); } &&
6869          { ac_try='test -s conftest$ac_exeext'
6870   { (eval echo "$as_me:6870: \"$ac_try\"") >&5
6871   (eval $ac_try) 2>&5
6872   ac_status=$?
6873   echo "$as_me:6873: \$? = $ac_status" >&5
6874   (exit $ac_status); }; }; then
6875   cf_cv_libutf8=yes
6876 else
6877   echo "$as_me: failed program was:" >&5
6878 cat conftest.$ac_ext >&5
6879 cf_cv_libutf8=no
6880 fi
6881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6882         LIBS="$cf_save_LIBS"
6883
6884 fi
6885 echo "$as_me:6885: result: $cf_cv_libutf8" >&5
6886 echo "${ECHO_T}$cf_cv_libutf8" >&6
6887
6888 if test "$cf_cv_libutf8" = yes ; then
6889         cat >>confdefs.h <<\EOF
6890 #define HAVE_LIBUTF8_H 1
6891 EOF
6892
6893         LIBS="-lutf8 $LIBS"
6894 fi
6895
6896                 if test "$cf_cv_libutf8" = yes ; then
6897                         NCURSES_LIBUTF8=1
6898                 fi
6899         fi
6900
6901 # This is needed on Tru64 5.0 to declare mbstate_t
6902 echo "$as_me:6902: checking if we must include wchar.h to declare mbstate_t" >&5
6903 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
6904 if test "${cf_cv_mbstate_t+set}" = set; then
6905   echo $ECHO_N "(cached) $ECHO_C" >&6
6906 else
6907
6908 cat >conftest.$ac_ext <<_ACEOF
6909 #line 6909 "configure"
6910 #include "confdefs.h"
6911
6912 #include <stdlib.h>
6913 #include <stdarg.h>
6914 #include <stdio.h>
6915 #ifdef HAVE_LIBUTF8_H
6916 #include <libutf8.h>
6917 #endif
6918 int
6919 main ()
6920 {
6921 mbstate_t state
6922   ;
6923   return 0;
6924 }
6925 _ACEOF
6926 rm -f conftest.$ac_objext
6927 if { (eval echo "$as_me:6927: \"$ac_compile\"") >&5
6928   (eval $ac_compile) 2>&5
6929   ac_status=$?
6930   echo "$as_me:6930: \$? = $ac_status" >&5
6931   (exit $ac_status); } &&
6932          { ac_try='test -s conftest.$ac_objext'
6933   { (eval echo "$as_me:6933: \"$ac_try\"") >&5
6934   (eval $ac_try) 2>&5
6935   ac_status=$?
6936   echo "$as_me:6936: \$? = $ac_status" >&5
6937   (exit $ac_status); }; }; then
6938   cf_cv_mbstate_t=no
6939 else
6940   echo "$as_me: failed program was:" >&5
6941 cat conftest.$ac_ext >&5
6942 cat >conftest.$ac_ext <<_ACEOF
6943 #line 6943 "configure"
6944 #include "confdefs.h"
6945
6946 #include <stdlib.h>
6947 #include <stdarg.h>
6948 #include <stdio.h>
6949 #include <wchar.h>
6950 #ifdef HAVE_LIBUTF8_H
6951 #include <libutf8.h>
6952 #endif
6953 int
6954 main ()
6955 {
6956 mbstate_t value
6957   ;
6958   return 0;
6959 }
6960 _ACEOF
6961 rm -f conftest.$ac_objext
6962 if { (eval echo "$as_me:6962: \"$ac_compile\"") >&5
6963   (eval $ac_compile) 2>&5
6964   ac_status=$?
6965   echo "$as_me:6965: \$? = $ac_status" >&5
6966   (exit $ac_status); } &&
6967          { ac_try='test -s conftest.$ac_objext'
6968   { (eval echo "$as_me:6968: \"$ac_try\"") >&5
6969   (eval $ac_try) 2>&5
6970   ac_status=$?
6971   echo "$as_me:6971: \$? = $ac_status" >&5
6972   (exit $ac_status); }; }; then
6973   cf_cv_mbstate_t=yes
6974 else
6975   echo "$as_me: failed program was:" >&5
6976 cat conftest.$ac_ext >&5
6977 cf_cv_mbstate_t=unknown
6978 fi
6979 rm -f conftest.$ac_objext conftest.$ac_ext
6980 fi
6981 rm -f conftest.$ac_objext conftest.$ac_ext
6982 fi
6983 echo "$as_me:6983: result: $cf_cv_mbstate_t" >&5
6984 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
6985
6986 if test "$cf_cv_mbstate_t" = yes ; then
6987         cat >>confdefs.h <<\EOF
6988 #define NEED_WCHAR_H 1
6989 EOF
6990
6991         NEED_WCHAR_H=1
6992 fi
6993
6994 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
6995 if test "$cf_cv_mbstate_t" = unknown ; then
6996         NCURSES_MBSTATE_T=1
6997 fi
6998
6999 # This is needed on Tru64 5.0 to declare wchar_t
7000 echo "$as_me:7000: checking if we must include wchar.h to declare wchar_t" >&5
7001 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7002 if test "${cf_cv_wchar_t+set}" = set; then
7003   echo $ECHO_N "(cached) $ECHO_C" >&6
7004 else
7005
7006 cat >conftest.$ac_ext <<_ACEOF
7007 #line 7007 "configure"
7008 #include "confdefs.h"
7009
7010 #include <stdlib.h>
7011 #include <stdarg.h>
7012 #include <stdio.h>
7013 #ifdef HAVE_LIBUTF8_H
7014 #include <libutf8.h>
7015 #endif
7016 int
7017 main ()
7018 {
7019 wchar_t state
7020   ;
7021   return 0;
7022 }
7023 _ACEOF
7024 rm -f conftest.$ac_objext
7025 if { (eval echo "$as_me:7025: \"$ac_compile\"") >&5
7026   (eval $ac_compile) 2>&5
7027   ac_status=$?
7028   echo "$as_me:7028: \$? = $ac_status" >&5
7029   (exit $ac_status); } &&
7030          { ac_try='test -s conftest.$ac_objext'
7031   { (eval echo "$as_me:7031: \"$ac_try\"") >&5
7032   (eval $ac_try) 2>&5
7033   ac_status=$?
7034   echo "$as_me:7034: \$? = $ac_status" >&5
7035   (exit $ac_status); }; }; then
7036   cf_cv_wchar_t=no
7037 else
7038   echo "$as_me: failed program was:" >&5
7039 cat conftest.$ac_ext >&5
7040 cat >conftest.$ac_ext <<_ACEOF
7041 #line 7041 "configure"
7042 #include "confdefs.h"
7043
7044 #include <stdlib.h>
7045 #include <stdarg.h>
7046 #include <stdio.h>
7047 #include <wchar.h>
7048 #ifdef HAVE_LIBUTF8_H
7049 #include <libutf8.h>
7050 #endif
7051 int
7052 main ()
7053 {
7054 wchar_t value
7055   ;
7056   return 0;
7057 }
7058 _ACEOF
7059 rm -f conftest.$ac_objext
7060 if { (eval echo "$as_me:7060: \"$ac_compile\"") >&5
7061   (eval $ac_compile) 2>&5
7062   ac_status=$?
7063   echo "$as_me:7063: \$? = $ac_status" >&5
7064   (exit $ac_status); } &&
7065          { ac_try='test -s conftest.$ac_objext'
7066   { (eval echo "$as_me:7066: \"$ac_try\"") >&5
7067   (eval $ac_try) 2>&5
7068   ac_status=$?
7069   echo "$as_me:7069: \$? = $ac_status" >&5
7070   (exit $ac_status); }; }; then
7071   cf_cv_wchar_t=yes
7072 else
7073   echo "$as_me: failed program was:" >&5
7074 cat conftest.$ac_ext >&5
7075 cf_cv_wchar_t=unknown
7076 fi
7077 rm -f conftest.$ac_objext conftest.$ac_ext
7078 fi
7079 rm -f conftest.$ac_objext conftest.$ac_ext
7080 fi
7081 echo "$as_me:7081: result: $cf_cv_wchar_t" >&5
7082 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7083
7084 if test "$cf_cv_wchar_t" = yes ; then
7085         cat >>confdefs.h <<\EOF
7086 #define NEED_WCHAR_H 1
7087 EOF
7088
7089         NEED_WCHAR_H=1
7090 fi
7091
7092 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7093 if test "$cf_cv_wchar_t" = unknown ; then
7094         NCURSES_WCHAR_T=1
7095 fi
7096
7097 # if we find wchar_t in either place, use substitution to provide a fallback.
7098 if test "$cf_cv_wchar_t" != unknown ; then
7099         NCURSES_OK_WCHAR_T=1
7100 fi
7101
7102 # This is needed on Tru64 5.0 to declare wint_t
7103 echo "$as_me:7103: checking if we must include wchar.h to declare wint_t" >&5
7104 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7105 if test "${cf_cv_wint_t+set}" = set; then
7106   echo $ECHO_N "(cached) $ECHO_C" >&6
7107 else
7108
7109 cat >conftest.$ac_ext <<_ACEOF
7110 #line 7110 "configure"
7111 #include "confdefs.h"
7112
7113 #include <stdlib.h>
7114 #include <stdarg.h>
7115 #include <stdio.h>
7116 #ifdef HAVE_LIBUTF8_H
7117 #include <libutf8.h>
7118 #endif
7119 int
7120 main ()
7121 {
7122 wint_t state
7123   ;
7124   return 0;
7125 }
7126 _ACEOF
7127 rm -f conftest.$ac_objext
7128 if { (eval echo "$as_me:7128: \"$ac_compile\"") >&5
7129   (eval $ac_compile) 2>&5
7130   ac_status=$?
7131   echo "$as_me:7131: \$? = $ac_status" >&5
7132   (exit $ac_status); } &&
7133          { ac_try='test -s conftest.$ac_objext'
7134   { (eval echo "$as_me:7134: \"$ac_try\"") >&5
7135   (eval $ac_try) 2>&5
7136   ac_status=$?
7137   echo "$as_me:7137: \$? = $ac_status" >&5
7138   (exit $ac_status); }; }; then
7139   cf_cv_wint_t=no
7140 else
7141   echo "$as_me: failed program was:" >&5
7142 cat conftest.$ac_ext >&5
7143 cat >conftest.$ac_ext <<_ACEOF
7144 #line 7144 "configure"
7145 #include "confdefs.h"
7146
7147 #include <stdlib.h>
7148 #include <stdarg.h>
7149 #include <stdio.h>
7150 #include <wchar.h>
7151 #ifdef HAVE_LIBUTF8_H
7152 #include <libutf8.h>
7153 #endif
7154 int
7155 main ()
7156 {
7157 wint_t value
7158   ;
7159   return 0;
7160 }
7161 _ACEOF
7162 rm -f conftest.$ac_objext
7163 if { (eval echo "$as_me:7163: \"$ac_compile\"") >&5
7164   (eval $ac_compile) 2>&5
7165   ac_status=$?
7166   echo "$as_me:7166: \$? = $ac_status" >&5
7167   (exit $ac_status); } &&
7168          { ac_try='test -s conftest.$ac_objext'
7169   { (eval echo "$as_me:7169: \"$ac_try\"") >&5
7170   (eval $ac_try) 2>&5
7171   ac_status=$?
7172   echo "$as_me:7172: \$? = $ac_status" >&5
7173   (exit $ac_status); }; }; then
7174   cf_cv_wint_t=yes
7175 else
7176   echo "$as_me: failed program was:" >&5
7177 cat conftest.$ac_ext >&5
7178 cf_cv_wint_t=unknown
7179 fi
7180 rm -f conftest.$ac_objext conftest.$ac_ext
7181 fi
7182 rm -f conftest.$ac_objext conftest.$ac_ext
7183 fi
7184 echo "$as_me:7184: result: $cf_cv_wint_t" >&5
7185 echo "${ECHO_T}$cf_cv_wint_t" >&6
7186
7187 if test "$cf_cv_wint_t" = yes ; then
7188         cat >>confdefs.h <<\EOF
7189 #define NEED_WCHAR_H 1
7190 EOF
7191
7192         NEED_WCHAR_H=1
7193 fi
7194
7195 # if we do not find wint_t in either place, use substitution to provide a fallback.
7196 if test "$cf_cv_wint_t" = unknown ; then
7197         NCURSES_WINT_T=1
7198 fi
7199
7200 # if we find wint_t in either place, use substitution to provide a fallback.
7201 if test "$cf_cv_wint_t" != unknown ; then
7202         NCURSES_OK_WINT_T=1
7203 fi
7204
7205         if test "$NCURSES_MBSTATE_T" != 0; then
7206                 cat >>confdefs.h <<\EOF
7207 #define NEED_MBSTATE_T_DEF 1
7208 EOF
7209
7210         fi
7211 fi
7212
7213 ###   use option --disable-lp64 to allow long chtype
7214 case $cf_cv_abi_version in
7215 [345]*)
7216         default_with_lp64=no
7217         ;;
7218 *)
7219         default_with_lp64=yes
7220         ;;
7221 esac
7222
7223 echo "$as_me:7223: checking whether to enable _LP64 definition in curses.h" >&5
7224 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7225
7226 # Check whether --enable-lp64 or --disable-lp64 was given.
7227 if test "${enable_lp64+set}" = set; then
7228   enableval="$enable_lp64"
7229   with_lp64=$enableval
7230 else
7231   with_lp64=$default_with_lp64
7232 fi;
7233 echo "$as_me:7233: result: $with_lp64" >&5
7234 echo "${ECHO_T}$with_lp64" >&6
7235
7236 if test "$with_lp64" = yes ; then
7237         cf_cv_enable_lp64=1
7238 else
7239         cf_cv_enable_lp64=0
7240 fi
7241
7242 # Check whether --enable-largefile or --disable-largefile was given.
7243 if test "${enable_largefile+set}" = set; then
7244   enableval="$enable_largefile"
7245
7246 fi;
7247 if test "$enable_largefile" != no; then
7248
7249   echo "$as_me:7249: checking for special C compiler options needed for large files" >&5
7250 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7251 if test "${ac_cv_sys_largefile_CC+set}" = set; then
7252   echo $ECHO_N "(cached) $ECHO_C" >&6
7253 else
7254   ac_cv_sys_largefile_CC=no
7255      if test "$GCC" != yes; then
7256        ac_save_CC=$CC
7257        while :; do
7258          # IRIX 6.2 and later do not support large files by default,
7259          # so use the C compiler's -n32 option if that helps.
7260          cat >conftest.$ac_ext <<_ACEOF
7261 #line 7261 "configure"
7262 #include "confdefs.h"
7263 #include <sys/types.h>
7264  /* Check that off_t can represent 2**63 - 1 correctly.
7265     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7266     since some C++ compilers masquerading as C compilers
7267     incorrectly reject 9223372036854775807.  */
7268 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7269   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7270                        && LARGE_OFF_T % 2147483647 == 1)
7271                       ? 1 : -1];
7272 int
7273 main ()
7274 {
7275
7276   ;
7277   return 0;
7278 }
7279 _ACEOF
7280          rm -f conftest.$ac_objext
7281 if { (eval echo "$as_me:7281: \"$ac_compile\"") >&5
7282   (eval $ac_compile) 2>&5
7283   ac_status=$?
7284   echo "$as_me:7284: \$? = $ac_status" >&5
7285   (exit $ac_status); } &&
7286          { ac_try='test -s conftest.$ac_objext'
7287   { (eval echo "$as_me:7287: \"$ac_try\"") >&5
7288   (eval $ac_try) 2>&5
7289   ac_status=$?
7290   echo "$as_me:7290: \$? = $ac_status" >&5
7291   (exit $ac_status); }; }; then
7292   break
7293 else
7294   echo "$as_me: failed program was:" >&5
7295 cat conftest.$ac_ext >&5
7296 fi
7297 rm -f conftest.$ac_objext
7298          CC="$CC -n32"
7299          rm -f conftest.$ac_objext
7300 if { (eval echo "$as_me:7300: \"$ac_compile\"") >&5
7301   (eval $ac_compile) 2>&5
7302   ac_status=$?
7303   echo "$as_me:7303: \$? = $ac_status" >&5
7304   (exit $ac_status); } &&
7305          { ac_try='test -s conftest.$ac_objext'
7306   { (eval echo "$as_me:7306: \"$ac_try\"") >&5
7307   (eval $ac_try) 2>&5
7308   ac_status=$?
7309   echo "$as_me:7309: \$? = $ac_status" >&5
7310   (exit $ac_status); }; }; then
7311   ac_cv_sys_largefile_CC=' -n32'; break
7312 else
7313   echo "$as_me: failed program was:" >&5
7314 cat conftest.$ac_ext >&5
7315 fi
7316 rm -f conftest.$ac_objext
7317          break
7318        done
7319        CC=$ac_save_CC
7320        rm -f conftest.$ac_ext
7321     fi
7322 fi
7323 echo "$as_me:7323: result: $ac_cv_sys_largefile_CC" >&5
7324 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7325   if test "$ac_cv_sys_largefile_CC" != no; then
7326     CC=$CC$ac_cv_sys_largefile_CC
7327   fi
7328
7329   echo "$as_me:7329: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7330 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7331 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7332   echo $ECHO_N "(cached) $ECHO_C" >&6
7333 else
7334   while :; do
7335   ac_cv_sys_file_offset_bits=no
7336   cat >conftest.$ac_ext <<_ACEOF
7337 #line 7337 "configure"
7338 #include "confdefs.h"
7339 #include <sys/types.h>
7340  /* Check that off_t can represent 2**63 - 1 correctly.
7341     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7342     since some C++ compilers masquerading as C compilers
7343     incorrectly reject 9223372036854775807.  */
7344 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7345   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7346                        && LARGE_OFF_T % 2147483647 == 1)
7347                       ? 1 : -1];
7348 int
7349 main ()
7350 {
7351
7352   ;
7353   return 0;
7354 }
7355 _ACEOF
7356 rm -f conftest.$ac_objext
7357 if { (eval echo "$as_me:7357: \"$ac_compile\"") >&5
7358   (eval $ac_compile) 2>&5
7359   ac_status=$?
7360   echo "$as_me:7360: \$? = $ac_status" >&5
7361   (exit $ac_status); } &&
7362          { ac_try='test -s conftest.$ac_objext'
7363   { (eval echo "$as_me:7363: \"$ac_try\"") >&5
7364   (eval $ac_try) 2>&5
7365   ac_status=$?
7366   echo "$as_me:7366: \$? = $ac_status" >&5
7367   (exit $ac_status); }; }; then
7368   break
7369 else
7370   echo "$as_me: failed program was:" >&5
7371 cat conftest.$ac_ext >&5
7372 fi
7373 rm -f conftest.$ac_objext conftest.$ac_ext
7374   cat >conftest.$ac_ext <<_ACEOF
7375 #line 7375 "configure"
7376 #include "confdefs.h"
7377 #define _FILE_OFFSET_BITS 64
7378 #include <sys/types.h>
7379  /* Check that off_t can represent 2**63 - 1 correctly.
7380     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7381     since some C++ compilers masquerading as C compilers
7382     incorrectly reject 9223372036854775807.  */
7383 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7384   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7385                        && LARGE_OFF_T % 2147483647 == 1)
7386                       ? 1 : -1];
7387 int
7388 main ()
7389 {
7390
7391   ;
7392   return 0;
7393 }
7394 _ACEOF
7395 rm -f conftest.$ac_objext
7396 if { (eval echo "$as_me:7396: \"$ac_compile\"") >&5
7397   (eval $ac_compile) 2>&5
7398   ac_status=$?
7399   echo "$as_me:7399: \$? = $ac_status" >&5
7400   (exit $ac_status); } &&
7401          { ac_try='test -s conftest.$ac_objext'
7402   { (eval echo "$as_me:7402: \"$ac_try\"") >&5
7403   (eval $ac_try) 2>&5
7404   ac_status=$?
7405   echo "$as_me:7405: \$? = $ac_status" >&5
7406   (exit $ac_status); }; }; then
7407   ac_cv_sys_file_offset_bits=64; break
7408 else
7409   echo "$as_me: failed program was:" >&5
7410 cat conftest.$ac_ext >&5
7411 fi
7412 rm -f conftest.$ac_objext conftest.$ac_ext
7413   break
7414 done
7415 fi
7416 echo "$as_me:7416: result: $ac_cv_sys_file_offset_bits" >&5
7417 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7418 if test "$ac_cv_sys_file_offset_bits" != no; then
7419
7420 cat >>confdefs.h <<EOF
7421 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7422 EOF
7423
7424 fi
7425 rm -f conftest*
7426   echo "$as_me:7426: checking for _LARGE_FILES value needed for large files" >&5
7427 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7428 if test "${ac_cv_sys_large_files+set}" = set; then
7429   echo $ECHO_N "(cached) $ECHO_C" >&6
7430 else
7431   while :; do
7432   ac_cv_sys_large_files=no
7433   cat >conftest.$ac_ext <<_ACEOF
7434 #line 7434 "configure"
7435 #include "confdefs.h"
7436 #include <sys/types.h>
7437  /* Check that off_t can represent 2**63 - 1 correctly.
7438     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7439     since some C++ compilers masquerading as C compilers
7440     incorrectly reject 9223372036854775807.  */
7441 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7442   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7443                        && LARGE_OFF_T % 2147483647 == 1)
7444                       ? 1 : -1];
7445 int
7446 main ()
7447 {
7448
7449   ;
7450   return 0;
7451 }
7452 _ACEOF
7453 rm -f conftest.$ac_objext
7454 if { (eval echo "$as_me:7454: \"$ac_compile\"") >&5
7455   (eval $ac_compile) 2>&5
7456   ac_status=$?
7457   echo "$as_me:7457: \$? = $ac_status" >&5
7458   (exit $ac_status); } &&
7459          { ac_try='test -s conftest.$ac_objext'
7460   { (eval echo "$as_me:7460: \"$ac_try\"") >&5
7461   (eval $ac_try) 2>&5
7462   ac_status=$?
7463   echo "$as_me:7463: \$? = $ac_status" >&5
7464   (exit $ac_status); }; }; then
7465   break
7466 else
7467   echo "$as_me: failed program was:" >&5
7468 cat conftest.$ac_ext >&5
7469 fi
7470 rm -f conftest.$ac_objext conftest.$ac_ext
7471   cat >conftest.$ac_ext <<_ACEOF
7472 #line 7472 "configure"
7473 #include "confdefs.h"
7474 #define _LARGE_FILES 1
7475 #include <sys/types.h>
7476  /* Check that off_t can represent 2**63 - 1 correctly.
7477     We can't simply define LARGE_OFF_T to be 9223372036854775807,
7478     since some C++ compilers masquerading as C compilers
7479     incorrectly reject 9223372036854775807.  */
7480 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7481   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7482                        && LARGE_OFF_T % 2147483647 == 1)
7483                       ? 1 : -1];
7484 int
7485 main ()
7486 {
7487
7488   ;
7489   return 0;
7490 }
7491 _ACEOF
7492 rm -f conftest.$ac_objext
7493 if { (eval echo "$as_me:7493: \"$ac_compile\"") >&5
7494   (eval $ac_compile) 2>&5
7495   ac_status=$?
7496   echo "$as_me:7496: \$? = $ac_status" >&5
7497   (exit $ac_status); } &&
7498          { ac_try='test -s conftest.$ac_objext'
7499   { (eval echo "$as_me:7499: \"$ac_try\"") >&5
7500   (eval $ac_try) 2>&5
7501   ac_status=$?
7502   echo "$as_me:7502: \$? = $ac_status" >&5
7503   (exit $ac_status); }; }; then
7504   ac_cv_sys_large_files=1; break
7505 else
7506   echo "$as_me: failed program was:" >&5
7507 cat conftest.$ac_ext >&5
7508 fi
7509 rm -f conftest.$ac_objext conftest.$ac_ext
7510   break
7511 done
7512 fi
7513 echo "$as_me:7513: result: $ac_cv_sys_large_files" >&5
7514 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7515 if test "$ac_cv_sys_large_files" != no; then
7516
7517 cat >>confdefs.h <<EOF
7518 #define _LARGE_FILES $ac_cv_sys_large_files
7519 EOF
7520
7521 fi
7522 rm -f conftest*
7523 fi
7524
7525     if test "$enable_largefile" != no ; then
7526         echo "$as_me:7526: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7527 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7528 if test "${ac_cv_sys_largefile_source+set}" = set; then
7529   echo $ECHO_N "(cached) $ECHO_C" >&6
7530 else
7531   while :; do
7532   ac_cv_sys_largefile_source=no
7533   cat >conftest.$ac_ext <<_ACEOF
7534 #line 7534 "configure"
7535 #include "confdefs.h"
7536 #include <stdio.h>
7537 int
7538 main ()
7539 {
7540 return !fseeko;
7541   ;
7542   return 0;
7543 }
7544 _ACEOF
7545 rm -f conftest.$ac_objext
7546 if { (eval echo "$as_me:7546: \"$ac_compile\"") >&5
7547   (eval $ac_compile) 2>&5
7548   ac_status=$?
7549   echo "$as_me:7549: \$? = $ac_status" >&5
7550   (exit $ac_status); } &&
7551          { ac_try='test -s conftest.$ac_objext'
7552   { (eval echo "$as_me:7552: \"$ac_try\"") >&5
7553   (eval $ac_try) 2>&5
7554   ac_status=$?
7555   echo "$as_me:7555: \$? = $ac_status" >&5
7556   (exit $ac_status); }; }; then
7557   break
7558 else
7559   echo "$as_me: failed program was:" >&5
7560 cat conftest.$ac_ext >&5
7561 fi
7562 rm -f conftest.$ac_objext conftest.$ac_ext
7563   cat >conftest.$ac_ext <<_ACEOF
7564 #line 7564 "configure"
7565 #include "confdefs.h"
7566 #define _LARGEFILE_SOURCE 1
7567 #include <stdio.h>
7568 int
7569 main ()
7570 {
7571 return !fseeko;
7572   ;
7573   return 0;
7574 }
7575 _ACEOF
7576 rm -f conftest.$ac_objext
7577 if { (eval echo "$as_me:7577: \"$ac_compile\"") >&5
7578   (eval $ac_compile) 2>&5
7579   ac_status=$?
7580   echo "$as_me:7580: \$? = $ac_status" >&5
7581   (exit $ac_status); } &&
7582          { ac_try='test -s conftest.$ac_objext'
7583   { (eval echo "$as_me:7583: \"$ac_try\"") >&5
7584   (eval $ac_try) 2>&5
7585   ac_status=$?
7586   echo "$as_me:7586: \$? = $ac_status" >&5
7587   (exit $ac_status); }; }; then
7588   ac_cv_sys_largefile_source=1; break
7589 else
7590   echo "$as_me: failed program was:" >&5
7591 cat conftest.$ac_ext >&5
7592 fi
7593 rm -f conftest.$ac_objext conftest.$ac_ext
7594   break
7595 done
7596 fi
7597 echo "$as_me:7597: result: $ac_cv_sys_largefile_source" >&5
7598 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7599 if test "$ac_cv_sys_largefile_source" != no; then
7600
7601 cat >>confdefs.h <<EOF
7602 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7603 EOF
7604
7605 fi
7606 rm -f conftest*
7607
7608 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7609 # in glibc 2.1.3, but that breaks too many other things.
7610 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7611 echo "$as_me:7611: checking for fseeko" >&5
7612 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7613 if test "${ac_cv_func_fseeko+set}" = set; then
7614   echo $ECHO_N "(cached) $ECHO_C" >&6
7615 else
7616   cat >conftest.$ac_ext <<_ACEOF
7617 #line 7617 "configure"
7618 #include "confdefs.h"
7619 #include <stdio.h>
7620 int
7621 main ()
7622 {
7623 return fseeko && fseeko (stdin, 0, 0);
7624   ;
7625   return 0;
7626 }
7627 _ACEOF
7628 rm -f conftest.$ac_objext conftest$ac_exeext
7629 if { (eval echo "$as_me:7629: \"$ac_link\"") >&5
7630   (eval $ac_link) 2>&5
7631   ac_status=$?
7632   echo "$as_me:7632: \$? = $ac_status" >&5
7633   (exit $ac_status); } &&
7634          { ac_try='test -s conftest$ac_exeext'
7635   { (eval echo "$as_me:7635: \"$ac_try\"") >&5
7636   (eval $ac_try) 2>&5
7637   ac_status=$?
7638   echo "$as_me:7638: \$? = $ac_status" >&5
7639   (exit $ac_status); }; }; then
7640   ac_cv_func_fseeko=yes
7641 else
7642   echo "$as_me: failed program was:" >&5
7643 cat conftest.$ac_ext >&5
7644 ac_cv_func_fseeko=no
7645 fi
7646 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7647 fi
7648 echo "$as_me:7648: result: $ac_cv_func_fseeko" >&5
7649 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7650 if test $ac_cv_func_fseeko = yes; then
7651
7652 cat >>confdefs.h <<\EOF
7653 #define HAVE_FSEEKO 1
7654 EOF
7655
7656 fi
7657
7658         # Normally we would collect these definitions in the config.h,
7659         # but (like _XOPEN_SOURCE), some environments rely on having these
7660         # defined before any of the system headers are included.  Another
7661         # case comes up with C++, e.g., on AIX the compiler compiles the
7662         # header files by themselves before looking at the body files it is
7663         # told to compile.  For ncurses, those header files do not include
7664         # the config.h
7665         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7666         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7667
7668         echo "$as_me:7668: checking whether to use struct dirent64" >&5
7669 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7670 if test "${cf_cv_struct_dirent64+set}" = set; then
7671   echo $ECHO_N "(cached) $ECHO_C" >&6
7672 else
7673
7674                 cat >conftest.$ac_ext <<_ACEOF
7675 #line 7675 "configure"
7676 #include "confdefs.h"
7677
7678 #include <sys/types.h>
7679 #include <dirent.h>
7680
7681 int
7682 main ()
7683 {
7684
7685                 /* if transitional largefile support is setup, this is true */
7686                 extern struct dirent64 * readdir(DIR *);
7687                 struct dirent64 *x = readdir((DIR *)0);
7688                 struct dirent *y = readdir((DIR *)0);
7689                 int z = x - y;
7690
7691   ;
7692   return 0;
7693 }
7694 _ACEOF
7695 rm -f conftest.$ac_objext
7696 if { (eval echo "$as_me:7696: \"$ac_compile\"") >&5
7697   (eval $ac_compile) 2>&5
7698   ac_status=$?
7699   echo "$as_me:7699: \$? = $ac_status" >&5
7700   (exit $ac_status); } &&
7701          { ac_try='test -s conftest.$ac_objext'
7702   { (eval echo "$as_me:7702: \"$ac_try\"") >&5
7703   (eval $ac_try) 2>&5
7704   ac_status=$?
7705   echo "$as_me:7705: \$? = $ac_status" >&5
7706   (exit $ac_status); }; }; then
7707   cf_cv_struct_dirent64=yes
7708 else
7709   echo "$as_me: failed program was:" >&5
7710 cat conftest.$ac_ext >&5
7711 cf_cv_struct_dirent64=no
7712 fi
7713 rm -f conftest.$ac_objext conftest.$ac_ext
7714
7715 fi
7716 echo "$as_me:7716: result: $cf_cv_struct_dirent64" >&5
7717 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7718         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7719 #define HAVE_STRUCT_DIRENT64 1
7720 EOF
7721
7722     fi
7723
7724 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7725 echo "$as_me:7725: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7726 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7727
7728 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7729 if test "${enable_tparm_varargs+set}" = set; then
7730   enableval="$enable_tparm_varargs"
7731   with_tparm_varargs=$enableval
7732 else
7733   with_tparm_varargs=yes
7734 fi;
7735 echo "$as_me:7735: result: $with_tparm_varargs" >&5
7736 echo "${ECHO_T}$with_tparm_varargs" >&6
7737 NCURSES_TPARM_VARARGS=0
7738 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7739
7740 ###   use option --with-bool to override bool's type
7741 echo "$as_me:7741: checking for type of bool" >&5
7742 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7743
7744 # Check whether --with-bool or --without-bool was given.
7745 if test "${with_bool+set}" = set; then
7746   withval="$with_bool"
7747   NCURSES_BOOL="$withval"
7748 else
7749   NCURSES_BOOL=auto
7750 fi;
7751 echo "$as_me:7751: result: $NCURSES_BOOL" >&5
7752 echo "${ECHO_T}$NCURSES_BOOL" >&6
7753
7754 echo "$as_me:7754: checking for alternate terminal capabilities file" >&5
7755 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7756
7757 # Check whether --with-caps or --without-caps was given.
7758 if test "${with_caps+set}" = set; then
7759   withval="$with_caps"
7760   TERMINFO_CAPS=Caps.$withval
7761 else
7762   TERMINFO_CAPS=Caps
7763 fi;
7764 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7765 echo "$as_me:7765: result: $TERMINFO_CAPS" >&5
7766 echo "${ECHO_T}$TERMINFO_CAPS" >&6
7767
7768 ###   use option --with-chtype to override chtype's type
7769 echo "$as_me:7769: checking for type of chtype" >&5
7770 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7771
7772 # Check whether --with-chtype or --without-chtype was given.
7773 if test "${with_chtype+set}" = set; then
7774   withval="$with_chtype"
7775   NCURSES_CHTYPE="$withval"
7776 else
7777   NCURSES_CHTYPE=auto
7778 fi;
7779 echo "$as_me:7779: result: $NCURSES_CHTYPE" >&5
7780 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7781
7782 ###   use option --with-ospeed to override ospeed's type
7783 echo "$as_me:7783: checking for type of ospeed" >&5
7784 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7785
7786 # Check whether --with-ospeed or --without-ospeed was given.
7787 if test "${with_ospeed+set}" = set; then
7788   withval="$with_ospeed"
7789   NCURSES_OSPEED="$withval"
7790 else
7791   NCURSES_OSPEED=short
7792 fi;
7793 echo "$as_me:7793: result: $NCURSES_OSPEED" >&5
7794 echo "${ECHO_T}$NCURSES_OSPEED" >&6
7795
7796 ###   use option --with-mmask-t to override mmask_t's type
7797 echo "$as_me:7797: checking for type of mmask_t" >&5
7798 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7799
7800 # Check whether --with-mmask-t or --without-mmask-t was given.
7801 if test "${with_mmask_t+set}" = set; then
7802   withval="$with_mmask_t"
7803   NCURSES_MMASK_T="$withval"
7804 else
7805   NCURSES_MMASK_T=auto
7806 fi;
7807 echo "$as_me:7807: result: $NCURSES_MMASK_T" >&5
7808 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7809
7810 ### Enable compiling-in rcs id's
7811 echo "$as_me:7811: checking if RCS identifiers should be compiled-in" >&5
7812 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7813
7814 # Check whether --with-rcs-ids or --without-rcs-ids was given.
7815 if test "${with_rcs_ids+set}" = set; then
7816   withval="$with_rcs_ids"
7817   with_rcs_ids=$withval
7818 else
7819   with_rcs_ids=no
7820 fi;
7821 echo "$as_me:7821: result: $with_rcs_ids" >&5
7822 echo "${ECHO_T}$with_rcs_ids" >&6
7823 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7824 #define USE_RCS_IDS 1
7825 EOF
7826
7827 ###############################################################################
7828
7829 echo "$as_me:7829: checking format of man-pages" >&5
7830 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7831
7832 # Check whether --with-manpage-format or --without-manpage-format was given.
7833 if test "${with_manpage_format+set}" = set; then
7834   withval="$with_manpage_format"
7835   MANPAGE_FORMAT=$withval
7836 else
7837   MANPAGE_FORMAT=unknown
7838 fi;
7839
7840 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7841 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7842
7843 cf_unknown=
7844
7845 case $MANPAGE_FORMAT in
7846 unknown)
7847   if test -z "$MANPATH" ; then
7848     MANPATH="/usr/man:/usr/share/man"
7849   fi
7850
7851   # look for the 'date' man-page (it's most likely to be installed!)
7852   MANPAGE_FORMAT=
7853   cf_preform=no
7854   cf_catonly=yes
7855   cf_example=date
7856
7857   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7858   for cf_dir in $MANPATH; do
7859     test -z "$cf_dir" && cf_dir=/usr/man
7860     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
7861     do
7862       cf_test=`echo $cf_name | sed -e 's/*//'`
7863       if test "x$cf_test" = "x$cf_name" ; then
7864
7865         case "$cf_name" in
7866         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7867         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7868         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7869         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7870         esac
7871
7872         case "$cf_name" in
7873         $cf_dir/man*)
7874           cf_catonly=no
7875           ;;
7876         $cf_dir/cat*)
7877           cf_preform=yes
7878           ;;
7879         esac
7880         break
7881       fi
7882
7883       # if we found a match in either man* or cat*, stop looking
7884       if test -n "$MANPAGE_FORMAT" ; then
7885         cf_found=no
7886         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
7887         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
7888         case "$cf_name" in
7889         $cf_dir/cat*)
7890           cf_found=yes
7891           ;;
7892         esac
7893         test $cf_found=yes && break
7894       fi
7895     done
7896     # only check the first directory in $MANPATH where we find manpages
7897     if test -n "$MANPAGE_FORMAT" ; then
7898        break
7899     fi
7900   done
7901   # if we did not find the example, just assume it is normal
7902   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
7903   IFS="$ac_save_ifs"
7904   ;;
7905 *)
7906   for cf_option in $MANPAGE_FORMAT; do
7907      case $cf_option in #(vi
7908      gzip|compress|BSDI|normal|formatted|catonly)
7909        ;;
7910      *)
7911        cf_unknown="$cf_unknown $cf_option"
7912        ;;
7913      esac
7914   done
7915   ;;
7916 esac
7917
7918 echo "$as_me:7918: result: $MANPAGE_FORMAT" >&5
7919 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
7920 if test -n "$cf_unknown" ; then
7921   { echo "$as_me:7921: WARNING: Unexpected manpage-format $cf_unknown" >&5
7922 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
7923 fi
7924
7925 echo "$as_me:7925: checking for manpage renaming" >&5
7926 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
7927
7928 # Check whether --with-manpage-renames or --without-manpage-renames was given.
7929 if test "${with_manpage_renames+set}" = set; then
7930   withval="$with_manpage_renames"
7931   MANPAGE_RENAMES=$withval
7932 else
7933   MANPAGE_RENAMES=yes
7934 fi;
7935
7936 case ".$MANPAGE_RENAMES" in #(vi
7937 .no) #(vi
7938   ;;
7939 .|.yes)
7940   # Debian 'man' program?
7941   if test -f /etc/debian_version ; then
7942     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
7943   else
7944     MANPAGE_RENAMES=no
7945   fi
7946   ;;
7947 esac
7948
7949 if test "$MANPAGE_RENAMES" != no ; then
7950   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
7951     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
7952   elif test ! -f $MANPAGE_RENAMES ; then
7953     { { echo "$as_me:7953: error: not a filename: $MANPAGE_RENAMES" >&5
7954 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
7955    { (exit 1); exit 1; }; }
7956   fi
7957
7958   test ! -d man && mkdir man
7959
7960   # Construct a sed-script to perform renaming within man-pages
7961   if test -n "$MANPAGE_RENAMES" ; then
7962     test ! -d man && mkdir man
7963     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
7964   fi
7965 fi
7966
7967 echo "$as_me:7967: result: $MANPAGE_RENAMES" >&5
7968 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
7969
7970 echo "$as_me:7970: checking if manpage aliases will be installed" >&5
7971 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
7972
7973 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
7974 if test "${with_manpage_aliases+set}" = set; then
7975   withval="$with_manpage_aliases"
7976   MANPAGE_ALIASES=$withval
7977 else
7978   MANPAGE_ALIASES=yes
7979 fi;
7980
7981 echo "$as_me:7981: result: $MANPAGE_ALIASES" >&5
7982 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
7983
7984 if test "$LN_S" = "ln -s"; then
7985         cf_use_symlinks=yes
7986 else
7987         cf_use_symlinks=no
7988 fi
7989
7990 MANPAGE_SYMLINKS=no
7991 if test "$MANPAGE_ALIASES" = yes ; then
7992 echo "$as_me:7992: checking if manpage symlinks should be used" >&5
7993 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
7994
7995 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
7996 if test "${with_manpage_symlinks+set}" = set; then
7997   withval="$with_manpage_symlinks"
7998   MANPAGE_SYMLINKS=$withval
7999 else
8000   MANPAGE_SYMLINKS=$cf_use_symlinks
8001 fi;
8002
8003 if test "$$cf_use_symlinks" = no; then
8004 if test "$MANPAGE_SYMLINKS" = yes ; then
8005         { echo "$as_me:8005: WARNING: cannot make symlinks" >&5
8006 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8007         MANPAGE_SYMLINKS=no
8008 fi
8009 fi
8010
8011 echo "$as_me:8011: result: $MANPAGE_SYMLINKS" >&5
8012 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8013 fi
8014
8015 echo "$as_me:8015: checking for manpage tbl" >&5
8016 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8017
8018 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8019 if test "${with_manpage_tbl+set}" = set; then
8020   withval="$with_manpage_tbl"
8021   MANPAGE_TBL=$withval
8022 else
8023   MANPAGE_TBL=no
8024 fi;
8025
8026 echo "$as_me:8026: result: $MANPAGE_TBL" >&5
8027 echo "${ECHO_T}$MANPAGE_TBL" >&6
8028
8029   if test "$prefix" = "NONE" ; then
8030      cf_prefix="$ac_default_prefix"
8031   else
8032      cf_prefix="$prefix"
8033   fi
8034
8035   case "$MANPAGE_FORMAT" in # (vi
8036   *catonly*) # (vi
8037     cf_format=yes
8038     cf_inboth=no
8039     ;;
8040   *formatted*) # (vi
8041     cf_format=yes
8042     cf_inboth=yes
8043     ;;
8044   *)
8045     cf_format=no
8046     cf_inboth=no
8047     ;;
8048   esac
8049
8050 test ! -d man && mkdir man
8051
8052 cf_so_strip=
8053 cf_compress=
8054 case "$MANPAGE_FORMAT" in #(vi
8055 *compress*) #(vi
8056         cf_so_strip="Z"
8057         cf_compress=compress
8058   ;;
8059 *gzip*) #(vi
8060         cf_so_strip="gz"
8061         cf_compress=gzip
8062   ;;
8063 esac
8064
8065 cf_edit_man=./edit_man.sh
8066 cf_man_alias=`pwd`/man_alias.sed
8067
8068 cat >$cf_edit_man <<CF_EOF
8069 #! /bin/sh
8070 # this script is generated by the configure-script CF_MAN_PAGES macro.
8071
8072 prefix="$cf_prefix"
8073 datadir="$datadir"
8074
8075 NCURSES_MAJOR="$NCURSES_MAJOR"
8076 NCURSES_MINOR="$NCURSES_MINOR"
8077 NCURSES_PATCH="$NCURSES_PATCH"
8078
8079 NCURSES_OSPEED="$NCURSES_OSPEED"
8080 TERMINFO="$TERMINFO"
8081
8082 MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"
8083
8084 INSTALL="$INSTALL"
8085 INSTALL_DATA="$INSTALL_DATA"
8086
8087 transform="$program_transform_name"
8088
8089 TMP=\${TMPDIR-/tmp}/man\$\$
8090 trap "rm -f \$TMP" 0 1 2 5 15
8091
8092 form=\$1
8093 shift || exit 1
8094
8095 verb=\$1
8096 shift || exit 1
8097
8098 mandir=\$1
8099 shift || exit 1
8100
8101 srcdir=\$1
8102 top_srcdir=\$srcdir/..
8103 shift || exit 1
8104
8105 if test "\$form" = normal ; then
8106         if test "$cf_format" = yes ; then
8107         if test "$cf_inboth" = no ; then
8108                 sh \$0 format \$verb \$mandir \$srcdir \$*
8109                 exit $?
8110         fi
8111         fi
8112         cf_subdir=\$mandir/man
8113         cf_tables=$MANPAGE_TBL
8114 else
8115         cf_subdir=\$mandir/cat
8116         cf_tables=yes
8117 fi
8118
8119 # process the list of source-files
8120 for i in \$* ; do
8121 case \$i in #(vi
8122 *.orig|*.rej) ;; #(vi
8123 *.[0-9]*)
8124         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8125         if test \$verb = installing ; then
8126         if test ! -d \$cf_subdir\${section} ; then
8127                 \$MKDIRS \$cf_subdir\$section
8128         fi
8129         fi
8130
8131         # replace variables in man page
8132         if test ! -f $cf_man_alias ; then
8133 cat >>$cf_man_alias <<-CF_EOF2
8134                 s,@DATADIR@,\$datadir,
8135                 s,@TERMINFO@,\$TERMINFO,
8136                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,
8137                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,
8138                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,
8139                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,
8140 CF_EOF
8141
8142         for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8143         do
8144                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8145                 cf_name=`echo $cf_name|sed "$program_transform_name"`
8146 cat >>$cf_edit_man <<-CF_EOF
8147                 s,@$cf_NAME@,$cf_name,
8148 CF_EOF
8149         done
8150
8151 cat >>$cf_edit_man <<CF_EOF
8152 CF_EOF2
8153                 echo "...made $cf_man_alias"
8154         fi
8155
8156         aliases=
8157         cf_source=\`basename \$i\`
8158         inalias=\$cf_source
8159         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8160         if test ! -f \$inalias ; then
8161                 echo .. skipped \$cf_source
8162                 continue
8163         fi
8164 CF_EOF
8165
8166 if test "$MANPAGE_ALIASES" != no ; then
8167 cat >>$cf_edit_man <<CF_EOF
8168         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
8169 CF_EOF
8170 fi
8171
8172 if test "$MANPAGE_RENAMES" = no ; then
8173 cat >>$cf_edit_man <<CF_EOF
8174         # perform program transformations for section 1 man pages
8175         if test \$section = 1 ; then
8176                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8177         else
8178                 cf_target=\$cf_subdir\${section}/\$cf_source
8179         fi
8180 CF_EOF
8181 else
8182 cat >>$cf_edit_man <<CF_EOF
8183         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8184         if test -z "\$cf_target" ; then
8185                 echo '? missing rename for '\$cf_source
8186                 cf_target="\$cf_source"
8187         fi
8188         cf_target="\$cf_subdir\${section}/\${cf_target}"
8189
8190 CF_EOF
8191 fi
8192
8193 cat >>$cf_edit_man <<CF_EOF
8194         sed     -f $cf_man_alias \\
8195 CF_EOF
8196
8197 if test -f $MANPAGE_RENAMES ; then
8198 cat >>$cf_edit_man <<CF_EOF
8199                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
8200 CF_EOF
8201 else
8202 cat >>$cf_edit_man <<CF_EOF
8203                 < \$i >\$TMP
8204 CF_EOF
8205 fi
8206
8207 cat >>$cf_edit_man <<CF_EOF
8208 if test \$cf_tables = yes ; then
8209         tbl \$TMP >\$TMP.out
8210         mv \$TMP.out \$TMP
8211 fi
8212 CF_EOF
8213
8214 if test $with_curses_h != yes ; then
8215 cat >>$cf_edit_man <<CF_EOF
8216         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8217         mv \$TMP.out \$TMP
8218 CF_EOF
8219 fi
8220
8221 cat >>$cf_edit_man <<CF_EOF
8222         if test \$form = format ; then
8223                 nroff -man \$TMP >\$TMP.out
8224                 mv \$TMP.out \$TMP
8225         fi
8226 CF_EOF
8227
8228 if test -n "$cf_compress" ; then
8229 cat >>$cf_edit_man <<CF_EOF
8230         if test \$verb = installing ; then
8231         if ( $cf_compress -f \$TMP )
8232         then
8233                 mv \$TMP.$cf_so_strip \$TMP
8234         fi
8235         fi
8236         cf_target="\$cf_target.$cf_so_strip"
8237 CF_EOF
8238 fi
8239
8240 case "$MANPAGE_FORMAT" in #(vi
8241 *BSDI*)
8242 cat >>$cf_edit_man <<CF_EOF
8243         if test \$form = format ; then
8244                 # BSDI installs only .0 suffixes in the cat directories
8245                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8246         fi
8247 CF_EOF
8248   ;;
8249 esac
8250
8251 cat >>$cf_edit_man <<CF_EOF
8252         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8253         if test \$verb = installing ; then
8254                 echo \$verb \$cf_target
8255                 \$INSTALL_DATA \$TMP \$cf_target
8256                 test -n "\$aliases" && (
8257                         cd \$cf_subdir\${section} && (
8258                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8259                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8260                                 cf_target=\`basename \$cf_target\`
8261                                 for cf_alias in \$aliases
8262                                 do
8263                                         if test \$section = 1 ; then
8264                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8265                                         fi
8266
8267                                         if test "$MANPAGE_SYMLINKS" = yes ; then
8268                                                 if test -f \$cf_alias\${suffix} ; then
8269                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8270                                                         then
8271                                                                 continue
8272                                                         fi
8273                                                 fi
8274                                                 echo .. \$verb alias \$cf_alias\${suffix}
8275                                                 rm -f \$cf_alias\${suffix}
8276                                                 $LN_S \$cf_target \$cf_alias\${suffix}
8277                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8278                                                 echo ".so \$cf_source" >\$TMP
8279 CF_EOF
8280 if test -n "$cf_compress" ; then
8281 cat >>$cf_edit_man <<CF_EOF
8282                                                 if test -n "$cf_so_strip" ; then
8283                                                         $cf_compress -f \$TMP
8284                                                         mv \$TMP.$cf_so_strip \$TMP
8285                                                 fi
8286 CF_EOF
8287 fi
8288 cat >>$cf_edit_man <<CF_EOF
8289                                                 echo .. \$verb alias \$cf_alias\${suffix}
8290                                                 rm -f \$cf_alias\${suffix}
8291                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8292                                         fi
8293                                 done
8294                         )
8295                 )
8296         elif test \$verb = removing ; then
8297                 echo \$verb \$cf_target
8298                 rm -f \$cf_target
8299                 test -n "\$aliases" && (
8300                         cd \$cf_subdir\${section} && (
8301                                 for cf_alias in \$aliases
8302                                 do
8303                                         if test \$section = 1 ; then
8304                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8305                                         fi
8306
8307                                         echo .. \$verb alias \$cf_alias\${suffix}
8308                                         rm -f \$cf_alias\${suffix}
8309                                 done
8310                         )
8311                 )
8312         else
8313 #               echo ".hy 0"
8314                 cat \$TMP
8315         fi
8316         ;;
8317 esac
8318 done
8319
8320 if test $cf_inboth = yes ; then
8321 if test \$form != format ; then
8322         sh \$0 format \$verb \$mandir \$srcdir \$*
8323 fi
8324 fi
8325
8326 exit 0
8327 CF_EOF
8328 chmod 755 $cf_edit_man
8329
8330 ###############################################################################
8331
8332 ### Note that some functions (such as const) are normally disabled anyway.
8333 echo "$as_me:8333: checking if you want to build with function extensions" >&5
8334 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8335
8336 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8337 if test "${enable_ext_funcs+set}" = set; then
8338   enableval="$enable_ext_funcs"
8339   with_ext_funcs=$enableval
8340 else
8341   with_ext_funcs=yes
8342 fi;
8343 echo "$as_me:8343: result: $with_ext_funcs" >&5
8344 echo "${ECHO_T}$with_ext_funcs" >&6
8345 if test "$with_ext_funcs" = yes ; then
8346         NCURSES_EXT_FUNCS=1
8347         cat >>confdefs.h <<\EOF
8348 #define HAVE_CURSES_VERSION 1
8349 EOF
8350
8351         cat >>confdefs.h <<\EOF
8352 #define HAVE_HAS_KEY 1
8353 EOF
8354
8355         cat >>confdefs.h <<\EOF
8356 #define HAVE_RESIZETERM 1
8357 EOF
8358
8359         cat >>confdefs.h <<\EOF
8360 #define HAVE_RESIZE_TERM 1
8361 EOF
8362
8363         cat >>confdefs.h <<\EOF
8364 #define HAVE_USE_DEFAULT_COLORS 1
8365 EOF
8366
8367         cat >>confdefs.h <<\EOF
8368 #define HAVE_WRESIZE 1
8369 EOF
8370
8371         cat >>confdefs.h <<\EOF
8372 #define NCURSES_EXT_FUNCS 1
8373 EOF
8374
8375 else
8376         NCURSES_EXT_FUNCS=0
8377 fi
8378
8379 ###   use option --enable-const to turn on use of const beyond that in XSI.
8380 echo "$as_me:8380: checking for extended use of const keyword" >&5
8381 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8382
8383 # Check whether --enable-const or --disable-const was given.
8384 if test "${enable_const+set}" = set; then
8385   enableval="$enable_const"
8386   with_ext_const=$enableval
8387 else
8388   with_ext_const=no
8389 fi;
8390 echo "$as_me:8390: result: $with_ext_const" >&5
8391 echo "${ECHO_T}$with_ext_const" >&6
8392 NCURSES_CONST='/*nothing*/'
8393 if test "$with_ext_const" = yes ; then
8394         NCURSES_CONST=const
8395 fi
8396
8397 echo "$as_me:8397: checking if you want \$NCURSES_NO_PADDING code" >&5
8398 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8399
8400 # Check whether --enable-no-padding or --disable-no-padding was given.
8401 if test "${enable_no_padding+set}" = set; then
8402   enableval="$enable_no_padding"
8403   with_no_padding=$enableval
8404 else
8405   with_no_padding=$with_ext_funcs
8406 fi;
8407 echo "$as_me:8407: result: $with_no_padding" >&5
8408 echo "${ECHO_T}$with_no_padding" >&6
8409 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8410 #define NCURSES_NO_PADDING 1
8411 EOF
8412
8413 echo "$as_me:8413: checking for ANSI C header files" >&5
8414 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8415 if test "${ac_cv_header_stdc+set}" = set; then
8416   echo $ECHO_N "(cached) $ECHO_C" >&6
8417 else
8418   cat >conftest.$ac_ext <<_ACEOF
8419 #line 8419 "configure"
8420 #include "confdefs.h"
8421 #include <stdlib.h>
8422 #include <stdarg.h>
8423 #include <string.h>
8424 #include <float.h>
8425
8426 _ACEOF
8427 if { (eval echo "$as_me:8427: \"$ac_cpp conftest.$ac_ext\"") >&5
8428   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8429   ac_status=$?
8430   egrep -v '^ *\+' conftest.er1 >conftest.err
8431   rm -f conftest.er1
8432   cat conftest.err >&5
8433   echo "$as_me:8433: \$? = $ac_status" >&5
8434   (exit $ac_status); } >/dev/null; then
8435   if test -s conftest.err; then
8436     ac_cpp_err=$ac_c_preproc_warn_flag
8437   else
8438     ac_cpp_err=
8439   fi
8440 else
8441   ac_cpp_err=yes
8442 fi
8443 if test -z "$ac_cpp_err"; then
8444   ac_cv_header_stdc=yes
8445 else
8446   echo "$as_me: failed program was:" >&5
8447   cat conftest.$ac_ext >&5
8448   ac_cv_header_stdc=no
8449 fi
8450 rm -f conftest.err conftest.$ac_ext
8451
8452 if test $ac_cv_header_stdc = yes; then
8453   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8454   cat >conftest.$ac_ext <<_ACEOF
8455 #line 8455 "configure"
8456 #include "confdefs.h"
8457 #include <string.h>
8458
8459 _ACEOF
8460 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8461   egrep "memchr" >/dev/null 2>&1; then
8462   :
8463 else
8464   ac_cv_header_stdc=no
8465 fi
8466 rm -f conftest*
8467
8468 fi
8469
8470 if test $ac_cv_header_stdc = yes; then
8471   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8472   cat >conftest.$ac_ext <<_ACEOF
8473 #line 8473 "configure"
8474 #include "confdefs.h"
8475 #include <stdlib.h>
8476
8477 _ACEOF
8478 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8479   egrep "free" >/dev/null 2>&1; then
8480   :
8481 else
8482   ac_cv_header_stdc=no
8483 fi
8484 rm -f conftest*
8485
8486 fi
8487
8488 if test $ac_cv_header_stdc = yes; then
8489   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8490   if test "$cross_compiling" = yes; then
8491   :
8492 else
8493   cat >conftest.$ac_ext <<_ACEOF
8494 #line 8494 "configure"
8495 #include "confdefs.h"
8496 #include <ctype.h>
8497 #if ((' ' & 0x0FF) == 0x020)
8498 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8499 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8500 #else
8501 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8502                      || ('j' <= (c) && (c) <= 'r') \
8503                      || ('s' <= (c) && (c) <= 'z'))
8504 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8505 #endif
8506
8507 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8508 int
8509 main ()
8510 {
8511   int i;
8512   for (i = 0; i < 256; i++)
8513     if (XOR (islower (i), ISLOWER (i))
8514         || toupper (i) != TOUPPER (i))
8515       $ac_main_return(2);
8516   $ac_main_return (0);
8517 }
8518 _ACEOF
8519 rm -f conftest$ac_exeext
8520 if { (eval echo "$as_me:8520: \"$ac_link\"") >&5
8521   (eval $ac_link) 2>&5
8522   ac_status=$?
8523   echo "$as_me:8523: \$? = $ac_status" >&5
8524   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8525   { (eval echo "$as_me:8525: \"$ac_try\"") >&5
8526   (eval $ac_try) 2>&5
8527   ac_status=$?
8528   echo "$as_me:8528: \$? = $ac_status" >&5
8529   (exit $ac_status); }; }; then
8530   :
8531 else
8532   echo "$as_me: program exited with status $ac_status" >&5
8533 echo "$as_me: failed program was:" >&5
8534 cat conftest.$ac_ext >&5
8535 ac_cv_header_stdc=no
8536 fi
8537 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8538 fi
8539 fi
8540 fi
8541 echo "$as_me:8541: result: $ac_cv_header_stdc" >&5
8542 echo "${ECHO_T}$ac_cv_header_stdc" >&6
8543 if test $ac_cv_header_stdc = yes; then
8544
8545 cat >>confdefs.h <<\EOF
8546 #define STDC_HEADERS 1
8547 EOF
8548
8549 fi
8550
8551 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
8552
8553 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8554                   inttypes.h stdint.h unistd.h
8555 do
8556 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8557 echo "$as_me:8557: checking for $ac_header" >&5
8558 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8559 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8560   echo $ECHO_N "(cached) $ECHO_C" >&6
8561 else
8562   cat >conftest.$ac_ext <<_ACEOF
8563 #line 8563 "configure"
8564 #include "confdefs.h"
8565 $ac_includes_default
8566 #include <$ac_header>
8567 _ACEOF
8568 rm -f conftest.$ac_objext
8569 if { (eval echo "$as_me:8569: \"$ac_compile\"") >&5
8570   (eval $ac_compile) 2>&5
8571   ac_status=$?
8572   echo "$as_me:8572: \$? = $ac_status" >&5
8573   (exit $ac_status); } &&
8574          { ac_try='test -s conftest.$ac_objext'
8575   { (eval echo "$as_me:8575: \"$ac_try\"") >&5
8576   (eval $ac_try) 2>&5
8577   ac_status=$?
8578   echo "$as_me:8578: \$? = $ac_status" >&5
8579   (exit $ac_status); }; }; then
8580   eval "$as_ac_Header=yes"
8581 else
8582   echo "$as_me: failed program was:" >&5
8583 cat conftest.$ac_ext >&5
8584 eval "$as_ac_Header=no"
8585 fi
8586 rm -f conftest.$ac_objext conftest.$ac_ext
8587 fi
8588 echo "$as_me:8588: result: `eval echo '${'$as_ac_Header'}'`" >&5
8589 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8590 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8591   cat >>confdefs.h <<EOF
8592 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8593 EOF
8594
8595 fi
8596 done
8597
8598 echo "$as_me:8598: checking for signed char" >&5
8599 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8600 if test "${ac_cv_type_signed_char+set}" = set; then
8601   echo $ECHO_N "(cached) $ECHO_C" >&6
8602 else
8603   cat >conftest.$ac_ext <<_ACEOF
8604 #line 8604 "configure"
8605 #include "confdefs.h"
8606 $ac_includes_default
8607 int
8608 main ()
8609 {
8610 if ((signed char *) 0)
8611   return 0;
8612 if (sizeof (signed char))
8613   return 0;
8614   ;
8615   return 0;
8616 }
8617 _ACEOF
8618 rm -f conftest.$ac_objext
8619 if { (eval echo "$as_me:8619: \"$ac_compile\"") >&5
8620   (eval $ac_compile) 2>&5
8621   ac_status=$?
8622   echo "$as_me:8622: \$? = $ac_status" >&5
8623   (exit $ac_status); } &&
8624          { ac_try='test -s conftest.$ac_objext'
8625   { (eval echo "$as_me:8625: \"$ac_try\"") >&5
8626   (eval $ac_try) 2>&5
8627   ac_status=$?
8628   echo "$as_me:8628: \$? = $ac_status" >&5
8629   (exit $ac_status); }; }; then
8630   ac_cv_type_signed_char=yes
8631 else
8632   echo "$as_me: failed program was:" >&5
8633 cat conftest.$ac_ext >&5
8634 ac_cv_type_signed_char=no
8635 fi
8636 rm -f conftest.$ac_objext conftest.$ac_ext
8637 fi
8638 echo "$as_me:8638: result: $ac_cv_type_signed_char" >&5
8639 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8640
8641 echo "$as_me:8641: checking size of signed char" >&5
8642 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8643 if test "${ac_cv_sizeof_signed_char+set}" = set; then
8644   echo $ECHO_N "(cached) $ECHO_C" >&6
8645 else
8646   if test "$ac_cv_type_signed_char" = yes; then
8647   if test "$cross_compiling" = yes; then
8648   # Depending upon the size, compute the lo and hi bounds.
8649 cat >conftest.$ac_ext <<_ACEOF
8650 #line 8650 "configure"
8651 #include "confdefs.h"
8652 $ac_includes_default
8653 int
8654 main ()
8655 {
8656 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8657   ;
8658   return 0;
8659 }
8660 _ACEOF
8661 rm -f conftest.$ac_objext
8662 if { (eval echo "$as_me:8662: \"$ac_compile\"") >&5
8663   (eval $ac_compile) 2>&5
8664   ac_status=$?
8665   echo "$as_me:8665: \$? = $ac_status" >&5
8666   (exit $ac_status); } &&
8667          { ac_try='test -s conftest.$ac_objext'
8668   { (eval echo "$as_me:8668: \"$ac_try\"") >&5
8669   (eval $ac_try) 2>&5
8670   ac_status=$?
8671   echo "$as_me:8671: \$? = $ac_status" >&5
8672   (exit $ac_status); }; }; then
8673   ac_lo=0 ac_mid=0
8674   while :; do
8675     cat >conftest.$ac_ext <<_ACEOF
8676 #line 8676 "configure"
8677 #include "confdefs.h"
8678 $ac_includes_default
8679 int
8680 main ()
8681 {
8682 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8683   ;
8684   return 0;
8685 }
8686 _ACEOF
8687 rm -f conftest.$ac_objext
8688 if { (eval echo "$as_me:8688: \"$ac_compile\"") >&5
8689   (eval $ac_compile) 2>&5
8690   ac_status=$?
8691   echo "$as_me:8691: \$? = $ac_status" >&5
8692   (exit $ac_status); } &&
8693          { ac_try='test -s conftest.$ac_objext'
8694   { (eval echo "$as_me:8694: \"$ac_try\"") >&5
8695   (eval $ac_try) 2>&5
8696   ac_status=$?
8697   echo "$as_me:8697: \$? = $ac_status" >&5
8698   (exit $ac_status); }; }; then
8699   ac_hi=$ac_mid; break
8700 else
8701   echo "$as_me: failed program was:" >&5
8702 cat conftest.$ac_ext >&5
8703 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8704 fi
8705 rm -f conftest.$ac_objext conftest.$ac_ext
8706   done
8707 else
8708   echo "$as_me: failed program was:" >&5
8709 cat conftest.$ac_ext >&5
8710 ac_hi=-1 ac_mid=-1
8711   while :; do
8712     cat >conftest.$ac_ext <<_ACEOF
8713 #line 8713 "configure"
8714 #include "confdefs.h"
8715 $ac_includes_default
8716 int
8717 main ()
8718 {
8719 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8720   ;
8721   return 0;
8722 }
8723 _ACEOF
8724 rm -f conftest.$ac_objext
8725 if { (eval echo "$as_me:8725: \"$ac_compile\"") >&5
8726   (eval $ac_compile) 2>&5
8727   ac_status=$?
8728   echo "$as_me:8728: \$? = $ac_status" >&5
8729   (exit $ac_status); } &&
8730          { ac_try='test -s conftest.$ac_objext'
8731   { (eval echo "$as_me:8731: \"$ac_try\"") >&5
8732   (eval $ac_try) 2>&5
8733   ac_status=$?
8734   echo "$as_me:8734: \$? = $ac_status" >&5
8735   (exit $ac_status); }; }; then
8736   ac_lo=$ac_mid; break
8737 else
8738   echo "$as_me: failed program was:" >&5
8739 cat conftest.$ac_ext >&5
8740 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8741 fi
8742 rm -f conftest.$ac_objext conftest.$ac_ext
8743   done
8744 fi
8745 rm -f conftest.$ac_objext conftest.$ac_ext
8746 # Binary search between lo and hi bounds.
8747 while test "x$ac_lo" != "x$ac_hi"; do
8748   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8749   cat >conftest.$ac_ext <<_ACEOF
8750 #line 8750 "configure"
8751 #include "confdefs.h"
8752 $ac_includes_default
8753 int
8754 main ()
8755 {
8756 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8757   ;
8758   return 0;
8759 }
8760 _ACEOF
8761 rm -f conftest.$ac_objext
8762 if { (eval echo "$as_me:8762: \"$ac_compile\"") >&5
8763   (eval $ac_compile) 2>&5
8764   ac_status=$?
8765   echo "$as_me:8765: \$? = $ac_status" >&5
8766   (exit $ac_status); } &&
8767          { ac_try='test -s conftest.$ac_objext'
8768   { (eval echo "$as_me:8768: \"$ac_try\"") >&5
8769   (eval $ac_try) 2>&5
8770   ac_status=$?
8771   echo "$as_me:8771: \$? = $ac_status" >&5
8772   (exit $ac_status); }; }; then
8773   ac_hi=$ac_mid
8774 else
8775   echo "$as_me: failed program was:" >&5
8776 cat conftest.$ac_ext >&5
8777 ac_lo=`expr $ac_mid + 1`
8778 fi
8779 rm -f conftest.$ac_objext conftest.$ac_ext
8780 done
8781 ac_cv_sizeof_signed_char=$ac_lo
8782 else
8783   if test "$cross_compiling" = yes; then
8784   { { echo "$as_me:8784: error: cannot run test program while cross compiling" >&5
8785 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8786    { (exit 1); exit 1; }; }
8787 else
8788   cat >conftest.$ac_ext <<_ACEOF
8789 #line 8789 "configure"
8790 #include "confdefs.h"
8791 $ac_includes_default
8792 int
8793 main ()
8794 {
8795 FILE *f = fopen ("conftest.val", "w");
8796 if (!f)
8797   $ac_main_return (1);
8798 fprintf (f, "%d", (sizeof (signed char)));
8799 fclose (f);
8800   ;
8801   return 0;
8802 }
8803 _ACEOF
8804 rm -f conftest$ac_exeext
8805 if { (eval echo "$as_me:8805: \"$ac_link\"") >&5
8806   (eval $ac_link) 2>&5
8807   ac_status=$?
8808   echo "$as_me:8808: \$? = $ac_status" >&5
8809   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8810   { (eval echo "$as_me:8810: \"$ac_try\"") >&5
8811   (eval $ac_try) 2>&5
8812   ac_status=$?
8813   echo "$as_me:8813: \$? = $ac_status" >&5
8814   (exit $ac_status); }; }; then
8815   ac_cv_sizeof_signed_char=`cat conftest.val`
8816 else
8817   echo "$as_me: program exited with status $ac_status" >&5
8818 echo "$as_me: failed program was:" >&5
8819 cat conftest.$ac_ext >&5
8820 fi
8821 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8822 fi
8823 fi
8824 rm -f conftest.val
8825 else
8826   ac_cv_sizeof_signed_char=0
8827 fi
8828 fi
8829 echo "$as_me:8829: result: $ac_cv_sizeof_signed_char" >&5
8830 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
8831 cat >>confdefs.h <<EOF
8832 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
8833 EOF
8834
8835 if test "$ac_cv_sizeof_signed_char" = 1 ; then
8836         NCURSES_SBOOL="signed char"
8837 else
8838         NCURSES_SBOOL="char"
8839 fi
8840 echo "$as_me:8840: checking if you want to use signed Boolean array in term.h" >&5
8841 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
8842
8843 # Check whether --enable-signed-char or --disable-signed-char was given.
8844 if test "${enable_signed_char+set}" = set; then
8845   enableval="$enable_signed_char"
8846   with_signed_char=$enableval
8847 else
8848   with_signed_char=no
8849 fi;
8850 echo "$as_me:8850: result: $with_signed_char" >&5
8851 echo "${ECHO_T}$with_signed_char" >&6
8852 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
8853
8854 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
8855 echo "$as_me:8855: checking if you want SIGWINCH handler" >&5
8856 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
8857
8858 # Check whether --enable-sigwinch or --disable-sigwinch was given.
8859 if test "${enable_sigwinch+set}" = set; then
8860   enableval="$enable_sigwinch"
8861   with_sigwinch=$enableval
8862 else
8863   with_sigwinch=$with_ext_funcs
8864 fi;
8865 echo "$as_me:8865: result: $with_sigwinch" >&5
8866 echo "${ECHO_T}$with_sigwinch" >&6
8867 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
8868 #define USE_SIGWINCH 1
8869 EOF
8870
8871 ###   use option --enable-tcap-names to allow user to define new capabilities
8872 echo "$as_me:8872: checking if you want user-definable terminal capabilities like termcap" >&5
8873 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
8874
8875 # Check whether --enable-tcap-names or --disable-tcap-names was given.
8876 if test "${enable_tcap_names+set}" = set; then
8877   enableval="$enable_tcap_names"
8878   with_tcap_names=$enableval
8879 else
8880   with_tcap_names=$with_ext_funcs
8881 fi;
8882 echo "$as_me:8882: result: $with_tcap_names" >&5
8883 echo "${ECHO_T}$with_tcap_names" >&6
8884 NCURSES_XNAMES=0
8885 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
8886
8887 ###############################################################################
8888 # These options are relatively safe to experiment with.
8889
8890 echo "$as_me:8890: checking if you want all development code" >&5
8891 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
8892
8893 # Check whether --with-develop or --without-develop was given.
8894 if test "${with_develop+set}" = set; then
8895   withval="$with_develop"
8896   with_develop=$withval
8897 else
8898   with_develop=no
8899 fi;
8900 echo "$as_me:8900: result: $with_develop" >&5
8901 echo "${ECHO_T}$with_develop" >&6
8902
8903 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
8904 echo "$as_me:8904: checking if you want hard-tabs code" >&5
8905 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
8906
8907 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
8908 if test "${enable_hard_tabs+set}" = set; then
8909   enableval="$enable_hard_tabs"
8910
8911 else
8912   enable_hard_tabs=$with_develop
8913 fi;
8914 echo "$as_me:8914: result: $enable_hard_tabs" >&5
8915 echo "${ECHO_T}$enable_hard_tabs" >&6
8916 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
8917 #define USE_HARD_TABS 1
8918 EOF
8919
8920 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
8921 echo "$as_me:8921: checking if you want limited support for xmc" >&5
8922 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
8923
8924 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
8925 if test "${enable_xmc_glitch+set}" = set; then
8926   enableval="$enable_xmc_glitch"
8927
8928 else
8929   enable_xmc_glitch=$with_develop
8930 fi;
8931 echo "$as_me:8931: result: $enable_xmc_glitch" >&5
8932 echo "${ECHO_T}$enable_xmc_glitch" >&6
8933 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
8934 #define USE_XMC_SUPPORT 1
8935 EOF
8936
8937 ###############################################################################
8938 # These are just experimental, probably should not be in a package:
8939
8940 echo "$as_me:8940: checking if you do not want to assume colors are white-on-black" >&5
8941 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
8942
8943 # Check whether --enable-assumed-color or --disable-assumed-color was given.
8944 if test "${enable_assumed_color+set}" = set; then
8945   enableval="$enable_assumed_color"
8946   with_assumed_color=$enableval
8947 else
8948   with_assumed_color=yes
8949 fi;
8950 echo "$as_me:8950: result: $with_assumed_color" >&5
8951 echo "${ECHO_T}$with_assumed_color" >&6
8952 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
8953 #define USE_ASSUMED_COLOR 1
8954 EOF
8955
8956 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
8957 echo "$as_me:8957: checking if you want hashmap scrolling-optimization code" >&5
8958 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
8959
8960 # Check whether --enable-hashmap or --disable-hashmap was given.
8961 if test "${enable_hashmap+set}" = set; then
8962   enableval="$enable_hashmap"
8963   with_hashmap=$enableval
8964 else
8965   with_hashmap=yes
8966 fi;
8967 echo "$as_me:8967: result: $with_hashmap" >&5
8968 echo "${ECHO_T}$with_hashmap" >&6
8969 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
8970 #define USE_HASHMAP 1
8971 EOF
8972
8973 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
8974 echo "$as_me:8974: checking if you want colorfgbg code" >&5
8975 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
8976
8977 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
8978 if test "${enable_colorfgbg+set}" = set; then
8979   enableval="$enable_colorfgbg"
8980   with_colorfgbg=$enableval
8981 else
8982   with_colorfgbg=no
8983 fi;
8984 echo "$as_me:8984: result: $with_colorfgbg" >&5
8985 echo "${ECHO_T}$with_colorfgbg" >&6
8986 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
8987 #define USE_COLORFGBG 1
8988 EOF
8989
8990 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
8991 echo "$as_me:8991: checking if you want to use experimental extended colors" >&5
8992 echo $ECHO_N "checking if you want to use experimental extended colors... $ECHO_C" >&6
8993
8994 # Check whether --enable-ext-colors or --disable-ext-colors was given.
8995 if test "${enable_ext_colors+set}" = set; then
8996   enableval="$enable_ext_colors"
8997   with_ext_colors=$enableval
8998 else
8999   with_ext_colors=no
9000 fi;
9001 echo "$as_me:9001: result: $with_ext_colors" >&5
9002 echo "${ECHO_T}$with_ext_colors" >&6
9003 NCURSES_EXT_COLORS=0
9004 if test "$with_ext_colors" = yes ; then
9005         if test "$with_widec" != yes ; then
9006                 { echo "$as_me:9006: WARNING: This option applies only to wide-character library" >&5
9007 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
9008         else
9009                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9010
9011 if test "${with_abi_version+set}" != set; then
9012         case $cf_cv_rel_version in
9013         5.*)
9014                 cf_cv_rel_version=6.0
9015                 cf_cv_abi_version=6
9016                 { echo "$as_me:9016: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9017 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9018                 ;;
9019         esac
9020 fi
9021
9022         fi
9023         NCURSES_EXT_COLORS=1
9024         cat >>confdefs.h <<\EOF
9025 #define NCURSES_EXT_COLORS 1
9026 EOF
9027
9028 fi
9029
9030 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9031 echo "$as_me:9031: checking if you want to use experimental extended mouse encoding" >&5
9032 echo $ECHO_N "checking if you want to use experimental extended mouse encoding... $ECHO_C" >&6
9033
9034 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9035 if test "${enable_ext_mouse+set}" = set; then
9036   enableval="$enable_ext_mouse"
9037   with_ext_mouse=$enableval
9038 else
9039   with_ext_mouse=no
9040 fi;
9041 echo "$as_me:9041: result: $with_ext_mouse" >&5
9042 echo "${ECHO_T}$with_ext_mouse" >&6
9043 NCURSES_MOUSE_VERSION=1
9044 if test "$with_ext_mouse" = yes ; then
9045         NCURSES_MOUSE_VERSION=2
9046
9047 if test "${with_abi_version+set}" != set; then
9048         case $cf_cv_rel_version in
9049         5.*)
9050                 cf_cv_rel_version=6.0
9051                 cf_cv_abi_version=6
9052                 { echo "$as_me:9052: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9053 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9054                 ;;
9055         esac
9056 fi
9057
9058 fi
9059
9060 echo "$as_me:9060: checking if you want experimental safe-sprintf code" >&5
9061 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9062
9063 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9064 if test "${enable_safe_sprintf+set}" = set; then
9065   enableval="$enable_safe_sprintf"
9066   with_safe_sprintf=$enableval
9067 else
9068   with_safe_sprintf=no
9069 fi;
9070 echo "$as_me:9070: result: $with_safe_sprintf" >&5
9071 echo "${ECHO_T}$with_safe_sprintf" >&6
9072 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9073 #define USE_SAFE_SPRINTF 1
9074 EOF
9075
9076 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9077 # when hashmap is used scroll hints are useless
9078 if test "$with_hashmap" = no ; then
9079 echo "$as_me:9079: checking if you want to experiment without scrolling-hints code" >&5
9080 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9081
9082 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9083 if test "${enable_scroll_hints+set}" = set; then
9084   enableval="$enable_scroll_hints"
9085   with_scroll_hints=$enableval
9086 else
9087   with_scroll_hints=yes
9088 fi;
9089 echo "$as_me:9089: result: $with_scroll_hints" >&5
9090 echo "${ECHO_T}$with_scroll_hints" >&6
9091 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9092 #define USE_SCROLL_HINTS 1
9093 EOF
9094
9095 fi
9096
9097 echo "$as_me:9097: checking if you want experimental wgetch-events code" >&5
9098 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9099
9100 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9101 if test "${enable_wgetch_events+set}" = set; then
9102   enableval="$enable_wgetch_events"
9103   with_wgetch_events=$enableval
9104 else
9105   with_wgetch_events=no
9106 fi;
9107 echo "$as_me:9107: result: $with_wgetch_events" >&5
9108 echo "${ECHO_T}$with_wgetch_events" >&6
9109 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9110 #define NCURSES_WGETCH_EVENTS 1
9111 EOF
9112
9113 ###############################################################################
9114
9115 ###     use option --disable-echo to suppress full display compiling commands
9116 echo "$as_me:9116: checking if you want to display full commands during build" >&5
9117 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9118
9119 # Check whether --enable-echo or --disable-echo was given.
9120 if test "${enable_echo+set}" = set; then
9121   enableval="$enable_echo"
9122   with_echo=$enableval
9123 else
9124   with_echo=yes
9125 fi;
9126 if test "$with_echo" = yes; then
9127         ECHO_LINK=
9128 else
9129         ECHO_LINK='@ echo linking $@ ... ;'
9130         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9131 fi
9132 echo "$as_me:9132: result: $with_echo" >&5
9133 echo "${ECHO_T}$with_echo" >&6
9134
9135 ###     use option --enable-warnings to turn on all gcc warnings
9136 echo "$as_me:9136: checking if you want to see compiler warnings" >&5
9137 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9138
9139 # Check whether --enable-warnings or --disable-warnings was given.
9140 if test "${enable_warnings+set}" = set; then
9141   enableval="$enable_warnings"
9142   with_warnings=$enableval
9143 fi;
9144 echo "$as_me:9144: result: $with_warnings" >&5
9145 echo "${ECHO_T}$with_warnings" >&6
9146
9147 if test -n "$with_warnings"; then
9148         ADAFLAGS="$ADAFLAGS -gnatg"
9149
9150 INTEL_COMPILER=no
9151
9152 if test "$GCC" = yes ; then
9153         case $host_os in
9154         linux*|gnu*)
9155                 echo "$as_me:9155: checking if this is really Intel C compiler" >&5
9156 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9157                 cf_save_CFLAGS="$CFLAGS"
9158                 CFLAGS="$CFLAGS -no-gcc"
9159                 cat >conftest.$ac_ext <<_ACEOF
9160 #line 9160 "configure"
9161 #include "confdefs.h"
9162
9163 int
9164 main ()
9165 {
9166
9167 #ifdef __INTEL_COMPILER
9168 #else
9169 make an error
9170 #endif
9171
9172   ;
9173   return 0;
9174 }
9175 _ACEOF
9176 rm -f conftest.$ac_objext
9177 if { (eval echo "$as_me:9177: \"$ac_compile\"") >&5
9178   (eval $ac_compile) 2>&5
9179   ac_status=$?
9180   echo "$as_me:9180: \$? = $ac_status" >&5
9181   (exit $ac_status); } &&
9182          { ac_try='test -s conftest.$ac_objext'
9183   { (eval echo "$as_me:9183: \"$ac_try\"") >&5
9184   (eval $ac_try) 2>&5
9185   ac_status=$?
9186   echo "$as_me:9186: \$? = $ac_status" >&5
9187   (exit $ac_status); }; }; then
9188   INTEL_COMPILER=yes
9189 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9190
9191 else
9192   echo "$as_me: failed program was:" >&5
9193 cat conftest.$ac_ext >&5
9194 fi
9195 rm -f conftest.$ac_objext conftest.$ac_ext
9196                 CFLAGS="$cf_save_CFLAGS"
9197                 echo "$as_me:9197: result: $INTEL_COMPILER" >&5
9198 echo "${ECHO_T}$INTEL_COMPILER" >&6
9199                 ;;
9200         esac
9201 fi
9202
9203 cat > conftest.$ac_ext <<EOF
9204 #line 9204 "configure"
9205 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9206 EOF
9207
9208 if test "$INTEL_COMPILER" = yes
9209 then
9210 # The "-wdXXX" options suppress warnings:
9211 # remark #1419: external declaration in primary source file
9212 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9213 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9214 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9215 # remark #193: zero used for undefined preprocessing identifier
9216 # remark #593: variable "curs_sb_left_arrow" was set but never used
9217 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9218 # remark #869: parameter "tw" was never referenced
9219 # remark #981: operands are evaluated in unspecified order
9220 # warning #269: invalid format string conversion
9221
9222         { echo "$as_me:9222: checking for $CC warning options..." >&5
9223 echo "$as_me: checking for $CC warning options..." >&6;}
9224         cf_save_CFLAGS="$CFLAGS"
9225         EXTRA_CFLAGS="-Wall"
9226         for cf_opt in  \
9227                 wd1419 \
9228                 wd1682 \
9229                 wd1683 \
9230                 wd1684 \
9231                 wd193 \
9232                 wd279 \
9233                 wd593 \
9234                 wd810 \
9235                 wd869 \
9236                 wd981
9237         do
9238                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9239                 if { (eval echo "$as_me:9239: \"$ac_compile\"") >&5
9240   (eval $ac_compile) 2>&5
9241   ac_status=$?
9242   echo "$as_me:9242: \$? = $ac_status" >&5
9243   (exit $ac_status); }; then
9244                         test -n "$verbose" && echo "$as_me:9244: result: ... -$cf_opt" >&5
9245 echo "${ECHO_T}... -$cf_opt" >&6
9246                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9247                 fi
9248         done
9249         CFLAGS="$cf_save_CFLAGS"
9250
9251 elif test "$GCC" = yes
9252 then
9253         { echo "$as_me:9253: checking for $CC warning options..." >&5
9254 echo "$as_me: checking for $CC warning options..." >&6;}
9255         cf_save_CFLAGS="$CFLAGS"
9256         EXTRA_CFLAGS="-W -Wall"
9257         cf_warn_CONST=""
9258         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9259         for cf_opt in \
9260                 Wbad-function-cast \
9261                 Wcast-align \
9262                 Wcast-qual \
9263                 Winline \
9264                 Wmissing-declarations \
9265                 Wmissing-prototypes \
9266                 Wnested-externs \
9267                 Wpointer-arith \
9268                 Wshadow \
9269                 Wstrict-prototypes \
9270                 Wundef $cf_warn_CONST
9271         do
9272                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9273                 if { (eval echo "$as_me:9273: \"$ac_compile\"") >&5
9274   (eval $ac_compile) 2>&5
9275   ac_status=$?
9276   echo "$as_me:9276: \$? = $ac_status" >&5
9277   (exit $ac_status); }; then
9278                         test -n "$verbose" && echo "$as_me:9278: result: ... -$cf_opt" >&5
9279 echo "${ECHO_T}... -$cf_opt" >&6
9280                         case $cf_opt in #(vi
9281                         Wcast-qual) #(vi
9282                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9283                                 ;;
9284                         Winline) #(vi
9285                                 case $GCC_VERSION in
9286                                 3.3*)
9287                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
9288
9289                                         continue;;
9290                                 esac
9291                                 ;;
9292                         esac
9293                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9294                 fi
9295         done
9296         CFLAGS="$cf_save_CFLAGS"
9297 fi
9298 rm -f conftest*
9299
9300         if test "$cf_with_cxx" = yes ; then
9301
9302 INTEL_CPLUSPLUS=no
9303
9304 if test "$GCC" = yes ; then
9305         case $host_os in
9306         linux*|gnu*)
9307                 echo "$as_me:9307: checking if this is really Intel C++ compiler" >&5
9308 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9309                 cf_save_CFLAGS="$CXXFLAGS"
9310                 CXXFLAGS="$CXXFLAGS -no-gcc"
9311                 cat >conftest.$ac_ext <<_ACEOF
9312 #line 9312 "configure"
9313 #include "confdefs.h"
9314
9315 int
9316 main ()
9317 {
9318
9319 #ifdef __INTEL_COMPILER
9320 #else
9321 make an error
9322 #endif
9323
9324   ;
9325   return 0;
9326 }
9327 _ACEOF
9328 rm -f conftest.$ac_objext
9329 if { (eval echo "$as_me:9329: \"$ac_compile\"") >&5
9330   (eval $ac_compile) 2>&5
9331   ac_status=$?
9332   echo "$as_me:9332: \$? = $ac_status" >&5
9333   (exit $ac_status); } &&
9334          { ac_try='test -s conftest.$ac_objext'
9335   { (eval echo "$as_me:9335: \"$ac_try\"") >&5
9336   (eval $ac_try) 2>&5
9337   ac_status=$?
9338   echo "$as_me:9338: \$? = $ac_status" >&5
9339   (exit $ac_status); }; }; then
9340   INTEL_CPLUSPLUS=yes
9341 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9342
9343 else
9344   echo "$as_me: failed program was:" >&5
9345 cat conftest.$ac_ext >&5
9346 fi
9347 rm -f conftest.$ac_objext conftest.$ac_ext
9348                 CXXFLAGS="$cf_save_CFLAGS"
9349                 echo "$as_me:9349: result: $INTEL_CPLUSPLUS" >&5
9350 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9351                 ;;
9352         esac
9353 fi
9354
9355 ac_ext=cc
9356 ac_cpp='$CXXCPP $CPPFLAGS'
9357 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9358 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9359 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9360 ac_main_return=return
9361
9362 cat > conftest.$ac_ext <<EOF
9363 #line 9363 "configure"
9364 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9365 EOF
9366
9367 if test "$INTEL_CPLUSPLUS" = yes
9368 then
9369 # The "-wdXXX" options suppress warnings:
9370 # remark #1419: external declaration in primary source file
9371 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9372 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9373 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9374 # remark #193: zero used for undefined preprocessing identifier
9375 # remark #593: variable "curs_sb_left_arrow" was set but never used
9376 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9377 # remark #869: parameter "tw" was never referenced
9378 # remark #981: operands are evaluated in unspecified order
9379 # warning #269: invalid format string conversion
9380
9381         { echo "$as_me:9381: checking for $CC warning options..." >&5
9382 echo "$as_me: checking for $CC warning options..." >&6;}
9383         cf_save_CXXFLAGS="$CXXFLAGS"
9384         EXTRA_CXXFLAGS="-Wall"
9385         for cf_opt in \
9386                 wd1419 \
9387                 wd1682 \
9388                 wd1683 \
9389                 wd1684 \
9390                 wd193 \
9391                 wd279 \
9392                 wd593 \
9393                 wd810 \
9394                 wd869 \
9395                 wd981
9396         do
9397                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9398                 if { (eval echo "$as_me:9398: \"$ac_compile\"") >&5
9399   (eval $ac_compile) 2>&5
9400   ac_status=$?
9401   echo "$as_me:9401: \$? = $ac_status" >&5
9402   (exit $ac_status); }; then
9403                         test -n "$verbose" && echo "$as_me:9403: result: ... -$cf_opt" >&5
9404 echo "${ECHO_T}... -$cf_opt" >&6
9405                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9406                 fi
9407         done
9408         CXXFLAGS="$cf_save_CXXFLAGS"
9409
9410 elif test "$GXX" = yes
9411 then
9412         { echo "$as_me:9412: checking for $CXX warning options..." >&5
9413 echo "$as_me: checking for $CXX warning options..." >&6;}
9414         cf_save_CXXFLAGS="$CXXFLAGS"
9415         EXTRA_CXXFLAGS="-W -Wall"
9416         cf_gxx_extra_warnings=""
9417         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9418         case "$GCC_VERSION" in
9419         [1-2].*)
9420                 ;;
9421         *)
9422                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9423                 ;;
9424         esac
9425         for cf_opt in \
9426                 Wabi \
9427                 fabi-version=0 \
9428                 Woverloaded-virtual \
9429                 Wsign-promo \
9430                 Wsynth \
9431                 Wold-style-cast \
9432                 Wcast-align \
9433                 Wcast-qual \
9434                 Wmissing-prototypes \
9435                 Wpointer-arith \
9436                 Wshadow \
9437                 Wstrict-prototypes \
9438                 Wundef $cf_gxx_extra_warnings Wno-unused
9439         do
9440                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9441                 if { (eval echo "$as_me:9441: \"$ac_compile\"") >&5
9442   (eval $ac_compile) 2>&5
9443   ac_status=$?
9444   echo "$as_me:9444: \$? = $ac_status" >&5
9445   (exit $ac_status); }; then
9446                         test -n "$verbose" && echo "$as_me:9446: result: ... -$cf_opt" >&5
9447 echo "${ECHO_T}... -$cf_opt" >&6
9448                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9449                 else
9450                         test -n "$verbose" && echo "$as_me:9450: result: ... no -$cf_opt" >&5
9451 echo "${ECHO_T}... no -$cf_opt" >&6
9452                 fi
9453         done
9454         CXXFLAGS="$cf_save_CXXFLAGS"
9455 fi
9456
9457 rm -f conftest*
9458 ac_ext=c
9459 ac_cpp='$CPP $CPPFLAGS'
9460 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9461 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9462 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9463 ac_main_return=return
9464
9465         fi
9466 fi
9467
9468 if test "$GCC" = yes
9469 then
9470 cat > conftest.i <<EOF
9471 #ifndef GCC_PRINTF
9472 #define GCC_PRINTF 0
9473 #endif
9474 #ifndef GCC_SCANF
9475 #define GCC_SCANF 0
9476 #endif
9477 #ifndef GCC_NORETURN
9478 #define GCC_NORETURN /* nothing */
9479 #endif
9480 #ifndef GCC_UNUSED
9481 #define GCC_UNUSED /* nothing */
9482 #endif
9483 EOF
9484 if test "$GCC" = yes
9485 then
9486         { echo "$as_me:9486: checking for $CC __attribute__ directives..." >&5
9487 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9488 cat > conftest.$ac_ext <<EOF
9489 #line 9489 "configure"
9490 #include "confdefs.h"
9491 #include "conftest.h"
9492 #include "conftest.i"
9493 #if     GCC_PRINTF
9494 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9495 #else
9496 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9497 #endif
9498 #if     GCC_SCANF
9499 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9500 #else
9501 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9502 #endif
9503 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9504 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9505 extern void foo(void) GCC_NORETURN;
9506 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9507 EOF
9508         for cf_attribute in scanf printf unused noreturn
9509         do
9510
9511 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9512
9513                 cf_directive="__attribute__(($cf_attribute))"
9514                 echo "checking for $CC $cf_directive" 1>&5
9515                 case $cf_attribute in
9516                 scanf|printf)
9517                 cat >conftest.h <<EOF
9518 #define GCC_$cf_ATTRIBUTE 1
9519 EOF
9520                         ;;
9521                 *)
9522                 cat >conftest.h <<EOF
9523 #define GCC_$cf_ATTRIBUTE $cf_directive
9524 EOF
9525                         ;;
9526                 esac
9527                 if { (eval echo "$as_me:9527: \"$ac_compile\"") >&5
9528   (eval $ac_compile) 2>&5
9529   ac_status=$?
9530   echo "$as_me:9530: \$? = $ac_status" >&5
9531   (exit $ac_status); }; then
9532                         test -n "$verbose" && echo "$as_me:9532: result: ... $cf_attribute" >&5
9533 echo "${ECHO_T}... $cf_attribute" >&6
9534                         cat conftest.h >>confdefs.h
9535                 fi
9536         done
9537 else
9538         fgrep define conftest.i >>confdefs.h
9539 fi
9540 rm -rf conftest*
9541 fi
9542
9543 ###     use option --enable-assertions to turn on generation of assertion code
9544 echo "$as_me:9544: checking if you want to enable runtime assertions" >&5
9545 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9546
9547 # Check whether --enable-assertions or --disable-assertions was given.
9548 if test "${enable_assertions+set}" = set; then
9549   enableval="$enable_assertions"
9550   with_assertions=$enableval
9551 else
9552   with_assertions=no
9553 fi;
9554 echo "$as_me:9554: result: $with_assertions" >&5
9555 echo "${ECHO_T}$with_assertions" >&6
9556 if test -n "$GCC"
9557 then
9558         if test "$with_assertions" = no
9559         then
9560                 cat >>confdefs.h <<\EOF
9561 #define NDEBUG 1
9562 EOF
9563
9564                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
9565         else
9566                 ADAFLAGS="$ADAFLAGS -gnata"
9567         fi
9568 fi
9569
9570 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
9571
9572 echo "$as_me:9572: checking if you want to use dmalloc for testing" >&5
9573 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9574
9575 # Check whether --with-dmalloc or --without-dmalloc was given.
9576 if test "${with_dmalloc+set}" = set; then
9577   withval="$with_dmalloc"
9578   cat >>confdefs.h <<\EOF
9579 #define USE_DMALLOC 1
9580 EOF
9581
9582         : ${with_cflags:=-g}
9583         : ${with_no_leaks:=yes}
9584          with_dmalloc=yes
9585 else
9586   with_dmalloc=
9587 fi;
9588 echo "$as_me:9588: result: ${with_dmalloc:-no}" >&5
9589 echo "${ECHO_T}${with_dmalloc:-no}" >&6
9590
9591 case .$with_cflags in #(vi
9592 .*-g*)
9593         case .$CFLAGS in #(vi
9594         .*-g*) #(vi
9595                 ;;
9596         *)
9597
9598 cf_fix_cppflags=no
9599 cf_new_cflags=
9600 cf_new_cppflags=
9601 cf_new_extra_cppflags=
9602
9603 for cf_add_cflags in -g
9604 do
9605 case $cf_fix_cppflags in
9606 no)
9607         case $cf_add_cflags in #(vi
9608         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9609                 case $cf_add_cflags in
9610                 -D*)
9611                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9612
9613                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9614                         && test -z "${cf_tst_cflags}" \
9615                         && cf_fix_cppflags=yes
9616
9617                         if test $cf_fix_cppflags = yes ; then
9618                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9619                                 continue
9620                         elif test "${cf_tst_cflags}" = "\"'" ; then
9621                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9622                                 continue
9623                         fi
9624                         ;;
9625                 esac
9626                 case "$CPPFLAGS" in
9627                 *$cf_add_cflags) #(vi
9628                         ;;
9629                 *) #(vi
9630                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9631                         ;;
9632                 esac
9633                 ;;
9634         *)
9635                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9636                 ;;
9637         esac
9638         ;;
9639 yes)
9640         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9641
9642         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9643
9644         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9645         && test -z "${cf_tst_cflags}" \
9646         && cf_fix_cppflags=no
9647         ;;
9648 esac
9649 done
9650
9651 if test -n "$cf_new_cflags" ; then
9652
9653         CFLAGS="$CFLAGS $cf_new_cflags"
9654 fi
9655
9656 if test -n "$cf_new_cppflags" ; then
9657
9658         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9659 fi
9660
9661 if test -n "$cf_new_extra_cppflags" ; then
9662
9663         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9664 fi
9665
9666                 ;;
9667         esac
9668         ;;
9669 esac
9670
9671 if test "$with_dmalloc" = yes ; then
9672         echo "$as_me:9672: checking for dmalloc.h" >&5
9673 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9674 if test "${ac_cv_header_dmalloc_h+set}" = set; then
9675   echo $ECHO_N "(cached) $ECHO_C" >&6
9676 else
9677   cat >conftest.$ac_ext <<_ACEOF
9678 #line 9678 "configure"
9679 #include "confdefs.h"
9680 #include <dmalloc.h>
9681 _ACEOF
9682 if { (eval echo "$as_me:9682: \"$ac_cpp conftest.$ac_ext\"") >&5
9683   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9684   ac_status=$?
9685   egrep -v '^ *\+' conftest.er1 >conftest.err
9686   rm -f conftest.er1
9687   cat conftest.err >&5
9688   echo "$as_me:9688: \$? = $ac_status" >&5
9689   (exit $ac_status); } >/dev/null; then
9690   if test -s conftest.err; then
9691     ac_cpp_err=$ac_c_preproc_warn_flag
9692   else
9693     ac_cpp_err=
9694   fi
9695 else
9696   ac_cpp_err=yes
9697 fi
9698 if test -z "$ac_cpp_err"; then
9699   ac_cv_header_dmalloc_h=yes
9700 else
9701   echo "$as_me: failed program was:" >&5
9702   cat conftest.$ac_ext >&5
9703   ac_cv_header_dmalloc_h=no
9704 fi
9705 rm -f conftest.err conftest.$ac_ext
9706 fi
9707 echo "$as_me:9707: result: $ac_cv_header_dmalloc_h" >&5
9708 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
9709 if test $ac_cv_header_dmalloc_h = yes; then
9710
9711 echo "$as_me:9711: checking for dmalloc_debug in -ldmalloc" >&5
9712 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
9713 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
9714   echo $ECHO_N "(cached) $ECHO_C" >&6
9715 else
9716   ac_check_lib_save_LIBS=$LIBS
9717 LIBS="-ldmalloc  $LIBS"
9718 cat >conftest.$ac_ext <<_ACEOF
9719 #line 9719 "configure"
9720 #include "confdefs.h"
9721
9722 /* Override any gcc2 internal prototype to avoid an error.  */
9723 #ifdef __cplusplus
9724 extern "C"
9725 #endif
9726 /* We use char because int might match the return type of a gcc2
9727    builtin and then its argument prototype would still apply.  */
9728 char dmalloc_debug ();
9729 int
9730 main ()
9731 {
9732 dmalloc_debug ();
9733   ;
9734   return 0;
9735 }
9736 _ACEOF
9737 rm -f conftest.$ac_objext conftest$ac_exeext
9738 if { (eval echo "$as_me:9738: \"$ac_link\"") >&5
9739   (eval $ac_link) 2>&5
9740   ac_status=$?
9741   echo "$as_me:9741: \$? = $ac_status" >&5
9742   (exit $ac_status); } &&
9743          { ac_try='test -s conftest$ac_exeext'
9744   { (eval echo "$as_me:9744: \"$ac_try\"") >&5
9745   (eval $ac_try) 2>&5
9746   ac_status=$?
9747   echo "$as_me:9747: \$? = $ac_status" >&5
9748   (exit $ac_status); }; }; then
9749   ac_cv_lib_dmalloc_dmalloc_debug=yes
9750 else
9751   echo "$as_me: failed program was:" >&5
9752 cat conftest.$ac_ext >&5
9753 ac_cv_lib_dmalloc_dmalloc_debug=no
9754 fi
9755 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9756 LIBS=$ac_check_lib_save_LIBS
9757 fi
9758 echo "$as_me:9758: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
9759 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
9760 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
9761   cat >>confdefs.h <<EOF
9762 #define HAVE_LIBDMALLOC 1
9763 EOF
9764
9765   LIBS="-ldmalloc $LIBS"
9766
9767 fi
9768
9769 fi
9770
9771 fi
9772
9773 echo "$as_me:9773: checking if you want to use dbmalloc for testing" >&5
9774 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
9775
9776 # Check whether --with-dbmalloc or --without-dbmalloc was given.
9777 if test "${with_dbmalloc+set}" = set; then
9778   withval="$with_dbmalloc"
9779   cat >>confdefs.h <<\EOF
9780 #define USE_DBMALLOC 1
9781 EOF
9782
9783         : ${with_cflags:=-g}
9784         : ${with_no_leaks:=yes}
9785          with_dbmalloc=yes
9786 else
9787   with_dbmalloc=
9788 fi;
9789 echo "$as_me:9789: result: ${with_dbmalloc:-no}" >&5
9790 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
9791
9792 case .$with_cflags in #(vi
9793 .*-g*)
9794         case .$CFLAGS in #(vi
9795         .*-g*) #(vi
9796                 ;;
9797         *)
9798
9799 cf_fix_cppflags=no
9800 cf_new_cflags=
9801 cf_new_cppflags=
9802 cf_new_extra_cppflags=
9803
9804 for cf_add_cflags in -g
9805 do
9806 case $cf_fix_cppflags in
9807 no)
9808         case $cf_add_cflags in #(vi
9809         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9810                 case $cf_add_cflags in
9811                 -D*)
9812                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9813
9814                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9815                         && test -z "${cf_tst_cflags}" \
9816                         && cf_fix_cppflags=yes
9817
9818                         if test $cf_fix_cppflags = yes ; then
9819                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9820                                 continue
9821                         elif test "${cf_tst_cflags}" = "\"'" ; then
9822                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9823                                 continue
9824                         fi
9825                         ;;
9826                 esac
9827                 case "$CPPFLAGS" in
9828                 *$cf_add_cflags) #(vi
9829                         ;;
9830                 *) #(vi
9831                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9832                         ;;
9833                 esac
9834                 ;;
9835         *)
9836                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9837                 ;;
9838         esac
9839         ;;
9840 yes)
9841         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9842
9843         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9844
9845         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9846         && test -z "${cf_tst_cflags}" \
9847         && cf_fix_cppflags=no
9848         ;;
9849 esac
9850 done
9851
9852 if test -n "$cf_new_cflags" ; then
9853
9854         CFLAGS="$CFLAGS $cf_new_cflags"
9855 fi
9856
9857 if test -n "$cf_new_cppflags" ; then
9858
9859         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9860 fi
9861
9862 if test -n "$cf_new_extra_cppflags" ; then
9863
9864         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9865 fi
9866
9867                 ;;
9868         esac
9869         ;;
9870 esac
9871
9872 if test "$with_dbmalloc" = yes ; then
9873         echo "$as_me:9873: checking for dbmalloc.h" >&5
9874 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
9875 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
9876   echo $ECHO_N "(cached) $ECHO_C" >&6
9877 else
9878   cat >conftest.$ac_ext <<_ACEOF
9879 #line 9879 "configure"
9880 #include "confdefs.h"
9881 #include <dbmalloc.h>
9882 _ACEOF
9883 if { (eval echo "$as_me:9883: \"$ac_cpp conftest.$ac_ext\"") >&5
9884   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9885   ac_status=$?
9886   egrep -v '^ *\+' conftest.er1 >conftest.err
9887   rm -f conftest.er1
9888   cat conftest.err >&5
9889   echo "$as_me:9889: \$? = $ac_status" >&5
9890   (exit $ac_status); } >/dev/null; then
9891   if test -s conftest.err; then
9892     ac_cpp_err=$ac_c_preproc_warn_flag
9893   else
9894     ac_cpp_err=
9895   fi
9896 else
9897   ac_cpp_err=yes
9898 fi
9899 if test -z "$ac_cpp_err"; then
9900   ac_cv_header_dbmalloc_h=yes
9901 else
9902   echo "$as_me: failed program was:" >&5
9903   cat conftest.$ac_ext >&5
9904   ac_cv_header_dbmalloc_h=no
9905 fi
9906 rm -f conftest.err conftest.$ac_ext
9907 fi
9908 echo "$as_me:9908: result: $ac_cv_header_dbmalloc_h" >&5
9909 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
9910 if test $ac_cv_header_dbmalloc_h = yes; then
9911
9912 echo "$as_me:9912: checking for debug_malloc in -ldbmalloc" >&5
9913 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
9914 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
9915   echo $ECHO_N "(cached) $ECHO_C" >&6
9916 else
9917   ac_check_lib_save_LIBS=$LIBS
9918 LIBS="-ldbmalloc  $LIBS"
9919 cat >conftest.$ac_ext <<_ACEOF
9920 #line 9920 "configure"
9921 #include "confdefs.h"
9922
9923 /* Override any gcc2 internal prototype to avoid an error.  */
9924 #ifdef __cplusplus
9925 extern "C"
9926 #endif
9927 /* We use char because int might match the return type of a gcc2
9928    builtin and then its argument prototype would still apply.  */
9929 char debug_malloc ();
9930 int
9931 main ()
9932 {
9933 debug_malloc ();
9934   ;
9935   return 0;
9936 }
9937 _ACEOF
9938 rm -f conftest.$ac_objext conftest$ac_exeext
9939 if { (eval echo "$as_me:9939: \"$ac_link\"") >&5
9940   (eval $ac_link) 2>&5
9941   ac_status=$?
9942   echo "$as_me:9942: \$? = $ac_status" >&5
9943   (exit $ac_status); } &&
9944          { ac_try='test -s conftest$ac_exeext'
9945   { (eval echo "$as_me:9945: \"$ac_try\"") >&5
9946   (eval $ac_try) 2>&5
9947   ac_status=$?
9948   echo "$as_me:9948: \$? = $ac_status" >&5
9949   (exit $ac_status); }; }; then
9950   ac_cv_lib_dbmalloc_debug_malloc=yes
9951 else
9952   echo "$as_me: failed program was:" >&5
9953 cat conftest.$ac_ext >&5
9954 ac_cv_lib_dbmalloc_debug_malloc=no
9955 fi
9956 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9957 LIBS=$ac_check_lib_save_LIBS
9958 fi
9959 echo "$as_me:9959: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
9960 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
9961 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
9962   cat >>confdefs.h <<EOF
9963 #define HAVE_LIBDBMALLOC 1
9964 EOF
9965
9966   LIBS="-ldbmalloc $LIBS"
9967
9968 fi
9969
9970 fi
9971
9972 fi
9973
9974 echo "$as_me:9974: checking if you want to use valgrind for testing" >&5
9975 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
9976
9977 # Check whether --with-valgrind or --without-valgrind was given.
9978 if test "${with_valgrind+set}" = set; then
9979   withval="$with_valgrind"
9980   cat >>confdefs.h <<\EOF
9981 #define USE_VALGRIND 1
9982 EOF
9983
9984         : ${with_cflags:=-g}
9985         : ${with_no_leaks:=yes}
9986          with_valgrind=yes
9987 else
9988   with_valgrind=
9989 fi;
9990 echo "$as_me:9990: result: ${with_valgrind:-no}" >&5
9991 echo "${ECHO_T}${with_valgrind:-no}" >&6
9992
9993 case .$with_cflags in #(vi
9994 .*-g*)
9995         case .$CFLAGS in #(vi
9996         .*-g*) #(vi
9997                 ;;
9998         *)
9999
10000 cf_fix_cppflags=no
10001 cf_new_cflags=
10002 cf_new_cppflags=
10003 cf_new_extra_cppflags=
10004
10005 for cf_add_cflags in -g
10006 do
10007 case $cf_fix_cppflags in
10008 no)
10009         case $cf_add_cflags in #(vi
10010         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10011                 case $cf_add_cflags in
10012                 -D*)
10013                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10014
10015                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10016                         && test -z "${cf_tst_cflags}" \
10017                         && cf_fix_cppflags=yes
10018
10019                         if test $cf_fix_cppflags = yes ; then
10020                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10021                                 continue
10022                         elif test "${cf_tst_cflags}" = "\"'" ; then
10023                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10024                                 continue
10025                         fi
10026                         ;;
10027                 esac
10028                 case "$CPPFLAGS" in
10029                 *$cf_add_cflags) #(vi
10030                         ;;
10031                 *) #(vi
10032                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10033                         ;;
10034                 esac
10035                 ;;
10036         *)
10037                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10038                 ;;
10039         esac
10040         ;;
10041 yes)
10042         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10043
10044         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10045
10046         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10047         && test -z "${cf_tst_cflags}" \
10048         && cf_fix_cppflags=no
10049         ;;
10050 esac
10051 done
10052
10053 if test -n "$cf_new_cflags" ; then
10054
10055         CFLAGS="$CFLAGS $cf_new_cflags"
10056 fi
10057
10058 if test -n "$cf_new_cppflags" ; then
10059
10060         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10061 fi
10062
10063 if test -n "$cf_new_extra_cppflags" ; then
10064
10065         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10066 fi
10067
10068                 ;;
10069         esac
10070         ;;
10071 esac
10072
10073 echo "$as_me:10073: checking if you want to perform memory-leak testing" >&5
10074 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10075
10076 # Check whether --enable-leaks or --disable-leaks was given.
10077 if test "${enable_leaks+set}" = set; then
10078   enableval="$enable_leaks"
10079   with_no_leaks=yes
10080 else
10081   : ${with_no_leaks:=no}
10082 fi;
10083 echo "$as_me:10083: result: $with_no_leaks" >&5
10084 echo "${ECHO_T}$with_no_leaks" >&6
10085
10086 if test "$with_no_leaks" = yes ; then
10087         cat >>confdefs.h <<\EOF
10088 #define NO_LEAKS 1
10089 EOF
10090
10091 fi
10092
10093 cat >>confdefs.h <<\EOF
10094 #define HAVE_NC_ALLOC_H 1
10095 EOF
10096
10097 ###     use option --enable-expanded to generate certain macros as functions
10098
10099 # Check whether --enable-expanded or --disable-expanded was given.
10100 if test "${enable_expanded+set}" = set; then
10101   enableval="$enable_expanded"
10102   test "$enableval" = yes && cat >>confdefs.h <<\EOF
10103 #define NCURSES_EXPANDED 1
10104 EOF
10105
10106 fi;
10107
10108 ###     use option --disable-macros to suppress macros in favor of functions
10109
10110 # Check whether --enable-macros or --disable-macros was given.
10111 if test "${enable_macros+set}" = set; then
10112   enableval="$enable_macros"
10113   test "$enableval" = no && cat >>confdefs.h <<\EOF
10114 #define NCURSES_NOMACROS 1
10115 EOF
10116
10117 fi;
10118
10119 # Normally we only add trace() to the debug-library.  Allow this to be
10120 # extended to all models of the ncurses library:
10121 cf_all_traces=no
10122 case "$CFLAGS $CPPFLAGS" in
10123 *-DTRACE*)
10124         cf_all_traces=yes
10125         ;;
10126 esac
10127
10128 echo "$as_me:10128: checking whether to add trace feature to all models" >&5
10129 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10130
10131 # Check whether --with-trace or --without-trace was given.
10132 if test "${with_trace+set}" = set; then
10133   withval="$with_trace"
10134   cf_with_trace=$withval
10135 else
10136   cf_with_trace=$cf_all_traces
10137 fi;
10138 echo "$as_me:10138: result: $cf_with_trace" >&5
10139 echo "${ECHO_T}$cf_with_trace" >&6
10140
10141 if test "$cf_with_trace" = yes ; then
10142         LIB_TRACING=all
10143         ADA_TRACE=TRUE
10144
10145 cf_fix_cppflags=no
10146 cf_new_cflags=
10147 cf_new_cppflags=
10148 cf_new_extra_cppflags=
10149
10150 for cf_add_cflags in -DTRACE
10151 do
10152 case $cf_fix_cppflags in
10153 no)
10154         case $cf_add_cflags in #(vi
10155         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10156                 case $cf_add_cflags in
10157                 -D*)
10158                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10159
10160                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10161                         && test -z "${cf_tst_cflags}" \
10162                         && cf_fix_cppflags=yes
10163
10164                         if test $cf_fix_cppflags = yes ; then
10165                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10166                                 continue
10167                         elif test "${cf_tst_cflags}" = "\"'" ; then
10168                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10169                                 continue
10170                         fi
10171                         ;;
10172                 esac
10173                 case "$CPPFLAGS" in
10174                 *$cf_add_cflags) #(vi
10175                         ;;
10176                 *) #(vi
10177                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10178                         ;;
10179                 esac
10180                 ;;
10181         *)
10182                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10183                 ;;
10184         esac
10185         ;;
10186 yes)
10187         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10188
10189         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10190
10191         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10192         && test -z "${cf_tst_cflags}" \
10193         && cf_fix_cppflags=no
10194         ;;
10195 esac
10196 done
10197
10198 if test -n "$cf_new_cflags" ; then
10199
10200         CFLAGS="$CFLAGS $cf_new_cflags"
10201 fi
10202
10203 if test -n "$cf_new_cppflags" ; then
10204
10205         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10206 fi
10207
10208 if test -n "$cf_new_extra_cppflags" ; then
10209
10210         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10211 fi
10212
10213 else
10214         LIB_TRACING=DEBUG
10215         ADA_TRACE=FALSE
10216 fi
10217
10218 ###     Checks for libraries.
10219 echo "$as_me:10219: checking for gettimeofday" >&5
10220 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10221 if test "${ac_cv_func_gettimeofday+set}" = set; then
10222   echo $ECHO_N "(cached) $ECHO_C" >&6
10223 else
10224   cat >conftest.$ac_ext <<_ACEOF
10225 #line 10225 "configure"
10226 #include "confdefs.h"
10227 /* System header to define __stub macros and hopefully few prototypes,
10228     which can conflict with char gettimeofday (); below.  */
10229 #include <assert.h>
10230 /* Override any gcc2 internal prototype to avoid an error.  */
10231 #ifdef __cplusplus
10232 extern "C"
10233 #endif
10234 /* We use char because int might match the return type of a gcc2
10235    builtin and then its argument prototype would still apply.  */
10236 char gettimeofday ();
10237 char (*f) ();
10238
10239 int
10240 main ()
10241 {
10242 /* The GNU C library defines this for functions which it implements
10243     to always fail with ENOSYS.  Some functions are actually named
10244     something starting with __ and the normal name is an alias.  */
10245 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10246 choke me
10247 #else
10248 f = gettimeofday;
10249 #endif
10250
10251   ;
10252   return 0;
10253 }
10254 _ACEOF
10255 rm -f conftest.$ac_objext conftest$ac_exeext
10256 if { (eval echo "$as_me:10256: \"$ac_link\"") >&5
10257   (eval $ac_link) 2>&5
10258   ac_status=$?
10259   echo "$as_me:10259: \$? = $ac_status" >&5
10260   (exit $ac_status); } &&
10261          { ac_try='test -s conftest$ac_exeext'
10262   { (eval echo "$as_me:10262: \"$ac_try\"") >&5
10263   (eval $ac_try) 2>&5
10264   ac_status=$?
10265   echo "$as_me:10265: \$? = $ac_status" >&5
10266   (exit $ac_status); }; }; then
10267   ac_cv_func_gettimeofday=yes
10268 else
10269   echo "$as_me: failed program was:" >&5
10270 cat conftest.$ac_ext >&5
10271 ac_cv_func_gettimeofday=no
10272 fi
10273 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10274 fi
10275 echo "$as_me:10275: result: $ac_cv_func_gettimeofday" >&5
10276 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10277 if test $ac_cv_func_gettimeofday = yes; then
10278   cat >>confdefs.h <<\EOF
10279 #define HAVE_GETTIMEOFDAY 1
10280 EOF
10281
10282 else
10283
10284 echo "$as_me:10284: checking for gettimeofday in -lbsd" >&5
10285 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10286 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10287   echo $ECHO_N "(cached) $ECHO_C" >&6
10288 else
10289   ac_check_lib_save_LIBS=$LIBS
10290 LIBS="-lbsd  $LIBS"
10291 cat >conftest.$ac_ext <<_ACEOF
10292 #line 10292 "configure"
10293 #include "confdefs.h"
10294
10295 /* Override any gcc2 internal prototype to avoid an error.  */
10296 #ifdef __cplusplus
10297 extern "C"
10298 #endif
10299 /* We use char because int might match the return type of a gcc2
10300    builtin and then its argument prototype would still apply.  */
10301 char gettimeofday ();
10302 int
10303 main ()
10304 {
10305 gettimeofday ();
10306   ;
10307   return 0;
10308 }
10309 _ACEOF
10310 rm -f conftest.$ac_objext conftest$ac_exeext
10311 if { (eval echo "$as_me:10311: \"$ac_link\"") >&5
10312   (eval $ac_link) 2>&5
10313   ac_status=$?
10314   echo "$as_me:10314: \$? = $ac_status" >&5
10315   (exit $ac_status); } &&
10316          { ac_try='test -s conftest$ac_exeext'
10317   { (eval echo "$as_me:10317: \"$ac_try\"") >&5
10318   (eval $ac_try) 2>&5
10319   ac_status=$?
10320   echo "$as_me:10320: \$? = $ac_status" >&5
10321   (exit $ac_status); }; }; then
10322   ac_cv_lib_bsd_gettimeofday=yes
10323 else
10324   echo "$as_me: failed program was:" >&5
10325 cat conftest.$ac_ext >&5
10326 ac_cv_lib_bsd_gettimeofday=no
10327 fi
10328 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10329 LIBS=$ac_check_lib_save_LIBS
10330 fi
10331 echo "$as_me:10331: result: $ac_cv_lib_bsd_gettimeofday" >&5
10332 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10333 if test $ac_cv_lib_bsd_gettimeofday = yes; then
10334   cat >>confdefs.h <<\EOF
10335 #define HAVE_GETTIMEOFDAY 1
10336 EOF
10337
10338         LIBS="$LIBS -lbsd"
10339 fi
10340
10341 fi
10342
10343 echo "$as_me:10343: checking if -lm needed for math functions" >&5
10344 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10345 if test "${cf_cv_need_libm+set}" = set; then
10346   echo $ECHO_N "(cached) $ECHO_C" >&6
10347 else
10348
10349         cat >conftest.$ac_ext <<_ACEOF
10350 #line 10350 "configure"
10351 #include "confdefs.h"
10352
10353         #include <stdio.h>
10354         #include <math.h>
10355
10356 int
10357 main ()
10358 {
10359 double x = rand(); printf("result = %g\n", sin(x))
10360   ;
10361   return 0;
10362 }
10363 _ACEOF
10364 rm -f conftest.$ac_objext conftest$ac_exeext
10365 if { (eval echo "$as_me:10365: \"$ac_link\"") >&5
10366   (eval $ac_link) 2>&5
10367   ac_status=$?
10368   echo "$as_me:10368: \$? = $ac_status" >&5
10369   (exit $ac_status); } &&
10370          { ac_try='test -s conftest$ac_exeext'
10371   { (eval echo "$as_me:10371: \"$ac_try\"") >&5
10372   (eval $ac_try) 2>&5
10373   ac_status=$?
10374   echo "$as_me:10374: \$? = $ac_status" >&5
10375   (exit $ac_status); }; }; then
10376   cf_cv_need_libm=no
10377 else
10378   echo "$as_me: failed program was:" >&5
10379 cat conftest.$ac_ext >&5
10380 cf_cv_need_libm=yes
10381 fi
10382 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10383 fi
10384 echo "$as_me:10384: result: $cf_cv_need_libm" >&5
10385 echo "${ECHO_T}$cf_cv_need_libm" >&6
10386 if test "$cf_cv_need_libm" = yes
10387 then
10388 MATH_LIB=-lm
10389 fi
10390
10391 ###     Checks for header files.
10392 echo "$as_me:10392: checking for ANSI C header files" >&5
10393 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10394 if test "${ac_cv_header_stdc+set}" = set; then
10395   echo $ECHO_N "(cached) $ECHO_C" >&6
10396 else
10397   cat >conftest.$ac_ext <<_ACEOF
10398 #line 10398 "configure"
10399 #include "confdefs.h"
10400 #include <stdlib.h>
10401 #include <stdarg.h>
10402 #include <string.h>
10403 #include <float.h>
10404
10405 _ACEOF
10406 if { (eval echo "$as_me:10406: \"$ac_cpp conftest.$ac_ext\"") >&5
10407   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10408   ac_status=$?
10409   egrep -v '^ *\+' conftest.er1 >conftest.err
10410   rm -f conftest.er1
10411   cat conftest.err >&5
10412   echo "$as_me:10412: \$? = $ac_status" >&5
10413   (exit $ac_status); } >/dev/null; then
10414   if test -s conftest.err; then
10415     ac_cpp_err=$ac_c_preproc_warn_flag
10416   else
10417     ac_cpp_err=
10418   fi
10419 else
10420   ac_cpp_err=yes
10421 fi
10422 if test -z "$ac_cpp_err"; then
10423   ac_cv_header_stdc=yes
10424 else
10425   echo "$as_me: failed program was:" >&5
10426   cat conftest.$ac_ext >&5
10427   ac_cv_header_stdc=no
10428 fi
10429 rm -f conftest.err conftest.$ac_ext
10430
10431 if test $ac_cv_header_stdc = yes; then
10432   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10433   cat >conftest.$ac_ext <<_ACEOF
10434 #line 10434 "configure"
10435 #include "confdefs.h"
10436 #include <string.h>
10437
10438 _ACEOF
10439 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10440   egrep "memchr" >/dev/null 2>&1; then
10441   :
10442 else
10443   ac_cv_header_stdc=no
10444 fi
10445 rm -f conftest*
10446
10447 fi
10448
10449 if test $ac_cv_header_stdc = yes; then
10450   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10451   cat >conftest.$ac_ext <<_ACEOF
10452 #line 10452 "configure"
10453 #include "confdefs.h"
10454 #include <stdlib.h>
10455
10456 _ACEOF
10457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10458   egrep "free" >/dev/null 2>&1; then
10459   :
10460 else
10461   ac_cv_header_stdc=no
10462 fi
10463 rm -f conftest*
10464
10465 fi
10466
10467 if test $ac_cv_header_stdc = yes; then
10468   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10469   if test "$cross_compiling" = yes; then
10470   :
10471 else
10472   cat >conftest.$ac_ext <<_ACEOF
10473 #line 10473 "configure"
10474 #include "confdefs.h"
10475 #include <ctype.h>
10476 #if ((' ' & 0x0FF) == 0x020)
10477 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10478 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10479 #else
10480 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10481                      || ('j' <= (c) && (c) <= 'r') \
10482                      || ('s' <= (c) && (c) <= 'z'))
10483 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10484 #endif
10485
10486 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10487 int
10488 main ()
10489 {
10490   int i;
10491   for (i = 0; i < 256; i++)
10492     if (XOR (islower (i), ISLOWER (i))
10493         || toupper (i) != TOUPPER (i))
10494       $ac_main_return(2);
10495   $ac_main_return (0);
10496 }
10497 _ACEOF
10498 rm -f conftest$ac_exeext
10499 if { (eval echo "$as_me:10499: \"$ac_link\"") >&5
10500   (eval $ac_link) 2>&5
10501   ac_status=$?
10502   echo "$as_me:10502: \$? = $ac_status" >&5
10503   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10504   { (eval echo "$as_me:10504: \"$ac_try\"") >&5
10505   (eval $ac_try) 2>&5
10506   ac_status=$?
10507   echo "$as_me:10507: \$? = $ac_status" >&5
10508   (exit $ac_status); }; }; then
10509   :
10510 else
10511   echo "$as_me: program exited with status $ac_status" >&5
10512 echo "$as_me: failed program was:" >&5
10513 cat conftest.$ac_ext >&5
10514 ac_cv_header_stdc=no
10515 fi
10516 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10517 fi
10518 fi
10519 fi
10520 echo "$as_me:10520: result: $ac_cv_header_stdc" >&5
10521 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10522 if test $ac_cv_header_stdc = yes; then
10523
10524 cat >>confdefs.h <<\EOF
10525 #define STDC_HEADERS 1
10526 EOF
10527
10528 fi
10529
10530 ac_header_dirent=no
10531 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10532   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10533 echo "$as_me:10533: checking for $ac_hdr that defines DIR" >&5
10534 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10535 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10536   echo $ECHO_N "(cached) $ECHO_C" >&6
10537 else
10538   cat >conftest.$ac_ext <<_ACEOF
10539 #line 10539 "configure"
10540 #include "confdefs.h"
10541 #include <sys/types.h>
10542 #include <$ac_hdr>
10543
10544 int
10545 main ()
10546 {
10547 if ((DIR *) 0)
10548 return 0;
10549   ;
10550   return 0;
10551 }
10552 _ACEOF
10553 rm -f conftest.$ac_objext
10554 if { (eval echo "$as_me:10554: \"$ac_compile\"") >&5
10555   (eval $ac_compile) 2>&5
10556   ac_status=$?
10557   echo "$as_me:10557: \$? = $ac_status" >&5
10558   (exit $ac_status); } &&
10559          { ac_try='test -s conftest.$ac_objext'
10560   { (eval echo "$as_me:10560: \"$ac_try\"") >&5
10561   (eval $ac_try) 2>&5
10562   ac_status=$?
10563   echo "$as_me:10563: \$? = $ac_status" >&5
10564   (exit $ac_status); }; }; then
10565   eval "$as_ac_Header=yes"
10566 else
10567   echo "$as_me: failed program was:" >&5
10568 cat conftest.$ac_ext >&5
10569 eval "$as_ac_Header=no"
10570 fi
10571 rm -f conftest.$ac_objext conftest.$ac_ext
10572 fi
10573 echo "$as_me:10573: result: `eval echo '${'$as_ac_Header'}'`" >&5
10574 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10575 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10576   cat >>confdefs.h <<EOF
10577 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10578 EOF
10579
10580 ac_header_dirent=$ac_hdr; break
10581 fi
10582
10583 done
10584 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10585 if test $ac_header_dirent = dirent.h; then
10586   echo "$as_me:10586: checking for opendir in -ldir" >&5
10587 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10588 if test "${ac_cv_lib_dir_opendir+set}" = set; then
10589   echo $ECHO_N "(cached) $ECHO_C" >&6
10590 else
10591   ac_check_lib_save_LIBS=$LIBS
10592 LIBS="-ldir  $LIBS"
10593 cat >conftest.$ac_ext <<_ACEOF
10594 #line 10594 "configure"
10595 #include "confdefs.h"
10596
10597 /* Override any gcc2 internal prototype to avoid an error.  */
10598 #ifdef __cplusplus
10599 extern "C"
10600 #endif
10601 /* We use char because int might match the return type of a gcc2
10602    builtin and then its argument prototype would still apply.  */
10603 char opendir ();
10604 int
10605 main ()
10606 {
10607 opendir ();
10608   ;
10609   return 0;
10610 }
10611 _ACEOF
10612 rm -f conftest.$ac_objext conftest$ac_exeext
10613 if { (eval echo "$as_me:10613: \"$ac_link\"") >&5
10614   (eval $ac_link) 2>&5
10615   ac_status=$?
10616   echo "$as_me:10616: \$? = $ac_status" >&5
10617   (exit $ac_status); } &&
10618          { ac_try='test -s conftest$ac_exeext'
10619   { (eval echo "$as_me:10619: \"$ac_try\"") >&5
10620   (eval $ac_try) 2>&5
10621   ac_status=$?
10622   echo "$as_me:10622: \$? = $ac_status" >&5
10623   (exit $ac_status); }; }; then
10624   ac_cv_lib_dir_opendir=yes
10625 else
10626   echo "$as_me: failed program was:" >&5
10627 cat conftest.$ac_ext >&5
10628 ac_cv_lib_dir_opendir=no
10629 fi
10630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10631 LIBS=$ac_check_lib_save_LIBS
10632 fi
10633 echo "$as_me:10633: result: $ac_cv_lib_dir_opendir" >&5
10634 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10635 if test $ac_cv_lib_dir_opendir = yes; then
10636   LIBS="$LIBS -ldir"
10637 fi
10638
10639 else
10640   echo "$as_me:10640: checking for opendir in -lx" >&5
10641 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10642 if test "${ac_cv_lib_x_opendir+set}" = set; then
10643   echo $ECHO_N "(cached) $ECHO_C" >&6
10644 else
10645   ac_check_lib_save_LIBS=$LIBS
10646 LIBS="-lx  $LIBS"
10647 cat >conftest.$ac_ext <<_ACEOF
10648 #line 10648 "configure"
10649 #include "confdefs.h"
10650
10651 /* Override any gcc2 internal prototype to avoid an error.  */
10652 #ifdef __cplusplus
10653 extern "C"
10654 #endif
10655 /* We use char because int might match the return type of a gcc2
10656    builtin and then its argument prototype would still apply.  */
10657 char opendir ();
10658 int
10659 main ()
10660 {
10661 opendir ();
10662   ;
10663   return 0;
10664 }
10665 _ACEOF
10666 rm -f conftest.$ac_objext conftest$ac_exeext
10667 if { (eval echo "$as_me:10667: \"$ac_link\"") >&5
10668   (eval $ac_link) 2>&5
10669   ac_status=$?
10670   echo "$as_me:10670: \$? = $ac_status" >&5
10671   (exit $ac_status); } &&
10672          { ac_try='test -s conftest$ac_exeext'
10673   { (eval echo "$as_me:10673: \"$ac_try\"") >&5
10674   (eval $ac_try) 2>&5
10675   ac_status=$?
10676   echo "$as_me:10676: \$? = $ac_status" >&5
10677   (exit $ac_status); }; }; then
10678   ac_cv_lib_x_opendir=yes
10679 else
10680   echo "$as_me: failed program was:" >&5
10681 cat conftest.$ac_ext >&5
10682 ac_cv_lib_x_opendir=no
10683 fi
10684 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10685 LIBS=$ac_check_lib_save_LIBS
10686 fi
10687 echo "$as_me:10687: result: $ac_cv_lib_x_opendir" >&5
10688 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10689 if test $ac_cv_lib_x_opendir = yes; then
10690   LIBS="$LIBS -lx"
10691 fi
10692
10693 fi
10694
10695 echo "$as_me:10695: checking whether time.h and sys/time.h may both be included" >&5
10696 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10697 if test "${ac_cv_header_time+set}" = set; then
10698   echo $ECHO_N "(cached) $ECHO_C" >&6
10699 else
10700   cat >conftest.$ac_ext <<_ACEOF
10701 #line 10701 "configure"
10702 #include "confdefs.h"
10703 #include <sys/types.h>
10704 #include <sys/time.h>
10705 #include <time.h>
10706
10707 int
10708 main ()
10709 {
10710 if ((struct tm *) 0)
10711 return 0;
10712   ;
10713   return 0;
10714 }
10715 _ACEOF
10716 rm -f conftest.$ac_objext
10717 if { (eval echo "$as_me:10717: \"$ac_compile\"") >&5
10718   (eval $ac_compile) 2>&5
10719   ac_status=$?
10720   echo "$as_me:10720: \$? = $ac_status" >&5
10721   (exit $ac_status); } &&
10722          { ac_try='test -s conftest.$ac_objext'
10723   { (eval echo "$as_me:10723: \"$ac_try\"") >&5
10724   (eval $ac_try) 2>&5
10725   ac_status=$?
10726   echo "$as_me:10726: \$? = $ac_status" >&5
10727   (exit $ac_status); }; }; then
10728   ac_cv_header_time=yes
10729 else
10730   echo "$as_me: failed program was:" >&5
10731 cat conftest.$ac_ext >&5
10732 ac_cv_header_time=no
10733 fi
10734 rm -f conftest.$ac_objext conftest.$ac_ext
10735 fi
10736 echo "$as_me:10736: result: $ac_cv_header_time" >&5
10737 echo "${ECHO_T}$ac_cv_header_time" >&6
10738 if test $ac_cv_header_time = yes; then
10739
10740 cat >>confdefs.h <<\EOF
10741 #define TIME_WITH_SYS_TIME 1
10742 EOF
10743
10744 fi
10745
10746 echo "$as_me:10746: checking for regular-expression headers" >&5
10747 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
10748 if test "${cf_cv_regex+set}" = set; then
10749   echo $ECHO_N "(cached) $ECHO_C" >&6
10750 else
10751
10752 cat >conftest.$ac_ext <<_ACEOF
10753 #line 10753 "configure"
10754 #include "confdefs.h"
10755 #include <sys/types.h>
10756 #include <regex.h>
10757 int
10758 main ()
10759 {
10760
10761         regex_t *p;
10762         int x = regcomp(p, "", 0);
10763         int y = regexec(p, "", 0, 0, 0);
10764         regfree(p);
10765
10766   ;
10767   return 0;
10768 }
10769 _ACEOF
10770 rm -f conftest.$ac_objext conftest$ac_exeext
10771 if { (eval echo "$as_me:10771: \"$ac_link\"") >&5
10772   (eval $ac_link) 2>&5
10773   ac_status=$?
10774   echo "$as_me:10774: \$? = $ac_status" >&5
10775   (exit $ac_status); } &&
10776          { ac_try='test -s conftest$ac_exeext'
10777   { (eval echo "$as_me:10777: \"$ac_try\"") >&5
10778   (eval $ac_try) 2>&5
10779   ac_status=$?
10780   echo "$as_me:10780: \$? = $ac_status" >&5
10781   (exit $ac_status); }; }; then
10782   cf_cv_regex="regex.h"
10783 else
10784   echo "$as_me: failed program was:" >&5
10785 cat conftest.$ac_ext >&5
10786
10787         cat >conftest.$ac_ext <<_ACEOF
10788 #line 10788 "configure"
10789 #include "confdefs.h"
10790 #include <regexp.h>
10791 int
10792 main ()
10793 {
10794
10795                 char *p = compile("", "", "", 0);
10796                 int x = step("", "");
10797
10798   ;
10799   return 0;
10800 }
10801 _ACEOF
10802 rm -f conftest.$ac_objext conftest$ac_exeext
10803 if { (eval echo "$as_me:10803: \"$ac_link\"") >&5
10804   (eval $ac_link) 2>&5
10805   ac_status=$?
10806   echo "$as_me:10806: \$? = $ac_status" >&5
10807   (exit $ac_status); } &&
10808          { ac_try='test -s conftest$ac_exeext'
10809   { (eval echo "$as_me:10809: \"$ac_try\"") >&5
10810   (eval $ac_try) 2>&5
10811   ac_status=$?
10812   echo "$as_me:10812: \$? = $ac_status" >&5
10813   (exit $ac_status); }; }; then
10814   cf_cv_regex="regexp.h"
10815 else
10816   echo "$as_me: failed program was:" >&5
10817 cat conftest.$ac_ext >&5
10818
10819                 cf_save_LIBS="$LIBS"
10820                 LIBS="-lgen $LIBS"
10821                 cat >conftest.$ac_ext <<_ACEOF
10822 #line 10822 "configure"
10823 #include "confdefs.h"
10824 #include <regexpr.h>
10825 int
10826 main ()
10827 {
10828
10829                         char *p = compile("", "", "");
10830                         int x = step("", "");
10831
10832   ;
10833   return 0;
10834 }
10835 _ACEOF
10836 rm -f conftest.$ac_objext conftest$ac_exeext
10837 if { (eval echo "$as_me:10837: \"$ac_link\"") >&5
10838   (eval $ac_link) 2>&5
10839   ac_status=$?
10840   echo "$as_me:10840: \$? = $ac_status" >&5
10841   (exit $ac_status); } &&
10842          { ac_try='test -s conftest$ac_exeext'
10843   { (eval echo "$as_me:10843: \"$ac_try\"") >&5
10844   (eval $ac_try) 2>&5
10845   ac_status=$?
10846   echo "$as_me:10846: \$? = $ac_status" >&5
10847   (exit $ac_status); }; }; then
10848   cf_cv_regex="regexpr.h"
10849 else
10850   echo "$as_me: failed program was:" >&5
10851 cat conftest.$ac_ext >&5
10852 LIBS="$cf_save_LIBS"
10853 fi
10854 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10855 fi
10856 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10857 fi
10858 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10859
10860 fi
10861
10862 echo "$as_me:10862: result: $cf_cv_regex" >&5
10863 echo "${ECHO_T}$cf_cv_regex" >&6
10864 case $cf_cv_regex in
10865         regex.h)   cat >>confdefs.h <<\EOF
10866 #define HAVE_REGEX_H_FUNCS 1
10867 EOF
10868  ;;
10869         regexp.h)  cat >>confdefs.h <<\EOF
10870 #define HAVE_REGEXP_H_FUNCS 1
10871 EOF
10872  ;;
10873         regexpr.h) cat >>confdefs.h <<\EOF
10874 #define HAVE_REGEXPR_H_FUNCS 1
10875 EOF
10876  ;;
10877 esac
10878
10879 for ac_header in \
10880 fcntl.h \
10881 getopt.h \
10882 limits.h \
10883 locale.h \
10884 poll.h \
10885 sys/bsdtypes.h \
10886 sys/ioctl.h \
10887 sys/param.h \
10888 sys/poll.h \
10889 sys/select.h \
10890 sys/time.h \
10891 sys/times.h \
10892 ttyent.h \
10893 unistd.h \
10894 wctype.h \
10895
10896 do
10897 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10898 echo "$as_me:10898: checking for $ac_header" >&5
10899 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10900 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10901   echo $ECHO_N "(cached) $ECHO_C" >&6
10902 else
10903   cat >conftest.$ac_ext <<_ACEOF
10904 #line 10904 "configure"
10905 #include "confdefs.h"
10906 #include <$ac_header>
10907 _ACEOF
10908 if { (eval echo "$as_me:10908: \"$ac_cpp conftest.$ac_ext\"") >&5
10909   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10910   ac_status=$?
10911   egrep -v '^ *\+' conftest.er1 >conftest.err
10912   rm -f conftest.er1
10913   cat conftest.err >&5
10914   echo "$as_me:10914: \$? = $ac_status" >&5
10915   (exit $ac_status); } >/dev/null; then
10916   if test -s conftest.err; then
10917     ac_cpp_err=$ac_c_preproc_warn_flag
10918   else
10919     ac_cpp_err=
10920   fi
10921 else
10922   ac_cpp_err=yes
10923 fi
10924 if test -z "$ac_cpp_err"; then
10925   eval "$as_ac_Header=yes"
10926 else
10927   echo "$as_me: failed program was:" >&5
10928   cat conftest.$ac_ext >&5
10929   eval "$as_ac_Header=no"
10930 fi
10931 rm -f conftest.err conftest.$ac_ext
10932 fi
10933 echo "$as_me:10933: result: `eval echo '${'$as_ac_Header'}'`" >&5
10934 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10935 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10936   cat >>confdefs.h <<EOF
10937 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10938 EOF
10939
10940 fi
10941 done
10942
10943 # check for ISC (this may also define _POSIX_SOURCE)
10944 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
10945 if test "$ISC" = yes ; then
10946
10947 echo "$as_me:10947: checking for main in -lcposix" >&5
10948 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
10949 if test "${ac_cv_lib_cposix_main+set}" = set; then
10950   echo $ECHO_N "(cached) $ECHO_C" >&6
10951 else
10952   ac_check_lib_save_LIBS=$LIBS
10953 LIBS="-lcposix  $LIBS"
10954 cat >conftest.$ac_ext <<_ACEOF
10955 #line 10955 "configure"
10956 #include "confdefs.h"
10957
10958 int
10959 main ()
10960 {
10961 main ();
10962   ;
10963   return 0;
10964 }
10965 _ACEOF
10966 rm -f conftest.$ac_objext conftest$ac_exeext
10967 if { (eval echo "$as_me:10967: \"$ac_link\"") >&5
10968   (eval $ac_link) 2>&5
10969   ac_status=$?
10970   echo "$as_me:10970: \$? = $ac_status" >&5
10971   (exit $ac_status); } &&
10972          { ac_try='test -s conftest$ac_exeext'
10973   { (eval echo "$as_me:10973: \"$ac_try\"") >&5
10974   (eval $ac_try) 2>&5
10975   ac_status=$?
10976   echo "$as_me:10976: \$? = $ac_status" >&5
10977   (exit $ac_status); }; }; then
10978   ac_cv_lib_cposix_main=yes
10979 else
10980   echo "$as_me: failed program was:" >&5
10981 cat conftest.$ac_ext >&5
10982 ac_cv_lib_cposix_main=no
10983 fi
10984 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10985 LIBS=$ac_check_lib_save_LIBS
10986 fi
10987 echo "$as_me:10987: result: $ac_cv_lib_cposix_main" >&5
10988 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
10989 if test $ac_cv_lib_cposix_main = yes; then
10990   cat >>confdefs.h <<EOF
10991 #define HAVE_LIBCPOSIX 1
10992 EOF
10993
10994   LIBS="-lcposix $LIBS"
10995
10996 fi
10997
10998         echo "$as_me:10998: checking for bzero in -linet" >&5
10999 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
11000 if test "${ac_cv_lib_inet_bzero+set}" = set; then
11001   echo $ECHO_N "(cached) $ECHO_C" >&6
11002 else
11003   ac_check_lib_save_LIBS=$LIBS
11004 LIBS="-linet  $LIBS"
11005 cat >conftest.$ac_ext <<_ACEOF
11006 #line 11006 "configure"
11007 #include "confdefs.h"
11008
11009 /* Override any gcc2 internal prototype to avoid an error.  */
11010 #ifdef __cplusplus
11011 extern "C"
11012 #endif
11013 /* We use char because int might match the return type of a gcc2
11014    builtin and then its argument prototype would still apply.  */
11015 char bzero ();
11016 int
11017 main ()
11018 {
11019 bzero ();
11020   ;
11021   return 0;
11022 }
11023 _ACEOF
11024 rm -f conftest.$ac_objext conftest$ac_exeext
11025 if { (eval echo "$as_me:11025: \"$ac_link\"") >&5
11026   (eval $ac_link) 2>&5
11027   ac_status=$?
11028   echo "$as_me:11028: \$? = $ac_status" >&5
11029   (exit $ac_status); } &&
11030          { ac_try='test -s conftest$ac_exeext'
11031   { (eval echo "$as_me:11031: \"$ac_try\"") >&5
11032   (eval $ac_try) 2>&5
11033   ac_status=$?
11034   echo "$as_me:11034: \$? = $ac_status" >&5
11035   (exit $ac_status); }; }; then
11036   ac_cv_lib_inet_bzero=yes
11037 else
11038   echo "$as_me: failed program was:" >&5
11039 cat conftest.$ac_ext >&5
11040 ac_cv_lib_inet_bzero=no
11041 fi
11042 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11043 LIBS=$ac_check_lib_save_LIBS
11044 fi
11045 echo "$as_me:11045: result: $ac_cv_lib_inet_bzero" >&5
11046 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11047 if test $ac_cv_lib_inet_bzero = yes; then
11048   LIBS="$LIBS -linet"
11049 fi
11050 fi
11051
11052 echo "$as_me:11052: checking if sys/time.h works with sys/select.h" >&5
11053 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11054 if test "${cf_cv_sys_time_select+set}" = set; then
11055   echo $ECHO_N "(cached) $ECHO_C" >&6
11056 else
11057
11058 cat >conftest.$ac_ext <<_ACEOF
11059 #line 11059 "configure"
11060 #include "confdefs.h"
11061
11062 #include <sys/types.h>
11063 #ifdef HAVE_SYS_TIME_H
11064 #include <sys/time.h>
11065 #endif
11066 #ifdef HAVE_SYS_SELECT_H
11067 #include <sys/select.h>
11068 #endif
11069
11070 int
11071 main ()
11072 {
11073
11074   ;
11075   return 0;
11076 }
11077 _ACEOF
11078 rm -f conftest.$ac_objext
11079 if { (eval echo "$as_me:11079: \"$ac_compile\"") >&5
11080   (eval $ac_compile) 2>&5
11081   ac_status=$?
11082   echo "$as_me:11082: \$? = $ac_status" >&5
11083   (exit $ac_status); } &&
11084          { ac_try='test -s conftest.$ac_objext'
11085   { (eval echo "$as_me:11085: \"$ac_try\"") >&5
11086   (eval $ac_try) 2>&5
11087   ac_status=$?
11088   echo "$as_me:11088: \$? = $ac_status" >&5
11089   (exit $ac_status); }; }; then
11090   cf_cv_sys_time_select=yes
11091 else
11092   echo "$as_me: failed program was:" >&5
11093 cat conftest.$ac_ext >&5
11094 cf_cv_sys_time_select=no
11095 fi
11096 rm -f conftest.$ac_objext conftest.$ac_ext
11097
11098 fi
11099
11100 echo "$as_me:11100: result: $cf_cv_sys_time_select" >&5
11101 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11102 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11103 #define HAVE_SYS_TIME_SELECT 1
11104 EOF
11105
11106 ###     checks for compiler characteristics
11107 ac_ext=c
11108 ac_cpp='$CPP $CPPFLAGS'
11109 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11110 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11111 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11112 ac_main_return=return
11113
11114 echo "$as_me:11114: checking for $CC option to accept ANSI C" >&5
11115 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11116 if test "${ac_cv_prog_cc_stdc+set}" = set; then
11117   echo $ECHO_N "(cached) $ECHO_C" >&6
11118 else
11119   ac_cv_prog_cc_stdc=no
11120 ac_save_CC=$CC
11121 cat >conftest.$ac_ext <<_ACEOF
11122 #line 11122 "configure"
11123 #include "confdefs.h"
11124 #include <stdarg.h>
11125 #include <stdio.h>
11126 #include <sys/types.h>
11127 #include <sys/stat.h>
11128 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11129 struct buf { int x; };
11130 FILE * (*rcsopen) (struct buf *, struct stat *, int);
11131 static char *e (p, i)
11132      char **p;
11133      int i;
11134 {
11135   return p[i];
11136 }
11137 static char *f (char * (*g) (char **, int), char **p, ...)
11138 {
11139   char *s;
11140   va_list v;
11141   va_start (v,p);
11142   s = g (p, va_arg (v,int));
11143   va_end (v);
11144   return s;
11145 }
11146 int test (int i, double x);
11147 struct s1 {int (*f) (int a);};
11148 struct s2 {int (*f) (double a);};
11149 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11150 int argc;
11151 char **argv;
11152 int
11153 main ()
11154 {
11155 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11156   ;
11157   return 0;
11158 }
11159 _ACEOF
11160 # Don't try gcc -ansi; that turns off useful extensions and
11161 # breaks some systems' header files.
11162 # AIX                   -qlanglvl=ansi
11163 # Ultrix and OSF/1      -std1
11164 # HP-UX 10.20 and later -Ae
11165 # HP-UX older versions  -Aa -D_HPUX_SOURCE
11166 # SVR4                  -Xc -D__EXTENSIONS__
11167 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11168 do
11169   CC="$ac_save_CC $ac_arg"
11170   rm -f conftest.$ac_objext
11171 if { (eval echo "$as_me:11171: \"$ac_compile\"") >&5
11172   (eval $ac_compile) 2>&5
11173   ac_status=$?
11174   echo "$as_me:11174: \$? = $ac_status" >&5
11175   (exit $ac_status); } &&
11176          { ac_try='test -s conftest.$ac_objext'
11177   { (eval echo "$as_me:11177: \"$ac_try\"") >&5
11178   (eval $ac_try) 2>&5
11179   ac_status=$?
11180   echo "$as_me:11180: \$? = $ac_status" >&5
11181   (exit $ac_status); }; }; then
11182   ac_cv_prog_cc_stdc=$ac_arg
11183 break
11184 else
11185   echo "$as_me: failed program was:" >&5
11186 cat conftest.$ac_ext >&5
11187 fi
11188 rm -f conftest.$ac_objext
11189 done
11190 rm -f conftest.$ac_ext conftest.$ac_objext
11191 CC=$ac_save_CC
11192
11193 fi
11194
11195 case "x$ac_cv_prog_cc_stdc" in
11196   x|xno)
11197     echo "$as_me:11197: result: none needed" >&5
11198 echo "${ECHO_T}none needed" >&6 ;;
11199   *)
11200     echo "$as_me:11200: result: $ac_cv_prog_cc_stdc" >&5
11201 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11202     CC="$CC $ac_cv_prog_cc_stdc" ;;
11203 esac
11204
11205 echo "$as_me:11205: checking for an ANSI C-conforming const" >&5
11206 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11207 if test "${ac_cv_c_const+set}" = set; then
11208   echo $ECHO_N "(cached) $ECHO_C" >&6
11209 else
11210   cat >conftest.$ac_ext <<_ACEOF
11211 #line 11211 "configure"
11212 #include "confdefs.h"
11213
11214 int
11215 main ()
11216 {
11217 /* FIXME: Include the comments suggested by Paul. */
11218 #ifndef __cplusplus
11219   /* Ultrix mips cc rejects this.  */
11220   typedef int charset[2];
11221   const charset x;
11222   /* SunOS 4.1.1 cc rejects this.  */
11223   char const *const *ccp;
11224   char **p;
11225   /* NEC SVR4.0.2 mips cc rejects this.  */
11226   struct point {int x, y;};
11227   static struct point const zero = {0,0};
11228   /* AIX XL C 1.02.0.0 rejects this.
11229      It does not let you subtract one const X* pointer from another in
11230      an arm of an if-expression whose if-part is not a constant
11231      expression */
11232   const char *g = "string";
11233   ccp = &g + (g ? g-g : 0);
11234   /* HPUX 7.0 cc rejects these. */
11235   ++ccp;
11236   p = (char**) ccp;
11237   ccp = (char const *const *) p;
11238   { /* SCO 3.2v4 cc rejects this.  */
11239     char *t;
11240     char const *s = 0 ? (char *) 0 : (char const *) 0;
11241
11242     *t++ = 0;
11243   }
11244   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11245     int x[] = {25, 17};
11246     const int *foo = &x[0];
11247     ++foo;
11248   }
11249   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11250     typedef const int *iptr;
11251     iptr p = 0;
11252     ++p;
11253   }
11254   { /* AIX XL C 1.02.0.0 rejects this saying
11255        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11256     struct s { int j; const int *ap[3]; };
11257     struct s *b; b->j = 5;
11258   }
11259   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11260     const int foo = 10;
11261   }
11262 #endif
11263
11264   ;
11265   return 0;
11266 }
11267 _ACEOF
11268 rm -f conftest.$ac_objext
11269 if { (eval echo "$as_me:11269: \"$ac_compile\"") >&5
11270   (eval $ac_compile) 2>&5
11271   ac_status=$?
11272   echo "$as_me:11272: \$? = $ac_status" >&5
11273   (exit $ac_status); } &&
11274          { ac_try='test -s conftest.$ac_objext'
11275   { (eval echo "$as_me:11275: \"$ac_try\"") >&5
11276   (eval $ac_try) 2>&5
11277   ac_status=$?
11278   echo "$as_me:11278: \$? = $ac_status" >&5
11279   (exit $ac_status); }; }; then
11280   ac_cv_c_const=yes
11281 else
11282   echo "$as_me: failed program was:" >&5
11283 cat conftest.$ac_ext >&5
11284 ac_cv_c_const=no
11285 fi
11286 rm -f conftest.$ac_objext conftest.$ac_ext
11287 fi
11288 echo "$as_me:11288: result: $ac_cv_c_const" >&5
11289 echo "${ECHO_T}$ac_cv_c_const" >&6
11290 if test $ac_cv_c_const = no; then
11291
11292 cat >>confdefs.h <<\EOF
11293 #define const
11294 EOF
11295
11296 fi
11297
11298 echo "$as_me:11298: checking for inline" >&5
11299 echo $ECHO_N "checking for inline... $ECHO_C" >&6
11300 if test "${ac_cv_c_inline+set}" = set; then
11301   echo $ECHO_N "(cached) $ECHO_C" >&6
11302 else
11303   ac_cv_c_inline=no
11304 for ac_kw in inline __inline__ __inline; do
11305   cat >conftest.$ac_ext <<_ACEOF
11306 #line 11306 "configure"
11307 #include "confdefs.h"
11308 #ifndef __cplusplus
11309 static $ac_kw int static_foo () {return 0; }
11310 $ac_kw int foo () {return 0; }
11311 #endif
11312
11313 _ACEOF
11314 rm -f conftest.$ac_objext
11315 if { (eval echo "$as_me:11315: \"$ac_compile\"") >&5
11316   (eval $ac_compile) 2>&5
11317   ac_status=$?
11318   echo "$as_me:11318: \$? = $ac_status" >&5
11319   (exit $ac_status); } &&
11320          { ac_try='test -s conftest.$ac_objext'
11321   { (eval echo "$as_me:11321: \"$ac_try\"") >&5
11322   (eval $ac_try) 2>&5
11323   ac_status=$?
11324   echo "$as_me:11324: \$? = $ac_status" >&5
11325   (exit $ac_status); }; }; then
11326   ac_cv_c_inline=$ac_kw; break
11327 else
11328   echo "$as_me: failed program was:" >&5
11329 cat conftest.$ac_ext >&5
11330 fi
11331 rm -f conftest.$ac_objext conftest.$ac_ext
11332 done
11333
11334 fi
11335 echo "$as_me:11335: result: $ac_cv_c_inline" >&5
11336 echo "${ECHO_T}$ac_cv_c_inline" >&6
11337 case $ac_cv_c_inline in
11338   inline | yes) ;;
11339   no)
11340 cat >>confdefs.h <<\EOF
11341 #define inline
11342 EOF
11343  ;;
11344   *)  cat >>confdefs.h <<EOF
11345 #define inline $ac_cv_c_inline
11346 EOF
11347  ;;
11348 esac
11349
11350 NCURSES_INLINE=
11351 if test "$ac_cv_c_inline" != no ; then
11352         cat >>confdefs.h <<\EOF
11353 #define CC_HAS_INLINE_FUNCS 1
11354 EOF
11355
11356         NCURSES_INLINE=inline
11357 fi
11358
11359 if test $NCURSES_CHTYPE = auto ; then
11360
11361 echo "$as_me:11361: checking for type of chtype" >&5
11362 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11363 if test "${cf_cv_typeof_chtype+set}" = set; then
11364   echo $ECHO_N "(cached) $ECHO_C" >&6
11365 else
11366
11367                 if test "$cross_compiling" = yes; then
11368   cf_cv_typeof_chtype=long
11369 else
11370   cat >conftest.$ac_ext <<_ACEOF
11371 #line 11371 "configure"
11372 #include "confdefs.h"
11373
11374 #define WANT_BITS 31
11375 #include <stdio.h>
11376 int main()
11377 {
11378         FILE *fp = fopen("cf_test.out", "w");
11379         if (fp != 0) {
11380                 char *result = "long";
11381                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
11382                         int n;
11383                         unsigned int x, y;
11384                         for (n = 0; n < WANT_BITS; n++) {
11385                                 x = (1 << n);
11386                                 y = (x >> n);
11387                                 if (y != 1 || x == 0) {
11388                                         x = 0;
11389                                         break;
11390                                 }
11391                         }
11392                         /*
11393                          * If x is nonzero, an int is big enough for the bits
11394                          * that we want.
11395                          */
11396                         result = (x != 0) ? "int" : "long";
11397                 }
11398                 fputs(result, fp);
11399                 fclose(fp);
11400         }
11401         ${cf_cv_main_return:-return}(0);
11402 }
11403
11404 _ACEOF
11405 rm -f conftest$ac_exeext
11406 if { (eval echo "$as_me:11406: \"$ac_link\"") >&5
11407   (eval $ac_link) 2>&5
11408   ac_status=$?
11409   echo "$as_me:11409: \$? = $ac_status" >&5
11410   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11411   { (eval echo "$as_me:11411: \"$ac_try\"") >&5
11412   (eval $ac_try) 2>&5
11413   ac_status=$?
11414   echo "$as_me:11414: \$? = $ac_status" >&5
11415   (exit $ac_status); }; }; then
11416   cf_cv_typeof_chtype=`cat cf_test.out`
11417 else
11418   echo "$as_me: program exited with status $ac_status" >&5
11419 echo "$as_me: failed program was:" >&5
11420 cat conftest.$ac_ext >&5
11421 cf_cv_typeof_chtype=long
11422 fi
11423 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11424 fi
11425                 rm -f cf_test.out
11426
11427 fi
11428
11429 echo "$as_me:11429: result: $cf_cv_typeof_chtype" >&5
11430 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
11431
11432 cat >>confdefs.h <<EOF
11433 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
11434 EOF
11435
11436 else
11437         cf_cv_typeof_chtype=$NCURSES_CHTYPE
11438 fi
11439
11440 echo "$as_me:11440: checking if unsigned literals are legal" >&5
11441 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
11442 if test "${cf_cv_unsigned_literals+set}" = set; then
11443   echo $ECHO_N "(cached) $ECHO_C" >&6
11444 else
11445
11446         cat >conftest.$ac_ext <<_ACEOF
11447 #line 11447 "configure"
11448 #include "confdefs.h"
11449
11450 int
11451 main ()
11452 {
11453 long x = 1L + 1UL + 1U + 1
11454   ;
11455   return 0;
11456 }
11457 _ACEOF
11458 rm -f conftest.$ac_objext
11459 if { (eval echo "$as_me:11459: \"$ac_compile\"") >&5
11460   (eval $ac_compile) 2>&5
11461   ac_status=$?
11462   echo "$as_me:11462: \$? = $ac_status" >&5
11463   (exit $ac_status); } &&
11464          { ac_try='test -s conftest.$ac_objext'
11465   { (eval echo "$as_me:11465: \"$ac_try\"") >&5
11466   (eval $ac_try) 2>&5
11467   ac_status=$?
11468   echo "$as_me:11468: \$? = $ac_status" >&5
11469   (exit $ac_status); }; }; then
11470   cf_cv_unsigned_literals=yes
11471 else
11472   echo "$as_me: failed program was:" >&5
11473 cat conftest.$ac_ext >&5
11474 cf_cv_unsigned_literals=no
11475 fi
11476 rm -f conftest.$ac_objext conftest.$ac_ext
11477
11478 fi
11479
11480 echo "$as_me:11480: result: $cf_cv_unsigned_literals" >&5
11481 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
11482
11483 cf_cv_1UL="1"
11484 test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
11485 test "$cf_cv_typeof_chtype"    = long && cf_cv_1UL="${cf_cv_1UL}L"
11486
11487 if test $NCURSES_MMASK_T = auto ; then
11488         cf_cv_typeof_mmask_t=long
11489 else
11490         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
11491 fi
11492
11493 ###     Checks for external-data
11494
11495 echo "$as_me:11495: checking if external errno is declared" >&5
11496 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
11497 if test "${cf_cv_dcl_errno+set}" = set; then
11498   echo $ECHO_N "(cached) $ECHO_C" >&6
11499 else
11500
11501     cat >conftest.$ac_ext <<_ACEOF
11502 #line 11502 "configure"
11503 #include "confdefs.h"
11504
11505 #ifdef HAVE_STDLIB_H
11506 #include <stdlib.h>
11507 #endif
11508 #include <stdio.h>
11509 #include <sys/types.h>
11510 #include <errno.h>
11511 int
11512 main ()
11513 {
11514 long x = (long) errno
11515   ;
11516   return 0;
11517 }
11518 _ACEOF
11519 rm -f conftest.$ac_objext
11520 if { (eval echo "$as_me:11520: \"$ac_compile\"") >&5
11521   (eval $ac_compile) 2>&5
11522   ac_status=$?
11523   echo "$as_me:11523: \$? = $ac_status" >&5
11524   (exit $ac_status); } &&
11525          { ac_try='test -s conftest.$ac_objext'
11526   { (eval echo "$as_me:11526: \"$ac_try\"") >&5
11527   (eval $ac_try) 2>&5
11528   ac_status=$?
11529   echo "$as_me:11529: \$? = $ac_status" >&5
11530   (exit $ac_status); }; }; then
11531   cf_cv_dcl_errno=yes
11532 else
11533   echo "$as_me: failed program was:" >&5
11534 cat conftest.$ac_ext >&5
11535 cf_cv_dcl_errno=no
11536 fi
11537 rm -f conftest.$ac_objext conftest.$ac_ext
11538
11539 fi
11540 echo "$as_me:11540: result: $cf_cv_dcl_errno" >&5
11541 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
11542
11543 if test "$cf_cv_dcl_errno" = no ; then
11544
11545 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11546
11547     cat >>confdefs.h <<EOF
11548 #define $cf_result 1
11549 EOF
11550
11551 fi
11552
11553 # It's possible (for near-UNIX clones) that the data doesn't exist
11554
11555 echo "$as_me:11555: checking if external errno exists" >&5
11556 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
11557 if test "${cf_cv_have_errno+set}" = set; then
11558   echo $ECHO_N "(cached) $ECHO_C" >&6
11559 else
11560
11561     cat >conftest.$ac_ext <<_ACEOF
11562 #line 11562 "configure"
11563 #include "confdefs.h"
11564
11565 #undef errno
11566 extern int errno;
11567
11568 int
11569 main ()
11570 {
11571 errno = 2
11572   ;
11573   return 0;
11574 }
11575 _ACEOF
11576 rm -f conftest.$ac_objext conftest$ac_exeext
11577 if { (eval echo "$as_me:11577: \"$ac_link\"") >&5
11578   (eval $ac_link) 2>&5
11579   ac_status=$?
11580   echo "$as_me:11580: \$? = $ac_status" >&5
11581   (exit $ac_status); } &&
11582          { ac_try='test -s conftest$ac_exeext'
11583   { (eval echo "$as_me:11583: \"$ac_try\"") >&5
11584   (eval $ac_try) 2>&5
11585   ac_status=$?
11586   echo "$as_me:11586: \$? = $ac_status" >&5
11587   (exit $ac_status); }; }; then
11588   cf_cv_have_errno=yes
11589 else
11590   echo "$as_me: failed program was:" >&5
11591 cat conftest.$ac_ext >&5
11592 cf_cv_have_errno=no
11593 fi
11594 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11595
11596 fi
11597 echo "$as_me:11597: result: $cf_cv_have_errno" >&5
11598 echo "${ECHO_T}$cf_cv_have_errno" >&6
11599
11600 if test "$cf_cv_have_errno" = yes ; then
11601
11602 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11603
11604     cat >>confdefs.h <<EOF
11605 #define $cf_result 1
11606 EOF
11607
11608 fi
11609
11610 echo "$as_me:11610: checking if data-only library module links" >&5
11611 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11612 if test "${cf_cv_link_dataonly+set}" = set; then
11613   echo $ECHO_N "(cached) $ECHO_C" >&6
11614 else
11615
11616         rm -f conftest.a
11617         cat >conftest.$ac_ext <<EOF
11618 #line 11618 "configure"
11619 int     testdata[3] = { 123, 456, 789 };
11620 EOF
11621         if { (eval echo "$as_me:11621: \"$ac_compile\"") >&5
11622   (eval $ac_compile) 2>&5
11623   ac_status=$?
11624   echo "$as_me:11624: \$? = $ac_status" >&5
11625   (exit $ac_status); } ; then
11626                 mv conftest.o data.o && \
11627                 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
11628         fi
11629         rm -f conftest.$ac_ext data.o
11630         cat >conftest.$ac_ext <<EOF
11631 #line 11631 "configure"
11632 int     testfunc()
11633 {
11634 #if defined(NeXT)
11635         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
11636 #else
11637         extern int testdata[3];
11638         return testdata[0] == 123
11639            &&  testdata[1] == 456
11640            &&  testdata[2] == 789;
11641 #endif
11642 }
11643 EOF
11644         if { (eval echo "$as_me:11644: \"$ac_compile\"") >&5
11645   (eval $ac_compile) 2>&5
11646   ac_status=$?
11647   echo "$as_me:11647: \$? = $ac_status" >&5
11648   (exit $ac_status); }; then
11649                 mv conftest.o func.o && \
11650                 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
11651         fi
11652         rm -f conftest.$ac_ext func.o
11653         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11654         cf_saveLIBS="$LIBS"
11655         LIBS="conftest.a $LIBS"
11656         if test "$cross_compiling" = yes; then
11657   cf_cv_link_dataonly=unknown
11658 else
11659   cat >conftest.$ac_ext <<_ACEOF
11660 #line 11660 "configure"
11661 #include "confdefs.h"
11662
11663         int main()
11664         {
11665                 extern int testfunc();
11666                 ${cf_cv_main_return:-return} (!testfunc());
11667         }
11668
11669 _ACEOF
11670 rm -f conftest$ac_exeext
11671 if { (eval echo "$as_me:11671: \"$ac_link\"") >&5
11672   (eval $ac_link) 2>&5
11673   ac_status=$?
11674   echo "$as_me:11674: \$? = $ac_status" >&5
11675   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11676   { (eval echo "$as_me:11676: \"$ac_try\"") >&5
11677   (eval $ac_try) 2>&5
11678   ac_status=$?
11679   echo "$as_me:11679: \$? = $ac_status" >&5
11680   (exit $ac_status); }; }; then
11681   cf_cv_link_dataonly=yes
11682 else
11683   echo "$as_me: program exited with status $ac_status" >&5
11684 echo "$as_me: failed program was:" >&5
11685 cat conftest.$ac_ext >&5
11686 cf_cv_link_dataonly=no
11687 fi
11688 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11689 fi
11690         LIBS="$cf_saveLIBS"
11691
11692 fi
11693
11694 echo "$as_me:11694: result: $cf_cv_link_dataonly" >&5
11695 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
11696
11697 if test "$cf_cv_link_dataonly" = no ; then
11698         cat >>confdefs.h <<\EOF
11699 #define BROKEN_LINKER 1
11700 EOF
11701
11702         BROKEN_LINKER=1
11703 fi
11704
11705 ###     Checks for library functions.
11706
11707 for ac_func in \
11708 getcwd \
11709 getegid \
11710 geteuid \
11711 getttynam \
11712 issetugid \
11713 poll \
11714 remove \
11715 select \
11716 setbuf \
11717 setbuffer \
11718 setvbuf \
11719 sigaction \
11720 sigvec \
11721 strdup \
11722 strstr \
11723 tcgetpgrp \
11724 times \
11725 vsnprintf \
11726
11727 do
11728 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11729 echo "$as_me:11729: checking for $ac_func" >&5
11730 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11731 if eval "test \"\${$as_ac_var+set}\" = set"; then
11732   echo $ECHO_N "(cached) $ECHO_C" >&6
11733 else
11734   cat >conftest.$ac_ext <<_ACEOF
11735 #line 11735 "configure"
11736 #include "confdefs.h"
11737 /* System header to define __stub macros and hopefully few prototypes,
11738     which can conflict with char $ac_func (); below.  */
11739 #include <assert.h>
11740 /* Override any gcc2 internal prototype to avoid an error.  */
11741 #ifdef __cplusplus
11742 extern "C"
11743 #endif
11744 /* We use char because int might match the return type of a gcc2
11745    builtin and then its argument prototype would still apply.  */
11746 char $ac_func ();
11747 char (*f) ();
11748
11749 int
11750 main ()
11751 {
11752 /* The GNU C library defines this for functions which it implements
11753     to always fail with ENOSYS.  Some functions are actually named
11754     something starting with __ and the normal name is an alias.  */
11755 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11756 choke me
11757 #else
11758 f = $ac_func;
11759 #endif
11760
11761   ;
11762   return 0;
11763 }
11764 _ACEOF
11765 rm -f conftest.$ac_objext conftest$ac_exeext
11766 if { (eval echo "$as_me:11766: \"$ac_link\"") >&5
11767   (eval $ac_link) 2>&5
11768   ac_status=$?
11769   echo "$as_me:11769: \$? = $ac_status" >&5
11770   (exit $ac_status); } &&
11771          { ac_try='test -s conftest$ac_exeext'
11772   { (eval echo "$as_me:11772: \"$ac_try\"") >&5
11773   (eval $ac_try) 2>&5
11774   ac_status=$?
11775   echo "$as_me:11775: \$? = $ac_status" >&5
11776   (exit $ac_status); }; }; then
11777   eval "$as_ac_var=yes"
11778 else
11779   echo "$as_me: failed program was:" >&5
11780 cat conftest.$ac_ext >&5
11781 eval "$as_ac_var=no"
11782 fi
11783 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11784 fi
11785 echo "$as_me:11785: result: `eval echo '${'$as_ac_var'}'`" >&5
11786 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11787 if test `eval echo '${'$as_ac_var'}'` = yes; then
11788   cat >>confdefs.h <<EOF
11789 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11790 EOF
11791
11792 fi
11793 done
11794
11795 if test "$with_getcap" = "yes" ; then
11796
11797 echo "$as_me:11797: checking for terminal-capability database functions" >&5
11798 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
11799 if test "${cf_cv_cgetent+set}" = set; then
11800   echo $ECHO_N "(cached) $ECHO_C" >&6
11801 else
11802
11803 cat >conftest.$ac_ext <<_ACEOF
11804 #line 11804 "configure"
11805 #include "confdefs.h"
11806
11807 #include <stdlib.h>
11808 int
11809 main ()
11810 {
11811
11812         char temp[128];
11813         char *buf = temp;
11814         char *db_array = temp;
11815         cgetent(&buf, /* int *, */ &db_array, "vt100");
11816         cgetcap(buf, "tc", '=');
11817         cgetmatch(buf, "tc");
11818
11819   ;
11820   return 0;
11821 }
11822 _ACEOF
11823 rm -f conftest.$ac_objext conftest$ac_exeext
11824 if { (eval echo "$as_me:11824: \"$ac_link\"") >&5
11825   (eval $ac_link) 2>&5
11826   ac_status=$?
11827   echo "$as_me:11827: \$? = $ac_status" >&5
11828   (exit $ac_status); } &&
11829          { ac_try='test -s conftest$ac_exeext'
11830   { (eval echo "$as_me:11830: \"$ac_try\"") >&5
11831   (eval $ac_try) 2>&5
11832   ac_status=$?
11833   echo "$as_me:11833: \$? = $ac_status" >&5
11834   (exit $ac_status); }; }; then
11835   cf_cv_cgetent=yes
11836 else
11837   echo "$as_me: failed program was:" >&5
11838 cat conftest.$ac_ext >&5
11839 cf_cv_cgetent=no
11840 fi
11841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11842
11843 fi
11844
11845 echo "$as_me:11845: result: $cf_cv_cgetent" >&5
11846 echo "${ECHO_T}$cf_cv_cgetent" >&6
11847 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
11848 #define HAVE_BSD_CGETENT 1
11849 EOF
11850
11851 fi
11852
11853 echo "$as_me:11853: checking for isascii" >&5
11854 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
11855 if test "${cf_cv_have_isascii+set}" = set; then
11856   echo $ECHO_N "(cached) $ECHO_C" >&6
11857 else
11858
11859         cat >conftest.$ac_ext <<_ACEOF
11860 #line 11860 "configure"
11861 #include "confdefs.h"
11862 #include <ctype.h>
11863 int
11864 main ()
11865 {
11866 int x = isascii(' ')
11867   ;
11868   return 0;
11869 }
11870 _ACEOF
11871 rm -f conftest.$ac_objext conftest$ac_exeext
11872 if { (eval echo "$as_me:11872: \"$ac_link\"") >&5
11873   (eval $ac_link) 2>&5
11874   ac_status=$?
11875   echo "$as_me:11875: \$? = $ac_status" >&5
11876   (exit $ac_status); } &&
11877          { ac_try='test -s conftest$ac_exeext'
11878   { (eval echo "$as_me:11878: \"$ac_try\"") >&5
11879   (eval $ac_try) 2>&5
11880   ac_status=$?
11881   echo "$as_me:11881: \$? = $ac_status" >&5
11882   (exit $ac_status); }; }; then
11883   cf_cv_have_isascii=yes
11884 else
11885   echo "$as_me: failed program was:" >&5
11886 cat conftest.$ac_ext >&5
11887 cf_cv_have_isascii=no
11888 fi
11889 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11890
11891 fi
11892 echo "$as_me:11892: result: $cf_cv_have_isascii" >&5
11893 echo "${ECHO_T}$cf_cv_have_isascii" >&6
11894 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
11895 #define HAVE_ISASCII 1
11896 EOF
11897
11898 if test "$ac_cv_func_sigaction" = yes; then
11899 echo "$as_me:11899: checking whether sigaction needs _POSIX_SOURCE" >&5
11900 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
11901 cat >conftest.$ac_ext <<_ACEOF
11902 #line 11902 "configure"
11903 #include "confdefs.h"
11904
11905 #include <sys/types.h>
11906 #include <signal.h>
11907 int
11908 main ()
11909 {
11910 struct sigaction act
11911   ;
11912   return 0;
11913 }
11914 _ACEOF
11915 rm -f conftest.$ac_objext
11916 if { (eval echo "$as_me:11916: \"$ac_compile\"") >&5
11917   (eval $ac_compile) 2>&5
11918   ac_status=$?
11919   echo "$as_me:11919: \$? = $ac_status" >&5
11920   (exit $ac_status); } &&
11921          { ac_try='test -s conftest.$ac_objext'
11922   { (eval echo "$as_me:11922: \"$ac_try\"") >&5
11923   (eval $ac_try) 2>&5
11924   ac_status=$?
11925   echo "$as_me:11925: \$? = $ac_status" >&5
11926   (exit $ac_status); }; }; then
11927   sigact_bad=no
11928 else
11929   echo "$as_me: failed program was:" >&5
11930 cat conftest.$ac_ext >&5
11931
11932 cat >conftest.$ac_ext <<_ACEOF
11933 #line 11933 "configure"
11934 #include "confdefs.h"
11935
11936 #define _POSIX_SOURCE
11937 #include <sys/types.h>
11938 #include <signal.h>
11939 int
11940 main ()
11941 {
11942 struct sigaction act
11943   ;
11944   return 0;
11945 }
11946 _ACEOF
11947 rm -f conftest.$ac_objext
11948 if { (eval echo "$as_me:11948: \"$ac_compile\"") >&5
11949   (eval $ac_compile) 2>&5
11950   ac_status=$?
11951   echo "$as_me:11951: \$? = $ac_status" >&5
11952   (exit $ac_status); } &&
11953          { ac_try='test -s conftest.$ac_objext'
11954   { (eval echo "$as_me:11954: \"$ac_try\"") >&5
11955   (eval $ac_try) 2>&5
11956   ac_status=$?
11957   echo "$as_me:11957: \$? = $ac_status" >&5
11958   (exit $ac_status); }; }; then
11959   sigact_bad=yes
11960          cat >>confdefs.h <<\EOF
11961 #define SVR4_ACTION 1
11962 EOF
11963
11964 else
11965   echo "$as_me: failed program was:" >&5
11966 cat conftest.$ac_ext >&5
11967 sigact_bad=unknown
11968 fi
11969 rm -f conftest.$ac_objext conftest.$ac_ext
11970 fi
11971 rm -f conftest.$ac_objext conftest.$ac_ext
11972 echo "$as_me:11972: result: $sigact_bad" >&5
11973 echo "${ECHO_T}$sigact_bad" >&6
11974 fi
11975
11976 echo "$as_me:11976: checking if nanosleep really works" >&5
11977 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
11978 if test "${cf_cv_func_nanosleep+set}" = set; then
11979   echo $ECHO_N "(cached) $ECHO_C" >&6
11980 else
11981
11982 if test "$cross_compiling" = yes; then
11983   cf_cv_func_nanosleep=unknown
11984 else
11985   cat >conftest.$ac_ext <<_ACEOF
11986 #line 11986 "configure"
11987 #include "confdefs.h"
11988
11989 #include <stdio.h>
11990 #include <errno.h>
11991 #include <time.h>
11992
11993 #ifdef HAVE_SYS_TIME_H
11994 #include <sys/time.h>
11995 #endif
11996
11997 int main() {
11998         struct timespec ts1, ts2;
11999         int code;
12000         ts1.tv_sec  = 0;
12001         ts1.tv_nsec = 750000000;
12002         ts2.tv_sec  = 0;
12003         ts2.tv_nsec = 0;
12004         errno = 0;
12005         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
12006         ${cf_cv_main_return:-return}(code != 0);
12007 }
12008
12009 _ACEOF
12010 rm -f conftest$ac_exeext
12011 if { (eval echo "$as_me:12011: \"$ac_link\"") >&5
12012   (eval $ac_link) 2>&5
12013   ac_status=$?
12014   echo "$as_me:12014: \$? = $ac_status" >&5
12015   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12016   { (eval echo "$as_me:12016: \"$ac_try\"") >&5
12017   (eval $ac_try) 2>&5
12018   ac_status=$?
12019   echo "$as_me:12019: \$? = $ac_status" >&5
12020   (exit $ac_status); }; }; then
12021   cf_cv_func_nanosleep=yes
12022 else
12023   echo "$as_me: program exited with status $ac_status" >&5
12024 echo "$as_me: failed program was:" >&5
12025 cat conftest.$ac_ext >&5
12026 cf_cv_func_nanosleep=no
12027 fi
12028 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12029 fi
12030 fi
12031 echo "$as_me:12031: result: $cf_cv_func_nanosleep" >&5
12032 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12033
12034 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12035 #define HAVE_NANOSLEEP 1
12036 EOF
12037
12038 for ac_header in \
12039 termio.h \
12040 termios.h \
12041 unistd.h \
12042
12043 do
12044 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12045 echo "$as_me:12045: checking for $ac_header" >&5
12046 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12047 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12048   echo $ECHO_N "(cached) $ECHO_C" >&6
12049 else
12050   cat >conftest.$ac_ext <<_ACEOF
12051 #line 12051 "configure"
12052 #include "confdefs.h"
12053 #include <$ac_header>
12054 _ACEOF
12055 if { (eval echo "$as_me:12055: \"$ac_cpp conftest.$ac_ext\"") >&5
12056   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12057   ac_status=$?
12058   egrep -v '^ *\+' conftest.er1 >conftest.err
12059   rm -f conftest.er1
12060   cat conftest.err >&5
12061   echo "$as_me:12061: \$? = $ac_status" >&5
12062   (exit $ac_status); } >/dev/null; then
12063   if test -s conftest.err; then
12064     ac_cpp_err=$ac_c_preproc_warn_flag
12065   else
12066     ac_cpp_err=
12067   fi
12068 else
12069   ac_cpp_err=yes
12070 fi
12071 if test -z "$ac_cpp_err"; then
12072   eval "$as_ac_Header=yes"
12073 else
12074   echo "$as_me: failed program was:" >&5
12075   cat conftest.$ac_ext >&5
12076   eval "$as_ac_Header=no"
12077 fi
12078 rm -f conftest.err conftest.$ac_ext
12079 fi
12080 echo "$as_me:12080: result: `eval echo '${'$as_ac_Header'}'`" >&5
12081 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12082 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12083   cat >>confdefs.h <<EOF
12084 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12085 EOF
12086
12087 fi
12088 done
12089
12090 if test "$ISC" = yes ; then
12091
12092 for ac_header in sys/termio.h
12093 do
12094 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12095 echo "$as_me:12095: checking for $ac_header" >&5
12096 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12097 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12098   echo $ECHO_N "(cached) $ECHO_C" >&6
12099 else
12100   cat >conftest.$ac_ext <<_ACEOF
12101 #line 12101 "configure"
12102 #include "confdefs.h"
12103 #include <$ac_header>
12104 _ACEOF
12105 if { (eval echo "$as_me:12105: \"$ac_cpp conftest.$ac_ext\"") >&5
12106   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12107   ac_status=$?
12108   egrep -v '^ *\+' conftest.er1 >conftest.err
12109   rm -f conftest.er1
12110   cat conftest.err >&5
12111   echo "$as_me:12111: \$? = $ac_status" >&5
12112   (exit $ac_status); } >/dev/null; then
12113   if test -s conftest.err; then
12114     ac_cpp_err=$ac_c_preproc_warn_flag
12115   else
12116     ac_cpp_err=
12117   fi
12118 else
12119   ac_cpp_err=yes
12120 fi
12121 if test -z "$ac_cpp_err"; then
12122   eval "$as_ac_Header=yes"
12123 else
12124   echo "$as_me: failed program was:" >&5
12125   cat conftest.$ac_ext >&5
12126   eval "$as_ac_Header=no"
12127 fi
12128 rm -f conftest.err conftest.$ac_ext
12129 fi
12130 echo "$as_me:12130: result: `eval echo '${'$as_ac_Header'}'`" >&5
12131 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12132 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12133   cat >>confdefs.h <<EOF
12134 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12135 EOF
12136
12137 fi
12138 done
12139
12140 fi
12141 if test "$ac_cv_header_termios_h" = yes ; then
12142         case "$CFLAGS $CPPFLAGS" in
12143         *-D_POSIX_SOURCE*)
12144                 termios_bad=dunno ;;
12145         *)      termios_bad=maybe ;;
12146         esac
12147         if test "$termios_bad" = maybe ; then
12148         echo "$as_me:12148: checking whether termios.h needs _POSIX_SOURCE" >&5
12149 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12150         cat >conftest.$ac_ext <<_ACEOF
12151 #line 12151 "configure"
12152 #include "confdefs.h"
12153 #include <termios.h>
12154 int
12155 main ()
12156 {
12157 struct termios foo; int x = foo.c_iflag
12158   ;
12159   return 0;
12160 }
12161 _ACEOF
12162 rm -f conftest.$ac_objext
12163 if { (eval echo "$as_me:12163: \"$ac_compile\"") >&5
12164   (eval $ac_compile) 2>&5
12165   ac_status=$?
12166   echo "$as_me:12166: \$? = $ac_status" >&5
12167   (exit $ac_status); } &&
12168          { ac_try='test -s conftest.$ac_objext'
12169   { (eval echo "$as_me:12169: \"$ac_try\"") >&5
12170   (eval $ac_try) 2>&5
12171   ac_status=$?
12172   echo "$as_me:12172: \$? = $ac_status" >&5
12173   (exit $ac_status); }; }; then
12174   termios_bad=no
12175 else
12176   echo "$as_me: failed program was:" >&5
12177 cat conftest.$ac_ext >&5
12178
12179                 cat >conftest.$ac_ext <<_ACEOF
12180 #line 12180 "configure"
12181 #include "confdefs.h"
12182
12183 #define _POSIX_SOURCE
12184 #include <termios.h>
12185 int
12186 main ()
12187 {
12188 struct termios foo; int x = foo.c_iflag
12189   ;
12190   return 0;
12191 }
12192 _ACEOF
12193 rm -f conftest.$ac_objext
12194 if { (eval echo "$as_me:12194: \"$ac_compile\"") >&5
12195   (eval $ac_compile) 2>&5
12196   ac_status=$?
12197   echo "$as_me:12197: \$? = $ac_status" >&5
12198   (exit $ac_status); } &&
12199          { ac_try='test -s conftest.$ac_objext'
12200   { (eval echo "$as_me:12200: \"$ac_try\"") >&5
12201   (eval $ac_try) 2>&5
12202   ac_status=$?
12203   echo "$as_me:12203: \$? = $ac_status" >&5
12204   (exit $ac_status); }; }; then
12205   termios_bad=unknown
12206 else
12207   echo "$as_me: failed program was:" >&5
12208 cat conftest.$ac_ext >&5
12209 termios_bad=yes cat >>confdefs.h <<\EOF
12210 #define SVR4_TERMIO 1
12211 EOF
12212
12213 fi
12214 rm -f conftest.$ac_objext conftest.$ac_ext
12215
12216 fi
12217 rm -f conftest.$ac_objext conftest.$ac_ext
12218         echo "$as_me:12218: result: $termios_bad" >&5
12219 echo "${ECHO_T}$termios_bad" >&6
12220         fi
12221 fi
12222
12223 echo "$as_me:12223: checking for tcgetattr" >&5
12224 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12225 if test "${cf_cv_have_tcgetattr+set}" = set; then
12226   echo $ECHO_N "(cached) $ECHO_C" >&6
12227 else
12228
12229 cat >conftest.$ac_ext <<_ACEOF
12230 #line 12230 "configure"
12231 #include "confdefs.h"
12232
12233 #include <sys/types.h>
12234 #ifdef HAVE_UNISTD_H
12235 #include <unistd.h>
12236 #endif
12237 #ifdef HAVE_TERMIOS_H
12238 #include <termios.h>
12239 #define TTY struct termios
12240 #else
12241 #ifdef HAVE_TERMIO_H
12242 #include <termio.h>
12243 #define TTY struct termio
12244 #endif
12245 #endif
12246
12247 int
12248 main ()
12249 {
12250
12251 TTY foo;
12252 tcgetattr(1, &foo);
12253   ;
12254   return 0;
12255 }
12256 _ACEOF
12257 rm -f conftest.$ac_objext conftest$ac_exeext
12258 if { (eval echo "$as_me:12258: \"$ac_link\"") >&5
12259   (eval $ac_link) 2>&5
12260   ac_status=$?
12261   echo "$as_me:12261: \$? = $ac_status" >&5
12262   (exit $ac_status); } &&
12263          { ac_try='test -s conftest$ac_exeext'
12264   { (eval echo "$as_me:12264: \"$ac_try\"") >&5
12265   (eval $ac_try) 2>&5
12266   ac_status=$?
12267   echo "$as_me:12267: \$? = $ac_status" >&5
12268   (exit $ac_status); }; }; then
12269   cf_cv_have_tcgetattr=yes
12270 else
12271   echo "$as_me: failed program was:" >&5
12272 cat conftest.$ac_ext >&5
12273 cf_cv_have_tcgetattr=no
12274 fi
12275 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12276 fi
12277 echo "$as_me:12277: result: $cf_cv_have_tcgetattr" >&5
12278 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12279 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12280 #define HAVE_TCGETATTR 1
12281 EOF
12282
12283 echo "$as_me:12283: checking for vsscanf function or workaround" >&5
12284 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12285 if test "${cf_cv_func_vsscanf+set}" = set; then
12286   echo $ECHO_N "(cached) $ECHO_C" >&6
12287 else
12288
12289 cat >conftest.$ac_ext <<_ACEOF
12290 #line 12290 "configure"
12291 #include "confdefs.h"
12292
12293 #include <stdarg.h>
12294 #include <stdio.h>
12295 int
12296 main ()
12297 {
12298
12299         va_list ap;
12300         vsscanf("from", "%d", ap)
12301   ;
12302   return 0;
12303 }
12304 _ACEOF
12305 rm -f conftest.$ac_objext conftest$ac_exeext
12306 if { (eval echo "$as_me:12306: \"$ac_link\"") >&5
12307   (eval $ac_link) 2>&5
12308   ac_status=$?
12309   echo "$as_me:12309: \$? = $ac_status" >&5
12310   (exit $ac_status); } &&
12311          { ac_try='test -s conftest$ac_exeext'
12312   { (eval echo "$as_me:12312: \"$ac_try\"") >&5
12313   (eval $ac_try) 2>&5
12314   ac_status=$?
12315   echo "$as_me:12315: \$? = $ac_status" >&5
12316   (exit $ac_status); }; }; then
12317   cf_cv_func_vsscanf=vsscanf
12318 else
12319   echo "$as_me: failed program was:" >&5
12320 cat conftest.$ac_ext >&5
12321
12322 cat >conftest.$ac_ext <<_ACEOF
12323 #line 12323 "configure"
12324 #include "confdefs.h"
12325
12326 #include <stdarg.h>
12327 #include <stdio.h>
12328 int
12329 main ()
12330 {
12331
12332     FILE strbuf;
12333     char *str = "from";
12334
12335     strbuf._flag = _IOREAD;
12336     strbuf._ptr = strbuf._base = (unsigned char *) str;
12337     strbuf._cnt = strlen(str);
12338     strbuf._file = _NFILE;
12339     return (vfscanf(&strbuf, "%d", ap))
12340   ;
12341   return 0;
12342 }
12343 _ACEOF
12344 rm -f conftest.$ac_objext conftest$ac_exeext
12345 if { (eval echo "$as_me:12345: \"$ac_link\"") >&5
12346   (eval $ac_link) 2>&5
12347   ac_status=$?
12348   echo "$as_me:12348: \$? = $ac_status" >&5
12349   (exit $ac_status); } &&
12350          { ac_try='test -s conftest$ac_exeext'
12351   { (eval echo "$as_me:12351: \"$ac_try\"") >&5
12352   (eval $ac_try) 2>&5
12353   ac_status=$?
12354   echo "$as_me:12354: \$? = $ac_status" >&5
12355   (exit $ac_status); }; }; then
12356   cf_cv_func_vsscanf=vfscanf
12357 else
12358   echo "$as_me: failed program was:" >&5
12359 cat conftest.$ac_ext >&5
12360
12361 cat >conftest.$ac_ext <<_ACEOF
12362 #line 12362 "configure"
12363 #include "confdefs.h"
12364
12365 #include <stdarg.h>
12366 #include <stdio.h>
12367 int
12368 main ()
12369 {
12370
12371     FILE strbuf;
12372     char *str = "from";
12373
12374     strbuf._flag = _IOREAD;
12375     strbuf._ptr = strbuf._base = (unsigned char *) str;
12376     strbuf._cnt = strlen(str);
12377     strbuf._file = _NFILE;
12378     return (_doscan(&strbuf, "%d", ap))
12379   ;
12380   return 0;
12381 }
12382 _ACEOF
12383 rm -f conftest.$ac_objext conftest$ac_exeext
12384 if { (eval echo "$as_me:12384: \"$ac_link\"") >&5
12385   (eval $ac_link) 2>&5
12386   ac_status=$?
12387   echo "$as_me:12387: \$? = $ac_status" >&5
12388   (exit $ac_status); } &&
12389          { ac_try='test -s conftest$ac_exeext'
12390   { (eval echo "$as_me:12390: \"$ac_try\"") >&5
12391   (eval $ac_try) 2>&5
12392   ac_status=$?
12393   echo "$as_me:12393: \$? = $ac_status" >&5
12394   (exit $ac_status); }; }; then
12395   cf_cv_func_vsscanf=_doscan
12396 else
12397   echo "$as_me: failed program was:" >&5
12398 cat conftest.$ac_ext >&5
12399
12400 cf_cv_func_vsscanf=no
12401 fi
12402 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12403 fi
12404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12405 fi
12406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12407 fi
12408 echo "$as_me:12408: result: $cf_cv_func_vsscanf" >&5
12409 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12410
12411 case $cf_cv_func_vsscanf in #(vi
12412 vsscanf) cat >>confdefs.h <<\EOF
12413 #define HAVE_VSSCANF 1
12414 EOF
12415 ;; #(vi
12416 vfscanf) cat >>confdefs.h <<\EOF
12417 #define HAVE_VFSCANF 1
12418 EOF
12419 ;; #(vi
12420 _doscan) cat >>confdefs.h <<\EOF
12421 #define HAVE__DOSCAN 1
12422 EOF
12423 ;;
12424 esac
12425
12426 echo "$as_me:12426: checking for working mkstemp" >&5
12427 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
12428 if test "${cf_cv_func_mkstemp+set}" = set; then
12429   echo $ECHO_N "(cached) $ECHO_C" >&6
12430 else
12431
12432 rm -f conftest*
12433 if test "$cross_compiling" = yes; then
12434   echo "$as_me:12434: checking for mkstemp" >&5
12435 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
12436 if test "${ac_cv_func_mkstemp+set}" = set; then
12437   echo $ECHO_N "(cached) $ECHO_C" >&6
12438 else
12439   cat >conftest.$ac_ext <<_ACEOF
12440 #line 12440 "configure"
12441 #include "confdefs.h"
12442 /* System header to define __stub macros and hopefully few prototypes,
12443     which can conflict with char mkstemp (); below.  */
12444 #include <assert.h>
12445 /* Override any gcc2 internal prototype to avoid an error.  */
12446 #ifdef __cplusplus
12447 extern "C"
12448 #endif
12449 /* We use char because int might match the return type of a gcc2
12450    builtin and then its argument prototype would still apply.  */
12451 char mkstemp ();
12452 char (*f) ();
12453
12454 int
12455 main ()
12456 {
12457 /* The GNU C library defines this for functions which it implements
12458     to always fail with ENOSYS.  Some functions are actually named
12459     something starting with __ and the normal name is an alias.  */
12460 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
12461 choke me
12462 #else
12463 f = mkstemp;
12464 #endif
12465
12466   ;
12467   return 0;
12468 }
12469 _ACEOF
12470 rm -f conftest.$ac_objext conftest$ac_exeext
12471 if { (eval echo "$as_me:12471: \"$ac_link\"") >&5
12472   (eval $ac_link) 2>&5
12473   ac_status=$?
12474   echo "$as_me:12474: \$? = $ac_status" >&5
12475   (exit $ac_status); } &&
12476          { ac_try='test -s conftest$ac_exeext'
12477   { (eval echo "$as_me:12477: \"$ac_try\"") >&5
12478   (eval $ac_try) 2>&5
12479   ac_status=$?
12480   echo "$as_me:12480: \$? = $ac_status" >&5
12481   (exit $ac_status); }; }; then
12482   ac_cv_func_mkstemp=yes
12483 else
12484   echo "$as_me: failed program was:" >&5
12485 cat conftest.$ac_ext >&5
12486 ac_cv_func_mkstemp=no
12487 fi
12488 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12489 fi
12490 echo "$as_me:12490: result: $ac_cv_func_mkstemp" >&5
12491 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
12492
12493 else
12494   cat >conftest.$ac_ext <<_ACEOF
12495 #line 12495 "configure"
12496 #include "confdefs.h"
12497
12498 #include <sys/types.h>
12499 #include <stdlib.h>
12500 #include <stdio.h>
12501 #include <string.h>
12502 #include <sys/stat.h>
12503 int main()
12504 {
12505         char *tmpl = "conftestXXXXXX";
12506         char name[2][80];
12507         int n;
12508         int result = 0;
12509         int fd;
12510         struct stat sb;
12511
12512         umask(077);
12513         for (n = 0; n < 2; ++n) {
12514                 strcpy(name[n], tmpl);
12515                 if ((fd = mkstemp(name[n])) >= 0) {
12516                         if (!strcmp(name[n], tmpl)
12517                          || stat(name[n], &sb) != 0
12518                          || (sb.st_mode & S_IFMT) != S_IFREG
12519                          || (sb.st_mode & 077) != 0) {
12520                                 result = 1;
12521                         }
12522                         close(fd);
12523                 }
12524         }
12525         if (result == 0
12526          && !strcmp(name[0], name[1]))
12527                 result = 1;
12528         ${cf_cv_main_return:-return}(result);
12529 }
12530
12531 _ACEOF
12532 rm -f conftest$ac_exeext
12533 if { (eval echo "$as_me:12533: \"$ac_link\"") >&5
12534   (eval $ac_link) 2>&5
12535   ac_status=$?
12536   echo "$as_me:12536: \$? = $ac_status" >&5
12537   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12538   { (eval echo "$as_me:12538: \"$ac_try\"") >&5
12539   (eval $ac_try) 2>&5
12540   ac_status=$?
12541   echo "$as_me:12541: \$? = $ac_status" >&5
12542   (exit $ac_status); }; }; then
12543   cf_cv_func_mkstemp=yes
12544
12545 else
12546   echo "$as_me: program exited with status $ac_status" >&5
12547 echo "$as_me: failed program was:" >&5
12548 cat conftest.$ac_ext >&5
12549 cf_cv_func_mkstemp=no
12550
12551 fi
12552 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12553 fi
12554
12555 fi
12556 echo "$as_me:12556: result: $cf_cv_func_mkstemp" >&5
12557 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
12558 if test "$cf_cv_func_mkstemp" = yes ; then
12559         cat >>confdefs.h <<\EOF
12560 #define HAVE_MKSTEMP 1
12561 EOF
12562
12563 fi
12564
12565 # setup for prototype of fallback for vsscanf()
12566
12567 if test "$cf_cv_func_vsscanf" = vsscanf ; then
12568         HAVE_VSSCANF=1
12569 else
12570         HAVE_VSSCANF=0
12571 fi
12572
12573 if test "$cross_compiling" = yes ; then
12574         { echo "$as_me:12574: WARNING: cross compiling: assume setvbuf params not reversed" >&5
12575 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
12576 else
12577         echo "$as_me:12577: checking whether setvbuf arguments are reversed" >&5
12578 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
12579 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
12580   echo $ECHO_N "(cached) $ECHO_C" >&6
12581 else
12582   if test "$cross_compiling" = yes; then
12583   { { echo "$as_me:12583: error: cannot run test program while cross compiling" >&5
12584 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12585    { (exit 1); exit 1; }; }
12586 else
12587   cat >conftest.$ac_ext <<_ACEOF
12588 #line 12588 "configure"
12589 #include "confdefs.h"
12590 #include <stdio.h>
12591 /* If setvbuf has the reversed format, exit 0. */
12592 int
12593 main ()
12594 {
12595   /* This call has the arguments reversed.
12596      A reversed system may check and see that the address of main
12597      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
12598   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
12599     $ac_main_return(1);
12600   putc('\r', stdout);
12601   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
12602 }
12603 _ACEOF
12604 rm -f conftest$ac_exeext
12605 if { (eval echo "$as_me:12605: \"$ac_link\"") >&5
12606   (eval $ac_link) 2>&5
12607   ac_status=$?
12608   echo "$as_me:12608: \$? = $ac_status" >&5
12609   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12610   { (eval echo "$as_me:12610: \"$ac_try\"") >&5
12611   (eval $ac_try) 2>&5
12612   ac_status=$?
12613   echo "$as_me:12613: \$? = $ac_status" >&5
12614   (exit $ac_status); }; }; then
12615   ac_cv_func_setvbuf_reversed=yes
12616 else
12617   echo "$as_me: program exited with status $ac_status" >&5
12618 echo "$as_me: failed program was:" >&5
12619 cat conftest.$ac_ext >&5
12620 ac_cv_func_setvbuf_reversed=no
12621 fi
12622 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12623 fi
12624 rm -f core core.* *.core
12625 fi
12626 echo "$as_me:12626: result: $ac_cv_func_setvbuf_reversed" >&5
12627 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
12628 if test $ac_cv_func_setvbuf_reversed = yes; then
12629
12630 cat >>confdefs.h <<\EOF
12631 #define SETVBUF_REVERSED 1
12632 EOF
12633
12634 fi
12635
12636 fi
12637 echo "$as_me:12637: checking return type of signal handlers" >&5
12638 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12639 if test "${ac_cv_type_signal+set}" = set; then
12640   echo $ECHO_N "(cached) $ECHO_C" >&6
12641 else
12642   cat >conftest.$ac_ext <<_ACEOF
12643 #line 12643 "configure"
12644 #include "confdefs.h"
12645 #include <sys/types.h>
12646 #include <signal.h>
12647 #ifdef signal
12648 # undef signal
12649 #endif
12650 #ifdef __cplusplus
12651 extern "C" void (*signal (int, void (*)(int)))(int);
12652 #else
12653 void (*signal ()) ();
12654 #endif
12655
12656 int
12657 main ()
12658 {
12659 int i;
12660   ;
12661   return 0;
12662 }
12663 _ACEOF
12664 rm -f conftest.$ac_objext
12665 if { (eval echo "$as_me:12665: \"$ac_compile\"") >&5
12666   (eval $ac_compile) 2>&5
12667   ac_status=$?
12668   echo "$as_me:12668: \$? = $ac_status" >&5
12669   (exit $ac_status); } &&
12670          { ac_try='test -s conftest.$ac_objext'
12671   { (eval echo "$as_me:12671: \"$ac_try\"") >&5
12672   (eval $ac_try) 2>&5
12673   ac_status=$?
12674   echo "$as_me:12674: \$? = $ac_status" >&5
12675   (exit $ac_status); }; }; then
12676   ac_cv_type_signal=void
12677 else
12678   echo "$as_me: failed program was:" >&5
12679 cat conftest.$ac_ext >&5
12680 ac_cv_type_signal=int
12681 fi
12682 rm -f conftest.$ac_objext conftest.$ac_ext
12683 fi
12684 echo "$as_me:12684: result: $ac_cv_type_signal" >&5
12685 echo "${ECHO_T}$ac_cv_type_signal" >&6
12686
12687 cat >>confdefs.h <<EOF
12688 #define RETSIGTYPE $ac_cv_type_signal
12689 EOF
12690
12691 echo "$as_me:12691: checking for type sigaction_t" >&5
12692 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
12693 if test "${cf_cv_type_sigaction+set}" = set; then
12694   echo $ECHO_N "(cached) $ECHO_C" >&6
12695 else
12696
12697         cat >conftest.$ac_ext <<_ACEOF
12698 #line 12698 "configure"
12699 #include "confdefs.h"
12700
12701 #include <signal.h>
12702 int
12703 main ()
12704 {
12705 sigaction_t x
12706   ;
12707   return 0;
12708 }
12709 _ACEOF
12710 rm -f conftest.$ac_objext
12711 if { (eval echo "$as_me:12711: \"$ac_compile\"") >&5
12712   (eval $ac_compile) 2>&5
12713   ac_status=$?
12714   echo "$as_me:12714: \$? = $ac_status" >&5
12715   (exit $ac_status); } &&
12716          { ac_try='test -s conftest.$ac_objext'
12717   { (eval echo "$as_me:12717: \"$ac_try\"") >&5
12718   (eval $ac_try) 2>&5
12719   ac_status=$?
12720   echo "$as_me:12720: \$? = $ac_status" >&5
12721   (exit $ac_status); }; }; then
12722   cf_cv_type_sigaction=yes
12723 else
12724   echo "$as_me: failed program was:" >&5
12725 cat conftest.$ac_ext >&5
12726 cf_cv_type_sigaction=no
12727 fi
12728 rm -f conftest.$ac_objext conftest.$ac_ext
12729 fi
12730
12731 echo "$as_me:12731: result: $cf_cv_type_sigaction" >&5
12732 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
12733 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
12734 #define HAVE_TYPE_SIGACTION 1
12735 EOF
12736
12737 echo "$as_me:12737: checking declaration of size-change" >&5
12738 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
12739 if test "${cf_cv_sizechange+set}" = set; then
12740   echo $ECHO_N "(cached) $ECHO_C" >&6
12741 else
12742
12743     cf_cv_sizechange=unknown
12744     cf_save_CPPFLAGS="$CPPFLAGS"
12745
12746 for cf_opts in "" "NEED_PTEM_H"
12747 do
12748
12749     CPPFLAGS="$cf_save_CPPFLAGS"
12750     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
12751     cat >conftest.$ac_ext <<_ACEOF
12752 #line 12752 "configure"
12753 #include "confdefs.h"
12754 #include <sys/types.h>
12755 #ifdef HAVE_TERMIOS_H
12756 #include <termios.h>
12757 #else
12758 #ifdef HAVE_TERMIO_H
12759 #include <termio.h>
12760 #endif
12761 #endif
12762 #ifdef NEED_PTEM_H
12763 /* This is a workaround for SCO:  they neglected to define struct winsize in
12764  * termios.h -- it's only in termio.h and ptem.h
12765  */
12766 #include        <sys/stream.h>
12767 #include        <sys/ptem.h>
12768 #endif
12769 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
12770 #include <sys/ioctl.h>
12771 #endif
12772
12773 int
12774 main ()
12775 {
12776
12777 #ifdef TIOCGSIZE
12778         struct ttysize win;     /* FIXME: what system is this? */
12779         int y = win.ts_lines;
12780         int x = win.ts_cols;
12781 #else
12782 #ifdef TIOCGWINSZ
12783         struct winsize win;
12784         int y = win.ws_row;
12785         int x = win.ws_col;
12786 #else
12787         no TIOCGSIZE or TIOCGWINSZ
12788 #endif /* TIOCGWINSZ */
12789 #endif /* TIOCGSIZE */
12790
12791   ;
12792   return 0;
12793 }
12794 _ACEOF
12795 rm -f conftest.$ac_objext
12796 if { (eval echo "$as_me:12796: \"$ac_compile\"") >&5
12797   (eval $ac_compile) 2>&5
12798   ac_status=$?
12799   echo "$as_me:12799: \$? = $ac_status" >&5
12800   (exit $ac_status); } &&
12801          { ac_try='test -s conftest.$ac_objext'
12802   { (eval echo "$as_me:12802: \"$ac_try\"") >&5
12803   (eval $ac_try) 2>&5
12804   ac_status=$?
12805   echo "$as_me:12805: \$? = $ac_status" >&5
12806   (exit $ac_status); }; }; then
12807   cf_cv_sizechange=yes
12808 else
12809   echo "$as_me: failed program was:" >&5
12810 cat conftest.$ac_ext >&5
12811 cf_cv_sizechange=no
12812 fi
12813 rm -f conftest.$ac_objext conftest.$ac_ext
12814
12815         CPPFLAGS="$cf_save_CPPFLAGS"
12816         if test "$cf_cv_sizechange" = yes ; then
12817                 echo "size-change succeeded ($cf_opts)" >&5
12818                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
12819                 break
12820         fi
12821 done
12822
12823 fi
12824 echo "$as_me:12824: result: $cf_cv_sizechange" >&5
12825 echo "${ECHO_T}$cf_cv_sizechange" >&6
12826 if test "$cf_cv_sizechange" != no ; then
12827         cat >>confdefs.h <<\EOF
12828 #define HAVE_SIZECHANGE 1
12829 EOF
12830
12831         case $cf_cv_sizechange in #(vi
12832         NEED*)
12833                 cat >>confdefs.h <<EOF
12834 #define $cf_cv_sizechange  1
12835 EOF
12836
12837                 ;;
12838         esac
12839 fi
12840
12841 echo "$as_me:12841: checking for memmove" >&5
12842 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
12843 if test "${ac_cv_func_memmove+set}" = set; then
12844   echo $ECHO_N "(cached) $ECHO_C" >&6
12845 else
12846   cat >conftest.$ac_ext <<_ACEOF
12847 #line 12847 "configure"
12848 #include "confdefs.h"
12849 /* System header to define __stub macros and hopefully few prototypes,
12850     which can conflict with char memmove (); below.  */
12851 #include <assert.h>
12852 /* Override any gcc2 internal prototype to avoid an error.  */
12853 #ifdef __cplusplus
12854 extern "C"
12855 #endif
12856 /* We use char because int might match the return type of a gcc2
12857    builtin and then its argument prototype would still apply.  */
12858 char memmove ();
12859 char (*f) ();
12860
12861 int
12862 main ()
12863 {
12864 /* The GNU C library defines this for functions which it implements
12865     to always fail with ENOSYS.  Some functions are actually named
12866     something starting with __ and the normal name is an alias.  */
12867 #if defined (__stub_memmove) || defined (__stub___memmove)
12868 choke me
12869 #else
12870 f = memmove;
12871 #endif
12872
12873   ;
12874   return 0;
12875 }
12876 _ACEOF
12877 rm -f conftest.$ac_objext conftest$ac_exeext
12878 if { (eval echo "$as_me:12878: \"$ac_link\"") >&5
12879   (eval $ac_link) 2>&5
12880   ac_status=$?
12881   echo "$as_me:12881: \$? = $ac_status" >&5
12882   (exit $ac_status); } &&
12883          { ac_try='test -s conftest$ac_exeext'
12884   { (eval echo "$as_me:12884: \"$ac_try\"") >&5
12885   (eval $ac_try) 2>&5
12886   ac_status=$?
12887   echo "$as_me:12887: \$? = $ac_status" >&5
12888   (exit $ac_status); }; }; then
12889   ac_cv_func_memmove=yes
12890 else
12891   echo "$as_me: failed program was:" >&5
12892 cat conftest.$ac_ext >&5
12893 ac_cv_func_memmove=no
12894 fi
12895 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12896 fi
12897 echo "$as_me:12897: result: $ac_cv_func_memmove" >&5
12898 echo "${ECHO_T}$ac_cv_func_memmove" >&6
12899 if test $ac_cv_func_memmove = yes; then
12900   :
12901 else
12902
12903 echo "$as_me:12903: checking for bcopy" >&5
12904 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
12905 if test "${ac_cv_func_bcopy+set}" = set; then
12906   echo $ECHO_N "(cached) $ECHO_C" >&6
12907 else
12908   cat >conftest.$ac_ext <<_ACEOF
12909 #line 12909 "configure"
12910 #include "confdefs.h"
12911 /* System header to define __stub macros and hopefully few prototypes,
12912     which can conflict with char bcopy (); below.  */
12913 #include <assert.h>
12914 /* Override any gcc2 internal prototype to avoid an error.  */
12915 #ifdef __cplusplus
12916 extern "C"
12917 #endif
12918 /* We use char because int might match the return type of a gcc2
12919    builtin and then its argument prototype would still apply.  */
12920 char bcopy ();
12921 char (*f) ();
12922
12923 int
12924 main ()
12925 {
12926 /* The GNU C library defines this for functions which it implements
12927     to always fail with ENOSYS.  Some functions are actually named
12928     something starting with __ and the normal name is an alias.  */
12929 #if defined (__stub_bcopy) || defined (__stub___bcopy)
12930 choke me
12931 #else
12932 f = bcopy;
12933 #endif
12934
12935   ;
12936   return 0;
12937 }
12938 _ACEOF
12939 rm -f conftest.$ac_objext conftest$ac_exeext
12940 if { (eval echo "$as_me:12940: \"$ac_link\"") >&5
12941   (eval $ac_link) 2>&5
12942   ac_status=$?
12943   echo "$as_me:12943: \$? = $ac_status" >&5
12944   (exit $ac_status); } &&
12945          { ac_try='test -s conftest$ac_exeext'
12946   { (eval echo "$as_me:12946: \"$ac_try\"") >&5
12947   (eval $ac_try) 2>&5
12948   ac_status=$?
12949   echo "$as_me:12949: \$? = $ac_status" >&5
12950   (exit $ac_status); }; }; then
12951   ac_cv_func_bcopy=yes
12952 else
12953   echo "$as_me: failed program was:" >&5
12954 cat conftest.$ac_ext >&5
12955 ac_cv_func_bcopy=no
12956 fi
12957 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12958 fi
12959 echo "$as_me:12959: result: $ac_cv_func_bcopy" >&5
12960 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
12961 if test $ac_cv_func_bcopy = yes; then
12962
12963         echo "$as_me:12963: checking if bcopy does overlapping moves" >&5
12964 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
12965 if test "${cf_cv_good_bcopy+set}" = set; then
12966   echo $ECHO_N "(cached) $ECHO_C" >&6
12967 else
12968
12969                 if test "$cross_compiling" = yes; then
12970   cf_cv_good_bcopy=unknown
12971 else
12972   cat >conftest.$ac_ext <<_ACEOF
12973 #line 12973 "configure"
12974 #include "confdefs.h"
12975
12976 int main() {
12977         static char data[] = "abcdefghijklmnopqrstuwwxyz";
12978         char temp[40];
12979         bcopy(data, temp, sizeof(data));
12980         bcopy(temp+10, temp, 15);
12981         bcopy(temp+5, temp+15, 10);
12982         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
12983 }
12984
12985 _ACEOF
12986 rm -f conftest$ac_exeext
12987 if { (eval echo "$as_me:12987: \"$ac_link\"") >&5
12988   (eval $ac_link) 2>&5
12989   ac_status=$?
12990   echo "$as_me:12990: \$? = $ac_status" >&5
12991   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12992   { (eval echo "$as_me:12992: \"$ac_try\"") >&5
12993   (eval $ac_try) 2>&5
12994   ac_status=$?
12995   echo "$as_me:12995: \$? = $ac_status" >&5
12996   (exit $ac_status); }; }; then
12997   cf_cv_good_bcopy=yes
12998 else
12999   echo "$as_me: program exited with status $ac_status" >&5
13000 echo "$as_me: failed program was:" >&5
13001 cat conftest.$ac_ext >&5
13002 cf_cv_good_bcopy=no
13003 fi
13004 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13005 fi
13006
13007 fi
13008 echo "$as_me:13008: result: $cf_cv_good_bcopy" >&5
13009 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
13010
13011 else
13012   cf_cv_good_bcopy=no
13013 fi
13014
13015         if test "$cf_cv_good_bcopy" = yes ; then
13016                 cat >>confdefs.h <<\EOF
13017 #define USE_OK_BCOPY 1
13018 EOF
13019
13020         else
13021                 cat >>confdefs.h <<\EOF
13022 #define USE_MY_MEMMOVE 1
13023 EOF
13024
13025         fi
13026
13027 fi
13028
13029 echo "$as_me:13029: checking if poll really works" >&5
13030 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13031 if test "${cf_cv_working_poll+set}" = set; then
13032   echo $ECHO_N "(cached) $ECHO_C" >&6
13033 else
13034
13035 if test "$cross_compiling" = yes; then
13036   cf_cv_working_poll=unknown
13037 else
13038   cat >conftest.$ac_ext <<_ACEOF
13039 #line 13039 "configure"
13040 #include "confdefs.h"
13041
13042 #include <stdio.h>
13043 #ifdef HAVE_POLL_H
13044 #include <poll.h>
13045 #else
13046 #include <sys/poll.h>
13047 #endif
13048 int main() {
13049         struct pollfd myfds;
13050         int ret;
13051
13052         myfds.fd = 0;
13053         myfds.events = POLLIN;
13054
13055         ret = poll(&myfds, 1, 100);
13056         ${cf_cv_main_return:-return}(ret != 0);
13057 }
13058 _ACEOF
13059 rm -f conftest$ac_exeext
13060 if { (eval echo "$as_me:13060: \"$ac_link\"") >&5
13061   (eval $ac_link) 2>&5
13062   ac_status=$?
13063   echo "$as_me:13063: \$? = $ac_status" >&5
13064   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13065   { (eval echo "$as_me:13065: \"$ac_try\"") >&5
13066   (eval $ac_try) 2>&5
13067   ac_status=$?
13068   echo "$as_me:13068: \$? = $ac_status" >&5
13069   (exit $ac_status); }; }; then
13070   cf_cv_working_poll=yes
13071 else
13072   echo "$as_me: program exited with status $ac_status" >&5
13073 echo "$as_me: failed program was:" >&5
13074 cat conftest.$ac_ext >&5
13075 cf_cv_working_poll=no
13076 fi
13077 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13078 fi
13079 fi
13080 echo "$as_me:13080: result: $cf_cv_working_poll" >&5
13081 echo "${ECHO_T}$cf_cv_working_poll" >&6
13082 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13083 #define HAVE_WORKING_POLL 1
13084 EOF
13085
13086 if test "$with_hashed_db" != no ; then
13087         cat >>confdefs.h <<\EOF
13088 #define USE_HASHED_DB 1
13089 EOF
13090
13091 echo "$as_me:13091: checking for db.h" >&5
13092 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13093 if test "${ac_cv_header_db_h+set}" = set; then
13094   echo $ECHO_N "(cached) $ECHO_C" >&6
13095 else
13096   cat >conftest.$ac_ext <<_ACEOF
13097 #line 13097 "configure"
13098 #include "confdefs.h"
13099 #include <db.h>
13100 _ACEOF
13101 if { (eval echo "$as_me:13101: \"$ac_cpp conftest.$ac_ext\"") >&5
13102   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13103   ac_status=$?
13104   egrep -v '^ *\+' conftest.er1 >conftest.err
13105   rm -f conftest.er1
13106   cat conftest.err >&5
13107   echo "$as_me:13107: \$? = $ac_status" >&5
13108   (exit $ac_status); } >/dev/null; then
13109   if test -s conftest.err; then
13110     ac_cpp_err=$ac_c_preproc_warn_flag
13111   else
13112     ac_cpp_err=
13113   fi
13114 else
13115   ac_cpp_err=yes
13116 fi
13117 if test -z "$ac_cpp_err"; then
13118   ac_cv_header_db_h=yes
13119 else
13120   echo "$as_me: failed program was:" >&5
13121   cat conftest.$ac_ext >&5
13122   ac_cv_header_db_h=no
13123 fi
13124 rm -f conftest.err conftest.$ac_ext
13125 fi
13126 echo "$as_me:13126: result: $ac_cv_header_db_h" >&5
13127 echo "${ECHO_T}$ac_cv_header_db_h" >&6
13128 if test $ac_cv_header_db_h = yes; then
13129
13130 echo "$as_me:13130: checking for version of db" >&5
13131 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13132 if test "${cf_cv_hashed_db_version+set}" = set; then
13133   echo $ECHO_N "(cached) $ECHO_C" >&6
13134 else
13135
13136 cf_cv_hashed_db_version=unknown
13137
13138 for cf_db_version in 1 2 3 4
13139 do
13140
13141 echo "(line 13141) testing checking for db version $cf_db_version ..." 1>&5
13142
13143         cat >conftest.$ac_ext <<_ACEOF
13144 #line 13144 "configure"
13145 #include "confdefs.h"
13146
13147 $ac_includes_default
13148 #include <db.h>
13149
13150 #ifdef DB_VERSION_MAJOR
13151         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13152 #if $cf_db_version == DB_VERSION_MAJOR
13153         /* ok */
13154 #else
13155         make an error
13156 #endif
13157 #else
13158 #if $cf_db_version == 1
13159         /* ok: assuming this is DB 1.8.5 */
13160 #else
13161         make an error
13162 #endif
13163 #endif
13164
13165 int
13166 main ()
13167 {
13168 DBT *foo = 0
13169   ;
13170   return 0;
13171 }
13172 _ACEOF
13173 rm -f conftest.$ac_objext
13174 if { (eval echo "$as_me:13174: \"$ac_compile\"") >&5
13175   (eval $ac_compile) 2>&5
13176   ac_status=$?
13177   echo "$as_me:13177: \$? = $ac_status" >&5
13178   (exit $ac_status); } &&
13179          { ac_try='test -s conftest.$ac_objext'
13180   { (eval echo "$as_me:13180: \"$ac_try\"") >&5
13181   (eval $ac_try) 2>&5
13182   ac_status=$?
13183   echo "$as_me:13183: \$? = $ac_status" >&5
13184   (exit $ac_status); }; }; then
13185
13186         cf_cv_hashed_db_version=$cf_db_version
13187         break
13188
13189 else
13190   echo "$as_me: failed program was:" >&5
13191 cat conftest.$ac_ext >&5
13192 fi
13193 rm -f conftest.$ac_objext conftest.$ac_ext
13194 done
13195
13196 fi
13197 echo "$as_me:13197: result: $cf_cv_hashed_db_version" >&5
13198 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
13199
13200 if test "$cf_cv_hashed_db_version" = unknown ; then
13201         { { echo "$as_me:13201: error: Cannot determine version of db" >&5
13202 echo "$as_me: error: Cannot determine version of db" >&2;}
13203    { (exit 1); exit 1; }; }
13204 else
13205
13206 echo "$as_me:13206: checking for db libraries" >&5
13207 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
13208 if test "${cf_cv_hashed_db_libs+set}" = set; then
13209   echo $ECHO_N "(cached) $ECHO_C" >&6
13210 else
13211
13212 cf_cv_hashed_db_libs=unknown
13213 for cf_db_libs in db$cf_cv_hashed_db_version db ''
13214 do
13215         cf_save_libs="$LIBS"
13216         if test -n "$cf_db_libs"; then
13217                 LIBS="-l$cf_db_libs $LIBS"
13218         fi
13219
13220 echo "(line 13220) testing checking for library "$cf_db_libs" ..." 1>&5
13221
13222         cat >conftest.$ac_ext <<_ACEOF
13223 #line 13223 "configure"
13224 #include "confdefs.h"
13225
13226 $ac_includes_default
13227 #include <db.h>
13228
13229 int
13230 main ()
13231 {
13232
13233         char *path = "/tmp/foo";
13234 #ifdef DB_VERSION_MAJOR
13235 #if DB_VERSION_MAJOR >= 4
13236         DB *result = 0;
13237         db_create(&result, NULL, 0);
13238         result->open(result,
13239                 NULL,
13240                 path,
13241                 path,
13242                 DB_HASH,
13243                 DB_CREATE,
13244                 0644);
13245 #elif DB_VERSION_MAJOR >= 3
13246         DB *result = 0;
13247         db_create(&result, NULL, 0);
13248         result->open(result,
13249                 path,
13250                 path,
13251                 DB_HASH,
13252                 DB_CREATE,
13253                 0644);
13254 #elif DB_VERSION_MAJOR >= 2
13255         DB *result = 0;
13256         db_open(path,
13257                 DB_HASH,
13258                 DB_CREATE,
13259                 0644,
13260                 (DB_ENV *) 0,
13261                 (DB_INFO *) 0,
13262                 &result);
13263 #endif /* DB_VERSION_MAJOR */
13264 #else
13265         DB *result = dbopen(path,
13266                      2,
13267                      0644,
13268                      DB_HASH,
13269                      0);
13270 #endif
13271         ${cf_cv_main_return:-return}(result != 0)
13272
13273   ;
13274   return 0;
13275 }
13276 _ACEOF
13277 rm -f conftest.$ac_objext conftest$ac_exeext
13278 if { (eval echo "$as_me:13278: \"$ac_link\"") >&5
13279   (eval $ac_link) 2>&5
13280   ac_status=$?
13281   echo "$as_me:13281: \$? = $ac_status" >&5
13282   (exit $ac_status); } &&
13283          { ac_try='test -s conftest$ac_exeext'
13284   { (eval echo "$as_me:13284: \"$ac_try\"") >&5
13285   (eval $ac_try) 2>&5
13286   ac_status=$?
13287   echo "$as_me:13287: \$? = $ac_status" >&5
13288   (exit $ac_status); }; }; then
13289
13290         if test -n "$cf_db_libs" ; then
13291                 cf_cv_hashed_db_libs=$cf_db_libs
13292         else
13293                 cf_cv_hashed_db_libs=default
13294         fi
13295         LIBS="$cf_save_libs"
13296         break
13297
13298 else
13299   echo "$as_me: failed program was:" >&5
13300 cat conftest.$ac_ext >&5
13301 fi
13302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13303         LIBS="$cf_save_libs"
13304 done
13305
13306 fi
13307 echo "$as_me:13307: result: $cf_cv_hashed_db_libs" >&5
13308 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
13309
13310         if test "$cf_cv_hashed_db_libs" = unknown ; then
13311                 { { echo "$as_me:13311: error: Cannot determine library for db" >&5
13312 echo "$as_me: error: Cannot determine library for db" >&2;}
13313    { (exit 1); exit 1; }; }
13314         elif test "$cf_cv_hashed_db_libs" != default ; then
13315                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
13316         fi
13317 fi
13318
13319 else
13320
13321         { { echo "$as_me:13321: error: Cannot find db.h" >&5
13322 echo "$as_me: error: Cannot find db.h" >&2;}
13323    { (exit 1); exit 1; }; }
13324
13325 fi
13326
13327 fi
13328
13329 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13330         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13331         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13332 fi
13333
13334 # Just in case, check if the C compiler has a bool type.
13335
13336 echo "$as_me:13336: checking if we should include stdbool.h" >&5
13337 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13338
13339 if test "${cf_cv_header_stdbool_h+set}" = set; then
13340   echo $ECHO_N "(cached) $ECHO_C" >&6
13341 else
13342
13343         cat >conftest.$ac_ext <<_ACEOF
13344 #line 13344 "configure"
13345 #include "confdefs.h"
13346
13347 int
13348 main ()
13349 {
13350 bool foo = false
13351   ;
13352   return 0;
13353 }
13354 _ACEOF
13355 rm -f conftest.$ac_objext
13356 if { (eval echo "$as_me:13356: \"$ac_compile\"") >&5
13357   (eval $ac_compile) 2>&5
13358   ac_status=$?
13359   echo "$as_me:13359: \$? = $ac_status" >&5
13360   (exit $ac_status); } &&
13361          { ac_try='test -s conftest.$ac_objext'
13362   { (eval echo "$as_me:13362: \"$ac_try\"") >&5
13363   (eval $ac_try) 2>&5
13364   ac_status=$?
13365   echo "$as_me:13365: \$? = $ac_status" >&5
13366   (exit $ac_status); }; }; then
13367   cf_cv_header_stdbool_h=0
13368 else
13369   echo "$as_me: failed program was:" >&5
13370 cat conftest.$ac_ext >&5
13371 cat >conftest.$ac_ext <<_ACEOF
13372 #line 13372 "configure"
13373 #include "confdefs.h"
13374
13375 #ifndef __BEOS__
13376 #include <stdbool.h>
13377 #endif
13378
13379 int
13380 main ()
13381 {
13382 bool foo = false
13383   ;
13384   return 0;
13385 }
13386 _ACEOF
13387 rm -f conftest.$ac_objext
13388 if { (eval echo "$as_me:13388: \"$ac_compile\"") >&5
13389   (eval $ac_compile) 2>&5
13390   ac_status=$?
13391   echo "$as_me:13391: \$? = $ac_status" >&5
13392   (exit $ac_status); } &&
13393          { ac_try='test -s conftest.$ac_objext'
13394   { (eval echo "$as_me:13394: \"$ac_try\"") >&5
13395   (eval $ac_try) 2>&5
13396   ac_status=$?
13397   echo "$as_me:13397: \$? = $ac_status" >&5
13398   (exit $ac_status); }; }; then
13399   cf_cv_header_stdbool_h=1
13400 else
13401   echo "$as_me: failed program was:" >&5
13402 cat conftest.$ac_ext >&5
13403 cf_cv_header_stdbool_h=0
13404 fi
13405 rm -f conftest.$ac_objext conftest.$ac_ext
13406 fi
13407 rm -f conftest.$ac_objext conftest.$ac_ext
13408 fi
13409
13410 if test "$cf_cv_header_stdbool_h" = 1
13411 then    echo "$as_me:13411: result: yes" >&5
13412 echo "${ECHO_T}yes" >&6
13413 else    echo "$as_me:13413: result: no" >&5
13414 echo "${ECHO_T}no" >&6
13415 fi
13416
13417 echo "$as_me:13417: checking for builtin bool type" >&5
13418 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
13419
13420 if test "${cf_cv_cc_bool_type+set}" = set; then
13421   echo $ECHO_N "(cached) $ECHO_C" >&6
13422 else
13423
13424         cat >conftest.$ac_ext <<_ACEOF
13425 #line 13425 "configure"
13426 #include "confdefs.h"
13427
13428 #include <stdio.h>
13429 #include <sys/types.h>
13430
13431 int
13432 main ()
13433 {
13434 bool x = false
13435   ;
13436   return 0;
13437 }
13438 _ACEOF
13439 rm -f conftest.$ac_objext
13440 if { (eval echo "$as_me:13440: \"$ac_compile\"") >&5
13441   (eval $ac_compile) 2>&5
13442   ac_status=$?
13443   echo "$as_me:13443: \$? = $ac_status" >&5
13444   (exit $ac_status); } &&
13445          { ac_try='test -s conftest.$ac_objext'
13446   { (eval echo "$as_me:13446: \"$ac_try\"") >&5
13447   (eval $ac_try) 2>&5
13448   ac_status=$?
13449   echo "$as_me:13449: \$? = $ac_status" >&5
13450   (exit $ac_status); }; }; then
13451   cf_cv_cc_bool_type=1
13452 else
13453   echo "$as_me: failed program was:" >&5
13454 cat conftest.$ac_ext >&5
13455 cf_cv_cc_bool_type=0
13456 fi
13457 rm -f conftest.$ac_objext conftest.$ac_ext
13458
13459 fi
13460
13461 if test "$cf_cv_cc_bool_type" = 1
13462 then    echo "$as_me:13462: result: yes" >&5
13463 echo "${ECHO_T}yes" >&6
13464 else    echo "$as_me:13464: result: no" >&5
13465 echo "${ECHO_T}no" >&6
13466 fi
13467
13468 # Check for C++ compiler characteristics (and ensure that it's there!)
13469 if test -n "$CXX" ; then
13470         ac_ext=cc
13471 ac_cpp='$CXXCPP $CPPFLAGS'
13472 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13473 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13474 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13475 ac_main_return=return
13476
13477 if test -n "$GXX" ; then
13478 case $cf_cv_system_name in #(vi
13479 os2*) #(vi
13480         cf_stdcpp_libname=stdcpp
13481         ;;
13482 *)
13483         cf_stdcpp_libname=stdc++
13484         ;;
13485 esac
13486 echo "$as_me:13486: checking for library $cf_stdcpp_libname" >&5
13487 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
13488 if test "${cf_cv_libstdcpp+set}" = set; then
13489   echo $ECHO_N "(cached) $ECHO_C" >&6
13490 else
13491
13492         cf_save="$LIBS"
13493         LIBS="$LIBS -l$cf_stdcpp_libname"
13494 cat >conftest.$ac_ext <<_ACEOF
13495 #line 13495 "configure"
13496 #include "confdefs.h"
13497
13498 #include <strstream.h>
13499 int
13500 main ()
13501 {
13502
13503 char buf[80];
13504 strstreambuf foo(buf, sizeof(buf))
13505
13506   ;
13507   return 0;
13508 }
13509 _ACEOF
13510 rm -f conftest.$ac_objext conftest$ac_exeext
13511 if { (eval echo "$as_me:13511: \"$ac_link\"") >&5
13512   (eval $ac_link) 2>&5
13513   ac_status=$?
13514   echo "$as_me:13514: \$? = $ac_status" >&5
13515   (exit $ac_status); } &&
13516          { ac_try='test -s conftest$ac_exeext'
13517   { (eval echo "$as_me:13517: \"$ac_try\"") >&5
13518   (eval $ac_try) 2>&5
13519   ac_status=$?
13520   echo "$as_me:13520: \$? = $ac_status" >&5
13521   (exit $ac_status); }; }; then
13522   cf_cv_libstdcpp=yes
13523 else
13524   echo "$as_me: failed program was:" >&5
13525 cat conftest.$ac_ext >&5
13526 cf_cv_libstdcpp=no
13527 fi
13528 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13529         LIBS="$cf_save"
13530
13531 fi
13532 echo "$as_me:13532: result: $cf_cv_libstdcpp" >&5
13533 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
13534 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
13535 fi
13536
13537         echo "$as_me:13537: checking whether $CXX understands -c and -o together" >&5
13538 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
13539 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
13540   echo $ECHO_N "(cached) $ECHO_C" >&6
13541 else
13542
13543 cat > conftest.$ac_ext <<CF_EOF
13544 #include <stdio.h>
13545 int main()
13546 {
13547         ${cf_cv_main_return:-return}(0);
13548 }
13549 CF_EOF
13550 # We do the test twice because some compilers refuse to overwrite an
13551 # existing .o file with -o, though they will create one.
13552 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
13553 if { (eval echo "$as_me:13553: \"$ac_try\"") >&5
13554   (eval $ac_try) 2>&5
13555   ac_status=$?
13556   echo "$as_me:13556: \$? = $ac_status" >&5
13557   (exit $ac_status); } &&
13558   test -f conftest2.$ac_objext && { (eval echo "$as_me:13558: \"$ac_try\"") >&5
13559   (eval $ac_try) 2>&5
13560   ac_status=$?
13561   echo "$as_me:13561: \$? = $ac_status" >&5
13562   (exit $ac_status); };
13563 then
13564   eval cf_cv_prog_CXX_c_o=yes
13565 else
13566   eval cf_cv_prog_CXX_c_o=no
13567 fi
13568 rm -f conftest*
13569
13570 fi
13571 if test $cf_cv_prog_CXX_c_o = yes; then
13572   echo "$as_me:13572: result: yes" >&5
13573 echo "${ECHO_T}yes" >&6
13574 else
13575   echo "$as_me:13575: result: no" >&5
13576 echo "${ECHO_T}no" >&6
13577 fi
13578
13579         case $GXX_VERSION in
13580         1*|2.0-6*)
13581                 cf_cxx_library=yes
13582                 ;;
13583         *-2.7*|2.7*)
13584
13585 cf_cxx_library=unknown
13586 case $cf_cv_system_name in #(vi
13587 os2*) #(vi
13588         cf_gpp_libname=gpp
13589         ;;
13590 *)
13591         cf_gpp_libname=g++
13592         ;;
13593 esac
13594 if test "$GXX" = yes; then
13595         echo "$as_me:13595: checking for lib$cf_gpp_libname" >&5
13596 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
13597         cf_save="$LIBS"
13598         LIBS="$LIBS -l$cf_gpp_libname"
13599         cat >conftest.$ac_ext <<_ACEOF
13600 #line 13600 "configure"
13601 #include "confdefs.h"
13602
13603 #include <$cf_gpp_libname/builtin.h>
13604
13605 int
13606 main ()
13607 {
13608 two_arg_error_handler_t foo2 = lib_error_handler
13609   ;
13610   return 0;
13611 }
13612 _ACEOF
13613 rm -f conftest.$ac_objext conftest$ac_exeext
13614 if { (eval echo "$as_me:13614: \"$ac_link\"") >&5
13615   (eval $ac_link) 2>&5
13616   ac_status=$?
13617   echo "$as_me:13617: \$? = $ac_status" >&5
13618   (exit $ac_status); } &&
13619          { ac_try='test -s conftest$ac_exeext'
13620   { (eval echo "$as_me:13620: \"$ac_try\"") >&5
13621   (eval $ac_try) 2>&5
13622   ac_status=$?
13623   echo "$as_me:13623: \$? = $ac_status" >&5
13624   (exit $ac_status); }; }; then
13625   cf_cxx_library=yes
13626          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13627          if test "$cf_gpp_libname" = cpp ; then
13628             cat >>confdefs.h <<\EOF
13629 #define HAVE_GPP_BUILTIN_H 1
13630 EOF
13631
13632          else
13633             cat >>confdefs.h <<\EOF
13634 #define HAVE_GXX_BUILTIN_H 1
13635 EOF
13636
13637          fi
13638 else
13639   echo "$as_me: failed program was:" >&5
13640 cat conftest.$ac_ext >&5
13641 cat >conftest.$ac_ext <<_ACEOF
13642 #line 13642 "configure"
13643 #include "confdefs.h"
13644
13645 #include <builtin.h>
13646
13647 int
13648 main ()
13649 {
13650 two_arg_error_handler_t foo2 = lib_error_handler
13651   ;
13652   return 0;
13653 }
13654 _ACEOF
13655 rm -f conftest.$ac_objext conftest$ac_exeext
13656 if { (eval echo "$as_me:13656: \"$ac_link\"") >&5
13657   (eval $ac_link) 2>&5
13658   ac_status=$?
13659   echo "$as_me:13659: \$? = $ac_status" >&5
13660   (exit $ac_status); } &&
13661          { ac_try='test -s conftest$ac_exeext'
13662   { (eval echo "$as_me:13662: \"$ac_try\"") >&5
13663   (eval $ac_try) 2>&5
13664   ac_status=$?
13665   echo "$as_me:13665: \$? = $ac_status" >&5
13666   (exit $ac_status); }; }; then
13667   cf_cxx_library=yes
13668          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13669          cat >>confdefs.h <<\EOF
13670 #define HAVE_BUILTIN_H 1
13671 EOF
13672
13673 else
13674   echo "$as_me: failed program was:" >&5
13675 cat conftest.$ac_ext >&5
13676 cf_cxx_library=no
13677 fi
13678 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13679 fi
13680 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13681         LIBS="$cf_save"
13682         echo "$as_me:13682: result: $cf_cxx_library" >&5
13683 echo "${ECHO_T}$cf_cxx_library" >&6
13684 fi
13685
13686                 ;;
13687         *)
13688                 cf_cxx_library=no
13689                 ;;
13690         esac
13691
13692         ac_ext=cc
13693 ac_cpp='$CXXCPP $CPPFLAGS'
13694 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13695 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13696 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13697 ac_main_return=return
13698 echo "$as_me:13698: checking how to run the C++ preprocessor" >&5
13699 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
13700 if test -z "$CXXCPP"; then
13701   if test "${ac_cv_prog_CXXCPP+set}" = set; then
13702   echo $ECHO_N "(cached) $ECHO_C" >&6
13703 else
13704       # Double quotes because CXXCPP needs to be expanded
13705     for CXXCPP in "$CXX -E" "/lib/cpp"
13706     do
13707       ac_preproc_ok=false
13708 for ac_cxx_preproc_warn_flag in '' yes
13709 do
13710   # Use a header file that comes with gcc, so configuring glibc
13711   # with a fresh cross-compiler works.
13712   # On the NeXT, cc -E runs the code through the compiler's parser,
13713   # not just through cpp. "Syntax error" is here to catch this case.
13714   cat >conftest.$ac_ext <<_ACEOF
13715 #line 13715 "configure"
13716 #include "confdefs.h"
13717 #include <assert.h>
13718                      Syntax error
13719 _ACEOF
13720 if { (eval echo "$as_me:13720: \"$ac_cpp conftest.$ac_ext\"") >&5
13721   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13722   ac_status=$?
13723   egrep -v '^ *\+' conftest.er1 >conftest.err
13724   rm -f conftest.er1
13725   cat conftest.err >&5
13726   echo "$as_me:13726: \$? = $ac_status" >&5
13727   (exit $ac_status); } >/dev/null; then
13728   if test -s conftest.err; then
13729     ac_cpp_err=$ac_cxx_preproc_warn_flag
13730   else
13731     ac_cpp_err=
13732   fi
13733 else
13734   ac_cpp_err=yes
13735 fi
13736 if test -z "$ac_cpp_err"; then
13737   :
13738 else
13739   echo "$as_me: failed program was:" >&5
13740   cat conftest.$ac_ext >&5
13741   # Broken: fails on valid input.
13742 continue
13743 fi
13744 rm -f conftest.err conftest.$ac_ext
13745
13746   # OK, works on sane cases.  Now check whether non-existent headers
13747   # can be detected and how.
13748   cat >conftest.$ac_ext <<_ACEOF
13749 #line 13749 "configure"
13750 #include "confdefs.h"
13751 #include <ac_nonexistent.h>
13752 _ACEOF
13753 if { (eval echo "$as_me:13753: \"$ac_cpp conftest.$ac_ext\"") >&5
13754   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13755   ac_status=$?
13756   egrep -v '^ *\+' conftest.er1 >conftest.err
13757   rm -f conftest.er1
13758   cat conftest.err >&5
13759   echo "$as_me:13759: \$? = $ac_status" >&5
13760   (exit $ac_status); } >/dev/null; then
13761   if test -s conftest.err; then
13762     ac_cpp_err=$ac_cxx_preproc_warn_flag
13763   else
13764     ac_cpp_err=
13765   fi
13766 else
13767   ac_cpp_err=yes
13768 fi
13769 if test -z "$ac_cpp_err"; then
13770   # Broken: success on invalid input.
13771 continue
13772 else
13773   echo "$as_me: failed program was:" >&5
13774   cat conftest.$ac_ext >&5
13775   # Passes both tests.
13776 ac_preproc_ok=:
13777 break
13778 fi
13779 rm -f conftest.err conftest.$ac_ext
13780
13781 done
13782 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13783 rm -f conftest.err conftest.$ac_ext
13784 if $ac_preproc_ok; then
13785   break
13786 fi
13787
13788     done
13789     ac_cv_prog_CXXCPP=$CXXCPP
13790
13791 fi
13792   CXXCPP=$ac_cv_prog_CXXCPP
13793 else
13794   ac_cv_prog_CXXCPP=$CXXCPP
13795 fi
13796 echo "$as_me:13796: result: $CXXCPP" >&5
13797 echo "${ECHO_T}$CXXCPP" >&6
13798 ac_preproc_ok=false
13799 for ac_cxx_preproc_warn_flag in '' yes
13800 do
13801   # Use a header file that comes with gcc, so configuring glibc
13802   # with a fresh cross-compiler works.
13803   # On the NeXT, cc -E runs the code through the compiler's parser,
13804   # not just through cpp. "Syntax error" is here to catch this case.
13805   cat >conftest.$ac_ext <<_ACEOF
13806 #line 13806 "configure"
13807 #include "confdefs.h"
13808 #include <assert.h>
13809                      Syntax error
13810 _ACEOF
13811 if { (eval echo "$as_me:13811: \"$ac_cpp conftest.$ac_ext\"") >&5
13812   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13813   ac_status=$?
13814   egrep -v '^ *\+' conftest.er1 >conftest.err
13815   rm -f conftest.er1
13816   cat conftest.err >&5
13817   echo "$as_me:13817: \$? = $ac_status" >&5
13818   (exit $ac_status); } >/dev/null; then
13819   if test -s conftest.err; then
13820     ac_cpp_err=$ac_cxx_preproc_warn_flag
13821   else
13822     ac_cpp_err=
13823   fi
13824 else
13825   ac_cpp_err=yes
13826 fi
13827 if test -z "$ac_cpp_err"; then
13828   :
13829 else
13830   echo "$as_me: failed program was:" >&5
13831   cat conftest.$ac_ext >&5
13832   # Broken: fails on valid input.
13833 continue
13834 fi
13835 rm -f conftest.err conftest.$ac_ext
13836
13837   # OK, works on sane cases.  Now check whether non-existent headers
13838   # can be detected and how.
13839   cat >conftest.$ac_ext <<_ACEOF
13840 #line 13840 "configure"
13841 #include "confdefs.h"
13842 #include <ac_nonexistent.h>
13843 _ACEOF
13844 if { (eval echo "$as_me:13844: \"$ac_cpp conftest.$ac_ext\"") >&5
13845   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13846   ac_status=$?
13847   egrep -v '^ *\+' conftest.er1 >conftest.err
13848   rm -f conftest.er1
13849   cat conftest.err >&5
13850   echo "$as_me:13850: \$? = $ac_status" >&5
13851   (exit $ac_status); } >/dev/null; then
13852   if test -s conftest.err; then
13853     ac_cpp_err=$ac_cxx_preproc_warn_flag
13854   else
13855     ac_cpp_err=
13856   fi
13857 else
13858   ac_cpp_err=yes
13859 fi
13860 if test -z "$ac_cpp_err"; then
13861   # Broken: success on invalid input.
13862 continue
13863 else
13864   echo "$as_me: failed program was:" >&5
13865   cat conftest.$ac_ext >&5
13866   # Passes both tests.
13867 ac_preproc_ok=:
13868 break
13869 fi
13870 rm -f conftest.err conftest.$ac_ext
13871
13872 done
13873 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13874 rm -f conftest.err conftest.$ac_ext
13875 if $ac_preproc_ok; then
13876   :
13877 else
13878   { { echo "$as_me:13878: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
13879 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
13880    { (exit 1); exit 1; }; }
13881 fi
13882
13883 ac_ext=cc
13884 ac_cpp='$CXXCPP $CPPFLAGS'
13885 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13886 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13887 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13888 ac_main_return=return
13889
13890 for ac_header in typeinfo
13891 do
13892 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13893 echo "$as_me:13893: checking for $ac_header" >&5
13894 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13895 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13896   echo $ECHO_N "(cached) $ECHO_C" >&6
13897 else
13898   cat >conftest.$ac_ext <<_ACEOF
13899 #line 13899 "configure"
13900 #include "confdefs.h"
13901 #include <$ac_header>
13902 _ACEOF
13903 if { (eval echo "$as_me:13903: \"$ac_cpp conftest.$ac_ext\"") >&5
13904   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13905   ac_status=$?
13906   egrep -v '^ *\+' conftest.er1 >conftest.err
13907   rm -f conftest.er1
13908   cat conftest.err >&5
13909   echo "$as_me:13909: \$? = $ac_status" >&5
13910   (exit $ac_status); } >/dev/null; then
13911   if test -s conftest.err; then
13912     ac_cpp_err=$ac_cxx_preproc_warn_flag
13913   else
13914     ac_cpp_err=
13915   fi
13916 else
13917   ac_cpp_err=yes
13918 fi
13919 if test -z "$ac_cpp_err"; then
13920   eval "$as_ac_Header=yes"
13921 else
13922   echo "$as_me: failed program was:" >&5
13923   cat conftest.$ac_ext >&5
13924   eval "$as_ac_Header=no"
13925 fi
13926 rm -f conftest.err conftest.$ac_ext
13927 fi
13928 echo "$as_me:13928: result: `eval echo '${'$as_ac_Header'}'`" >&5
13929 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13930 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13931   cat >>confdefs.h <<EOF
13932 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13933 EOF
13934
13935 fi
13936 done
13937
13938 echo "$as_me:13938: checking if we should include stdbool.h" >&5
13939 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13940
13941 if test "${cf_cv_header_stdbool_h+set}" = set; then
13942   echo $ECHO_N "(cached) $ECHO_C" >&6
13943 else
13944
13945         cat >conftest.$ac_ext <<_ACEOF
13946 #line 13946 "configure"
13947 #include "confdefs.h"
13948
13949 int
13950 main ()
13951 {
13952 bool foo = false
13953   ;
13954   return 0;
13955 }
13956 _ACEOF
13957 rm -f conftest.$ac_objext
13958 if { (eval echo "$as_me:13958: \"$ac_compile\"") >&5
13959   (eval $ac_compile) 2>&5
13960   ac_status=$?
13961   echo "$as_me:13961: \$? = $ac_status" >&5
13962   (exit $ac_status); } &&
13963          { ac_try='test -s conftest.$ac_objext'
13964   { (eval echo "$as_me:13964: \"$ac_try\"") >&5
13965   (eval $ac_try) 2>&5
13966   ac_status=$?
13967   echo "$as_me:13967: \$? = $ac_status" >&5
13968   (exit $ac_status); }; }; then
13969   cf_cv_header_stdbool_h=0
13970 else
13971   echo "$as_me: failed program was:" >&5
13972 cat conftest.$ac_ext >&5
13973 cat >conftest.$ac_ext <<_ACEOF
13974 #line 13974 "configure"
13975 #include "confdefs.h"
13976
13977 #ifndef __BEOS__
13978 #include <stdbool.h>
13979 #endif
13980
13981 int
13982 main ()
13983 {
13984 bool foo = false
13985   ;
13986   return 0;
13987 }
13988 _ACEOF
13989 rm -f conftest.$ac_objext
13990 if { (eval echo "$as_me:13990: \"$ac_compile\"") >&5
13991   (eval $ac_compile) 2>&5
13992   ac_status=$?
13993   echo "$as_me:13993: \$? = $ac_status" >&5
13994   (exit $ac_status); } &&
13995          { ac_try='test -s conftest.$ac_objext'
13996   { (eval echo "$as_me:13996: \"$ac_try\"") >&5
13997   (eval $ac_try) 2>&5
13998   ac_status=$?
13999   echo "$as_me:13999: \$? = $ac_status" >&5
14000   (exit $ac_status); }; }; then
14001   cf_cv_header_stdbool_h=1
14002 else
14003   echo "$as_me: failed program was:" >&5
14004 cat conftest.$ac_ext >&5
14005 cf_cv_header_stdbool_h=0
14006 fi
14007 rm -f conftest.$ac_objext conftest.$ac_ext
14008 fi
14009 rm -f conftest.$ac_objext conftest.$ac_ext
14010 fi
14011
14012 if test "$cf_cv_header_stdbool_h" = 1
14013 then    echo "$as_me:14013: result: yes" >&5
14014 echo "${ECHO_T}yes" >&6
14015 else    echo "$as_me:14015: result: no" >&5
14016 echo "${ECHO_T}no" >&6
14017 fi
14018
14019 echo "$as_me:14019: checking for builtin bool type" >&5
14020 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
14021
14022 if test "${cf_cv_builtin_bool+set}" = set; then
14023   echo $ECHO_N "(cached) $ECHO_C" >&6
14024 else
14025
14026         cat >conftest.$ac_ext <<_ACEOF
14027 #line 14027 "configure"
14028 #include "confdefs.h"
14029
14030 #include <stdio.h>
14031 #include <sys/types.h>
14032
14033 int
14034 main ()
14035 {
14036 bool x = false
14037   ;
14038   return 0;
14039 }
14040 _ACEOF
14041 rm -f conftest.$ac_objext
14042 if { (eval echo "$as_me:14042: \"$ac_compile\"") >&5
14043   (eval $ac_compile) 2>&5
14044   ac_status=$?
14045   echo "$as_me:14045: \$? = $ac_status" >&5
14046   (exit $ac_status); } &&
14047          { ac_try='test -s conftest.$ac_objext'
14048   { (eval echo "$as_me:14048: \"$ac_try\"") >&5
14049   (eval $ac_try) 2>&5
14050   ac_status=$?
14051   echo "$as_me:14051: \$? = $ac_status" >&5
14052   (exit $ac_status); }; }; then
14053   cf_cv_builtin_bool=1
14054 else
14055   echo "$as_me: failed program was:" >&5
14056 cat conftest.$ac_ext >&5
14057 cf_cv_builtin_bool=0
14058 fi
14059 rm -f conftest.$ac_objext conftest.$ac_ext
14060
14061 fi
14062
14063 if test "$cf_cv_builtin_bool" = 1
14064 then    echo "$as_me:14064: result: yes" >&5
14065 echo "${ECHO_T}yes" >&6
14066 else    echo "$as_me:14066: result: no" >&5
14067 echo "${ECHO_T}no" >&6
14068 fi
14069
14070 echo "$as_me:14070: checking for size of bool" >&5
14071 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14072 if test "${cf_cv_type_of_bool+set}" = set; then
14073   echo $ECHO_N "(cached) $ECHO_C" >&6
14074 else
14075
14076         rm -f cf_test.out
14077         if test "$cross_compiling" = yes; then
14078   cf_cv_type_of_bool=unknown
14079 else
14080   cat >conftest.$ac_ext <<_ACEOF
14081 #line 14081 "configure"
14082 #include "confdefs.h"
14083
14084 #include <stdlib.h>
14085 #include <stdio.h>
14086
14087 #if defined(__cplusplus)
14088
14089 #ifdef HAVE_GXX_BUILTIN_H
14090 #include <g++/builtin.h>
14091 #elif HAVE_GPP_BUILTIN_H
14092 #include <gpp/builtin.h>
14093 #elif HAVE_BUILTIN_H
14094 #include <builtin.h>
14095 #endif
14096
14097 #else
14098
14099 #if $cf_cv_header_stdbool_h
14100 #include <stdbool.h>
14101 #endif
14102
14103 #endif
14104
14105 main()
14106 {
14107         FILE *fp = fopen("cf_test.out", "w");
14108         if (fp != 0) {
14109                 bool x = true;
14110                 if ((bool)(-x) >= 0)
14111                         fputs("unsigned ", fp);
14112                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14113                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14114                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14115                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14116                 fclose(fp);
14117         }
14118         ${cf_cv_main_return:-return}(0);
14119 }
14120
14121 _ACEOF
14122 rm -f conftest$ac_exeext
14123 if { (eval echo "$as_me:14123: \"$ac_link\"") >&5
14124   (eval $ac_link) 2>&5
14125   ac_status=$?
14126   echo "$as_me:14126: \$? = $ac_status" >&5
14127   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14128   { (eval echo "$as_me:14128: \"$ac_try\"") >&5
14129   (eval $ac_try) 2>&5
14130   ac_status=$?
14131   echo "$as_me:14131: \$? = $ac_status" >&5
14132   (exit $ac_status); }; }; then
14133   cf_cv_type_of_bool=`cat cf_test.out`
14134                  if test -z "$cf_cv_type_of_bool"; then
14135                    cf_cv_type_of_bool=unknown
14136                  fi
14137 else
14138   echo "$as_me: program exited with status $ac_status" >&5
14139 echo "$as_me: failed program was:" >&5
14140 cat conftest.$ac_ext >&5
14141 cf_cv_type_of_bool=unknown
14142 fi
14143 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14144 fi
14145
14146 fi
14147
14148         rm -f cf_test.out
14149 echo "$as_me:14149: result: $cf_cv_type_of_bool" >&5
14150 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14151 if test "$cf_cv_type_of_bool" = unknown ; then
14152         case .$NCURSES_BOOL in #(vi
14153         .auto|.) NCURSES_BOOL=unsigned;;
14154         esac
14155         { echo "$as_me:14155: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14156 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14157         cf_cv_type_of_bool=$NCURSES_BOOL
14158 fi
14159
14160 echo "$as_me:14160: checking for special defines needed for etip.h" >&5
14161 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
14162 cf_save_CXXFLAGS="$CXXFLAGS"
14163 cf_result="none"
14164 for cf_math in "" MATH_H
14165 do
14166 for cf_excp in "" MATH_EXCEPTION
14167 do
14168         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
14169         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
14170         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
14171 cat >conftest.$ac_ext <<_ACEOF
14172 #line 14172 "configure"
14173 #include "confdefs.h"
14174
14175 #include <etip.h.in>
14176
14177 int
14178 main ()
14179 {
14180
14181   ;
14182   return 0;
14183 }
14184 _ACEOF
14185 rm -f conftest.$ac_objext
14186 if { (eval echo "$as_me:14186: \"$ac_compile\"") >&5
14187   (eval $ac_compile) 2>&5
14188   ac_status=$?
14189   echo "$as_me:14189: \$? = $ac_status" >&5
14190   (exit $ac_status); } &&
14191          { ac_try='test -s conftest.$ac_objext'
14192   { (eval echo "$as_me:14192: \"$ac_try\"") >&5
14193   (eval $ac_try) 2>&5
14194   ac_status=$?
14195   echo "$as_me:14195: \$? = $ac_status" >&5
14196   (exit $ac_status); }; }; then
14197
14198         test -n "$cf_math" && cat >>confdefs.h <<EOF
14199 #define ETIP_NEEDS_${cf_math} 1
14200 EOF
14201
14202         test -n "$cf_excp" && cat >>confdefs.h <<EOF
14203 #define ETIP_NEEDS_${cf_excp} 1
14204 EOF
14205
14206         cf_result="$cf_math $cf_excp"
14207         break
14208
14209 else
14210   echo "$as_me: failed program was:" >&5
14211 cat conftest.$ac_ext >&5
14212 fi
14213 rm -f conftest.$ac_objext conftest.$ac_ext
14214 done
14215 done
14216 echo "$as_me:14216: result: $cf_result" >&5
14217 echo "${ECHO_T}$cf_result" >&6
14218 CXXFLAGS="$cf_save_CXXFLAGS"
14219
14220 if test -n "$CXX"; then
14221 echo "$as_me:14221: checking if $CXX accepts parameter initialization" >&5
14222 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
14223 if test "${cf_cv_cpp_param_init+set}" = set; then
14224   echo $ECHO_N "(cached) $ECHO_C" >&6
14225 else
14226
14227         ac_ext=cc
14228 ac_cpp='$CXXCPP $CPPFLAGS'
14229 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14230 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14231 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14232 ac_main_return=return
14233
14234         if test "$cross_compiling" = yes; then
14235   cf_cv_cpp_param_init=unknown
14236 else
14237   cat >conftest.$ac_ext <<_ACEOF
14238 #line 14238 "configure"
14239 #include "confdefs.h"
14240
14241 class TEST {
14242 private:
14243         int value;
14244 public:
14245         TEST(int x = 1);
14246         ~TEST();
14247 };
14248
14249 TEST::TEST(int x = 1)   // some compilers do not like second initializer
14250 {
14251         value = x;
14252 }
14253 void main() { }
14254
14255 _ACEOF
14256 rm -f conftest$ac_exeext
14257 if { (eval echo "$as_me:14257: \"$ac_link\"") >&5
14258   (eval $ac_link) 2>&5
14259   ac_status=$?
14260   echo "$as_me:14260: \$? = $ac_status" >&5
14261   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14262   { (eval echo "$as_me:14262: \"$ac_try\"") >&5
14263   (eval $ac_try) 2>&5
14264   ac_status=$?
14265   echo "$as_me:14265: \$? = $ac_status" >&5
14266   (exit $ac_status); }; }; then
14267   cf_cv_cpp_param_init=yes
14268 else
14269   echo "$as_me: program exited with status $ac_status" >&5
14270 echo "$as_me: failed program was:" >&5
14271 cat conftest.$ac_ext >&5
14272 cf_cv_cpp_param_init=no
14273 fi
14274 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14275 fi
14276         ac_ext=cc
14277 ac_cpp='$CXXCPP $CPPFLAGS'
14278 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14279 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14280 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14281 ac_main_return=return
14282
14283 fi
14284 echo "$as_me:14284: result: $cf_cv_cpp_param_init" >&5
14285 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
14286 fi
14287 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
14288 #define CPP_HAS_PARAM_INIT 1
14289 EOF
14290
14291 if test -n "$CXX"; then
14292
14293 echo "$as_me:14293: checking if $CXX accepts static_cast" >&5
14294 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
14295 if test "${cf_cv_cpp_static_cast+set}" = set; then
14296   echo $ECHO_N "(cached) $ECHO_C" >&6
14297 else
14298
14299         ac_ext=cc
14300 ac_cpp='$CXXCPP $CPPFLAGS'
14301 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14302 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14303 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14304 ac_main_return=return
14305
14306         cat >conftest.$ac_ext <<_ACEOF
14307 #line 14307 "configure"
14308 #include "confdefs.h"
14309
14310 class NCursesPanel
14311 {
14312 public:
14313   NCursesPanel(int nlines,
14314                int ncols,
14315                int begin_y = 0,
14316                int begin_x = 0)
14317   {
14318   }
14319
14320   ~NCursesPanel();
14321 };
14322
14323 template<class T> class NCursesUserPanel : public NCursesPanel
14324 {
14325 public:
14326   NCursesUserPanel (int nlines,
14327                     int ncols,
14328                     int begin_y = 0,
14329                     int begin_x = 0,
14330                     const T* p_UserData = static_cast<T*>(0))
14331     : NCursesPanel (nlines, ncols, begin_y, begin_x)
14332   {
14333   };
14334   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
14335   {
14336   };
14337
14338   virtual ~NCursesUserPanel() {};
14339 };
14340
14341 int
14342 main ()
14343 {
14344
14345         const char* p_UserData = static_cast<char*>(0)
14346   ;
14347   return 0;
14348 }
14349 _ACEOF
14350 rm -f conftest.$ac_objext
14351 if { (eval echo "$as_me:14351: \"$ac_compile\"") >&5
14352   (eval $ac_compile) 2>&5
14353   ac_status=$?
14354   echo "$as_me:14354: \$? = $ac_status" >&5
14355   (exit $ac_status); } &&
14356          { ac_try='test -s conftest.$ac_objext'
14357   { (eval echo "$as_me:14357: \"$ac_try\"") >&5
14358   (eval $ac_try) 2>&5
14359   ac_status=$?
14360   echo "$as_me:14360: \$? = $ac_status" >&5
14361   (exit $ac_status); }; }; then
14362   cf_cv_cpp_static_cast=yes
14363 else
14364   echo "$as_me: failed program was:" >&5
14365 cat conftest.$ac_ext >&5
14366 cf_cv_cpp_static_cast=no
14367 fi
14368 rm -f conftest.$ac_objext conftest.$ac_ext
14369
14370         ac_ext=cc
14371 ac_cpp='$CXXCPP $CPPFLAGS'
14372 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14373 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14374 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14375 ac_main_return=return
14376
14377 fi
14378 echo "$as_me:14378: result: $cf_cv_cpp_static_cast" >&5
14379 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
14380
14381 fi
14382
14383 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
14384 #define CPP_HAS_STATIC_CAST 1
14385 EOF
14386
14387 if test -n "$CXX"; then
14388
14389 ac_ext=cc
14390 ac_cpp='$CXXCPP $CPPFLAGS'
14391 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14392 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14393 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14394 ac_main_return=return
14395
14396 for ac_header in strstream.h
14397 do
14398 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14399 echo "$as_me:14399: checking for $ac_header" >&5
14400 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14401 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14402   echo $ECHO_N "(cached) $ECHO_C" >&6
14403 else
14404   cat >conftest.$ac_ext <<_ACEOF
14405 #line 14405 "configure"
14406 #include "confdefs.h"
14407 #include <$ac_header>
14408 _ACEOF
14409 if { (eval echo "$as_me:14409: \"$ac_cpp conftest.$ac_ext\"") >&5
14410   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14411   ac_status=$?
14412   egrep -v '^ *\+' conftest.er1 >conftest.err
14413   rm -f conftest.er1
14414   cat conftest.err >&5
14415   echo "$as_me:14415: \$? = $ac_status" >&5
14416   (exit $ac_status); } >/dev/null; then
14417   if test -s conftest.err; then
14418     ac_cpp_err=$ac_cxx_preproc_warn_flag
14419   else
14420     ac_cpp_err=
14421   fi
14422 else
14423   ac_cpp_err=yes
14424 fi
14425 if test -z "$ac_cpp_err"; then
14426   eval "$as_ac_Header=yes"
14427 else
14428   echo "$as_me: failed program was:" >&5
14429   cat conftest.$ac_ext >&5
14430   eval "$as_ac_Header=no"
14431 fi
14432 rm -f conftest.err conftest.$ac_ext
14433 fi
14434 echo "$as_me:14434: result: `eval echo '${'$as_ac_Header'}'`" >&5
14435 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14436 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14437   cat >>confdefs.h <<EOF
14438 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14439 EOF
14440
14441 fi
14442 done
14443
14444 echo "$as_me:14444: checking if $CXX supports vscan function" >&5
14445 echo $ECHO_N "checking if $CXX supports vscan function... $ECHO_C" >&6
14446 if test "${cf_cv_cpp_vscan_func+set}" = set; then
14447   echo $ECHO_N "(cached) $ECHO_C" >&6
14448 else
14449
14450         for cf_vscan_func in strstream strstream_cast stdio
14451         do
14452         case $cf_vscan_func in #(vi
14453         stdio)          cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi
14454         strstream)      cf_vscan_defs=USE_STRSTREAM_VSCAN ;;
14455         strstream_cast) cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;;
14456         esac
14457         cat >conftest.$ac_ext <<_ACEOF
14458 #line 14458 "configure"
14459 #include "confdefs.h"
14460
14461 #include <stdio.h>
14462 #include <stdarg.h>
14463 #define $cf_vscan_defs 1
14464 #if defined(USE_STDIO_VSCAN)
14465 #elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN)
14466 #include <strstream.h>
14467 #endif
14468
14469 int scanw(const char* fmt, ...)
14470 {
14471     int result = -1;
14472     char buf[BUFSIZ];
14473
14474     va_list args;
14475     va_start(args, fmt);
14476 #if defined(USE_STDIO_VSCAN)
14477     if (::vsscanf(buf, fmt, args) != -1)
14478         result = 0;
14479 #elif defined(USE_STRSTREAM_VSCAN)
14480     strstreambuf ss(buf, sizeof(buf));
14481     if (ss.vscan(fmt, args) != -1)
14482         result = 0;
14483 #elif defined(USE_STRSTREAM_VSCAN_CAST)
14484     strstreambuf ss(buf, sizeof(buf));
14485     if (ss.vscan(fmt, (_IO_va_list)args) != -1)
14486         result = 0;
14487 #else
14488 #error case $cf_vscan_func failed
14489 #endif
14490     va_end(args);
14491     return result;
14492 }
14493
14494 int
14495 main ()
14496 {
14497 int tmp, foo = scanw("%d", &tmp)
14498   ;
14499   return 0;
14500 }
14501 _ACEOF
14502 rm -f conftest.$ac_objext conftest$ac_exeext
14503 if { (eval echo "$as_me:14503: \"$ac_link\"") >&5
14504   (eval $ac_link) 2>&5
14505   ac_status=$?
14506   echo "$as_me:14506: \$? = $ac_status" >&5
14507   (exit $ac_status); } &&
14508          { ac_try='test -s conftest$ac_exeext'
14509   { (eval echo "$as_me:14509: \"$ac_try\"") >&5
14510   (eval $ac_try) 2>&5
14511   ac_status=$?
14512   echo "$as_me:14512: \$? = $ac_status" >&5
14513   (exit $ac_status); }; }; then
14514   cf_cv_cpp_vscan_func=$cf_vscan_func; break
14515 else
14516   echo "$as_me: failed program was:" >&5
14517 cat conftest.$ac_ext >&5
14518 cf_cv_cpp_vscan_func=no
14519 fi
14520 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14521         test "$cf_cv_cpp_vscan_func" != no && break
14522         done
14523
14524 fi
14525 echo "$as_me:14525: result: $cf_cv_cpp_vscan_func" >&5
14526 echo "${ECHO_T}$cf_cv_cpp_vscan_func" >&6
14527
14528 ac_ext=cc
14529 ac_cpp='$CXXCPP $CPPFLAGS'
14530 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14531 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14532 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14533 ac_main_return=return
14534
14535 fi
14536
14537 case $cf_cv_cpp_vscan_func in #(vi
14538 stdio) #(vi
14539         cat >>confdefs.h <<\EOF
14540 #define CPP_HAS_VSCAN_FUNC 1
14541 EOF
14542
14543         cat >>confdefs.h <<\EOF
14544 #define USE_STDIO_VSCAN 1
14545 EOF
14546
14547         ;;
14548 strstream)
14549         cat >>confdefs.h <<\EOF
14550 #define CPP_HAS_VSCAN_FUNC 1
14551 EOF
14552
14553         cat >>confdefs.h <<\EOF
14554 #define USE_STRSTREAM_VSCAN 1
14555 EOF
14556
14557         ;;
14558 strstream_cast)
14559         cat >>confdefs.h <<\EOF
14560 #define CPP_HAS_VSCAN_FUNC 1
14561 EOF
14562
14563         cat >>confdefs.h <<\EOF
14564 #define USE_STRSTREAM_VSCAN_CAST 1
14565 EOF
14566
14567         ;;
14568 esac
14569
14570         CXX_AR='$(AR)'
14571         CXX_AR_OPTS='$(AR_OPTS)'
14572         case $cf_cv_system_name in #(vi
14573         irix*) #(vi
14574             if test "$GXX" != yes ; then
14575                 CXX_AR='$(CXX)'
14576                 CXX_AR_OPTS='-ar -o'
14577             fi
14578             ;;
14579         sco3.2v5*) #(vi
14580             CXXLDFLAGS="-u main"
14581             ;;
14582         solaris2*)
14583             if test "$GXX" != yes ; then
14584                 CXX_AR='$(CXX)'
14585                 CXX_AR_OPTS='-xar -o'
14586             fi
14587             ;;
14588         esac
14589
14590 else
14591         cf_cxx_library=no
14592         cf_cv_builtin_bool=1
14593
14594         # Just because we are not configuring against C++ right now does not
14595         # mean that a user will not want to use C++.  Some distributors disable
14596         # the C++ portion of this configuration as a shortcut (or just to avoid
14597         # compiling the demo in the c++ directory).  So we need a reasonable
14598         # default for the 'bool' type.
14599         #
14600         # Caveat: since the storage of the bool type is not standardized, it
14601         # may change.
14602
14603         if test "$NCURSES_BOOL" != auto ; then
14604                 cf_cv_type_of_bool=$NCURSES_BOOL
14605                 cf_cv_header_stdbool_h=0
14606         else
14607                 if test "$cf_cv_header_stdbool_h" = 1 ; then
14608
14609 echo "$as_me:14609: checking for size of bool" >&5
14610 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14611 if test "${cf_cv_type_of_bool+set}" = set; then
14612   echo $ECHO_N "(cached) $ECHO_C" >&6
14613 else
14614
14615         rm -f cf_test.out
14616         if test "$cross_compiling" = yes; then
14617   cf_cv_type_of_bool=unknown
14618 else
14619   cat >conftest.$ac_ext <<_ACEOF
14620 #line 14620 "configure"
14621 #include "confdefs.h"
14622
14623 #include <stdlib.h>
14624 #include <stdio.h>
14625
14626 #if defined(__cplusplus)
14627
14628 #ifdef HAVE_GXX_BUILTIN_H
14629 #include <g++/builtin.h>
14630 #elif HAVE_GPP_BUILTIN_H
14631 #include <gpp/builtin.h>
14632 #elif HAVE_BUILTIN_H
14633 #include <builtin.h>
14634 #endif
14635
14636 #else
14637
14638 #if $cf_cv_header_stdbool_h
14639 #include <stdbool.h>
14640 #endif
14641
14642 #endif
14643
14644 main()
14645 {
14646         FILE *fp = fopen("cf_test.out", "w");
14647         if (fp != 0) {
14648                 bool x = true;
14649                 if ((bool)(-x) >= 0)
14650                         fputs("unsigned ", fp);
14651                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14652                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14653                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
14654                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14655                 fclose(fp);
14656         }
14657         ${cf_cv_main_return:-return}(0);
14658 }
14659
14660 _ACEOF
14661 rm -f conftest$ac_exeext
14662 if { (eval echo "$as_me:14662: \"$ac_link\"") >&5
14663   (eval $ac_link) 2>&5
14664   ac_status=$?
14665   echo "$as_me:14665: \$? = $ac_status" >&5
14666   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14667   { (eval echo "$as_me:14667: \"$ac_try\"") >&5
14668   (eval $ac_try) 2>&5
14669   ac_status=$?
14670   echo "$as_me:14670: \$? = $ac_status" >&5
14671   (exit $ac_status); }; }; then
14672   cf_cv_type_of_bool=`cat cf_test.out`
14673                  if test -z "$cf_cv_type_of_bool"; then
14674                    cf_cv_type_of_bool=unknown
14675                  fi
14676 else
14677   echo "$as_me: program exited with status $ac_status" >&5
14678 echo "$as_me: failed program was:" >&5
14679 cat conftest.$ac_ext >&5
14680 cf_cv_type_of_bool=unknown
14681 fi
14682 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14683 fi
14684
14685 fi
14686
14687         rm -f cf_test.out
14688 echo "$as_me:14688: result: $cf_cv_type_of_bool" >&5
14689 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14690 if test "$cf_cv_type_of_bool" = unknown ; then
14691         case .$NCURSES_BOOL in #(vi
14692         .auto|.) NCURSES_BOOL=unsigned;;
14693         esac
14694         { echo "$as_me:14694: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14695 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14696         cf_cv_type_of_bool=$NCURSES_BOOL
14697 fi
14698
14699                 else
14700                         echo "$as_me:14700: checking for fallback type of bool" >&5
14701 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
14702                         case "$host_cpu" in #(vi
14703                         i?86)   cf_cv_type_of_bool=char ;; #(vi
14704                         *)      cf_cv_type_of_bool=int  ;;
14705                         esac
14706                         echo "$as_me:14706: result: $cf_cv_type_of_bool" >&5
14707 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14708                 fi
14709         fi
14710 fi
14711
14712 # If the C compiler did not declare bool, and we did not determine that the C++
14713 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
14714 # ncurses library use the same type as C++ bool.  Note that this allows one to
14715 # specify the type of bool in a configure-script option and postpone
14716 # integration with the C++ compiler provided that the types are compatible.
14717 USE_CXX_BOOL=1
14718 if test $cf_cv_cc_bool_type = 1
14719 then
14720         # oops: C has a bool.  Unlikely, but C++ could differ.
14721         USE_CXX_BOOL=0
14722 elif test $cf_cv_builtin_bool = 0
14723 then
14724         # C++ has no bool
14725         USE_CXX_BOOL=0
14726 else
14727         # this is the normal case
14728         USE_CXX_BOOL='defined(__cplusplus)'
14729 fi
14730
14731 if test -f "${srcdir}/Ada95/Makefile.in" ; then
14732 if test "$cf_with_ada" != "no" ; then
14733 cf_ada_make=gnatmake
14734 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
14735 set dummy $cf_ada_make; ac_word=$2
14736 echo "$as_me:14736: checking for $ac_word" >&5
14737 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14738 if test "${ac_cv_prog_gnat_exists+set}" = set; then
14739   echo $ECHO_N "(cached) $ECHO_C" >&6
14740 else
14741   if test -n "$gnat_exists"; then
14742   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
14743 else
14744   ac_save_IFS=$IFS; IFS=$ac_path_separator
14745 ac_dummy="$PATH"
14746 for ac_dir in $ac_dummy; do
14747   IFS=$ac_save_IFS
14748   test -z "$ac_dir" && ac_dir=.
14749   $as_executable_p "$ac_dir/$ac_word" || continue
14750 ac_cv_prog_gnat_exists="yes"
14751 echo "$as_me:14751: found $ac_dir/$ac_word" >&5
14752 break
14753 done
14754
14755   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
14756 fi
14757 fi
14758 gnat_exists=$ac_cv_prog_gnat_exists
14759 if test -n "$gnat_exists"; then
14760   echo "$as_me:14760: result: $gnat_exists" >&5
14761 echo "${ECHO_T}$gnat_exists" >&6
14762 else
14763   echo "$as_me:14763: result: no" >&5
14764 echo "${ECHO_T}no" >&6
14765 fi
14766
14767 if test "$ac_cv_prog_gnat_exists" = no; then
14768    cf_ada_make=
14769 else
14770
14771 echo "$as_me:14771: checking for gnat version" >&5
14772 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
14773 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
14774   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
14775 echo "$as_me:14775: result: $cf_gnat_version" >&5
14776 echo "${ECHO_T}$cf_gnat_version" >&6
14777
14778 case $cf_gnat_version in
14779   3.1[1-9]*|3.[2-9]*|[4-9].*)
14780     cf_cv_prog_gnat_correct=yes
14781     ;;
14782   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
14783      cf_cv_prog_gnat_correct=no
14784      ;;
14785 esac
14786 case $cf_gnat_version in
14787   3.[1-9]*|[4-9].*)
14788       cf_compile_generics=generics
14789       cf_generic_objects="\${GENOBJS}"
14790       ;;
14791   *)  cf_compile_generics=
14792       cf_generic_objects=
14793       ;;
14794 esac
14795
14796    # Extract the first word of "m4", so it can be a program name with args.
14797 set dummy m4; ac_word=$2
14798 echo "$as_me:14798: checking for $ac_word" >&5
14799 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14800 if test "${ac_cv_prog_M4_exists+set}" = set; then
14801   echo $ECHO_N "(cached) $ECHO_C" >&6
14802 else
14803   if test -n "$M4_exists"; then
14804   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
14805 else
14806   ac_save_IFS=$IFS; IFS=$ac_path_separator
14807 ac_dummy="$PATH"
14808 for ac_dir in $ac_dummy; do
14809   IFS=$ac_save_IFS
14810   test -z "$ac_dir" && ac_dir=.
14811   $as_executable_p "$ac_dir/$ac_word" || continue
14812 ac_cv_prog_M4_exists="yes"
14813 echo "$as_me:14813: found $ac_dir/$ac_word" >&5
14814 break
14815 done
14816
14817   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
14818 fi
14819 fi
14820 M4_exists=$ac_cv_prog_M4_exists
14821 if test -n "$M4_exists"; then
14822   echo "$as_me:14822: result: $M4_exists" >&5
14823 echo "${ECHO_T}$M4_exists" >&6
14824 else
14825   echo "$as_me:14825: result: no" >&5
14826 echo "${ECHO_T}no" >&6
14827 fi
14828
14829    if test "$ac_cv_prog_M4_exists" = no; then
14830       cf_cv_prog_gnat_correct=no
14831       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
14832    fi
14833    if test "$cf_cv_prog_gnat_correct" = yes; then
14834       echo "$as_me:14834: checking if GNAT works" >&5
14835 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
14836
14837 rm -f conftest*
14838 cat >>conftest.ads <<CF_EOF
14839 procedure conftest;
14840 CF_EOF
14841 cat >>conftest.adb <<CF_EOF
14842 with Text_IO;
14843 with GNAT.OS_Lib;
14844 procedure conftest is
14845 begin
14846    Text_IO.Put ("Hello World");
14847    Text_IO.New_Line;
14848    GNAT.OS_Lib.OS_Exit (0);
14849 end conftest;
14850 CF_EOF
14851 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14852    if ( ./conftest 1>&5 2>&1 ) ; then
14853       cf_cv_prog_gnat_correct=yes
14854    else
14855       cf_cv_prog_gnat_correct=no
14856    fi
14857 else
14858    cf_cv_prog_gnat_correct=no
14859 fi
14860 rm -f conftest*
14861
14862       echo "$as_me:14862: result: $cf_cv_prog_gnat_correct" >&5
14863 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
14864    fi
14865 fi
14866 if test "$cf_cv_prog_gnat_correct" = yes; then
14867    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
14868
14869    echo "$as_me:14869: checking if GNAT pragma Unreferenced works" >&5
14870 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
14871
14872 rm -f conftest*
14873 cat >>conftest.ads <<CF_EOF
14874 procedure conftest;
14875 CF_EOF
14876 cat >>conftest.adb <<CF_EOF
14877 with Text_IO;
14878 with GNAT.OS_Lib;
14879 procedure conftest is
14880    test : Integer;
14881    pragma Unreferenced (test);
14882 begin
14883    test := 1;
14884    Text_IO.Put ("Hello World");
14885    Text_IO.New_Line;
14886    GNAT.OS_Lib.OS_Exit (0);
14887 end conftest;
14888 CF_EOF
14889 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14890       cf_cv_pragma_unreferenced=yes
14891 else
14892    cf_cv_pragma_unreferenced=no
14893 fi
14894 rm -f conftest*
14895
14896    echo "$as_me:14896: result: $cf_cv_pragma_unreferenced" >&5
14897 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
14898
14899    # if the pragma is supported, use it (needed in the Trace code).
14900    if test $cf_cv_pragma_unreferenced = yes ; then
14901       PRAGMA_UNREF=TRUE
14902    else
14903       PRAGMA_UNREF=FALSE
14904    fi
14905
14906 # Check whether --with-ada-compiler or --without-ada-compiler was given.
14907 if test "${with_ada_compiler+set}" = set; then
14908   withval="$with_ada_compiler"
14909   cf_ada_compiler=$withval
14910 else
14911   cf_ada_compiler=gnatmake
14912 fi;
14913
14914    cf_ada_package=terminal_interface
14915
14916 # Check whether --with-ada-include or --without-ada-include was given.
14917 if test "${with_ada_include+set}" = set; then
14918   withval="$with_ada_include"
14919
14920 else
14921   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
14922 fi;
14923 if test "x$prefix" != xNONE; then
14924   cf_path_syntax="$prefix"
14925 else
14926   cf_path_syntax="$ac_default_prefix"
14927 fi
14928
14929 case ".$withval" in #(vi
14930 .\$\(*\)*|.\'*\'*) #(vi
14931   ;;
14932 ..|./*|.\\*) #(vi
14933   ;;
14934 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14935   ;;
14936 .\${*prefix}*) #(vi
14937   eval withval="$withval"
14938   case ".$withval" in #(vi
14939   .NONE/*)
14940     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14941     ;;
14942   esac
14943   ;; #(vi
14944 .no|.NONE/*)
14945   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14946   ;;
14947 *)
14948   { { echo "$as_me:14948: error: expected a pathname, not \"$withval\"" >&5
14949 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14950    { (exit 1); exit 1; }; }
14951   ;;
14952 esac
14953
14954 ADA_INCLUDE="$withval"
14955
14956 # Check whether --with-ada-objects or --without-ada-objects was given.
14957 if test "${with_ada_objects+set}" = set; then
14958   withval="$with_ada_objects"
14959
14960 else
14961   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
14962 fi;
14963 if test "x$prefix" != xNONE; then
14964   cf_path_syntax="$prefix"
14965 else
14966   cf_path_syntax="$ac_default_prefix"
14967 fi
14968
14969 case ".$withval" in #(vi
14970 .\$\(*\)*|.\'*\'*) #(vi
14971   ;;
14972 ..|./*|.\\*) #(vi
14973   ;;
14974 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14975   ;;
14976 .\${*prefix}*) #(vi
14977   eval withval="$withval"
14978   case ".$withval" in #(vi
14979   .NONE/*)
14980     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14981     ;;
14982   esac
14983   ;; #(vi
14984 .no|.NONE/*)
14985   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14986   ;;
14987 *)
14988   { { echo "$as_me:14988: error: expected a pathname, not \"$withval\"" >&5
14989 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14990    { (exit 1); exit 1; }; }
14991   ;;
14992 esac
14993
14994 ADA_OBJECTS="$withval"
14995
14996 fi
14997 fi
14998 fi
14999
15000 ### Construct the ncurses library-subsets, if any, from this set of keywords:
15001 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
15002 ###
15003 ### ticlib modules may be a separate library, otherwise contained in termlib.
15004 ### termlib modules may be a separate library, otherwise contained in ncurses.
15005 ###
15006 ### The of "+" or " " between the tokens controls the way the script
15007 ### chooses to split module lists into libraries.
15008 ###
15009 ### (see CF_LIB_RULES).
15010 echo "$as_me:15010: checking for library subsets" >&5
15011 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
15012 LIB_SUBSETS=
15013
15014 test "$cf_with_progs"  = yes && LIB_SUBSETS="${LIB_SUBSETS}ticlib"
15015 if test "$with_ticlib" != no ; then
15016         LIB_SUBSETS="${LIB_SUBSETS} "
15017 else
15018         LIB_SUBSETS="${LIB_SUBSETS}+"
15019 fi
15020
15021 LIB_SUBSETS="${LIB_SUBSETS}termlib"
15022 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
15023 if test "$with_termlib" != no ; then
15024         LIB_SUBSETS="${LIB_SUBSETS} "
15025 else
15026         LIB_SUBSETS="${LIB_SUBSETS}+"
15027 fi
15028
15029 LIB_SUBSETS="${LIB_SUBSETS}base"
15030 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
15031 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
15032
15033 echo "$as_me:15033: result: $LIB_SUBSETS" >&5
15034 echo "${ECHO_T}$LIB_SUBSETS" >&6
15035
15036 ### Construct the list of include-directories to be generated
15037
15038 CPPFLAGS="-I. -I../include $CPPFLAGS"
15039 if test "$srcdir" != "."; then
15040         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15041 fi
15042 if test "$GCC" != yes; then
15043         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15044 elif test "$includedir" != "/usr/include"; then
15045         if test "$includedir" = '${prefix}/include' ; then
15046                 if test $prefix != /usr ; then
15047                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
15048                 fi
15049         else
15050                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
15051         fi
15052 fi
15053
15054 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
15055 if test "$srcdir" != "."; then
15056         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15057 fi
15058 if test "$GCC" != yes; then
15059         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15060 elif test "$includedir" != "/usr/include"; then
15061         if test "$includedir" = '${prefix}/include' ; then
15062                 if test $prefix != /usr ; then
15063                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15064                 fi
15065         else
15066                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15067         fi
15068 fi
15069
15070 ### Build up pieces for makefile rules
15071 echo "$as_me:15071: checking default library suffix" >&5
15072 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15073
15074         case $DFT_LWR_MODEL in
15075         libtool) DFT_ARG_SUFFIX=''   ;;
15076         normal)  DFT_ARG_SUFFIX=''   ;;
15077         debug)   DFT_ARG_SUFFIX='_g' ;;
15078         profile) DFT_ARG_SUFFIX='_p' ;;
15079         shared)  DFT_ARG_SUFFIX=''   ;;
15080         esac
15081         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15082 echo "$as_me:15082: result: $DFT_ARG_SUFFIX" >&5
15083 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15084
15085 echo "$as_me:15085: checking default library-dependency suffix" >&5
15086 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15087
15088         case $DFT_LWR_MODEL in
15089         libtool) DFT_DEP_SUFFIX='.la'  ;;
15090         normal)  DFT_DEP_SUFFIX='.a'   ;;
15091         debug)   DFT_DEP_SUFFIX='_g.a' ;;
15092         profile) DFT_DEP_SUFFIX='_p.a' ;;
15093         shared)
15094                 case $cf_cv_system_name in
15095                 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
15096                 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
15097                 hpux*)
15098                         case $target in
15099                         ia64*)  DFT_DEP_SUFFIX='.so' ;;
15100                         *)      DFT_DEP_SUFFIX='.sl' ;;
15101                         esac
15102                         ;;
15103                 *)      DFT_DEP_SUFFIX='.so'  ;;
15104                 esac
15105         esac
15106         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
15107 if test $DFT_LWR_MODEL = shared ; then
15108         case $cf_cv_system_name in #(vi
15109         cygwin*)
15110                 DFT_DEP_SUFFIX=".dll.a"
15111                 ;;
15112         esac
15113 fi
15114 echo "$as_me:15114: result: $DFT_DEP_SUFFIX" >&5
15115 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15116
15117 echo "$as_me:15117: checking default object directory" >&5
15118 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15119
15120         case $DFT_LWR_MODEL in
15121         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
15122         normal)  DFT_OBJ_SUBDIR='objects' ;;
15123         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
15124         profile) DFT_OBJ_SUBDIR='obj_p' ;;
15125         shared)
15126                 case $cf_cv_system_name in #(vi
15127                 cygwin) #(vi
15128                         DFT_OBJ_SUBDIR='objects' ;;
15129                 *)
15130                         DFT_OBJ_SUBDIR='obj_s' ;;
15131                 esac
15132         esac
15133 echo "$as_me:15133: result: $DFT_OBJ_SUBDIR" >&5
15134 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15135
15136 # libtool thinks it can make c++ shared libraries (perhaps only g++)
15137 if test "$cf_with_cxx" = yes ; then
15138 echo "$as_me:15138: checking c++ library-dependency suffix" >&5
15139 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
15140 if test "$with_libtool" != "no"; then
15141         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15142 else
15143
15144         case normal in
15145         libtool) CXX_LIB_SUFFIX='.la'  ;;
15146         normal)  CXX_LIB_SUFFIX='.a'   ;;
15147         debug)   CXX_LIB_SUFFIX='_g.a' ;;
15148         profile) CXX_LIB_SUFFIX='_p.a' ;;
15149         shared)
15150                 case $cf_cv_system_name in
15151                 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
15152                 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
15153                 hpux*)
15154                         case $target in
15155                         ia64*)  CXX_LIB_SUFFIX='.so' ;;
15156                         *)      CXX_LIB_SUFFIX='.sl' ;;
15157                         esac
15158                         ;;
15159                 *)      CXX_LIB_SUFFIX='.so'  ;;
15160                 esac
15161         esac
15162         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15163 fi
15164 echo "$as_me:15164: result: $CXX_LIB_SUFFIX" >&5
15165 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15166
15167 fi
15168
15169 ### Set up low-level terminfo dependencies for makefiles.
15170
15171 # TICS_LIST and TINFO_LIST are needed to build the libtic.so and libterm.so
15172 TICS_LIST="$SHLIB_LIST"
15173 TINFO_LIST="$SHLIB_LIST"
15174
15175 TICS_LEAKS=
15176
15177 if test "$with_ticlib" != no ; then
15178
15179         if test "$with_ticlib" != yes ; then
15180                 TICS_NAME=$with_ticlib
15181                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15182                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15183                 TICS_LIB_SUFFIX="${with_ticlib}"
15184         else
15185                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
15186                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
15187                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
15188         fi
15189         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
15190 else
15191         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15192 fi
15193
15194 if test "$with_termlib" != no ; then
15195
15196         if test "$with_termlib" != yes ; then
15197                 TINFO_NAME=$with_termlib
15198                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15199                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15200                 TINFO_LIB_SUFFIX="${with_termlib}"
15201         else
15202                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15203                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15204                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15205         fi
15206
15207         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15208         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15209         if test "$DFT_LWR_MODEL" = "libtool"; then
15210                 TEST_ARGS="${TEST_DEPS}"
15211                 TEST_ARG2="${TEST_DEP2}"
15212                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15213         else
15214                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15215                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15216                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15217                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15218         fi
15219 else
15220         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15221 fi
15222
15223 # needed for Ada95
15224 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15225
15226 echo "$as_me:15226: checking where we will install curses.h" >&5
15227 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
15228 test "$with_overwrite" = no && \
15229 test "x$includedir" = 'x${prefix}/include' && \
15230         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
15231 echo "$as_me:15231: result: $includedir" >&5
15232 echo "${ECHO_T}$includedir" >&6
15233
15234 ### Resolve a conflict between normal and wide-curses by forcing applications
15235 ### that will need libutf8 to add it to their configure script.
15236 if test "$with_overwrite" != no ; then
15237 if test "$NCURSES_LIBUTF8" = 1 ; then
15238         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
15239         { echo "$as_me:15239: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
15240 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
15241 fi
15242 fi
15243
15244 # used to separate tack out of the tree
15245 NCURSES_TREE=
15246
15247 ### predefined stuff for the test programs
15248 cat >>confdefs.h <<\EOF
15249 #define HAVE_SLK_COLOR 1
15250 EOF
15251
15252 ### Construct the list of subdirectories for which we'll customize makefiles
15253 ### with the appropriate compile-rules.
15254
15255 echo "$as_me:15255: checking for src modules" >&5
15256 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
15257
15258 # dependencies and linker-arguments for test-programs
15259 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
15260 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
15261 if test "$DFT_LWR_MODEL" = "libtool"; then
15262         TEST_ARGS="${TEST_DEPS}"
15263         TEST_ARG2="${TEST_DEP2}"
15264 else
15265         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
15266         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
15267 fi
15268
15269 cf_cv_src_modules=
15270 for cf_dir in $modules_to_build
15271 do
15272         if test -f $srcdir/$cf_dir/modules; then
15273
15274                 # We may/may not have tack in the distribution, though the
15275                 # makefile is.
15276                 if test $cf_dir = tack ; then
15277                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
15278                                 continue
15279                         fi
15280                 fi
15281
15282                 if test -z "$cf_cv_src_modules"; then
15283                         cf_cv_src_modules=$cf_dir
15284                 else
15285                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
15286                 fi
15287
15288                 # Make the ncurses_cfg.h file record the library interface files as
15289                 # well.  These are header files that are the same name as their
15290                 # directory.  Ncurses is the only library that does not follow
15291                 # that pattern.
15292                 if test $cf_dir = tack ; then
15293                         continue
15294                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
15295
15296 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15297
15298                         cat >>confdefs.h <<EOF
15299 #define HAVE_${cf_have_include}_H 1
15300 EOF
15301
15302                         cat >>confdefs.h <<EOF
15303 #define HAVE_LIB${cf_have_include} 1
15304 EOF
15305
15306                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
15307                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
15308                         if test "$DFT_LWR_MODEL" = "libtool"; then
15309                                 TEST_ARGS="${TEST_DEPS}"
15310                                 TEST_ARG2="${TEST_DEP2}"
15311                         else
15312                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
15313                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
15314                         fi
15315                 fi
15316         fi
15317 done
15318 echo "$as_me:15318: result: $cf_cv_src_modules" >&5
15319 echo "${ECHO_T}$cf_cv_src_modules" >&6
15320
15321 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
15322 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
15323
15324 SRC_SUBDIRS="man include"
15325 for cf_dir in $cf_cv_src_modules
15326 do
15327         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
15328 done
15329 SRC_SUBDIRS="$SRC_SUBDIRS test"
15330 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
15331 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
15332
15333 ADA_SUBDIRS=
15334 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
15335    SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
15336    ADA_SUBDIRS="gen src samples"
15337 fi
15338
15339 SUB_MAKEFILES=
15340 for cf_dir in $SRC_SUBDIRS
15341 do
15342         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15343 done
15344
15345 if test -n "$ADA_SUBDIRS"; then
15346    for cf_dir in $ADA_SUBDIRS
15347    do
15348       SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
15349    done
15350
15351 fi
15352
15353 DIRS_TO_MAKE="lib"
15354 for cf_item in $cf_list_models
15355 do
15356
15357         case $cf_item in
15358         libtool) cf_subdir='obj_lo'  ;;
15359         normal)  cf_subdir='objects' ;;
15360         debug)   cf_subdir='obj_g' ;;
15361         profile) cf_subdir='obj_p' ;;
15362         shared)
15363                 case $cf_cv_system_name in #(vi
15364                 cygwin) #(vi
15365                         cf_subdir='objects' ;;
15366                 *)
15367                         cf_subdir='obj_s' ;;
15368                 esac
15369         esac
15370
15371         for cf_item2 in $DIRS_TO_MAKE
15372         do
15373                 test $cf_item2 = $cf_subdir && break
15374         done
15375         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
15376 done
15377 for cf_dir in $DIRS_TO_MAKE
15378 do
15379         test ! -d $cf_dir && mkdir $cf_dir
15380 done
15381
15382 cat >>confdefs.h <<EOF
15383 #define NCURSES_PATHSEP '$PATHSEP'
15384 EOF
15385
15386 cat >>confdefs.h <<EOF
15387 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
15388 EOF
15389
15390 ### Now that we're done running tests, add the compiler-warnings, if any
15391
15392 cf_fix_cppflags=no
15393 cf_new_cflags=
15394 cf_new_cppflags=
15395 cf_new_extra_cppflags=
15396
15397 for cf_add_cflags in $EXTRA_CFLAGS
15398 do
15399 case $cf_fix_cppflags in
15400 no)
15401         case $cf_add_cflags in #(vi
15402         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15403                 case $cf_add_cflags in
15404                 -D*)
15405                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15406
15407                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15408                         && test -z "${cf_tst_cflags}" \
15409                         && cf_fix_cppflags=yes
15410
15411                         if test $cf_fix_cppflags = yes ; then
15412                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15413                                 continue
15414                         elif test "${cf_tst_cflags}" = "\"'" ; then
15415                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15416                                 continue
15417                         fi
15418                         ;;
15419                 esac
15420                 case "$CPPFLAGS" in
15421                 *$cf_add_cflags) #(vi
15422                         ;;
15423                 *) #(vi
15424                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15425                         ;;
15426                 esac
15427                 ;;
15428         *)
15429                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15430                 ;;
15431         esac
15432         ;;
15433 yes)
15434         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15435
15436         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15437
15438         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15439         && test -z "${cf_tst_cflags}" \
15440         && cf_fix_cppflags=no
15441         ;;
15442 esac
15443 done
15444
15445 if test -n "$cf_new_cflags" ; then
15446
15447         CFLAGS="$CFLAGS $cf_new_cflags"
15448 fi
15449
15450 if test -n "$cf_new_cppflags" ; then
15451
15452         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
15453 fi
15454
15455 if test -n "$cf_new_extra_cppflags" ; then
15456
15457         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15458 fi
15459
15460 ### Define substitutions for header files to avoid name-pollution
15461
15462 if test "$cf_cv_have_tcgetattr" = yes ; then
15463         HAVE_TCGETATTR=1
15464 else
15465         HAVE_TCGETATTR=0
15466 fi
15467
15468 if test "$ac_cv_header_termio_h" = yes ; then
15469         HAVE_TERMIO_H=1
15470 else
15471         HAVE_TERMIO_H=0
15472 fi
15473
15474 if test "$ac_cv_header_termios_h" = yes ; then
15475         HAVE_TERMIOS_H=1
15476 else
15477         HAVE_TERMIOS_H=0
15478 fi
15479
15480 ################################################################################
15481 test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
15482 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
15483 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"
15484 ac_config_commands="$ac_config_commands default"
15485 cat >confcache <<\_ACEOF
15486 # This file is a shell script that caches the results of configure
15487 # tests run on this system so they can be shared between configure
15488 # scripts and configure runs, see configure's option --config-cache.
15489 # It is not useful on other systems.  If it contains results you don't
15490 # want to keep, you may remove or edit it.
15491 #
15492 # config.status only pays attention to the cache file if you give it
15493 # the --recheck option to rerun configure.
15494 #
15495 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15496 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15497 # following values.
15498
15499 _ACEOF
15500
15501 # The following way of writing the cache mishandles newlines in values,
15502 # but we know of no workaround that is simple, portable, and efficient.
15503 # So, don't put newlines in cache variables' values.
15504 # Ultrix sh set writes to stderr and can't be redirected directly,
15505 # and sets the high bit in the cache file unless we assign to the vars.
15506 {
15507   (set) 2>&1 |
15508     case `(ac_space=' '; set | grep ac_space) 2>&1` in
15509     *ac_space=\ *)
15510       # `set' does not quote correctly, so add quotes (double-quote
15511       # substitution turns \\\\ into \\, and sed turns \\ into \).
15512       sed -n \
15513         "s/'/'\\\\''/g;
15514           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15515       ;;
15516     *)
15517       # `set' quotes correctly as required by POSIX, so do not add quotes.
15518       sed -n \
15519         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15520       ;;
15521     esac;
15522 } |
15523   sed '
15524      t clear
15525      : clear
15526      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15527      t end
15528      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15529      : end' >>confcache
15530 if cmp -s $cache_file confcache; then :; else
15531   if test -w $cache_file; then
15532     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15533     cat confcache >$cache_file
15534   else
15535     echo "not updating unwritable cache $cache_file"
15536   fi
15537 fi
15538 rm -f confcache
15539
15540 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15541 # Let make expand exec_prefix.
15542 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15543
15544 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15545 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15546 # trailing colons and then remove the whole line if VPATH becomes empty
15547 # (actually we leave an empty line to preserve line numbers).
15548 if test "x$srcdir" = x.; then
15549   ac_vpsub='/^[         ]*VPATH[        ]*=/{
15550 s/:*\$(srcdir):*/:/;
15551 s/:*\${srcdir}:*/:/;
15552 s/:*@srcdir@:*/:/;
15553 s/^\([^=]*=[    ]*\):*/\1/;
15554 s/:*$//;
15555 s/^[^=]*=[      ]*$//;
15556 }'
15557 fi
15558
15559 DEFS=-DHAVE_CONFIG_H
15560
15561 : ${CONFIG_STATUS=./config.status}
15562 ac_clean_files_save=$ac_clean_files
15563 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15564 { echo "$as_me:15564: creating $CONFIG_STATUS" >&5
15565 echo "$as_me: creating $CONFIG_STATUS" >&6;}
15566 cat >$CONFIG_STATUS <<_ACEOF
15567 #! $SHELL
15568 # Generated automatically by configure.
15569 # Run this file to recreate the current configuration.
15570 # Compiler output produced by configure, useful for debugging
15571 # configure, is in config.log if it exists.
15572
15573 debug=false
15574 SHELL=\${CONFIG_SHELL-$SHELL}
15575 ac_cs_invocation="\$0 \$@"
15576
15577 _ACEOF
15578
15579 cat >>$CONFIG_STATUS <<\_ACEOF
15580 # Be Bourne compatible
15581 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15582   emulate sh
15583   NULLCMD=:
15584 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15585   set -o posix
15586 fi
15587
15588 # Name of the executable.
15589 as_me=`echo "$0" |sed 's,.*[\\/],,'`
15590
15591 if expr a : '\(a\)' >/dev/null 2>&1; then
15592   as_expr=expr
15593 else
15594   as_expr=false
15595 fi
15596
15597 rm -f conf$$ conf$$.exe conf$$.file
15598 echo >conf$$.file
15599 if ln -s conf$$.file conf$$ 2>/dev/null; then
15600   # We could just check for DJGPP; but this test a) works b) is more generic
15601   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15602   if test -f conf$$.exe; then
15603     # Don't use ln at all; we don't have any links
15604     as_ln_s='cp -p'
15605   else
15606     as_ln_s='ln -s'
15607   fi
15608 elif ln conf$$.file conf$$ 2>/dev/null; then
15609   as_ln_s=ln
15610 else
15611   as_ln_s='cp -p'
15612 fi
15613 rm -f conf$$ conf$$.exe conf$$.file
15614
15615 as_executable_p="test -f"
15616
15617 # Support unset when possible.
15618 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15619   as_unset=unset
15620 else
15621   as_unset=false
15622 fi
15623
15624 # NLS nuisances.
15625 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15626 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15627 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15628 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15629 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15630 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15631 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15632 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15633
15634 # IFS
15635 # We need space, tab and new line, in precisely that order.
15636 as_nl='
15637 '
15638 IFS="   $as_nl"
15639
15640 # CDPATH.
15641 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15642
15643 exec 6>&1
15644
15645 _ACEOF
15646
15647 # Files that config.status was made for.
15648 if test -n "$ac_config_files"; then
15649   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15650 fi
15651
15652 if test -n "$ac_config_headers"; then
15653   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15654 fi
15655
15656 if test -n "$ac_config_links"; then
15657   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15658 fi
15659
15660 if test -n "$ac_config_commands"; then
15661   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15662 fi
15663
15664 cat >>$CONFIG_STATUS <<\EOF
15665
15666 ac_cs_usage="\
15667 \`$as_me' instantiates files from templates according to the
15668 current configuration.
15669
15670 Usage: $0 [OPTIONS] [FILE]...
15671
15672   -h, --help       print this help, then exit
15673   -V, --version    print version number, then exit
15674   -d, --debug      don't remove temporary files
15675       --recheck    update $as_me by reconfiguring in the same conditions
15676   --file=FILE[:TEMPLATE]
15677                    instantiate the configuration file FILE
15678   --header=FILE[:TEMPLATE]
15679                    instantiate the configuration header FILE
15680
15681 Configuration files:
15682 $config_files
15683
15684 Configuration headers:
15685 $config_headers
15686
15687 Configuration commands:
15688 $config_commands
15689
15690 Report bugs to <bug-autoconf@gnu.org>."
15691 EOF
15692
15693 cat >>$CONFIG_STATUS <<EOF
15694 ac_cs_version="\\
15695 config.status
15696 configured by $0, generated by GNU Autoconf 2.52.20061216,
15697   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15698
15699 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15700 Free Software Foundation, Inc.
15701 This config.status script is free software; the Free Software Foundation
15702 gives unlimited permission to copy, distribute and modify it."
15703 srcdir=$srcdir
15704 INSTALL="$INSTALL"
15705 EOF
15706
15707 cat >>$CONFIG_STATUS <<\EOF
15708 # If no file are specified by the user, then we need to provide default
15709 # value.  By we need to know if files were specified by the user.
15710 ac_need_defaults=:
15711 while test $# != 0
15712 do
15713   case $1 in
15714   --*=*)
15715     ac_option=`expr "x$1" : 'x\([^=]*\)='`
15716     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15717     shift
15718     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15719     shift
15720     ;;
15721   -*);;
15722   *) # This is not an option, so the user has probably given explicit
15723      # arguments.
15724      ac_need_defaults=false;;
15725   esac
15726
15727   case $1 in
15728   # Handling of the options.
15729 EOF
15730 cat >>$CONFIG_STATUS <<EOF
15731   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15732     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15733     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15734 EOF
15735 cat >>$CONFIG_STATUS <<\EOF
15736   --version | --vers* | -V )
15737     echo "$ac_cs_version"; exit 0 ;;
15738   --he | --h)
15739     # Conflict between --help and --header
15740     { { echo "$as_me:15740: error: ambiguous option: $1
15741 Try \`$0 --help' for more information." >&5
15742 echo "$as_me: error: ambiguous option: $1
15743 Try \`$0 --help' for more information." >&2;}
15744    { (exit 1); exit 1; }; };;
15745   --help | --hel | -h )
15746     echo "$ac_cs_usage"; exit 0 ;;
15747   --debug | --d* | -d )
15748     debug=: ;;
15749   --file | --fil | --fi | --f )
15750     shift
15751     CONFIG_FILES="$CONFIG_FILES $1"
15752     ac_need_defaults=false;;
15753   --header | --heade | --head | --hea )
15754     shift
15755     CONFIG_HEADERS="$CONFIG_HEADERS $1"
15756     ac_need_defaults=false;;
15757
15758   # This is an error.
15759   -*) { { echo "$as_me:15759: error: unrecognized option: $1
15760 Try \`$0 --help' for more information." >&5
15761 echo "$as_me: error: unrecognized option: $1
15762 Try \`$0 --help' for more information." >&2;}
15763    { (exit 1); exit 1; }; } ;;
15764
15765   *) ac_config_targets="$ac_config_targets $1" ;;
15766
15767   esac
15768   shift
15769 done
15770
15771 exec 5>>config.log
15772 cat >&5 << _ACEOF
15773
15774 ## ----------------------- ##
15775 ## Running config.status.  ##
15776 ## ----------------------- ##
15777
15778 This file was extended by $as_me 2.52.20061216, executed with
15779   CONFIG_FILES    = $CONFIG_FILES
15780   CONFIG_HEADERS  = $CONFIG_HEADERS
15781   CONFIG_LINKS    = $CONFIG_LINKS
15782   CONFIG_COMMANDS = $CONFIG_COMMANDS
15783   > $ac_cs_invocation
15784 on `(hostname || uname -n) 2>/dev/null | sed 1q`
15785
15786 _ACEOF
15787 EOF
15788
15789 cat >>$CONFIG_STATUS <<EOF
15790 #
15791 # INIT-COMMANDS section.
15792 #
15793
15794 ### Special initialization commands, used to pass information from the
15795 ### configuration-run into config.status
15796
15797 AWK="$AWK"
15798 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
15799 DFT_LWR_MODEL="$DFT_LWR_MODEL"
15800 ECHO_LINK="$ECHO_LINK"
15801 LDCONFIG="$LDCONFIG"
15802 LIB_NAME="$LIB_NAME"
15803 LIB_SUBSETS="$LIB_SUBSETS"
15804 LIB_SUFFIX="$LIB_SUFFIX"
15805 LIB_TRACING="$LIB_TRACING"
15806 MAKE_TERMINFO="$MAKE_TERMINFO"
15807 NCURSES_MAJOR="$NCURSES_MAJOR"
15808 NCURSES_MINOR="$NCURSES_MINOR"
15809 NCURSES_OSPEED="$NCURSES_OSPEED"
15810 NCURSES_PATCH="$NCURSES_PATCH"
15811 SRC_SUBDIRS="$SRC_SUBDIRS"
15812 TERMINFO="$TERMINFO"
15813 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
15814 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
15815 TINFO_NAME="$TINFO_NAME"
15816 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
15817 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
15818 TICS_NAME="$TICS_NAME"
15819 WITH_CURSES_H="$with_curses_h"
15820 WITH_ECHO="$with_echo"
15821 WITH_OVERWRITE="$with_overwrite"
15822 cf_LIST_MODELS="$cf_list_models"
15823 cf_cv_abi_version="$cf_cv_abi_version"
15824 cf_cv_do_symlinks="$cf_cv_do_symlinks"
15825 cf_cv_enable_lp64="$cf_cv_enable_lp64"
15826 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
15827 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
15828 cf_cv_rel_version="$cf_cv_rel_version"
15829 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
15830 cf_cv_shlib_version="$cf_cv_shlib_version"
15831 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
15832 cf_cv_system_name="$cf_cv_system_name"
15833 cf_with_cxx_binding="$cf_with_cxx_binding"
15834 host="$host"
15835 target="$target"
15836
15837 EOF
15838
15839 cat >>$CONFIG_STATUS <<\EOF
15840 for ac_config_target in $ac_config_targets
15841 do
15842   case "$ac_config_target" in
15843   # Handling of arguments.
15844   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
15845   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
15846   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
15847   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
15848   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
15849   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15850   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15851   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
15852   *) { { echo "$as_me:15852: error: invalid argument: $ac_config_target" >&5
15853 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15854    { (exit 1); exit 1; }; };;
15855   esac
15856 done
15857
15858 # If the user did not use the arguments to specify the items to instantiate,
15859 # then the envvar interface is used.  Set only those that are not.
15860 # We use the long form for the default assignment because of an extremely
15861 # bizarre bug on SunOS 4.1.3.
15862 if $ac_need_defaults; then
15863   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15864   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15865   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15866 fi
15867
15868 # Create a temporary directory, and hook for its removal unless debugging.
15869 $debug ||
15870 {
15871   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15872   trap '{ (exit 1); exit 1; }' 1 2 13 15
15873 }
15874
15875 # Create a (secure) tmp directory for tmp files.
15876 : ${TMPDIR=/tmp}
15877 {
15878   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15879   test -n "$tmp" && test -d "$tmp"
15880 }  ||
15881 {
15882   tmp=$TMPDIR/cs$$-$RANDOM
15883   (umask 077 && mkdir $tmp)
15884 } ||
15885 {
15886    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15887    { (exit 1); exit 1; }
15888 }
15889
15890 EOF
15891
15892 cat >>$CONFIG_STATUS <<EOF
15893
15894 #
15895 # CONFIG_FILES section.
15896 #
15897
15898 # No need to generate the scripts if there are no CONFIG_FILES.
15899 # This happens for instance when ./config.status config.h
15900 if test -n "\$CONFIG_FILES"; then
15901   # Protect against being on the right side of a sed subst in config.status.
15902   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15903    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15904 s,@SHELL@,$SHELL,;t t
15905 s,@exec_prefix@,$exec_prefix,;t t
15906 s,@prefix@,$prefix,;t t
15907 s,@program_transform_name@,$program_transform_name,;t t
15908 s,@bindir@,$bindir,;t t
15909 s,@sbindir@,$sbindir,;t t
15910 s,@libexecdir@,$libexecdir,;t t
15911 s,@datadir@,$datadir,;t t
15912 s,@sysconfdir@,$sysconfdir,;t t
15913 s,@sharedstatedir@,$sharedstatedir,;t t
15914 s,@localstatedir@,$localstatedir,;t t
15915 s,@libdir@,$libdir,;t t
15916 s,@includedir@,$includedir,;t t
15917 s,@oldincludedir@,$oldincludedir,;t t
15918 s,@infodir@,$infodir,;t t
15919 s,@mandir@,$mandir,;t t
15920 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15921 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15922 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15923 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15924 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15925 s,@build_alias@,$build_alias,;t t
15926 s,@host_alias@,$host_alias,;t t
15927 s,@target_alias@,$target_alias,;t t
15928 s,@ECHO_C@,$ECHO_C,;t t
15929 s,@ECHO_N@,$ECHO_N,;t t
15930 s,@ECHO_T@,$ECHO_T,;t t
15931 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15932 s,@DEFS@,$DEFS,;t t
15933 s,@LIBS@,$LIBS,;t t
15934 s,@top_builddir@,$top_builddir,;t t
15935 s,@EGREP@,$EGREP,;t t
15936 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
15937 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
15938 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
15939 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
15940 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
15941 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
15942 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
15943 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
15944 s,@build@,$build,;t t
15945 s,@build_cpu@,$build_cpu,;t t
15946 s,@build_vendor@,$build_vendor,;t t
15947 s,@build_os@,$build_os,;t t
15948 s,@host@,$host,;t t
15949 s,@host_cpu@,$host_cpu,;t t
15950 s,@host_vendor@,$host_vendor,;t t
15951 s,@host_os@,$host_os,;t t
15952 s,@target@,$target,;t t
15953 s,@target_cpu@,$target_cpu,;t t
15954 s,@target_vendor@,$target_vendor,;t t
15955 s,@target_os@,$target_os,;t t
15956 s,@CC@,$CC,;t t
15957 s,@CFLAGS@,$CFLAGS,;t t
15958 s,@LDFLAGS@,$LDFLAGS,;t t
15959 s,@CPPFLAGS@,$CPPFLAGS,;t t
15960 s,@ac_ct_CC@,$ac_ct_CC,;t t
15961 s,@EXEEXT@,$EXEEXT,;t t
15962 s,@OBJEXT@,$OBJEXT,;t t
15963 s,@CPP@,$CPP,;t t
15964 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
15965 s,@PROG_EXT@,$PROG_EXT,;t t
15966 s,@LDCONFIG@,$LDCONFIG,;t t
15967 s,@CXX@,$CXX,;t t
15968 s,@CXXFLAGS@,$CXXFLAGS,;t t
15969 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
15970 s,@AWK@,$AWK,;t t
15971 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15972 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15973 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15974 s,@LINT@,$LINT,;t t
15975 s,@LINT_OPTS@,$LINT_OPTS,;t t
15976 s,@LN_S@,$LN_S,;t t
15977 s,@SET_MAKE@,$SET_MAKE,;t t
15978 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
15979 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
15980 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
15981 s,@RANLIB@,$RANLIB,;t t
15982 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
15983 s,@LD@,$LD,;t t
15984 s,@ac_ct_LD@,$ac_ct_LD,;t t
15985 s,@AR@,$AR,;t t
15986 s,@ac_ct_AR@,$ac_ct_AR,;t t
15987 s,@AR_OPTS@,$AR_OPTS,;t t
15988 s,@DESTDIR@,$DESTDIR,;t t
15989 s,@BUILD_CC@,$BUILD_CC,;t t
15990 s,@BUILD_CPP@,$BUILD_CPP,;t t
15991 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
15992 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
15993 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
15994 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
15995 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
15996 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
15997 s,@cf_list_models@,$cf_list_models,;t t
15998 s,@LIBTOOL@,$LIBTOOL,;t t
15999 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
16000 s,@LIB_CREATE@,$LIB_CREATE,;t t
16001 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
16002 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
16003 s,@LIB_PREP@,$LIB_PREP,;t t
16004 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16005 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16006 s,@LIB_LINK@,$LIB_LINK,;t t
16007 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
16008 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
16009 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
16010 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16011 s,@TICS_NAME@,$TICS_NAME,;t t
16012 s,@TINFO_NAME@,$TINFO_NAME,;t t
16013 s,@LIB_NAME@,$LIB_NAME,;t t
16014 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
16015 s,@CC_G_OPT@,$CC_G_OPT,;t t
16016 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
16017 s,@LD_MODEL@,$LD_MODEL,;t t
16018 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16019 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16020 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
16021 s,@LINK_PROGS@,$LINK_PROGS,;t t
16022 s,@LINK_TESTS@,$LINK_TESTS,;t t
16023 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16024 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16025 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
16026 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
16027 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
16028 s,@PATHSEP@,$PATHSEP,;t t
16029 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
16030 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
16031 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
16032 s,@TERMINFO@,$TERMINFO,;t t
16033 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
16034 s,@TERMPATH@,$TERMPATH,;t t
16035 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
16036 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
16037 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
16038 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
16039 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
16040 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
16041 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
16042 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
16043 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
16044 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
16045 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
16046 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
16047 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
16048 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
16049 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
16050 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
16051 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
16052 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
16053 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
16054 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
16055 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
16056 s,@ECHO_LINK@,$ECHO_LINK,;t t
16057 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16058 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
16059 s,@ADA_TRACE@,$ADA_TRACE,;t t
16060 s,@MATH_LIB@,$MATH_LIB,;t t
16061 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
16062 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
16063 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
16064 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
16065 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
16066 s,@CXXCPP@,$CXXCPP,;t t
16067 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
16068 s,@CXX_AR@,$CXX_AR,;t t
16069 s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
16070 s,@CXXLIBS@,$CXXLIBS,;t t
16071 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
16072 s,@gnat_exists@,$gnat_exists,;t t
16073 s,@M4_exists@,$M4_exists,;t t
16074 s,@cf_ada_make@,$cf_ada_make,;t t
16075 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16076 s,@cf_ada_package@,$cf_ada_package,;t t
16077 s,@ADAFLAGS@,$ADAFLAGS,;t t
16078 s,@cf_compile_generics@,$cf_compile_generics,;t t
16079 s,@cf_generic_objects@,$cf_generic_objects,;t t
16080 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
16081 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16082 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16083 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16084 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16085 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16086 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16087 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
16088 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
16089 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
16090 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
16091 s,@TICS_ARGS@,$TICS_ARGS,;t t
16092 s,@TICS_LEAKS@,$TICS_LEAKS,;t t
16093 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
16094 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
16095 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
16096 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
16097 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
16098 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
16099 s,@TINFO_LIST@,$TINFO_LIST,;t t
16100 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
16101 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
16102 s,@TEST_ARGS@,$TEST_ARGS,;t t
16103 s,@TEST_DEPS@,$TEST_DEPS,;t t
16104 s,@TEST_ARG2@,$TEST_ARG2,;t t
16105 s,@TEST_DEP2@,$TEST_DEP2,;t t
16106 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16107 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
16108 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
16109 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
16110 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
16111 CEOF
16112
16113 EOF
16114
16115   cat >>$CONFIG_STATUS <<\EOF
16116   # Split the substitutions into bite-sized pieces for seds with
16117   # small command number limits, like on Digital OSF/1 and HP-UX.
16118   ac_max_sed_lines=48
16119   ac_sed_frag=1 # Number of current file.
16120   ac_beg=1 # First line for current file.
16121   ac_end=$ac_max_sed_lines # Line after last line for current file.
16122   ac_more_lines=:
16123   ac_sed_cmds=
16124   while $ac_more_lines; do
16125     if test $ac_beg -gt 1; then
16126       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16127     else
16128       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16129     fi
16130     if test ! -s $tmp/subs.frag; then
16131       ac_more_lines=false
16132     else
16133       # The purpose of the label and of the branching condition is to
16134       # speed up the sed processing (if there are no `@' at all, there
16135       # is no need to browse any of the substitutions).
16136       # These are the two extra sed commands mentioned above.
16137       (echo ':t
16138   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16139       if test -z "$ac_sed_cmds"; then
16140         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16141       else
16142         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16143       fi
16144       ac_sed_frag=`expr $ac_sed_frag + 1`
16145       ac_beg=$ac_end
16146       ac_end=`expr $ac_end + $ac_max_sed_lines`
16147     fi
16148   done
16149   if test -z "$ac_sed_cmds"; then
16150     ac_sed_cmds=cat
16151   fi
16152 fi # test -n "$CONFIG_FILES"
16153
16154 EOF
16155 cat >>$CONFIG_STATUS <<\EOF
16156 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16157   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16158   case $ac_file in
16159   - | *:- | *:-:* ) # input from stdin
16160         cat >$tmp/stdin
16161         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16162         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16163   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16164         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16165   * )   ac_file_in=$ac_file.in ;;
16166   esac
16167
16168   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16169   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16170          X"$ac_file" : 'X\(//\)[^/]' \| \
16171          X"$ac_file" : 'X\(//\)$' \| \
16172          X"$ac_file" : 'X\(/\)' \| \
16173          .     : '\(.\)' 2>/dev/null ||
16174 echo X"$ac_file" |
16175     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16176           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16177           /^X\(\/\/\)$/{ s//\1/; q; }
16178           /^X\(\/\).*/{ s//\1/; q; }
16179           s/.*/./; q'`
16180   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16181     { case "$ac_dir" in
16182   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16183   *)                      as_incr_dir=.;;
16184 esac
16185 as_dummy="$ac_dir"
16186 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16187   case $as_mkdir_dir in
16188     # Skip DOS drivespec
16189     ?:) as_incr_dir=$as_mkdir_dir ;;
16190     *)
16191       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16192       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16193     ;;
16194   esac
16195 done; }
16196
16197     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16198     # A "../" for each directory in $ac_dir_suffix.
16199     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16200   else
16201     ac_dir_suffix= ac_dots=
16202   fi
16203
16204   case $srcdir in
16205   .)  ac_srcdir=.
16206       if test -z "$ac_dots"; then
16207          ac_top_srcdir=.
16208       else
16209          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16210       fi ;;
16211   [\\/]* | ?:[\\/]* )
16212       ac_srcdir=$srcdir$ac_dir_suffix;
16213       ac_top_srcdir=$srcdir ;;
16214   *) # Relative path.
16215     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16216     ac_top_srcdir=$ac_dots$srcdir ;;
16217   esac
16218
16219   case $INSTALL in
16220   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16221   *) ac_INSTALL=$ac_dots$INSTALL ;;
16222   esac
16223
16224   if test x"$ac_file" != x-; then
16225     { echo "$as_me:16225: creating $ac_file" >&5
16226 echo "$as_me: creating $ac_file" >&6;}
16227     rm -f "$ac_file"
16228   fi
16229   # Let's still pretend it is `configure' which instantiates (i.e., don't
16230   # use $as_me), people would be surprised to read:
16231   #    /* config.h.  Generated automatically by config.status.  */
16232   configure_input="Generated automatically from `echo $ac_file_in |
16233                                                  sed 's,.*/,,'` by configure."
16234
16235   # First look for the input files in the build tree, otherwise in the
16236   # src tree.
16237   ac_file_inputs=`IFS=:
16238     for f in $ac_file_in; do
16239       case $f in
16240       -) echo $tmp/stdin ;;
16241       [\\/$]*)
16242          # Absolute (can't be DOS-style, as IFS=:)
16243          test -f "$f" || { { echo "$as_me:16243: error: cannot find input file: $f" >&5
16244 echo "$as_me: error: cannot find input file: $f" >&2;}
16245    { (exit 1); exit 1; }; }
16246          echo $f;;
16247       *) # Relative
16248          if test -f "$f"; then
16249            # Build tree
16250            echo $f
16251          elif test -f "$srcdir/$f"; then
16252            # Source tree
16253            echo $srcdir/$f
16254          else
16255            # /dev/null tree
16256            { { echo "$as_me:16256: error: cannot find input file: $f" >&5
16257 echo "$as_me: error: cannot find input file: $f" >&2;}
16258    { (exit 1); exit 1; }; }
16259          fi;;
16260       esac
16261     done` || { (exit 1); exit 1; }
16262 EOF
16263 cat >>$CONFIG_STATUS <<EOF
16264   sed "$ac_vpsub
16265 $extrasub
16266 EOF
16267 cat >>$CONFIG_STATUS <<\EOF
16268 :t
16269 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16270 s,@configure_input@,$configure_input,;t t
16271 s,@srcdir@,$ac_srcdir,;t t
16272 s,@top_srcdir@,$ac_top_srcdir,;t t
16273 s,@INSTALL@,$ac_INSTALL,;t t
16274 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16275   rm -f $tmp/stdin
16276   if test x"$ac_file" != x-; then
16277     mv $tmp/out $ac_file
16278   else
16279     cat $tmp/out
16280     rm -f $tmp/out
16281   fi
16282
16283 done
16284 EOF
16285 cat >>$CONFIG_STATUS <<\EOF
16286
16287 #
16288 # CONFIG_HEADER section.
16289 #
16290
16291 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16292 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16293 #
16294 # ac_d sets the value in "#define NAME VALUE" lines.
16295 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16296 ac_dB='[        ].*$,\1#\2'
16297 ac_dC=' '
16298 ac_dD=',;t'
16299 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16300 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16301 ac_iB='\([      ]\),\1#\2define\3'
16302 ac_iC=' '
16303 ac_iD='\4,;t'
16304 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16305 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16306 ac_uB='$,\1#\2define\3'
16307 ac_uC=' '
16308 ac_uD=',;t'
16309
16310 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16311   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16312   case $ac_file in
16313   - | *:- | *:-:* ) # input from stdin
16314         cat >$tmp/stdin
16315         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16316         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16317   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16318         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16319   * )   ac_file_in=$ac_file.in ;;
16320   esac
16321
16322   test x"$ac_file" != x- && { echo "$as_me:16322: creating $ac_file" >&5
16323 echo "$as_me: creating $ac_file" >&6;}
16324
16325   # First look for the input files in the build tree, otherwise in the
16326   # src tree.
16327   ac_file_inputs=`IFS=:
16328     for f in $ac_file_in; do
16329       case $f in
16330       -) echo $tmp/stdin ;;
16331       [\\/$]*)
16332          # Absolute (can't be DOS-style, as IFS=:)
16333          test -f "$f" || { { echo "$as_me:16333: error: cannot find input file: $f" >&5
16334 echo "$as_me: error: cannot find input file: $f" >&2;}
16335    { (exit 1); exit 1; }; }
16336          echo $f;;
16337       *) # Relative
16338          if test -f "$f"; then
16339            # Build tree
16340            echo $f
16341          elif test -f "$srcdir/$f"; then
16342            # Source tree
16343            echo $srcdir/$f
16344          else
16345            # /dev/null tree
16346            { { echo "$as_me:16346: error: cannot find input file: $f" >&5
16347 echo "$as_me: error: cannot find input file: $f" >&2;}
16348    { (exit 1); exit 1; }; }
16349          fi;;
16350       esac
16351     done` || { (exit 1); exit 1; }
16352   # Remove the trailing spaces.
16353   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
16354
16355 EOF
16356
16357 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
16358 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
16359 # be either 'cat' or 'sort'.
16360 cat confdefs.h | uniq >conftest.vals
16361
16362 # Break up conftest.vals because some shells have a limit on
16363 # the size of here documents, and old seds have small limits too.
16364
16365 rm -f conftest.tail
16366 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
16367 while grep . conftest.vals >/dev/null
16368 do
16369   # Write chunks of a limited-size here document to conftest.frag.
16370   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16371   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16372   echo 'CEOF' >> $CONFIG_STATUS
16373   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16374   rm -f conftest.vals
16375   mv conftest.tail conftest.vals
16376 done
16377 rm -f conftest.vals
16378
16379 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16380 # marker @DEFS@.
16381 echo '  cat >> conftest.edit <<CEOF
16382 /@DEFS@/r conftest.frag
16383 /@DEFS@/d
16384 CEOF
16385 sed -f conftest.edit $tmp/in > $tmp/out
16386 rm -f $tmp/in
16387 mv $tmp/out $tmp/in
16388 rm -f conftest.edit conftest.frag
16389 ' >> $CONFIG_STATUS
16390
16391 cat >>$CONFIG_STATUS <<\EOF
16392   # Let's still pretend it is `configure' which instantiates (i.e., don't
16393   # use $as_me), people would be surprised to read:
16394   #    /* config.h.  Generated automatically by config.status.  */
16395   if test x"$ac_file" = x-; then
16396     echo "/* Generated automatically by configure.  */" >$tmp/config.h
16397   else
16398     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16399   fi
16400   cat $tmp/in >>$tmp/config.h
16401   rm -f $tmp/in
16402   if test x"$ac_file" != x-; then
16403     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16404       { echo "$as_me:16404: $ac_file is unchanged" >&5
16405 echo "$as_me: $ac_file is unchanged" >&6;}
16406     else
16407       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16408          X"$ac_file" : 'X\(//\)[^/]' \| \
16409          X"$ac_file" : 'X\(//\)$' \| \
16410          X"$ac_file" : 'X\(/\)' \| \
16411          .     : '\(.\)' 2>/dev/null ||
16412 echo X"$ac_file" |
16413     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16414           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16415           /^X\(\/\/\)$/{ s//\1/; q; }
16416           /^X\(\/\).*/{ s//\1/; q; }
16417           s/.*/./; q'`
16418       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16419         { case "$ac_dir" in
16420   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16421   *)                      as_incr_dir=.;;
16422 esac
16423 as_dummy="$ac_dir"
16424 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16425   case $as_mkdir_dir in
16426     # Skip DOS drivespec
16427     ?:) as_incr_dir=$as_mkdir_dir ;;
16428     *)
16429       as_incr_dir=$as_incr_dir/$as_mkdir_dir
16430       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16431     ;;
16432   esac
16433 done; }
16434
16435       fi
16436       rm -f $ac_file
16437       mv $tmp/config.h $ac_file
16438     fi
16439   else
16440     cat $tmp/config.h
16441     rm -f $tmp/config.h
16442   fi
16443 done
16444 EOF
16445 cat >>$CONFIG_STATUS <<\EOF
16446
16447 #
16448 # CONFIG_COMMANDS section.
16449 #
16450 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16451   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16452   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16453
16454   case $ac_dest in
16455     default )
16456
16457 for cf_dir in test
16458 do
16459         if test ! -d $srcdir/$cf_dir; then
16460                 continue
16461         elif test -f $srcdir/$cf_dir/programs; then
16462                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16463         fi
16464 done
16465
16466         case $cf_cv_system_name in
16467         OS/2*)  LIB_PREFIX=''     ;;
16468         os2*)   LIB_PREFIX=''     ;;
16469         *)      LIB_PREFIX='lib'  ;;
16470         esac
16471 cf_prefix=$LIB_PREFIX
16472
16473 for cf_dir in $SRC_SUBDIRS
16474 do
16475         if test ! -d $srcdir/$cf_dir ; then
16476                 continue
16477         elif test -f $srcdir/$cf_dir/modules; then
16478
16479                 IMPORT_LIB=
16480                 SHARED_LIB=
16481                 LIBS_TO_MAKE=
16482                 for cf_item in $cf_LIST_MODELS
16483                 do
16484
16485         case $cf_item in
16486         libtool) cf_suffix='.la'  ;;
16487         normal)  cf_suffix='.a'   ;;
16488         debug)   cf_suffix='_g.a' ;;
16489         profile) cf_suffix='_p.a' ;;
16490         shared)
16491                 case $cf_cv_system_name in
16492                 cygwin*) cf_suffix='.dll' ;;
16493                 darwin*) cf_suffix='.dylib' ;;
16494                 hpux*)
16495                         case $target in
16496                         ia64*)  cf_suffix='.so' ;;
16497                         *)      cf_suffix='.sl' ;;
16498                         esac
16499                         ;;
16500                 *)      cf_suffix='.so'  ;;
16501                 esac
16502         esac
16503         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16504
16505                         if test $cf_item = shared ; then
16506                         if test "$cf_cv_do_symlinks" = yes ; then
16507                                 case "$cf_cv_shlib_version" in #(vi
16508                                 rel) #(vi
16509                                         case "$cf_cv_system_name" in #(vi
16510                                         darwin*)
16511                                         case .${LIB_SUFFIX} in
16512                                         .w*)
16513                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16514                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
16515                                                 ;;
16516                                         *)
16517                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
16518                                                 ;;
16519                                         esac
16520                                         ;; #(vi
16521                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
16522                                         esac
16523                                         ;;
16524                                 abi)
16525                                         case "$cf_cv_system_name" in #(vi
16526                                         darwin*)
16527                                         case .${LIB_SUFFIX} in
16528                                         .w*)
16529                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16530                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
16531                                                 ;;
16532                                         *)
16533                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
16534                                                 ;;
16535                                         esac
16536                                         ;; #(vi
16537                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
16538                                         esac
16539                                         ;;
16540                                 esac
16541                         fi
16542                         # cygwin needs import library, and has unique naming convention
16543                         # use autodetected ${cf_prefix} for import lib and static lib, but
16544                         # use 'cyg' prefix for shared lib.
16545                         if test $cf_cv_shlib_version = cygdll ; then
16546                                 SHARED_LIB="cyg${cf_dir}\${ABI_VERSION}.dll"
16547                                 IMPORT_LIB="${cf_prefix}${cf_dir}.dll.a"
16548                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/\${SHARED_LIB} ../lib/\${IMPORT_LIB}"
16549                                 continue
16550                         fi
16551                         fi
16552                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
16553                 done
16554
16555                 if test $cf_dir = ncurses ; then
16556                         cf_subsets="$LIB_SUBSETS"
16557                         cf_r_parts="$cf_subsets"
16558
16559                         while test -n "$cf_r_parts"
16560                         do
16561                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
16562                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
16563                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
16564                                         case $cf_l_parts in #(vi
16565                                         *termlib*) #(vi
16566                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
16567                                                 ;;
16568                                         *ticlib*)
16569                                                 cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
16570                                                 ;;
16571                                         *)
16572                                                 break
16573                                                 ;;
16574                                         esac
16575                                         LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
16576                                 else
16577                                         break
16578                                 fi
16579                         done
16580                 else
16581                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
16582                 fi
16583
16584                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
16585                     -e "s%@IMPORT_LIB@%$IMPORT_LIB%" \
16586                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
16587                         $cf_dir/Makefile >$cf_dir/Makefile.out
16588                 mv $cf_dir/Makefile.out $cf_dir/Makefile
16589
16590                 $AWK -f $srcdir/mk-0th.awk \
16591                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
16592                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16593
16594                 for cf_subset in $cf_subsets
16595                 do
16596                         cf_subdirs=
16597                         for cf_item in $cf_LIST_MODELS
16598                         do
16599                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
16600
16601 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16602
16603         case $cf_item in
16604         libtool) cf_suffix='.la'  ;;
16605         normal)  cf_suffix='.a'   ;;
16606         debug)   cf_suffix='_g.a' ;;
16607         profile) cf_suffix='_p.a' ;;
16608         shared)
16609                 case $cf_cv_system_name in
16610                 cygwin*) cf_suffix='.dll' ;;
16611                 darwin*) cf_suffix='.dylib' ;;
16612                 hpux*)
16613                         case $target in
16614                         ia64*)  cf_suffix='.so' ;;
16615                         *)      cf_suffix='.sl' ;;
16616                         esac
16617                         ;;
16618                 *)      cf_suffix='.so'  ;;
16619                 esac
16620         esac
16621         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16622
16623         case $cf_item in
16624         libtool) cf_subdir='obj_lo'  ;;
16625         normal)  cf_subdir='objects' ;;
16626         debug)   cf_subdir='obj_g' ;;
16627         profile) cf_subdir='obj_p' ;;
16628         shared)
16629                 case $cf_cv_system_name in #(vi
16630                 cygwin) #(vi
16631                         cf_subdir='objects' ;;
16632                 *)
16633                         cf_subdir='obj_s' ;;
16634                 esac
16635         esac
16636
16637                         # Test for case where we build libtinfo with a different name.
16638                         cf_libname=$cf_dir
16639                         if test $cf_dir = ncurses ; then
16640                                 case $cf_subset in
16641                                 *base*)
16642                                         ;;
16643                                 termlib*)
16644                                         cf_libname=$TINFO_LIB_SUFFIX
16645                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16646                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16647                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16648                                         fi
16649                                         ;;
16650                                 ticlib*)
16651                                         cf_libname=$TICS_LIB_SUFFIX
16652                                         if test -n "${DFT_ARG_SUFFIX}" ; then
16653                                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16654                                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16655                                         fi
16656                                         ;;
16657                                 esac
16658                         fi
16659
16660                         # These dependencies really are for development, not
16661                         # builds, but they are useful in porting, too.
16662                         cf_depend="../include/ncurses_cfg.h"
16663                         if test "$srcdir" = "."; then
16664                                 cf_reldir="."
16665                         else
16666                                 cf_reldir="\${srcdir}"
16667                         fi
16668
16669                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
16670                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
16671                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
16672                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
16673                         fi
16674
16675                         cf_dir_suffix=
16676                         old_cf_suffix="$cf_suffix"
16677                         if test "$cf_cv_shlib_version_infix" = yes ; then
16678                         if test -n "$LIB_SUFFIX" ; then
16679                                 case $LIB_SUFFIX in
16680                                 w*)
16681                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
16682                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16683                                         cf_dir_suffix=w
16684                                         ;;
16685                                 esac
16686                         fi
16687                         fi
16688
16689                         $AWK -f $srcdir/mk-1st.awk \
16690                                 name=${cf_libname}${cf_dir_suffix} \
16691                                 traces=$LIB_TRACING \
16692                                 MODEL=$cf_ITEM \
16693                                 model=$cf_subdir \
16694                                 prefix=$cf_prefix \
16695                                 suffix=$cf_suffix \
16696                                 subset=$cf_subset \
16697                                 ShlibVer=$cf_cv_shlib_version \
16698                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
16699                                 DoLinks=$cf_cv_do_symlinks \
16700                                 rmSoLocs=$cf_cv_rm_so_locs \
16701                                 ldconfig="$LDCONFIG" \
16702                                 overwrite=$WITH_OVERWRITE \
16703                                 depend="$cf_depend" \
16704                                 host="$host" \
16705                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16706
16707                         cf_suffix="$old_cf_suffix"
16708
16709                         for cf_subdir2 in $cf_subdirs lib
16710                         do
16711                                 test $cf_subdir = $cf_subdir2 && break
16712                         done
16713                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
16714                         $AWK -f $srcdir/mk-2nd.awk \
16715                                 name=$cf_dir \
16716                                 traces=$LIB_TRACING \
16717                                 MODEL=$cf_ITEM \
16718                                 model=$cf_subdir \
16719                                 subset=$cf_subset \
16720                                 srcdir=$srcdir \
16721                                 echo=$WITH_ECHO \
16722                                 crenames=$cf_cv_prog_CC_c_o \
16723                                 cxxrenames=$cf_cv_prog_CXX_c_o \
16724                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
16725                         cf_subdirs="$cf_subdirs $cf_subdir"
16726                         done
16727                 done
16728         fi
16729
16730         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
16731 done
16732
16733 for cf_dir in $SRC_SUBDIRS
16734 do
16735         if test ! -d $srcdir/$cf_dir ; then
16736                 continue
16737         fi
16738
16739         if test -f $cf_dir/Makefile ; then
16740                 case "$cf_dir" in
16741                 Ada95) #(vi
16742                         echo 'libs \' >> Makefile
16743                         echo 'install.libs \' >> Makefile
16744                         echo 'uninstall.libs ::' >> Makefile
16745                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
16746                         ;;
16747                 esac
16748         fi
16749
16750         if test -f $srcdir/$cf_dir/modules; then
16751                 echo >> Makefile
16752                 if test -f $srcdir/$cf_dir/headers; then
16753 cat >> Makefile <<CF_EOF
16754 install.includes \\
16755 uninstall.includes \\
16756 CF_EOF
16757                 fi
16758 if test "$cf_dir" != "c++" ; then
16759 echo 'lint \' >> Makefile
16760 fi
16761 cat >> Makefile <<CF_EOF
16762 libs \\
16763 lintlib \\
16764 install.libs \\
16765 uninstall.libs \\
16766 install.$cf_dir \\
16767 uninstall.$cf_dir ::
16768         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
16769 CF_EOF
16770         elif test -f $srcdir/$cf_dir/headers; then
16771 cat >> Makefile <<CF_EOF
16772
16773 libs \\
16774 install.libs \\
16775 uninstall.libs \\
16776 install.includes \\
16777 uninstall.includes ::
16778         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
16779 CF_EOF
16780 fi
16781 done
16782
16783 cat >> Makefile <<CF_EOF
16784
16785 install.libs uninstall.libs \\
16786 install.data uninstall.data ::
16787 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
16788
16789 install.man \\
16790 uninstall.man ::
16791         cd man && \${MAKE} \${CF_MFLAGS} \$@
16792
16793 distclean ::
16794         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
16795         rm -f headers.sh headers.sed
16796         rm -rf \${DIRS_TO_MAKE}
16797 CF_EOF
16798
16799 # Special case: tack's manpage lives in its own directory.
16800 if test -d tack ; then
16801 if test -f $srcdir/$tack.h; then
16802 cat >> Makefile <<CF_EOF
16803
16804 install.man \\
16805 uninstall.man ::
16806         cd tack && \${MAKE} \${CF_MFLAGS} \$@
16807 CF_EOF
16808 fi
16809 fi
16810
16811 rm -f headers.sed headers.sh
16812
16813 echo creating headers.sh
16814 cat >headers.sh <<CF_EOF
16815 #! /bin/sh
16816 # This shell script is generated by the 'configure' script.  It is invoked in a
16817 # subdirectory of the build tree.  It generates a sed-script in the parent
16818 # directory that is used to adjust includes for header files that reside in a
16819 # subdirectory of /usr/include, etc.
16820 PRG=""
16821 while test \$# != 3
16822 do
16823 PRG="\$PRG \$1"; shift
16824 done
16825 DST=\$1
16826 REF=\$2
16827 SRC=\$3
16828 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
16829 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
16830 echo installing \$SRC in \$DST
16831 CF_EOF
16832
16833 if test $WITH_CURSES_H = yes; then
16834         cat >>headers.sh <<CF_EOF
16835 case \$DST in
16836 /*/include/*)
16837         END=\`basename \$DST\`
16838         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
16839         do
16840                 NAME=\`basename \$i\`
16841                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
16842         done
16843         ;;
16844 *)
16845         echo "" >> \$TMPSED
16846         ;;
16847 esac
16848 CF_EOF
16849
16850 else
16851         cat >>headers.sh <<CF_EOF
16852 case \$DST in
16853 /*/include/*)
16854         END=\`basename \$DST\`
16855         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
16856         do
16857                 NAME=\`basename \$i\`
16858                 if test "\$NAME" = "curses.h"
16859                 then
16860                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
16861                         NAME=ncurses.h
16862                 fi
16863                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
16864         done
16865         ;;
16866 *)
16867         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
16868         ;;
16869 esac
16870 CF_EOF
16871 fi
16872 cat >>headers.sh <<CF_EOF
16873 rm -f \$TMPSRC
16874 sed -f \$TMPSED \$SRC > \$TMPSRC
16875 NAME=\`basename \$SRC\`
16876 CF_EOF
16877 if test $WITH_CURSES_H != yes; then
16878         cat >>headers.sh <<CF_EOF
16879 test "\$NAME" = "curses.h" && NAME=ncurses.h
16880 CF_EOF
16881 fi
16882 cat >>headers.sh <<CF_EOF
16883 # Just in case someone gzip'd manpages, remove the conflicting copy.
16884 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
16885
16886 eval \$PRG \$TMPSRC \$DST/\$NAME
16887 rm -f \$TMPSRC \$TMPSED
16888 CF_EOF
16889
16890 chmod 0755 headers.sh
16891
16892 for cf_dir in $SRC_SUBDIRS
16893 do
16894         if test ! -d $srcdir/$cf_dir ; then
16895                 continue
16896         fi
16897
16898         if test -f $srcdir/$cf_dir/headers; then
16899                 $AWK -f $srcdir/mk-hdr.awk \
16900                         subset="$LIB_SUBSETS" \
16901                         compat="$WITH_CURSES_H" \
16902                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
16903         fi
16904
16905         if test -f $srcdir/$cf_dir/modules; then
16906                 if test "$cf_dir" != "c++" ; then
16907                         cat >>$cf_dir/Makefile <<"CF_EOF"
16908 depend : ${AUTO_SRC}
16909         makedepend -- ${CPPFLAGS} -- ${C_SRC}
16910
16911 # DO NOT DELETE THIS LINE -- make depend depends on it.
16912 CF_EOF
16913                 fi
16914         fi
16915 done
16916
16917  ;;
16918   esac
16919 done
16920 EOF
16921
16922 cat >>$CONFIG_STATUS <<\EOF
16923
16924 { (exit 0); exit 0; }
16925 EOF
16926 chmod +x $CONFIG_STATUS
16927 ac_clean_files=$ac_clean_files_save
16928
16929 # configure is writing to config.log, and then calls config.status.
16930 # config.status does its own redirection, appending to config.log.
16931 # Unfortunately, on DOS this fails, as config.log is still kept open
16932 # by configure, so config.status won't be able to write to it; its
16933 # output is simply discarded.  So we exec the FD to /dev/null,
16934 # effectively closing config.log, so it can be properly (re)opened and
16935 # appended to by config.status.  When coming back to configure, we
16936 # need to make the FD available again.
16937 if test "$no_create" != yes; then
16938   ac_cs_success=:
16939   exec 5>/dev/null
16940   $SHELL $CONFIG_STATUS || ac_cs_success=false
16941   exec 5>>config.log
16942   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16943   # would make configure fail if this is the last instruction.
16944   $ac_cs_success || { (exit 1); exit 1; }
16945 fi
16946 ${MAKE-make} preinstall